1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,(function(){var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var i,n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},r={},o=Object.freeze({default:r}),a=void 0!==t?t:"undefined"!=typeof window?window:{};"undefined"!=typeof document?i=document:(i=a["__GLOBAL_DOCUMENT_CACHE@4"])||(i=a["__GLOBAL_DOCUMENT_CACHE@4"]=o&&r||o);var s=i,l=void 0,u="info",c=[],d=function(t,e){var i=l.levels[u],r=new RegExp("^("+i+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),c&&c.push([].concat(e)),e.unshift("VIDEOJS:"),n.console){var o=n.console[t];o||"debug"!==t||(o=n.console.info||n.console.log),o&&i&&r.test(t)&&o[Array.isArray(e)?"apply":"call"](n.console,e)}};(l=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];d("log",e)}).levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:u},l.level=function(t){if("string"==typeof t){if(!l.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');u=t}return u},l.history=function(){return c?[].concat(c):[]},l.history.clear=function(){c&&(c.length=0)},l.history.disable=function(){null!==c&&(c.length=0,c=null)},l.history.enable=function(){null===c&&(c=[])},l.error=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return d("error",e)},l.warn=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return d("warn",e)},l.debug=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return d("debug",e)};var h=l;function p(t){return t.replace(/\n\r?\s*/g,"")}var f=function(t){for(var e="",i=0;i<arguments.length;i++)e+=p(t[i])+(arguments[i+1]||"");return e},g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},v=function(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)},y=function(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(t,e){return t.raw=e,t},b=Object.prototype.toString,T=function(t){return S(t)?Object.keys(t):[]};function w(t,e){T(t).forEach((function(i){return e(t[i],i)}))}function x(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[t].concat(i)):(i.forEach((function(e){e&&w(e,(function(e,i){t[i]=e}))})),t)}function S(t){return!!t&&"object"===(void 0===t?"undefined":g(t))}function k(t){return S(t)&&"[object Object]"===b.call(t)&&t.constructor===Object}function C(t,e){if(!t||!e)return"";if("function"==typeof n.getComputedStyle){var i=n.getComputedStyle(t);return i?i[e]:""}return""}var E=_(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);function A(t){return"string"==typeof t&&/\S/.test(t)}function M(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function P(){return s===n.document}function I(t){return S(t)&&1===t.nodeType}function L(){try{return n.parent!==n.self}catch(t){return!0}}function O(t){return function(e,i){if(!A(e))return s[t](null);A(i)&&(i=s.querySelector(i));var n=I(i)?i:s;return n[t]&&n[t](e)}}function D(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],r=s.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var i=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(h.warn(f(E,t,i)),r.setAttribute(t,i)):"textContent"===t?R(r,i):r[t]=i}
1)),Object.getOwnPropertyNames(i).forEach((function(t){r.setAttribute(t,i[t])})),n&&tt(r,n),r}function R(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function N(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function B(t,e){return M(e),t.classList?t.classList.contains(e):(i=e,new RegExp("(^|\\s)"+i+"($|\\s)")).test(t.className);var i}function F(t,e){return t.classList?t.classList.add(e):B(t,e)||(t.className=(t.className+" "+e).trim()),t}function j(t,e){return t.classList?t.classList.remove(e):(M(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function U(t,e,i){var n=B(t,e);if("function"==typeof i&&(i=i(t,e)),"boolean"!=typeof i&&(i=!n),i!==n)return i?F(t,e):j(t,e),t}function z(t,e){Object.getOwnPropertyNames(e).forEach((function(i){var n=e[i];null==n||!1===n?t.removeAttribute(i):t.setAttribute(i,!0===n?"":n)}))}function H(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var i=t.attributes,n=i.length-1;n>=0;n--){var r=i[n].name,o=i[n].value;
vendor: 16,800 bytes, line 1
1"boolean"!=typeof t[r]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(o=null!==o),e[r]=o}return e}function W(t,e){return t.getAttribute(e)}function V(t,e,i){t.setAttribute(e,i)}function q(t,e){t.removeAttribute(e)}function G(){s.body.focus(),s.onselectstart=function(){return!1}}function Y(){s.onselectstart=function(){return!0}}function X(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(i[t]=e[t])})),i.height||(i.height=parseFloat(C(t,"height"))),i.width||(i.width=parseFloat(C(t,"width"))),i}}function $(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var i=s.documentElement,r=s.body,o=e.top+(n.pageYOffset||r.scrollTop)-(i.clientTop||r.clientTop||0);return{left:Math.round(e.left+(n.pageXOffset||r.scrollLeft)-(i.clientLeft||r.clientLeft||0)),top:Math.round(o)}}function K(t,e){var i={},n=$(t),r=t.offsetWidth,o=t.offsetHeight,a=n.left,s=e.pageY,l=e.pageX;return e.changedTouches&&(l=e.changedTouches[0].pageX,s=e.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(n.top-s+o)/o)),i.x=Math.max(0,Math.min(1,(l-a)/r)),i}function Z(t){return S(t)&&3===t.nodeType}function Q(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function J(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),I(t)||Z(t)?t:"string"==typeof t&&/\S/.test(t)?s.createTextNode(t):void 0})).filter((function(t){return t}))}function tt(t,e){return J(e).forEach((function(e){return t.appendChild(e)})),t}function et(t,e){return tt(Q(t),e)}function it(t){return void 0===t.button&&void 0===t.buttons||0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons}var nt=O("querySelector"),rt=O("querySelectorAll"),ot=Object.freeze({isReal:P,isEl:I,isInFrame:L,createEl:D,textContent:R,prependTo:N,hasClass:B,addClass:F,removeClass:j,toggleClass:U,setAttributes:z,getAttributes:H,getAttribute:W,setAttribute:V,removeAttribute:q,blockTextSelection:G,unblockTextSelection:Y,getBoundingClientRect:X,findPosition:$,getPointerPosition:K,isTextNode:Z,emptyEl:Q,normalizeContent:J,appendContent:tt,insertContent:et,isSingleLeftClick:it,$:nt,$$:rt}),at=1;function st(){return at++}var lt={},ut="vdata"+(new Date).getTime();function ct(t){var e=t[ut];return e||(e=t[ut]=st()),lt[e]||(lt[e]={}),lt[e]}function dt(t){var e=t[ut];return!!e&&!!Object.getOwnPropertyNames(lt[e]).length}function ht(t){var e=t[ut];if(e){delete lt[e];try{delete t[ut]}catch(i){t.removeAttribute?t.removeAttribute(ut):t[ut]=null}}}function pt(t,e){var i=ct(t);0===i.handlers[e].length&&(delete i.handlers[e],t.removeEventListener?t.removeEventListener(e,i.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&ht(t)}function ft(t,e,i,n){i.forEach((function(i){t(e,i,n)}))}function gt(t){function e(){return!0}function i(){return!1}if(!t||!t.isPropagationStopped){var r=t||n.event;for(var o in t={},r)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&r.preventDefault||(t[o]=r[o]));if(t.target||(t.target=t.srcElement||s),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=i,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=i,null!=t.clientX){var a=s.documentElement,l=s.body;t.pageX=t.clientX+(a&&a.scrollLeft||l&&l.scrollLeft||0)-(a&&a.clientLeft||l&&l.clientLeft||0),t.pageY=t.clientY+(a&&a.scrollTop||l&&l.scrollTop||0)-(a&&a.clientTop||l&&l.clientTop||0)}t.which=t.charCode||t.keyCode,null!=t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var mt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){mt=!0}});n.addEventListener("test",null,t),n.removeEventListener("test",null,t)}catch(e){}}();var vt=["touchstart","touchmove"];function yt(t,e,i){if(Array.isArray(e))return ft(yt,t,e,i);var n=ct(t);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=st()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(e,i){if(!n.disabled){e=gt(e);var r=n.handlers[e.type];if(r)for(var o=r.slice(0),a=0,s=o.length;a<s&&!e.isImmediatePropagationStopped();a++)try{o[a].call(t,e,i)}catch(l){h.error(l)}}}),1===n.handlers[e].length)if(t.addEventListener){var r=!1;mt&&vt.indexOf(e)>-1&&(r={passive:!0}),t.addEventListener(e,n.dispatcher,r)}else t.attachEvent&&t.attachEvent("on"+e,n.dispatcher)}function _t(t,e,i){if(dt(t)){var n=ct(t);if(n.handlers){if(Array.isArray(e))return ft(_t,t,e,i);var r=function(t,e){n.handlers[e]=[],pt(t,e)};if(void 0!==e){var o=n.handlers[e];if(o)if(i){if(i.guid)for(var a=0;a<o.length;a++)o[a].guid===i.guid&&o.splice(a--,1);pt(t,e)}else r(t,e)}else for(var s in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},s)&&r(t,s)}}}function bt(t,e,i){var n=dt(t)?ct(t):{},r=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=gt(e),n.dispatcher&&n.dispatcher.call(t,e,i),r&&!e.isPropagationStopped()&&!0===e.bubbles)bt.call(null,r,e,i);else if(!r&&!e.defaultPrevented){var o=ct(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function Tt(t,e,i){if(Array.isArray(e))return ft(Tt,t,e,i);var n=function n(){_t(t,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||st(),yt(t,e,n)}var wt=Object.freeze({fixEvent:gt,on:yt,off:_t,trigger:bt,one:Tt}),xt=!1,St=void 0,kt=function(){if(P()&&!1!==St.options.autoSetup){var t=Array.prototype.slice.call(s.getElementsByTagName("video")),e=Array.prototype.slice.call(s.getElementsByTagName("audio")),i=Array.prototype.slice.call(s.getElementsByTagName("video-js")),n=t.concat(e,i);if(n&&n.length>0)for(var r=0,o=n.length;r<o;r++){var a=n[r];if(!a||!a.getAttribute){Ct(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&St(a)}else xt||Ct(1)}};function Ct(t,e){e&&(St=e),n.setTimeout(kt,t)}P()&&"complete"===s.readyState?xt=!0:Tt(n,"load",(function(){xt=!0}));var Et=function(t){var e=s.createElement("style");return e.className=t,e},At=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Mt=function(t,e,i){e.guid||(e.guid=st());var n=function(){return e.apply(t,arguments)};return n.guid=i?i+"_"+e.guid:e.guid,n},Pt=function(t,e){var i=Date.now();return function(){var n=Date.now();n-i>=e&&(t.apply(void 0,arguments),i=n)}},It=function(){};It.prototype.allowedEvents_={},It.prototype.addEventListener=It.prototype.on=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},yt(this,t,e),this.addEventListener=i},It.prototype.removeEventListener=It.prototype.off=function(t,e){_t(this,t,e)},It.prototype.one=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},Tt(this,t,e),this.addEventListener=i},It.prototype.dispatchEvent=It.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=gt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),bt(this,t)};var Lt=function(t){return t instanceof It||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"==typeof t[e]}))},Ot=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Dt=function(t){if(!t.nodeName&&!Lt(t))throw new Error("Invalid target; must be a DOM node or evented object.")},Rt=function(t){if(!Ot(t))throw new Error("Invalid event type; must be a non-empty string or array.")},Nt=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},Bt=function(t,e){var i=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,r=void 0,o=void 0;return i?(n=t.eventBusEl_,e.length>=3&&e.shift(),r=e[0],o=e[1]):(n=e[0],r=e[1],o=e[2]),Dt(n),Rt(r),Nt(o),{isTargetingSelf:i,target:n,type:r,listener:o=Mt(t,o)}},Ft=function(t,e,i,n){Dt(t),t.nodeName?wt[e](t,i,n):t[e](i,n)},jt={on:function(){for(var t=this,e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=Bt(this,i),o=r.isTargetingSelf,a=r.target,s=r.type,l=r.listener;if(Ft(a,"on",s,l),!o){var u=function(){return t.off(a,s,l)};u.guid=l.guid;var c=function(){return t.off("dispose",u)};c.guid=l.guid,Ft(this,"on","dispose",u),Ft(a,"on","dispose",c)}},one:function(){for(var t=this,e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=Bt(this,i),o=r.isTargetingSelf,a=r.target,s=r.type,l=r.listener;if(o)Ft(a,"one",s,l);else{var u=function e(){for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];t.off(a,s,e),l.apply(null,n)};u.guid=l.guid,Ft(a,"one",s,u)}},off:function(t,e,i){if(!t||Ot(t))_t(this.eventBusEl_,t,e);else{var n=t,r=e;Dt(n),Rt(r),Nt(i),i=Mt(this,i),this.off("dispose",i),n.nodeName?(_t(n,r,i),_t(n,"dispose",i)):Lt(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(t,e){return bt(this.eventBusEl_,t,e)}};function Ut(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.eventBusKey;if(i){if(!t[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');t.eventBusEl_=t[i]}else t.eventBusEl_=D("span",{className:"vjs-event-bus"});return x(t,jt),t.on("dispose",(function(){t.off(),n.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var zt={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var i=void 0;return w(t,(function(t,n){e.state[n]!==t&&((i=i||{})[n]={from:e.state[n],to:t}),e.state[n]=t})),i&&Lt(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Ht(t,e){return x(t,zt),t.state=x({},t.state,e),"function"==typeof t.handleStateChanged&&Lt(t)&&t.on("statechanged",t.handleStateChanged),t}function Wt(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Vt(){for(var t={},e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach((function(e){e&&w(e,(function(e,i){k(e)?(k(t[i])||(t[i]={}),t[i]=Vt(t[i],e)):t[i]=e}))})),t}var qt=function(){function t(e,i,n){if(m(this,t),this.player_=!e&&this.play?e=this:e,this.options_=Vt({},this.options_),i=this.options_=Vt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+st()}this.name_=i.name||null,i.el?this.el_=i.el:!1!==i.createEl&&(this.el_=this.createEl()),!1!==i.evented&&Ut(this,{eventBusKey:this.el_?"el_":null}),Ht(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==i.initChildren&&this.initChildren(),this.ready(n),!1!==i.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),ht(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return h.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=Vt(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,i){return D(t,e,i)},t.prototype.localize=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),o=r&&r[n],a=n&&n.split("-")[0],s=r&&r[a],l=i;return o&&o[t]?l=o[t]:s&&s[t]&&(l=s[t]),e&&(l=l.replace(/\{(\d+)\}/g,(function(t,i){var n=e[i-1],r=n;return void 0===n&&(r=t),r}))),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=Wt(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,o=void 0;if("string"==typeof e){o=Wt(e);var a=i.componentClass||o;i.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;r=new s(this.player_||this,i)}else r=e;if(this.children_.splice(n,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(o=o||r.name&&Wt(r.name()))&&(this.childNameIndex_[o]=r),"function"==typeof r.el&&r.el()){var l=this.contentEl().children,u=l[n]||null;this.contentEl().insertBefore(r.el(),u)}return r},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===t){e=!0,this.children_.splice(i,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,i=this.options_.children;if(i){var n=this.options_,r=void 0,o=t.getComponent("Tech");(r=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(t){return!r.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var n=void 0,r=void 0;return"string"==typeof t?r=i[n=t]||e.options_[n]||{}:(n=t.name,r=t),{name:n,opts:r}})).filter((function(e){var i=t.getComponent(e.opts.componentClass||Wt(e.name));return i&&!o.isTech(i)})).forEach((function(t){var i=t.name,r=t.opts;if(void 0!==n[i]&&(r=n[i]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(i,r);o&&(e[i]=o)}}))}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return nt(t,e||this.contentEl())},t.prototype.$$=function(t,e){return rt(t,e||this.contentEl())},t.prototype.hasClass=function(t){return B(this.el_,t)},t.prototype.addClass=function(t){F(this.el_,t)},t.prototype.removeClass=function(t){j(this.el_,t)},t.prototype.toggleClass=function(t,e){U(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return W(this.el_,t)},t.prototype.setAttribute=function(t,e){V(this.el_,t,e)},t.prototype.removeAttribute=function(t){q(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,i){if(void 0!==e)return null!==e&&e==e||(e=0),this.el_.style[t]=-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?e:"auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Wt(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof n.getComputedStyle){var i=n.getComputedStyle(this.el_);e=i.getPropertyValue(t)||i[t]}if(0===(e=parseFloat(e))){var r="offset"+Wt(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")}
1,t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,i=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),i=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)i=!1;else if(e){var n=t.touches[0].pageX-e.pageX,r=t.touches[0].pageY-e.pageY;Math.sqrt(n*n+r*r)>10&&(i=!1)}}));var n=function(){i=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){e=null,!0===i&&(new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap"))}))},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=Mt(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var i=function(i){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},t.prototype.setTimeout=function(t,e){var i=this;t=Mt(this,t);var r=n.setTimeout(t,e),o=function(){return i.clearTimeout(r)};return o.guid="vjs-timeout-"+r,this.on("dispose",o),r},t.prototype.clearTimeout=function(t){n.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var i=this;t=Mt(this,t);var r=n.setInterval(t,e),o=function(){return i.clearInterval(r)};return o.guid="vjs-interval-"+r,this.on("dispose",o),r},t.prototype.clearInterval=function(t){n.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e=this;if(this.supportsRaf_){t=Mt(this,t);var i=n.requestAnimationFrame(t),r=function(){return e.cancelAnimationFrame(i)};return r.guid="vjs-raf-"+i,this.on("dispose",r),i}return this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){n.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,i){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),r=n&&n.isTech(i),o=t===i||t.prototype.isPrototypeOf(i.prototype);if(r||!o)throw new Error('Illegal component, "'+e+'"; '+(r?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");e=Wt(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var s=a.players,l=Object.keys(s);if(s&&l.length>0&&l.map((function(t){return s[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=i,i},t.getComponent=function(e){if(e)return e=Wt(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();qt.prototype.supportsRaf_="function"==typeof n.requestAnimationFrame&&"function"==typeof n.cancelAnimationFrame,qt.registerComponent("Component",qt);var Gt,Yt,Xt,$t=n.navigator&&n.navigator.userAgent||"",Kt=/AppleWebKit\/([\d.]+)/i.exec($t),Zt=Kt?parseFloat(Kt.pop()):null,Qt=/iPad/i.test($t),Jt=/iPhone/i.test($t)&&!Qt,te=/iPod/i.test($t),ee=Jt||Qt||te,ie=(Gt=$t.match(/OS (\d+)_/i))&&Gt[1]?Gt[1]:null,ne=/Android/i.test($t),re=function(){var t=$t.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return e&&i?parseFloat(t[1]+"."+t[2]):e||null}(),oe=ne&&re<5&&Zt<537,ae=/Firefox/i.test($t),se=/Edge/i.test($t),le=!se&&/Chrome/i.test($t),ue=function(){var t=$t.match(/Chrome\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),ce=(!(Xt=(Yt=/MSIE\s(\d+)\.\d/.exec($t))&&parseFloat(Yt[1]))&&/Trident\/7.0/i.test($t)&&/rv:11.0/.test($t)&&(Xt=11),Xt),de=/Safari/i.test($t)&&!le&&!ne&&!se,he=de||ee,pe=P()&&("ontouchstart"in n||n.DocumentTouch&&n.document instanceof n.DocumentTouch),fe=Object.freeze({IS_IPAD:Qt,IS_IPHONE:Jt,IS_IPOD:te,IS_IOS:ee,IOS_VERSION:ie,IS_ANDROID:ne,ANDROID_VERSION:re,IS_NATIVE_ANDROID:oe,IS_FIREFOX:ae,IS_EDGE:se,IS_CHROME:le,CHROME_VERSION:ue,IE_VERSION:ce,IS_SAFARI:de,IS_ANY_SAFARI:he,TOUC
vendor: 11,013 bytes, line 1
1H_ENABLED:pe});function ge(t,e,i,n){return function(t,e,i){if("number"!=typeof e||e<0||e>i)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+i+").")}(t,n,i.length-1),i[n][e]}function me(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:ge.bind(null,"start",0,t),end:ge.bind(null,"end",1,t)}}function ve(t,e){return Array.isArray(t)?me(t):void 0===t||void 0===e?me():me([[t,e]])}function ye(t,e){var i=0,n=void 0,r=void 0;if(!e)return 0;t&&t.length||(t=ve(0,0));for(var o=0;o<t.length;o++)n=t.start(o),(r=t.end(o))>e&&(r=e),i+=r-n;return i/e}for(var _e={},be=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Te=be[0],we=void 0,xe=0;xe<be.length;xe++)if(be[xe][1]in s){we=be[xe];break}if(we)for(var Se=0;Se<we.length;Se++)_e[Te[Se]]=we[Se];function ke(t){if(t instanceof ke)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:S(t)&&("number"==typeof t.code&&(this.code=t.code),x(this,t)),this.message||(this.message=ke.defaultMessages[this.code]||"")}ke.prototype.code=0,ke.prototype.message="",ke.prototype.status=null,ke.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ke.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Ce=0;Ce<ke.errorTypes.length;Ce++)ke[ke.errorTypes[Ce]]=Ce,ke.prototype[ke.errorTypes[Ce]]=Ce;function Ee(t){return null!=t&&"function"==typeof t.then}function Ae(t){Ee(t)&&t.then(null,(function(t){}))}var Me=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(e,i,n){return t[i]&&(e[i]=t[i]),e}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Pe=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=D("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=D("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),R(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Mt(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Mt(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,i=this.getChild("closeButton");if(e&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!e&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),i=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(e),this.empty(),et(e,t),this.trigger("modalfill"),n?i.insertBefore(e,n):i.appendChild(e);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),Q(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=s.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(s,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(s,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),i=this.el_.querySelector(":focus"),n=void 0,r=0;r<e.length;r++)if(i===e[r]){n=r;break}s.activeElement===this.el_&&(n=0),t.shiftKey&&0===n?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||n!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof n.HTMLAnchorElement||t instanceof n.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof n.HTMLInputElement||t instanceof n.HTMLSelectElement||t instanceof n.HTMLTextAreaElement||t instanceof n.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof n.HTMLIFrameElement||t instanceof n.HTMLObjectElement||t instanceof n.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},e}(qt);Pe.prototype.options_={pauseOnOpen:!0,temporary:!0},qt.registerComponent("ModalDialog",Pe);var Ie=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e);var n=y(this,t.call(this));n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var r=0;r<i.length;r++)n.addTrack(i[r]);return n}return v(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,i=0,n=this.length;i<n;i++)if(this[i]===t){(e=this[i]).off&&e.off(),this.tracks_.splice(i,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},e}(It);for(var Le in Ie.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Ie.prototype.allowedEvents_)Ie.prototype["on"+Le]=null;var Oe=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].enabled=!1)},De=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e);for(var n=i.length-1;n>=0;n--)if(i[n].enabled){Oe(i,i[n]);break}var r=y(this,t.call(this,i));return r.changing_=!1,r}return v(e,t),e.prototype.addTrack=function(e){var i=this;e.enabled&&Oe(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,Oe(i,e),i.changing_=!1,i.trigger("change"))}))},e}(Ie),Re=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].selected=!1)},Ne=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e);for(var n=i.length-1;n>=0;n--)if(i[n].selected){Re(i,i[n]);break}var r=y(this,t.call(this,i));return r.changing_=!1,Object.defineProperty(r,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),r}return v(e,t),e.prototype.addTrack=function(e){var i=this;e.selected&&Re(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",(function(){i.changing_||(i.changing_=!0,Re(i,e),i.changing_=!1,i.trigger("change"))}))},e}(Ie),Be=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",Mt(this,(function(){this.trigger("change")}))),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",Mt(this,(function(){this.trigger("selectedlanguagechange")})))},e}(Ie),Fe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,t),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var i=0,n=e.length;i<n;i++)this.addTrackElement_(e[i])}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}
1),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,i=0,n=this.trackElements_.length;i<n;i++)if(t===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,i=this.trackElements_.length;e<i;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),je=function(){function t(e){m(this,t),t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}return t.prototype.setCues_=function(t){var e=this.length||0,i=0,n=t.length;this.cues_=t,this.length_=t.length;var r=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<n)for(i=e;i<n;i++)r.call(this,i)},t.prototype.getCueById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},t}(),Ue={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ze={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},He={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},We={disabled:"disabled",hidden:"hidden",showing:"showing"},Ve=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e);var n=y(this,t.call(this)),r={id:i.id||"vjs_track_"+st(),kind:i.kind||"",label:i.label||"",language:i.language||""},o=function(t){Object.defineProperty(n,t,{get:function(){return r[t]},set:function(){}})};for(var a in r)o(a);return n}return v(e,t),e}(It),qe=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],i=s.createElement("a");i.href=t;var r=""===i.host&&"file:"!==i.protocol,o=void 0;r&&((o=s.createElement("div")).innerHTML='<a href="'+t+'"></a>',i=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),s.body.appendChild(o));for(var a={},l=0;l<e.length;l++)a[e[l]]=i[e[l]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=n.location.protocol),r&&s.body.removeChild(o),a},Ge=function(t){if(!t.match(/^https?:\/\//)){var e=s.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},Ye=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""},Xe=function(t){var e=n.location,i=qe(t);return(":"===i.protocol?e.protocol:i.protocol)+i.host!==e.protocol+e.host},$e=Object.freeze({parseUrl:qe,getAbsoluteURL:Ge,getFileExtension:Ye,isCrossOrigin:Xe}),Ke=function(t){var e=Ze.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},Ze=Object.prototype.toString,Qe=Object.freeze({default:Ke,__moduleExports:Ke}),Je=e((function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}})),ti=Object.freeze({default:Je,__moduleExports:Je,left:Je.left,right:Je.right}),ei=Qe&&Ke||Qe,ii=function(t,e,i){if(!ei(e))throw new TypeError("iterator must be a function");arguments.length<3&&(i=this),"[object Array]"===ni.call(t)?oi(t,e,i):"string"==typeof t?ai(t,e,i):si(t,e,i)},ni=Object.prototype.toString,ri=Object.prototype.hasOwnProperty;function oi(t,e,i){for(var n=0,r=t.length;n<r;n++)ri.call(t,n)&&e.call(i,t[n],n,t)}function ai(t,e,i){for(var n=0,r=t.length;n<r;n++)e.call(i,t.charAt(n),n,t)}function si(t,e,i){for(var n in t)ri.call(t,n)&&e.call(i,t[n],n,t)}var li=Object.freeze({default:ii,__moduleExports:ii}),ui=ti&&Je||ti,ci=li&&ii||li,di=function(t){if(!t)return{};var e={};return ci(ui(t).split("\n"),(function(t){var i=t.indexOf(":"),n=ui(t.slice(0,i)).toLowerCase(),r=ui(t.slice(i+1));void 0===e[n]?e[n]=r:"[object Array]"===Object.prototype.toString.call(e[n])?e[n].push(r):e[n]=[e[n],r]})),e},hi=Object.freeze({default:di,__moduleExports:di}),pi=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var n in i)fi.call(i,n)&&(t[n]=i[n])}return t},fi=Object.prototype.hasOwnProperty,gi=Object.freeze({default:pi,__moduleExports:pi}),mi=hi&&di||hi,vi=gi&&pi||gi,yi=bi;function _i(t,e,i){var n=t;
1return ei(e)?(i=e,"string"==typeof t&&(n={uri:t})):n=vi(e,{uri:t}),n.callback=i,n}function bi(t,e,i){return Ti(e=_i(t,e,i))}function Ti(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,i=function(i,n,r){e||(e=!0,t.callback(i,n,r))};function n(){var t=void 0;if(t=l.response?l.response:l.responseText||function(t){return"document"===t.responseType?t.responseXML:""!==t.responseType||t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName?null:t.responseXML}(l),g)try{t=JSON.parse(t)}catch(e){}return t}function r(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,i(t,m)}function o(){if(!s){var e;clearTimeout(u);var r=m,o=null;return 0!==(e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status)?(r={body:n(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(r.headers=mi(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),i(o,r,r.body)}}var a,s,l=t.xhr||null;l||(l=t.cors||t.useXDR?new bi.XDomainRequest:new bi.XMLHttpRequest);var u,c=l.url=t.uri||t.url,d=l.method=t.method||"GET",h=t.body||t.data,p=l.headers=t.headers||{},f=!!t.sync,g=!1,m={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"in t&&!1!==t.json&&(g=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===t.json?h:t.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=r,l.onprogress=function(){},l.onabort=function(){s=!0},l.ontimeout=r,l.open(d,c,!f,t.username,t.password),f||(l.withCredentials=!!t.withCredentials),!f&&t.timeout>0&&(u=setTimeout((function(){if(!s){s=!0,l.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}}),t.timeout)),l.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&l.setRequestHeader(a,p[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(h||null),l}bi.XMLHttpRequest=n.XMLHttpRequest||function(){},bi.XDomainRequest="withCredentials"in new bi.XMLHttpRequest?bi.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var i=0;i<t.length;i++)e(t[i])}(["get","put","post","patch","head","delete"],(function(t){bi["delete"===t?"del":t]=function(e,i,n){return(i=_i(e,i,n)).method=t.toUpperCase(),Ti(i)}}));var wi=function(t,e){var i=new n.WebVTT.Parser(n,n.vttjs,n.WebVTT.StringDecoder()),r=[];i.oncue=function(t){e.addCue(t)},i.onparsingerror=function(t){r.push(t)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(t),r.length>0&&(n.console&&n.console.groupCollapsed&&n.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return h.error(t)})),n.console&&n.console.groupEnd&&n.console.groupEnd()),i.flush()},xi=function(t,e){var i={uri:t},r=Xe(t);r&&(i.cors=r),yi(i,Mt(this,(function(t,i,r){if(t)return h.error(t,i);if(e.loaded_=!0,"function"!=typeof n.WebVTT){if(e.tech_){var o=function(){return wi(r,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",(function(){h.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)}))}}else wi(r,e)})))},Si=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(m(this,e),!i.tech)throw new Error("A tech was not provided.");var n=Vt(i,{kind:He[i.kind]||"subtitles",language:i.language||i.srclang||""}),r=We[n.mode]||"disabled",o=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden");var a=y(this,t.call(this,n));a.tech_=n.tech,a.cues_=[],a.activeCues_=[];var s=new je(a.cues_),l=new je(a.activeCues_),u=!1,c=Mt(a,(function(){u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==r&&a.tech_.ready((function(){a.tech_.on("timeupdate",c)}),!0),Object.defineProperties(a,{default:{get:function(){return o}
vendor: 9,658 bytes, line 1
1,set:function(){}},mode:{get:function(){return r},set:function(t){var e=this;We[t]&&("showing"===(r=t)&&this.tech_.ready((function(){e.tech_.on("timeupdate",c)}),!0),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return l;for(var t=this.tech_.currentTime(),e=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=t&&r.endTime>=t||r.startTime===r.endTime&&r.startTime<=t&&r.startTime+.5>=t)&&e.push(r)}if(u=!1,e.length!==this.activeCues_.length)u=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(u=!0);return this.activeCues_=e,l.setCues_(this.activeCues_),l},set:function(){}}}),n.src?(a.src=n.src,xi(n.src,a)):a.loaded_=!0,a}return v(e,t),e.prototype.addCue=function(t){var e=t;if(n.vttjs&&!(t instanceof n.vttjs.VTTCue)){for(var i in e=new n.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)i in e||(e[i]=t[i]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),o=0;o<r.length;o++)r[o]!==this&&r[o].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var i=this.cues_[e];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(Ve);Si.prototype.allowedEvents_={cuechange:"cuechange"};var ki=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e);var n=Vt(i,{kind:ze[i.kind]||""}),r=y(this,t.call(this,n)),o=!1;return Object.defineProperty(r,"enabled",{get:function(){return o},set:function(t){"boolean"==typeof t&&t!==o&&(o=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.loaded_=!0,r}return v(e,t),e}(Ve),Ci=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e);var n=Vt(i,{kind:Ue[i.kind]||""}),r=y(this,t.call(this,n)),o=!1;return Object.defineProperty(r,"selected",{get:function(){return o},set:function(t){"boolean"==typeof t&&t!==o&&(o=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r}return v(e,t),e}(Ve),Ei=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e);var n=y(this,t.call(this)),r=void 0,o=new Si(i);return n.kind=o.kind,n.src=o.src,n.srclang=o.language,n.label=o.label,n.default=o.default,Object.defineProperties(n,{readyState:{get:function(){return r}},track:{get:function(){return o}}}),r=0,o.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:n})})),n}return v(e,t),e}(It);Ei.prototype.allowedEvents_={load:"load"},Ei.NONE=0,Ei.LOADING=1,Ei.LOADED=2,Ei.ERROR=3;var Ai={audio:{ListClass:De,TrackClass:ki,capitalName:"Audio"},video:{ListClass:Ne,TrackClass:Ci,capitalName:"Video"},text:{ListClass:Be,TrackClass:Si,capitalName:"Text"}};Object.keys(Ai).forEach((function(t){Ai[t].getterName=t+"Tracks",Ai[t].privateName=t+"Tracks_"}));var Mi={remoteText:{ListClass:Be,TrackClass:Si,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Fe,TrackClass:Ei,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Pi=Vt(Ai,Mi);Mi.names=Object.keys(Mi),Ai.names=Object.keys(Ai),Pi.names=[].concat(Mi.names).concat(Ai.names);var Ii=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function Li(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function Oi(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function Di(){this.values=Ii(null)}function Ri(t,e,i,n){var r=n?t.split(n):[t];for(var o in r)if("string"==typeof r[o]){var a=r[o].split(i);2===a.length&&e(a[0],a[1])}}function Ni(t,e,i){var n=t;function r(){var e=Oi(t);if(null===e)throw new Li(Li.Errors.BadTimeStamp,"Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function o(){t=t.replace(/^\s+/,"")}if(o(),e.startTime=r(),o(),"--\x3e"!==t.substr(0,3))throw new Li(Li.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.substr(3),o(),e.endTime=r(),o(),function(t,e){var n=new Di;Ri(t,(function(t,e){switch(t){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===e){n.set(t,i[r].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),a=o[0];n.integer(t,a),n.percent(t,a)&&n.set("snapToLines",!1),n.alt(t,a,["auto"]),2===o.length&&n.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),n.percent(t,o[0]),2===o.length&&n.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start","middle","end","left","right"])}}),/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical",""),e.line=n.get("line","auto"),e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100),e.align=n.get("align","middle"),e.position=n.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=n.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}(Li.prototype=Ii(Error.prototype)).constructor=Li,Li.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Di.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var Bi={"&":"&","<":"<",">":">","‎":"â","‏":"â"," ":"Â "},Fi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ji={v:"title",lang:"lang"},Ui={rt:"ruby"};function zi(t,e){function i(){if(!e)return null;var t,i=e.match(/^([^<]*)(<[^>]*>?)?/);return e=e.substr((t=i[1]?i[1]:i[2]).length),t}function n(t){return Bi[t]}function r(t){for(;p=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(p[0],n);return t}function o(t,e){return!Ui[e.localName]||Ui[e.localName]===t.localName}function a(e,i){var n=Fi[e];if(!n)return null;var r=t.document.createElement(n);r.localName=n;var o=ji[e];return o&&i&&(r[o]=i.trim()),r}for(var s,l=t.document.createElement("div"),u=l,c=[];null!==(s=i());)if("<"!==s[0])u.appendChild(t.document.createTextNode(r(s)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var d,h=Oi(s.substr(1,s.length-2));if(h){d=t.document.createProcessingInstruction("timestamp",h),u.appendChild(d);continue}var p=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!p)continue;if(!(d=a(p[1],p[3])))continue;if(!o(u,d))continue;p[2]&&(d.className=p[2].substr(1).replace("."," ")),c.push(p[1]),u.appendChild(d),u=d}return l}var Hi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Wi(t){for(var e=0;e<Hi.length;e++){var i=Hi[e];if(t>=i[0]&&t<=i[1])return!0}return!1}function Vi(t){var e=[],i="";if(!t||!t.childNodes)return"ltr";function n(t,e){for(var i=e.childNodes.length-1;i>=0;i--)t.push(e.childNodes[i])}function r(t){if(!t||!t.length)return null;var e=t.pop(),i=e.textContent||e.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===e.tagName?r(t):e.childNodes?(n(t,e),r(t)):void 0}for(n(e,t);i=r(e);)for(var o=0;o<i.length;o++)if(Wi(i.charCodeAt(o)))return"rtl";return"ltr"}function qi(){}function Gi(t,e,i){qi.call(this),this.cue=e,this.cueDiv=zi(t,e.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===e.vertical?"horizontal-tb":"lr"
vendor: 4,749 bytes, line 1
1===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:Vi(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(e.positionAlign){case"start":r=e.position;break;case"middle":r=e.position-e.size/2;break;case"end":r=e.position-e.size}this.applyStyles(""===e.vertical?{left:this.formatStyle(r,"%"),width:this.formatStyle(e.size,"%")}:{top:this.formatStyle(r,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Yi(t){var e,i,n,r;if(t.div){i=t.div.offsetHeight,n=t.div.offsetWidth,r=t.div.offsetTop;var o=(o=t.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();t=t.div.getBoundingClientRect(),e=o?Math.max(o[0]&&o[0].height||0,t.height/o.length):0}this.left=t.left,this.right=t.right,this.top=t.top||r,this.height=t.height||i,this.bottom=t.bottom||r+(t.height||i),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight}function Xi(t,e,i,n){var r=new Yi(e),o=e.cue,a=function(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,i=e.textTrackList,n=0,r=0;r<i.length&&i[r]!==e;r++)"showing"===i[r].mode&&n++;return-1*++n}(o),s=[];if(o.snapToLines){var l;switch(o.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var u=r.lineHeight,c=u*Math.round(a),d=i[l]+u,h=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),a<0&&(c+=""===o.vertical?i.height:i.width,s=s.reverse()),r.move(h,c)}else{var p=r.lineHeight/i.height*100;switch(o.lineAlign){case"middle":a-=p/2;break;case"end":a-=p}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],r=new Yi(e)}var f=function(t,e){for(var r,o=new Yi(t),a=1,s=0;s<e.length;s++){for(;t.overlapsOppositeAxis(i,e[s])||t.within(i)&&t.overlapsAny(n);)t.move(e[s]);if(t.within(i))return t;var l=t.intersectPercentage(i);a>l&&(r=new Yi(t),a=l),t=new Yi(o)}return r||o}(r,s);e.move(f.toCSSCompatValues(i))}function $i(){}qi.prototype.applyStyles=function(t,e){for(var i in e=e||this.div,t)t.hasOwnProperty(i)&&(e.style[i]=t[i])},qi.prototype.formatStyle=function(t,e){return 0===t?0:t+e},(Gi.prototype=Ii(qi.prototype)).constructor=Gi,Yi.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},Yi.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Yi.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Yi.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Yi.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Yi.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Yi.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Yi.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||i}},$i.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},$i.convertCueToDOMTree=function(t,e){return t&&e?zi(t,e):null}
vendor: 4,308 bytes, line 1
1,$i.processCues=function(t,e,i){if(!t||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=t.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var r=[],o=Yi.getSimpleBoxPosition(n),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var i,s,l=0;l<e.length;l++)i=new Gi(t,s=e[l],a),n.appendChild(i.div),Xi(0,i,o,r),s.displayState=i.div,r.push(Yi.getSimpleBoxPosition(i))}()}else for(var s=0;s<e.length;s++)n.appendChild(e[s].displayState)},($i.Parser=function(t,e,i){i||(i=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(t){if(!(t instanceof Li))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var e,i=this;function n(){for(var t=i.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var r;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var o=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Li(Li.Errors.BadSignature);i.state="HEADER"}for(var a=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(a?a=!1:r=n(),i.state){case"HEADER":/:/.test(r)?(e=r).match(/X-TIMESTAMP-MAP/)?Ri(e,(function(t,e){switch(t){case"X-TIMESTAMP-MAP":!function(t){var e=new Di;Ri(t,(function(t,i){switch(t){case"MPEGT":e.integer(t+"S",i);break;case"LOCA":e.set(t+"L",Oi(i))}}),/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}(e)}}),/=/):Ri(e,(function(t,e){switch(t){case"Region":!function(t){var e=new Di;if(Ri(t,(function(t,i){switch(t){case"id":e.set(t,i);break;case"width":e.percent(t,i);break;case"lines":e.integer(t,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var r=new Di;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;e.set(t+"X",r.get("x")),e.set(t+"Y",r.get("y"));break;case"scroll":e.alt(t,i,["up"])}}),/=/,/\s/),e.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=e.get("width",100),n.lines=e.get("lines",3),n.regionAnchorX=e.get("regionanchorX",0),n.regionAnchorY=e.get("regionanchorY",100),n.viewportAnchorX=e.get("viewportanchorX",0),n.viewportAnchorY=e.get("viewportanchorY",100),n.scroll=e.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:e.get("id"),region:n})}}(e)}}),/:/):r||(i.state="ID");continue;case"NOTE":r||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){i.state="NOTE";break}if(!r)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===r.indexOf("--\x3e")){i.cue.id=r;continue}case"CUE":try{Ni(r,i.cue,i.regionList)}catch(l){i.reportOrThrowError(l),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var s=-1!==r.indexOf("--\x3e");if(!r||s&&(a=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=r;continue;case"BADCUE":r||(i.state="ID");continue}}}catch(l){i.reportOrThrowError(l),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Li(Li.Errors.BadSignature)}catch(t){this.reportOrThrowError(t)}return this.onflush&&this.onflush(),this}};var Ki=$i,Zi=Object.freeze({default:Ki,__moduleExports:Ki}),Qi={"":1,lr:1,rl:1},Ji={start:1,middle:1,end:1,left:1,right:1};function tn(t){return"string"==typeof t&&!!Ji[t.toLowerCase()]&&t.toLowerCase()}function en(t,e,i){this.hasBeenReset=!1;var n="",r=!1,o=t,a=e,s=i,l=null,u="",c=!0,d="auto",h="start",p=50,f="middle",g=50,m="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(t){n=""+t}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(t){r=!!t}},startTime:{enumerable:!0,get:function(){return o}
vendor: 3,130 bytes, line 1
1,set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");o=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");a=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(t){s=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(t){l=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(t){var e=function(t){return"string"==typeof t&&!!Qi[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");u=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(t){c=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");d=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(t){var e=tn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");h=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return p},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");p=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(t){var e=tn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");f=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return g},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");g=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(t){var e=tn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");m=e,this.hasBeenReset=!0}}}),this.displayState=void 0}en.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var nn=en,rn=Object.freeze({default:nn,__moduleExports:nn}),on={"":!0,up:!0};function an(t){return"number"==typeof t&&t>=0&&t<=100}var sn=function(){var t=100,e=3,i=0,n=100,r=0,o=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!an(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return n},set:function(t){if(!an(t))throw new Error("RegionAnchorX must be between 0 and 100.");n=t}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!an(t))throw new Error("RegionAnchorY must be between 0 and 100.");i=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!an(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(t){if(!an(t))throw new Error("ViewportAnchorX must be between 0 and 100.");r=t}},scroll:{enumerable:!0,get:function(){return a}
1,set:function(t){var e=function(t){return"string"==typeof t&&!!on[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");a=e}}})},ln=Object.freeze({default:sn,__moduleExports:sn}),un=Zi&&Ki||Zi,cn=rn&&nn||rn,dn=ln&&sn||ln,hn=e((function(t){var e=t.exports={WebVTT:un,VTTCue:cn,VTTRegion:dn};n.vttjs=e,n.WebVTT=e.WebVTT;var i=e.VTTCue,r=e.VTTRegion,o=n.VTTCue,a=n.VTTRegion;e.shim=function(){n.VTTCue=i,n.VTTRegion=r},e.restore=function(){n.VTTCue=o,n.VTTRegion=a},n.VTTCue||e.shim()})),pn=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};m(this,e),i.reportTouchActivity=!1;var r=y(this,t.call(this,null,i,n));return r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Pi.names.forEach((function(t){var e=Pi[t];i&&i[e.getterName]&&(r[e.privateName]=i[e.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions||!1===i.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new Pi.text.ListClass,r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return v(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Mt(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return ve(0,0)},e.prototype.bufferedPercent=function(){return ye(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(Ai.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var i=e[t+"Tracks"]()||[],n=i.length;n--;){var r=i[n];"text"===t&&e.removeRemoteTextTrack(r),i.removeTrack(r)}}))},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;)this.removeRemoteTextTrack(t[e])},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new ke(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?ve(0,0):ve()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;
1Ai.names.forEach((function(e){var i=function(){t.trigger(e+"trackchange")},n=t[Ai[e].getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),t.on("dispose",(function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!n.WebVTT)if(s.body.contains(this.el())){if(!this.options_["vtt.js"]&&k(hn)&&Object.keys(hn).length>0)return void this.trigger("vttjsloaded");var e=s.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),n.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),i=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},r=function(t){return e.removeTrack(t.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},a=function(){o();for(var t=0;t<e.length;t++){var i=e[t];i.removeEventListener("cuechange",o),"showing"===i.mode&&i.addEventListener("cuechange",o)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(var t=0;t<e.length;t++)e[t].removeEventListener("cuechange",o)}))},e.prototype.addTextTrack=function(t,e,i){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();r.kind=e,i&&(r.label=i),n&&(r.language=n),r.tech=t;var a=new Pi.text.TrackClass(r);return o.addTrack(a),a}(this,t,e,i)},e.prototype.createRemoteTextTrack=function(t){var e=Vt(t,{tech:this});return new Mi.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],n=this.createRemoteTextTrack(e);return!0!==i&&!1!==i&&(h.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==i&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(n.track)})),n},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.overrideNativeAudioTracks=function(){},e.prototype.overrideNativeVideoTracks=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,i){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,i){if(e.techs_||(e.techs_={}),!e.isTech(i))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Wt(t),e.techs_[t]=i,"Tech"!==t&&e.defaultTechOrder_.push(t),i},e.getTech=function(t){if(t)return t=Wt(t),e.techs_&&e.techs_[t]?e.techs_[t]:n&&n.videojs&&n.videojs[t]?(h.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),n.videojs[t]):void 0},e}(qt);Pi.names.forEach((function(t){var e=Pi[t];pn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),pn.prototype.featuresVolumeControl=!0,pn.prototype.featuresFullscreenResize=!1,pn.prototype.featuresPlaybackRate=!1,pn.prototype.featuresProgressEvents=!1,pn.prototype.featuresSourceset=!1,pn.prototype.featuresTimeupdateEvents=!1,pn.prototype.featuresNativeTextTracks=!1,pn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,i){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,e)},t.canPlayType=function(e){for(var i=t.sourceHandlers||[],n=void 0,r=0;r<i.length;r++)if(n=i[r].canPlayType(e))return n;return""},t.selectSourceHandler=function(e,i){for(var n=t.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(e,i))return n[r];return null}
vendor: 38,204 bytes, line 1
1,t.canPlaySource=function(e,i){var n=t.selectSourceHandler(e,i);return n?n.canHandleSource(e,i):""},["seekable","seeking","duration"].forEach((function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(e){var i=t.selectSourceHandler(e,this.options_);i||(t.nativeSourceHandler?i=t.nativeSourceHandler:h.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=i.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},qt.registerComponent("Tech",pn),pn.registerTech("Tech",pn),pn.defaultTechOrder_=[];var fn={},gn={},mn={};function vn(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r="call"+Wt(i),o=t.reduce(Tn(r),n),a=o===mn,s=a?null:e[i](o);return wn(t,i,s,a),s}var yn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},_n={setCurrentTime:1},bn={play:1,pause:1};function Tn(t){return function(e,i){return e===mn?mn:i[t]?i[t](e):e}}function wn(t,e,i,n){for(var r=t.length-1;r>=0;r--){var o=t[r];o[e]&&o[e](n,i)}}function xn(t,e){var i=gn[t.id()],n=null;if(null==i)return n=e(t),gn[t.id()]=[[e,n]],n;for(var r=0;r<i.length;r++){var o=i[r];o[0]===e&&(n=o[1])}return null===n&&(n=e(t),i.push([e,n])),n}var Sn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},kn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=Ye(t),i=Sn[e.toLowerCase()];return i||""},Cn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var i=t.cache_.sources.filter((function(t){return t.src===e}));if(i.length)return i[0].type;for(var n=t.$$("source"),r=0;r<n.length;r++){var o=n[r];if(o.type&&o.src&&o.src===e)return o.type}return kn(e)};function En(t){var e=kn(t.src);return!t.type&&e&&(t.type=e),t}var An=function(t){function e(i,n,r){m(this,e);var o=Vt({createEl:!1},n),a=y(this,t.call(this,i,o,r));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)i.src(n.playerOptions.sources);else for(var s=0,l=n.playerOptions.techOrder;s<l.length;s++){var u=Wt(l[s]),c=pn.getTech(u);if(u||(c=qt.getComponent(u)),c&&c.isSupported()){i.loadTech_(u);break}}return a}return v(e,t),e}(qt);qt.registerComponent("MediaLoader",An);var Mn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.emitTapEvents(),r.enable(),r}return v(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=x({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i),"button"===e&&h.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=x({role:"button"},n),this.tabIndex_=i.tabIndex;var r=t.prototype.createEl.call(this,e,i,n);return this.createControlTextEl(r),r},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=D("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var i=this.localize(t);this.controlText_=t,R(this.controlTextEl_,i),this.nonIconControl||e.setAttribute("title",i)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){yt(s,"keydown",Mt(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){_t(s,"keydown",Mt(this,this.handleKeyPress))},e}(qt);qt.registerComponent("ClickableComponent",Mn);var Pn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.update(),i.on("posterchange",Mt(r,r.update)),r}return v(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){return D("div",{className:"vjs-poster",tabIndex:-1})},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},e}(Mn);qt.registerComponent("PosterImage",Pn);var In={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Ln(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function On(t,e,i){try{t.style[e]=i}catch(n){return}}var Dn=function(t){function e(i,n,r){m(this,e);var o=y(this,t.call(this,i,n,r));return i.on("loadstart",Mt(o,o.toggleDisplay)),i.on("texttrackchange",Mt(o,o.updateDisplay)),i.on("loadstart",Mt(o,o.preselectTrack)),i.ready(Mt(o,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Mt(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()}}))),o}return v(e,t),e.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage,n=void 0,r=void 0,o=void 0,a=0;a<e.length;a++){var s=e[a];i&&i.enabled&&i.language===s.language?s.kind===i.kind?o=s:o||(o=s):i&&!i.enabled?(o=null,n=null,r=null):s.default&&("descriptions"!==s.kind||n?s.kind in t&&!r&&(r=s):n=s)}o?o.mode="showing":r?r.mode="showing":n&&(n.mode="showing")},e.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.prototype.clearDisplay=function(){"function"==typeof n.WebVTT&&n.WebVTT.processCues(n,[],this.el_)},e.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,i=null,n=t.length;n--;){var r=t[n];"showing"===r.mode&&("descriptions"===r.kind?e=r:i=r)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.prototype.updateForTrack=function(t){if("function"==typeof n.WebVTT&&t.activeCues){for(var e=[],i=0;i<t.activeCues.length;i++)e.push(t.activeCues[i]);if(n.WebVTT.processCues(n,e,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),o=e.length;o--;){var a=e[o];if(a){var s=a.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&On(s.firstChild,"color",Ln(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&On(s.firstChild,"backgroundColor",Ln(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?On(s,"backgroundColor",Ln(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),r.fontPercent&&1!==r.fontPercent){var l=n.parseFloat(s.style.fontSize);s.style.fontSize=l*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=In[r.fontFamily])}}}},e}(qt);qt.registerComponent("TextTrackDisplay",Dn);var Rn=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),n=D("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])}),r=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},e}(qt);qt.registerComponent("LoadingSpinner",Rn);var Nn=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=x({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),i=x({type:"button"},i);var n=qt.prototype.createEl.call(this,t,e,i);return this.createControlTextEl(n),n},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return h.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),qt.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Mn);qt.registerComponent("Button",Nn);var Bn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(!(this.mouseused_&&t.clientX&&t.clientY)){var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};Ee(e)?e.then(r,(function(){})):this.setTimeout(r,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(Nn);Bn.prototype.controlText_="Play Video",qt.registerComponent("BigPlayButton",Bn);var Fn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.controlText(n&&n.controlText||r.localize("Close")),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(Nn);qt.registerComponent("CloseButton",Fn);var jn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"play",r.handlePlay),r.on(i,"pause",r.handlePause),r.on(i,"ended",r.handleEnded),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Nn);jn.prototype.controlText_="Play",qt.registerComponent("PlayToggle",jn);var Un=function(t,e){t=t<0?0:t;var i=Math.floor(t%60),n=Math.floor(t/60%60),r=Math.floor(t/3600),o=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=n=i="-"),(r=r>0||a>0?r+":":"")+(n=((r||o>=10)&&n<10?"0"+n:n)+":")+(i<10?"0"+i:i)},zn=Un;function Hn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return zn(t,e)}var Wn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.throttledUpdateContent=Pt(Mt(r,r.updateContent),25),r.on(i,"timeupdate",r.throttledUpdateContent),r}return v(e,t),e.prototype.createEl=function(e){var i=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+"Â </span>"});return this.contentEl_=D("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=s.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return Hn(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(qt);Wn.prototype.labelText_="Time",Wn.prototype.controlText_="Time",qt.registerComponent("TimeDisplay",Wn);var Vn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"ended",r.handleEnded),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(Wn);Vn.prototype.labelText_="Current Time",Vn.prototype.controlText_="Current Time",qt.registerComponent("CurrentTimeDisplay",Vn);var qn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"durationchange",r.updateContent),r.on(i,"loadedmetadata",r.throttledUpdateContent),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(Wn);qn.prototype.labelText_="Duration",qn.prototype.controlText_="Duration",qt.registerComponent("DurationDisplay",qn);var Gn=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(qt);qt.registerComponent("TimeDivider",Gn);var Yn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"durationchange",r.throttledUpdateContent),r.on(i,"ended",r.handleEnded),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime())},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(Wn);Yn.prototype.labelText_="Remaining Time",Yn.prototype.controlText_="Remaining Time",qt.registerComponent("RemainingTimeDisplay",Yn);var Xn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}return v(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=D("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"Â </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(qt);qt.registerComponent("LiveDisplay",Xn);var $n=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}return v(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=x({tabIndex:0},i),n=x({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),t.prototype.createEl.call(this,e,i,n)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;t.preventDefault(),G(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;Y(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var i=(100*t).toFixed(2)+"%",n=e.el().style;return this.vertical()?n.height=i:n.width=i,t}}},e.prototype.calculateDistance=function(t){var e=K(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},e}(qt);qt.registerComponent("Slider",$n);var Kn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.partEls_=[],r.on(i,"progress",r.update),r}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,o=function(t,e){var i=t/e||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=o(n,i);for(var a=0;a<e.length;a++){var s=e.start(a),l=e.end(a),u=r[a];u||(u=this.el_.appendChild(D()),r[a]=u),u.style.left=o(s,n),u.style.width=o(l-s,n)}for(var c=r.length;c>e.length;c--)this.el_.removeChild(r[c-1]);r.length=e.length},e}(qt);qt.registerComponent("LoadProgressBar",Kn);var Zn=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,i){var n=X(this.el_),r=X(this.player_.el()),o=t.width*e;if(r&&n){var a=t.left-r.left+o,s=t.width-o+(r.right-t.right),l=n.width/2;a<l?l+=l-a:s<l&&(l=s),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",R(this.el_,i)}},e}(qt);qt.registerComponent("TimeTooltip",Zn);var Qn=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},e.prototype.update=function(t,e){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=Hn(i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),i.player_.duration()),r=i.getChild("timeTooltip");r&&r.update(t,e,n)}))},e}(qt);Qn.prototype.options_={children:[]},ee||ne||Qn.prototype.options_.children.push("timeTooltip"),qt.registerComponent("PlayProgressBar",Qn);var Jn=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.update=Pt(Mt(r,r.update),25),r}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.duration(),r=Hn(e*n,n);i.el_.style.left=t.width*e+"px",i.getChild("timeTooltip").update(t,e,r)}))},e}(qt);Jn.prototype.options_={children:["timeTooltip"]},qt.registerComponent("MouseTimeDisplay",Jn);var tr=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.setEventHandlers_(),r}return v(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=Pt(Mt(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval((function(){t.requestAnimationFrame((function(){t.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){t.clearInterval(t.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Hn(t,i),Hn(i,i)],"{1} of {2}")),this.bar.update(X(this.el_),e)},e.prototype.update=function(e){var i=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t||0},e.prototype.handleMouseDown=function(e){it(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(it(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Ae(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}($n);tr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ee||ne||tr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),tr.prototype.playerEvent="timeupdate",qt.registerComponent("SeekBar",tr);var er=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.handleMouseMove=Pt(Mt(r,r.handleMouseMove),25),r.throttledHandleMouseSeek=Pt(Mt(r,r.handleMouseSeek),25),r.enable(),r}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var i=e.getChild("mouseTimeDisplay"),n=e.el(),r=X(n),o=K(n,t).x;o>1?o=1:o<0&&(o=0),i&&i.update(r,o)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(qt);er.prototype.options_={children:["seekBar"]},qt.registerComponent("ProgressControl",er);var ir=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"fullscreenchange",r.handleFullscreenChange),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Nn);ir.prototype.controlText_="Fullscreen",qt.registerComponent("FullscreenToggle",ir);var nr=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},rr=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(qt);qt.registerComponent("VolumeLevel",rr);var or=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on("slideractive",r.updateLastVolume_),r.on(i,"volumechange",r.updateARIAAttributes),i.ready((function(){return r.updateARIAAttributes()})),r}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){it(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){it(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}($n);or.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},or.prototype.playerEvent="volumechange",qt.registerComponent("VolumeBar",or);var ar=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||k(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var r=y(this,t.call(this,i,n));return nr(r,i),r.throttledHandleMouseMove=Pt(Mt(r,r.handleMouseMove),25),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}return v(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(qt);ar.prototype.options_={children:["volumeBar"]},qt.registerComponent("VolumeControl",ar);var sr=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return nr(r,i),r.on(i,["loadstart","volumechange"],r.update),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),i=this.player_.lastVolume_();0===e?(this.player_.volume(i<.1?.1:i),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var i=0;i<4;i++)j(this.el_,"vjs-vol-"+i);F(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},e}(Nn);sr.prototype.controlText_="Mute",qt.registerComponent("MuteToggle",sr);var lr=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m(this,e),n.inline=void 0===n.inline||n.inline,(void 0===n.volumeControl||k(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var r=y(this,t.call(this,i,n));return nr(r,i),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}return v(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(qt);lr.prototype.options_={children:["muteToggle","volumeControl"]},qt.registerComponent("VolumePanel",lr);var ur=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyPress),r}return v(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",Mt(this,(function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){this.contentEl_=D(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),yt(e,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice(),i=e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className);i&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(qt);qt.registerComponent("Menu",ur);var cr=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m(this,e);var r=y(this,t.call(this,i,n));r.menuButton_=new Nn(i,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Nn.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+o,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"focus",r.handleFocus),r.on(r.menuButton_,"blur",r.handleBlur),r.on("keydown",r.handleSubmenuKeyPress),r}return v(e,t),e.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","fal
1se"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var t=new ur(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=D("li",{className:"vjs-menu-title",innerHTML:Wt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),N(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t},e.prototype.createItems=function(){},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return"vjs-menu-button "+(e+=!0===this.options_.inline?"-inline":"-popup")+" "+Nn.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return"vjs-menu-button "+(e+=!0===this.options_.inline?"-inline":"-popup")+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",Mt(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){yt(s,"keydown",Mt(this,this.handleKeyPress))},e.prototype.handleBlur=function(){_t(s,"keydown",Mt(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ee&&L())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(qt);qt.registerComponent("MenuButton",cr);var dr=function(t){function e(i,n){m(this,e);var r=n.tracks,o=y(this,t.call(this,i,n));if(o.items.length<=1&&o.hide(),!r)return y(o);var a=Mt(o,o.update);return r.addEventListener("removetrack",a),r.addEventListener("addtrack",a),o.player_.on("ready",a),o.player_.on("dispose",(function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a)})),o}return v(e,t),e}(cr);qt.registerComponent("TrackButton",dr);var hr=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.selectable=n.selectable,r.isSelected_=n.selected||!1,r.selected(r.isSelected_),r.el_.setAttribute("role",r.selectable?"menuitemcheckbox":"menuitem"),r}return v(e,t),e.prototype.createEl=function(e,i,n){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",x({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(Mn);qt.registerComponent("MenuItem",hr);var pr=function(t){function e(i,r){m(this,e);var o=r.track,a=i.textTracks();r.label=o.label||o.language||"Unknown",r.selected="showing"===o.mode;var l=y(this,t.call(this,i,r));l.track=o;var u=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];l.handleTracksChange.apply(l,e)},c=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];l.handleSelectedLanguageChange.apply(l,e)};if(i.on(["loadstart","texttrackchange"],u),a.addEventListener("change",u),a.addEventListener("selectedlanguagechange",c),l.on("dispose",(function(){i.off(["loadstart","texttrackchange"],u),a.removeEventListener("change",u),a.removeEventListener("selectedlanguagechange",c)})),void 0===a.onchange){var d=void 0;l.on(["tap","click"],(function(){if("object"!==g(n.Event))try{d=new n.Event("change")}catch(t){}d||(d=s.createEvent("Event")).initEvent("change",!0,!0),a.dispatchEvent(d)}))}return l.handleTracksChange(),l}return v(e,t),e.prototype.handleClick=function(e){var i=this.track.kind,n=this.track.kinds,r=this.player_.textTracks();if(n||(n=[i]),t.prototype.handleClick.call(this,e),r)for(var o=0;o<r.length;o++){var a=r[o];a===this.track&&n.indexOf(a.kind)>-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(hr);qt.registerComponent("TextTrackMenuItem",pr);var fr=function(t){function e(i,n){return m(this,e),n.track={player:i,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.track.label=n.label?n.label:n.kinds.join(" and ")+" off",n.selectable=!0,y(this,t.call(this,i,n))}return v(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var o=e[n];
vendor: 17,035 bytes, line 1
1if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var o=e[n];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(pr);qt.registerComponent("OffTextTrackMenuItem",fr);var gr=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return m(this,e),n.tracks=i.textTracks(),y(this,t.call(this,i,n))}return v(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pr,i=void 0;this.label_&&(i=this.label_+" off"),t.push(new fr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var o=n[r];if(this.kinds_.indexOf(o.kind)>-1){var a=new e(this.player_,{track:o,selectable:!0});a.addClass("vjs-"+o.kind+"-menu-item"),t.push(a)}}return t},e}(dr);qt.registerComponent("TextTrackButton",gr);var mr=function(t){function e(i,n){m(this,e);var r=n.track,o=n.cue,a=i.currentTime();n.selectable=!0,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime;var s=y(this,t.call(this,i,n));return s.track=r,s.cue=o,r.addEventListener("cuechange",Mt(s,s.update)),s}return v(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,i=this.player_.currentTime();this.selected(e.startTime<=i&&i<e.endTime)},e}(hr);qt.registerComponent("ChaptersTrackMenuItem",mr);var vr=function(t){function e(i,n,r){return m(this,e),y(this,t.call(this,i,n,r))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},e.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},e.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var i=t[e];if(i.kind===this.kind_)return i}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Wt(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,n=e.length;i<n;i++){var r=new mr(this.player_,{track:this.track_,cue:e[i]});t.push(r)}return t},e}(gr);vr.prototype.kind_="chapters",vr.prototype.controlText_="Chapters",qt.registerComponent("ChaptersButton",vr);var yr=function(t){function e(i,n,r){m(this,e);var o=y(this,t.call(this,i,n,r)),a=i.textTracks(),s=Mt(o,o.handleTracksChange);return a.addEventListener("change",s),o.on("dispose",(function(){a.removeEventListener("change",s)})),o}return v(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!1,n=0,r=e.length;n<r;n++){var o=e[n];if(o.kind!==this.kind_&&"showing"===o.mode){i=!0;break}}i?this.disable():this.enable()},e.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(gr);yr.prototype.kind_="descriptions",yr.prototype.controlText_="Descriptions",qt.registerComponent("DescriptionsButton",yr);var _r=function(t){function e(i,n,r){return m(this,e),y(this,t.call(this,i,n,r))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(gr);_r.prototype.kind_="subtitles",_r.prototype.controlText_="Subtitles",qt.registerComponent("SubtitlesButton",_r);var br=function(t){function e(i,n){m(this,e),n.track={player:i,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem";var r=y(this,t.call(this,i,n));return r.addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return v(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(pr);qt.registerComponent("CaptionSettingsMenuItem",br);var Tr=function(t){function e(i,n,r){return m(this,e),y(this,t.call(this,i,n,r))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new br(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(gr);Tr.prototype.kind_="captions",Tr.prototype.controlText_="Captions",qt.registerComponent("CaptionsButton",Tr);var wr=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(e,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),t.prototype.createEl.call(this,e,x({innerHTML:r+="</span>"},i),n)},e}(pr);qt.registerComponent("SubsCapsMenuItem",wr);var xr=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m(this,e);var r=y(this,t.call(this,i,n));return r.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(Wt(r.label_)),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new br(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e,wr)},e}(gr);xr.prototype.kinds_=["captions","subtitles"],xr.prototype.controlText_="Subtitles",qt.registerComponent("SubsCapsButton",xr);var Sr=function(t){function e(i,n){m(this,e);var r=n.track,o=i.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled;var a=y(this,t.call(this,i,n));a.track=r;var s=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];a.handleTracksChange.apply(a,e)};return o.addEventListener("change",s),a.on("dispose",(function(){o.removeEventListener("change",s)})),a}return v(e,t),e.prototype.handleClick=function(e){var i=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var n=0;n<i.length;n++){var r=i[n];r.enabled=r===this.track}},e.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(hr);qt.registerComponent("AudioTrackMenuItem",Sr);var kr=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return m(this,e),n.tracks=i.audioTracks(),y(this,t.call(this,i,n))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),i=0;i<e.length;i++){var n=e[i];t.push(new Sr(this.player_,{track:n,selectable:!0}))}return t},e}(dr);kr.prototype.controlText_="Audio Track",qt.registerComponent("AudioTrackButton",kr);var Cr=function(t){function e(i,n){m(this,e);var r=n.rate,o=parseFloat(r,10);n.label=r,n.selected=1===o,n.selectable=!0;var a=y(this,t.call(this,i,n));return a.label=r,a.rate=o,a.on(i,"ratechange",a.update),a}return v(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(hr);Cr.prototype.contentElType="button",qt.registerComponent("PlaybackRateMenuItem",Cr);var Er=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.updateVisibility(),r.updateLabel(),r.on(i,"loadstart",r.updateVisibility),r.on(i,"ratechange",r.updateLabel),r}return v(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=D("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},e.prototype.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createMenu=function(){var t=new ur(this.player()),e=this.playbackRates();if(e)for(var i=e.length-1;i>=0;i--)t.addChild(new Cr(this.player(),{rate:e[i]+"x"}));return t},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>e){n=i[r];break}this.player().playbackRate(n)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(cr);Er.prototype.controlText_="Playback Rate",qt.registerComponent("PlaybackRateMenuButton",Er);var Ar=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(qt);qt.registerComponent("Spacer",Ar);var Mr=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML="Â ",e},e}(Ar);qt.registerComponent("CustomControlSpacer",Mr);var Pr=function(t){function e(){return m(this,e),y(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(qt);Pr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},qt.registerComponent("ControlBar",Pr);var Ir=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n));return r.on(i,"error",r.open),r}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(Pe);Ir.prototype.options_=Vt(Pe.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),qt.registerComponent("ErrorDisplay",Ir);var Lr=["#000","Black"],Or=["#00F","Blue"],Dr=["#0FF","Cyan"],Rr=["#0F0","Green"],Nr=["#F0F","Magenta"],Br=["#F00","Red"],Fr=["#FFF","White"],jr=["#FF0","Yellow"],Ur=["1","Opaque"],zr=["0.5","Semi-Transparent"],Hr=["0","Transparent"],Wr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Lr,Fr,Br,Rr,Or,jr,Nr,Dr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Ur,zr,Hr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Fr,Lr,Br,Rr,Or,jr,Nr,Dr]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Ur,zr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Hr,zr,Ur]}};function Vr(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}Wr.windowColor.options=Wr.backgroundColor.options;var qr=function(t){function e(i,n){m(this,e),n.temporary=!1;var r=y(this,t.call(this,i,n));return r.updateDisplay=Mt(r,r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=D("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),w(Wr,(function(t){r.on(r.$(t.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}return v(e,t),e.prototype.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},e.prototype.createElSelect_=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",r=Wr[t],o=r.id.replace("%s",this.id_),a=[i,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(r.options.map((function(t){var i=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+i+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+i+'">',e.localize(t[1]),"</option>"].join("")}))).concat("</select>").join("")},e.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">
1',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElColors_=function(){return D("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return D("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return D("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},e.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.prototype.label=function(){return this.localize("Caption Settings Dialog")},e.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.prototype.getValues=function(){var t=this;return function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return T(t).reduce((function(i,n){return e(i,t[n],n)}),i)}(Wr,(function(e,i,n){var r,o=Vr((r=t.$(i.selector)).options[r.options.selectedIndex].value,i.parser);return void 0!==o&&(e[n]=o),e}),{})},e.prototype.setValues=function(t){var e=this;w(Wr,(function(i,n){!function(t,e,i){if(e)for(var n=0;n<t.options.length;n++)if(Vr(t.options[n].value,i)===e){t.selectedIndex=n;break}}(e.$(i.selector),t[n],i.parser)}))},e.prototype.setDefaults=function(){var t=this;w(Wr,(function(e){var i=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=i}))},e.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(n.localStorage.getItem("vjs-text-track-settings"))}catch(e){h.warn(e)}t&&this.setValues(t)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?n.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):n.localStorage.removeItem("vjs-text-track-settings")}catch(e){h.warn(e)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(s,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,i=t&&t.captionsButton;e?e.focus():i&&i.focus()},e}(Pe);qt.registerComponent("TextTrackSettings",qr);var Gr=function(t){function e(i,r){m(this,e);var o=r.ResizeObserver||n.ResizeObserver;null===r.ResizeObserver&&(o=!1);var a=Vt({createEl:!o},r),s=y(this,t.call(this,i,a));return s.ResizeObserver=r.ResizeObserver||n.ResizeObserver,s.loadListener_=null,s.resizeObserver_=null,s.debouncedHandler_=function(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=void 0;return function(){var n=this,a=arguments,s=function(){o=null,s=null,i||t.apply(n,a)};!o&&i&&t.apply(n,a),r.clearTimeout(o),o=r.setTimeout(s,e)}}((function(){s.resizeHandler()}),100,!1,i),o?(s.resizeObserver_=new s.ResizeObserver(s.debouncedHandler_),s.resizeObserver_.observe(i.el())):(s.loadListener_=function(){s.el_.contentWindow&&yt
vendor: 6,410 bytes, line 1
1(s.el_.contentWindow,"resize",s.debouncedHandler_),s.off("load",s.loadListener_)},s.on("load",s.loadListener_)),s}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&_t(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},e}(qt);qt.registerComponent("ResizeManager",Gr);var Yr=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var i=t.$$("source"),n=[],r="";if(!i.length)return!1;for(var o=0;o<i.length;o++){var a=i[o].src;a&&-1===n.indexOf(a)&&n.push(a)}return!!n.length&&(1===n.length&&(r=n[0]),t.triggerSourceset(r),!0)},Xr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=s.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var i=s.createDocumentFragment();e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",n.Element.prototype.appendChild.call(this,i),this.innerHTML}}),$r=function(t,e){for(var i={},n=0;n<t.length&&!((i=Object.getOwnPropertyDescriptor(t[n],e))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i},Kr=function(t){var e=t.el();if(!e.resetSourceWatch_){var i={},r=function(t){return $r([t.el(),n.HTMLMediaElement.prototype,n.Element.prototype,Xr],"innerHTML")}(t),o=function(i){return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=i.apply(e,r);return Yr(t),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(t){e[t]&&(i[t]=e[t],e[t]=o(i[t]))})),Object.defineProperty(e,"innerHTML",Vt(r,{set:o(r.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(i).forEach((function(t){e[t]=i[t]})),Object.defineProperty(e,"innerHTML",r)},t.one("sourceset",e.resetSourceWatch_)}},Zr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ge(n.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return n.Element.prototype.setAttribute.call(this,"src",t),t}}),Qr=_(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Jr=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,i,n)),o=i.source,a=!1;if(o&&(r.el_.currentSrc!==o.src||i.tag&&3===i.tag.initNetworkState_)?r.setSource(o):r.handleLateInit_(r.el_),i.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){for(var s=r.el_.childNodes,l=s.length,u=[];l--;){var c=s[l];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),a||r.el_.hasAttribute("crossorigin")||!Xe(c.src)||(a=!0)):u.push(c))}for(var d=0;d<u.length;d++)r.el_.removeChild(u[d])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&&h.warn(f(Qr)),r.restoreMetadataTracksInIOSNativePlayer_(),(pe||Jt||oe)&&!0===i.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}return v(e,t),e.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},e.prototype.setupSourcesetHandling_=function(){!function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var i=function(t){return $r([t.el(),n.HTMLMediaElement.prototype,Zr],"src")}(t),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",Vt(i,{set:function(n){var r=i.set.call(e,n);return t.triggerSourceset(e.src),r}})),e.setAttribute=function(i,n){var o=r.call(e,i,n);return/src/i.test(i)&&t.triggerSourceset(e.src),o},e.load=function(){var i=o.call(e);return Yr(t)||(t.triggerSourceset(""),Kr(t)),i},e.currentSrc?t.triggerSourceset(e.currentSrc):Yr(t)||Kr(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=o,e.setAttribute=r,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}}}}(this)},e.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),e=void 0,i=function(){e=[];for(var i=0;i<t.length;i++){var n=t[i];"metadata"===n.kind&&e.push({track:n,storedMode:n.mode})}};i(),t.addEventListener("change",i),this.on("dispose",(function(){return t.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<e.length;n++){var r=e[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",i),t.removeEventListener("change",n),t.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",i),t.addEventListener("change",i),t.removeEventListener("change",n)}))},e.prototype.overrideNative_=function(t,e){var i=this;if(e===this["featuresNative"+t+"Tracks"]){var n=t.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach((function(t){i.el()[n+"Tracks"].removeEventListener(t,i[n+"TracksListeners_"][t])})),this["featuresNative"+t+"Tracks"]=!e,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},e.prototype.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},e.prototype.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},e.prototype.proxyNativeTracksForType_=function(t){var e=this,i=Ai[t],n=this.el()[i.getterName],r=this[i.getterName]();if(this["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var o={change:function(t){r.trigger({type:"change",target:r,currentTarget:r,srcElement:r})},addtrack:function(t){r.addTrack(t.track)},removetrack:function(t){r.removeTrack(t.track)}},a=function(){for(var t=[],e=0;e<r.length;e++){for(var i=!1,o=0;o<n.length;o++)if(n[o]===r[e]){i=!0;break}i||t.push(r[e])}for(;t.length;)r.removeTrack(t.shift())};
1this[i.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(t){var i=o[t];n.addEventListener(t,i),e.on("dispose",(function(e){return n.removeEventListener(t,i)}))})),this.on("loadstart",a),this.on("dispose",(function(t){return e.off("loadstart",a)}))}},e.prototype.proxyNativeTracks_=function(){var t=this;Ai.names.forEach((function(e){t.proxyNativeTracksForType_(e)}))},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var i=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(i,t),e.disposeMediaElement(t),t=i}else{t=s.createElement("video");var n=Vt({},this.options_.tag&&H(this.options_.tag));pe&&!0===this.options_.nativeControlsForTouch||delete n.controls,z(t,x(n,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&V(t,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],o=0;o<r.length;o++){var a=r[o],l=this.options_[a];void 0!==l&&(l?V(t,a,a):q(t,a),t[a]=l)}return t},e.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,i=function(){e=!0};this.on("loadstart",i);var n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),e||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),t.readyState>=2&&r.push("loadeddata"),t.readyState>=3&&r.push("canplay"),t.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(t){this.trigger(t)}),this)}))}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(e){h(e,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;return this.el_.duration===1/0&&ne&&le&&0===this.el_.currentTime?(this.on("timeupdate",(function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))})),NaN):this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){t.off("webkitbeginfullscreen",i),t.off("webkitendfullscreen",e)}))}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=n.navigator&&n.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):t.prototype.addTextTrack.call(this,e,i,n)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var i=s.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i},e.prototype.addRemoteTextTrack=function(e,i){var n=t.prototype.addRemoteTextTrack.call(this,e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var i=this.$$("track"),n=i.length;n--;)e!==i[n]&&e!==i[n].track||this.el().removeChild(i[n])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),n.performance&&"function"==typeof n.performance.now?t.creationTime=n.performance.now():n.performance&&n.performance.timing&&"number"==typeof n.performance.timing.navigationStart&&(t.creationTime=n.Date.now()-n.performance.timing.navigationStart),t},e}(pn);if(P()){Jr.TEST_VID=s.createElement("video");var to=s.createElement("track");to.kind="captions",to.srclang="en",to.label="English",Jr.TEST_VID.appendChild(to)}Jr.isSupported=function(){try{Jr.TEST_VID.volume=.5}catch(t){return!1}return!(!Jr.TEST_VID||!Jr.TEST_VID.canPlayType)},Jr.canPlayType=function(t){return Jr.TEST_VID.canPlayType(t)},Jr.canPlaySource=function(t,e){return Jr.canPlayType(t.type)},Jr.canControlVolume=function(){try{var t=Jr.TEST_VID.volume;
vendor: 4,046 bytes, line 1
1return Jr.TEST_VID.volume=t/2+.1,t!==Jr.TEST_VID.volume}catch(e){return!1}},Jr.canControlPlaybackRate=function(){if(ne&&le&&ue<58)return!1;try{var t=Jr.TEST_VID.playbackRate;return Jr.TEST_VID.playbackRate=t/2+.1,t!==Jr.TEST_VID.playbackRate}catch(e){return!1}},Jr.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(s.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(s.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(s.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(s.createElement("audio"),"innerHTML",{get:t,set:t})}catch(e){return!1}return!0},Jr.supportsNativeTextTracks=function(){return he},Jr.supportsNativeVideoTracks=function(){return!(!Jr.TEST_VID||!Jr.TEST_VID.videoTracks)},Jr.supportsNativeAudioTracks=function(){return!(!Jr.TEST_VID||!Jr.TEST_VID.audioTracks)},Jr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Jr.prototype.featuresVolumeControl=Jr.canControlVolume(),Jr.prototype.featuresPlaybackRate=Jr.canControlPlaybackRate(),Jr.prototype.featuresSourceset=Jr.canOverrideAttributes(),Jr.prototype.movingMediaElementInDOM=!ee,Jr.prototype.featuresFullscreenResize=!0,Jr.prototype.featuresProgressEvents=!0,Jr.prototype.featuresTimeupdateEvents=!0,Jr.prototype.featuresNativeTextTracks=Jr.supportsNativeTextTracks(),Jr.prototype.featuresNativeVideoTracks=Jr.supportsNativeVideoTracks(),Jr.prototype.featuresNativeAudioTracks=Jr.supportsNativeAudioTracks();var eo=Jr.TEST_VID&&Jr.TEST_VID.constructor.prototype.canPlayType,io=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;Jr.patchCanPlayType=function(){re>=4&&!ae&&!le&&(Jr.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&io.test(t)?"maybe":eo.call(this,t)})},Jr.unpatchCanPlayType=function(){var t=Jr.TEST_VID.constructor.prototype.canPlayType;return Jr.TEST_VID.constructor.prototype.canPlayType=eo,t},Jr.patchCanPlayType(),Jr.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(e){}}()}},Jr.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),i=e.length;i--;)t.removeChild(e[i]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Jr.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Jr.prototype["set"+Wt(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){Jr.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(t){Jr.prototype["set"+Wt(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Jr.prototype[t]=function(){return this.el_[t]()}})),pn.withSourceHandlers(Jr),Jr.nativeSourceHandler={},Jr.nativeSourceHandler.canPlayType=function(t){try{return Jr.TEST_VID.canPlayType(t)}catch(e){return""}},Jr.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Jr.nativeSourceHandler.canPlayType(t.type);if(t.src){var i=Ye(t.src);return Jr.nativeSourceHandler.canPlayType("video/"+i)}return""},Jr.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src)},Jr.nativeSourceHandler.dispose=function(){},Jr.registerSourceHandler(Jr.nativeSourceHandler),pn.registerTech("Html5",Jr);var no=_(["\n Using the tech directly can be dangerous. I hope you know
1what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),ro=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],oo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ao=function(t){function e(i,n,r){if(m(this,e),i.id=i.id||n.id||"vjs_video_"+st(),(n=x(e.getTagSettings(i),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof i.closest){var o=i.closest("[lang]");o&&o.getAttribute&&(n.language=o.getAttribute("lang"))}else for(var a=i;a&&1===a.nodeType;){if(H(a).hasOwnProperty("lang")){n.language=a.getAttribute("lang");break}a=a.parentNode}var s=y(this,t.call(this,null,n,r));if(s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=i,s.tagAttributes=i&&H(i),s.language(s.options_.language),n.languages){var l={};Object.getOwnPropertyNames(n.languages).forEach((function(t){l[t.toLowerCase()]=n.languages[t]})),s.languages_=l}else s.languages_=e.prototype.options_.languages;s.cache_={},s.poster_=n.poster||"",s.controls_=!!n.controls,s.cache_.lastVolume=1,i.controls=!1,i.removeAttribute("controls"),s.scrubbing_=!1,s.el_=s.createEl(),s.cache_.lastPlaybackRate=s.defaultPlaybackRate(),Ut(s,{eventBusKey:"el_"});var u=Vt(s.options_);if(n.plugins){var c=n.plugins;Object.keys(c).forEach((function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](c[t])}),s)}s.options_.playerOptions=u,s.middleware_=[],s.initChildren(),s.isAudio("audio"===i.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),ee||s.addClass("vjs-workinghover"),e.players[s.id_]=s;var d="7.0.3".split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s}return v(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),gn[this.id()]=null,t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,i=void 0,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?i=this.el_=e.parentNode:o||(i=this.el_=t.prototype.createEl.call(this,"div"));var a=H(e);if(o){for(i=this.el_=e,e=this.tag=s.createElement("video");i.children.length;)e.appendChild(i.firstChild);B(i,"video-js")||F(i,"video-js"),i.appendChild(e),r=this.playerElIngest_=i,Object.keys(i).forEac
vendor: 4,171 bytes, line 1
1h((function(t){e[t]=i[t]}))}if(e.setAttribute("tabindex","-1"),e.removeAttribute("width"),e.removeAttribute("height"),Object.getOwnPropertyNames(a).forEach((function(t){o&&"class"===t||i.setAttribute(t,a[t]),o&&e.setAttribute(t,a[t])})),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),!0!==n.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Et("vjs-styles-dimensions");var l=nt(".vjs-styles-defaults"),u=nt("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=e.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);F(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(i,e),N(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=i,i},e.prototype.width=function(t){return this.dimension("width",t)},e.prototype.height=function(t){return this.dimension("height",t)},e.prototype.dimension=function(t,e){var i=t+"_";if(void 0===e)return this[i]||0;if(""===e)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(e);isNaN(n)?h.error('Improper value "'+e+'" supplied for for '+t):(this[i]=n,this.updateStyleEl_())},e.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},e.prototype.updateStyleEl_=function(){if(!0!==n.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,i,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*o,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),At(this.styleEl_,"\n ."+i+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+i+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),s>=0&&(l.height=s))}},e.prototype.loadTech_=function(t,e){var i=this;this.tech_&&this.unloadTech_();var n=Wt(t),r=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==n&&this.tag&&(pn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var o={source:e,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+n+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Pi.names.forEach((function(t){var e=Pi[t];o[e.getterName]=i[e.privateName]})),x(o,this.options_[n]),x(o,this.options_[r]),x(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a,s=pn.getTech(t);if(!s)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(Mt(this,this.handleTechReady_),!0),a=this.tech_,(this.textTracksJson_||[]).forEach((function(t){var e=a.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return e.addCue(t)}))})),a.textTracks(),ro.forEach((function(t){i.on(i.tech_,t,i["handleTech"+Wt(t)+"_"])}
1)),Object.keys(oo).forEach((function(t){i.on(i.tech_,t,(function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+oo[t]+"_"].bind(i),event:e}):i["handleTech"+oo[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||N(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t,e,i,n=this;Pi.names.forEach((function(t){var e=Pi[t];n[e.privateName]=n[e.getterName]()})),this.textTracksJson_=(e=(t=this.tech_).$$("track"),i=Array.prototype.map.call(e,(function(t){return t.track})),Array.prototype.map.call(e,(function(t){var e=Me(t.track);return t.src&&(e.src=t.src),e})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===i.indexOf(t)})).map(Me))),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.prototype.tech=function(t){return void 0===t&&h.warn(f(no)),this.tech_},e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},e.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(t){h("deleting tag.poster throws in some browsers",t)}},e.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},e.prototype.updateSourceCaches_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t,i="";"string"!=typeof e&&(e=t.src,i=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!i&&(i=Cn(this,e)),this.cache_.source={src:e,type:i};for(var n=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),r=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var l=H(o[s]);r.push(l),l.src&&l.src===e&&a.push(l.src)}a.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},e.prototype.handleTechSourceset_=function(t){var e=this;this.changingSrc_||(this.updateSourceCaches_(t.src),t.src)||this.tech_.one(["sourceset","loadstart"],(function t(i){"sourceset"!==i.type&&e.updateSourceCaches_(e.techGet_("currentSrc")),e.tech_.off(["sourceset","loadstart"],t)})),this.trigger({src:t.src,type:"sourceset"})},e.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(h.warn("Passing the `starttime` option to the player will be deprecated
1in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){it(t)&&this.controls_&&(this.paused()?this.play():this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready((function(){if(t in _n)return function(t,e,i,n){return e[i](t.reduce(Tn(i),n))}(this.middleware_,this.tech_,t,e);if(t in bn)return vn(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(i){throw h(i),i}}),!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in yn)return function(t,e,i){return t.reduceRight(Tn(i),e[i]())}(this.middleware_,this.tech_,t);if(t in bn)return vn(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw h("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw h("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw h(e),e}}},e.prototype.play=function(){var t=this;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.playOnLoadstart_=function(){t.playOnLoadstart_=null,Ae(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){t.playWaitingForReady_=!1,Ae(t.play())}))}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||ve(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return void 0!==t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=ve(0,0)),t},e.prototype.bufferedPercent=function(){return ye(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),i=t.end(t.length-1);return i>e&&(i=e),i},e.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},e.prototype.requestFullscreen=function(){var t=_e;this.isFullscreen(!0),t.requestFullscreen?(yt(s,t.fullscreenchange,Mt(this,(function e(i){this.isFullscreen(s[t.fullscreenElement]),!1===this.isFullscreen()&&_t(s,t.fullscreenchange,e),this.trigger("fullscreenchange")}))),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=_e;this.isFullscreen(!1),t.requestFullscreen?s[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=s.documentElement.style.overflow,yt(s,"keydown",Mt(this,this.fullWindowOnEscKey)),s.documentElement.style.overflow="hidden",F(s.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,_t(s,"keydown",this.fullWindowOnEscKey),s.documentElement.style.overflow=this.docOrigOverflow,j(s.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],o=pn.getTech(r);if(o||(o=qt.getComponent(r)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else h.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.prototype.selectSource=function(t){var e,i=this,n=this.options_.techOrder.map((function(t){return[t,pn.getTech(t)]})).filter((function(t){var e=t[0],i=t[1];return i?i.isSupported():(h.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}
1)),r=function(t,e,i){var n=void 0;return t.some((function(t){return e.some((function(e){if(n=i(t,e))return!0}))})),n},o=function(t,e){var n=t[0];if(t[1].canPlaySource(e,i.options_[n.toLowerCase()]))return{source:e,tech:n}};return(this.options_.sourceOrder?r(t,n,(e=o,function(t,i){return e(i,t)})):r(n,t,o))||!1},e.prototype.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var i,n,r,o=function t(e){if(Array.isArray(e)){var i=[];e.forEach((function(e){e=t(e),Array.isArray(e)?i=i.concat(e):S(e)&&i.push(e)})),e=i}else e="string"==typeof e&&e.trim()?[En({src:e})]:S(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[En(e)]:[];return e}(t);o.length?(this.changingSrc_=!0,this.cache_.sources=o,this.updateSourceCaches_(o[0]),n=o[0],r=function(t,i){var n;if(e.middleware_=i,e.cache_.sources=o,e.updateSourceCaches_(t),e.src_(t))return o.length>1?e.src(o.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());n=e.tech_,i.forEach((function(t){return t.setTech&&t.setTech(n)}))},(i=this).setTimeout((function(){return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=i[0],l=i.slice(1);if("string"==typeof s)t(e,fn[s],n,r,o,a);else if(s){var u=xn(r,s);u.setSource(x({},e),(function(i,s){if(i)return t(e,l,n,r,o,a);o.push(u),t(s,e.type===s.type?l:fn[s.type],n,r,o,a)}))}else l.length?t(e,l,n,r,o,a):a?n(e,o):t(e,fn["*"],n,r,o,!0)}(n,fn[n.type],r,i)}),1)):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},e.prototype.src_=function(t){var e,i=this,n=this.selectSource([t]);return!n||(e=this.techName_,Wt(n.tech)!==Wt(e)?(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready((function(){i.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){return void 0!==t?(this.techCall_("setAutoplay",t),void(this.options_.autoplay=t)):this.techGet_("autoplay",t)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.prototype.controls=function(t){if(void 0===t)return!!this.controls_;this.controls_!==(t=!!t)&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
vendor: 9,123 bytes, line 1
1sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;this.usingNativeControls_!==(t=!!t)&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new ke(t),this.addClass("vjs-error"),h.error("(CODE:"+this.error_.code+" "+ke.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,i=void 0,n=Mt(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===e&&t.screenY===i||(e=t.screenX,i=t.screenY,n())})),this.on("mouseup",(function(e){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n);var r=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(r);var t=this.options_.inactivityTimeout;t<=0||(r=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},e.prototype.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},e.prototype.addTextTrack=function(t,e,i){if(this.tech_)return this.tech_.addTextTrack(t,e,i)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,i=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(i)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return Vt(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=Vt(this.options_),e=t.tracks;t.tracks=[];for(var i=0;i<e.length;i++){var n=e[i];(n=Vt(n)).player=void 0,t.tracks[i]=n}return t},e.prototype.createModal=function(t,e){var i=this;(e=e||{}).content=t||"";var n=new Pe(this,e);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},e.getTagSettings=function(t){var e={sources:[],tracks:[]},i=H(t),n=i["data-setup"];if(B(t,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=function(t,e){var i,n=null;try{i=JSON.parse(t,void 0)}catch(o){n=o}return[n,i]}(n||"{}"),o=r[0],a=r[1];o&&h.error(o),x(i,a)}if(x(e,i),t.hasChildNodes())for(var s=t.childNodes,l=0,u=s.length;l<u;l++){var c=s[l],d=c.nodeName.toLowerCase();"source"===d?e.sources.push(H(c)):"track"===d&&e.tracks.push(H(c))}return e},e.prototype.flexNotSupported_=function(){var t=s.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(qt);Pi.names.forEach((function(t){var e=Pi[t];ao.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}})),ao.players={};var so=n.navigator;ao.prototype.options_={techOrder:pn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:so&&(so.languages&&so.languages[0]||so.userLanguage||so.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){ao.prototype[t]=function(){return this.techGet_(t)}})),ro.forEach((function(t){ao.prototype["handleTech"+Wt(t)+"_"]=function(){return this.trigger(t)}})),qt.registerComponent("Player",ao);var lo={},uo=function(t){return lo.hasOwnProperty(t)},co=function(t){return uo(t)?lo[t]:void 0},ho=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},po=function(t,e,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)},fo=function(t,e){return e.prototype.name=t,function(){po(this,{name:t,plugin:e,instance:null},!0);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var o=new(Function.prototype.bind.apply(e,[null].concat([this].concat(n))));return this[t]=function(){return o},po(this,o.getEventHash()),o}},go=function(){function t(e){if(m(this,t),this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,Ut(this),delete this.trigger,Ht(this,this.constructor.defaultState),ho(e,this.name),this.dispose=Mt(this,this.dispose),e.on("dispose",this.dispose)}return t.prototype.version=function(){return this.constructor.VERSION},t.prototype.getEventHash=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return bt(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=fo(t,lo[t])},t.isBasic=function(e){var i="string"==typeof e?co(e):e;return"function"==typeof i&&!t.prototype.isPrototypeOf(i.prototype)},t.registerPlugin=function(e,i){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+(void 0===e?"undefined":g(e))+".");if(uo(e))h.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(ao.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof i)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+(void 0===i?"undefined":g(i))+".");return lo[e]=i,"plugin"!==e&&(ao.prototype[e]=t.isBasic(i)?function(t,e){var i=function(){po(this,{name:t,plugin:e,instance:null},!0);var i=e.apply(this,arguments);return ho(this,t),po(this,{name:t,plugin:e,instance:i}),i};return Object.keys(e).forEach((function(t){i[t]=e[t]})),i}(e,i):fo(e,i)),i},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");uo(t)&&(delete lo[t],delete ao.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(lo),e=void 0;return t.forEach((function(t){var i=co(t);i&&((e=e||{})[t]=i)})),e},t.getPluginVersion=function(t){var e=co(t);return e&&e.VERSION||""},t}();go.getPlugin=co,go.BASE_PLUGIN_NAME="plugin",go.registerPlugin("plugin",go),ao.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},ao.prototype.hasPlugin=function(t){return!!uo(t)};var mo=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":g(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},vo=function(t){return 0===t.indexOf("#")?t.slice(1):t};function yo(t,e,i){var n=yo.getPlayer(t);if(n)return e&&h.warn('Player "'+t+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"==typeof t?nt("#"+vo(t)):t;if(!I(r))throw new TypeError("The element or ID supplied is not val
1id. (videojs)");s.body.contains(r)||h.warn("The element supplied is not included in the DOM"),e=e||{},yo.hooks("beforesetup").forEach((function(t){var i=t(r,Vt(e));S(i)&&!Array.isArray(i)?e=Vt(e,i):h.error("please return an object in beforesetup hooks")}));var o=qt.getComponent("Player");return n=new o(r,e,i),yo.hooks("setup").forEach((function(t){return t(n)})),n}if(yo.hooks_={},yo.hooks=function(t,e){return yo.hooks_[t]=yo.hooks_[t]||[],e&&(yo.hooks_[t]=yo.hooks_[t].concat(e)),yo.hooks_[t]},yo.hook=function(t,e){yo.hooks(t,e)},yo.hookOnce=function(t,e){yo.hooks(t,[].concat(e).map((function(e){return function i(){return yo.removeHook(t,i),e.apply(void 0,arguments)}})))},yo.removeHook=function(t,e){var i=yo.hooks(t).indexOf(e);return!(i<=-1||((yo.hooks_[t]=yo.hooks_[t].slice()).splice(i,1),0))},!0!==n.VIDEOJS_NO_DYNAMIC_STYLE&&P()){var _o=nt(".vjs-styles-defaults");if(!_o){_o=Et("vjs-styles-defaults");var bo=nt("head");bo&&bo.insertBefore(_o,bo.firstChild),At(_o,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Ct(1,yo),yo.VERSION="7.0.3",yo.options=ao.prototype.options_,yo.getPlayers=function(){return ao.players},yo.getPlayer=function(t){var e=ao.players,i=void 0;if("string"==typeof t){var n=vo(t),r=e[n];if(r)return r;i=nt("#"+n)}else i=t;if(I(i)){var o=i.player,a=i.playerId;if(o||e[a])return o||e[a]}},yo.getAllPlayers=function(){return Object.keys(ao.players).map((function(t){return ao.players[t]})).filter(Boolean)},yo.players=ao.players,yo.getComponent=qt.getComponent,yo.registerComponent=function(t,e){pn.isTech(e)&&h.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),qt.registerComponent.call(qt,t,e)},yo.getTech=pn.getTech,yo.registerTech=pn.registerTech,yo.use=function(t,e){fn[t]=fn[t]||[],fn[t].push(e)},Object.defineProperty(yo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(yo.middleware,"TERMINATOR",{value:mn,writeable:!1,enumerable:!0}),yo.browser=fe,yo.TOUCH_ENABLED=pe,yo.extend=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(){t.apply(this,arguments)},n={};for(var r in"object"===(void 0===e?"undefined":g(e))?(e.constructor!==Object.prototype.constructor&&(i=e.constructor),n=e):"function"==typeof e&&(i=e),mo(i,t),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},yo.mergeOptions=Vt,yo.bind=Mt,yo.registerPlugin=go.registerPlugin,yo.plugin=function(t,e){return h.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),go.registerPlugin(t,e)},yo.getPlugins=go.getPlugins,yo.getPlugin=go.getPlugin,yo.getPluginVersion=go.getPluginVersion,yo.addLanguage=function(t,e){var i;return t=(""+t).toLowerCase(),(yo.options.languages=Vt(yo.options.languages,((i={})[t]=e,i)))[t]},yo.log=h,yo.createTimeRange=yo.createTimeRanges=ve,yo.formatTime=Hn,yo.setFormatTime=function(t){zn=t},yo.resetFormatTime=function(){zn=Un},yo.parseUrl=qe,yo.isCrossOrigin=Xe,yo.EventTarget=It,yo.on=yt,yo.one=Tt,yo.off=_t,yo.trigger=bt,yo.xhr=yi,yo.TextTrack=Si,yo.AudioTrack=ki,yo.VideoTrack=Ci,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){yo[t]=function(){return h.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ot[t].apply(null,arguments)}})),yo.computedStyle=C,yo.dom=ot,yo.url=$e;var To,wo,xo=e((function(t,e){var i,n,r,o,a;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/;?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,t.exports=a={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var r=a.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return i.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):e;var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");
vendor: 14,039 bytes, line 1
1if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=n.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;u.path=a.normalizePath(d)}else u.path=s.path,o.params||(u.params=s.params,o.query||(u.query=s.query));return null===u.path&&(u.path=i.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(r,"");t.length!==(t=t.replace(o,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}}})),So=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ko=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Co=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":g(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)},Eo=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e?t:e},Ao=function(){function t(){So(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),i>-1},t.prototype.trigger=function(t){var e=this.listeners[t],i=void 0,n=void 0,r=void 0;if(e)if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=e.length,i=0;i<n;++i)e[i].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}(),Mo=function(t){function e(){So(this,e);var i=Eo(this,t.call(this));return i.buffer="",i}return Co(e,t),e.prototype.push=function(t){var e=void 0;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},e}(Ao),Po=function(t){for(var e=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},n=e.length,r=void 0;n--;)""!==e[n]&&((r=/([^=]*)=(.*)/.exec(e[n]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),i[r[0]]=r[1]);return i},Io=function(t){function e(){So(this,e);var i=Eo(this,t.call(this));return i.customParsers=[],i}return Co(e,t),e.prototype.push=function(t){var e=void 0,i=void 0;if(0!==(t=t.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===t[0]){for(var n=0;n<this.customParsers.length;n++)if(this.customParsers[n].call(this,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return i={type:"tag",tagType:"inf"},e[1]&&(i.duration=parseFloat(e[1])),e[2]&&(i.title=e[2]),void this.trigger("data",i);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"targetduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"totalduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"version"},e[1]&&(i.version=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"media-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return i={type:"tag",tagType:"playlist-type"},e[1]&&(i.playlistType=e[1]),void this.trigger("data",i);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"byterange"},e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),void this.trigger("data",i);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return i={type:"tag",tagType:"allow-cache"},e[1]&&(i.allowed=!/NO/.test(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"map"},e[1]){var r=Po(e[1]);if(r.URI&&(i.uri=r.URI),r.BYTERANGE){var o=r.BYTERANGE.split("@"),a=o[0],s=o[1];i.byterange={},a&&(i.byterange.length=parseInt(a,10)),s&&(i.byterange.offset=parseInt(s,10))}}this.trigger("data",i)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"stream-inf"},e[1]){if(i.attributes=Po(e[1]),i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION.split("x"),u={};l[0]&&(u.width=parseInt(l[0],10)),l[1]&&(u.height=parseInt(l[1],10)),i.attributes.RESOLUTION=u}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return i={type:"tag",tagType:"media"},e[1]&&(i.attributes=Po(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-ENDLIST/.exec(t))this.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return i={type:"tag",tagType:"program-date-time"},e[1]&&(i.dateTimeString=e[1],i.dateTimeObject=new Date(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return i={type:"tag",tagType:"key"},e[1]&&(i.attributes=Po(e[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return i={type:"tag",tagType:"start"},e[1]&&(i.attributes=Po(e[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return(i={type:"tag",tagType:"cue-out-cont"}).data=e[1]?e[1]:"",void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return(i={type:"tag",tagType:"cue-out"}).data=e[1]?e[1]:"",void this.trigger("data",i);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return(i={type:"tag",tagType:"cue-in"}).data=e[1]?e[1]:"",void this.trigger("data",i);this.trigger("data",{type:"tag",data:t.slice(4)})}}}else this.trigger("data",{type:"comment",text:t.slice(1)})}else this.trigger("data",{type:"uri",uri:t})},e.prototype.addParser=function(t){var e=this,i=t.expression,n=t.customType,r=t.dataParser,o=t.segment;"function"!=typeof r&&(r=function(t){return t}),this.customParsers.push((function(t){if(i.exec(t))return e.trigger("data",{type:"custom",data:r(t),customType:n,segment:o}),!0}))},e}(Ao),Lo=function(t){function e(){So(this,e);var i=Eo(this,t.call(this));i.lineStream=new Mo,i.parseStream=new Io,i.lineStream.pipe(i.parseStream);var n=i,r=[],o={},a=void 0,s=void 0,l=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;return i.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},i.parseStream.on("data",(function(t){var e=void 0,i=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(o.byterange=e,e.length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0)),"offset"in t&&(o.byterange=e,e.offset=t.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),t.duration>0&&(o.duration=t.duration),0===t.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){t.attributes?"NONE"!==t.attributes.METHOD?t.attributes.URI?(t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(s.iv=t.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):s=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){a={},t.uri&&(a.uri=t.uri),t.byterange&&(a.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes?(o.attributes||(o.attributes={}),ko(o.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{},e=n[t.attributes["GROUP-ID"]],(i={default:/yes/i.test(t.attributes.DEFAULT)}).autoselect=!!i.default||/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(i.language=t.attributes.LANGUAGE),t.attributes.URI&&(i.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(i.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(i.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(i.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=i}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),o.dateTimeString=t.dateTimeString,o.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){o.cueOut=t.data},"cue-out-cont":function(){o.cueOutCont=t.data},"cue-in":function(){o.cueIn=t.data}}[t.tagType]||l).call(n)},uri:function(){o.uri=t.uri,r.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),s&&(o.key=s),o.timeline=c,a&&(o.map=a),o={}},comment:function(){},custom:function(){t.segment?(o.custom=o.custom||{},o.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(n)})),i}return Co(e,t),e.prototype.push=function(t){this.lineStream.push(t)},e.prototype.end=function(){this.lineStream.push("\n")},e.prototype.addParser=function(t){this.parseStream.addParser(t)},e}(Ao),Oo=function(t){var e,i=t.attributes,n=t.segments,r={attributes:(e={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(r.contentProtection=i.contentProtection),r},Do=function(t){var e,i=t.attributes,n=t.segments,r={attributes:(e={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(r.contentProtection=i.contentProtection),r},Ro=function(t){return!!t&&"object"===(void 0===t?"undefined":g(t))},No=function t(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];
1return i.reduce((function(e,i){return Object.keys(i).forEach((function(n){e[n]=Array.isArray(e[n])&&Array.isArray(i[n])?e[n].concat(i[n]):Ro(e[n])&&Ro(i[n])?t(e[n],i[n]):i[n]})),e}),{})},Bo=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=xo.buildAbsoluteURL(n.location.href,t)),xo.buildAbsoluteURL(t,e))},Fo=function(t){var e=t.baseUrl,i=t.source,n=void 0===i?"":i,r=t.range,o=void 0===r?"":r,a={uri:n,resolvedUri:Bo((void 0===e?"":e)||"",n)};if(o){var s=o.split("-"),l=parseInt(s[0],10),u=parseInt(s[1],10);a.byterange={length:u-l,offset:l}}return a},jo=function(t,e,i){var n=t.timescale,r=t.start,o=t.minimumUpdatePeriod;return Math.ceil((((t.NOW+t.clientOffset)/1e3+(void 0===o?0:o)-(t.availabilityStartTime+(void 0===r?0:r)))*(void 0===n?1:n)-e)/i)},Uo=function(t,e){for(var i=t.type,n=void 0===i?"static":i,r=t.minimumUpdatePeriod,o=void 0===r?0:r,a=t.media,s=void 0===a?"":a,l=t.sourceDuration,u=t.timescale,c=void 0===u?1:u,d=t.startNumber,h=void 0===d?1:d,p=t.periodIndex,f=[],g=-1,m=0;m<e.length;m++){var v=e[m],y=v.d,_=v.r||0,b=v.t||0;g<0&&(g=b),b&&b>g&&(g=b);var T=void 0;if(_<0){var w=m+1;T=w===e.length?"dynamic"===n&&o>0&&s.indexOf("$Number$")>0?jo(t,g,y):(l*c-g)/y:(e[w].t-g)/y}else T=_+1;for(var x=h+f.length+T,S=h+f.length;S<x;)f.push({number:S,duration:y/c,time:g,timeline:p}),g+=y,S++}return f},zo=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},Ho=function(t){if(!t.length)return[];for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e},Wo={static:function(t){var e=t.timescale;return{start:0,end:Math.ceil(t.sourceDuration/(t.duration/(void 0===e?1:e)))}},dynamic:function(t){var e=t.timescale,i=void 0===e?1:e,n=t.duration,r=t.start,o=t.minimumUpdatePeriod,a=t.timeShiftBufferDepth,s=void 0===a?1/0:a,l=(t.NOW+t.clientOffset)/1e3,u=t.availabilityStartTime+(void 0===r?0:r),c=Math.ceil((l+(void 0===o?0:o)-u)*i/n),d=Math.floor((l-u-s)*i/n),h=Math.floor((l-u)*i/n);return{start:Math.max(0,d),end:Math.min(c,h)}}},Vo=function(t){var e=t.type,i=void 0===e?"static":e,n=t.duration,r=t.timescale,o=void 0===r?1:r,a=t.sourceDuration,s=Wo[i](t),l=function(t,e){for(var i=[],n=t;n<e;n++)i.push(n);return i}(s.start,s.end).map(function(t){return function(e,i){var n=t.duration,r=t.timescale,o=t.startNumber;return{number:(void 0===o?1:o)+e,duration:n/(void 0===r?1:r),timeline:t.periodIndex,time:i*n}}}(t));if("static"===i){var u=l.length-1;l[u].duration=a-n/o*u}return l},qo=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Go=function(t,e){return t.replace(qo,function(t){return function(e,i,n,r){if("$$"===e)return"$";if(void 0===t[i])return e;var o=""+t[i];return"RepresentationID"===i?o:(r=n?parseInt(r,10):1,o.length>=r?o:""+new Array(r-o.length+1).join("0")+o)}}(e))},Yo=function(t,e){var i={RepresentationID:t.id,Bandwidth:t.bandwidth||0},n=t.initialization,r=void 0===n?{sourceURL:"",range:""}:n,o=Fo({baseUrl:t.baseUrl,source:Go(r.sourceURL,i),range:r.range});return function(t,e){return t.duration||e?t.duration?Vo(t):Uo(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){i.Number=e.number,i.Time=e.time;var n=Go(t.media||"",i);return{uri:n,timeline:e.timeline,duration:e.duration,resolvedUri:Bo(t.baseUrl||"",n),map:o,number:e.number}}))},Xo=function(t,e){var i=t.duration,n=t.segmentUrls,r=void 0===n?[]:n;if(!i&&!e||i&&e)throw new Error("SEGMENT_TIME_UNSPECIFIED");var o=r.map((function(e){return function(t,e){var i=t.baseUrl,n=t.initialization,r=void 0===n?{}:n,o=Fo({baseUrl:i,source:r.sourceURL,range:r.range}),a=Fo({baseUrl:i,source:e.media,range:e.mediaRange});return a.map=o,a}(t,e)})),a=void 0;return i&&(a=Vo(t)),e&&(a=Uo(t,e)),a.map((function(t,e){if(o[e]){var i=o[e];return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i}})).filter((function(t){return t}))},$o=function(t){var e=t.baseUrl,i=t.initialization,n=void 0===i?{}:i,r=t.sourceDuration,o=t.timescale,a=void 0===o?1:o,s=t.indexRange,l=void 0===s?"":s,u=t.duration;if(!e)throw new Error("NO_BASE_URL");var c=Fo({baseUrl:e,source:n.sourceURL,range:n.range}),d=Fo({baseUrl:e,source:e,range:l});if(d.map=c,u){var h=Vo(t);
1h.length&&(d.duration=h[0].duration,d.timeline=h[0].timeline)}else r&&(d.duration=r/a,d.timeline=0);return d.number=0,[d]},Ko=function(t){var e=t.attributes,i=t.segmentInfo,n=void 0,r=void 0;if(i.template?(r=Yo,n=No(e,i.template)):i.base?(r=$o,n=No(e,i.base)):i.list&&(r=Xo,n=No(e,i.list)),!r)return{attributes:e};var o=r(n,i.timeline);if(n.duration){var a=n.timescale;n.duration=n.duration/(void 0===a?1:a)}else n.duration=o.length?o.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):0;return{attributes:n,segments:o}},Zo=function(t,e){return Ho(t.childNodes).filter((function(t){return t.tagName===e}))},Qo=function(t){return t.textContent.trim()},Jo=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var i=e.slice(1),n=i[1],r=i[2],o=i[3],a=i[4],s=i[5];return 31536e3*parseFloat(i[0]||0)+2592e3*parseFloat(n||0)+86400*parseFloat(r||0)+3600*parseFloat(o||0)+60*parseFloat(a||0)+parseFloat(s||0)},ta={mediaPresentationDuration:function(t){return Jo(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return Jo(t)},timeShiftBufferDepth:function(t){return Jo(t)},start:function(t){return Jo(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?Jo(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},ea=function(t){return t&&t.attributes?Ho(t.attributes).reduce((function(t,e){return t[e.name]=(ta[e.name]||ta.DEFAULT)(e.value),t}),{}):{}},ia={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},na=function(t,e){return e.length?zo(t.map((function(t){return e.map((function(e){return Bo(t,Qo(e))}))}))):t},ra=function(t){var e=Zo(t,"SegmentTemplate")[0],i=Zo(t,"SegmentList")[0],n=i&&Zo(i,"SegmentURL").map((function(t){return No({tag:"SegmentURL"},ea(t))})),r=Zo(t,"SegmentBase")[0],o=i||e,a=o&&Zo(o,"SegmentTimeline")[0],s=i||r||e,l=s&&Zo(s,"Initialization")[0],u=e&&ea(e);u&&l?u.initialization=l&&ea(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});var c={template:u,timeline:a&&Zo(a,"S").map((function(t){return ea(t)})),list:i&&No(ea(i),{segmentUrls:n,initialization:ea(l)}),base:r&&No(ea(r),{initialization:ea(l)})};return Object.keys(c).forEach((function(t){c[t]||delete c[t]})),c},oa=function(t,e){return function(i,r){var o=na(e,Zo(i,"BaseURL")),a=ea(i),s=No(t,a,{periodIndex:r}),l=Zo(i,"AdaptationSet"),u=ra(i);return zo(l.map(function(t,e,i){return function(r){var o=ea(r),a=na(e,Zo(r,"BaseURL")),s=Zo(r,"Role")[0],l={role:ea(s)},u=No(t,o,l),c=Zo(r,"ContentProtection").reduce((function(t,e){var i=ea(e),r=ia[i.schemeIdUri];if(r){t[r]={attributes:i};var o=Zo(e,"cenc:pssh")[0];if(o){var a=Qo(o),s=a&&function(t){for(var e=n.atob(t),i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i}(a);t[r].pssh=s}}return t}),{});Object.keys(c).length&&(u=No(u,{contentProtection:c}));var d=ra(r),h=Zo(r,"Representation"),p=No(i,d);return zo(h.map(function(t,e,i){return function(n){var r=Zo(n,"BaseURL"),o=na(e,r),a=No(t,ea(n)),s=ra(n);return o.map((function(t){return{segmentInfo:No(i,s),attributes:No(a,{baseUrl:t})}}))}}(u,a,p)))}}(s,o,u)))}},aa=function(t){if(""===t)throw new Error("DASH_EMPTY_MANIFEST");var e=(new n.DOMParser).parseFromString(t,"application/xml"),i=e&&"MPD"===e.documentElement.tagName?e.documentElement:null;if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return i},sa={toUnsigned:function(t){return t>>>0}},la=Object.freeze({default:sa,__moduleExports:sa,toUnsigned:sa.toUnsigned}),ua=(la&&sa||la).toUnsigned;To=function(t,e){var i,n,r,o,a,s=[];if(!e.length)return null;for(i=0;i<t.byteLength;)n=ua(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),r=wo(t.subarray(i+4,i+8)),o=n>1?i+n:t.byteLength,r===e[0]&&(1===e.length?s.push(t.subarray(i+8,o)):(a=To(t.subarray(i+8,o),e.slice(1))).length&&(s=s.concat(a))),i=o;return s},wo=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),(e+=String.fromCharCode(t[2]))+String.fromCharCode(t[3])};var ca={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},da=Object.freeze({default:ca,__moduleExports:ca,H264_STREAM_TYPE:ca.H264_STREAM_TYPE,ADTS_STREAM_TYPE:ca.ADTS_STREAM_TYPE,METADATA_STREAM_TYPE:ca.METADATA_STREAM_TYPE}),ha=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,r,o;
vendor: 20,565 bytes, line 1
1if(i=t[e])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(o=[],n=arguments.length,n=1;n<arguments.length;++n)o.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,o)}},this.dispose=function(){t={}}}};ha.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),t},ha.prototype.push=function(t){this.trigger("data",t)},ha.prototype.flush=function(t){this.trigger("done",t)};var pa=ha,fa=Object.freeze({default:pa,__moduleExports:pa}),ga=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>4294967296;)t+=8589934592*i;return t},ma=function t(e){var i,n;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===n&&(n=t.dts),t.dts=ga(t.dts,n),t.pts=ga(t.pts,n),i=t.dts,this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){n=void 0,i=void 0}};ma.prototype=new(fa&&pa||fa);var va={TimestampRolloverStream:ma,handleRollover:ga},ya=Object.freeze({default:va,__moduleExports:va,TimestampRolloverStream:va.TimestampRolloverStream,handleRollover:va.handleRollover}),_a=da&&ca||da,ba=function(t){var e=31&t[1];return(e<<=8)|t[2]},Ta=function(t){return!!(64&t[1])},wa=function(t){var e=0;return(48&t[3])>>>4>1&&(e+=t[4]+1),e},xa=function(t){switch(t){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Sa={parseType:function(t,e){var i=ba(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=Ta(t),i=4+wa(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=Ta(t),n=4+wa(t);if(i&&(n+=t[n]+1),1&t[n+5]){var r;r=3+((15&t[n+1])<<8|t[n+2])-4;for(var o=12+((15&t[n+10])<<8|t[n+11]);o<r;){var a=n+o;e[(31&t[a+1])<<8|t[a+2]]=t[a],o+=5+((15&t[a+3])<<8|t[a+4])}return e}},parsePayloadUnitStartIndicator:Ta,parsePesType:function(t,e){switch(e[ba(t)]){case _a.H264_STREAM_TYPE:return"video";case _a.ADTS_STREAM_TYPE:return"audio";case _a.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!Ta(t))return null;var e=4+wa(t);if(e>=t.byteLength)return null;var i,n=null;return 192&(i=t[e+7])&&((n={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,n.pts*=4,n.pts+=(6&t[e+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,n.dts*=4,n.dts+=(6&t[e+18])>>>1)),n},videoPacketContainsKeyFrame:function(t){for(var e=4+wa(t),i=t.subarray(e),n=0,r=0,o=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===xa(31&i[r+3])&&(o=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===xa(31&i[r+3])&&(o=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===xa(31&i[r+3])&&(o=!0),o}},ka=Object.freeze({default:Sa,__moduleExports:Sa,parseType:Sa.parseType,parsePat:Sa.parsePat,parsePmt:Sa.parsePmt,parsePayloadUnitStartIndicator:Sa.parsePayloadUnitStartIndicator,parsePesType:Sa.parsePesType,parsePesTime:Sa.parsePesTime,videoPacketContainsKeyFrame:Sa.videoPacketContainsKeyFrame}),Ca=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Ea=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Aa={parseId3TagSize:function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},parseAdtsSize:function(t,e){return 6144&t[e+3]|t[e+4]<<3|(224&t[e+5])>>5},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return Ca[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=Ea(t.subarray(10,14)));do{if((i=Ea(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(t,e,i){var n,r="";for(n=0;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r}(n,0,r))){var o=n.subarray(r+1),a=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return(a*=4)+(3&o[7])}break}}e+=10,e+=i}while(e<t.byteLength);return null}},Ma=Object.freeze({default:Aa,__moduleExports:Aa,parseId3TagSize:Aa.parseId3TagSize,parseAdtsSize:Aa.parseAdtsSize,parseType:Aa.parseType,parseSampleRate:Aa.parseSampleRate,parseAacTimestamp:Aa.parseAacTimestamp}),Pa=Ma&&Aa||Ma,Ia=(ya&&va||ya).handleRollover,La={};La.ts=ka&&Sa||ka,La.aac=Pa;var Oa=function(t,e,i){for(var n,r,o,a,s=0,l=188,u=!1;l<t.byteLength;)if(71!==t[s]||71!==t[l])s++,l++;else{switch(n=t.subarray(s,l),La.ts.parseType(n,e.pid)){case"pes":r=La.ts.parsePesType(n,e.table),o=La.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&o&&(a=La.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)}if(u)break;s+=188,l+=188}for(s=(l=t.byteLength)-188,u=!1;s>=0;)if(71!==t[s]||71!==t[l])s--,l--;else{switch(n=t.subarray(s,l),La.ts.parseType(n,e.pid)){case"pes":r=La.ts.parsePesType(n,e.table),o=La.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&o&&(a=La.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)}if(u)break;s-=188,l-=188}},Da=function(t,e,i){for(var n,r,o,a,s,l,u,c=0,d=188,h=!1,p={data:[],size:0};d<t.byteLength;)if(71!==t[c]||71!==t[d])c++,d++;else{switch(n=t.subarray(c,d),La.ts.parseType(n,e.pid)){case"pes":if(r=La.ts.parsePesType(n,e.table),o=La.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(o&&!h&&(a=La.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0),!i.firstKeyFrame)){if(o&&0!==p.size){for(s=new Uint8Array(p.size),l=0;p.data.length;)u=p.data.shift(),s.set(u,l),l+=u.byteLength;La.ts.videoPacketContainsKeyFrame(s)&&(i.firstKeyFrame=La.ts.parsePesTime(s),i.firstKeyFrame.type="video"),p.size=0}p.data.push(n),p.size+=n.byteLength}}if(h&&i.firstKeyFrame)break;c+=188,d+=188}for(c=(d=t.byteLength)-188,h=!1;c>=0;)if(71!==t[c]||71!==t[d])c--,d--;else{switch(n=t.subarray(c,d),La.ts.parseType(n,e.pid)){case"pes":r=La.ts.parsePesType(n,e.table),o=La.ts.parsePayloadUnitStartIndicator(n),"video"===r&&o&&(a=La.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0)}if(h)break;c-=188,d-=188}},Ra=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Na=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),Ba=null,Fa=function(){function t(e){Ra(this,t),Ba||(Ba=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],r=i[4],o=void 0,a=void 0,s=void 0,l=[],u=[],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0;for(o=0;o<256;o++)u[(l[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!n[a];a^=c||1,s=u[s]||1)for(n[a]=h=(h=s^s<<1^s<<2^s<<3^s<<4)>>8^255&h^99,r[h]=a,f=16843009*l[d=l[c=l[a]]]^65537*d^257*c^16843008*a,p=257*l[h]^16843008*h,o=0;o<4;o++)e[o][a]=p=p<<24^p>>>8,i[o][h]=f=f<<24^f>>>8;for(o=0;o<5;o++)e[o]=e[o].slice(0),i[o]=i[o].slice(0);return t}()),this._tables=[[Ba[0][0].slice(),Ba[0][1].slice(),Ba[0][2].slice(),Ba[0][3].slice(),Ba[0][4].slice()],[Ba[1][0].slice(),Ba[1][1].slice(),Ba[1][2].slice(),Ba[1][3].slice(),Ba[1][4].slice()]];var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0,s=this._tables[0][4],l=this._tables[1],u=e.length,c=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(o=e.slice(0),this._key=[o,a=[]],i=u;i<4*u+28;i++)r=o[i-1],(i%u==0||8===u&&i%u==4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],i%u==0&&(r=r<<8^r>>>24^c<<24,c=c<<1^283*(c>>7))),o[i]=o[i-u]^r;for(n=0;i;n++,i--)r=o[3&n?i:i-4],a[n]=i<=4||n<4?r:l[0][s[r>>>24]]^l[1][s[r>>16&255]]^l[2][s[r>>8&255]]^l[3][s[255&r]]}return t.prototype.decrypt=function(t,e,i,n,r,o){var a=this._key[1],s=t^a[0],l=n^a[1],u=i^a[2],c=e^a[3],d=void 0,h=void 0,p=void 0,f=a.length/4-2,g=void 0,m=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(g=0;g<f;g++)d=y[s>>>24]^_[l>>16&255]^b[u>>8&255]^T[255&c]^a[m],h=y[l>>>24]^_[u>>16&255]^b[c>>8&255]^T[255&s]^a[m+1],p=y[u>>>24]^_[c>>16&255]^b[s>>8&255]^T[255&l]^a[m+2],c=y[c>>>24]^_[s>>16&255]^b[l>>8&255]^T[255&u]^a[m+3],m+=4,s=d,l=h,u=p;for(g=0;g<4;g++)r[(3&-g)+o]=w[s>>>24]<<24^w[l>>16&255]<<16^w[u>>8&255]<<8^w[255&c]^a[m++],d=s,s=l,l=u,u=c,c=d},t}(),ja=function(){function t(){Ra(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),i>-1},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}(),Ua=function(t){function e(){Ra(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e?t:e}(this,t.call(this,ja));return i.jobs=[],i.delay=1,i.timeout_=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":g(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)}(e,t),e.prototype.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},e.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(ja),za=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},Ha=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),r=new Fa(Array.prototype.slice.call(e)),o=new Uint8Array(t.byteLength),a=new Int32Array(o.buffer),s=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0;for(s=i[0],l=i[1],u=i[2],c=i[3],g=0;g<n.length;g+=4)d=za(n[g]),h=za(n[g+1]),p=za(n[g+2]),f=za(n[g+3]),r.decrypt(d,h,p,f,a,g),a[g]=za(a[g]^s),a[g+1]=za(a[g+1]^l),a[g+2]=za(a[g+2]^u),a[g+3]=za(a[g+3]^c),s=d,l=h,u=p,c=f;return o},Wa=function(){function t(e,i,n,r){Ra(this,t);var o=t.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),l=0;for(this.asyncStream_=new Ua,this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),i,n,s)),l=o;l<a.length;l+=o)n=new Uint32Array([za(a[l-4]),za(a[l-3]),za(a[l-2]),za(a[l-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),i,n,s));this.asyncStream_.push((function(){var t;r(null,(t=s).subarray(0,t.byteLength-t[t.byteLength-1]))}))}return t.prototype.decryptChunk_=function(t,e,i,n){return function(){var r=Ha(t,e,i);n.set(r,t.byteOffset)}},Na(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}(),Va=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=xo.buildAbsoluteURL(n.location.href,t)),xo.buildAbsoluteURL(t,e))},qa=yo.mergeOptions,Ga=yo.log,Ya=function(t,e){["AUDIO","SUBTITLES"].forEach((function(i){for(var n in t.mediaGroups[i])for(var r in t.mediaGroups[i][n])e(t.mediaGroups[i][n][r],i,n,r)}))},Xa=function(t,e){var i=qa(t,{}),n=i.playlists[e.uri];if(!n)return null;if(n.segments&&e.segments&&n.segments.length===e.segments.length&&n.mediaSequence===e.mediaSequence)return null;var r=qa(n,e);n.segments&&(r.segments=function(t,e,i){var n=e.slice();i=i||0;for(var r=Math.min(t.length,e.length+i),o=i;o<r;o++)n[o-i]=qa(t[o],n[o-i]);return n}(n.segments,e.segments,e.mediaSequence-n.mediaSequence)),r.segments.forEach((function(t){!function(t,e){t.resolvedUri||(t.resolvedUri=Va(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Va(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Va(e,t.map.uri))}(t,r.resolvedUri)}));for(var o=0;o<i.playlists.length;o++)i.playlists[o].uri===e.uri&&(i.playlists[o]=r);return i.playlists[e.uri]=r,i},$a=function(t){for(var e=t.playlists.length;e--;){var i=t.playlists[e];t.playlists[i.uri]=i,i.resolvedUri=Va(t.uri,i.uri),i.id=e,i.attributes||(i.attributes={},Ga.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},Ka=function(t){Ya(t,(function(e){e.uri&&(e.resolvedUri=Va(t.uri,e.uri))}))},Za=function(t,e){var i=t.segments[t.segments.length-1];return e&&i&&i.duration?1e3*i.duration:500*(t.targetDuration||10)},Qa=function(t){function e(i,n,r){m(this,e);var o=y(this,t.call(this));if(o.srcUrl=i,o.hls_=n,o.withCredentials=r,!o.srcUrl)throw new Error("A non-empty playlist URL is required");return o.state="HAVE_NOTHING",o.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===o.state&&(o.state="HAVE_CURRENT_METADATA",o.request=o.hls_.xhr({uri:Va(o.master.uri,o.media().uri),withCredentials:o.withCredentials},(function(t,e){if(o.request)return t?o.playlistRequestError(o.request,o.media().uri,"HAVE_METADATA"):void o.haveMetadata(o.request,o.media().uri)})))})),o}return v(e,t),e.prototype.playlistRequestError=function(t,e,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[e],status:t.status,message:"HLS playlist request error at URL: "+e,responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")},e.prototype.haveMetadata=function(t,e){var i=this;this.request=null,this.state="HAVE_METADATA";var r=new Lo;r.push(t.responseText),r.end(),r.manifest.uri=e,r.manifest.attributes=r.manifest.attributes||{};var o=Xa(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration,o?(this.master=o,this.media_=this.master.playlists[r.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(n.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=n.setTimeout((function(){i.trigger("mediaupdatetimeout")}),Za(this.media(),!!o))),this.trigger("loadedplaylist")},e.prototype.dispose=function(){this.stopRequest(),n.clearTimeout(this.mediaUpdateTimeout)},e.prototype.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},e.prototype.media=function(t){var e=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var n=!this.media_||t.uri!==this.media_.uri;if(this.master.playlists[t.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(n){if(this.state="SWITCHING_MEDIA",this.request){if(Va(this.master.uri,t.uri)===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:Va(this.master.uri,t.uri),withCredentials:this.withCredentials},(function(n,r){if(e.request){if(n)return e.playlistRequestError(e.request,t.uri,i);e.haveMetadata(r,t.uri),e.trigger("HAVE_MASTER"===i?"loadedmetadata":"mediachange")}}))}},e.prototype.pause=function(){this.stopRequest(),n.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},e.prototype.load=function(t){var e=this;n.clearTimeout(this.mediaUpdateTimeout);var i=this.media();t?this.mediaUpdateTimeout=n.setTimeout((function(){return e.load()}),i?i.targetDuration/2*1e3:5e3):this.started?this.trigger(i&&!i.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},e.prototype.start=function(){var t=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(e,i){if(t.request){if(t.request=null,e)return t.error={status:i.status,message:"HLS playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");var r=new Lo;return r.push(i.responseText),r.end(),t.state="HAVE_MASTER",r.manifest.uri=t.srcUrl,r.manifest.playlists?(t.master=r.manifest,$a(t.master),Ka(t.master),t.trigger("loadedplaylist"),void(t.request||t.media(r.manifest.playlists[0]))):(t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:n.location.href,playlists:[{uri:t.srcUrl,id:0}]},t.master.playlists[t.srcUrl]=t.master.playlists[0],t.master.playlists[0].resolvedUri=t.srcUrl,t.master.playlists[0].attributes=t.master.playlists[0].attributes||{},t.haveMetadata(i,t.srcUrl),t.trigger("loadedmetadata"))}}))},e}(yo.EventTarget),Ja=yo.createTimeRange,ts=function(t,e,i){var n,r;return void 0===e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence?0:(n=function(t,e){var i=0,n=e-t.mediaSequence,r=t.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=t.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(t,e)).precise?n.result:(r=function(t,e){for(var i=0,n=void 0,r=e-t.mediaSequence;r<t.segments.length;r++){if(void 0!==(n=t.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(t,e)).precise?r.result:n.result+i},es=function(t,e,i){if(!t)return 0;if("number"!=typeof i&&(i=0),void 0===e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return n.Infinity}return ts(t,e,i)},is=function(t,e,i){var n=0;if(e>i){var r=[i,e];e=r[0],i=r[1]}if(e<0){for(var o=e;o<Math.min(0,i);o++)n+=t.targetDuration;e=0}for(var a=e;a<i;a++)n+=t.segments[a].duration;return n},ns=function(t){if(!t.segments.length)return 0;for(var e=t.segments.length-1,i=t.segments[e].duration||t.targetDuration,n=i+2*t.targetDuration;e--&&!((i+=t.segments[e].duration)>=n););return Math.max(0,e)},rs=function(t,e,i){if(!t||!t.segments)return null;if(t.endList)return es(t);if(null===e)return null;e=e||0;var n=i?ns(t):t.segments.length;return ts(t,t.mediaSequence+n,e)},os=function(t){return t-Math.floor(t)==0},as=function(t,e){if(os(e))return e+.1*t;for(var i=e.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),o=e*r;if(os(o)||n===i)return(o+t)/r}},ss=as.bind(null,1),ls=as.bind(null,-1),us=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},cs=function(t){return t.excludeUntil&&t.excludeUntil===1/0},ds=function(t){var e=us(t);return!t.disabled&&!e},hs=function(t,e){return e.attributes&&e.attributes[t]},ps=function(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter((function(t){return!!ds(t)&&(t.attributes.BANDWIDTH||0)<i})).length},fs={duration:es,seekable:function(t,e){var i=e||0,n=rs(t,e,!0);return null===n?Ja():Ja(i,n)},safeLiveIndex:ns,getMediaInfoForTime:function(t,e,i,n){var r=void 0,o=t.segments.length,a=e-n;if(a<0){if(i>0)for(r=i-1;r>=0;r--)if((a+=ls(t.segments[r].duration))>0)return{mediaIndex:r,startTime:n-is(t,i,r)};return{mediaIndex:0,startTime:e}}if(i<0){for(r=i;r<0;r++)if((a-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};i=0}for(r=i;r<o;r++)if((a-=ss(t.segments[r].duration))<0)return{mediaIndex:r,startTime:n+is(t,i,r)};return{mediaIndex:o-1,startTime:e}},isEnabled:ds,isDisabled:function(t){return t.disabled},isBlacklisted:us,isIncompatible:cs,playlistEnd:rs,isAes:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},isFmp4:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].map)return!0;return!1},hasAttribute:hs,estimateSegmentRequestTime:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(!hs("BANDWIDTH",i))return NaN;var r=t*i.attributes.BANDWIDTH;return(r-8*n)/e},isLowestEnabledRendition:ps},gs=yo.xhr,ms=yo.mergeOptions,vs=function(){return function t(e,i){e=ms({timeout:45e3},e);var n=t.beforeRequest||yo.Hls.xhr.beforeRequest;if(n&&"function"==typeof n){var r=n(e);r&&(e=r)}var o=gs(e,(function(t,e){var n=o.response;!t&&n&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=n.byteLength||n.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),e.headers&&(o.responseHeaders=e.headers),t&&"ETIMEDOUT"===t.code&&(o.timedout=!0),t||o.aborted||200===e.statusCode||206===e.statusCode||0===e.statusCode||(t=new Error("XHR Failed with a response of: "+(o&&(n||o.responseText)))),i(t,o)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=e.uri,o.requestTime=Date.now(),o}},ys=function(t,e){return t.start(e)+"-"+t.end(e)},_s=function(t,e){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},bs=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},Ts=function(t){var e={};return Object.keys(t).forEach((function(i){var n=t[i];e[i]=ArrayBuffer.isView(n)?{bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:n})),e},ws=function(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},xs=function(t){for(var e=Array.prototype.slice.call(t),i="",n=0;n<e.length/16;n++)i+=e.slice(16*n,16*n+16).map(_s).join("")+" "+e.slice(16*n,16*n+16).map(bs).join("")+"\n";return i},Ss=Object.freeze({createTransferableMessage:Ts,initSegmentId:ws,hexDump:xs,tagDump:function(t){return xs(t.bytes)},textRanges:function(t){var e="",i=void 0;for(i=0;i<t.length;i++)e+=ys(t,i)+" ";return e}}),ks=function(t,e){var i=[],n=void 0;if(t&&t.length)for(n=0;n<t.length;n++)e(t.start(n),t.end(n))&&i.push([t.start(n),t.end(n)]);return yo.createTimeRanges(i)},Cs=function(t,e){return ks(t,(function(t,i){return t-1/30<=e&&i+1/30>=e}))},Es=function(t,e){return ks(t,(function(t){return t-1/30>=e}))},As=function(t){var e=[];if(!t||!t.length)return"";for(var i=0;i<t.length;i++)e.push(t.start(i)+" => "+t.end(i));return e.join(", ")},Ms=function(t){for(var e=[],i=0;i<t.length;i++)e.push({start:t.start(i),end:t.end(i)});return e},Ps=function(t,e,i){var n=void 0,r=void 0;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime<=e&&r.endTime>=t&&i.removeCue(r)},Is=function(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t},Ls="undefined"!=typeof window?window:{},Os="undefined"==typeof Symbol?"__target":Symbol(),Ds=Ls.BlobBuilder||Ls.WebKitBlobBuilder||Ls.MozBlobBuilder||Ls.MSBlobBuilder,Rs=Ls.URL||Ls.webkitURL||Rs&&Rs.msURL,Ns=Ls.Worker;function Bs(t,e){return function(i){var n=this;if(!e)return new Ns(t);if(Ns&&!i){var r=zs(e.toString().replace(/^function.+?{/,"").slice(0,-1));return this[Os]=new Ns(r),function(t,e){if(t&&e){var i=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&Rs.revokeObjectURL(t.objURL),i.call(t)}}}(this[Os],r),this[Os]}var o={postMessage:function(t){n.onmessage&&setTimeout((function(){n.onmessage({data:t,target:o})}))}};e.call(o),this.postMessage=function(t){setTimeout((function(){o.onmessage({data:t,target:n})}))},this.isThisThread=!0}}if(Ns){var Fs,js=zs("self.onmessage = function () {}"),Us=new Uint8Array(1);try{(Fs=new Ns(js)).postMessage(Us,[Us.buffer])}catch(Kl){Ns=null}finally{Rs.revokeObjectURL(js),Fs&&Fs.terminate()}}function zs(t){try{return Rs.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch(Kl){var e=new Ds;return e.append(t),Rs.createObjectURL(e.getBlob(type))}}var Hs=new Bs("./transmuxer-worker.worker.js",(function(t,e){var i=this;!function(){var e,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y,_,b,T,w,x,S,k,C,E,A,M,P,I,L,O,D,R,N,B,F,j,U,z,H=void 0!==t?t:"undefined"!=typeof global?global:void 0!==i?i:{},W=void 0!==t?t:void 0!==H?H:void 0!==i?i:{},V=Math.pow(2,32)-1;!function(){var t;if(x={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in x)x.hasOwnProperty(t)&&(x[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),E=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),M={video:E,audio:A},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),I=new Uint8Array([0,0,0,0,0,0,0,0]),O=new
vendor: 6,001 bytes, line 1
1Uint8Array([0,0,0,0,0,0,0,0]),D=O,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=O,P=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(t){var e,i,n=[],r=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)r+=n[e].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,r=8;e<n.length;e++)i.set(n[e],r),r+=n[e].byteLength;return i},n=function(){return e(x.dinf,e(x.dref,L))},r=function(t){return e(x.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},m=function(t){return e(x.hdlr,M[t])},g=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(i[12]=t.samplerate>>>24&255,i[13]=t.samplerate>>>16&255,i[14]=t.samplerate>>>8&255,i[15]=255&t.samplerate),e(x.mdhd,i)},f=function(t){return e(x.mdia,g(t),m(t.type),s(t))},a=function(t){return e(x.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},s=function(t){return e(x.minf,"video"===t.type?e(x.vmhd,P):e(x.smhd,I),n(),y(t))},l=function(t,i){for(var n=[],r=i.length;r--;)n[r]=b(i[r]);return e.apply(null,[x.moof,a(t)].concat(n))},u=function(t){for(var i=t.length,n=[];i--;)n[i]=h(t[i]);return e.apply(null,[x.moov,d(4294967295)].concat(n).concat(c(t)))},c=function(t){for(var i=t.length,n=[];i--;)n[i]=T(t[i]);return e.apply(null,[x.mvex].concat(n))},d=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e(x.mvhd,i)},v=function(t){var i,n,r=t.samples||[],o=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)o[n+4]=(i=r[n].flags).dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return e(x.sdtp,o)},y=function(t){return e(x.stbl,_(t),e(x.stts,N),e(x.stsc,D),e(x.stsz,R),e(x.stco,O))},_=function(t){return e(x.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?B(t):F(t))},B=function(t){var i,n=t.sps||[],r=t.pps||[],o=[],a=[];for(i=0;i<n.length;i++)o.push((65280&n[i].byteLength)>>>8),o.push(255&n[i].byteLength),o=o.concat(Array.prototype.slice.call(n[i]));for(i=0;i<r.length;i++)a.push((65280&r[i].byteLength)>>>8),a.push(255&r[i].byteLength),a=a.concat(Array.prototype.slice.call(r[i]));return e(x.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),e(x.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([n.length]).concat(o).concat([r.length]).concat(a))),e(x.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},F=function(t){return e(x.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),r(t))},p=function(t){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return e(x.tkhd,i)},b=function(t){var i,n,r,o,a,s;return i=e(x.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(V+1)),s=Math.floor(t.baseMediaDecodeTime%(V+1)),n=e(x.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),"audio"===t.type?(r=w(t,92),e(x.traf,i,n,r)):(o=v(t),r=w(t,o.length+92),e(x.traf,i,n,r,o))},h=function(t){return t.duration=t.duration||4294967295,e(x.trak,p(t),f(t))},T=function(t){var i=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(i[i.length-1]=0),e(x.trex,i)},z=function(t,e){var i=0,n=0,r=0,o=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(o=8)),[0,0,i|n|r|o,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},U=function(t,i){var n,r,o,a;for(n=z(r=t.samples||[],i+=20+16*r.length),a=0;a<r.length;a++)n=n.concat([(4278190080&(o=r[a]).duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,61440&o.flags.degradationPriority,15&o.flags.degradationPriority,(4278190080&o.compositionTimeOffset)>>>24,(16711680&o.compositionTimeOffset)>>>16,(65280&o.compositionTimeOffset)>>>8,255&o.compositionTimeOffset]);return e(x.trun,new Uint8Array(n))},j=function(t,i){var n,r,o,a;for(n=z(r=t.samples||[],i+=20+8*r.length),a=0;a<r.length;a++)n=n.concat([(4278190080&(o=r[a]).duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size]);return e(x.trun,new Uint8Array(n))},w=function(t,e){return"audio"===t.type?j(t,e):U(t,e)};var q={ftyp:o=function(){return e(x.ftyp,S,k,S,C)},mdat:function(t){return e(x.mdat,t)},moof:l,moov:u,initSegment:function(t){var e,i=o(),n=u(t);
vendor: 4,449 bytes, line 1
1return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},G=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,r,o;if(i=t[e])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(o=[],n=arguments.length,n=1;n<arguments.length;++n)o.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,o)}},this.dispose=function(){t={}}}};G.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),t},G.prototype.push=function(t){this.trigger("data",t)},G.prototype.flush=function(t){this.trigger("done",t)};var Y=G,X=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new J(0,0),new J(0,1),new J(1,0),new J(1,1)],this.reset(),this.ccStreams_.forEach((function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))}),this)};(X.prototype=new Y).push=function(t){var e,i;if("sei_rbsp"===t.nalUnitType&&4===(e=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,r=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)r+=255,e++;if(r+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=t.subarray(e,e+r);break}e+=r,n=0,r=0}return i}(t.escapedRBSP)).payloadType&&(i=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)}(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));this.captionPackets_=this.captionPackets_.concat(function(t,e){var i,n,r,o,a=[];if(!(64&e[0]))return a;for(n=31&e[0],i=0;i<n;i++)o={type:3&e[2+(r=3*i)],pts:t},4&e[r+2]&&(o.ccData=e[r+3]<<8|e[r+4],a.push(o));return a}(t.pts,i)),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},X.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2&&this.dispatchCea608Packet(t)}),this),this.captionPackets_.length=0,this.ccStreams_.forEach((function(t){t.flush()}),this)):this.ccStreams_.forEach((function(t){t.flush()}),this)},X.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},X.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},X.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},X.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var $={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},K=function(t){return null===t?"":(t=$[t]||t,String.fromCharCode(t))},Z=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Q=function(){for(var t=[],e=15;e--;)t.push("");return t},J=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,r,o;
vendor: 5,079 bytes, line 1
1if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(e===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(e===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Q();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Q();else if(e===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(n,r))o=K((n=(3&n)<<8)|r),this[this.mode_](t.pts,o),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),o=K((n=(3&n)<<8)|r),this[this.mode_](t.pts,o),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var a=Z.indexOf(7968&e);a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),o=K(n),o+=K(r),this[this.mode_](t.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};J.prototype=new Y,J.prototype.flushDisplayed=function(t){var e=this.displayed_.map((function(t){return t.trim()})).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},J.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Q(),this.nonDisplayed_=Q(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},J.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},J.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},J.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},J.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},J.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},J.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},J.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},J.prototype.isNormalChar=function(t){return t>=32&&t<=127},J.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce((function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},J.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"</"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},J.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=i+=e},J.prototype.rollUp=function(t,e){var i=this.displayed_[14];this.displayed_[14]=i+=e},J.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.topRow_;t<14;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[14]=""},J.prototype.paintOn=function(){};var tt={CaptionStream:X,Cea608Stream:J},et={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},it=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>4294967296;)t+=8589934592*i;return t},nt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===n&&(n=t.dts),t.dts=it(t.dts,n),t.pts=it(t.pts,n),i=t.dts,this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){n=void 0,i=void 0}};nt.prototype=new Y;
vendor: 16,295 bytes, line 1
1var rt,ot=nt,at=function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r},st=function(t,e,i){return decodeURIComponent(at(t,e,i))},lt=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},ut={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=st(t.data,1,e),t.value=st(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=st(t.data,1,e),t.url=st(t.data,e+1,t.data.length);break}},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=unescape(at(t.data,0,e));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(rt=function(t){var e,i={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},n=0,r=[],o=0;if(rt.prototype.init.call(this),this.dispatchType=et.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,a,s,l,u;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(o=0,r.length=0),0===r.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))i.debug&&console.log("Skipping unrecognized metadata packet");else if(r.push(t),o+=t.data.byteLength,1===r.length&&(n=lt(t.data.subarray(6,10)),n+=10),!(o<n)){for(e={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},u=0;u<n;)e.data.set(r[0].data.subarray(0,n-u),u),u+=r[0].data.byteLength,o-=r[0].data.byteLength,r.shift();a=10,64&e.data[5]&&(a+=4,a+=lt(e.data.subarray(10,14)),n-=lt(e.data.subarray(16,20)));do{if((s=lt(e.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((l={id:String.fromCharCode(e.data[a],e.data[a+1],e.data[a+2],e.data[a+3]),data:e.data.subarray(a+10,a+s+10)}).key=l.id,ut[l.id]&&(ut[l.id](l),"com.apple.streaming.transportStreamTimestamp"===l.owner)){var c=l.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,l.timeStamp=d+=3&c[7],void 0===e.pts&&void 0===e.dts&&(e.pts=l.timeStamp,e.dts=l.timeStamp),this.trigger("timestamp",l)}e.frames.push(l),a+=10,a+=s}while(a<n);this.trigger("data",e)}}}).prototype=new Y;var ct,dt,ht,pt=rt,ft=ot;(ct=function(){var t=new Uint8Array(188),e=0;ct.prototype.init.call(this),this.push=function(i){var n,r=0,o=188;for(e?((n=new Uint8Array(i.byteLength+e)).set(t.subarray(0,e)),n.set(i,e),e=0):n=i;o<n.byteLength;)71!==n[r]||71!==n[o]?(r++,o++):(this.trigger("data",n.subarray(r,o)),r+=188,o+=188);r<n.byteLength&&(t.set(n.subarray(r),0),e=n.byteLength-r)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")}}).prototype=new Y,(dt=function(){var t,e,i,n;dt.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var r=0;n.payloadUnitStartIndicator&&(r+=t[r]+1),"pat"===n.type?e(t.subarray(r),n):i(t.subarray(r),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,r;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,r=12+((15&t[10])<<8|t[11]);r<i;){var o=t[r],a=(31&t[r+1])<<8|t[r+2];o===et.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:o===et.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:o===et.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=o),r+=5+((15&t[r+3])<<8|t[r+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){i.streamType=i.pid===this.programMapTable.video?et.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?et.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new Y,dt.STREAM_TYPES={h264:27,adts:15},(ht=function(){var t=this,e={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(e,i,n){var r,o,a=new Uint8Array(e.size),s={type:i},l=0,u=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,l=0;l<e.data.length;l++)a.set((o=e.data[l]).data,u),u+=o.data.byteLength;var c,d,h;(d=s).packetLength=6+((c=a)[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8]),r="video"===i||s.packetLength<=e.size,(n||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",s)}};ht.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var t,a;switch(o.streamType){case et.H264_STREAM_TYPE:case et.H264_STREAM_TYPE:t=e,a="video";break;case et.ADTS_STREAM_TYPE:t=i,a="audio";break;case et.METADATA_STREAM_TYPE:t=n,a="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&r(t,a,!0),t.data.push(o),t.size+=o.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]},i=o.programMapTable;null!==i.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.video,codec:"avc",type:"video"}),null!==i.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.audio,codec:"adts",type:"audio"}),t.trigger("data",e)}})[o.type]()},this.flush=function(){r(e,"video"),r(i,"audio"),r(n,"timed-metadata"),this.trigger("done")}}).prototype=new Y;var gt={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:ct,TransportParseStream:dt,ElementaryStream:ht,TimestampRolloverStream:ft,CaptionStream:tt.CaptionStream,Cea608Stream:tt.Cea608Stream,MetadataStream:pt};for(var mt in et)et.hasOwnProperty(mt)&&(gt[mt]=et[mt]);var vt,yt=gt,_t=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(vt=function(){var t;vt.prototype.init.call(this),this.push=function(e){var i,n,r,o,a=0,s=0;if("audio"===e.type)for(t?(n=t,(t=new Uint8Array(n.byteLength+e.data.byteLength)).set(n),t.set(e.data,n.byteLength)):t=e.data;a+5<t.length;)if(255===t[a]&&240==(246&t[a+1])){if(t.byteLength<(i=a+((3&t[a+3])<<11|t[a+4]<<3|(224&t[a+5])>>5)))return;if(this.trigger("data",{pts:e.pts+s*(o=9e4*(r=1024*(1+(3&t[a+6])))/_t[(60&t[a+2])>>>2]),dts:e.dts+s*o,sampleCount:r,audioobjecttype:1+(t[a+2]>>>6&3),channelcount:(1&t[a+2])<<2|(192&t[a+3])>>>6,samplerate:_t[(60&t[a+2])>>>2],samplingfrequencyindex:(60&t[a+2])>>>2,samplesize:16,data:t.subarray(a+7+2*(1&~t[a+1]),i)}),t.byteLength===i)return void(t=void 0);s++,t=t.subarray(i)}else a++},this.flush=function(){this.trigger("done")}}).prototype=new Y;var bt,Tt,wt,xt=vt,St=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var r=t.byteLength-e,o=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");o.set(t.subarray(r,r+a)),i=new DataView(o.buffer).getUint32(0),n=8*a,e-=a},this.skipBits=function(t){var r;n>t?(i<<=t,n-=t):(t-=n,t-=8*(r=Math.floor(t/8)),e-=r,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var r=Math.min(n,t),o=i>>>32-r;return(n-=r)>0?i<<=r:e>0&&this.loadWord(),(r=t-r)>0?o<<r|this.readBits(r):o},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(0!=(i&2147483648>>>t))return i<<=t,n-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Tt=function(){var t,e,i=0;Tt.prototype.init.call(this),this.push=function(n){var r;for(e?((r=new Uint8Array(e.byteLength+n.data.byteLength)).set(e),r.set(n.data,e.byteLength),e=r):e=n.data;i<e.byteLength-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<e.byteLength;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<e.length);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")}}).prototype=new Y,wt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(bt=function(){var t,e,i,n,r,o,a,s=new Tt;bt.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.pts,n=t.dts,s.push(t))},s.on("data",(function(a){var s={trackId:e,pts:i,dts:n,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=r(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=r(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",s)})),s.on("done",(function(){t.trigger("done")})),this.flush=function(){s.flush()},a=function(t,e){var i,n=8,r=8;for(i=0;i<t;i++)0!==r&&(r=(n+e.readExpGolomb()+256)%256),n=0===r?n:r},r=function(t){for(var e,i,n=t.byteLength,r=[],o=1;o<n-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(r.push(o+2),o+=2):o++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===r[0]&&(a++,r.shift()),i[o]=t[a];return i},o=function(t){var e,i,n,r,o,s,l,u,c,d,h,p,f,g=0,m=0,v=0,y=0,_=1;if(i=(e=new St(t)).readUnsignedByte(),r=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),wt[i]&&(3===(o=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==o?8:12,f=0;f<h;f++)e.readBoolean()&&a(f<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),l=e.readUnsignedExpGolomb(),f=0;f<l;f++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),u=e.readUnsignedExpGolomb(),c=e.readUnsignedExpGolomb(),0===(d=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(g=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),v=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}p&&(_=p[0]/p[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(u+1)-2*g-2*m)*_),height:(2-d)*(c+1)*16-2*v-2*y}}}).prototype=new Y;var kt,Ct={H264Stream:bt,NalByteStream:Tt};(kt=function(){var t=new Uint8Array,e=0;kt.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.parseId3TagSize=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},this.parseAdtsSize=function(t,e){return 6144&t[e+3]|t[e+4]<<3|(224&t[e+5])>>5},this.push=function(i){var n,r,o,a=0,s=0;for(t.length?(o=t.length,(t=new Uint8Array(i.byteLength+o)).set(t.subarray(0,o)),t.set(i,o)):t=i;t.length-s>=3;)if(t[s]!=="I".charCodeAt(0)||t[s+1]!=="D".charCodeAt(0)||t[s+2]!=="3".charCodeAt(0))if(!0&t[s]&&240==(240&t[s+1])){if(t.length-s<7)break;if((a=this.parseAdtsSize(t,s))>t.length)break;r={type:"audio",data:t.subarray(s,s+a),pts:e,dts:e},this.trigger("data",r),s+=a}else s++;else{if(t.length-s<10)break;if((a=this.parseId3TagSize(t,s))>t.length)break;n={type:"timed-metadata",data:t.subarray(s,s+a)},this.trigger("data",n),s+=a}t=t.length-s>0?t.subarray(s):new Uint8Array}}).prototype=new Y;var Et,At,Mt,Pt,It,Lt,Ot,Dt=kt,Rt=[33,16,5,32,164,27],Nt=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Bt=function(t){for(var e=[];t--;)e.push(0);return e},Ft={96e3:[Rt,[227,64],Bt(154),[56]],88200:[Rt,[231],Bt(170),[56]],64e3:[Rt,[248,192],Bt(240),[56]],48e3:[Rt,[255,192],Bt(268),[55,148,128],Bt(54),[112]],44100:[Rt,[255,192],Bt(268),[55,163,128],Bt(84),[112]],32e3:[Rt,[255,192],Bt(268),[55,234],Bt(226),[112]],24e3:[Rt,[255,192],Bt(268),[55,255,128],Bt(268),[111,112],Bt(126),[224]],16e3:[Rt,[255,192],Bt(268),[55,255,128],Bt(268),[111,255],Bt(269),[223,108],Bt(195),[1,192]],12e3:[Nt,Bt(268),[3,127,248],Bt(268),[6,255,240],Bt(268),[13,255,224],Bt(268),[27,253,128],Bt(259),[56]],11025:[Nt,Bt(268),[3,127,248],Bt(268),[6,255,240],Bt(268),[13,255,224],Bt(268),[27,255,192],Bt(268),[55,175,128],Bt(108),[112]],8e3:[Nt,Bt(268),[3,121,16],Bt(47),[7]]},jt=(Et=Ft,Object.keys(Et).reduce((function(t,e){return t[e]=new Uint8Array(Et[e].reduce((function(t,e){return t.concat(e)}),[])),t}),{}));Lt=function(t,e){return At(It(t,e))},Ot=function(t,e){return Mt(Pt(t),e)},At=function(t){return 9e4*t},Mt=function(t,e){return t*e},Pt=function(t){return t/9e4},It=function(t,e){return t/e};var Ut,zt,Ht,Wt,Vt,qt,Gt,Yt,Xt,$t,Kt=Lt,Zt=Ot,Qt=Ct.H264Stream,Jt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],te=["width","height","profileIdc","levelIdc","profileCompatibility"];Vt=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},Xt=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},$t=function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i},(zt=function(t,e){var i=[],n=0,r=0,o=0,a=1/0;e=e||{},zt.prototype.init.call(this),this.push=function(e){qt(t,e),t&&Jt.forEach((function(i){t[i]=e[i]})),i.push(e)},this.setEarliestDts=function(e){r=e-t.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){a=t},this.setAudioAppendStart=function(t){o=t},this.flush=function(){var r,o,a,s;0!==i.length?(r=this.trimAdtsFramesByEarliestDts_(i),t.baseMediaDecodeTime=Yt(t,e.keepOriginalTimestamps),this.prefixWithSilence_(t,r),t.samples=this.generateSampleTable_(r),a=q.mdat(this.concatenateFrameData_(r)),i=[],o=q.moof(n,[t]),s=new Uint8Array(o.byteLength+a.byteLength),n++,s.set(o),s.set(a,o.byteLength),Gt(t),this.trigger("data",{track:t,boxes:s}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(t,e){var i,n,r,s,l=0,u=0,c=0;if(e.length&&(i=Kt(t.baseMediaDecodeTime,t.samplerate),n=Math.ceil(9e4/(t.samplerate/1024)),o&&a&&(l=i-Math.max(o,a),c=(u=Math.floor(l/n))*n),!(u<1||c>45e3))){for((r=jt[t.samplerate])||(r=e[0].data),s=0;s<u;s++)e.splice(s,0,{data:r});t.baseMediaDecodeTime-=Math.floor(Zt(c,t.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(e){return t.minSegmentDts>=r?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=r&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},this.generateSampleTable_=function(t){var e,i=[];for(e=0;e<t.length;e++)i.push({size:t[e].data.byteLength,duration:1024});return i},this.concatenateFrameData_=function(t){var e,i,n=0,r=new Uint8Array($t(t));for(e=0;e<t.length;e++)r.set((i=t[e]).data,n),n+=i.data.byteLength;return r}}).prototype=new Y,(Ut=function(t,e){var i,n,r=0,o=[],a=[];e=e||{},Ut.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){qt(t,e),"seq_parameter_set_rbsp"!==e.nal
vendor: 5,209 bytes, line 1
1UnitType||i||(i=e.config,t.sps=[e.data],te.forEach((function(e){t[e]=i[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.data,t.pps=[e.data]),o.push(e)},this.flush=function(){for(var i,n,s,l,u,c;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=this.groupNalsIntoFrames_(o),(s=this.groupFramesIntoGops_(i))[0][0].keyFrame||((n=this.getGopForFusion_(o[0],t))?(s.unshift(n),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.pts=n.pts,s.dts=n.dts,s.duration+=n.duration):s=this.extendFirstKeyFrame_(s)),a.length){var d;if(!(d=e.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Gt(t),s=d}qt(t,s),t.samples=this.generateSampleTable_(s),u=q.mdat(this.concatenateNalData_(s)),t.baseMediaDecodeTime=Yt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),l=q.moof(r,[t]),c=new Uint8Array(l.byteLength+u.byteLength),r++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:t,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){Gt(t),i=void 0,n=void 0},this.getGopForFusion_=function(e){var i,n,r,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)r=(o=this.gopCache_[a]).gop,t.pps&&Xt(t.pps[0],o.pps[0])&&t.sps&&Xt(t.sps[0],o.sps[0])&&(r.dts<t.timelineStartInfo.dts||(i=e.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||s>i)&&(n=o,s=i));return n?n.gop:null},this.extendFirstKeyFrame_=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},this.groupNalsIntoFrames_=function(t){var e,i,n=[],r=[];for(n.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},this.groupFramesIntoGops_=function(t){var e,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},this.generateSampleTable_=function(t,e){var i,n,r,o,a,s=e||0,l=[];for(i=0;i<t.length;i++)for(o=t[i],n=0;n<o.length;n++)a=o[n],(r={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}).dataOffset=s,r.compositionTimeOffset=a.pts-a.dts,r.duration=a.duration,r.size=4*a.length,r.size+=a.byteLength,a.keyFrame&&(r.flags.dependsOn=2),s+=r.size,l.push(r);return l},this.concatenateNalData_=function(t){var e,i,n,r,o,a,s=0,l=new Uint8Array(t.byteLength+4*t.nalCount),u=new DataView(l.buffer);for(e=0;e<t.length;e++)for(r=t[e],i=0;i<r.length;i++)for(o=r[i],n=0;n<o.length;n++)u.setUint32(s,(a=o[n]).data.byteLength),l.set(a.data,s+=4),s+=a.data.byteLength;return l},this.alignGopsAtStart_=function(t){var e,i,n,r,o,s,l,u;for(o=t.byteLength,s=t.nalCount,l=t.duration,e=i=0;e<a.length&&i<t.length&&(n=a[e]).pts!==(r=t[i]).pts;)r.pts>n.pts?e++:(i++,o-=r.byteLength,s-=r.nalCount,l-=r.duration);return 0===i?t:i===t.length?null:((u=t.slice(i)).byteLength=o,u.duration=l,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(t){var e,i,n,r,o,s,l;for(e=a.length-1,i=t.length-1,o=null,s=!1;e>=0&&i>=0;){if((n=a[e]).pts===(r=t[i]).pts){s=!0;break}n.pts>r.pts?e--:(e===a.length-1&&(o=i),i--)}if(!s&&null===o)return null;if(0===(l=s?i:o))return t;var u=t.slice(l),c=u.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(t){a=t}}).prototype=new Y,qt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),t.minSegmentPts=void 0===t.minSegmentPts?e.pts:Math.min(t.minSegmentPts,e.pts),t.maxSegmentPts=void 0===t.maxSegmentPts?e.pts:Math.max(t.maxSegmentPts,e.pts)
vendor: 5,463 bytes, line 1
1),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),t.minSegmentDts=void 0===t.minSegmentDts?e.dts:Math.min(t.minSegmentDts,e.dts),t.maxSegmentDts=void 0===t.maxSegmentDts?e.dts:Math.max(t.maxSegmentDts,e.dts))},Gt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},Yt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},(Wt=function(t,e){this.numberOfTracks=0,this.metadataStream=e,this.remuxTracks=void 0===t.remux||!!t.remux,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Wt.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new Y,Wt.prototype.flush=function(t){var e,i,n,r,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,te.forEach((function(t){a.info[t]=this.videoTrack[t]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,Jt.forEach((function(t){a.info[t]=this.audioTrack[t]}),this)),a.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,n=q.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],o),o+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(e=this.pendingCaptions[r]).startTime=e.startPts-s,e.startTime/=9e4,e.endTime=e.endPts-s,e.endTime/=9e4,a.captionStreams[e.stream]=!0,a.captions.push(e);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=i.pts-s,i.cueTime/=9e4,a.metadata.push(i);a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(Ht=function(t){var e,i,n=this,r=!0;Ht.prototype.init.call(this),this.baseMediaDecodeTime=(t=t||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e,e.type="aac",e.metadataStream=new yt.MetadataStream,e.aacStream=new Dt,e.audioTimestampRolloverStream=new yt.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new yt.TimestampRolloverStream("timed-metadata"),e.adtsStream=new xt,e.coalesceStream=new Wt(t,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",(function(t){e.aacStream.setTimestamp(t.timeStamp)})),e.aacStream.on("data",(function(r){"timed-metadata"!==r.type||e.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new zt(i,t),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))})),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new yt.MetadataStream,r.packetStream=new yt.TransportPacketStream,r.parseStream=new yt.TransportParseStream,r.elementaryStream=new yt.ElementaryStream,r.videoTimestampRolloverStream=new yt.TimestampRolloverStream("video"),r.audioTimestampRolloverStream=new yt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new yt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new xt,r.h264Stream=new Qt,r.captionStream=new yt.CaptionStream,r.coalesceStream=new Wt(t,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream),r.elementaryStream.pipe(r.videoTimestampRolloverStream).pipe(r.h264Stream),r.elementaryStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.elementaryStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)e||"video"!==o.tracks[a].type?i||"audio"!==o.tracks[a].type||((i=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(e=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;e&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new
1Ut(e,t),r.videoSegmentStream.on("timelineStartInfo",(function(t){i&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(t){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new zt(i,t),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream))}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var n=this.transmuxPipeline_;this.baseMediaDecodeTime=t,i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Gt(i),i.timelineStartInfo.baseMediaDecodeTime=t,n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),e&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[],n.videoTimestampRolloverStream.discontinuity()),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,Gt(e),n.captionStream.reset(),e.timelineStartInfo.baseMediaDecodeTime=t),n.timedMetadataTimestampRolloverStream&&n.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(r){var e=Vt(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Y;var ee={Transmuxer:Ht,VideoSegmentStream:Ut,AudioSegmentStream:zt,AUDIO_PROPERTIES:Jt,VIDEO_PROPERTIES:te},ie={generator:q,Transmuxer:ee.Transmuxer,AudioSegmentStream:ee.AudioSegmentStream,VideoSegmentStream:ee.VideoSegmentStream},ne=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),re=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e||{},this.init()}return ne(t,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new ie.Transmuxer(this.options),function(t){t.on("data",(function(t){var e=t.initSegment;t.initSegment={data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength};var i=t.data;t.data=i.buffer,W.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])})),t.captionStream&&t.captionStream.on("data",(function(t){W.postMessage({action:"caption",data:t})})),t.on("done",(function(t){W.postMessage({action:"done"})})),t.on("gopInfo",(function(t){W.postMessage({action:"gopInfo",gopInfo:t})}))}(this.transmuxer)}},{key:"push",value:function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(t){this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*(t.timestampOffset||0)))}},{key:"setAudioAppendStart",value:function(t){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*t.appendStart))}},{key:"flush",value:function(t){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]),t}();new function(t){t.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new re(t.data.options):(this.messageHandlers||(this.messageHandlers=new re),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(i)}()})),Ws=function(t){return/mp4a\.\d+.\d+/i.test(t)},Vs=function(t){return/avc1\.[\da-f]+/i.test(t)},qs=function(t){return t.map((function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,(function(t,e,
1i){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)}))}))},Gs=function(t,e,i){if(!e||!t.length)return[];var n=Math.ceil(9e4*(e.currentTime()-i+3)),r=void 0;for(r=0;r<t.length&&!(t[r].pts>n);r++);return t.slice(r)},Ys=function(t){function e(i,n){m(this,e);var r=y(this,t.call(this,yo.EventTarget));r.timestampOffset_=0,r.pendingBuffers_=[],r.bufferUpdating_=!1,r.mediaSource_=i,r.codecs_=n,r.audioCodec_=null,r.videoCodec_=null,r.audioDisabled_=!1,r.appendAudioInitSegment_=!0,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=yo.browser.IE_VERSION>=11;var o={remux:!1,alignGopsAtEnd:r.safeAppend_};return r.codecs_.forEach((function(t){Ws(t)?r.audioCodec_=t:Vs(t)&&(r.videoCodec_=t)})),r.transmuxer_=new Hs,r.transmuxer_.postMessage({action:"init",options:o}),r.transmuxer_.onmessage=function(t){return"data"===t.data.action?r.data_(t):"done"===t.data.action?r.done_(t):"gopInfo"===t.data.action?r.appendGopInfo_(t):void 0},Object.defineProperty(r,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(t){"number"==typeof t&&t>=0&&(this.timestampOffset_=t,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t}))}}),Object.defineProperty(r,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(t){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=t),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=t)}}),Object.defineProperty(r,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(r,"buffered",{get:function(){var t=null,e=null,i=0,n=[],r=[];if(!this.videoBuffer_&&!this.audioBuffer_)return yo.createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return yo.createTimeRange();for(var o=this.videoBuffer_.buffered,a=this.audioBuffer_.buffered,s=o.length;s--;)n.push({time:o.start(s),type:"start"}),n.push({time:o.end(s),type:"end"});for(s=a.length;s--;)n.push({time:a.start(s),type:"start"}),n.push({time:a.end(s),type:"end"});for(n.sort((function(t,e){return t.time-e.time})),s=0;s<n.length;s++)"start"===n[s].type?2==++i&&(t=n[s].time):"end"===n[s].type&&1==--i&&(e=n[s].time),null!==t&&null!==e&&(r.push([t,e]),t=null,e=null);return yo.createTimeRanges(r)}}),r}return v(e,t),e.prototype.data_=function(t){var e=t.data.segment;e.data=new Uint8Array(e.data,t.data.byteOffset,t.data.byteLength),e.initSegment=new Uint8Array(e.initSegment.data,e.initSegment.byteOffset,e.initSegment.byteLength),function(t,e,i){var n=e.player_;if(i.captions&&i.captions.length)for(var r in t.inbandTextTracks_||(t.inbandTextTracks_={}),i.captionStreams)if(!t.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});var o=n.textTracks().getTrackById(r);t.inbandTextTracks_[r]=o||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}i.metadata&&i.metadata.length&&!t.metadataTrack_&&(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,e),this.pendingBuffers_.push(e)},e.prototype.done_=function(t){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0},e.prototype.createRealSourceBuffers_=function(){var t=this,e=["audio","video"];e.forEach((function(i){if(t[i+"Codec_"]&&!t[i+"Buffer_"]){var n=null;t.mediaSource_[i+"Buffer_"]?(n=t.mediaSource_[i+"Buffer_"]).updating=!1:(n=function(t,e){var i=t.addSourceBuffer(e),n=Object.create(null);n.updating=!1,n.realBuffer_=i;var r=function(t){"function"==typeof i[t]?n[t]=function(){return i[t].apply(i,arguments)}:void 0===n[t]&&Object.defineProperty(n,t,{get:function(){return i[t]},set:function(e){return i[t]=e}})};for(var o in i)r(o);return n}(t.mediaSource_.nativeMediaSource_,i+'/mp4;codecs="'+t[i+"Codec_"]+'"'),t.mediaSource_[i+"Buffer_"]=n),t[i+"Buffer_"]=n,["update","updatestart","updateend"].forEach((function(r){n.addEventListener(r,(function(){if("audio"!==i||!t.audioDisabled_)return"updateend"===r&&(t[i+"Buffer_"].updating=!1),e.every((function(e){return!("audio"!==e||!t.audioDisabled_)||i===e||!t[e+"Buffer_"]||!t[e+"Buffer_"].updating}))?t.trigger(r):void 0}))}))}}))},e.prototype.appendBuffer=function(t){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var e=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:e.end(e.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Gs(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})},e.prototype.appendGopInfo_=function(t){this.gopBuffer_=function(t,e,
vendor: 5,382 bytes, line 1
1i){if(!e.length)return t;if(i)return e.slice();for(var n=e[0].pts,r=0;r<t.length&&!(t[r].pts>=n);r++);return t.slice(0,r).concat(e)}(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)},e.prototype.remove=function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=function(t,e,i,n){for(var r=Math.ceil(9e4*(e-n)),o=Math.ceil(9e4*(i-n)),a=t.slice(),s=t.length;s--&&!(t[s].pts<=o););if(-1===s)return a;for(var l=s+1;l--&&!(t[l].pts<=r););return l=Math.max(l,0),a.splice(l,s-l+1),a}(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),Ps(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Ps(t,e,this.inbandTextTracks_[i])},e.prototype.processPendingSegments_=function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce((function(t,e){var i=e.type,n=e.data,r=e.initSegment;return t[i].segments.push(n),t[i].bytes+=n.byteLength,t[i].initSegment=r,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[i].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t}),t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),function(t,e,i){var r=n.WebKitDataCue||n.VTTCue;if(e&&e.forEach((function(t){this.inbandTextTracks_[t.stream].addCue(new r(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))}),t),i){var o=Is(t.mediaSource_.duration);if(i.forEach((function(t){var e=t.cueTime+this.timestampOffset;t.frames.forEach((function(t){var i=new r(e,e,t.value||t.url||t.data||"");i.frame=t,i.value=t,function(t){Object.defineProperties(t.frame,{id:{get:function(){return yo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return yo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return yo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})}(i),this.metadataTrack_.addCue(i)}),this)}),t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var a=t.metadataTrack_.cues,s=[],l=0;l<a.length;l++)a[l]&&s.push(a[l]);var u=s.reduce((function(t,e){var i=t[e.startTime]||[];return i.push(e),t[e.startTime]=i,t}),{}),c=Object.keys(u).sort((function(t,e){return Number(t)-Number(e)}));c.forEach((function(t,e){var i=u[t],n=Number(c[e+1])||o;i.forEach((function(t){t.endTime=n}))}))}}}(this,t.captions,t.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(e=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(t.audio,this.audioBuffer_),this.pendingBuffers_.length=0,e&&this.trigger("updateend"),this.bufferUpdating_=!1},e.prototype.concatAndAppendSegments_=function(t,e){var i=0,n=void 0;if(t.bytes){n=new Uint8Array(t.bytes),t.segments.forEach((function(t){n.set(t,i),i+=t.byteLength}));try{e.updating=!0,e.appendBuffer(n)}catch(r){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:r.message,originalError:r})}}},e.prototype.abort=function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1},e}(yo.EventTarget),Xs=function(t){function e(){m(this,e);var i=y(this,t.call(this)),r=void 0;for(r in i.nativeMediaSource_=new n.MediaSource,i.nativeMediaSource_)r in e.prototype||"function"!=typeof i.nativeMediaSource_[r]||(i[r]=i.nativeMediaSource_[r].bind(i.nativeMediaSource_));return i.duration_=NaN,Object.defineProperty(i,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(t){this.duration_=t,t===1/0||(this.nativeMediaSource_.duration=t)}}),Object.defineProperty(i,"seekable",{get:function(){return this.duration_===1/0?yo.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(i,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(i,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),i.sourceBuffers=[],i.activeSourceBuffers_=[],i.updateActiveSourceBuffers_=function(){if(i.activeSourceBuffers_.length=0,1===i.sourceBuffers.length){var t=i.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void i.activeSourceBuffers_.push(t)}for(var e=!1,n=!0,r=0;r<i.player_.audioTracks().length;r++){var o=i.player_.audioTracks()[r];if(o.enabled&&"main"!==o.kind){e=!0,n=!1;break}}
1i.sourceBuffers.forEach((function(t,r){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=e;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,n=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=r?n:!n,t.audioDisabled_))return;i.activeSourceBuffers_.push(t)}))},i.onPlayerMediachange_=function(){i.sourceBuffers.forEach((function(t){t.appendAudioInitSegment_=!0}))},i.onHlsReset_=function(){i.sourceBuffers.forEach((function(t){t.transmuxer_&&t.transmuxer_.postMessage({action:"resetCaptions"})}))},i.onHlsSegmentTimeMapping_=function(t){i.sourceBuffers.forEach((function(e){return e.timeMapping_=t.mapping}))},["sourceopen","sourceclose","sourceended"].forEach((function(t){this.nativeMediaSource_.addEventListener(t,this.trigger.bind(this))}),i),i.on("sourceopen",(function(t){var e=s.querySelector('[src="'+i.url_+'"]');e&&(i.player_=yo(e.parentNode),i.player_.tech_.on("hls-reset",i.onHlsReset_),i.player_.tech_.on("hls-segment-time-mapping",i.onHlsSegmentTimeMapping_),i.player_.audioTracks&&i.player_.audioTracks()&&(i.player_.audioTracks().on("change",i.updateActiveSourceBuffers_),i.player_.audioTracks().on("addtrack",i.updateActiveSourceBuffers_),i.player_.audioTracks().on("removetrack",i.updateActiveSourceBuffers_)),i.player_.on("mediachange",i.onPlayerMediachange_))})),i.on("sourceended",(function(t){for(var e=Is(i.duration),n=0;n<i.sourceBuffers.length;n++){var r=i.sourceBuffers[n],o=r.metadataTrack_&&r.metadataTrack_.cues;o&&o.length&&(o[o.length-1].endTime=e)}})),i.on("sourceclose",(function(t){this.sourceBuffers.forEach((function(t){t.transmuxer_&&t.transmuxer_.terminate()})),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))})),i}return v(e,t),e.prototype.addSeekableRange_=function(t,e){var i=void 0;if(this.duration!==1/0)throw(i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(e>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)},e.prototype.addSourceBuffer=function(t){var e=void 0,i=function(t){var e={type:"",parameters:{}},i=t.trim().split(";");
1return e.type=i.shift().trim(),i.forEach((function(t){var i=t.trim().split("=");if(i.length>1){var n=i[0].replace(/"/g,"").trim(),r=i[1].replace(/"/g,"").trim();e.parameters[n]=r}})),e}(t);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(n=qs(n)).filter((function(t){return Ws(t)||Vs(t)}))),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),e=new Ys(this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),e.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else e=this.nativeMediaSource_.addSourceBuffer(t);return this.sourceBuffers.push(e),e},e}(yo.EventTarget),$s=0;yo.mediaSources={};var Ks=function(t,e){var i=yo.mediaSources[t];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:e})},Zs=function(){return!!n.MediaSource&&!!n.MediaSource.isTypeSupported&&n.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},Qs=function(){if(this.MediaSource={open:Ks,supportsNativeMediaSources:Zs},Zs())return new Xs;throw new Error("Cannot use create a virtual MediaSource for this video")};Qs.open=Ks,Qs.supportsNativeMediaSources=Zs;var Js={createObjectURL:function(t){var e=void 0;return t instanceof Xs?(e=n.URL.createObjectURL(t.nativeMediaSource_),t.url_=e,e):t instanceof Xs?(e="blob:vjs-media-source/"+$s,$s++,yo.mediaSources[e]=t,e):(e=n.URL.createObjectURL(t),t.url_=e,e)}};yo.MediaSource=Qs,yo.URL=Js;var tl=yo.mergeOptions,el=function(t,e){for(var i=tl(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),n=0;n<e.playlists.length;n++){var r=Xa(i,e.playlists[n]);r&&(i=r)}return Ya(e,(function(t,e,n,r){if(t.playlists&&t.playlists.length){var o=t.playlists[0].uri,a=Xa(i,t.playlists[0]);a&&((i=a).mediaGroups[e][n][r].playlists[0]=i.playlists[o])}})),i},il=function(t){function e(i,r,o,a){m(this,e);var s=y(this,t.call(this));if(s.hls_=r,s.withCredentials=o,!i)throw new Error("A non-empty playlist URL or playlist is required");return s.on("minimumUpdatePeriod",(function(){s.refreshXml_()})),s.on("mediaupdatetimeout",(function(){s.refreshMedia_()})),"string"==typeof i?(s.srcUrl=i,s.state="HAVE_NOTHING",y(s)):(s.masterPlaylistLoader_=a,s.state="HAVE_METADATA",s.started=!0,s.media(i),n.setTimeout((function(){s.trigger("loadedmetadata")}),0),s)}return v(e,t),e.prototype.dispose=function(){this.stopRequest(),n.clearTimeout(this.mediaUpdateTimeout)},e.prototype.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},e.prototype.media=function(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var e=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var i=!this.media_||t.uri!==this.media_.uri;this.state="HAVE_METADATA",i&&(this.media_&&this.trigger("mediachanging"),this.media_=t,this.refreshMedia_(),"HAVE_MASTER"!==e&&this.trigger("mediachange"))},e.prototype.pause=function(){this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1)},e.prototype.load=function(){this.started?this.trigger("loadedplaylist"):this.start()},e.prototype.parseMasterXml=function(){var t,e=(t={manifestUri:this.srcUrl,clientOffset:this.clientOffset_},function(t){var e;if(!t.length)return{};var i=t[0].attributes,n=i.sourceDuration,r=i.minimumUpdatePeriod,o=void 0===r?0:r,a=t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video"===e.contentType})).map(Do),s=t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio"===e.contentType})),l=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),u={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(e={AUDIO:{},VIDEO:{}},e["CLOSED-CAPTIONS"]={},e.SUBTITLES={},e),uri:"",duration:n,playlists:a,minimumUpdatePeriod:1e3*o};return s.length&&(u.mediaGroups.AUDIO.audio=s.reduce((function(t,e){var i=e.attributes.role&&e.attributes.role.value||"main",n=e.attributes.lang||"",r="main";return n&&(r=e.attributes.lang+" ("+i+")"),t[r]&&t[r].playlists[0].attributes.BANDWIDTH>e.attributes.bandwidth||(t[r]={language:n,autoselect:!0,default:"main"===i,playlists:[Oo(e)],uri:""}),t}),{})),l.length&&(u.mediaGroups.SUBTITLES.subs=function(t){return t.reduce((function(t,e){var i,n,r,o,a=e.attributes.lang||"text";return t[a]||(t[a]={language:a,default:!1,autoselect:!1,playlists:[(i=e,r=i.attributes,o=i.segments,void 0===o&&(o=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration),{attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:o,mediaSequence:o.length?o[0].number:1})],uri:""}),t}),{})}(l)),u}(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.manifestUri,n=void 0===i?"":i,r=e.NOW,o=void 0===r?Date.now():r,a=e.clientOffset,s=void 0===a?0:a,l=Zo(t,"Period");
1if(1!==l.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var u=ea(t),c=na([n],Zo(t,"BaseURL"));return u.sourceDuration=u.mediaPresentationDuration||0,u.NOW=o,u.clientOffset=s,zo(l.map(oa(u,c)))}(aa(this.masterXml_),t).map(Ko)));e.uri=this.srcUrl;for(var i=0;i<e.playlists.length;i++){var n="placeholder-uri-"+i;e.playlists[i].uri=n,e.playlists[n]=e.playlists[i]}return Ya(e,(function(t,i,n,r){if(t.playlists&&t.playlists.length){var o="placeholder-uri-"+i+"-"+n+"-"+r;t.playlists[0].uri=o,e.playlists[o]=t.playlists[0]}})),$a(e),Ka(e),e},e.prototype.start=function(){var t=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(e,i){if(t.request){if(t.request=null,e)return t.error={status:i.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=i.responseText,t.masterLoaded_=i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):Date.now(),t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))}}))},e.prototype.syncClientServerClock_=function(t){var e=this,i=function(t){var e=Zo(t,"UTCTiming")[0];if(!e)return null;var i=ea(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i}(aa(this.masterXml_));return null===i?(this.clientOffset_=this.masterLoaded_-Date.now(),t()):"DIRECT"===i.method?(this.clientOffset_=i.value-Date.now(),t()):void(this.request=this.hls_.xhr({uri:Va(this.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},(function(n,r){if(e.request){if(n)return e.clientOffset_=e.masterLoaded_-Date.now(),t();var o;o="HEAD"===i.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):e.masterLoaded_:Date.parse(r.responseText),e.clientOffset_=o-Date.now(),t()}})))},e.prototype.onClientServerClockSync_=function(){var t=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),n.setTimeout((function(){t.trigger("loadedmetadata")}),0),this.master.minimumUpdatePeriod&&n.setTimeout((function(){t.trigger("minimumUpdatePeriod")}),this.master.minimumUpdatePeriod)},e.prototype.refreshXml_=function(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(e,i){if(t.request){if(t.request=null,e)return t.error={status:i.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=i.responseText;var r=t.parseMasterXml();t.master=el(t.master,r),n.setTimeout((function(){t.trigger("minimumUpdatePeriod")}),t.master.minimumUpdatePeriod)}}))},e.prototype.refreshMedia_=function(){var t=this,e=void 0,i=void 0;this.masterPlaylistLoader_?(e=this.masterPlaylistLoader_.master,i=this.masterPlaylistLoader_.parseMasterXml()):(e=this.master,i=this.parseMasterXml());var r=el(e,i);r?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=r:this.master=r,this.media_=r.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=n.setTimeout((function(){t.trigger("mediaupdatetimeout")}),Za(this.media(),!!r))),this.trigger("loadedplaylist")},e}(yo.EventTarget),nl=function(t){return yo.log.debug?yo.log.debug.bind(yo,"VHS:",t+" >"):function(){}};function rl(){}var ol=function(){function t(e,i,n,r){m(this,t),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=e,this.processedAppend_=!1,this.type_=n,this.mimeType_=i,this.logger_=nl("SourceUpdater["+n+"]["+i+"]"),"closed"===e.readyState?e.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,i,r)):this.createSourceBuffer_(i,r)}return t.prototype.createSourceBuffer_=function(t,e){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?e.on("sourcebufferadded",(function(){i.start_()}
1)):this.start_()},t.prototype.start_=function(){var t=this;this.started_=!0,this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null,t.logger_("buffered ["+As(t.buffered())+"]"),e&&e(),t.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()},t.prototype.abort=function(t){var e=this;this.processedAppend_&&this.queueCallback_((function(){e.sourceBuffer_.abort()}),t)},t.prototype.appendBuffer=function(t,e){var i=this;this.processedAppend_=!0,this.queueCallback_((function(){i.sourceBuffer_.appendBuffer(t)}),e)},t.prototype.buffered=function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:yo.createTimeRanges()},t.prototype.remove=function(t,e){var i=this;this.processedAppend_&&this.queueCallback_((function(){i.logger_("remove ["+t+" => "+e+"]"),i.sourceBuffer_.remove(t,e)}),rl)},t.prototype.updating=function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_},t.prototype.timestampOffset=function(t){var e=this;return void 0!==t&&(this.queueCallback_((function(){e.sourceBuffer_.timestampOffset=t})),this.timestampOffset_=t),this.timestampOffset_},t.prototype.queueCallback_=function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()},t.prototype.runCallback_=function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())},t.prototype.dispose=function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()},t}(),al={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},sl=function(t){var e,i={};return t.byterange&&(i.Range="bytes="+(e=t.byterange).offset+"-"+(e.offset+e.length-1)),i},ll=function(t){t.forEach((function(t){t.abort()}))},ul=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:-101,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:-102,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:2,xhr:e}:null},cl={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},dl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e={codecCount:0},i=void 0;return e.codecCount=t.split(",").length,e.codecCount=e.codecCount||2,(i=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t))&&(e.videoCodec=i[2],e.videoObjectTypeIndicator=i[3]),e.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t),e.audioProfile=e.audioProfile&&e.audioProfile[2],e},hl=function(t,e,i){return t+"/"+e+'; codecs="'+i.filter((function(t){return!!t})).join(", ")+'"'},pl=function(t,e){var i;return t&&(i=n.getComputedStyle(t))?i[e]:""},fl=function(t,e){var i=t.slice();t.sort((function(t,n){var r=e(t,n);return 0===r?i.indexOf(t)-i.indexOf(n):r}))},gl=function(t,e){var i=void 0,r=void 0;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),(i=i||n.Number.MAX_VALUE)-(r||n.Number.MAX_VALUE)},ml=function(t,e,i){return!(!t||!e)&&t.endList&&"open"===e.readyState&&i===t.segments.length},vl=function(t){return"number"==typeof t&&isFinite(t)},yl=function(t){function e(i){m(this,e);var n=y(this,t.call(this));if(!i)throw new TypeError("Initialization settings are required");if("function"!=typeof i.currentTime)throw new TypeError("No currentTime getter specified");if(!i.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=i.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.hasPlayed_=i.hasPlayed,n.currentTime_=i.currentTime,n.seekable_=i.seekable,n.seeking_=i.seeking,n.duration_=i.duration,n.mediaSource_=i.mediaSource,n.hls_=i.hls,n.loaderType_=i.loaderType,n.startingMedia_=void 0,n.segmentMetadataTrack_=i.segmentMetadataTrack,n.goalBufferLength_=i.goalBufferLength,n.sourceType_=i.sourceType,n.state_="INIT",n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.mimeType_=null,n.sourceUpdater_=null,n.xhrOptions_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.decrypter_=i.decrypter,n.syncController_=i.syncController,n.syncPoint_={segmentIndex:0,time:0},n.syncController_.on("syncinfoupdate",(function(){return n.trigger("syncinfoupdate")})),n.mediaSource_.addEventListener("sourceopen",(function(){return n.ended_=!1})),n.fetchAtBuffer_=!1,n.logger_=nl("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(n,"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t)}}),n}return v(e,t),e.prototype.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},e.prototype.dispose=function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()},e.prototype.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},e.prototype.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null},e.prototype.error=function(t){return void 0!==t&&(this.error_=t),this.pendingSegment_=null,this.error_},e.prototype.endOfStream=function(){this.ended_=!0,this.pause(),this.trigger("ended")},e.prototype.buffered_=function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():yo.createTimeRanges()},e.prototype.initSegment=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var i=ws(t),n=this.initSegments_[i];return e&&!n&&t.bytes&&(this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes}),n||t},e.prototype.couldBeginLoading_=function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()},e.prototype.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},e.prototype.init_=function(){return this.state="READY",this.sourceUpdater_=new ol(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()},e.prototype.playlist=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,this.hasPlayed_()||(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var r=i?i.id:null;
1if(this.logger_("playlist update ["+r+" => "+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===t.uri){var o=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),n&&(n.mediaIndex-=o,n.mediaIndex>=0&&(n.segment=t.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,t)}else null!==this.mediaIndex&&this.resyncLoader()}},e.prototype.pause=function(){this.checkBufferTimeout_&&(n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},e.prototype.paused=function(){return null===this.checkBufferTimeout_},e.prototype.mimeType=function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())},e.prototype.resetEverything=function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")},e.prototype.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},e.prototype.resyncLoader=function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()},e.prototype.remove=function(t,e){this.sourceUpdater_&&this.sourceUpdater_.remove(t,e),Ps(t,e,this.segmentMetadataTrack_)},e.prototype.monitorBuffer_=function(){this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),1)},e.prototype.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),500)},e.prototype.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);t&&(ml(this.playlist_,this.mediaSource_,t.mediaIndex)?this.endOfStream():(t.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),t.timestampOffset=t.startOfSegment),this.loadSegment_(t)))}},e.prototype.checkBuffer_=function(t,e,i,n,r,o){var a=0,s=void 0;t.length&&(a=t.end(t.length-1));var l=Math.max(0,a-r);if(!e.segments.length)return null;if(l>=this.goalBufferLength_())return null;if(!n&&l>=1)return null;if(null===o)return i=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,i,null,!0);if(null!==i){var u=e.segments[i];return this.generateSegmentInfo_(e,i+1,s=u&&u.end?u.end:a,!1)}if(this.fetchAtBuffer_){var c=fs.getMediaInfoForTime(e,a,o.segmentIndex,o.time);i=c.mediaIndex,s=c.startTime}else{var d=fs.getMediaInfoForTime(e,r,o.segmentIndex,o.time);i=d.mediaIndex,s=d.startTime}return this.generateSegmentInfo_(e,i,s,!1)},e.prototype.getSyncSegmentCandidate_=function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map((function(t,e){return{timeline:t.timeline,segmentIndex:e}})).filter((function(t){return t.timeline===e.currentTimeline_}));return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)},e.prototype.generateSegmentInfo_=function(t,e,i,n){if(e<0||e>=t.segments.length)return null;var r=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:e,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}},e.prototype.abortRequestEarly_=function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),i=t.bandwidth,n=this.pendingSegment_.duration,r=fs.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived),o=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=t.length?t.end(t.length-1):0;return(n-e)/i}(this.buffered_(),e,this.hls_.tech_.playbackRate())-1;if(r<=o)return!1;var a=function(t){var e=t.currentTime,i=t.bandwidth,n=t.duration,r=t.segmentDuration,o=t.timeUntilRebuffer,a=t.currentTimeline,s=t.syncController,l=t.master.playlists.filter((function(t){return!fs.isIncompatible(t)})),u=l.filter(fs.isEnabled);u.length||(u=l.filter((function(t){return!fs.isDisabled(t)})));var c=u.filter(fs.hasAttribute.bind(null,"BANDWIDTH")).map((function(t){var l=s.getSyncPoint(t,n,a,e)?1:2;return{playlist:t,rebufferingImpact:fs.estimateSegmentRequestTime(r,i,t)*l-o}})),d=c.filter((function(t){return t.rebufferingImpact<=0}));return fl(d,(function(t,e){return gl(e.playlist,t.playlist)})),d.length?d[0]:(fl(c,(function(t,e){return t.rebufferingImpact-e.rebufferingImpact})),c[0]||null)}({master:this.hls_.playlists.master,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=.5;return o<=1/30&&(s=1),!(!a.playlist||a.playlist.uri===this.playlist_.uri||r-o-a.rebufferingImpact<s||(this.bandwidth=a.playlist.attributes.BANDWIDTH*al.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),0))}},e.prototype.handleProgress_=function(t,e){this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(e.stats)&&this.trigger("progress")},e.prototype.loadSegment_=function(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),t.abortRequests=function(t,e,
vendor: 4,754 bytes, line 1
1i,n,r,o){var a=[],s=function(t,e,i){var n=[],r=0;return function(o,a){if(o&&(ll(t),n.push(o)),(r+=1)===t.length){if(a.endOfAllRequests=Date.now(),n.length>0){var s=function(t){return t.reduce((function(t,e){return e.code>t.code?e:t}))}(n);return i(s,a)}return a.encryptedBytes?function(t,e,i){t.addEventListener("message",(function n(r){if(r.data.source===e.requestId){t.removeEventListener("message",n);var o=r.data.decrypted;return e.bytes=new Uint8Array(o.bytes,o.byteOffset,o.byteLength),i(null,e)}})),t.postMessage(Ts({source:e.requestId,encrypted:e.encryptedBytes,key:e.key.bytes,iv:e.key.iv}),[e.encryptedBytes.buffer,e.key.bytes.buffer])}(e,a,i):i(null,a)}}}(a,i,o);if(n.key){var l=t(yo.mergeOptions(e,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),function(t,e){return function(i,n){var r=n.response,o=ul(i,n);if(o)return e(o,t);if(16!==r.byteLength)return e({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:2,xhr:n},t);var a=new DataView(r);return t.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),e(null,t)}}(n,s));a.push(l)}if(n.map&&!n.map.bytes){var u=t(yo.mergeOptions(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:sl(n.map)}),function(t,e){return function(i,n){var r=n.response,o=ul(i,n);return o?e(o,t):0===r.byteLength?e({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:2,xhr:n},t):(t.map.bytes=new Uint8Array(n.response),e(null,t))}}(n,s));a.push(u)}var c=t(yo.mergeOptions(e,{uri:n.resolvedUri,responseType:"arraybuffer",headers:sl(n)}),function(t,e){return function(i,n){var r=n.response,o=ul(i,n);return o?e(o,t):0===r.byteLength?e({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:2,xhr:n},t):(t.stats=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}}(n),t.key?t.encryptedBytes=new Uint8Array(n.response):t.bytes=new Uint8Array(n.response),e(null,t))}}(n,s));return c.addEventListener("progress",function(t,e){return function(i){var n,r,o;return t.stats=yo.mergeOptions(t.stats,(r=(n=i).target,(o={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-r.requestTime||0}).bytesReceived=n.loaded,o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3),o)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(i,t)}}(n,r)),a.push(c),function(){return ll(a)}}(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))},e.prototype.trimBackBuffer_=function(t){var e=function(t,e,i){var n;return n=t.length&&t.start(0)>0&&t.start(0)<e?t.start(0):e-30,Math.min(n,e-i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);e>0&&this.remove(0,e)},e.prototype.createSimplifiedSegmentObj_=function(t){var e=t.segment,i={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId};if(e.key){var n=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key={resolvedUri:e.key.resolvedUri,iv:n}}return e.map&&(i.map=this.initSegment(e.map)),i},e.prototype.segmentRequestFinished_=function(t,e){if(this.mediaRequests+=1,e.stats&&(this.mediaBytesTransferred+=e.stats.bytesReceived,this.mediaTransferDuration+=e.stats.roundTripTime),this.pendingSegment_){if(e.requestId===this.pendingSegment_.requestId){if(t)return this.pendingSegment_=null,this.state="READY",-102===t.code?void(this.mediaRequestsAborted+=1):(this.pause(),-101===t.code?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error")));this.bandwidth=e.stats.bandwidth,this.roundTrip=e.stats.roundTripTime,e.map&&(e.map=this.initSegment(e.map,!0)),this.processSegmentResponse_(e)}}else this.mediaRequestsAborted+=1},e.prototype.processSegmentResponse_=function(t){var e=this.pendingSegment_;e.bytes=t.bytes,t.map&&(e.segment.map.bytes=t.map.bytes),e.endOfAllRequests=t.endOfAllRequests,this.handleSegment_()},e.prototype.handleSegment_=function(){var t=this;if(this.pendingSegment_){var e=this.pendingSegment_,i=e.segment,n=this.syncController_.probeSegmentInfo(e);void 0===this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var r,o,a=(r=this.startingMedia_,o=n,"main"===this.loaderType_&&r&&o?o.containsAudio||o.containsVideo?r.containsVideo&&!o.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!r.containsVideo&&o.containsVideo?"Video foun
1d in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null);if(a)return this.error({message:a,blacklistDuration:1/0}),void this.trigger("error");if(e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==e.timestampOffset&&e.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(e.timestampOffset),this.trigger("timestampoffset"));var s=this.syncController_.mappingForTimeline(e.timeline);if(null!==s&&this.trigger({type:"segmenttimemapping",mapping:s}),this.state="APPENDING",i.map){var l=ws(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==l){var u=this.initSegment(i.map);this.sourceUpdater_.appendBuffer(u.bytes,(function(){t.activeInitSegmentId_=l}))}}e.byteLength=e.bytes.byteLength,this.mediaSecondsLoaded+="number"==typeof i.start&&"number"==typeof i.end?i.end-i.start:i.duration,this.logger_(function(t){var e=t.segment,i=t.playlist,n=i.mediaSequence,r=i.segments;return["appending ["+t.mediaIndex+"] of ["+n+", "+(n+(void 0===r?[]:r).length)+"] from playlist ["+i.id+"]","["+e.start+" => "+e.end+"] in timeline ["+t.timeline+"]"].join(" ")}(e)),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"},e.prototype.handleUpdateEnd_=function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,i=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),ml(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())},e.prototype.recordThroughput_=function(t){var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-e)/++this.throughput.count},e.prototype.addSegmentMetadataCue_=function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,r=e.end;if(vl(i)&&vl(r)){Ps(i,r,this.segmentMetadataTrack_);var o={bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:r},a=new(n.WebKitDataCue||n.VTTCue)(i,r,JSON.stringify(o));a.value=o,this.segmentMetadataTrack_.addCue(a)}}},e}(yo.EventTarget),_l=new Uint8Array("\n\n".split("").map((function(t){return t.charCodeAt(0)}))),bl=function(t){return String.fromCharCode.apply(null,t)},Tl=function(t){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m(this,e);var r=y(this,t.call(this,i,n));return r.mediaSource_=null,r.subtitlesTrack_=null,r}return v(e,t),e.prototype.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return yo.createTimeRanges();var t=this.subtitlesTrack_.cues;return yo.createTimeRanges([[t[0].startTime,t[t.length-1].startTime]])},e.prototype.initSegment=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var i=ws(t),n=this.initSegments_[i];if(e&&!n&&t.bytes){var r=_l.byteLength+t.bytes.byteLength,o=new Uint8Array(r);o.set(t.bytes),o.set(_l,t.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:o}}return n||t},e.prototype.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},e.prototype.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},e.prototype.track=function(t){return void 0===t||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},e.prototype.remove=function(t,e){Ps(t,e,this.subtitlesTrack_)},e.prototype.fillBuffer_=function(){var t=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline))return this.syncController_.one("timestampoffset",(function(){t.state="READY",t.paused()||t.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(e)}},e.prototype.skipEmptySegments_=function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t},e.prototype.handleSegment_=function(){var t=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var e=this.pendingSegment_,i=e.segment;if("function"!=typeof n.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var r=function(){t.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",(function(){t.subt
1itlesTrack_.tech_.off("vttjsloaded",r),t.error({message:"Error loading vtt.js"}),t.state="READY",t.pause(),t.trigger("error")}))}i.requested=!0;try{this.parseVTTCues_(e)}catch(Kl){return this.error({message:Kl.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(e,this.syncController_.timelines[e.timeline],this.playlist_),e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");e.byteLength=e.bytes.byteLength,this.mediaSecondsLoaded+=i.duration,e.cues.length&&this.remove(e.cues[0].endTime,e.cues[e.cues.length-1].endTime),e.cues.forEach((function(e){t.subtitlesTrack_.addCue(e)})),this.handleUpdateEnd_()}else this.state="READY"},e.prototype.parseVTTCues_=function(t){var e=void 0,i=!1;"function"==typeof n.TextDecoder?e=new n.TextDecoder("utf8"):(e=n.WebVTT.StringDecoder(),i=!0);var r=new n.WebVTT.Parser(n,n.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=function(e){return t.timestampmap=e},r.onparsingerror=function(t){yo.log.warn("Error encountered when parsing cues: "+t.message)},t.segment.map){var o=t.segment.map.bytes;i&&(o=bl(o)),r.parse(o)}var a=t.bytes;i&&(a=bl(a)),r.parse(a),r.flush()},e.prototype.updateTimeMapping_=function(t,e,i){var n=t.segment;if(e)if(t.cues.length){var r=t.timestampmap,o=r.MPEGTS/9e4-r.LOCAL+e.mapping;t.cues.forEach((function(t){t.startTime+=o,t.endTime+=o})),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(t.cues[0].startTime,t.cues[t.cues.length-1].startTime-n.duration)})}else n.empty=!0},e}(yl),wl=function(t,e){for(var i=t.cues,n=0;n<i.length;n++){var r=i[n];if(e>=r.adStartTime&&e<=r.adEndTime)return r}return null},xl=[{name:"VOD",run:function(t,e,i,n,r){return i!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(t,e,i,n,r){if(!t.datetimeToDisplayTime)return null;var o=e.segments||[],a=null,s=null;r=r||0;for(var l=0;l<o.length;l++){var u=o[l];if(u.dateTimeObject){var c=u.dateTimeObject.getTime()/1e3+t.datetimeToDisplayTime,d=Math.abs(r-c);if(null!==s&&s<d)break;s=d,a={time:c,segmentIndex:l}}}return a}},{name:"Segment",run:function(t,e,i,n,r){var o=e.segments||[],a=null,s=null;r=r||0;for(var l=0;l<o.length;l++){var u=o[l];if(u.timeline===n&&void 0!==u.start){var c=Math.abs(r-u.start);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:u.start,segmentIndex:l})}}return a}},{name:"Discontinuity",run:function(t,e,i,n,r){var o=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var a=null,s=0;s<e.discontinuityStarts.length;s++){var l=e.discontinuityStarts[s],u=t.discontinuities[e.discontinuitySequence+s+1];if(u){var c=Math.abs(r-u.time);if(null!==a&&a<c)break;(!o||null===a||a>=c)&&(a=c,o={time:u.time,segmentIndex:l})}}return o}},{name:"Playlist",run:function(t,e,i,n,r){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],Sl=function(t){function e(){m(this,e);var i=y(this,t.call(this));return i.inspectCache_=void 0,i.timelines=[],i.discontinuities=[],i.datetimeToDisplayTime=null,i.logger_=nl("SyncController"),i}return v(e,t),e.prototype.getSyncPoint=function(t,e,i,n){var r=this.runStrategies_(t,e,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null},e.prototype.getExpiredTime=function(t,e){if(!t||!t.segments)return null;var i=this.runStrategies_(t,e,t.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+is(t,n.segmentIndex,0))},e.prototype.runStrategies_=function(t,e,i,n){for(var r=[],o=0;o<xl.length;o++){var a=xl[o],s=a.run(this,t,e,i,n);s&&(s.strategy=a.name,r.push({strategy:a.name,syncPoint:s}))}return r},e.prototype.selectSyncPoint_=function(t,e){for(var i=t[0].syncPoint,n=Math.abs(t[0].syncPoint[e.key]-e.value),r=t[0].strategy,o=1;o<t.length;o++){var a=Math.abs(t[o].syncPoint[e.key]-e.value);a<n&&(n=a,i=t[o].syncPoint,r=t[o].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i},e.prototype.saveExpiredSegmentInfo=function(t,e){for(var i=e.mediaSequence-t.mediaSequence-1;i>=0;i--){var n=t.segments[i];if(n&&void 0!==n.start){e.syncInfo={mediaSequence:t.mediaSequence+i,time:n.start}
1,this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},e.prototype.setDateTimeMapping=function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}},e.prototype.reset=function(){this.inspectCache_=void 0},e.prototype.probeSegmentInfo=function(t){var e,i=t.segment,n=t.playlist;return(e=i.map?this.probeMp4Segment_(t):this.probeTsSegment_(t))&&this.calculateSegmentTimeMapping_(t,e)&&(this.saveDiscontinuitySyncInfo_(t),n.syncInfo||(n.syncInfo={mediaSequence:n.mediaSequence+t.mediaIndex,time:i.start})),e},e.prototype.probeMp4Segment_=function(t){var e=t.segment,i=function(t,e){var i,n,r;return i=To(e,["moof","traf"]),n=[].concat.apply([],i.map((function(e){return To(e,["tfhd"]).map((function(i){var n,r;return n=ua(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),r=t[n]||9e4,(To(e,["tfdt"]).map((function(t){var e,i;return e=t[0],i=ua(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=ua(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i}))[0]||1/0)/r}))}))),r=Math.min.apply(null,n),isFinite(r)?r:0}(To(e.map.bytes,["moov","trak"]).reduce((function(t,e){var i,n,r,o;return(i=To(e,["tkhd"])[0])?(r=ua(i[n=0===i[0]?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(o=To(e,["mdia","mdhd"])[0])?(t[r]=ua(o[n=0===o[0]?12:20]<<24|o[n+1]<<16|o[n+2]<<8|o[n+3]),t):null):null}),{}),t.bytes);return null!==t.timestampOffset&&(t.timestampOffset-=i),{start:i,end:i+e.duration}},e.prototype.probeTsSegment_=function(t){var e=function(t,e){var i,n;return(n=(i=t)[0]==="I".charCodeAt(0)&&i[1]==="D".charCodeAt(0)&&i[2]==="3".charCodeAt(0)?function(t){for(var e,i=!1,n=0,r=null,o=null,a=0,s=0;t.length-s>=3;){switch(La.aac.parseType(t,s)){case"timed-metadata":if(t.length-s<10){i=!0;break}if((a=La.aac.parseId3TagSize(t,s))>t.length){i=!0;break}null===o&&(e=t.subarray(s,s+a),o=La.aac.parseAacTimestamp(e)),s+=a;break;case"audio":if(t.length-s<7){i=!0;break}if((a=La.aac.parseAdtsSize(t,s))>t.length){i=!0;break}null===r&&(e=t.subarray(s,s+a),r=La.aac.parseSampleRate(e)),n++,s+=a;break;default:s++}if(i)return null}if(null===r||null===o)return null;var l=9e4/r;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*n*l,pts:o+1024*n*l}]}}(t):function(t){var e={pid:null,table:null},i={};for(var n in function(t,e){for(var i,n=0,r=188;r<t.byteLength;)if(71!==t[n]||71!==t[r])n++,r++;else{switch(i=t.subarray(n,r),La.ts.parseType(i,e.pid)){case"pat":e.pid||(e.pid=La.ts.parsePat(i));break;case"pmt":e.table||(e.table=La.ts.parsePmt(i))}if(e.pid&&e.table)return;n+=188,r+=188}}(t,e),e.table)if(e.table.hasOwnProperty(n))switch(e.table[n]){case _a.H264_STREAM_TYPE:i.video=[],Da(t,e,i),0===i.video.length&&delete i.video;break;case _a.ADTS_STREAM_TYPE:i.audio=[],Oa(t,e,i),0===i.audio.length&&delete i.audio}return i}(t))&&(n.audio||n.video)?(function(t,e){if(t.audio&&t.audio.length){var i=e;void 0===i&&(i=t.audio[0].dts),t.audio.forEach((function(t){t.dts=Ia(t.dts,i),t.pts=Ia(t.pts,i),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4}))}if(t.video&&t.video.length){var n=e;if(void 0===n&&(n=t.video[0].dts),t.video.forEach((function(t){t.dts=Ia(t.dts,n),t.pts=Ia(t.pts,n),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4})),t.firstKeyFrame){var r=t.firstKeyFrame;r.dts=Ia(r.dts,n),r.pts=Ia(r.pts,n),r.dtsTime=r.dts/9e4,r.ptsTime=r.dts/9e4}}}(n,e),n):null}(t.bytes,this.inspectCache_),i=void 0,n=void 0;return e?(e.video&&2===e.video.length?(this.inspectCache_=e.video[1].dts,i=e.video[0].dtsTime,n=e.video[1].dtsTime):e.audio&&2===e.audio.length&&(this.inspectCache_=e.audio[1].dts,i=e.audio[0].dtsTime,n=e.audio[1].dtsTime),{start:i,end:n,containsVideo:e.video&&2===e.video.length,containsAudio:e.audio&&2===e.audio.length}):null},e.prototype.timestampOffsetForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].time},e.prototype.mappingForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].mapping},e.prototype.calculateSegmentTimeMapping_=function(t,e){var i=t.segment,n=this.timelines[t.timeline];if(null!==t.timestampOffset)this.timelines[t.timeline]=n={time:t.startOfSegment,mapping:t.startOfSegment-e.start},this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+n.time+"] [mapping: "+n.mapping+"]"),i.start=t.startOfSegment,i.end=e.end+n.mapping;else{if(!n)return!1;i.start=e.start+n.mapping,i.end=e.end+n.mapping}return!0},e.prototype.saveDiscontinuitySyncInfo_=function(t){var e=t.playlist,i=t.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var n=0;n<e.discontinuityStarts.length;n++){var r,o=e.discontinuityStarts[n],a=e.discontinuitySequence+n+1,s=o-t.mediaIndex,l=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>l)r=s<0?i.start-is(e,t.mediaIndex,o):i.end+is(e,t.mediaIndex+1,o),this.discontinuities[a]={time:r,accuracy:l}}},e}(yo.EventTarget),kl=new Bs("./decrypter-worker.worker.js",(function(t,e){var i=this;!function(){var e=void 0!==t?t:"undefined"!=typeof global?global:void 0!==i?i:{},n=void 0!==t?t:void 0!==e?e:void 0!==i?i:{},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
vendor: 9,471 bytes, line 1
1return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),a=null,s=function(){function t(e){r(this,t),a||(a=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],r=i[4],o=void 0,a=void 0,s=void 0,l=[],u=[],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0;for(o=0;o<256;o++)u[(l[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!n[a];a^=c||1,s=u[s]||1)for(n[a]=h=(h=s^s<<1^s<<2^s<<3^s<<4)>>8^255&h^99,r[h]=a,f=16843009*l[d=l[c=l[a]]]^65537*d^257*c^16843008*a,p=257*l[h]^16843008*h,o=0;o<4;o++)e[o][a]=p=p<<24^p>>>8,i[o][h]=f=f<<24^f>>>8;for(o=0;o<5;o++)e[o]=e[o].slice(0),i[o]=i[o].slice(0);return t}()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];var i=void 0,n=void 0,o=void 0,s=void 0,l=void 0,u=this._tables[0][4],c=this._tables[1],d=e.length,h=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(s=e.slice(0),this._key=[s,l=[]],i=d;i<4*d+28;i++)o=s[i-1],(i%d==0||8===d&&i%d==4)&&(o=u[o>>>24]<<24^u[o>>16&255]<<16^u[o>>8&255]<<8^u[255&o],i%d==0&&(o=o<<8^o>>>24^h<<24,h=h<<1^283*(h>>7))),s[i]=s[i-d]^o;for(n=0;i;n++,i--)o=s[3&n?i:i-4],l[n]=i<=4||n<4?o:c[0][u[o>>>24]]^c[1][u[o>>16&255]]^c[2][u[o>>8&255]]^c[3][u[255&o]]}return t.prototype.decrypt=function(t,e,i,n,r,o){var a=this._key[1],s=t^a[0],l=n^a[1],u=i^a[2],c=e^a[3],d=void 0,h=void 0,p=void 0,f=a.length/4-2,g=void 0,m=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(g=0;g<f;g++)d=y[s>>>24]^_[l>>16&255]^b[u>>8&255]^T[255&c]^a[m],h=y[l>>>24]^_[u>>16&255]^b[c>>8&255]^T[255&s]^a[m+1],p=y[u>>>24]^_[c>>16&255]^b[s>>8&255]^T[255&l]^a[m+2],c=y[c>>>24]^_[s>>16&255]^b[l>>8&255]^T[255&u]^a[m+3],m+=4,s=d,l=h,u=p;for(g=0;g<4;g++)r[(3&-g)+o]=w[s>>>24]<<24^w[l>>16&255]<<16^w[u>>8&255]<<8^w[255&c]^a[m++],d=s,s=l,l=u,u=c,c=d},t}(),l=function(){function t(){r(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),i>-1},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}(),u=function(t){function e(){r(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e?t:e}(this,t.call(this,l));return i.jobs=[],i.delay=1,i.timeout_=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":g(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)}(e,t),e.prototype.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},e.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(l),c=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},d=function(){function t(e,i,n,o){r(this,t);var a=t.STEP,s=new Int32Array(e.buffer),l=new Uint8Array(e.byteLength),d=0;for(this.asyncStream_=new u,this.asyncStream_.push(this.decryptChunk_(s.subarray(d,d+a),i,n,l)),d=a;d<s.length;d+=a)n=new Uint32Array([c(s[d-4]),c(s[d-3]),c(s[d-2]),c(s[d-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(d,d+a),i,n,l));this.asyncStream_.push((function(){var t;o(null,(t=l).subarray(0,t.byteLength-t[t.byteLength-1]))}))}return t.prototype.decryptChunk_=function(t,e,i,n){return function(){var r=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),r=new s(Array.prototype.slice.call(e)),o=new Uint8Array(t.byteLength),a=new Int32Array(o.buffer),l=void 0,u=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0,m=void 0,v=void 0;for(l=i[0],u=i[1],d=i[2],h=i[3],v=0;v<n.length;v+=4)p=c(n[v]),f=c(n[v+1]),g=c(n[v+2]),m=c(n[v+3]),r.decrypt(p,f,g,m,a,v),a[v]=c(a[v]^l),a[v+1]=c(a[v+1]^u),a[v+2]=c(a[v+2]^d),a[v+3]=c(a[v+3]^h),l=p,u=f,d=g,h=m;return o}(t,e,i);n.set(r,t.byteOffset)}},o(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}();new function(t){t.onmessage=function(t){var e=t.data,i=new Uint8Array(e.encrypted.bytes,e.encrypted.byteOffset,e.encrypted.byteLength),r=new Uint32Array(e.key.bytes,e.key.byteOffset,e.key.byteLength/4),o=new Uint32Array(e.iv.bytes,e.iv.byteOffset,e.iv.byteLength/4);new d(i,r,o,(function(t,i){var r,o;n.postMessage((r={source:e.source,decrypted:i},o={},Object.keys(r).forEach((function(t){var e=r[t];o[t]=ArrayBuffer.isView(e)?{bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:e})),o),[i.buffer])}))}}(i)}()})),Cl=function(t){var e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},El=function(t,e){t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Al=function(t,e){e.activePlaylistLoader=t,t.load()},Ml={AUDIO:function(t,e){return function(){var i=e.mediaTypes[t],n=e.blacklistCurrentPlaylist;El(e.segmentLoaders[t],i);var r=i.activeTrack(),o=i.activeGroup(),a=(o.filter((function(t){return t.default}))[0]||o[0]).id,s=i.tracks[a];if(r!==s){for(var l in yo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[l].enabled=i.tracks[l]===s;i.onTrackChanged()}else n({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(t,e){return function(){var i=e.segmentLoaders[t],n=e.mediaTypes[t];yo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),El(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}},Pl={AUDIO:function(t,e,i){if(e){var n=i.tech,r=i.requestOptions,o=i.segmentLoaders[t];e.on("loadedmetadata",(function(){var t=e.media();o.playlist(t,r),(!n.paused()||t.endList&&"none"!==n.preload())&&o.load()})),e.on("loadedplaylist",(function(){o.playlist(e.media(),r),n.paused()||o.load()})),e.on("error",Ml[t](t,i))}},SUBTITLES:function(t,e,i){var n=i.tech,r=i.requestOptions,o=i.segmentLoaders[t],a=i.mediaTypes[t];e.on("loadedmetadata",(function(){var t=e.media();o.playlist(t,r),o.track(a.activeTrack()),(!n.paused()||t.endList&&"none"!==n.preload())&&o.load()})),e.on("loadedplaylist",(function(){o.playlist(e.media(),r),n.paused()||o.load()})),e.on("error",Ml[t](t,i))}},Il=function(t,e){return function(i){return i.attributes[t]===e}},Ll=function(t){return function(e){return e.resolvedUri===t}},Ol={AUDIO:function(t,e){var i=e.hls,n=e.sourceType,r=e.segmentLoaders[t],o=e.requestOptions.withCredentials,a=e.master,s=a.mediaGroups,l=a.playlists,u=e.mediaTypes[t],c=u.groups,d=u.tracks,h=e.masterPlaylistLoader;for(var p in s[t]&&0!==Object.keys(s[t]).length||(s[t]={main:{default:{default:!0}}}),s[t]){c[p]||(c[p]=[]);var f=l.filter(Il(t,p));for(var g in s[t][p]){var m,v=s[t][p][g];if(f.filter(Ll(v.resolvedUri)).length&&delete v.resolvedUri,m=v.resolvedUri?new Qa(v.resolvedUri,i,o):v.playlists&&"dash"===n?new il(v.playlists[0],i,o,h):null,v=yo.mergeOptions({id:g,playlistLoader:m},v),Pl[t](t,v.playlistLoader,e),c[p].push(v),void 0===d[g]){var y=new yo.AudioTrack({id:g,kind:Cl(v),enabled:!1,language:v.language,default:v.default,label:g});d[g]=y}}}r.on("error",Ml[t](t,e))},SUBTITLES:function(t,e){var i=e.tech,n=e.hls,r=e.sourceType,o=e.segmentLoaders[t],a=e.requestOptions.withCredentials,s=e.master.mediaGroups,l=e.mediaTypes[t],u=l.groups,c=l.tracks,d=e.masterPlaylistLoader;for(var h in s[t])for(var p in u[h]||(u[h]=[]),s[t][h])if(!s[t][h][p].forced){var f=s[t][h][p],g=void 0;if("hls"===r?g=new Qa(f.resolvedUri,n,a):"dash"===r&&(g=new il(f.playlists[0],n,a,d)),f=yo.mergeOptions({id:p,playlistLoader:g},f),Pl[t](t,f.playlistLoader,e),u[h].push(f),void 0===c[p]){var m=i.addRemoteTextTrack({id:p,kind:"subtitles",enabled:!1,language:f.language,label:p},!1).track;c[p]=m}}o.on("error",Ml[t](t,e))},"CLOSED-CAPTIONS":function(t,e){var i=e.tech,n=e.master.mediaGroups,r=e.mediaTypes[t],o=r.groups,a=r.tracks;for(var s in n[t])for(var l in o[s]||(o[s]=[]),n[t][s]){var u=n[t][s][l];if(u.instreamId.match(/CC\d/)&&(o[s].push(yo.mergeOptions({id:l},u)),void 0===a[l])){var c=i.addRemoteTextTrack({id:u.instreamId,kind:"captions",enabled:!1,language:u.language,label:l},!1).track;a[l]=c}}}},Dl={AUDIO:function(t,e){return function(){var i=e.mediaTypes[t].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(t,e){return function(){var i=e.mediaTypes[t].tracks;for(var n in i)if("showing"===i[n].mode)return i[n];return null}}},Rl=void 0,Nl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Bl=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},Fl=function(t){function e(i){m(this,e);var n,r=y(this,t.call(this)),o=i.url,a=i.withCredentials,s=i.tech,l=i.bandwidth,u=i.externHls,c=i.useCueTags,d=i.blackl
1istDuration,h=i.enableLowInitialPlaylist,p=i.sourceType;if(!o)throw new Error("A non-empty playlist URL is required");Rl=u,r.withCredentials=a,r.tech_=s,r.hls_=s.hls,r.sourceType_=p,r.useCueTags_=c,r.blacklistDuration=d,r.enableLowInitialPlaylist=h,r.useCueTags_&&(r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues"),r.cueTagsTrack_.inBandMetadataTrackDispatchType=""),r.requestOptions_={withCredentials:r.withCredentials,timeout:null},r.mediaTypes_=(n={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:rl,activeTrack:rl,onGroupChanged:rl,onTrackChanged:rl}})),n),r.mediaSource=new yo.MediaSource,r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_.bind(r)),r.seekable_=yo.createTimeRanges(),r.hasPlayed_=function(){return!1},r.syncController_=new Sl(i),r.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,r.decrypter_=new kl;var f={hls:r.hls_,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function(){return r.seekable()},seeking:function(){return r.tech_.seeking()},duration:function(){return r.mediaSource.duration},hasPlayed:function(){return r.hasPlayed_()},goalBufferLength:function(){return r.goalBufferLength()},bandwidth:l,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_};return r.masterPlaylistLoader_="dash"===r.sourceType_?new il(o,r.hls_,r.withCredentials):new Qa(o,r.hls_,r.withCredentials),r.setupMasterPlaylistLoaderListeners_(),r.mainSegmentLoader_=new yl(yo.mergeOptions(f,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),i),r.audioSegmentLoader_=new yl(yo.mergeOptions(f,{loaderType:"audio"}),i),r.subtitleSegmentLoader_=new Tl(yo.mergeOptions(f,{loaderType:"vtt"}),i),r.setupSegmentLoaderListeners_(),Nl.forEach((function(t){r[t+"_"]=Bl.bind(r,t)})),r.logger_=nl("MPC"),r.masterPlaylistLoader_.load(),r}return v(e,t),e.prototype.setupMasterPlaylistLoaderListeners_=function(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var e=t.masterPlaylistLoader_.media(),i=1.5*t.masterPlaylistLoader_.targetDuration*1e3;t.requestOptions_.timeout=ps(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?0:i,e.endList&&"none"!==t.tech_.preload()&&(t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load()),function(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){Ol[e](e,t)}));var e=t.mediaTypes,i=t.masterPlaylistLoader,n=t.tech,r=t.hls;["AUDIO","SUBTITLES"].forEach((function(i){e[i].activeGroup=function(t,e){return function(i){var n=e.mediaTypes[t].groups,r=e.masterPlaylistLoader.media();if(!r)return null;var o=null;return r.attributes[t]&&(o=n[r.attributes[t]]),o=o||n.main,void 0===i?o:null===i?null:o.filter((function(t){return t.id===i.id}))[0]||null}}(i,t),e[i].activeTrack=Dl[i](i,t),e[i].onGroupChanged=function(t,e){return function(){var i=e.segmentLoaders,n=i[t],r=i.main,o=e.mediaTypes[t],a=o.activeTrack(),s=o.activeGroup(a),l=o.activePlaylistLoader;El(n,o),s&&(s.playlistLoader?(n.resyncLoader(),Al(s.playlistLoader,o)):l&&r.resetEverything())}}(i,t),e[i].onTrackChanged=function(t,e){return function(){var i=e.segmentLoaders,n=i[t],r=i.main,o=e.mediaTypes[t],a=o.activeTrack(),s=o.activeGroup(a),l=o.activePlaylistLoader;El(n,o),s&&(s.playlistLoader?l!==s.playlistLoader?(n.track&&n.track(a),n.resetEverything(),Al(s.playlistLoader,o)):Al(s.playlistLoader,o):r.resetEverything())}}(i,t)}));var o=e.AUDIO.activeGroup(),a=(o.filter((function(t){return t.default}))[0]||o[0]).id;e.AUDIO.tracks[a].enabled=!0,e.AUDIO.onTrackChanged(),i.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(t){return e[t].onGroupChanged()}))}));var s=function(){e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};for(var l in n.audioTracks().addEventListener("change",s),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),r.on("dispose",(function(){n.audioTracks().removeEventListener("change",s),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)})),n.clearTracks("audio"),e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[l])}({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,hls:t.hls_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)}),t.triggerPresenceUsage_(t.master(),e);try{t.setupSourceBuffers_()}catch(Kl){return yo.log.warn("Failed to create SourceBuffers",Kl),t.mediaSource.endOfStream("decode")}t.setupFirstPlay(),t.trigger("selectedinitialmedia")})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var e=t.masterPlaylistLoader_.media();if(!e){t.excludeUnsupportedVariants_();var i=void 0;return t.enableLowInitialPlaylist&&(i=t.selectInitialPlaylist()),i||(i=t.selectPlaylist()),t.initialMedia_=i,void t.masterPlaylistLoader_.media(t.initialMedia_)}if(t.useCueTags_&&t.updateAdCues_(e),t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.updateDuration(),t.tech_.paused()||t.mainSegmentLoader_.load(),!e.endList){var n=function(){var e=t.seekable();0!==e.length&&t.mediaSource.addSeekableRange_(e.start(0),e.end(0))};t.duration()!==1/0?t.tech_.one("durationchange",(function e(){t.duration()===1/0?n():t.tech_.one("durationchange",e)})):n()}})),this.masterPlaylistLoader_.on("error",(function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){t.mainSegmentLoader_.abort(),t.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var e=t.masterPlaylistLoader_.media(),i=1.5*t.masterPlaylistLoader_.targetDuration*1e3;t.requestOptions_.timeout=ps(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?0:i,t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load(),t.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var e=t.masterPlaylistLoader_.media();t.stuckAtPlaylistEnd_(e)&&(t.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),t.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},e.prototype.triggerPresenceUsage_=function(t,e){var i=t.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var o in i.AUDIO)for(var a in i.AUDIO[o])i.AUDIO[o][a].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),Rl.Playlist.isAes(e)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),Rl.Playlist.isFmp4(e)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})},e.prototype.setupSegmentLoaderListeners_=function(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){var e=t.selectPlaylist(),i=t.masterPlaylistLoader_.media(),n=t.tech_.buffered(),r=n.length?n.end(n.length-1)-t.tech_.currentTime():0,o=t.bufferLowWaterLine();(!i.endList||t.duration()<al.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<i.attributes.BANDWIDTH||r>=o)&&t.masterPlaylistLoader_.media(e),t.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){t.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}
1)),this.mainSegmentLoader_.on("syncinfoupdate",(function(){t.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){t.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("ended",(function(){t.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(){t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)})),this.mainSegmentLoader_.on("reseteverything",(function(){t.tech_.trigger("hls-reset")})),this.mainSegmentLoader_.on("segmenttimemapping",(function(e){t.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})})),this.audioSegmentLoader_.on("ended",(function(){t.onEndOfStream()}))},e.prototype.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},e.prototype.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},e.prototype.fastQualityChange_=function(){var t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetLoader())},e.prototype.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0)?this.tech_.setCurrentTime(t.end(t.length-1)):void 0}},e.prototype.setupFirstPlay=function(){var t=this,e=this.masterPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_())return!1;if(!e.endList){var i=this.seekable();if(!i.length)return!1;if(yo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){t.trigger("firstplay"),t.tech_.setCurrentTime(i.end(0)),t.hasPlayed_=function(){return!0}})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0},e.prototype.handleSourceOpen_=function(){try{this.setupSourceBuffers_()}catch(Kl){return yo.log.warn("Failed to create Source Buffers",Kl),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))}this.trigger("sourceopen")},e.prototype.onEndOfStream=function(){var t=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),t&&this.mediaSource.endOfStream()},e.prototype.stuckAtPlaylistEnd_=function(t){if(!this.seekable().length)return!1;var e=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null===e)return!1;var i=Rl.Playlist.playlistEnd(t,e),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=.1;var o=r.end(r.length-1);return o-n<=.1&&i-o<=.1},e.prototype.blacklistCurrentPlaylist=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],i=void 0,n=void 0;if(i=t.playlist||this.masterPlaylistLoader_.media(),e=e||t.blacklistDuration||this.blackl
vendor: 4,568 bytes, line 1
1istDuration,!i){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(Kl){return this.trigger("error")}}var r=1===this.masterPlaylistLoader_.master.playlists.filter(ds).length;return r?(yo.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(r)):(i.excludeUntil=Date.now()+1e3*e,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),n=this.selectPlaylist(),yo.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(n))},e.prototype.pauseLoading=function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()},e.prototype.setCurrentTime=function(t){var e=Cs(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?e&&e.length?t:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},e.prototype.duration=function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:Rl.Playlist.duration(this.masterPlaylistLoader_.media()):0},e.prototype.seekable=function(){return this.seekable_},e.prototype.onSyncInfoUpdate_=function(){var t=void 0,e=void 0;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==n&&0!==(t=Rl.Playlist.seekable(i,n)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(i,this.mediaSource.duration)))return;if(0===(e=Rl.Playlist.seekable(i,n)).length)return}this.seekable_=e?e.start(0)>t.end(0)||t.start(0)>e.end(0)?t:yo.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)<t.end(0)?e.end(0):t.end(0)]]):t,this.logger_("seekable updated ["+As(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}},e.prototype.updateDuration=function(){var t=this,e=this.mediaSource.duration,i=Rl.Playlist.duration(this.masterPlaylistLoader_.media()),n=this.tech_.buffered(),r=function e(){t.mediaSource.duration=i,t.tech_.trigger("durationchange"),t.mediaSource.removeEventListener("sourceopen",e)};n.length>0&&(i=Math.max(i,n.end(n.length-1))),e!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())},e.prototype.dispose=function(){var t=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(e){var i=t.mediaTypes_[e].groups;for(var n in i)i[n].forEach((function(t){t.playlistLoader&&t.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()},e.prototype.master=function(){return this.masterPlaylistLoader_.master},e.prototype.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},e.prototype.setupSourceBuffers_=function(){var t,e=this.masterPlaylistLoader_.media();if(e&&"open"===this.mediaSource.readyState){if((t=function(t,e){var i=function(t){return t.segments&&t.segments.length&&t.segments[0].map?"mp4":"mp2t"}(e),n=function(t){var e=t.attributes||{};return e.CODECS?dl(e.CODECS):cl}(e),r=e.attributes||{},o=!0,a=!1;if(!e)return[];if(t.mediaGroups.AUDIO&&r.AUDIO){var s=t.mediaGroups.AUDIO[r.AUDIO];if(s)for(var l in a=!0,o=!1,s)if(!s[l].uri&&!s[l].playlists){o=!0;break}}a&&!n.audioProfile&&(o||(n.audioProfile=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var i=t.mediaGroups.AUDIO[e];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return dl(r.playlists[0].attributes.CODECS).audioProfile}return null}(t,r.AUDIO)),n.audioProfile||(yo.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),n.audioProfile=cl.audioProfile));var u={};n.videoCodec&&(u.video=""+n.videoCodec+n.videoObjectTypeIndicator),n.audioProfile&&(u.audio="mp4a.40."+n.audioProfile);
1var c=hl("audio",i,[u.audio]),d=hl("video",i,[u.video]),h=hl("video",i,[u.video,u.audio]);return a?!o&&u.video?[d,c]:o||u.video?[h,c]:[c,c]:u.video?[h]:[c]}(this.masterPlaylistLoader_.master,e)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(t),this.excludeIncompatibleVariants_(e)}},e.prototype.configureLoaderMimeTypes_=function(t){var e=t.length>1&&-1===t[0].indexOf(",")&&t[0]!==t[1]?new yo.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],e),t[1]&&this.audioSegmentLoader_.mimeType(t[1],e)},e.prototype.excludeUnsupportedVariants_=function(){this.master().playlists.forEach((function(t){var e;t.attributes.CODECS&&n.MediaSource&&n.MediaSource.isTypeSupported&&!n.MediaSource.isTypeSupported('video/mp4; codecs="'+(e=t.attributes.CODECS,e.replace(/avc1\.(\d+)\.(\d+)/i,(function(t){return qs([t])[0]}))+'"'))&&(t.excludeUntil=1/0)}))},e.prototype.excludeIncompatibleVariants_=function(t){var e=2,i=null,n=void 0;t.attributes.CODECS&&(n=dl(t.attributes.CODECS),i=n.videoCodec,e=n.codecCount),this.master().playlists.forEac
1h((function(t){var n={codecCount:2,videoCodec:null};t.attributes.CODECS&&(n=dl(t.attributes.CODECS)),n.codecCount!==e&&(t.excludeUntil=1/0),n.videoCodec!==i&&(t.excludeUntil=1/0)}))},e.prototype.updateAdCues_=function(t){var e=0,i=this.seekable();i.length&&(e=i.start(0)),function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.segments)for(var r=i,o=void 0,a=0;a<t.segments.length;a++){var s=t.segments[a];if(o||(o=wl(e,r+s.duration/2)),o){if("cueIn"in s){o.endTime=r,o.adEndTime=r,r+=s.duration,o=null;continue}if(r<o.endTime){r+=s.duration;continue}o.endTime+=s.duration}else if("cueOut"in s&&((o=new n.VTTCue(r,r+s.duration,s.cueOut)).adStartTime=r,o.adEndTime=r+parseFloat(s.cueOut),e.addCue(o)),"cueOutCont"in s){var l=void 0,u=void 0,c=s.cueOutCont.split("/").map(parseFloat);l=c[0],u=c[1],(o=new n.VTTCue(r,r+s.duration,"")).adStartTime=r-l,o.adEndTime=o.adStartTime+u,e.addCue(o)}r+=s.duration}}(t,this.cueTagsTrack_,e)},e.prototype.goalBufferLength=function(){var t=this.tech_.currentTime(),e=al.GOAL_BUFFER_LENGTH,i=al.GOAL_BUFFER_LENGTH_RATE,n=Math.max(e,al.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*i,n)},e.prototype.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),e=al.BUFFER_LOW_WATER_LINE,i=al.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(e,al.MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*i,n)},e}(yo.EventTarget),jl=function t(e,i,n){m(this,t);var r,o,a,s=e.masterPlaylistController_.fastQualityChange_.bind(e.masterPlaylistController_);if(i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=i.attributes.BANDWIDTH,this.id=n,this.enabled=(r=e.playlists,o=i.uri,a=s,function(t){var e=r.master.playlists[o],i=cs(e),n=ds(e);return void 0===t?n:(t?delete e.disabled:e.disabled=!0,t===n||i||(a(),r.trigger(t?"renditionenabled":"renditiondisabled")),t)})},Ul=["seeking","seeked","pause","playing","error"],zl=function(){function t(e){var i=this;m(this,t),this.tech_=e.tech,this.seekable=e.seekable,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=nl("PlaybackWatcher"),this.logger_("initialize");var r=function(){return i.monitorCurrentTime_()},o=function(){return i.techWaiting_()},a=function(){return i.cancelTimer_()},s=function(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",s),this.tech_.on("waiting",o),this.tech_.on(Ul,a),this.tech_.on("canplay",r),this.dispose=function(){i.logger_("dispose"),i.tech_.off("seekablechanged",s),i.tech_.off("waiting",o),i.tech_.off(Ul,a),i.tech_.off("canplay",r),i.checkCurrentTimeTimeout_&&n.clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}return t.prototype.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&n.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=n.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.prototype.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+.1>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}},t.prototype.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.prototype.fixesBadSeeks_=function(){var t=this.tech_.seeking(),e=this.seekable(),i=this.tech_.currentTime(),n=void 0;return t&&this.afterSeekableWindow_(e,i)&&(n=e.end(e.length-1)),t&&this.beforeSeekableWindow_(e,i)&&(n=e.start(0)+.1),void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+As(e)+". Seeking to "+n+"."),this.tech_.setCurrentTime(n),!0)},t.prototype.waiting_=function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=Cs(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.prototype.techWaiting_=function(){var t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;
1if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=Es(n,e);if(this.videoUnderflow_(r,n,e))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){var o=r.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+o+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,e),!0}return!1},t.prototype.afterSeekableWindow_=function(t,e){return!!t.length&&e>t.end(t.length-1)+.1},t.prototype.beforeSeekableWindow_=function(t,e){return!!(t.length&&t.start(0)>0&&e<t.start(0)-.1)},t.prototype.videoUnderflow_=function(t,e,i){if(0===t.length){var n=this.gapFromVideoUnderflow_(e,i);if(n)return this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+i),!0}return!1},t.prototype.skipTheGap_=function(t){var e=this.tech_.buffered(),i=this.tech_.currentTime(),n=Es(e,i);this.cancelTimer_(),0!==n.length&&i===t&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.prototype.gapFromVideoUnderflow_=function(t,e){for(var i=function(t){if(t.length<2)return yo.createTimeRanges();for(var e=[],i=1;i<t.length;i++){var n=t.end(i-1),r=t.start(i);e.push([n,r])}return yo.createTimeRanges(e)}(t),n=0;n<i.length;n++){var r=i.start(n),o=i.end(n);if(e-r<4&&e-r>2)return{start:r,end:o}}return null},t}(),Hl={errorInterval:30,getSource:function(t){return t(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Wl=function(t){!function t(e,i){var n=0,r=0,o=yo.mergeOptions(Hl,i);e.ready((function(){e.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&e.currentTime(r)},s=function(t){null!=t&&(r=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",a),e.src(t),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},l=function(){if(Date.now()-n<1e3*o.errorInterval)e.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(o.getSource&&"function"==typeof o.getSource)return n=Date.now(),o.getSource.call(e,s);yo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},u=function t(){e.off("loadedmetadata",a),e.off("error",l),e.off("dispose",t)};e.on("error",l),e.on("dispose",u),e.reloadSourceOnError=function(i){u(),t(e,i)}}(this,t)},Vl={PlaylistLoader:Qa,Playlist:fs,Decrypter:Wa,AsyncStream:Ua,decrypt:Ha,utils:Ss,STANDARD_PLAYLIST_SELECTOR:function(){return function(t,e,i,r){var o=t.playlists.map((function(t){return{bandwidth:t.attributes.BANDWIDTH||n.Number.MAX_VALUE,width:t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,height:t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,playlist:t}}));fl(o,(function(t,e){return t.bandwidth-e.bandwidth}));var a=(o=o.filter((function(t){return!fs.isIncompatible(t.playlist)}))).filter((function(t){return fs.isEnabled(t.playlist)}));a.length||(a=o.filter((function(t){return!fs.isDisabled(t.playlist)})));var s=a.filter((function(t){return t.bandwidth*al.BANDWIDTH_VARIANCE<e})),l=s[s.length-1],u=s.filter((function(t){return t.bandwidth===l.bandwidth}))[0],c=s.filter((function(t){return t.width&&t.height}));fl(c,(function(t,e){return t.width-e.width}));var d=c.filter((function(t){return t.width===i&&t.height===r}));l=d[d.length-1];var h=d.filter((function(t){return t.bandwidth===l.bandwidth}))[0],p=void 0,f=void 0,g=void 0;h||(f=(p=c.filter((function(t){return t.width>i||t.height>r}))).filter((function(t){return t.width===p[0].width&&t.height===p[0].height})),l=f[f.length-1],g=f.filter((function(t){return t.bandwidth===l.bandwidth}))[0]);var m=g||h||u||a[0]||o[0];return m?m.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(pl(this.tech_.el(),"width"),10),parseInt(pl(this.tech_.el(),"height"),10))},INITIAL_PLAYLIST_SELECTOR:function(){var t=this.playlists.master.playlists.filter(fs.isEnabled);return fl(t,(function(t,e){return gl(t,e)})),t.filter((function(t){return dl(t.attributes.CODECS).videoCodec}))[0]||null},comparePlaylistBandwidth:gl,comparePlaylistResolution:function(t,e){var i=void 0,r=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),(i=i||n.Number.MAX_VALUE)===(r=r||n.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-r},xhr:vs()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach((function(t){Object.defineProperty(Vl,t,{get:function(){return yo.log.warn("using Hls."+t+" is UNSAFE be sure you know
1what you are doing"),al[t]},set:function(e){yo.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?yo.log.warn("value of Hls."+t+" must be greater than or equal to 0"):al[t]=e}})}));var ql,Gl=function(t){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t)?"hls":/^application\/dash\+xml/i.test(t)?"dash":null},Yl=function(t,e){for(var i=e.media(),n=-1,r=0;r<t.length;r++)if(t[r].id===i.uri){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})};Vl.canPlaySource=function(){return yo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},Vl.supportsNativeHls=(ql=s.createElement("video"),!!yo.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(ql.canPlayType(t))}))),Vl.supportsNativeDash=!!yo.getTech("Html5").isSupported()&&/maybe|probably/i.test(s.createElement("video").canPlayType("application/dash+xml")),Vl.supportsTypeNatively=function(t){return"hls"===t?Vl.supportsNativeHls:"dash"===t&&Vl.supportsNativeDash},Vl.isSupported=function(){return yo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Xl=function(t){function e(i,n,r){m(this,e);var o=y(this,t.call(this,n,r.hls));if(n.options_&&n.options_.playerId){var a=yo(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return yo.log.warn("player.hls is deprecated. Use player.tech_.hls instead."),n.trigger({type:"usage",name:"hls-player-access"}),o}}),a.vhs=o,a.dash=o}if(o.tech_=n,o.source_=i,o.stats={},o.ignoreNextSeekingEvent_=!1,o.setOptions_(),o.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return o.on(s,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(t){var e=s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement;e&&e.contains(o.tech_.el())&&o.masterPlaylistController_.fastQualityChange_()})),o.on(o.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),o.on(o.tech_,"error",(function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),o.on(o.tech_,"play",o.play),o}return v(e,t),e.prototype.setOptions_=function(){var t=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&41943
104===this.options_.bandwidth,["withCredentials","bandwidth"].forEach((function(e){void 0!==t.source_[e]&&(t.options_[e]=t.source_[e])})),this.bandwidth=this.options_.bandwidth},e.prototype.src=function(t,e){var i=this;t&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Vl,this.options_.sourceType=Gl(e),this.masterPlaylistController_=new Fl(this.options_),this.playbackWatcher_=new zl(yo.mergeOptions(this.options_,{seekable:function(){return i.seekable()}})),this.masterPlaylistController_.on("error",(function(){yo.players[i.tech_.options_.playerId].error(i.masterPlaylistController_.error)})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Vl.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Vl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){yo.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Ms(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Ms(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,e;e=(t=i).playlists,t.representations=function(){return e.master.playlists.filter((function(t){return!cs(t)})).map((function(e,i){return new jl(t,e,e.uri)}))},function(t){if("dash"===t.options_.sourceType){var e=yo.players[t.tech_.options_.playerId];if(e.eme){var i=function(t,e,i){if(!t)return t;var n={};for(var r in t)n[r]={audioContentType:'audio/mp4; codecs="'+i.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+e.attributes.CODECS+'"'},e.contentProtection&&e.contentProtection[r]&&e.contentProtection[r].pssh&&(n[r].pssh=e.contentProtection[r].pssh),"string"==typeof t[r]&&(n[r].url=t[r]);return yo.mergeOptions(t,n)}(t.source_.keySystems,t.playlists.media(),t.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());i&&(e.currentSource().keySystems=i)}}}(i)})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.tech_.ready((function(){return i.setupQualityLevels_()})),this.tech_.el()&&this.tech_.src(yo.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))},e.prototype.setupQualityLevels_=function(){var t=this,e=yo.players[this.tech_.options_.playerId];
1e&&e.qualityLevels&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,i;e=t.qualityLevels_,(i=t).representations().forEach((function(t){e.addQualityLevel(t)})),Yl(e,i.playlists)})),this.playlists.on("mediachange",(function(){Yl(t.qualityLevels_,t.playlists)})))},e.prototype.play=function(){this.masterPlaylistController_.play()},e.prototype.setCurrentTime=function(t){this.masterPlaylistController_.setCurrentTime(t)},e.prototype.duration=function(){return this.masterPlaylistController_.duration()},e.prototype.seekable=function(){return this.masterPlaylistController_.seekable()},e.prototype.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),t.prototype.dispose.call(this)},e}(yo.getComponent("Component")),$l={name:"videojs-http-streaming",VERSION:"1.0.0",canHandleSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=yo.mergeOptions(yo.options,e);return $l.canPlayType(t.type,i)},handleSource:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=yo.mergeOptions(yo.options,i);return e.hls=new Xl(t,e,n),e.hls.xhr=vs(),e.hls.src(t.src,t.type),e.hls},canPlayType:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=yo.mergeOptions(yo.options,e),n=i.hls.overrideNative,r=Gl(t),o=r&&(!Vl.supportsTypeNatively(r)||n);return o?"maybe":""}};return void 0!==yo.MediaSource&&void 0!==yo.URL||(yo.MediaSource=Qs,yo.URL=Js),Qs.supportsNativeMediaSources()&&yo.getTech("Html5").registerSourceHandler($l,0),yo.HlsHandler=Xl,yo.HlsSourceHandler=$l,yo.Hls=Vl,yo.use||yo.registerComponent("Hls",Vl),yo.options.hls=yo.options.hls||{},yo.registerPlugin?yo.registerPlugin("reloadSourceOnError",Wl):yo.plugin("reloadSourceOnError",Wl),yo})),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).videojsQualityselector=t()}((function(){return function t(e,i,n){function r(a,s){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};e[a][0].call(c.exports,(function(t){return r(e[a][1][t]||t)}),c,c.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(t,e,i){(function(t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),r=function(t){return t&&t.__esModule?t:{default:t}}("undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null),o=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.player=e,this.sources=[],this.callback=void 0,this.containerDropdownElement=void 0,this.defaults={}}return n(t,[{key:"onQualitySelect",value:function(t){var e=this;if(this.callback&&this.callback(t),this.sources){var i=this.sources.find((function(e){return e.format===t.code}));i&&(this.player.src({src:i.src,type:i.type}),this.player.on("loadedmetadata",(function(){e.player.play(),Array.from(e.containerDropdownElement.firstChild.childNodes).forEach((function(e){e.dataset.code===t.code?e.setAttribute("class","current"):e.removeAttribute("class")}))})));var n=document.getElementById(this.player.id_).getElementsByClassName("vjs-brand-quality-link");n&&n.length>0&&(n[0].innerText=t.name)}this.onToggleDropdown()}},{key:"onToggleDropdown",value:function(){if(-1===this.containerDropdownElement.className.indexOf("show"))this.containerDropdownElement.className+=" show";else{var t=this.containerDropdownElement.className.replace(" show","");this.containerDropdownElement.className=t}}},{key:"onPlayerReady",value:function(t){var e=this;this.containerDropdownElement=document.createElement("div"),this.containerDropdownElement.className="vjs-quality-dropdown";var i=document.createElement("div");i.className="vjs-quality-container";var n=document.createElement("button");n.className="vjs-brand-quality-link",n.onclick=function(t){return e.onToggleDropdown(t)},n.innerText=t.text||"Quality";var r=document.createElement("ul");t.formats||(t.formats=[{code:"auto",name:"Auto"}]),t.onFormatSelected&&(this.callback=t.onFormatSelected),t.sources&&(this.sources=t.sources),t.formats.map((function(t){var i=document.createElement("li");i.dataset.code=t.code;var n=document.createElement("a");n.innerText=t.name,n.setAttribute("href","#"),n.addEventListener("click",(function(i){i.preventDefault(),e.onQualitySelect(t)})),i.appendChild(n),r.appendChild(i)})),this.containerDropdownElement.appendChild(r),i.appendChild(this.containerDropdownElement),i.appendChild(n);var o=this.player.controlBar.fullscreenToggle.el();this.player.controlBar.el().insertBefore(i,o),this.player.addClass("vjs-qualityselector")}}]),t}(),a=function(t){var e=this;this.ready((function(){var i=new o(e);i.onPlayerReady(r.default.mergeOptions(i.defaults,t))}))};(r.default.registerPlugin||r.default.plugin)("qualityselector",a),a.VERSION="0.0.4",i.default=a,e.exports=i.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})),function(t,e){"function"==typeof define&&define.amd?define(["video.js"],e):"undefined"!=typeof exports?e(require("video.js")):(e(t.videojs),t.videojsMarkers={})}(this,(function(t){"use strict";function e(t){var e;try{e=t.getBoundingClientRect()}catch(t){e={top:0,bottom:0,left:0,width:0,height:0,right:0}}return e}var i=function(t){return t&&t.__esModule?t:{default:t}}(t),n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r={markerStyle:{width:"7px","border-radius":"30%","background-color":"red"},markerTip:{display:!0,text:function(t){return"Break: "+t.text},time:function(t){return t.time}},breakOverlay:{display:!1,displayTime:3,text:function(t){return"Break overlay: "+t.overlayText},style:{width:"100%",height:"20%","background-color":"rgba(0,0,0,0.7)",color:"white","font-size":"17px"}},onMarkerClick:function(t){},onMarkerReached:function(t,e){},markers:[]},o=-1;i.default.registerPlugin("markers",(function(t){function a(){m.sort((function(t,e){return f.markerTip.time(t)-f.markerTip.time(e)}))}function s(t){t.forEach((function(t){t.key=function(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)}))}(),y.el().querySelector(".vjs-progress-holder").appendChild(function(t){var n=i.default.createEl("div",{},{"data-marker-key":t.key,"data-marker-time":f.markerTip.time(t)});return u(t,n),n.addEventListener("click",(function(e){var i=!1;if("function"==typeof f.onMarkerClick&&(i=!1===f.onMarkerClick(t)),!i){var n=this.getAttribute("data-marker-key");y.currentTime(f.markerTip.time(g[n]))}})),f.markerTip.display&&function(t){t.addEventListener("mouseover",(function(){var i=g[t.getAttribute("data-marker-key")];if(_){_.querySelector(".vjs-tip-inner").innerText=f.markerTip.text(i),_.style.left=l(i)+"%";var n=e(_),r=e(t);_.style.marginLeft=-parseFloat(n.width/2)+parseFloat(r.width/4)+"px",_.style.visibility="visible"}})),t.addEventListener("mouseout",(function(){_&&(_.style.visibility="hidden")}))}(n),n}(t)),g[t.key]=t,m.push(t)})),a()}function l(t){return f.markerTip.time(t)/y.duration()*100}
1function u(t,i){i.className="vjs-marker "+(t.class||""),Object.keys(f.markerStyle).forEach((function(t){i.style[t]=f.markerStyle[t]}));var n=t.time/y.duration();if((n<0||n>1)&&(i.style.display="none"),i.style.left=l(t)+"%",t.duration)i.style.width=t.duration/y.duration()*100+"%",i.style.marginLeft="0px";else{var r=e(i);i.style.marginLeft=r.width/2+"px"}}function c(t){b&&(T=o,b.style.visibility="hidden"),v=o;var e=[];t.forEach((function(t){var i=m[t];if(i){delete g[i.key],e.push(t);var n=y.el().querySelector(".vjs-marker[data-marker-key='"+i.key+"']");n&&n.parentNode.removeChild(n)}})),e.reverse(),e.forEach((function(t){m.splice(t,1)})),a()}function d(){if(f.breakOverlay.display&&!(v<0)){var t=y.currentTime(),e=m[v],i=f.markerTip.time(e);t>=i&&t<=i+f.breakOverlay.displayTime?(T!==v&&(T=v,b&&(b.querySelector(".vjs-break-overlay-text").innerHTML=f.breakOverlay.text(e))),b&&(b.style.visibility="visible")):(T=o,b&&(b.style.visibility="hidden"))}}function h(){(function(){if(m.length){var e=function(t){return t<m.length-1?f.markerTip.time(m[t+1]):y.duration()},i=y.currentTime(),n=o;if(v!==o){var r=e(v);if(i>=f.markerTip.time(m[v])&&i<r)return;if(v===m.length-1&&i===y.duration())return}if(i<f.markerTip.time(m[0]))n=o;else for(var a=0;a<m.length;a++)if(r=e(a),i>=f.markerTip.time(m[a])&&i<r){n=a;break}n!==v&&(n!==o&&t.onMarkerReached&&t.onMarkerReached(m[n],n),v=n)}})(),d(),t.onTimeUpdateAfterMarkerUpdate&&t.onTimeUpdateAfterMarkerUpdate()}if(!i.default.mergeOptions){var p=function(t){return!!t&&"object"===(void 0===t?"undefined":n(t))&&"[object Object]"===toString.call(t)&&t.constructor===Object};i.default.mergeOptions=function t(e,i){var n={};return[e,i].forEach((function(e){e&&Object.keys(e).forEach((function(i){var r=e[i];p(r)?(p(n[i])||(n[i]={}),n[i]=t(n[i],r)):n[i]=r}))})),n}}i.default.createEl||(i.default.createEl=function(t,e,n){var r=i.default.Player.prototype.createEl(t,e);return n&&Object.keys(n).forEach((function(t){r.setAttribute(t,n[t])})),r});var f=i.default.mergeOptions(r,t),g={},m=[],v=o,y=this,_=null,b=null,T=o;y.on("loadedmetadata",(function(){f.markerTip.display&&(_=i.default.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),y.el().querySelector(".vjs-progress-holder").appendChild(_)),y.markers.removeAll(),s(f.markers),f.breakOverlay.display&&(b=i.default.createEl("div",{className:"vjs-break-overlay",innerHTML:"<div class='vjs-break-overlay-text'></div>"}),Object.keys(f.breakOverlay.style).forEach((function(t){b&&(b.style[t]=f.breakOverlay.style[t])})),y.el().appendChild(b),T=o),h(),y.on("timeupdate",h),y.off("loadedmetadata")})),y.markers={getMarkers:function(){return m},next:function(){for(var t=y.currentTime(),e=0;e<m.length;e++){var i=f.markerTip.time(m[e]);if(i>t){y.currentTime(i);break}}},prev:function(){for(var t=y.currentTime(),e=m.length-1;e>=0;e--){var i=f.markerTip.time(m[e]);if(i+.5<t)return void y.currentTime(i)}},add:function(t){s(t)},remove:function(t){c(t)},removeAll:function(){for(var t=[],e=0;e<m.length;e++)t.push(e);c(t)},updateTime:function(t){!function(t){m.forEach((function(e){var i=y.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),n=f.markerTip.time(e);(t||i.getAttribute("data-marker-time")!==n)&&(u(e,i),i.setAttribute("data-marker-time",n))})),a()}(t)},reset:function(t){y.markers.removeAll(),s(t)},destroy:function(){y.markers.removeAll(),b&&b.remove(),_&&_.remove(),y.off("timeupdate",d),delete y.markers}}}))})),function(){function t(t,e){var i,n,r;return t=parseFloat(t),e=parseFloat(e),t>=8e5&&e>=8e5?t:(i=3.141593*(e+.001528)/180,r=836694.05+6381480.5*(n=3.141593*(t-.002444-114.178556)/180)*Math.cos(i)+6381480.5*Math.pow(n,3)/6*Math.pow(Math.cos(i),3)*(1.00340256-Math.pow(Math.tan(i),2)),Math.round(r))}function e(t,e){var i,n,r,o;return t=parseFloat(t),e=parseFloat(e),t>=8e5&&e>=8e5?e:(i=3.141593*(e+.001528)/180,n=3.141593*(t-.002444-114.178556)/180,o=6378388*((1-(r=.006722670022)/4-3*Math.pow(r,2)/64)*i-3*(r+Math.pow(r,2)/4)/8*Math.sin(2*i)+15*Math.pow(r,2)/256*Math.sin(4*i))-2468395.723+819069.8+6381480.5*Math.sin(i)*Math.pow(n,2)/2*Math.cos(i),Math.round(o))}function i(i,n){this.lng=t(i,n),this.lat=e(i,n)}function n(t,e){this.x=t,this.y=e}function r(t,e){this.width=t,this.height=e}function o(t,e,i){this._config={map:t,centerPoint:e,center:e,size:i,sw:null,ne:null};var r,o=new n(0,0),a=new n(0,0);r=t.pointToPixel(e),o.x=r.x-i.width/2,o.y=r.y-i.height/2,a.x=r.x+i.width/2,a.y=r.y+i.height/2,this._config.sw=t.pixelToPoint(o),this._config.ne=t.pixelToPoint(a)}function a(t){var e,i,n={duration:1e3,fps:30,delay:0,transition:j.linear};if(t)for(e in t)n[e]=t[e];this._opts=n,n.delay?(i=this,setTimeout((function(){i._beginTime=(new Date).getTime(),i._endTime=i._beginTime+i._opts.duration,i._play()}),n.delay)):(this._beginTime=(new Date).getTime(),this._endTime=this._beginTime+this._opts.duration,this._play())}function s(t,e){var i,r,o=it.g(t);if(o&&(this.container=o,this._style(o),o.unselectable="on",o.innerHTML="",o.appendChild(this.render()),this.platform=this.container.children[0],this.mask=this.platform.children[0],this._bind(),this.zoomLevel=11,this.dragContainer={},this._panes={},this.currentCenter=null,this.referCenter=null,this.dragPoint=new n(0,0),this.firstPoint=null,this.firstZoom=0,this.lastZoom=0,this.mapOrganization="CentaMap",this.config={defaultCursor:F.defaultCursor,defaultDraggingCursor:F.draggingCursor,enableDragging:!0,enableScrollWheelZoom:!0,enableDoubleClickZoom:!0,enableInertialDragging:!1,enableContinuousZoom:!1,enableKeyboard:!0},this.setConfig(e),this.platform.style.cursor=this.config.defaultCursor,this.overlays={markers:[],infoWindow:null,lables:[],overlays:[],contentMenu:null,config:{infoWindowIsInit:!1,infoWindowIsHidden:!0,markers:[],infoWindows:[]}},CTMap._action.length>0))for(i=0,r=CTMap._action.length;r>i;i++)CTMap._action[i].call(this,this)}function l(t){return function(t){(t=window.event||t).stopPropagation?t.stopPropagation():t.cancelBubble=!0}(t),function(t){return(t=window.event||t).preventDefault?t.preventDefault():t.returnValue=!1,!1}(t)}function u(t,e){function i(t){t=t||window.event,e.draging(t)}function n(t){t=t||window.event,e.platform.style.cursor=e.config.defaultCursor,u!=t.clientX&&c!=t.clientY&&(a=!0,e.dragEnd(t)),it.un(document,"onmousemove",i),it.un(document,"onmouseup",n)}function r(t){var i=function(t){return t.wheelDelta?t.wheelDelta/120:-(0==t.detail%3?t.detail:t.detail/3)}(t=t||window.event);e.mousewheel(i,t),l(t)}var o,a=!1,s=0,u=0,c=0;it.on(t,"onmousedown",(function(t){if("2"==(t=t||window.event).button){if(s)return clearTimeout(o),e.rightDbclick(t),void(s=0);o=setTimeout((function(){e.rightClick(t),s=0}
1),300),s++}else e.dragStart(t),l(t),u=t.clientX,c=t.clientY,it.on(document,"onmousemove",i),it.on(document,"onmouseup",n)})),e.container.oncontextmenu=function(){return!1},e.container.onselectstart=function(){return!1},it.Browser.ie&&(e.container.unselectable="on"),it.on(t,"dblclick",(function(t){e.dbClick(t),l(t)})),it.on(t,"onmouseover",(function(t){e.mouseOver(t)})),it.on(t,"onmousemove",(function(t){e.mouseMove(t)})),it.on(t,"onmouseout",(function(t){e.mouseOut(t)})),it.on(document,"keydown",(function(t){t=t||window.event,e.keyDown(t)})),it.on(t,"onclick",(function(t){a?(a=!1,l(t)):e.click(t)})),0==it.Browser.firefox?it.on(t,"mousewheel",r):t.addEventListener("DOMMouseScroll",r,!1)}function c(t,e){function i(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}function n(t){var e,i,n,r;if(l){for(e=[],i=null,n=0,r=t.touches.length;r>n;n++)e.push({x:(i=t.touches[n]).pageX,y:i.pageY});return e}return[{x:t.pageX,y:t.pageY}]}var r,o,a,s,l,u,c;t.addEventListener("touchstart",(function(t){return H=!1,t.preventDefault(),r=n(t),function(t){(t=t||window.event).clientX=r[0].x,t.clientY=r[0].y,u=t.clientX,c=t.clientY,e.dragStart(t)}(),s&&1==r.length?(clearTimeout(a),e.dbClick(t),void(s=0)):(a=setTimeout((function(){s=0}),300),void s++)}),!1),t.addEventListener("touchmove",(function(t){t.preventDefault(),2==(o=n(t)).length&&(H=!0,U=(o[0].x+o[1].x)/2,z=(o[0].y+o[1].y)/2),1==r.length&&function(t){(t=t||window.event).clientX=o[0].x,t.clientY=o[0].y,e.draging(t)}()}),!1),t.addEventListener("touchend",(function(t){if(t.preventDefault(),r.length>=2){var n=function(t,e){var n;return t.length>=2&&e.length>=2?(n=i(t[1],t[0]),i(e[1],e[0])/n):1}(r,o);n>1?e.zoomIn():1>n&&e.zoomOut()}else e.click(t);!function(t){(t=t||window.event).clientX=U,t.clientY=z,u!=t.clientX&&c!=t.clientY&&e.dragEnd(t)}()}),!1),l="ontouchstart"in window,u=0,c=0}function d(t,e,i){t&&(t.style.top=i,t.style.left=e)}function h(t){this.map=t,this.zoomLevel=0,this.bitmapCenter=null,this.container=null,this.viewSize=t.getSize(),this.tileSize=240,this._images=[],this.createReder(t.tileImages),this.baseTitle=""}function p(){this._container=null,this._visible=!1,this.defaultAnchor=Q.TOP_LEFT,this.defaultOffset=new r(10,10),this.map=null,this._config={zIndex:10}}function f(t){var e,i={anchor:Q.TOP_LEFT,offset:new r(10,10),controlType:J.NORMAL};for(e in t=t||{})i[e]=t[e];this.defaultAnchor=i.anchor,this.defaultOffset=i.offset,this.defaultControlType=i.controlType}function g(t,e,i,n){var r=document.createElement(t);return r.className=e,r.title=n=n||"",i.appendChild(r),r}function m(t,e){it.on(t,"click",e)}function v(t){var e,i={anchor:Q.BOTTOM_LEFT,offset:new r(10,10)};for(e in t=t||{})i[e]=t[e];this.defaultAnchor=i.anchor,this.defaultOffset=i.offset}function y(t){var e,i={anchor:Q.TOP_LEFT,offset:new r(10,10),content:"<input id='tbSearchBox' type='text' style='left: 300px; position: absolute; font-size: 2em; font-family: 'Calibri'; autocomplete='off' />"};for(e in t=t||{})i[e]=t[e];this.content=i.content,this.defaultAnchor=i.anchor,this.defaultOffset=i.offset}function _(t){var e,i={};for(e in i=N?{anchor:Q.BOTTOM_RIGHT,offset:new r(5,5),content:"<a href='https://census.centamap.com' target='_blank'>ä¸åå°å</a>(c) The Government of the Hong Kong SAR Map reproduced with permission of the Director of Lands."}:{anchor:Q.BOTTOM_RIGHT,offset:new r(5,5),content:"<a href='https://census.centamap.com' target='_blank'>ä¸åå°å</a>(c) autonav 審åè:GS(2010)6011"},t=t||{})i[e]=t[e];this.content=i.content,this.defaultAnchor=i.anchor,this.defaultOffset=i.offset}function b(){this.items=[],this.seqs=[],this.container=this.render(),this.isOpen=!1,this.position=null,this.width=100,this.map=null}function T(t,e,i){this.contentMenu=null,this.dom=null,this.isEnable=!0,this.Text=t||"",this.callback=e||function(){},this.Guid=i||(new Date).getTime()}function w(){this.container=null,this.timer=null}function x(t,e,i){for(var o in k.call(this),this._config={offset:new n(-10,-25),size:e||new r(20,25),imageOffset:new n(0,0),imageUrl:t||F.imgPath+"marker.png",infoWindowOffset:new n(0,25)},i=i||{})this._config[o]=i[o]}function S(t,e,i,n,r,o,a,s){var l=document.createElement("div");
1return l.className=t||"",l.style.height=e+"px",l.style.width=i+"px",l.WebkitUserSelect="none",n&&n.appendChild(l),r&&(l.style.overflow="hidden"),(o||a)&&(l.style.left=o+"px",l.style.top=a+"px"),l.style.zIndex=s||1,l}function k(){D.call(this),this._type="overlay"}function C(t,e,n){var r,o;k.call(this),r=this,this.shadows=[],this.isInitShadow=!0,r.content=t,r.map=e,r._config={overlay:null,width:300,height:135,left:0,right:0,title:"Message Title",content:t,point:new i(0,0)},r.childDom={title:null,content:null},r.setConfig(n),r._config.width<150&&(r._config.width=150),r._config.width>400&&(r._config.width=400),r._config.height<100&&(r._config.height=100),r._config.height>400&&(r._config.height=400),o=e.pointToPixel(r._config.point),r.setPosition(o),r.dom=r.render(),this.isInitShadow&&r.shadow()}function E(t,e,i){k.call(this);var n=this;n.config={width:80,height:20,map:null,point:t,text:e,icon:null,infowindow:null,style:{background:"#f5595c",border:"1px solid gray",color:"#fff"}},n.setOptions(i),n.initiate()}function A(t,e){var i=this;k.call(this),i.config={map:null,id:null,zindex:null,point:t,icon:null,infoWindow:null},i.setOptions(e),i.initiate()}function M(t){this.ns="http://www.w3.org/2000/svg",this._type="Graph",this.map=t,this.map.grash=this,this.init()}function P(t,e){for(var i in k.call(this),this.config={map:null,text:"",backgroundColor:"red",borderColor:"red",borderWidth:"0",opacity:"1"},this._points=t,e=e||{})this.config[i]=e[i];this.config.map&&(e.borderColor||(this.config.borderColor=this.config.backgroundColor),this.grash=this.config.map.grash||new M(this.config.map))}function I(t,e){for(var i in k.call(this),this.config={map:null,text:"",borderColor:"red",borderWidth:"2",opacity:"1"},this._points=t,e=e||{})this.config[i]=e[i];this.config.map&&(this.grash=this.config.map.grash||new M(this.config.map))}function L(t,e,i){for(var n in k.call(this),this.config={map:null,text:"",borderColor:"red",borderWidth:"2",backgroundColor:"red",opacity:"0.5",radius:e},this._point=t,i=i||{})this.config[n]=i[n];this.config.map&&(this.grash=this.config.map.grash||new M(this.config.map))}function O(t,e){k.call(this),this._point=t,this.height=30;var i=[];e&&("string"==typeof e?i.push(e):i=e),this._values=i,this._className="EstateLable"}var D,R,N,B,F,j,U,z,H,W,V,q,G,Y,X,$,K,Z,Q,J,tt,et,it=it||{};for(function(){var t,e,i;it.logs=[],t=0,e={},it.Base=function(t){this.g=t||it.Base.getGuid(),e[this.g]=this},it.Base.getGuid=function(){return"ctmap_"+(t++).toString(36)},it.instance=function(t){return e[t]},(i=it.Base.prototype).dispose=function(){for(var t in this.g&&delete e[this.g],this)"function"!=typeof this[t]&&delete this[t]},i.getGuid=function(){return this.g||(e[this.g=it.Base.getGuid()]=this),this.g},i.decontrol=function(){delete e[this.g]},i.toString=function(){return this._className||""},i.err=function(t,e){var i=it._log;i.length>50&&(i.reverse().length=10,i.reverse()),i[i.length]="["+this.g+"] ["+t+"]["+e+"]"}}(),Function.prototype._inherits=function(t,e){var i,n,r=this.prototype,o=function(){};for(i in o.prototype=t.prototype,n=this.prototype=new o,"string"==typeof e&&(n._className=e),r)n[i]=r[i];return this.prototype.constructor=r.constructor,r=o=null,n},it.BaseEvent=function(t,e){this.type=t,this.returnValue=!0,this.target=e||null,this.currentTarget=this.srcElement=null,this.cancelBubble=!1,this.domEvent=null},it.BaseEvent.prototype.extend=function(t){var e=this;return this.domEvent=t=window.event||t,e.clientX=t.clientX||t.pageX,e.clientY=t.clientY||t.pageY,e.offsetX=t.offsetX||t.layerX,e.offsetY=t.offsetY||t.layerY,e.screenX=t.screenX,e.screenY=t.screenY,e.pixel=new n(e.offsetX,e.offsetY),e.ctrlKey=t.ctrlKey||t.metaKey,e.shiftKey=t.shiftKey,e.altKey=t.altKey,e},it.Base.prototype.addEventListener=function(t,e){if("function"!=typeof e)return this.err("error","addEventListener:"+e+" is not a function");this._listeners||(this._listeners={});var i=this._listeners;0!=t.indexOf("on")&&(t="on"+t),void 0===i[t]&&(i[t]=[]),i[t].push(e)},it.Base.prototype.removeEventListener=function(t,e){var i,n,r;if(this._listeners||(this._listeners={}),0!=t.indexOf("on")&&(t="on"+t),i=this._listeners,t&&"string"==typeof e&&"all"===e)i[t]=[];else if(i[t]instanceof Array)for(n=0,r=i[t].length;r>n;n++)i[t][n]==e&&i[t].splice(n,1)},it.Base.prototype.dispatchEvent=function(t){var e,i,n,r;if(this._listeners||(this._listeners={}),e=this._listeners,i=t.type,t.target=t.srcElement=t.target||t.srcElement||this,t.currentTarget=this,e[i]instanceof Array)for(n=0,r=e[i].length;r>n;n++)"function"==typeof e[i][n]&&e[i][n].call(this,t);return t.returnValue},D=it.Base,R=it.BaseEvent,it.Browser=function(){var t=navigator.userAgent,e=0,i=0,n=0,r=0,o=0,a=0,s=0;return"object"==typeof window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(t)?i=parseFloat(RegExp.$2):/MSIE (\d+(\.\d+)?)/.test(t)?e=parseFloat(RegExp.$1):/Firefox(\s|\/)(\d+(\.\d+)?)/.test(t)?r=parseFloat(RegExp.$2):"Netscape"==navigator.vendor&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(t)?s=parseFloat(RegExp.$2):t.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(t)&&(n=parseFloat(RegExp.$1)),t.indexOf("Gecko")>-1&&-1==t.indexOf("KHTML")&&/rv\:(\d+(\.\d+)?)/.test(t)&&(a=parseFloat(RegExp.$1)),/chrome\/(\d+\.\d)/i.test(t)&&(o=parseFloat(RegExp.$1)),{ie:e,firefox:r,gecko:a,netscape:s,opera:i,safari:n,chrome:o,mobile:!!(t.match(/AppleWeb
1Kit.*Mobile/)||t.match(/Windows Phone/)||t.match(/Android/)||t.match(/MQQBrowser/))}}(),it.extend=function(t,e){var i,n,r,o;if(t&&e&&"object"==typeof e){for(i in e)t[i]=e[i];for(n=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],o=0;o<n.length;o++)r=n[o],Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},it.g=function(t){return"object"==typeof t?t:document.getElementById(t)},it.ac=function(t,e){(t=this.g(t))&&(e=this.trim(e),new RegExp("(^| )"+e.replace(/(\W)/g,"\\$1")+"( |$)").test(t.className)||(t.className=t.className.split(/\s+/).concat(e).join(" ")))},it.addClassName=it.ac,it.rc=function(t,e){if(t=this.g(t)){e=this.trim(e);var i=t.className.replace(new RegExp("(^| +)"+e.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");t.className!=i&&(t.className=i)}},it.removeClassName=it.rc,it.trim=function(t){return t.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")},it.ce=function(t,e,i){var n,r,o=document.createElement(t);for(n in i&&(o=document.createElementNS(i,t)),e=e||{})if(r={for:"htmlFor",class:"cssClass"}[n]||n,"style"!=n)if("class"!=n)if(o.setAttribute)o.setAttribute(r,e[n]);else try{o[r]=e[n]}catch(o){}else it.ac(o,e[n]);else o.style.cssText=e[n];return o},it.on=function(t,e,i){return(t=it.g(t))?(e=e.replace(/^on/,"").toLowerCase(),t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&t.attachEvent("on"+e,i),t):t},it.un=function(t,e,i){return(t=it.g(t))?(e=e.replace(/^on/,"").toLowerCase(),t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent&&t.detachEvent("on"+e,i),t):t},(N=!0)?(B=0,F={basePath:"https://census.centamap.com/api/",imgPath:"https://census.centamap.com/api/images/",scalePath:"https://census.centamap.com/api/scale/"}):(B=1,F={basePath:"https://census.centamap.com/CTMAP/",imgPath:"https://census.centamap.com/CTMAP/images/",scalePath:"https://census.centamap.com/CTMAP/scale/"}),it.extend(F,it.Browser.firefox?{defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"}:it.Browser.chrome||it.Browser.safari?{defaultCursor:"url("+F.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+F.imgPath+"closedhand.cur) 8 8,move"}:{defaultCursor:"url("+F.imgPath+"openhand.cur),default",draggingCursor:"url("+F.imgPath+"closedhand.cur),move"}),i.prototype.equals=function(t){return t.lat==this.lat&&t.lng==this.lng},i.prototype.toString=function(){return"Point"},n.prototype.equals=function(t){return t.x==this.x&&t.y==this.y},n.prototype.toString=function(){return"Pixel"},r.prototype.toString=function(){return"Size"},o.prototype.containsPoint=function(t){if("Point"==t.toString()){var e=this._config.sw,i=this._config.ne;return t.lng>=e.lng&&t.lat<=e.lat&&t.lng<=i.lng&&t.lat>=i.lat}return!1},o.prototype.getSouthWest=function(){return this._config.sw},o.prototype.getNorthEast=function(){return this._config.ne},a.prototype._play=function(){var t=this,e=(new Date).getTime();return e>=t._endTime?("function"==typeof t._opts.render&&t._opts.render(t._opts.transition(1)),void("function"==typeof t._opts.finish&&t._opts.finish())):(t.schedule=t._opts.transition((e-t._beginTime)/t._opts.duration),"function"==typeof t._opts.render&&t._opts.render(t.schedule),void(t.terminative||(t._timer=setTimeout((function(){t._play()}),1e3/t._opts.fps))))},a.prototype.stop=function(t){this.terminative=!0,this._timer&&clearTimeout(this._timer),t&&(this._endTime=this._beginTime,this._play())},a.prototype.clear=function(){this._timer&&clearTimeout(this._timer),this._endTime=this._beginTime,this.schedule=0},j={linear:function(t){return t},reverse:function(t){return 1-t},easeInQuad:function(t){return t*t},easeInCubic:function(t){return Math.pow(t,3)},easeOutQuad:function(t){return-t*(t-2)},easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutQuad:function(t){return.5>t?2*t*t:-2*(t-2)*t-1},easeInOutCubic:function(t){return.5>t?4*Math.pow(t,3):4*Math.pow(t-1,3)+1},easeInOutSine:function(t){return(1-Math.cos(Math.PI*t))/2}},window.CTMap=window.CTMap||{},CTMap._action=[],CTMap.Do=function(t){this._action.push(t)},s._inherits(D,"Map"),it.extend(s.prototype,{setConfig:function(t){if(t)for(var e in t)this.config[e]=t[e]},render:function(){var t,e,i=it.ce("div",{id:"viewContainer"}),n=i.style;return n.overflow="visible",n.position="absolute",n.zIndex="0",n.background="#F2EFE9",n.top=n.left="0px",(e=(t=it.ce("div",{id:"handle",class:"CTMap_mask"})).style).position="absolute",e.top=e.left="0px",e.zIndex="200",e.overflow="hidden",e.WebkitUserSelect="none",t.onselectstart=function(){return!1},i.appendChild(t),i},_style:function(t){var e=t.style;e.overflow="hidden","absolute"!=e.position&&(e.position="relative",e.zIndex=0),e.background="#F2EFE9",e.color="#000",e.textAlign="left"},_bind:function(){var t=this,e=t.getSize();(t.width!=e.width||t.height!=e.height)&&(this.mask.style.width=(t.width=e.width)+"px",this.mask.style.height=(t.height=e.height)+"px")},reset:function(){var t=this.firstPoint;this.centerAndZoom(t.lng,t.lat,this.firstZoom)},getSize:function(){var t=this.container,e=t.clientWidth||0,i=t.clientHeight||0,n=parseInt(t.style.width)||0,o=parseInt(t.style.height)||0,a=Math.max(Math.max(e,n),100),s=Math.max(Math.max(i,o),50);return t.style.width=a+"px",t.style.height=s+"px",new r(a,s)},getOptimizeCenter:function(t){var e,n=0,r=0,o=0,a=0;if(t.length>0){for(n=t[0].lng,r=t[0].lat,o=t[0].lng,a=t[0].lat,e=0;e<t.length;e++)t[e].lng>o&&(o=t[e].lng),t[e].lat>a&&(a=t[e].lat),t[e].lng<n&&(n=t[e].lng),t[e].lat<r&&(r=t[e].lat);return new i((n+o)/2,(r+a)/2)}return null}
1,getOptimizeZoom:function(t,e,i){var n,r,o,a,s,l,u,c;if(1==arguments.length&&(e=this.getSize().width,i=this.getSize().height),n=3,r=0,o=0,a=0,s=0,t.length>0){for(r=t[0].lng,o=t[0].lat,a=t[0].lng,s=t[0].lat,l=0;l<t.length;l++)t[l].lng>a&&(a=t[l].lng),t[l].lat>s&&(s=t[l].lat),t[l].lng<r&&(r=t[l].lng),t[l].lat<o&&(o=t[l].lat);for(u=a-r,c=s-o,l=0;l<q.length;l++)if(q[l]*e>u&&q[l]*i>c){n=l+1;break}}return n},getCenter:function(){return this.currentCenter},getZoomLevel:function(){return this.zoomLevel+1},getZoom:function(){return this.zoomLevel+1},_getZoom:function(){return this.zoomLevel},getContainer:function(){return this.container},setCenterPoint:function(t){this.cpoint=t,this.dragPoint=new n(0,0),this.centerPixel=new n(0,0)},setCenter:function(t,e){var n;n="Point"==t.toString()?t:new i(t,e),this.centerAndZoom(n.lng,n.lat,this.getZoom())},setZoom:function(t){this.lastZoom=this._getZoom(),this.zoomLevel=t},getPanes:function(){return this.doms},centerAndZoom:function(n,r,o){var a,s,l,u;10==n.length&&(o=r,r="8"+n.substring(5,10),n="8"+n.substring(0,5)),a=this,u=new i(s=t(n,r),l=e(n,r)),2==arguments.length&&"Point"==n.toString()&&(u=n,o=r),a._bind(),a.setCenterPoint(u),a.currentCenter=u,a.referCenter=new i(s,l),a.zoomLevel=o-1,a._tileImageObject&&a._tileImageObject._centerAndZoom(u,a._getZoom()),this.firstPoint||(this.firstPoint=u,this.firstZoom=a.getZoomLevel())},getInfoWindow:function(){return this.overlays.config.infoWindowIsHidden?null:this.overlays.infoWindow},dragStart:function(t){this.config.enableDragging&&(this.platform.style.cursor=this.config.defaultDraggingCursor,this.lastXY={x:t.clientX,y:t.clientY},this.curent=this.lastXY,this.startTime=new Date,this.dispatchEvent(new R("ondragStart").extend(t)))},dragEnd:function(t){var e,i,n,r,o;this.config.enableDragging&&(this.endTime=new Date,this.config.enableInertialDragging&&(e=((i=this).startTime.getTime()-i.endTime.getTime())/60,n=-(t.clientX-this.lastXY.x)/e,r=-(t.clientY-this.lastXY.y)/e,o=setInterval((function(){Math.abs(n)<=1&&Math.abs(r)<=1&&clearInterval(o),i.moveTo({x:parseInt(n),y:parseInt(r)}),n*=.85,r*=.85}),30)),this.dispatchEvent(new R("ondragEnd").extend(t)))},draging:function(t){var e,i;this.config.enableDragging&&(this.moveTo(e={x:t.clientX-this.curent.x,y:t.clientY-this.curent.y}),e.x=t.clientX,e.y=t.clientY,this.curent=e,(i=new R("ondraging")).dragSize=e,this.dispatchEvent(i))},panTo:function(t,e){var i,n,r;if("Point"==t.toString()){if(i=this.pointToPixel(t),n=this.getSize(),parseInt(i.x)==parseInt(n.width/2)||parseInt(i.y)==parseInt(n.height/2))return void(e&&e());if(r=this.getSize(),Math.abs(i.x)>r.width||Math.abs(i.y)>r.height||r.width<0||r.height<0)return this.setCenter(t),void(e&&e());this.panBy(n.width/2-i.x,n.height/2-i.y,e)}},panBy:function(t,e,i){var r=(new n(t,e),this),o=0,s=0;new a({fps:50,duration:200,transition:j.easeInQuad,render:function(i){var a=t*i-o,l=e*i-s;o=t*i,s=e*i,r.moveTo(new n(a,l))},finish:function(){i&&i(),r.dispatchEvent(new R("onmoveEnd"))}})},moveTo:function(t){var e=this,i=e.tileImages.style,r=e.dragPoint,o=e.currentCenter,a=e.zoomLevel,s=t.x,l=t.y;i.top=parseFloat(i.top)+l+"px",i.left=parseFloat(i.left)+s+"px",r.x=r.x+t.x,r.y=r.y+t.y,o.lng=parseFloat(o.lng-t.x*q[a]),o.lat=parseFloat(o.lat+t.y*V[a]),e.dragingSize=new n(t.x,t.y),this.move(t),e.reDraw()},move:function(t){var e,i,n,r,o,a,s=this,l=t.x,u=t.y;for(i=0;i<s.overlays.markers.length;i++)(e=s.overlays.markers[i].dom.style).top=parseFloat(e.top)+u+"px",e.left=parseFloat(e.left)+l+"px";for(i=0;i<s.overlays.lables.length;i++)(e=s.overlays.lables[i].dom.style).top=parseFloat(e.top)+u+"px",e.left=parseFloat(e.left)+l+"px";for(i=0;i<s.overlays.overlays.length;i++)(n=s.overlays.overlays[i].dom)&&((e=n.style).top=parseFloat(e.top)+u+"px",e.left=parseFloat(e.left)+l+"px");this.getInfoWindow()&&((r=this.doms.infowindow.style).top=parseInt(r.top)+u+"px",r.left=parseInt(r.left)+l+"px",(o=this.doms.shadow.style).top=parseInt(o.top)+u+"px",o.left=parseInt(o.left)+l+"px"),this.grash&&this.grash.setPosition(t),(a=new R("onmove")).dragSize=t,a.moveSize=t,this.dispatchEvent(a)},mouseOver:function(t){var e=new R("onmouseOver").extend(t);this.dispatchEvent(e)},mouseOut:function(t){var e=new R("onmouseOut").extend(t);this.dispatchEvent(e)},mouseMove:function(t){var e=new R("onmouseMove").extend(t);this.dispatchEvent(e)},click:function(t){this.overlays.config.infoWindowIsHidden||this.closeInfoWindow();var e=new R("onclick").extend(t);e.point=this.pixelToPoint(e.pixel),this.dispatchEvent(e)},rightClick:function(t){var e=new R("onrightClick"),i=e.extend(t);this.pixelToPoint(new n(i.offsetX,i.offsetY)),this.overlays.contentMenu&&this.overlays.contentMenu.open(e),this.dispatchEvent(e)},dbClick:function(t){var e,i=new R("ondbClick");this.config.enableDoubleClickZoom&&this.getZoomLevel()>1&&(e=i.extend(t),this.currentCenter=this.pixelToPoint(new n(e.clientX,e.clientY)),this.zoomIn(t,!0)),this.dispatchEvent(i)},rightDbclick:function(t){var e,i=new R("onrightDbclick");this.config.enableDoubleClickZoom&&this.getZoomLevel()<12&&(e=i.extend(t),this.currentCenter=this.pixelToPoint(new n(e.offsetX,e.offsetY)),this.zoomOut(t,!0)),this.dispatchEvent(i)},zoomOut:function(t,e){var i=this._getZoom()+1;i>11&&(i=11),this._zoomTo(i,t,e)},zoomIn:function(t,e){var i=this,n=i._getZoom()-1;0>n&&(n=0),i._zoomTo(n,t,e),i.dispatchEvent(new R("onzoomIn"))}
1,_zoomTo:function(t,e,i){var n,r=this;t!=r._getZoom()&&(B>t||(n=new R("onzoomChange"),e&&(n.changeCenter=!0,n.extend(e),n.point=this.pixelToPoint(n.pixel),n.lastPixel=n.pixel),i&&(n.isDouble=!0),n.isZoomIn=t>r._getZoom(),r.setZoom(t),r.dispatchEvent(new R("onzoomStart")),r.dispatchEvent(n)))},zoomTo:function(t,e,i){t!=this.getZoomLevel()&&(t--,this._zoomTo(t,e,i))},mousewheel:function(t,e){this.config.enableScrollWheelZoom&&(!this.czTimer||this.config.enableContinuousZoom)&&(0>t?this.zoomOut(e):this.zoomIn(e))},keyDown:function(t){this.config.enableKeyboard&&(t.keyCode&&187==t.keyCode&&this.zoomIn(),t.keyCode&&189==t.keyCode&&this.zoomOut()),this.dispatchEvent(new R("onkeyDown"))},pixelToPoint:function(t){var e,n,r,o,a;return"Pixel"==t.toString()?(r=this.zoomLevel,o=this.getSize(),e=t.x>o.width/2?q[r]*(t.x-o.width/2):-1*q[r]*(o.width/2-t.x),n=t.y>o.height/2?-1*V[r]*(parseFloat(t.y)-o.height/2):V[r]*(o.height/2-parseFloat(t.y)),a=this.currentCenter,new i(parseFloat(a.lng)+parseFloat(e),parseFloat(a.lat)+parseFloat(n))):null},pointToPixel:function(t){var e,i,r,o,a;return"Point"==t.toString()?(i=1*(i=(e=this.currentCenter).lng-t.lng)/q[o=this.zoomLevel],r=1*(r=e.lat-t.lat)/V[o],new n(i=(a=this.getSize()).width/2-i,r=a.height/2+r)):null},getBusRoute:function(t,e,i,n,r){return this.getBusRoute_JSON(t,e,i,n,r)},getBusRoute_JSON:function(t,e,i,n,r){var o,a;return t.toString().length>0&&n.toString().length>0&&e.toString().length>0&&i.toString().length>0?(o=null,(a=Z.gAjax.url+"gbus_getdata.ashx?rid="+t+"&x1="+e+"&y1="+i+"&lang="+n+"&marker="+r).length>0&&(o=this.ajaxPDetailFunction(a)),o):null},getNearbyBusRoute:function(t,e,i,n){return this.insertMapUsage(this.mapOrganization,i),this.getNearbyInfo_JSON(t,e,0,n)},getNearbyInfo:function(t,e,i,n,r){return this.insertMapUsage(this.mapOrganization,n),this.getNearbyInfo_JSON(t,e,i,r)},getNearbyInfo_JSON:function(t,e,i,n){var r,o,a,s,l,u,c,d,h;return t.toString().length>0&&e.toString().length>0&&i.toString().length>0?(r=this.getBounds(),this.getZoom(),o=r.getNorthEast().lng,a=r.getNorthEast().lat,s=r.getSouthWest
1().lng,r.getNorthEast(),r.getNorthEast(),l=r.getSouthWest().lat,r.getSouthWest(),r.getSouthWest(),u="x1="+s+"&x2="+o,u+="&y1="+a+"&y2="+l,c="&ft3="+n+"&cat="+t+"&lang="+e,i>0&&(c=c+"&maxrow="+i),h=null,d="gbus"==t||"glist"==t?Z.gAjax.url+t+"_getdata.ashx?"+u+c:Z.gAjax.url+"gi_getdata.ashx?"+u+c,0==i?d.length>0&&(h=this.ajaxFunction_BusRoute(d)):d.length>0&&(h=this.ajaxFunction(d)),h):null},reDraw:function(){this.dispatchEvent(new R("onreDraw"))},setCursor:function(t){t&&(this.config.defaultCursor=t,this.platform.style.cursor=t)},setDraggingCursor:function(t){t&&(this.config.draggingCursor=t)},enableDragging:function(){this.config.enableDragging=!0},disableDragging:function(){this.config.enableDragging=!1},enableScrollWheelZoom:function(){this.config.enableScrollWheelZoom=!0},disableScrollWheelZoom:function(){this.config.enableScrollWheelZoom=!1},enableDoubleClickZoom:function(){this.config.enableDoubleClickZoom=!0},disableDoubleClickZoom:function(){this.config.enableDoubleClickZoom=!1},enableInertialDragging:function(){this.config.enableInertialDragging=!0},disableInertialDragging:function(){this.config.enableInertialDragging=!1},enableContinuousZoom:function(){this.config.enableContinuousZoom=!0},disableContinuousZoom:function(){this.config.enableContinuousZoom=!1},disableKeyboard:function(){this.config.enableKeyboard=!1},enableKeyboard:function(){this.config.enableKeyboard=!0}}),H=!1,CTMap.Do((function(t){it.Browser.mobile?c(t.mask,t):u(t.mask,t)})),W=new n(836195,821952),V=Array(.21183,.61883,.972,1.53167,2.51,4.49016,6.86731,9.50858,17.1683,22.4508,33.8083,83.1473,0),q=Array(.21183,.61883,.972,1.53167,2.51,4.49016,6.86731,9.50858,17.1683,22.4508,33.8083,83.1473,0),G=Array(0,10,4,4,3,3,2,2,1,1,1,1,1),Y=Array(0,10,4,4,3,3,2,2,1,1,1,1,1),X=new Array,$=new Array,K=0;K<V.length;K++)X.push(new n(q[K],V[K])),$.push(new n(Y[K],G[K]));Z={hk:{url:"https://census.centamap.com/gm/",tileSize:240},gAjax:{url:"https://census.centamap.com/gAjax/"}},CTMap.Do((function(t){function e(t,e){var i=it.ce("div"),n=i.style;return n.position="absolute",n.top=n.left=n.width=n.height="0",n.zIndex=e,t.appendChild(i),i}var i,r;this.tileImages=e(t.platform,1),this.tileImages.oncontextmenu=function(){return!1},this.tileImages.onselectstart=function(){return!1},t.doms={overlays:null,markers:null,infowindow:null,lables:null,shadow:null,canvos:null},t.doms.overlays=e(t.platform,201),(i=t.doms.overlays.style).left="0px",i.top="0px",t.doms.markers=e(t.doms.overlays,201),t.doms.lables=e(t.doms.overlays,202),t.doms.infowindow=e(t.doms.overlays,203),t.doms.canvos=e(t.doms.overlays,199),t.doms.overlays=e(t.doms.overlays,200),t.doms.infowindow.style.display="none",t.doms.shadow=e(t.platform,1),t.doms.shadow.style.display="none",r=new h(t),t._tileImageObject=r,t.addEventListener("onreDraw",(function(){r.getIsInit()?r.Draw(t.dragingSize):r.centerBitmap(t.getCenter(),t._getZoom())})),t.addEventListener("onzoomChange",(function(i){function o(){var e,r,o,a,s,l;p.czTimer=null,e=t.getCenter(),i.changeCenter&&!i.isDouble&&(r=null!=i.pixel.x?i.pixel:new n((o=t.getSize()).width/2,o.height/2),s=t.pointToPixel(i.point),(l=t.getSize()).width/=2,l.height/=2,r.x<l.width&&r.y<l.height&&(a=new n(l.width+s.x-r.x,l.height+s.y-r.y)),r.x<l.width&&r.y>l.height&&(a=new n(l.width+s.x-r.x,l.height-(r.y-s.y))),r.x>l.width&&r.y<l.height&&(a=new n(l.width-(r.x-s.x),l.height+s.y-r.y)),r.x>l.width&&r.y>l.height&&(a=new n(l.width-(r.x-s.x),l.height-(r.y-s.y))),e=t.pixelToPoint(a)),t.setCenter(e),t.dispatchEvent(new R("onzoomEnd"))}var s,l,u,c,d,h,p=this;if(p.czTimer)try{p.csTimer.stop()}catch(e){}l=r._images,s=i.changeCenter?i.pixel:new n((u=t.getSize()).width/2,u.height/2),H||(s=new n(i.clientX,i.clientY)),c=r.getGridImages(s.x,s.y),d=r.tileSize,h=20,r.zoomLevel>t._getZoom()?l.length>0&&(p.czTimer=new a({fps:20,duration:240,transition:j.easeInQuad,delay:100,render:function(){var t,e;for(t=0;t<l.length;t++)for(e=0;e<l[t].length;e++)!function(t,e,i){var n=parseFloat(t.style.width);t.style.top=parseFloat(t.style.top)-(c.cy-e-1)*h-h*(c.ot/d)+"px",t.style.left=parseFloat(t.style.left)-(c.cx-i-1)*h-h*(c.ol/d)+"px",t.style.width=n+h+"px",t.style.height=n+h+"px"}(l[t][e],t,e)},finish:function(){o()}})):l.length>0&&(p.czTimer=new a({fps:20,duration:240,transition:j.easeInQuad,delay:100,render:function(){var t,e;for(t=0;t<l.length;t++)for(e=0;e<l[t].length;
1e++)!function(t,e,i){var n=parseFloat(t.style.width);t.style.top=parseFloat(t.style.top)+(c.cy-e-1)*h+h*(c.ot/d)+"px",t.style.left=parseFloat(t.style.left)+(c.cx-i-1)*h+h*(c.ol/d)+"px",t.style.width=n-h+"px",t.style.height=n-h+"px"}(l[t][e],t,e)},finish:function(){o()}}))}))})),it.extend(h.prototype,{createReder:function(t){var e,i;return this.container?this.container:((i=(e=it.ce("div")).style).position="absolute",i.top=i.left="0px",i.zIndex="-1",i.left=this.viewSize.width/2+"px",i.top=this.viewSize.height/2+"px",i.WebkitUserSelect="none",t&&t.appendChild(e),this.container=e,this._isInit=!1,e)},getIsInit:function(){return this._isInit},getBitmapCoordinate:function(t,e){var i=new n(0,0),r=W.y-t.lat;return i.x=Math.floor((t.lng-W.x)/X[e].x),i.y=Math.floor(r/X[e].y),i},centerBitmap:function(t,e){var i,o,a,s,l,u,c,d,h,p,f,g,m,v,y,_,b,T,w,x,S,k,C,E,A,M,P;for(t&&e||(t=this.map.getCenter(),e=this.map._getZoom()),(i=this.map.tileImages.style).top="0px",i.left="0px",this.viewSize=this.map.getSize(),this.bitmapCenter=t,this.zoomLevel=e,o=this.getBitmapCoordinate(t,e),s=(a=this).container.style,l=a.tileSize,u=a.viewSize.width/2,c=a.viewSize.width,h=a.viewSize.height,(p=a.container.style).top=(d=a.viewSize.height/2)+"px",p.left=u+"px",f=0,g=0,m=0,o.x<0&&o.x>-120&&(p.left=parseFloat(p.left)-o.x+"px"),o.x<-120&&(f=Math.ceil((o.x+l/2)/l)-(o.x>=0?0:1),m=o.x-f*l,p.left=parseFloat(p.left)-m+"px"),o.y<0&&o.y>-120&&(p.top=parseFloat(p.top)-o.y+"px"),o.y<-120&&(g=Math.ceil((o.y+l/2)/l)-(o.y>=0?0:1),m=o.y-g*l,p.top=parseFloat(p.top)-m+"px"),o.x>0&&o.x<120&&(p.left=parseFloat(p.left)-o.x+"px"),o.x>120&&(f=Math.ceil((o.x-l/2)/l)-(o.x>=0?0:1),m=o.x-f*l,p.left=parseFloat(p.left)-m+"px"),o.y>0&&o.y<=120&&(p.top=parseFloat(p.top)-o.y+"px"),o.y>120&&(g=Math.ceil((o.y-l/2)/l)-(o.y>=0?0:1),m=o.y-g*l,p.top=parseFloat(p.top)-m+"px"),v=u-parseFloat(s.left),y=d-parseFloat(s.top),T=f-((_=2*Math.ceil((u-l/2+Math.abs(v))/240)+1)-1)/2,w=g-((b=2*Math.ceil((d-l/2+Math.abs(y))/240)+1)-1)/2,x=-(_-1)/2*l-l/2,S=-(b-1)/2*l-l/2,k=[],C=0;b>C;C++)for(k.push([]),E=0;_>E;E++)A=a._addImage(S+C*a.tileSize,x+E*a.tileSize,a.getTileURL(T+E,w+C,e),T+E,w+C,e),k[C].push(A);a._images=k,M=Math.abs(x)-parseFloat(s.left),P=Math.abs(S)-parseFloat(s.top),a._Info={topCoord:new n(T,w),topOffset:new n(x,S),topPadding:{left:M,top:P,right:_*l-M-c,down:b*l-P-h},size:new r(_,b)},a._isInit=!0,this.map.dispatchEvent(new R("onreset"))},getGridImages:function(t,e){var i=this._Info.topPadding,n=this.tileSize,r=i.left+t,o=i.top+e;return{cx:Math.ceil(r/n),cy:Math.ceil(o/n),ol:r%n,ot:o%n}},_addImage:function(t,e,i,n,r,o){var a=new this._createImg(this.tileSize,this.tileSize,o);return a.style.top=t+"px",a.style.left=e+"px",a.coordX=n,a.coordY=r,a.src=i,this.container.appendChild(a),a},Draw:function(t){var e,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y=t,_=this,b=this._Info,T=this._images,w=this.tileSize;if(b.topPadding.left-=y.x,b.topPadding.right+=y.x,b.topPadding.top-=y.y,b.topPadding.down+=y.y,b.topPadding.top>this.tileSize){if(!(e=T[0]))return;for(i=0;i<e.length;i++)e[i].parentNode.removeChild(e[i]);T.splice(0,1),b.topOffset.y+=w,b.topCoord.y+=1,b.topPadding.top-=240}if(b.topPadding.down>this.tileSize){for(n=T[T.length-1],r=0;r<n.length;r++)n[r].parentNode.removeChild(n[r]);T.splice(T.length-1,1),b.topPadding.down-=240}if(b.topPadding.left>this.tileSize){for(o=0;o<T.length;o++)T[o][0].parentNode.removeChild(T[o][0]),T[o].splice(0,1);b.topCoord.x+=1,b.topOffset.x+=w,b.topPadding.left-=240}if(b.topPadding.right>this.tileSize){for(a=0;a<T.length;a++)T[a][s=T[a].length-1].parentNode.removeChild(T[a][s]),T[a].splice(s,1);b.topPadding.right-=240}if(b.topPadding.top<0){for(l=[],u=0;u<T[0].length;u++)c=b.topOffset.y-w,d=b.topOffset.x+u*w,h=this.getTileURL(b.topCoord.x+u,b.topCoord.y-1,this.zoomLevel),p=this._addImage(c,d,h,b.topCoord.x+u,b.topCoord.y-1,this.zoomLevel),l.push(p);b.topOffset.y-=w,b.topCoord.y-=1,T.unshift(l),b.topPadding.top+=240}if(b.topPadding.down<0){for(l=[],f=T.length,u=0;u<T[0].length;u++)c=b.topOffset.y+f*w,d=b.topOffset.x+u*w,h=this.getTileURL(b.topCoord.x+u,b.topCoord.y+T.length,this.zoomLevel),p=this._addImage(c,d,h,b.topCoord.x+u,b.topCoord.y+T.length,this.zoomLevel),l.push(p);T.push(l),b.topPadding.down+=240}if(b.topPadding.left<0){for(g=0;g<T.length;g++)d=b.topOffset.x-w,c=b.topOffset.y+w*g,h=_.getTileURL(b.topCoord.x-1,b.topCoord.y+g,_.zoomLevel),m=_._addImage(c,d,h,b.topCoord.x-1,b.topCoord.y+g,this.zoomLevel),T[g].unshift(m);b.topOffset.x-=w,b.topCoord.x-=1,b.topPadding.left+=240}if(b.topPadding.right<0){for(v=T[0].length,g=0;g<T.length;g++)d=b.topOffset.x+w*v,c=b.topOffset.y+w*g,h=_.getTileURL(b.topCoord.x+v,b.topCoord.y+g,_.zoomLevel),m=_._addImage(c,d,h,b.topCoord.x+v,b.topCoord.y+g,this.zoomLevel),T[g].push(m);b.topPadding.right+=240}},_centerAndZoom:function(t,e){var i,n,r=this,o=this._images;if(r.bitmapCenter=t,r.zoomLevel=e,r._isInit){if(o.length>0){for(i=0;i<o.length;i++)for(n=0;n<o[i].length;n++)o[i][n].parentNode.removeChild(o[i][n]);o=[]}
1d(this.map.platform,0,0),d(this.map.mask,0,0)}r.centerBitmap(t,e)},_zoomChange:function(){var t,e,i,n=this,r=n.zoomLevel,o=n._images;if(o.length>0)for(e=0;e<o.length;e++)for(i=0;i<o[e].length;i++)(t=o[e][i]).src=n.getTileURL(t.coordX,t.coordY,r)},getTileURL:function(t,e,i){return N?Z.hk.url+"maptile.aspx?z="+i+"&x="+t+"&y="+e+"&iscensus=0":Z.hk.url+"mobilemaptile.aspx?z="+i+"&x="+t+"&y="+e+"&iscensus=0"},_createImg:function(t,e,i){var n,r=it.ce("img",{style:"position:absolute;height:"+t+"px;width:"+e+"px;",width:t,height:e});return r.src=F.imgPath+"transparent.gif",(n=r.style).WebkitUserSelect="none",n.zIndex=-200,it.on(r,"error",(function(){r.src=F.imgPath+"transparent.gif"})),r}}),Q={Class:["TOP_LEFT","TOP_RIGHT","BOTTOM_LEFT","BOTTOM_RIGHT"],TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_LEFT:3,BOTTOM_RIGHT:4},J={NORMAL:1,SIMPLE:2,PAN:3,ZOOM:4},p._inherits(D,"Control"),it.extend(p.prototype,{initialize:function(t){var e=this;return e.map=t,e._container?(e._config.map.appendChild(e._container),e._container):null},initialize:function(t){var e=this;return e.map=t,e._container?(e._config.map.appendChild(e._container),e._container):null},_added:function(t){!this._container&&this.initialize&&(this._container=this.initialize(t)),this._setStyle(),this.setAnchor(this.defaultAnchor)},_render:function(){var t=function(t,e){return t.insertAdjacentHTML("beforeEnd","<div unselectable='on'></div>"),t.lastChild}(this._config.map.container);return this._container=t,t},_setStyle:function(){var t,e=this._container;e&&((t=e.style).position="absolute",t.zIndex=this._config.zIndex||"10",t.MozUserSelect="none",it.on(e,"contextmenu",l))},setAnchor:function(t){var e,i=this.defaultAnchor,n=this.defaultOffset;switch((t||!isNaN(t))&&(i=t),e=this._container,i){case Q.TOP_LEFT:e.style.top=n.height+"px",e.style.left=n.width+"px";break;case Q.TOP_RIGHT:e.style.top=n.height+"px",e.style.right=n.width+"px";break;case Q.BOTTOM_LEFT:e.style.bottom=n.height+"px",e.style.left=n.width+"px";break;case Q.BOTTOM_RIGHT:e.style.bottom=n.height+"px",e.style.right=n.width+"px"}},show:function(){var t=this;t._visible||(t._visible=!1,t._container.style.display="")},hide:function(){var t=this;t._visible&&(t._visible=!0,t._container.style.display="none")},getDom:function(){return this._container},remove:function(){this._container&&this._container.removeChild(this._container)}}),s.prototype.addControl=function(t){t&&(t._added(this),this.dispatchEvent(new R("onaddcontrol")))},(f.prototype=new p).initialize=function(t){var e=g("div","CTMap_NavigationControl",t.getContainer());switch(this.defaultControlType){case J.NORMAL:this.pan2(e,t),this.z2(e,t).style.marginLeft="20px";break;case J.SIMPLE:this.simple(e,t);break;case J.ZOOM:this.zoom(e,t);break;case J.PAN:this.pan(e,t)}return e},(tt=f.prototype).zoom=function(t,e){var i=g("div","Zoom_Container",t),n=g("div","CTMapControl CTMap_Zoom_Out",i),r=g("div","CTMapControl CTMap_Zoom_In",i);return m(n,(function(){e.zoomIn()})),m(r,(function(){e.zoomOut()})),i},tt.pan=function(t,e){var i=g("div","Pan_Container",t),n=g("div","CTMapControl Pan_Center_Top",i),r=g("div","CTMapControl Pan_Left_Middle",i),o=g("div","CTMapControl Pan_Right_Middle",i),a=g("div","CTMapControl Pan_Center_Bottom",i),s=e.getSize();return m(n,(function(){e.panBy(0,s.height/2)})),m(o,(function(){e.panBy(-s.width/2,0)})),m(r,(function(){e.panBy(s.width/2,0)})),m(a,(function(){e.panBy(0,-s.height/2)})),i},tt.pan2=function(t,e){var i=g("div","Normal_Pan_container",t),n=g("div","Normal_Pan_Top",i,"åä¸å¹³ç§»"),r=g("div","Normal_Pan_Left",i,"å左平移"),o=g("div","Normal_Pan_Middle",i,"åå°åé»"),a=g("div","Normal_Pan_Right",i,"åå³å¹³ç§»"),s=g("div","Normal_Pan_Bottom",i,"åä¸å¹³ç§»"),l=e.getSize();m(n,(function(){e.panBy(0,l.height/2)})),m(a,(function(){e.panBy(-l.width/2,0)})),m(r,(function(){e.panBy(l.width/2,0)})),m(s,(function(){e.panBy(0,-l.height/2)})),m(o,(function(){e.reset()}))},tt.simple=function(t,e){var i=this.pan(t,e),n=g("div","CTMapControl Pan_Left_Top",i),r=g("div","CTMapControl Pan_Right_Top",i),o=g("div","CTMapControl Pan_Left_Bottom",i),a=g("div","CTMapControl Pan_Right_Bottom",i),s=g("div","CTMapControl Pan_Middle_Middle",i),l=e.getSize();return m(n,(function(){e.panBy(l.width/2,l.height/2)})),m(r,(function(){e.panBy(-l.width/2,l.height/2)})),m(o,(function(){e.panBy(l.width/2,-l.height/2)})),m(a,(function(){e.panBy(-l.width/2,-l.height/2)})),m(s,(function(){e.reset()})),this.zoom(t,e).style.marginLeft="23px",i},tt.z2=function(t,e){var i=g("div","Z2_Container",t),n=g("div","CTMapControl Z2_Out",i,"縮å°ä¸ç´"),r=g("div","CTMapControl Z2_In",i,"æ¾å¤§ä¸ç´"),o=g("div","Z2_Button",i,"æå層ç´");
1return g("div","CTMap_zoomBar",i),m(n,(function(){e.zoomOut()})),m(r,(function(){e.zoomIn()})),this.setPosition(o,e.getZoomLevel()),this.setBar(o,e),i},tt.setBar=function(t,e){function i(e){var i,n=e.clientY||e.y,o=n-r,a=parseFloat(t.style.top)||23;a+o>=23&&133>=a+o&&(t.style.top=a+o+"px",i=parseFloat((a-23)/10).toFixed(0),i=parseFloat(i)+1,t.innerHTML=i),r=n}function n(){var r=parseFloat(t.style.top)||23,o=parseFloat((r-23)/10).toFixed(0);o=parseFloat(o)+1,e.getZoomLevel()!=o&&e.zoomTo(o),it.un(document,"mousemove",i),it.un(document,"mouseup",n)}var r,o;it.on(t,"mousedown",(function(t){r=t.clientY||t.y,it.on(document,"mousemove",i),it.on(document,"mouseup",n)})),o=this,e.addEventListener("onzoomEnd",(function(){o.setPosition(t,this.getZoomLevel())})),e.addEventListener("onreset",(function(){o.setPosition(t,this.getZoomLevel())}))},tt.setPosition=function(t,e){t.style.top=10*(e-1)+23+"px",t.innerHTML=e},(v.prototype=new p).initialize=function(t){var e=g("div","CTMap_Scale",t.getContainer()),i=g("img","CTMap_Scale",e);return i.src=F.scalePath+"z"+t.getZoomLevel()+"_scale.gif",t.addEventListener("onzoomEnd",(function(){i.src=F.scalePath+"z"+t.getZoomLevel()+"_scale.gif"})),e},(y.prototype=new p).initialize=function(t){var e=g("div","CTMap_SearchBox",t.getContainer());return e.innerHTML=this.content,e},(_.prototype=new p).initialize=function(t){var e=g("div","CTMap_CopyRight",t.getContainer());return e.innerHTML=this.content,e},b._inherits(D,"ContentMenu"),it.extend(b.prototype,{initialize:function(t){this.map=t,t.getContainer().appendChild(this.container),t.overlays.contentMenu=this},render:function(){var t,e=document.createElement("div");return e.className="CTMap_ContentMenu",(t=e.style).visibility="hidden",t.width=(this.width||100)+"px",e},remove:function(){this.container.parentNode.removeChild(this.container),this.map.overlays.contentMenu=null},addMenuItem:function(t){if(t&&"MenuItem"==t.toString()){var e=t.initialize(this);this.items.push(e)}},removeMenuItem:function(t){var e,i;if(t&&"MenuItem"==t.toString())for(e=this.items,i=0;i<e.length;i++)(e[i]==t||e[i].Guid==t.Guid)&&(e[i].remove(),e.splice(i,1))},addSeparator:function(){var t=g("div","CTMap_Separator",this.container);this.seqs.push({type:"separator",dom:t})},removeSeparator:function(t){isNaN(t)||(this.seqs[t].dom.removeChild(this.seqs[t].dom),this.seqs.splice(t,1))},open:function(t){var e=new R("onopen"),i=this.container.style,r=this.container,o=r.clientWidth||r.offsetWidth,a=r.clientHeight||r.offsetHeight,s=t.offsetY+5,l=t.offsetX+5,u=this.map.getSize();(s+a>u.height||l+o>u.width)&&(s=s-10-a,l=l-10-o),i.top=s+"px",i.left=l+"px",i.visibility="visible",this.position=new n(t.offsetX+5,t.offsetY+5),e.extend(t),e.pixel=this.position,e.point=this.map.pixelToPoint(this.position),this.dispatchEvent(e)},close:function(){var t=new R("onclose");this.container.style.visibility="hidden",this.dispatchEvent(t)}}),T._inherits(D,"MenuItem"),it.extend(T.prototype,{initialize:function(t){var e,i;return"ContentMenu"==t.toString()&&(e=this,this.contentMenu=t,(i=g("div","CTMap_MenuItem",t.container)).innerHTML=this.Text,it.on(i,"click",(function(i){e.contentMenu.close(),e.callback(i,t.position,t.map.pixelToPoint(t.position))})),it.on(i,"mouseover",(function(){e.mouseOver()})),it.on(i,"mouseout",(function(){e.mouseOut()})),this.dom=i),this},setText:function(t){this.Text=t,this.dom.innerHTML=t},enable:function(){this.isEnable=!0,this.dom.style.display="block"},disable:function(){this.isEnable=!1,this.dom.style.display="none"},getDom:function(){return this.dom},remove:function(){this.dom.parentNode.removeChild(this.dom)},mouseOut:function(){it.rc(this.dom,"MenuItemSelect")},mouseOver:function(){it.ac(this.dom,"MenuItemSelect")}}),s.prototype.addContextMenu=function(t){"ContentMenu"==t.toString()&&t.initialize(this)},s.prototype.closeContextMenu=function(){this.overlays.contentMenu&&this.overlays.contentMenu.close()},CTMap.Do((function(t){it.on(document,"click",(function(){t.closeContextMenu()}))})),CTMap.Do((function(t){var e=new w;t.platform.insertAdjacentHTML("beforeEnd",e.render(t.config.defaultCursor)),e.container=t.platform.lastChild,t.doms.zoomer=e,e.map=t,t.addEventListener("onzoomChange",(function(t){e.start(t)}))}
1)),w.prototype.render=function(t){var e=['<div id=zoomer style="position:absolute;z-index:2;top:0px;left:0px;overflow:hidden;visibility:hidden;cursor:'+t+'">'];return e.push('<div class="CTMap_zoomer" style="top:0;left:0;"></div>'),e.push('<div class="CTMap_zoomer" style="top:0;right:0;"></div>'),e.push('<div class="CTMap_zoomer" style="bottom:0;left:0;"></div>'),e.push('<div class="CTMap_zoomer" style="bottom:0;right:0;"></div>'),e.push("</div>"),e.join("")},w.prototype.start=function(t){var e,i,n,r;t.changeCenter||(e=this.map.getSize(),t.offsetX=e.width/2,t.offsetY=e.height/2),i=this.container,t.isZoomIn?(i.style.width="120px",i.style.height="91px",i.style.left=t.offsetX-60+"px",i.style.top=t.offsetY-45+"px"):(i.style.width="60px",i.style.height="48px",null==t.offsetX?(i.style.left=t.clientX-30+"px",i.style.top=t.clientY-24+"px"):(i.style.left=t.offsetX-30+"px",i.style.top=t.offsetY-24+"px")),n=i.children,t.isZoomIn?(n[0].style.backgroundPosition="-7px -7px",n[1].style.backgroundPosition="0 -7px",n[2].style.backgroundPosition="-7px 0",n[3].style.backgroundPosition="0 0"):(n[0].style.backgroundPosition="0 0",n[1].style.backgroundPosition="-7px 0",n[2].style.backgroundPosition="0 -7px",n[3].style.backgroundPosition="-7px -7px"),i.style.visibility="visible",r=0,this.timer=new a({fps:20,duration:240,transition:j.easeInQuad,delay:100,render:function(e){var n,o=60*e-r;r=60*e,t.isZoomIn?(n=parseFloat(i.style.width)-2*o,i.style.width=(n>=0?n:0)+"px",i.style.height=parseFloat(i.style.height)-o+"px",i.style.left=parseFloat(i.style.left)+o+"px",i.style.top=parseFloat(i.style.top)+o/2+"px"):(i.style.width=parseFloat(i.style.width)+2*o+"px",i.style.height=parseFloat(i.style.height)+o+"px",i.style.left=parseFloat(i.style.left)-o+"px",i.style.top=parseFloat(i.style.top)-o/2+"px")},finish:function(){i.style.visibility="hidden"}})},(et=x.prototype).setImageUrl=function(t){t&&(this._config.imageUrl=t)},et.getImageUrl=function(){return this._config.imageUrl},et.setSize=function(t){t&&(this._config.size=new r(t.width,t.height))},et.getSize=function(){return this._config.size},et.setOffset=function(t){t&&(this._config.offset=new r(t.width,t.height))},et.setImageOffset=function(t){t&&(this._config.imageOffset=new r(t.width,t.height))},et.getImageOffset=function(){return this._config.imageOffset},et.toString=function(){return"Icon"},et.getInfoWindowOffset=function(){return this._config.infoWindowOffset},k._inherits(D,"Overlay"),it.extend(k.prototype,{_i:function(t){this.dom||"function"!=typeof this.initialize||(this.dom=this.initialize(t),this.dom&&(this.dom.style.WebkitUserSelect="none",this.dom.style.position="absolute")),this.draw()},initialize:function(){throw"initialize errer"},draw:function(){throw"draw errer"},remove:function(){var t;this.dom&&this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),"Grash"===this._type&&(t=this.svgdom)&&t.parentNode&&t.parentNode.removeChild(t),this.dom=null,this.dispatchEvent(new R("onremove"))},hide:function(){this.dom.style.display="none"},show:function(){this.dom.style.display="block"},isVisible:function(){return!!this.dom&&"none"!=this.dom.style.display&&"hidden"!=this.dom.style.visibility}}),C._inherits(D,"InfoWindow"),it.extend(C.prototype,{setConfig:function(t){if(t)for(var e in t)this._config[e]=t[e]},render:function(){var t,e,i,n,r,o=this,a=this._config,s=o.map.overlays.config;return s.infoWindowIsInit?(this.isInitShadow=!1,s.infoWindow):(t=S("CTMap_InfoWindow",a.height,a.width,o.map.doms.infowindow),e=S("CTMap_IWTitle",25,a.width-5,t),i=S("CTMap_IWClose",12,12,t),it.on(i,"click",(function(){o.close()})),n=S("CTMap_IWContent",a.height-41,a.width-10,t),r=it.ce("img",{className:"CTMap_IWTail",style:["top:",a.height,"px;left:"+(a.width/2-26),"px;width:",51,"px;height:",31,"px;position:absolute;"].join(""),src:F.imgPath+"ct_iw.png"}),t.appendChild(r),s.infoWindow=t,s.infoWindowIsInit=!0,o.childDom.title=e,o.childDom.content=n,t)},setContent:function(t){var e,i=this.dom;for(e=0;e<i.childNodes.length;e++)"CTMap_IWContent"===i.childNodes[e].className&&(i.childNodes[e].innerHTML=t)},setTitle:function(t){var e,i=this.dom;for(e=0;e<i.childNodes.length;e++)"CTMap_IWTitle"===i.childNodes[e].className&&(i.childNodes[e].innerHTML=t)},shadow:function(){function t(t,e,i){var n,r=document.createElement("img");return r.src=F.imgPath+"ct_iwby.png",t.appendChild(r),t.style.position="absolute",(n=r.style).position="absolute",n.height="370px",n.width="1144px",n.left=e+"px",n.top=i+"px",n.zIndex=1,r}var e,i,n=this,r=this._config,o=this.map.doms.shadow,a=r.width+43,s=n.cD("",30,70,o,!0,64,0);t(s,-322,0),t(s=n.cD("",30,a-128,o,!0,134,0),-392,0),t(s=n.cD("",30,70,o,!0,134+a-128,0),-1030,0),t(s=n.cD("",e=.5*r.height-30,112,o,!0,29,30),-286,-30),t(s=n.cD("",e,a-156,o,!0,141,30),-388,-30),t(s=n.cD("",e,112,o,!0,186+a-201,30),-1008,-30),t(s=n.cD("",60,50,o,!0,0,e+30),-14,-310),t(s=n.cD("",60,(i=r.width/2-26)-50,o,!0,50,e+30),-255,-310),t(s=n.cD("",60,100,o,!0,i,e+30),-490,-310),t(s=n.cD("",60,a-i-150+26,o,!0,i+100,e+30),-255,-310),t(s=n.cD("",60,70,o,!0,i+100+(a-i-150+26),e+30),-754,-310)}
1,cD:function(t,e,i,n,r,o,a,s){var l=document.createElement("div");return l.className=t||"",l.style.height=e+"px",l.style.width=i+"px",l.WebkitUserSelect="none",n&&n.appendChild(l),r&&(l.style.overflow="hidden"),(o||a)&&(l.style.left=o+"px",l.style.top=a+"px"),l.style.zIndex=s||1,this.shadows.push(l),l},setPosition:function(t){var e,i,r,o=this._config;"Pixel"==t.toString()&&(e=this.map.doms.infowindow.style,i=this.map.doms.shadow.style,this.map.getSize(),r=new n(0,0),this._config.overlay&&(r="function"==typeof this._config.overlay.getIcon?this._config.overlay.getIcon().getInfoWindowOffset():new n(0,0)),e.top=t.y-o.height-30-r.y+"px",e.left=t.x-o.width/2+26-r.x+"px",i.left=t.x-o.width/2+"px",i.top=t.y-o.height-30+.5*this._config.height-r.y+"px")},redraw:function(){var t,e=this.shadows;for(t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t]);e=[]},open:function(){var t,e,i,n,r,o,a,s=this;s.map.overlays.infoWindow=s,s.setContent(s._config.content),s.setTitle(s._config.title),t=s._config.overlay.getPosition(),s.setPosition(t),135==s._config.height&&300==s._config.width&&(s.map.doms.shadow.style.display="block"),s.map.doms.infowindow.style.display="block",s.map.overlays.config.infoWindowIsHidden=!1,e=s.map.getSize(),i=s._config.overlay,n=t.y-s._config.height-40-parseFloat(i.height||i.aDom.clientHeight||i.dom.clientHeight),o=t.x+s._config.width/2+36-e.width,(0>(r=t.x-s._config.width/2+16)||0>n||o>0)&&(r=0>r?-r:0,s.map.panBy(r=o>0?-o:r,n=0>n?-n:0)),a=new R("onopenInfoWindow"),s.map.dispatchEvent(a)},_open:function(){var t,e,i=this;i.map.overlays.infoWindow=i,i.setContent(i._config.content),i.setTitle(i._config.title),t=i._config.overlay.getPosition(),i.setPosition(t),135==i._config.height&&300==i._config.width&&(i.map.doms.shadow.style.display="block"),i.map.doms.infowindow.style.display="block",i.map.overlays.config.infoWindowIsHidden=!1,e=new R("onopenInfoWindow"),i.map.dispatchEvent(e)},close:function(){if(!this.map.overlays.config.infoWindowIsHidden){this.map.doms.shadow.style.display="none",this.map.doms.infowindow.style.display="none",this.map.overlays.config.infoWindowIsHidden=!0;var t=new R("oncloseInfoWindow");this.map.dispatchEvent(t)}},_hiiden:function(){this.map.doms.shadow.style.display="none",this.map.doms.infowindow.style.display="none"}}),E._inherits(D,"Lable"),it.extend(E.prototype,{setOptions:function(t){for(var e in t=t||{})this.config[e]=t[e]},initiate:function(){var t=this,e=this.config;e.icon||(e.icon=new x(F.imgPath+"transparent.gif",new r(1,1))),t.dom=t.render(),t.setStyle(t.config.style),t.setPosition(),e.map.overlays.lables.push(this)},setPosition:function(){var t=this.config.icon,e=this.config.map.pointToPixel(this.config.point);this.dom.style.left=e.x+t._config.offset.x+"px",this.dom.style.top=e.y+t._config.offset.y+"px"},getPosition:function(){var t=this.config.icon;return new n(parseFloat(this.dom.style.left)-t._config.offset.x,parseFloat(this.dom.style.top)-t._config.offset.y)},render:function(){var t,e,i,n,r=this,o=this.config.icon;return o.getSize(),(t=S("CTMap_Lable",r.config.height,r.config.width)).style.lineHeight=r.config.height+"px",t.className="CTMap_Lable",t.style.position="absolute",t.style.overflow="hidden",t.style.cursor="pointer",t.style.zIndex=2,it.on(t,"click",(function(t){r.click(t)})),(e=document.createElement("img")).src=o._config.imageUrl,i=o.getImageOffset(),e.style.top=i.y+"px",e.style.left=i.x+"px",e.className="CTMap_Lable_Icon",t.appendChild(e),(n=document.createElement("lable")).innerHTML=r.config.text,n.className="CTMap_Lable_Text",t.appendChild(n),t},setStyle:function(t){var e,i=this.dom;for(e in t=t||{})i.style[e]=t[e]},openInfoWindow:function(t){(t||this.config.infoWindow)&&(this.config.infoWindow=this.config.infoWindow||t,t._config.overlay=this,t.open())},setPoint:function(t){"Point"==t.toString()&&(this.config.point=t,this.setPosition())},getPoint:function(){return this.config.point},click:function(){this.dispatchEvent(new R("onclick"))},getIcon:function(){return this.config.icon},hide:function(){var t=this;t.config.infoWindow&&t.config.infoWindow.close(),t.dom.style.display="none"},_hide:function(){var t=this;t.config.infoWindow&&t.config.infoWindow._hiiden(),t.dom.style.display="none"},show:function(){this.setPosition(),this.dom.style.display="block"},remove:function(){var t=this;t.dom&&t.dom.parentNode&&t.dom.parentNode.removeChild(t.dom)}}),A._inherits(D,"Marker"),it.extend(A.prototype,{setOptions:function(t){for(var e in t=t||{})this.config[e]=t[e]},initiate:function(){var t=this,e=this.config;e.icon||(e.icon=new x),t.dom=t.render(),t.setPosition(),e.map.overlays.markers.push(this)},setZIndex:function(t){this.zindex=t},getZIndex:function(){return this.zindex||2},setID:function(t){this.id=t},getID:function(){return this.id},setPosition:function(){var t=this,e=this.config.icon,i=this.config.map.pointToPixel(this.config.point);t.dom.style.left=i.x+e._config.offset.x+"px",t.dom.style.top=i.y+e._config.offset.y+"px",t.dom.style.zIndex=this.config.zindex||2},setLable:function(t){var e=this.config.map;"Lable"==t.toString()&&(e.addOverlay(t),t.setPoint(this.config.point),t.setStyle({marginLeft:"20px"}))},setPoint:function(t){"Point"==t.toString()&&(this.config.point=t,this.setPosition())},getPoint:function(){return this.config.point},getPosition:function(){var t=this.config.icon;return new n(parseFloat(this.dom.style.left)-t._config.offset.x,parseFloat(this.dom.style.top)-t._config.offset.y)},render:function(){var t,e,i,n,r,o=this,a=this.config.icon;return this.id=this.config.id,this.zindex=this.config.zindex,(e=S("CTMap_Marker",(t=a.getSize()).height,t.width)).style.position="absolute",e.style.overflow="hidden",e.style.cursor="pointer",(i=function(t,e){var i=document.createElement("img");return i.style.position="absolute",i.style.zIndex=1,i.WebkitUserSelect="none",i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1},i}()).src=a._config.imageUrl,n=a.getImageOffset(),i.style.top=n.y+"px",i.style.left=n.x+"px",e.appendChild(i),(r=document.createElement("span")).appendChild(e),r.style.position="absolute",r.style.zIndex=this.config.zindex||2,this.aDom=e,it.on(i,"click",(function(){o.click()}
1)),it.on(i,"mouseover",(function(t){o.mouseOver(t)})),it.on(i,"mouseout",(function(t){o.mouseOut(t)})),this.icon=i,r},openInfoWindow:function(t){(t||this.config.infoWindow)&&(this.config.infoWindow=this.config.infoWindow||t,t._config.overlay=this,t.open())},click:function(){this.dispatchEvent(new R("onclick"))},getIcon:function(){return this.config.icon},setIcon:function(t){var e,i,n,r;if("Icon"==t.toString()){if(this.config.icon==t||this.config.icon.getImageUrl()==t.getImageUrl())return;this.config.icon=t,e=this.icon,n=(i=this.config.icon).getSize(),e.src=i._config.imageUrl,r=i.getImageOffset(),e.style.top=r.y+"px",e.style.left=r.x+"px",this.aDom.style.width=n.width+"px",this.aDom.style.height=n.height+"px",this.setPosition()}},hide:function(){var t=this;t.config.infoWindow&&t.config.infoWindow.close(),t.dom.style.display="none"},_hide:function(){var t=this;t.config.infoWindow&&t.config.infoWindow._hiiden(),t.dom.style.display="none"},show:function(){this.setPosition(),this.dom.style.display="block"},remove:function(){var t=this;t.dom&&t.dom.parentNode&&t.dom.parentNode.removeChild(t.dom)},mouseOut:function(){this.dispatchEvent(new R("onmouseOut"))},mouseOver:function(){this.dispatchEvent(new R("onmouseOver"))},mouseUp:function(){this.dispatchEvent(new R("onmouseUp"))},setAnimation:function(t){var e,i,n,r=this;return t?void(this.animaTimer||this.animaTimer>0||(e=this.aDom.style,i=1,n=parseFloat(e.top||0),this.top=n,t==CTMap.Animations.ANIMATION_BOUNCE&&(e.top=n-40+"px",this.animaTimer=setInterval((function(){var t=parseFloat(e.top)+i;e.top=t+"px",n>t?i+=1:i*=i>0?-1:0}),30)),t==CTMap.Animations.ANIMATION_DROP&&(e.top=n-50+"px",this.animaTimer=setInterval((function(){var t=parseFloat(e.top)+i;e.top=t+"px",n>t?i+=1:(i*=i>0?-.8:0,Math.abs(i)<1&&(clearInterval(r.animaTimer),r.animaTimer=0))}),20)),this.animaType=t)):void(this.animaTimer&&(clearInterval(this.animaTimer),this.animaTimer=0,this.top&&(this.aDom.style.top=this.top+"px")))}}),CTMap.Animations={ANIMATION_BOUNCE:1,ANIMATION_DROP:2},s.prototype.addOverlay=function(t){var e=this;"Marker"==t.toString()?e.doms.markers.appendChild(t.dom):"Lable"==t.toString()?e.doms.lables.appendChild(t.dom):(t._i(this),e.overlays.overlays.push(t))},s.prototype.clearMarkers=function(){var t,e=this.overlays;for(t=0;t<e.markers.length;t++)e.markers[t].remove();e.markers=[]},s.prototype.clearlables=function(){var t,e=this.overlays;for(t=0;t<e.lables.length;t++)e.lables[t].remove();e.lables=[]},s.prototype.clearOverlays=function(t){var e,i,n=this.overlays;for(n.infoWindow&&n.infoWindow.close(),t&&"Marker"!=t||this.clearMarkers(),t&&"Lable"!=t||this.clearlables(),i=0;i<n.overlays.length;i++)e=n.overlays[i],t&&t!=e.toString()||e.remove(),t||(n.overlays=[])},s.prototype.clearOverlays=function(){var t,e,i,n,r=this.overlays;for(r.infoWindow&&r.infoWindow.close(),t=0;t<r.markers.length;t++)r.markers[t].remove();for(e=0;e<r.lables.length;e++)r.lables[e].remove();for(i=0;i<r.overlays.length;i++)r.overlays[i].remove(),"Grash"===r.overlays[i]._type&&(n=r.overlays[i].svgdom)&&n.parentNode&&n.parentNode.removeChild(n);r.markers=[],r.lables=[],r.overlays=[]},s.prototype.removeOverlay=function(t){"Marker"==t.toString()&&(t.dom&&t.dom.parentNode&&t.dom.parentNode.removeChild(t.dom),this.overlays.overlays.splice(t,1))},s.prototype.redraw=function(){var t,e,i,n,r,o,a=this.overlays.markers;for(t=0;t<a.length;t++)a[t].show(),-1==a[t].animaTimer&&(a[t].animaTimer=0,a[t].setAnimation(a[t].animaType));for(e=this.overlays.lables,i=0;i<e.length;i++)e[i].show();for(n=this.overlays.overlays,r=0;r<n.length;r++)n[r].show(),"Grash"===n[r]._type&&n[r].svgdom&&n[r].svgdom.parentNode&&n[r].svgdom.parentNode.removeChild(n[r].svgdom),n[r].draw();(o=this.overlays.infoWindow)&&!this.overlays.config.infoWindowIsHidden&&o._open()},s.prototype.openInfoWindow=function(t,e){("InforWindow"==t.toString()||"Point"==e.toString())&&new A(e,{map:this,icon:new x(F.imgPath+"transparent.gif",new r(1,1),{offset:new n(1,1),imageOffset:new n(1,1),infoWindowOffset:new n(1,1)})}).openInfoWindow(t)},s.prototype.closeInfoWindow=function(){var t=this.overlays.infoWindow;t&&t.close()},s.prototype.getMarkers=function(){return this.overlays.markers},s.prototype.getLables=function(){return this.overlays.lables},CTMap.Do((function(t){t.addEventListener("onzoomStart",(function(){var e,i,n,r,o,a,s;for(e=0;e<t.overlays.markers.length;e++)(i=t.overlays.markers[e]).animaTimer&&(i.setAnimation(),i.animaTimer=-1),t.overlays.markers[e]._hide();for(n=this.overlays.lables,r=0;r<n.length;r++)n[r]._hide();for(o=this.overlays.overlays,a=0;a<o.length;a++)o[a].hide(),"Grash"===o[a]._type&&o[a].svgdom&&(o[a].svgdom.style.display="none");(s=this.overlays.infoWindow)&&!this.overlays.config.infoWindowIsHidden&&s._hiiden()})),t.addEventListener("onzoomEnd",(function(){t.redraw()})),t.addEventListener("onreset",(function(){t.redraw()}))})),s.prototype.getBounds=function(t,e){var i;return t?new o(this,t,e):(i=this.getSize(),new o(this,this.getCenter(),i))},CTMap.Map=s,CTMap.Point=i,CTMap.Pixel=n,CTMap.Size=r,CTMap.Bounds=o,CTMap.InfoWindow=C,CTMap.Icon=x,CTMap.Overlay=k,CTMap.Marker=A,CTMap.Lable=E,CTMap.Anchor=Q,CTMap.ControlType=J,CTMap.Control=p,CTMap.NavigationControl
1=f,CTMap.SearchBoxControl=y,CTMap.ScaleControl=v,CTMap.ContextMenu=b,CTMap.MenuItem=T,CTMap.Polygon=P,CTMap.Polyline=I,CTMap.Circle=L,CTMap.EstateLable=O,CTMap.Do((function(t){t.addControl(new _)})),it.extend(M.prototype,{init:function(){var t,e,i,n=this,r=n.map,o=r.getPanes().canvos,a=r.getSize();0==it.Browser.ie||it.Browser.ie>8?(e=n.createE("svg",{width:a.width,height:a.height,style:"position:relative;left:0px;top:0px;"}),o.appendChild(e),t=n.createE("rect",{width:a.width,height:a.height,x:0,y:0,style:"position:absolute;left:0px;top:0px;opacity: 0.01;"}),e.appendChild(t),i=n.createE("g",{width:a.width,height:a.height,style:"position:relative;left:0px;top:0px;"}),e.appendChild(i),this.container=i,it.Browser.mobile?c(e,r):u(e,r),this.mask=t):(document.namespaces&&!document.namespaces.v&&document.namespaces.add("v","urn:schemas-microsoft-com:vml"),this.container=o,o.style.position="relative"),this.map.addEventListener("onreset",(function(){var t=n.container.style;t.left="0px",t.top="0px",(0==it.Browser.ie||it.Browser.ie>8)&&(n.container.setAttribute("transform","translate(0,0)"),n.translate=null)}))},createE:function(t,e){var i,n;for(n in i=it.Browser.ie<=8&&it.Browser.ie>0?document.createElement(t):document.createElementNS(this.ns,t),e=e||{})i.setAttribute(n,e[n]);return i},getContainer:function(){return this.container},setPosition:function(t){var e,i=this.container;0==it.Browser.ie||it.Browser.ie>8?((e=this.translate||{x:0,y:0}).x+=t.x,e.y+=t.y,i.setAttribute("transform","translate("+e.x+","+e.y+")"),this.translate=e):(i.style.top=parseFloat(i.style.top)+t.y+"px",i.style.left=parseFloat(i.style.left)+t.x+"px")},_getPath:function(t,e){var i,n,r,o,a,s=t,l=[],u=this.map;if(s.length<2)return"";if(i=u.pointToPixel(s[0]),it.Browser.ie<=8&&it.Browser.ie>0){for(l.push("M"),l.push(parseInt(i.x)+","+parseInt(i.y)),l.push("L"),n=1;n<s.length;n++)r=u.pointToPixel(s[n]),l.push(parseInt(r.x)+","+parseInt(r.y));e&&(l.push("X"),l.push("E"))}else{for(l.push("M"),l.push(i.x+","+i.y),l.push("L"),o=1;o<s.length;o++)a=u.pointToPixel(s[o]),l.push(a.x+","+a.y);e&&l.push("Z")}return l.join(" ")},_setPath:function(t,e){t.setAttribute(it.Browser.ie<=8&&it.Browser.ie>0?"path":"d",e)},_setRadius:function(t,e){it.Browser.ie<=8&&it.Browser.ie>0?t.setAttribute("r",e):(t.style.width=2*e+"px",t.style.height=2*e+"px")},_setCirclePoint:function(t,e){it.Browser.ie<=8&&it.Browser.ie>0?(t.setAttribute("cx",e.x),t.setAttribute("cy",e.y)):(t.style.top=e.y+"px",t.style.left=e.left+"px")}}),(P.prototype=new k).initialize=function(){this._className="Polygon",this._type="Grash";var t=document.createElement("span");return t.style.top="0px",t.style.left="0px",this.config.map.getPanes().overlays.appendChild(t),t},P.prototype.draw=function(){var t,e,i,n,r,o,a,s=this.grash,l=this.config.map,u=this.config,c=this._points,d=s._getPath(this._points,!0);c.length<2||(e=l.getSize(),i=l.pointToPixel(c[0]),(n=this.dom.style).left=i.x+"px",n.top=i.y+"px",it.Browser.ie<=8&&it.Browser.ie>0?(t=s.createE(["<v:shape strokeweight='",u.borderWidth,"' strokecolor='",u.borderColor,"' path='"+d+"' ","style='","width:",e.width+"px;","height:",e.height+"px;","filter:alpha(opacity="+100*u.opacity+")","left:0;top:0;position:absolute;cursor:pointer;behavior:url(#default#VML);' >"].join(""),{CoordSize:e.width+","+e.height})).fillcolor=u.backgroundColor:t=s.createE("path",{d:d,fill:u.backgroundColor,stroke:u.borderColor,strokeWidth:u.borderWidth+"px",style:"cursor:pointer;opacity:"+u.opacity}),s.getContainer().appendChild(t),this.svgdom=t,r=this,it.on(t,"onmouseover",(function(t){r.mouseOver(t)})),it.on(t,"onmouseout",(function(t){r.mouseOut(t)})),it.on(t,"onmousemove",(function(t){r.mouseMove(t)})),o=0,a=0,it.on(t,"onmousedown",(function(t){o=t.clientX,a=t.clientY})),it.on(t,"onmouseup",(function(t){o==t.clientX&&a==t.clientY&&r.click()})))},it.extend(P.prototype,{setPoints:function(t){var e;!t||t.length<2||(e=this.grash._getPath(t),this.grash._setPath(this.svgdom,e))},click:function(t){this.dispatchEvent(new R("onclick").extend(t))},mouseOver:function(){this.dispatchEvent(new R("onmouseOver"))},mouseOut:function(){this.dispatchEvent(new R("onmouseOut"))},mouseMove:function(t){this.dispatchEvent(new R("onmouseMove").extend(t))}}),(I.prototype=new k).initialize=function(){this._className="PolyLine",this._type="Grash";var t=document.createElement("span");return t.style.top="0px",t.style.left="0px",this.config.map.getPanes().overlays.appendChild(t),t},I.prototype.draw=function(){var t,e,i,n,r,o=this.grash,a=this.config.map,s=this.config,l=this._points,u=o._getPath(this._points);l.length<2||(e=a.getSize(),i=a.pointToPixel(l[0]),(n=this.dom.style).left
1=i.x+"px",n.top=i.y+"px",it.Browser.ie<=8&&it.Browser.ie>0?((t=o.createE(["<v:shape strokeweight='",s.borderWidth,"' strokecolor='",s.borderColor,"' path='"+u+"' ","style='","width:",e.width+"px;","height:",e.height+"px;",,"left:0;top:0;position:absolute;cursor:pointer;behavior:url(#default#VML);' >"].join(""),{CoordSize:e.width+","+e.height})).fillcolor="black",t.filled="f"):t=o.createE("path",{d:u,stroke:s.borderColor,fill:"none","stroke-width":s.borderWidth+"px",style:"cursor:pointer;"}),o.getContainer().appendChild(t),this.svgdom=t,r=this,it.on(t,"onmouseover",(function(t){r.mouseOver(t)})),it.on(t,"onmouseout",(function(t){r.mouseOut(t)})),it.on(t,"onclick",(function(t){r.click(t)})))},it.extend(I.prototype,{setPoints:function(t){var e;!t||t.length<2||(e=this.grash._getPath(t),this.grash._setPath(this.svgdom,e))},click:function(){this.dispatchEvent(new R("onclick"))},mouseOver:function(){this.dispatchEvent(new R("onmouseOver"))},mouseOut:function(){this.dispatchEvent(new R("onmouseOut"))}}),(L.prototype=new k).initialize=function(){this._className="Circle",this._type="Grash";var t=document.createElement("span");return t.style.top="0px",t.style.left="0px",this.config.map.getPanes().overlays.appendChild(t),t},L.prototype.draw=function(){var t,e,i,n,r=this.grash,o=this.config.map,a=this.config,s=this._point;o.getSize(),e=o.pointToPixel(s),(i=this.dom.style).left=e.x+"px",i.top=e.y+"px",it.Browser.ie<=8&&it.Browser.ie>0?(t=r.createE(["<v:oval strokeweight='",a.borderWidth,"' strokecolor='",a.borderColor,"' ","style='","width:",2*a.radius-a.borderWidth+"px;","height:",2*a.radius-a.borderWidth+"px;",,"left:",e.x,"px;top:",e.y,"px;filter:alpha(opacity="+100*a.opacity+")","px;position:absolute;cursor:pointer;behavior:url(#default#VML);' >"].join(""),{})).fillcolor=a.backgroundColor:t=r.createE("circle",{r:a.radius,cx:e.x,cy:e.y,stroke:a.borderColor,fill:a.backgroundColor,"stroke-width":a.borderWidth+"px",style:"cursor:pointer;opacity: "+a.opacity}),r.getContainer().appendChild(t),this.svgdom=t,n=this,it.on(t,"onmouseover",(function(t){n.mouseOver(t)})),it.on(t,"onmouseout",(function(t){n.mouseOut(t)})),it.on(t,"onclick",(function(t){n.click(t)}))},it.extend(L.prototype,{setStyle:function(t){var e,i,n;for(n in e=this.svgdom,i=this.config,t=t||{})i[n]=t[n];0==it.Browser.ie||it.Browser.ie>8?(e.setAttribute("stroke",i.borderColor),e.setAttribute("fill",i.backgroundColor),e.setAttribute("stroke-width",i.borderWidth),e.style.opacity=i.opacity):(e.setAttribute("strokecolor",i.borderColor),e.setAttribute("fillcolor",i.backgroundColor),e.setAttribute("strokeweight",i.borderWidth),e.style.filter="alpha(opacity="+100*i.opacity+")")},setRadius:function(t){t&&!isNaN(t)&&(this.config.radius=t,this.grash._setRadius(this.svgdom,t))},getRadius:function(){return this.config.radius},setPoint:function(t){t&&"Point"==t.toString()&&(this._point=t,this.grash._setCirclePoint(this.svgdom,t))},getPoint:function(){return this._point},click:function(){this.dispatchEvent(new R("onclick"))},mouseOver:function(){this.dispatchEvent(new R("onmouseOver"))},mouseOut:function(){this.dispatchEvent(new R("onmouseOut"))}}),(O.prototype=new k).getPoint=function(){return this._point},O.prototype.setPoint=function(t){this._point=t,this.redraw()},O.prototype.getValues=function(){return this._values},O.prototype.setValues=function(t){this._point=t;var e=[];text&&("string"==typeof text?e.push(text):e=text),this._values=e},O.prototype._setValue=function(t){this._div.getElementsByTagName("span")[0].innerHTML=t},O.prototype.setIndex=function(t){t>=this._values.length||0>t||this._setValue(this._values[t])},O.prototype.initialize=function(t){var e,i,n,r,o,a;return this._map=t,(i=(e=this._div=document.createElement("div")).style).position="absolute",i.zIndex=10,i.backgroundColor="#EE5D5B",i.border="1px solid #BC3B3A",i.color="white",i.height="18px",i.padding="2px",i.minWidth="30px",i.lineHeight="18px",i.whiteSpace="nowrap",i.MozUserSelect="none",i.fontSize="12px",i.cursor="pointer",n=this._span=document.createElement("span"),e.appendChild(n),n.appendChild(document.createTextNode(this._values[0])),(o=(r=this._arrow=document.createElement("div")).style).background="url("+F.imgPath+"label.png) no-repeat",o.position="absolute",o.width="11px",o.height="10px",o.top="22px",o.left="10px",o.overflow="hidden",e.appendChild(r),a=this,it.on(e,"onmouseover",(function(t){a.mou
1seOver(t)})),it.on(e,"onmouseout",(function(t){a.mouseOut(t)})),it.on(e,"onclick",(function(t){a.click(t)})),t.getPanes().overlays.appendChild(e),e},O.prototype.mouseOver=function(){var t=this._div.style;t.backgroundColor="#6BADCA",t.borderColor="#0000ff",this._arrow.style.backgroundPosition="0px -20px",t.zIndex=11,this.dispatchEvent(new R("onmouseOver"))},O.prototype.mouseOut=function(){var t=this._div.style;t.backgroundColor="#EE5D5B",t.borderColor="#BC3B3A",this._arrow.style.backgroundPosition="0px 0px",t.zIndex=10,this.dispatchEvent(new R("onmouseOut"))},O.prototype.click=function(){this.dispatchEvent(new R("onclick"))},O.prototype.draw=function(){var t=this._map.pointToPixel(this._point);this._div.style.left=t.x-parseInt(this._arrow.style.left)+"px",this._div.style.top=t.y-30+"px"},O.prototype.getPosition=function(){var t=this._map.pointToPixel(this._point);return this._div.style.left=t.x-parseInt(this._arrow.style.left)+"px",this._div.style.top=t.y-30+"px",new n(t.x,t.y-30)},O.prototype.openInfoWindow=function(t){(t||this.infoWindow)&&(this.infoWindow=this.infoWindow||t,t._config.overlay=this,t.open())},s.prototype.getOverlays=function(){return this.overlays.overlays},s.prototype.getEstateLables=function(){var t,e=this.overlays.overlays,i=[];for(t=0;t<e.length;t++)"EstateLable"==e[t].toString()&&i.push(e[t]);return i},s.prototype.setEstateLablesIndex=function(t){var e,i=this.overlays.overlays;for(e=0;e<i.length;e++)"EstateLable"==i[e].toString()&&i[e].setIndex(t)}}();var $centa={};$centa.box=function(){var t,e,i,n,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight,a=3*document.documentElement.clientHeight/4,s=document.documentElement.clientWidth/2,l=document.documentElement.clientHeight/2,u=!1,c=!1,d=0,h=0,p=0,f=0,g=!0,m=null;return{SetMove:function(){var s=0,l=0,u=0,c=0,d=!1,h=document.onmousemove,p=document.onmouseup;n.onmousedown=function(){var n=$centa.box.GetEvent();d=!0,s=n.clientX,l=n.clientY,u=parseInt(t.style.top),c=parseInt(t.style.left),document.onmousemove=function(){if(d){null!=e&&(e.innerHTML=""),null!=i&&(i.innerHTML="");var n=$centa.box.GetEvent(),h=c+n.clientX-s,p=u+n.clientY-l;h>0&&h+310<r&&p>0&&p+a<o&&(t.style.left=h+"px",t.style.top=p+"px")}},document.onmouseup=function(){d&&(document.onmousemove=h,document.onmouseup=p,d=!1,s=0,l=0,u=0,c=0)}}},Init:function(t,e){for(var i=document.getElementsByTagName("select"),n=0;n<i.length;n++)i[n].style.display="none";this.CreateObject(t,e,0,0),this.SetMove()},GetEvent:function(){return window.event||arguments.callee.caller.arguments[0]},ShowWithXY:function(t,e,i,n){u=!0;for(var r=document.getElementsByTagName("select"),o=0;o<r.length;o++)r[o].style.display="none";this.CreateObject(t,e,i,n),this.SetMove()},Show:function(t,e){u=!0,this.Init(t,e)},CreateObject:function(r,u,c,m){if(d=0,h=0,0!=c&&0!=m&&(c<s&&m<l?(d=c+35,h=m-13,f=0,g=!0):c>s&&m<l?(d=c-310-35,h=m-13,f=0,g=!1):c<s&&m>l?(d=c+35,h=m-a+13,f=a-26,g=!0):(d=c-310-35,h=m-a+13,f=a-26,g=!1),p=0,h<0?p=0-h+50:h+a>o&&(p=o-(h+a)-50),f-p==0&&h+p>50&&(p-=50),h+=p),t){n.innerHTML=r;var v=document.getElementById("centaWindowId");null!=v&&(v.document?(u.indexOf("suggest=")<0&&(document.centaWindowId.document.body.innerHTML='<img style="position:absolute;top:'+(o/4-30)+'px;left:131px" src="../gc/img/loading.gif" alt="" />'),v.src=u):(u.indexOf("suggest=")<0&&(v.contentDocument.body.innerHTML='<img style="position:absolute;top:'+(o/4-30)+'px;left:131px" src="../gc/img/loading.gif" alt="" />'),v.src=u))}else{t=document.createElement("div"),document.body.appendChild(t);var y=document.createElement("table");t.appendChild(y);var _=y.insertRow(-1);n=_.insertCell(-1),y.style.cssText="margin:0px;border:0px;padding:0px;",y.cellSpacing=0,n.style.cssText="width:100%;height:22pxpx;text-align:left;padding:3px;margin:0px;font:bold 13px;color:#FFFFFF;border:1px solid #666699;cursor:move;background-color:#666699",n.style.paddingLeft="10px",n.innerHTML=r;var b=_.insertCell(-1);b.style.cssText="cursor:pointer; padding:2px;background-color:#666699",b.innerHTML="<span style='font-size:15pt;font-weight:bold; color:#FFFFFF;'><img src=img/close.gif alt=\"\"></span>",b.style.paddingRight="2px",b.onclick=function(){$centa.box.Close()};var T=y.insertRow(-1).insertCell(-1);T.colSpan=2,T.innerHTML="<div><iframe id='centaWindowId' name='centaWindowId' scrolling='yes' src='"+u+"' style='height:"+(a-30)+"px;width:100%;border:0px;overflow:visible;' /></div>",e=y.insertRow(-1).insertCell(-1),i=y.insertRow(-1).insertCell(-1)}1==g?(e.innerHTML='<div id="divarrowleft" style="position:absolute;top:'+(f+3-p)+'px;left:-35px"><img src=img/arrow_l.gif alt=""></div>',i.innerHTML=""):(e.innerHTML="",i.innerHTML='<div id="divarrowright" style="position:absolute;top:'+(f+3-p)+'px;left:311px"><img src=img/arrow_r.gif alt=""></div>'),0==c&&0==m&&(e.innerHTML="",i.innerHTML=""),this.SetCentaBoxAtXY(d,h)},SetCentaBoxAtXY:function(n,r){null!=t&&(0==n&&0==r&&(e.innerHTML="",i.innerHTML=""),t.style.cssText="position:absolute;font:11px;top:"+r+"px;left:"+n+"px;width:310px;height:"+a+"px;text-align:center;border:1px solid #666699;background:white;padding:1px;line-height:22px;z-index:102;")},GetOnScreenJustChanged:function(){return c},SetOnScreenJustChanged:function(t){c=t},GetSearchBoxObject:function(){return m},SetSearchBoxObject:function(t){m=t},GetOnScreen:function(){return u},Close:function(){if(u=!1,null!=t){for(var e=document.getElementsByTagName("select"),i=0;i<e.length;i++)e[i].style.display="";document.body.removeChild(t),t=null}},CloseIfXYNotZero:function(){if(u=!1,null!=t){for(var e=document.getElementsByTagName("select"),i=0;i<e.length;i++)e[i].style.display="";document.body.removeChild(t),t=null}}}}();var twemoji=function(){"use strict";var t={base:"/assets/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(t){var e="string"==typeof t?parseInt(t,16):t;return e<65536?s(e):s(55296+((e-=65536)>>10),56320+(1023&e))},toCodePoint:m},onerror:function(){this.parentNode&&this.parentNode.replaceChild(l(this.alt,!1),this)},parse:function(e,i){return i&&"function"!=typeof i||(i={callback:i}),("string"==typeof e?h:d)(e,{callback:i.callback||u,attributes:"function"==typeof i.attributes?i.attributes:f,base:"string"==typeof i.base?i.base:t.base,ext:i.ext||t.ext,size:i.folder||(n=i.size||t.size,"number"==typeof n?n+"x"+n:n),className:i.className||t.className,onerror:i.onerror||t.onerror});var n},replace:g,test:function(t){i.lastIndex=0;var e=i.test(t);return i.lastIndex=0,e}},e={"&":"&","<":"<",">":">","'":"'",'"':"""},i=/\ud83d[\udc68-\udc69](?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)(?:\ufe0f|\ud83c[\udffb-\udfff])\u200d[\u2640\u2642]\ufe0f|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|(?:\u002a)\ufe0f?\u20e3|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca-\udfcc]|\ud83d[\udc42\udc43\udc4
16-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd74\udd75\udd7a\udd90\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddd1-\udddd]|[\u261d\u26f7\u26f9\u270a-\u270d])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\u0023\u20e3|\u0030\u20e3|\u0031\u20e3|\u0032\u20e3|\u0033\u20e3|\u0034\u20e3|\u0035\u20e3|\u0036\u20e3|\u0037\u20e3|\u0038\u20e3|\u0039\u20e3|\ud800\udc00|\ud83c[\udc04\udccf\udd70\udd71\udd7e\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude02\ude1a\ude2f\ude32-\ude3a\ude50\ude51\udf00-\udf21\udf24-\udf84\udf86-\udf93\udf96\udf97\udf99-\udf9b\udf9e-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcd-\udff0\udff3-\udff5\udff7-\udfff]|\ud83d[\udc00-\udc41\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfd\udcff-\udd3d\udd49-\udd4e\udd50-\udd67\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda4\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecb\udecd-\uded2\udee0-\udee5\udee9\udeeb\udeec\udef0\udef3-\udef8]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd40-\udd45\udd47-\udd4c\udd50-\udd6b\udd80-\udd97\uddc0\uddd0\uddde-\udde6]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26ce\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2705\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2728\u2733\u2734\u2744\u2747\u274c\u274e\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27a1\u27b0\u27bf\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299\ue50a]|(?:\u2639)(?:\ufe0f|(?!\ufe0e))/g,n=/\uFE0F/g,r=String.fromCharCode(8205),o=/[&<>'"]/g,a=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,s=String.fromCharCode;return t;function l(t,e){return document.createTextNode(e?t.replace(n,""):t)}function u(t,e){return"".concat(e.base,e.size,"/",t,e.ext)}function c(t){return m(t.indexOf(r)<0?t.replace(n,""):t)}function d(t,e){for(var n,r,o,s,u,d,h,p,f,g,m,v,y,_=function t(e,i){for(var n,r,o=e.childNodes,s=o.length;s--;)3===(r=(n=o[s]).nodeType)?i.push(n):1!==r||"ownerSVGElement"in n||a.test(n.nodeName.toLowerCase())||t(n,i);return i}(t,[]),b=_.length;b--;){for(o=!1,s=document.createDocumentFragment(),d=(u=_[b]).nodeValue,p=0;h=i.exec(d);){if((f=h.index)!==p&&s.appendChild(l(d.slice(p,f),!0)),v=c(m=h[0]),p=f+m.length,y=e.callback(v,e)){for(r in(g=new Image).onerror=e.onerror,g.setAttribute("draggable","false"),n=e.attributes(m,v))n.hasOwnProperty(r)&&0!==r.indexOf("on")&&!g.hasAttribute(r)&&g.setAttribute(r,n[r]);g.className=e.className,g.alt=m,g.src=y,o=!0,s.appendChild(g)}g||s.appendChild(l(m,!1)),g=null}o&&(p<d.length&&s.appendChild(l(d.slice(p),!0)),u.parentNode.replaceChild(s,u))}return t}function h(t,e){return g(t,(function(t){var i,n,r=t,a=c(t),s=e.callback(a,e);if(s){for(n in r="<img ".concat('class="',e.className,'" ','draggable="false" ','alt="',t,'"',' src="',s,'"'),i=e.attributes(t,a))i.hasOwnProperty(n)&&0!==n.indexOf("on")&&-1===r.indexOf(" "+n+"=")&&(r=r.concat(" ",n,'="',i[n].replace(o,p),'"'));r=r.concat("/>")}return r}))}function p(t){return e[t]}function f(){return null}function g(t,e){return String(t).replace(i,e)}function m(t,e){for(var i=[],n=0,r=0,o=0;o<t.length;)n=t.charCodeAt(o++),r?(i.push((65536+(r-55296<<10)+(n-56320)).toString(16)),r=0):55296<=n&&n<=56319?r=n:i.push(n.toString(16));return i.join(e||"-")}}();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):(t=t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
1function i(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var a,s,l,u,c=function(t){do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},d=function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var i=t.getAttribute("href");e=i&&"#"!==i?i.trim():null}return e},h=function(t){var e=d(t);return e&&document.querySelector(e)?e:null},p=function(t){var e=d(t);return e?document.querySelector(e):null},f=function(t){if(!t)return 0;var e=window.getComputedStyle(t),i=e.transitionDuration,n=e.transitionDelay,r=parseFloat(i),o=parseFloat(n);return r||o?(i=i.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(i)+parseFloat(n))):0},g=function(t){t.dispatchEvent(new Event("transitionend"))},m=function(t){return(t[0]||t).nodeType},v=function(t,e){var i=!1,n=e+5;t.addEventListener("transitionend",(function e(){i=!0,t.removeEventListener("transitionend",e)})),setTimeout((function(){i||g(t)}),n)}
1,y=function(t,e,i){Object.keys(i).forEach((function(n){var r,o=i[n],a=e[n],s=a&&m(a)?"element":null==(r=a)?""+r:{}.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+n+'" provided type "'+s+'" but expected type "'+o+'".')}))},_=function(t){if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){var e=getComputedStyle(t),i=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==i.display&&"hidden"!==e.visibility}return!1},b=function(){return function(){}},T=function(t){return t.offsetHeight},w=function(){var t=window.jQuery;return t&&!document.body.hasAttribute("data-no-jquery")?t:null},x=(a={},s=1,{set:function(t,e,i){void 0===t.key&&(t.key={key:e,id:s},s++),a[t.key.id]=i},get:function(t,e){if(!t||void 0===t.key)return null;var i=t.key;return i.key===e?a[i.id]:null},delete:function(t,e){if(void 0!==t.key){var i=t.key;i.key===e&&(delete a[i.id],delete t.key)}}}),S=function(t,e,i){x.set(t,e,i)},k=function(t,e){return x.get(t,e)},C=function(t,e){x.delete(t,e)},E=Element.prototype.querySelectorAll,A=Element.prototype.querySelector,M=(l=new CustomEvent("Bootstrap",{cancelable:!0}),(u=document.createElement("div")).addEventListener("Bootstrap",(function(){return null})),l.preventDefault(),u.dispatchEvent(l),l.defaultPrevented),P=/:scope\b/;(function(){var t=document.createElement("div");try{t.querySelectorAll(":scope *")}catch(t){return!1}return!0})()||(E=function(t){if(!P.test(t))return this.querySelectorAll(t);var e=Boolean(this.id);e||(this.id=c("scope"));var i=null;try{t=t.replace(P,"#"+this.id),i=this.querySelectorAll(t)}finally{e||this.removeAttribute("id")}return i},A=function(t){if(!P.test(t))return this.querySelector(t);var e=E.call(this,t);return void 0!==e[0]?e[0]:null});var I=w(),L=/[^.]*(?=\..*)\.|.*/,O=/\..*/,D=/::\d+$/,R={}
1,N=1,B={mouseenter:"mouseover",mouseleave:"mouseout"},F=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function j(t,e){return e&&e+"::"+N++||t.uidEvent||N++}function U(t){var e=j(t);return t.uidEvent=e,R[e]=R[e]||{},R[e]}function z(t,e,i){void 0===i&&(i=null);for(var n=Object.keys(t),r=0,o=n.length;r<o;r++){var a=t[n[r]];if(a.originalHandler===e&&a.delegationSelector===i)return a}return null}function H(t,e,i){var n="string"==typeof e,r=n?i:e,o=t.replace(O,""),a=B[o];return a&&(o=a),F.indexOf(o)>-1||(o=t),[n,r,o]}function W(t,e,i,n,r){if("string"==typeof e&&t){i||(i=n,n=null);var o=H(e,i,n),a=o[0],s=o[1],l=o[2],u=U(t),c=u[l]||(u[l]={}),d=z(c,s,a?i:null);if(d)d.oneOff=d.oneOff&&r;else{var h=j(s,e.replace(L,"")),p=a?function(t,e,i){return function n(r){for(var o=t.querySelectorAll(e),a=r.target;a&&a!==this;a=a.parentNode)for(var s=o.length;s--;)if(o[s]===a)return n.oneOff&&q.off(t,r.type,i),i.apply(a,[r]);return null}}(t,i,n):function(t,e){return function i(n){return i.oneOff&&q.off(t,n.type,e),e.apply(t,[n])}}(t,i);p.delegationSelector=a?i:null,p.originalHandler=s,p.oneOff=r,p.uidEvent=h,c[h]=p,t.addEventListener(l,p,a)}}}function V(t,e,i,n,r){var o=z(e[i],n,r);o&&(t.removeEventListener(i,o,Boolean(r)),delete e[i][o.uidEvent])}var q={on:function(t,e,i,n){W(t,e,i,n,!1)},one:function(t,e,i,n){W(t,e,i,n,!0)},off:function(t,e,i,n){if("string"==typeof e&&t){var r=H(e,i,n),o=r[0],a=r[1],s=r[2],l=s!==e,u=U(t),c="."===e.charAt(0);if(void 0===a){c&&Object.keys(u).forEach((function(i){!function(t,e,i,n){var r=e[i]||{};Object.keys(r).forEach((function(o){if(o.indexOf(n)>-1){var a=r[o];V(t,e,i,a.originalHandler,a.delegationSelector)}}))}(t,u,i,e.slice(1))}));var d=u[s]||{};Object.keys(d).forEach((function(i){var n=i.replace(D,"");if(!l||e.indexOf(n)>-1){var r=d[i];V(t,u,s,r.originalHandler,r.delegationSelector)}}))}else{if(!u||!u[s])return;V(t,u,s,a,o?i:null)}}},trigger:function(t,e,i){if("string"!=typeof e||!t)return null;var n,r=e.replace(O,""),o=e!==r,a=F.indexOf(r)>-1,s=!0,l=!0,u=!1,c=null;return o&&I&&(n=I.Event(e,i),I(t).trigger(n),s=!n.isPropagationStopped(),l=!n.isImmediatePropagationStopped(),u=n.isDefaultPrevented()),a?(c=document.createEvent("HTMLEvents")).initEvent(r,s,!0):c=new CustomEvent(e,{bubbles:s,cancelable:!0}
1),void 0!==i&&Object.keys(i).forEach((function(t){Object.defineProperty(c,t,{get:function(){return i[t]}})})),u&&(c.preventDefault(),M||Object.defineProperty(c,"defaultPrevented",{get:function(){return!0}})),l&&t.dispatchEvent(c),c.defaultPrevented&&void 0!==n&&n.preventDefault(),c}},G="alert",Y=function(){function t(t){this._element=t,this._element&&S(t,"bs.alert",this)}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t));var i=this._triggerCloseEvent(e);null===i||i.defaultPrevented||this._removeElement(e)},e.dispose=function(){C(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){return p(t)||t.closest(".alert")},e._triggerCloseEvent=function(t){return q.trigger(t,"close.bs.alert")},e._removeElement=function(t){var e=this;if(t.classList.remove("show"),t.classList.contains("fade")){var i=f(t);q.one(t,"transitionend",(function(){return e._destroyElement(t)})),v(t,i)}else this._destroyElement(t)},e._destroyElement=function(t){t.parentNode&&t.parentNode.removeChild(t),q.trigger(t,"closed.bs.alert")},t.jQueryInterface=function(e){return this.each((function(){var i=k(this,"bs.alert");i||(i=new t(this)),"close"===e&&i[e](this)}))},t.handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},t.getInstance=function(t){return k(t,"bs.alert")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.alert.data-api",'[data-dismiss="alert"]',Y.handleDismiss(new Y));var X=w();if(X){var $=X.fn[G];X.fn[G]=Y.jQueryInterface,X.fn[G].Constructor=Y,X.fn[G].noConflict=function(){return X.fn[G]=$,Y.jQueryInterface}}var K=function(){function t(t){this._element=t,S(t,"bs.button",this)}var e=t.prototype;return e.toggle=function(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))},e.dispose=function(){C(this._element,"bs.button"),this._element=null},t.jQueryInterface=function(e){return this.each((function(){var i=k(this,"bs.button");i||(i=new t(this)),"toggle"===e&&i[e]()}))},t.getInstance=function(t){return k(t,"bs.button")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.button.data-api",'[data-toggle="button"]',(function(t){t.preventDefault();var e=t.target.closest('[data-toggle="button"]'),i=k(e,"bs.button");i||(i=new K(e)),i.toggle()}));var Z=w();if(Z){var Q=Z.fn.button;Z.fn.button=K.jQueryInterface,Z.fn.button.Constructor=K,Z.fn.button.noConflict=function(){return Z.fn.button=Q,K.jQueryInterface}}function J(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function tt(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))}var et={setDataAttribute:function(t,e,i){t.setAttribute("data-"+tt(e),i)},removeDataAttribute:function(t,e){t.removeAttribute("data-"+tt(e))},getDataAttributes:function(t){if(!t)return{};var e=o({},t.dataset);return Object.keys(e).forEach((function(t){e[t]=J(e[t])})),e},getDataAttribute:function(t,e){return J(t.getAttribute("data-"+tt(e)))},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:function(t){return{top:t.offsetTop,left:t.offsetLeft}},toggleClass:function(t,e){t&&(t.classList.contains(e)?t.classList.remove(e):t.classList.add(e))}},it={matches:function(t,e){return t.matches(e)},find:function(t,e){var i;return void 0===e&&(e=document.documentElement),(i=[]).concat.apply(i,E.call(e,t))},findOne:function(t,e){return void 0===e&&(e=document.documentElement),A.call(e,t)},children:function(t,e){var i;return(i=[]).concat.apply(i,t.children).filter((function(t){return t.matches(e)}))},parents:function(t,e){for(var i=[],n=t.parentNode;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)this.matches(n,e)&&i.push(n),n=n.parentNode;return i},prev:function(t,e){for(var i=t.previousElementSibling;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next:function(t,e){for(var i=t.nextElementSibling;i;){if(this.matches(i,e))return[i];i=i.nextElementSibling}return[]}},nt="carousel",rt={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},ot={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},at={TOUCH:"touch",PEN:"pen"},st=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=it.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners(),S(t,"bs.carousel",this)}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){!document.hidden&&_(this._element)&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),it.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(g(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=it.findOne(".active.carousel-item",this._element);var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)q.one(this._element,"slid.bs.carousel",(function(){return e.to(t)}));else{if(i===t)return this.pause(),void this.cycle();this._slide(t>i?"next":"prev",this._items[t])}},e.dispose=function(){q.off(this._element,".bs.carousel"),C(this._element,"b
1s.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=o(o({},rt),t),y(nt,t,ot),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&q.on(this._element,"keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&(q.on(this._element,"mouseenter.bs.carousel",(function(e){return t.pause(e)})),q.on(this._element,"mouseleave.bs.carousel",(function(e){return t.cycle(e)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this,e=function(e){t._pointerEvent&&at[e.pointerType.toUpperCase()]?t.touchStartX=e.clientX:t._pointerEvent||(t.touchStartX=e.touches[0].clientX)},i=function(e){t._pointerEvent&&at[e.pointerType.toUpperCase()]&&(t.touchDeltaX=e.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};it.find(".carousel-item img",this._element).forEach((function(t){q.on(t,"dragstart.bs.carousel",(function(t){return t.preventDefault()}))})),this._pointerEvent?(q.on(this._element,"pointerdown.bs.carousel",(function(t){return e(t)})),q.on(this._element,"pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(q.on(this._element,"touchstart.bs.carousel",(function(t){return e(t)})),q.on(this._element,"touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-t.touchStartX}(e)})),q.on(this._element,"touchend.bs.carousel",(function(t){return i(t)})))},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?it.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var i="next"===t,n="prev"===t,r=this._getItemIndex(e);if((n&&0===r||i&&r===this._items.length-1)&&!this._config.wrap)return e;var o=(r+("prev"===t?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},e._triggerSlideEvent=function(t,e){var i=this._getItemIndex(t),n=this._getItemIndex(it.findOne(".active.carousel-item",this._element));return q.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:n,to:i})},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){for(var e=it.find(".active",this._indicatorsElement),i=0;i<e.length;i++)e[i].classList.remove("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&n.classList.add("active")}},e._slide=function(t,e){var i,n,r,o=this,a=it.findOne(".active.carousel-item",this._element),s=this._getItemIndex(a),l=e||a&&this._getItemByDirection(t,a),u=this._getItemIndex(l),c=Boolean(this._interval);if("next"===t?(i="carousel-item-left",n="carousel-item-next",r="left"):(i="carousel-item-right",n="carousel-item-prev",r="right"),l&&l.classList.contains("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).defaultPrevented&&a&&l){if(this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(l),this._element.classList.contains("slide")){l.classList.add(n),T(l),a.classList.add(i),l.classList.add(i);var d=parseInt(l.getAttribute("data-interval"),10);d?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=d):this._config.interval=this._config.defaultInterval||this._config.interval;var h=f(a);q.one(a,"transitionend",(function(){l.classList.remove(i,n),l.classList.add("active"),a.classList.remove("active",n,i),o._isSliding=!1,setTimeout((function(){q.trigger(o._element,"slid.bs.carousel",{relatedTarget:l,direction:r,from:s,to:u})}),0)})),v(a,h)}else a.classList.remove("active"),l.classList.add("active"),this._isSliding=!1,q.trigger(this._element,"slid.bs.carousel",{relatedTarget:l,direction:r,from:s,to:u});c&&this.cycle()}},t.carouselInterface=function(e,i){var n=k(e,"bs.carousel"),r=o(o({},rt),et.getDataAttributes(e));"object"==typeof i&&(r=o(o({},r),i));var a="string"==typeof i?i:r.slide;if(n||(n=new t(e,r)),"number"==typeof i)n.to(i);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method n
1amed "'+a+'"');n[a]()}else r.interval&&r.ride&&(n.pause(),n.cycle())},t.jQueryInterface=function(e){return this.each((function(){t.carouselInterface(this,e)}))},t.dataApiClickHandler=function(e){var i=p(this);if(i&&i.classList.contains("carousel")){var n=o(o({},et.getDataAttributes(i)),et.getDataAttributes(this)),r=this.getAttribute("data-slide-to");r&&(n.interval=!1),t.carouselInterface(i,n),r&&k(i,"bs.carousel").to(r),e.preventDefault()}},t.getInstance=function(t){return k(t,"bs.carousel")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return rt}}]),t}();q.on(document,"click.bs.carousel.data-api","[data-slide], [data-slide-to]",st.dataApiClickHandler),q.on(window,"load.bs.carousel.data-api",(function(){for(var t=it.find('[data-ride="carousel"]'),e=0,i=t.length;e<i;e++)st.carouselInterface(t[e],k(t[e],"bs.carousel"))}));var lt=w();if(lt){var ut=lt.fn[nt];lt.fn[nt]=st.jQueryInterface,lt.fn[nt].Constructor=st,lt.fn[nt].noConflict=function(){return lt.fn[nt]=ut,st.jQueryInterface}}var ct="collapse",dt={toggle:!0,parent:""},ht={toggle:"boolean",parent:"(string|element)"},pt=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=it.find('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]');for(var i=it.find('[data-toggle="collapse"]'),n=0,r=i.length;n<r;n++){var o=i[n],a=h(o),s=it.find(a).filter((function(e){return e===t}));null!==a&&s.length&&(this._selector=a,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle(),S(t,"bs.collapse",this)}var e=t.prototype;return e.toggle=function(){this._element.classList.contains("show")?this.hide():this.show()},e.show=function(){var e=this;if(!this._isTransitioning&&!this._element.classList.contains("show")){var i,n;this._parent&&0===(i=it.find(".show, .collapsing",this._parent).filter((function(t){return"string"==typeof e._config.parent?t.getAttribute("data-parent")===e._config.parent:t.classList.contains("collapse")}))).length&&(i=null);var r=it.findOne(this._selector);if(i){var o=i.filter((function(t){return r!==t}));if((n=o[0]?k(o[0],"bs.collapse"):null)&&n._isTransitioning)return}if(!q.trigger(this._element,"show.bs.collapse").defaultPrevented){i&&i.forEach((function(e){r!==e&&t.collapseInterface(e,"hide"),n||S(e,"bs.collapse",null)}));var a=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[a]=0,this._triggerArray.length&&this._triggerArray.forEach((function(t){t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),l=f(this._element);q.one(this._element,"transitionend",(function(){e._element.classList.remove("collapsing"),e._element.classList.add("collapse","show"),e._element.style[a]="",e.setTransitioning(!1),q.trigger(e._element,"shown.bs.collapse")})),v(this._element,l),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&this._element.classList.contains("show")&&!q.trigger(this._element,"hide.bs.collapse").defaultPrevented){var e=this._getDimension();this._element.style[e]=this._element.getBoundingClientRect()[e]+"px",T(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");var i=this._triggerArray.length;if(i>0)for(var n=0;n<i;n++){var r=this._triggerArray[n],o=p(r);o&&!o.classList.contains("show")&&(r.classList.add("collapsed"),r.setAttribute("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[e]="";var a=f(this._element);q.one(this._element,"transitionend",(function(){t.setTransitioning(!1),t._element.classList.remove("collapsing"),t._element.classList.add("collapse"),q.trigger(t._element,"hidden.bs.collapse")})),v(this._element,a)}},e.setTransitioning=function(t){this._isTransitioning=t}
1,e.dispose=function(){C(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=o(o({},dt),t)).toggle=Boolean(t.toggle),y(ct,t,ht),t},e._getDimension=function(){return this._element.classList.contains("width")?"width":"height"},e._getParent=function(){var t=this,e=this._config.parent;return m(e)?void 0===e.jquery&&void 0===e[0]||(e=e[0]):e=it.findOne(e),it.find('[data-toggle="collapse"][data-parent="'+e+'"]',e).forEach((function(e){var i=p(e);t._addAriaAndCollapsedClass(i,[e])})),e},e._addAriaAndCollapsedClass=function(t,e){if(t){var i=t.classList.contains("show");e.length&&e.forEach((function(t){i?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",i)}))}},t.collapseInterface=function(e,i){var n=k(e,"bs.collapse"),r=o(o(o({},dt),et.getDataAttributes(e)),"object"==typeof i&&i?i:{});if(!n&&r.toggle&&"string"==typeof i&&/show|hide/.test(i)&&(r.toggle=!1),n||(n=new t(e,r)),"string"==typeof i){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}},t.jQueryInterface=function(e){return this.each((function(){t.collapseInterface(this,e)}))},t.getInstance=function(t){return k(t,"bs.collapse")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return dt}}]),t}();q.on(document,"click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.target.tagName&&t.preventDefault();var e=et.getDataAttributes(this),i=h(this);it.find(i).forEach((function(t){var i,n=k(t,"bs.collapse");n?(null===n._parent&&"string"==typeof e.parent&&(n._config.parent=e.parent,n._parent=n._getParent()),i="toggle"):i=e,pt.collapseInterface(t,i)}))}));var ft=w();if(ft){var gt=ft.fn[ct];ft.fn[ct]=pt.jQueryInterface,ft.fn[ct].Constructor=pt,ft.fn[ct].noConflict=function(){return ft.fn[ct]=gt,pt.jQueryInterface}}var mt="dropdown",vt=new RegExp("ArrowUp|ArrowDown|Escape"),yt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},_t={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},bt=function(){function e(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners(),S(t,"bs.dropdown",this)}var n=e.prototype;return n.toggle=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")){var t=this._element.classList.contains("show");e.clearMenus(),t||this.show()}},n.show=function(){if(!(this._element.disabled||this._element.classList.contains("disabled")||this._menu.classList.contains("show"))){var i=e.getParentFromElement(this._element),n={relatedTarget:this._element};if(!q.trigger(this._element,"show.bs.dropdown",n).defaultPrevented){if(!this._inNavbar){if(void 0===t)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org)");var r=this._element;"parent"===this._config.reference?r=i:m(this._config.reference)&&(r=this._config.reference,void 0!==this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.classList.add("position-static"),this._popper=new t(r,this._menu,this._getPopperConfig())}var o;"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav")&&(o=[]).concat.apply(o,document.body.children).forEach((function(t){return q.on(t,"mouseover",null,(function(){}))})),this._element.focus(),this._element.setAttribute("aria-expanded",!0),et.toggleClass(this._menu,"show"),et.toggleClass(this._element,"show"),q.trigger(i,"shown.bs.dropdown",n)}}},n.hide=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")&&this._menu.classList.contains("show")){var t=e.getParentFromElement(this._element),i={relatedTarget:this._element};q.trigger(t,"hide.bs.dropdown",i).defaultPrevented||(this._popper&&this._popper.destroy(),et.toggleClass(this._menu,"show"),et.toggleClass(this._element,"show"),q.trigger(t,"hidden.bs.dropdown",i))}}
1,n.dispose=function(){C(this._element,"bs.dropdown"),q.off(this._element,".bs.dropdown"),this._element=null,this._menu=null,this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var t=this;q.on(this._element,"click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},n._getConfig=function(t){return t=o(o(o({},this.constructor.Default),et.getDataAttributes(this._element)),t),y(mt,t,this.constructor.DefaultType),t},n._getMenuElement=function(){return it.next(this._element,".dropdown-menu")[0]},n._getPlacement=function(){var t=this._element.parentNode,e="bottom-start";return t.classList.contains("dropup")?(e="top-start",this._menu.classList.contains("dropdown-menu-right")&&(e="top-end")):t.classList.contains("dropright")?e="right-start":t.classList.contains("dropleft")?e="left-start":this._menu.classList.contains("dropdown-menu-right")&&(e="bottom-end"),e},n._detectNavbar=function(){return Boolean(this._element.closest(".
1navbar"))},n._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=o(o({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},n._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),o(o({},t),this._config.popperConfig)},e.dropdownInterface=function(t,i){var n=k(t,"bs.dropdown");if(n||(n=new e(t,"object"==typeof i?i:null)),"string"==typeof i){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}},e.jQueryInterface=function(t){return this.each((function(){e.dropdownInterface(this,t)}))},e.clearMenus=function(t){if(!t||2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(var i=it.find('[data-toggle="dropdown"]'),n=0,r=i.length;n<r;n++){var o=e.getParentFromElement(i[n]),a=k(i[n],"bs.dropdown"),s={relatedTarget:i[n]};if(t&&"click"===t.type&&(s.clickEvent=t),a){var l,u=a._menu;i[n].classList.contains("show")&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&"Tab"===t.key)&&u.contains(t.target)||q.trigger(o,"hide.bs.dropdown",s).defaultPrevented)&&("ontouchstart"in document.documentElement&&(l=[]).concat.apply(l,document.body.children).forEach((function(t){return q.off(t,"mouseover",null,(function(){}))})),i[n].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),u.classList.remove("show"),i[n].classList.remove("show"),q.trigger(o,"hidden.bs.dropdown",s))}}},e.getParentFromElement=function(t){return p(t)||t.parentNode},e.dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!vt.test(t.key))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.classList.contains("disabled"))){var i=e.getParentFromElement(this),n=this.classList.contains("show");if("Escape"===t.key)return(this.matches('[data-toggle="dropdown"]')?this:it.prev(this,'[data-toggle="dropdown"]')[0]).focus(),void e.clearMenus();if(n&&"Space"!==t.key){var r=it.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",i).filter(_);if(r.length){var o=r.indexOf(t.target);"ArrowUp"===t.key&&o>0&&o--,"ArrowDown"===t.key&&o<r.length-1&&o++,r[o=-1===o?0:o].focus()}}else e.clearMenus()}},e.getInstance=function(t){return k(t,"bs.dropdown")},i(e,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return yt}},{key:"DefaultType",get:function(){return _t}}]),e}();q.on(document,"keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',bt.dataApiKeydownHandler),q.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",bt.dataApiKeydownHandler),q.on(document,"click.bs.dropdown.data-api",bt.clearMenus),q.on(document,"keyup.bs.dropdown.data-api",bt.clearMenus),q.on(document,"click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),bt.dropdownInterface(this,"toggle")})),q.on(document,"click.bs.dropdown.data-api",".dropdown form",(function(t){return t.stopPropagation()}));var Tt=w();if(Tt){var wt=Tt.fn[mt];Tt.fn[mt]=bt.jQueryInterface,Tt.fn[mt].Constructor=bt,Tt.fn[mt].noConflict=function(){return Tt.fn[mt]=wt,bt.jQueryInterface}}var xt={backdrop:!0,keyboard:!0,focus:!0,show:!0},St={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},kt=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=it.findOne(".modal-dialog",t),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0,S(t,"bs.modal",this)}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){this._element.classList.contains("fade")&&(this._isTransitioning=!0);var i=q.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||i.defaultPrevented||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),q.on(this._element,"click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return e.hide(t)})),q.on(this._dialog,"mousedown.dismiss.bs.modal",(function(){q.one(e._element,"mouseup.dismiss.bs.modal",(function(t){t.target===e._element&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning&&!q.trigger(this._element,"hide.bs.modal").defaultPrevented){this._isShown=!1;var i=this._element.classList.contains("fade");if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),q.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),q.off(this._element,"click.dismiss.bs.modal"),q.off(this._dialog,"mousedown.dismiss.bs.modal"),i){var n=f(this._element);q.one(this._element,"transitionend",(function(t){return e._hideModal(t)})),v(this._element,n)}else this._hideModal()}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return q.off(t,".bs.modal")}
1)),q.off(document,"focusin.bs.modal"),C(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=o(o({},xt),t),y("modal",t,St),t},e._showElement=function(t){var e=this,i=this._element.classList.contains("fade"),n=it.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),i&&T(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus();var r=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,q.trigger(e._element,"shown.bs.modal",{relatedTarget:t})};if(i){var o=f(this._dialog);q.one(this._dialog,"transitionend",r),v(this._dialog,o)}else r()},e._enforceFocus=function(){var t=this;q.off(document,"focusin.bs.modal"),q.on(document,"focusin.bs.modal",(function(e){document===e.target||t._element===e.target||t._element.contains(e.target)||t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?q.on(this._element,"keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&"Escape"===e.key?(e.preventDefault(),t.hide()):t._config.keyboard||"Escape"!==e.key||t._triggerBackdropTransition()})):q.off(this._element,"keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?q.on(window,"resize.bs.modal",(function(){return t._adjustDialog()})):q.off(window,"resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){document.body.classList.remove("modal-open"),t._resetAdjustments(),t._resetScrollbar(),q.trigger(t._element,"hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop.parentNode.removeChild(this._backdrop),this._backdrop=null},e._showBackdrop=function(t){var e=this,i=this._element.classList.contains("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),document.body.appendChild(this._backdrop),q.on(this._element,"click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()})),i&&T(this._backdrop),this._backdrop.classList.add("show"),!i)return void t();var n=f(this._backdrop);q.one(this._backdrop,"transitionend",t),v(this._backdrop,n)}else if(!this._isShown&&this._backdrop){this._backdrop.classList.remove("show");var r=function(){e._removeBackdrop(),t()};if(this._element.classList.contains("fade")){var o=f(this._backdrop);q.one(this._backdrop,"transitionend",r),v(this._backdrop,o)}else r()}else t()},e._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){if(q.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;this._element.classList.add("modal-static");var e=f(this._element);q.one(this._element,"transitionend",(function(){t._element.classList.remove("modal-static")})),v(this._element,e),this._element.focus()}else this.hide()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){it.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(e){var i=e.style.paddingRight,n=window.getComputedStyle(e)["padding-right"];et.setDataAttribute(e,"padding-right",i),e.style.paddingRight=parseFloat(n)+t._scrollbarWidth+"px"})),it.find(".sticky-top").forEach((function(e){var i=e.style.marginRight,n=window.getComputedStyle(e)["margin-right"];et.setDataAttribute(e,"margin-right",i),e.style.marginRight=parseFloat(n)-t._scrollbarWidth+"px"}));var e=document.body.style.paddingRight,i=window.getComputedStyle(document.body)["padding-right"];et.setDataAttribute(document.body,"padding-right",e),document.body.style.paddingRight=parseFloat(i)+this._scrollbarWidth+"px"}document.body.classList.add("modal-open")},e._resetScrollbar=function(){it.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(t){var e=et.getDataAttribute(t,"padding-right");void 0!==e&&(et.removeDataAttribute(t,"padding-right"),t.style.paddingRight=e)})),it.find(".sticky-top").forEach((function(t){var e=et.getDataAttribute(t,"margin-right");void 0!==e&&(et.removeDataAttribute(t,"margin-right"),t.style.marginRight=e)}));var t=et.getDataAttribute(document.body,"padding-right");void 0===t?document.body.style.paddingRight="":(et.removeDataAttribute(document.body,"padding-right"),document.body.style.paddingRight=t)},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t.jQueryInterface=function(e,i){return this.each((function(){var n=k(this,"bs.modal"),r=o(o(o({},xt),et.getDataAttributes(this)),"object"==typeof e&&e?e:{});if(n||(n=new t(this,r)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method n
1amed "'+e+'"');n[e](i)}else r.show&&n.show(i)}))},t.getInstance=function(t){return k(t,"bs.modal")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return xt}}]),t}();q.on(document,"click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e=this,i=p(this);"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault(),q.one(i,"show.bs.modal",(function(t){t.defaultPrevented||q.one(i,"hidden.bs.modal",(function(){_(e)&&e.focus()}))}));var n=k(i,"bs.modal");if(!n){var r=o(o({},et.getDataAttributes(i)),et.getDataAttributes(this));n=new kt(i,r)}n.show(this)}));var Ct=w();if(Ct){var Et=Ct.fn.modal;Ct.fn.modal=kt.jQueryInterface,Ct.fn.modal.Constructor=kt,Ct.fn.modal.noConflict=function(){return Ct.fn.modal=Et,kt.jQueryInterface}}var At=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Mt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Pt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function It(t,e,i){var n;if(!t.length)return t;if(i&&"function"==typeof i)return i(t);for(var r=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),a=(n=[]).concat.apply(n,r.body.querySelectorAll("*")),s=function(t,i){var n,r=a[t],s=r.nodeName.toLowerCase();if(-1===o.indexOf(s))return r.parentNode.removeChild(r),"continue";var l=(n=[]).concat.apply(n,r.attributes),u=[].concat(e["*"]||[],e[s]||[]);l.forEach((function(t){(function(t,e){var i=t.nodeName.toLowerCase();if(-1!==e.indexOf(i))return-1===At.indexOf(i)||Boolean(t.nodeValue.match(Mt)||t.nodeValue.match(Pt));for(var n=e.filter((function(t){return t instanceof RegExp})),r=0,o=n.length;r<o;r++)if(i.match(n[r]))return!0;return!1})(t,u)||r.removeAttribute(t.nodeName)}))},l=0,u=a.length;l<u;l++)s(l);return r.body.innerHTML}var Lt="tooltip",Ot=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Dt=["sanitize","whiteList","sanitizeFn"],Rt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Nt={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Bt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ft={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},jt=function(){function e(e,i){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(i),this.tip=null,this._setListeners(),S(e,this.constructor.DATA_KEY,this)}var n=e.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,i=k(t.target,e);i||(i=new this.constructor(t.target,this._getDelegateConfig()),S(t.target,e,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),C(this.element,this.constructor.DATA_KEY),q.off(this.element,this.constructor.EVENT_KEY),q.off(this.element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var e=this;if("none"===this.element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){var i=q.trigger(this.element,this.constructor.Event.SHOW),n=function t(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var i=e.getRootNode();return i instanceof ShadowRoot?i:null}return e instanceof ShadowRoot?e:e.parentNode?t(e.parentNode):null}(this.element),r=null===n?this.element.ownerDocument.documentElement.contains(this.element):n.contains(this.element);if(i.defaultPrevented||!r)return;var o=this.getTipElement(),a=c(this.constructor.NAME);o.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&o.classList.add("fade");var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(s);this._addAttachmentClass(l);var u,d=this._getContainer();S(o,this.constructor.DATA_KEY,this),this.element.ownerDocument.documentElement.contains(this.tip)||d.appendChild(o),q.trigger(this.element,this.constructor.Event.INSERTED),this._popper=new t(this.element,o,this._getPopperConfig(l)),o.classList.add("show"),"ontouchstart"in document.documentElement&&(u=[]).concat.apply(u,document.body.children).forEac
1h((function(t){q.on(t,"mouseover",(function(){}))}));var h=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,q.trigger(e.element,e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};if(this.tip.classList.contains("fade")){var p=f(this.tip);q.one(this.tip,"transitionend",h),v(this.tip,p)}else h()}},n.hide=function(){var t=this,e=this.getTipElement(),i=function(){"show"!==t._hoverState&&e.parentNode&&e.parentNode.removeChild(e),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),q.trigger(t.element,t.constructor.Event.HIDDEN),t._popper.destroy()};if(!q.trigger(this.element,this.constructor.Event.HIDE).defaultPrevented){var n;if(e.classList.remove("show"),"ontouchstart"in document.documentElement&&(n=[]).concat.apply(n,document.body.children).forEach((function(t){return q.off(t,"mouseover",b)})),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){var r=f(e);q.one(e,"transitionend",i),v(e,r)}else i();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},n.setContent=function(){var t=this.getTipElement();this.setElementContent(it.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")},n.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&m(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=It(e,this.config.whiteList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},n.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},n._getPopperConfig=function(t){var e=this;return o(o({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:"."+this.constructor.NAME+"-arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},n._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-tooltip-"+t)},n._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=o(o({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},n._getContainer=function(){return!1===this.config.container?document.body:m(this.config.container)?this.config.container:it.findOne(this.config.container)},n._getAttachment=function(t){return Nt[t.toUpperCase()]},n._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)q.on(t.element,t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;q.on(t.element,"hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,t.config.selector,(function(e){return t._enter(e)})),q.on(t.element,i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},q.on(this.element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=o(o({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(t,e){var i=this.constructor.DATA_KEY;(e=e||k(t.target,i))||(e=new this.constructor(t.target,this._getDelegateConfig()),S(t.target,i,e)),t&&(e._activeTrigger["focusin"===t.type?"focu
1s":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},n._leave=function(t,e){var i=this.constructor.DATA_KEY;(e=e||k(t.target,i))||(e=new this.constructor(t.target,this._getDelegateConfig()),S(t.target,i,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},n._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},n._getConfig=function(t){var e=et.getDataAttributes(this.element);return Object.keys(e).forEach((function(t){-1!==Dt.indexOf(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=o(o(o({},this.constructor.Default),e),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),y(Lt,t,this.constructor.DefaultType),t.sanitize&&(t.template=It(t.template,t.whiteList,t.sanitizeFn)),t},n._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},n._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Ot);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},n._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement))},n._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(t.classList.remove("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},e.jQueryInterface=function(t){return this.each((function(){var i=k(this,"bs.tooltip"),n="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new e(this,n)),"string"==typeof t)){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t]()}}))},e.getInstance=function(t){return k(t,"bs.tooltip")},i(e,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Bt}},{key:"NAME",get:function(){return Lt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Ft}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Rt}}]),e}(),Ut=w();if(Ut){var zt=Ut.fn[Lt];Ut.fn[Lt]=jt.jQueryInterface,Ut.fn[Lt].Constructor=jt,Ut.fn[Lt].noConflict=function(){return Ut.fn[Lt]=zt,jt.jQueryInterface}}var Ht="popover",Wt=new RegExp("(^|\\s)bs-popover\\S+","g"),Vt=o(o({},jt.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),qt=o(o({},jt.DefaultType),{},{content:"(string|element|function)"}),Gt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Yt=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o=r.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.setContent=function(){var t=this.getTipElement();this.setElementContent(it.findOne(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(it.findOne(".popover-body",t),e),t.classList.remove("fade","show")},o._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-popover-"+t)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Wt);null!==e&&e.length>0&&e.map((function(t){return t.trim()}
1)).forEach((function(e){return t.classList.remove(e)}))},r.jQueryInterface=function(t){return this.each((function(){var e=k(this,"bs.popover"),i="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new r(this,i),S(this,"bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r.getInstance=function(t){return k(t,"bs.popover")},i(r,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Vt}},{key:"NAME",get:function(){return Ht}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Gt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return qt}}]),r}(jt),Xt=w();if(Xt){var $t=Xt.fn[Ht];Xt.fn[Ht]=Yt.jQueryInterface,Xt.fn[Ht].Constructor=Yt,Xt.fn[Ht].noConflict=function(){return Xt.fn[Ht]=$t,Yt.jQueryInterface}}var Kt="scrollspy",Zt={offset:10,method:"auto",target:""},Qt={offset:"number",method:"string",target:"(string|element)"},Jt=function(){function t(t,e){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,q.on(this._scrollElement,"scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process(),S(t,"bs.scrollspy",this)}var e=t.prototype;return e.refresh=function(){var t=this,e="auto"===this._config.method?this._scrollElement===this._scrollElement.window?"offset":"position":this._config.method,i="position"===e?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),it.find(this._selector).map((function(t){var n,r=h(t);if(r&&(n=it.findOne(r)),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[et[e](n).top+i,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){C(this._element,"bs.scrollspy"),q.off(this._scrollElement,".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=o(o({},Zt),"object"==typeof t&&t?t:{})).target&&m(t.target)){var e=t.target.id;e||(e=c(Kt),t.target.id=e),t.target="#"+e}return y(Kt,t,Qt),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=it.findOne(e.join(","));i.classList.contains("dropdown-item")?(it.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add("active"),i.classList.add("active")):(i.classList.add("active"),it.parents(i,".nav, .list-group").forEach((function(t){it.prev(t,".nav-link, .list-group-item").forEach((function(t){return t.classList.add("active")})),it.prev(t,".nav-item").forEach((function(t){it.children(t,".nav-link").forEach((function(t){return t.classList.add("active")}))}))}))),q.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){it.find(this._selector).filter((function(t){return t.classList.contains("active")}
1)).forEach((function(t){return t.classList.remove("active")}))},t.jQueryInterface=function(e){return this.each((function(){var i=k(this,"bs.scrollspy");if(i||(i=new t(this,"object"==typeof e&&e)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},t.getInstance=function(t){return k(t,"bs.scrollspy")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Zt}}]),t}();q.on(window,"load.bs.scrollspy.data-api",(function(){it.find('[data-spy="scroll"]').forEach((function(t){return new Jt(t,et.getDataAttributes(t))}))}));var te=w();if(te){var ee=te.fn[Kt];te.fn[Kt]=Jt.jQueryInterface,te.fn[Kt].Constructor=Jt,te.fn[Kt].noConflict=function(){return te.fn[Kt]=ee,Jt.jQueryInterface}}var ie=function(){function t(t){this._element=t,S(this._element,"bs.tab",this)}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active")||this._element.classList.contains("disabled"))){var e,i=p(this._element),n=this._element.closest(".
1nav, .list-group");n&&(e=(e=it.find("UL"===n.nodeName||"OL"===n.nodeName?":scope > li > .active":".active",n))[e.length-1]);var r=null;if(e&&(r=q.trigger(e,"hide.bs.tab",{relatedTarget:this._element})),!(q.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==r&&r.defaultPrevented)){this._activate(this._element,n);var o=function(){q.trigger(e,"hidden.bs.tab",{relatedTarget:t._element}),q.trigger(t._element,"shown.bs.tab",{relatedTarget:e})};i?this._activate(i,i.parentNode,o):o()}}},e.dispose=function(){C(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,i){var n=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?it.children(e,".active"):it.find(":scope > li > .active",e))[0],o=i&&r&&r.classList.contains("fade"),a=function(){return n._transitionComplete(t,r,i)};if(r&&o){var s=f(r);r.classList.remove("show"),q.one(r,"transitionend",a),v(r,s)}else a()},e._transitionComplete=function(t,e,i){if(e){e.classList.remove("active");var n=it.findOne(":scope > .dropdown-menu .active",e.parentNode);n&&n.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),T(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu")&&(t.closest(".dropdown")&&it.find(".dropdown-toggle").forEach((function(t){return t.classList.add("active")})),t.setAttribute("aria-expanded",!0)),i&&i()},t.jQueryInterface=function(e){return this.each((function(){var i=k(this,"bs.tab")||new t(this);if("string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},t.getInstance=function(t){return k(t,"bs.tab")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),(k(this,"bs.tab")||new ie(this)).show()}));var ne=w();if(ne){var re=ne.fn.tab;ne.fn.tab=ie.jQueryInterface,ne.fn.tab.Constructor=ie,ne.fn.tab.noConflict=function(){return ne.fn.tab=re,ie.jQueryInterface}}var oe={animation:"boolean",autohide:"boolean",delay:"number"},ae={animation:!0,autohide:!0,delay:500},se=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners(),S(t,"bs.toast",this)}var e=t.prototype;return e.show=function(){var t=this;if(!q.trigger(this._element,"show.bs.toast").defaultPrevented){this._config.animation&&this._element.classList.add("fade");var e=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),q.trigger(t._element,"shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),T(this._element),this._element.classList.add("showing"),this._config.animation){var i=f(this._element);q.one(this._element,"transitionend",e),v(this._element,i)}else e()}},e.hide=function(){var t=this;if(this._element.classList.contains("show")&&!q.trigger(this._element,"hide.bs.toast").defaultPrevented){var e=function(){t._element.classList.add("hide"),q.trigger(t._element,"hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=f(this._element);q.one(this._element,"transitionend",e),v(this._element,i)}else e()}},e.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),q.off(this._element,"click.dismiss.bs.toast"),C(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=o(o(o({},ae),et.getDataAttributes(this._element)),"object"==typeof t&&t?t:{}),y("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;q.on(this._element,"click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},t.jQueryInterface=function(e){return this.each((function(){var i=k(this,"bs.toast");if(i||(i=new t(this,"object"==typeof e&&e)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method n
1amed "'+e+'"');i[e](this)}}))},t.getInstance=function(t){return k(t,"bs.toast")},i(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"DefaultType",get:function(){return oe}},{key:"Default",get:function(){return ae}}]),t}(),le=w();if(le){var ue=le.fn.toast;le.fn.toast=se.jQueryInterface,le.fn.toast.Constructor=se,le.fn.toast.noConflict=function(){return le.fn.toast=ue,se.jQueryInterface}}return{Alert:Y,Button:K,Carousel:st,Collapse:pt,Dropdown:bt,Modal:kt,Popover:Yt,ScrollSpy:Jt,Tab:ie,Toast:se,Tooltip:jt}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(e){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},i=function(t,i){return function(t){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[e[n]]=n);var r=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in r)if(r.hasOwnProperty(o)){if(!("channels"in r[o]))throw new Error("missing channels property: "+o);if(!("labels"in r[o]))throw new Error("missing channel labels property: "+o);if(r[o].labels.length!==r[o].channels)throw new Error("channel and label counts mismatch: "+o);var a=r[o].channels,s=r[o].labels;delete r[o].channels,delete r[o].labels,Object.defineProperty(r[o],"channels",{value:a}),Object.defineProperty(r[o],"labels",{value:s})}r.rgb.hsl=function(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a;
vendor: 7,500 bytes, line 1
1return s===a?e=0:n===s?e=(r-o)/l:r===s?e=2+(o-n)/l:o===s&&(e=4+(n-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(a+s)/2,[e,100*(s===a?0:i<=.5?l/(s+a):l/(2-s-a)),100*i]},r.rgb.hsv=function(t){var e,i,n,r,o,a=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(a,s,l),c=u-Math.min(a,s,l),d=function(t){return(u-t)/6/c+.5};return 0===c?r=o=0:(o=c/u,e=d(a),i=d(s),n=d(l),a===u?r=n-i:s===u?r=1/3+e-n:l===u&&(r=2/3+i-e),r<0?r+=1:r>1&&(r-=1)),[360*r,100*o,100*u]},r.rgb.hwb=function(t){var e=t[0],i=t[1],n=t[2];return[r.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(i,n))*100,100*(n=1-1/255*Math.max(e,Math.max(i,n)))]},r.rgb.cmyk=function(t){var e,i=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-r)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},r.rgb.keyword=function(t){var n=i[t];if(n)return n;var r,o,a,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=(o=t,a=e[l],Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<s&&(s=u,r=l)}return r},r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},r.rgb.lab=function(t){var e=r.rgb.xyz(t),i=e[0],n=e[1],o=e[2];return n/=100,o/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},r.hsl.rgb=function(t){var e,i,n,r,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var u=0;u<3;u++)(n=a+1/3*-(u-1))<0&&n++,n>1&&n--,r[u]=255*(o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e);return r},r.hsl.hsv=function(t){var e=t[0],i=t[1]/100,n=t[2]/100,r=i,o=Math.max(n,.01);return i*=(n*=2)<=1?n:2-n,r*=o<=1?o:2-o,[e,100*(0===n?2*r/(o+r):2*i/(n+i)),(n+i)/2*100]},r.hsv.rgb=function(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),a=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,r){case 0:return[n,l,a];case 1:return[s,n,a];case 2:return[a,n,l];case 3:return[a,s,n];case 4:return[l,a,n];case 5:return[n,a,s]}},r.hsv.hsl=function(t){var e,i,n,r=t[0],o=t[1]/100,a=t[2]/100,s=Math.max(a,.01);return n=(2-o)*a,i=o*s,[r,100*(i=(i/=(e=(2-o)*s)<=1?e:2-e)||0),100*(n/=2)]},r.hwb.rgb=function(t){var e,i,n,r,o,a,s,l=t[0]/360,u=t[1]/100,c=t[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),n=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(n=1-n),r=u+n*((i=1-c)-u),e){default:case 6:case 0:o=i,a=r,s=u;break;case 1:o=r,a=i,s=u;break;case 2:o=u,a=i,s=r;break;case 3:o=u,a=r,s=i;break;case 4:o=r,a=u,s=i;break;case 5:o=i,a=u,s=r}return[255*o,255*a,255*s]},r.cmyk.rgb=function(t){var e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},r.xyz.rgb=function(t){var e,i,n,r=t[0]/100,o=t[1]/100,a=t[2]/100;return i=-.9689*r+1.8758*o+.0415*a,n=.0557*r+-.204*o+1.057*a,e=(e=3.2406*r+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]},r.xyz.lab=function(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},r.lab.xyz=function(t){var e,i,n;e=t[1]/500+(i=(t[0]+16)/116),n=i-t[2]/200;var r=Math.pow(i,3),o=Math.pow(e,3),a=Math.pow(n,3);return i=r>.008856?r:(i-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[e*=95.047,i*=100,n*=108.883]},r.lab.lch=function(t){var e,i=t[0],n=t[1],r=t[2];return(e=360*Math.atan2(r,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+r*r),e]},r.lch.lab=function(t){var e,i=t[1];return e=t[2]/360*2*Math.PI,[t[0],i*Math.cos(e),i*Math.sin(e)]},r.rgb.ansi16=function(t){var e=t[0],i=t[1],n=t[2],o=1 in arguments?arguments[1]:r.rgb.hsv(t)[2];if(0===(o=Math.round(o/50)))return 30;var a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(e/255));return 2===o&&(a+=60),a},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){var e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},r.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},r.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var i;return t-=16,[Math.floor(t/36)/5*255,Math.floor((i=t%36)/6)/5*255,i%6/5*255]},r.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},r.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var i=e[0];3===e[0].length&&(i=i.split("").map((function(t){return t+t})).join(""));var n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},r.rgb.hcg=function(t){var e,i=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(i,n),r),a=Math.min(Math.min(i,n),r),s=o-a;return e=s<=0?0:o===i?(n-r)/s%6:o===n?2+(r-i)/s:4+(i-n)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?a/(1-s):0)]},r.hsl.hcg=function(t){var e,i=t[1]/100,n=t[2]/100,r=0;return(e=n<.5?2*i*n:2*i*(1-n))<1&&(r=(n-.5*e)/(1-e)),[t[0],100*e,100*r]},r.hsv.hcg=function(t){var e=t[2]/100,i=t[1]/100*e,n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},r.hcg.rgb=function(t){var e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];var n,r=[0,0,0],o=t[0]/360%1*6,a=o%1,s=1-a;switch(Math.floor(o)){case 0:r[0]=1,r[1]=a,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=a;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=a,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return[255*(e*r[0]+(n=(1-e)*i)),255*(e*r[1]+n),255*(e*r[2]+n)]},r.hcg.hsv=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e),n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},r.hcg.hsl=function(t){var e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},r.hcg.hwb=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},r.hwb.hcg=function(t){var e=1-t[2]/100,i=e-t[1]/100,n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=r.gray.hsv=function(t){return[0,0,t[0]]},r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},r.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(i={exports:{}}),i.exports}();function n(t,e){return function(i){return e(t(i))}}function r(t,e){for(var r=[e[t].parent,t],o=i[e[t].parent][t],a=e[t].parent;e[a].parent;)r.unshift(e[a].parent),o=n(i[e[a].parent][a],o),a=e[a].parent;return o.conversion=r,o}var o={};
vendor: 48,624 bytes, line 1
1Object.keys(i).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:i[t].channels}),Object.defineProperty(o[t],"labels",{value:i[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var r=n.pop(),o=Object.keys(i[r]),a=o.length,s=0;s<a;s++){var l=o[s],u=e[l];-1===u.distance&&(u.distance=e[r].distance+1,u.parent=r,n.unshift(l))}return e}(t),n={},o=Object.keys(e),a=o.length,s=0;s<a;s++){var l=o[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(i){var n=e[i];o[t][i]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var i=t(e);if("object"==typeof i)for(var n=i.length,r=0;r<n;r++)i[r]=Math.round(i[r]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}(n),o[t][i].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var a=o,s={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:u,getHsla:c,getRgb:function(t){var e=u(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:d,getAlpha:function(t){var e=u(t);return e||(e=c(t))||(e=d(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+m(t[0])+m(t[1])+m(t[2])+(e>=0&&e<1?m(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?h(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:h,percentString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:f,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return v[t.slice(0,3)]}};function u(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(n){r=(n=n[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(n[o]+n[o],16);r&&(i=Math.round(parseInt(r+r,16)/255*100)/100)}else if(n=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(r=n[2],n=n[1],o=0;o<e.length;o++)e[o]=parseInt(n.slice(2*o,2*o+2),16);r&&(i=Math.round(parseInt(r,16)/255*100)/100)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(n[o+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(n[o+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=s[n[1]]))return}for(o=0;o<e.length;o++)e[o]=g(e[o],0,255);return i=i||0==i?g(i,0,1):1,e[3]=i,e}}function c(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[g(parseInt(e[1]),0,360),g(parseFloat(e[2]),0,100),g(parseFloat(e[3]),0,100),g(isNaN(i)?1:i,0,1)]}}}function d(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[g(parseInt(e[1]),0,360),g(parseFloat(e[2]),0,100),g(parseFloat(e[3]),0,100),g(isNaN(i)?1:i,0,1)]}}}function h(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function g(t,e,i){return Math.min(Math.max(e,t),i)}function m(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var v={};for(var y in s)v[s[y]]=y;var _=function(t){return t instanceof _?t:this instanceof _?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=l.getRgba(t))?this.setValues("rgb",e):(e=l.getHsla(t))?this.setValues("hsl",e):(e=l.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new _(t);var e};_.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return l.hexString(this.values.rgb)},rgbString:function(){return l.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return l.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return l.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return l.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return l.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return l.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return l.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,r=2*n-1,o=this.alpha()-i.alpha(),a=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*i.red(),a*this.green()+s*i.green(),a*this.blue()+s*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new _,n=this.values,r=i.values;for(var o in n)n.hasOwnProperty(o)&&("[object Array]"===(e={}.toString.call(t=n[o]))?r[o]=t.slice(0):"[object Number]"===e?r[o]=t:console.error("unexpected color value:",t));return i}},_.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},_.prototype.setValues=function(t,e){var i,n,r=this.values,o=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)r[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)r[t][i]=e[t.charAt(i)];l=e.a}else if(void 0!==e[o[t][0]]){var u=o[t];for(i=0;i<t.length;i++)r[t][i]=e[u[i]];l=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===l?r.alpha:l)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(s[t][i],r[t][i])),r[t][i]=Math.round(n);for(var c in o)c!==t&&(r[c]=a[t][c](r[t]));return!0},_.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},_.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:(i===n[e]||(n[e]=i,this.setValues(t,n)),this)},"undefined"!=typeof window&&(window.Color=_);var b=_;function T(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,x={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return x.valueOrDefault(x.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var r,o,a;if(x.isArray(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<o;r++)e.call(i,t[r],r);else if(x.isObject(t))for(o=(a=Object.keys(t)).length,r=0;r<o;r++)e.call(i,t[a[r]],a[r])},arrayEquals:function(t,e){var i,n,r,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=e[i],(r=t[i])instanceof Array&&o instanceof Array){if(!x.arrayEquals(r,o))return!1}else if(r!==o)return!1;return!0},clone:function(t){if(x.isArray(t))return t.map(x.clone);if(x.isObject(t)){for(var e=Object.create(t),i=Object.keys(t),n=i.length,r=0;r<n;++r)e[i[r]]=x.clone(t[i[r]]);return e}return t},_merger:function(t,e,i,n){if(T(t)){var r=e[t],o=i[t];x.isObject(r)&&x.isObject(o)?x.merge(r,o,n):e[t]=x.clone(o)}},_mergerIf:function(t,e,i){if(T(t)){var n=e[t],r=i[t];x.isObject(n)&&x.isObject(r)?x.mergeIf(n,r):e.hasOwnProperty(t)||(e[t]=x.clone(r))}},merge:function(t,e,i){var n,r,o,a,s,l=x.isArray(e)?e:[e],u=l.length;if(!x.isObject(t))return t;for(n=(i=i||{}).merger||x._merger,r=0;r<u;++r)if(x.isObject(e=l[r]))for(s=0,a=(o=Object.keys(e)).length;s<a;++s)n(o[s],t,e,i);return t},mergeIf:function(t,e){return x.merge(t,e,{merger:x._mergerIf})},extend:Object.assign||function(t){return x.merge(t,[].slice.call(arguments,1),{merger:function(t,e,i){e[t]=i[t]}})},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=x.inherits,t&&x.extend(i.prototype,t),i.__super__=e.prototype,i},_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')}},S=x;x.callCallback=x.callback,x.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},x.getValueOrDefault=x.valueOrDefault,x.getValueAtIndexOrDefault=x.valueAtIndexOrDefault;var k={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-k.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*k.easeInBounce(2*t):.5*k.easeOutBounce(2*t-1)+.5}},C={effects:k};S.easingEffects=k;var E=Math.PI,A=E/180,M=2*E,P=E/2,I=E/4,L=2*E/3,O={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,r,o){if(o){var a=Math.min(o,r/2,n/2),s=e+a,l=i+a,u=e+n-a,c=i+r-a;t.moveTo(e,l),s<u&&l<c?(t.arc(s,l,a,-E,-P),t.arc(u,l,a,-P,0),t.arc(u,c,a,0,P),t.arc(s,c,a,P,E)):s<u?(t.moveTo(s,i),t.arc(u,l,a,-P,P),t.arc(s,l,a,P,E+P)):l<c?(t.arc(s,l,a,-E,0),t.arc(s,c,a,0,E)):t.arc(s,l,a,-E,E),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,r)},drawPoint:function(t,e,i,n,r,o){var a,s,l,u,c,d=(o||0)*A;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(a=e.toString())||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,r),t.rotate(d),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(i)||i<=0)){switch(t.beginPath(),e){default:t.arc(n,r,i,0,M),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(d)*i,r-Math.cos(d)*i),d+=L,t.lineTo(n+Math.sin(d)*i,r-Math.cos(d)*i),d+=L,t.lineTo(n+Math.sin(d)*i,r-Math.cos(d)*i),t.closePath();break;case"rectRounded":u=i-(c=.516*i),s=Math.cos(d+I)*u,l=Math.sin(d+I)*u,t.arc(n-s,r-l,c,d-E,d-P),t.arc(n+l,r-s,c,d-P,d),t.arc(n+s,r+l,c,d,d+P),t.arc(n-l,r+s,c,d+P,d+E),t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*i,t.rect(n-u,r-u,2*u,2*u);break}d+=I;case"rectRot":s=Math.cos(d)*i,l=Math.sin(d)*i,t.moveTo(n-s,r-l),t.lineTo(n+l,r-s),t.lineTo(n+s,r+l),t.lineTo(n-l,r+s),t.closePath();break;case"crossRot":d+=I;case"cross":s=Math.cos(d)*i,l=Math.sin(d)*i,t.moveTo(n-s,r-l),t.lineTo(n+s,r+l),t.moveTo(n+l,r-s),t.lineTo(n-l,r+s);break;case"star":s=Math.cos(d)*i,l=Math.sin(d)*i,t.moveTo(n-s,r-l),t.lineTo(n+s,r+l),t.moveTo(n+l,r-s),t.lineTo(n-l,r+s),d+=I,s=Math.cos(d)*i,l=Math.sin(d)*i,t.moveTo(n-s,r-l),t.lineTo(n+s,r+l),t.moveTo(n+l,r-s),t.lineTo(n-l,r+s);break;case"line":s=Math.cos(d)*i,l=Math.sin(d)*i,t.moveTo(n-s,r-l),t.lineTo(n+s,r+l);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(d)*i,r+Math.sin(d)*i)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){var r=i.steppedLine;if(r){if("middle"===r){var o=(e.x+i.x)/2;t.lineTo(o,n?i.y:e.y),t.lineTo(o,n?e.y:i.y)}else"after"===r&&!n||"after"!==r&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}else i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}},D=O;S.clear=O.clear,S.drawRoundedRectangle=function(t){t.beginPath(),O.roundedRect.apply(O,arguments)};var R={_set:function(t,e){return S.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var N=R,B=S.valueOrDefault,F={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,r;return S.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,r=+t.left||0):e=i=n=r=+t||0,{top:e,right:i,bottom:n,left:r,height:e+n,width:r+i}},_parseFont:function(t){var e=N.global,i=B(t.fontSize,e.defaultFontSize),n={family:B(t.fontFamily,e.defaultFontFamily),lineHeight:S.options.toLineHeight(B(t.lineHeight,e.defaultLineHeight),i),size:i,style:B(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return n.string=function(t){return!t||S.isNullOrUndef(t.size)||S.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n},resolve:function(t,e,i,n){var r,o,a,s=!0;for(r=0,o=t.length;r<o;++r)if(void 0!==(a=t[r])&&(void 0!==e&&"function"==typeof a&&(a=a(e),s=!1),void 0!==i&&S.isArray(a)&&(a=a[i],s=!1),void 0!==a))return n&&!s&&(n.cacheable=!1),a}},j={_factorize:function(t){var e,i=[],n=Math.sqrt(t);for(e=1;e<n;e++)t%e==0&&(i.push(e),i.push(t/e));return n===(0|n)&&i.push(n),i.sort((function(t,e){return t-e})).pop(),i},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e}},U=j;S.log10=j.log10;var z=S,H=D,W=F,V=U;z.easing=C,z.canvas=H,z.options=W,z.math=V,z.rtl={getRtlAdapter:function(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};var q=function(t){z.extend(this,t),this.initialize.apply(this,arguments)};z.extend(q.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=z.extend({},t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,n=e._start,r=e._view;return i&&1!==t?(r||(r=e._view={}),n||(n=e._start={}),function(t,e,i,n){var r,o,a,s,l,u,c,d,h,p=Object.keys(i);for(r=0,o=p.length;r<o;++r)if(u=i[a=p[r]],e.hasOwnProperty(a)||(e[a]=u),(s=e[a])!==u&&"_"!==a[0]){if(t.hasOwnProperty(a)||(t[a]=s),(c=typeof u)==typeof(l=t[a]))if("string"===c){if((d=b(l)).valid&&(h=b(u)).valid){e[a]=h.mix(d,n).rgbString();continue}}else if(z.isFinite(l)&&z.isFinite(u)){e[a]=l+(u-l)*n;continue}e[a]=u}}(n,r,i,t),e):(e._view=z.extend({},i),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return z.isNumber(this._model.x)&&z.isNumber(this._model.y)}}),q.extend=z.inherits;var G=q,Y=G.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),X=Y;Object.defineProperty(Y.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Y.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:z.noop,onComplete:z.noop}});var $={animations:[],request:null,addAnimation:function(t,e,i,n){var r,o,a=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=i,n||(t.animating=!0),r=0,o=a.length;r<o;++r)if(a[r].chart===t)return void(a[r]=e);a.push(e),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=z.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=z.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,r=this.animations,o=0;o<r.length;)e=(t=r[o]).chart,i=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*i)+1,t.currentStep=Math.min(n,i),z.callback(t.render,[e,t],e),z.callback(t.onAnimationProgress,[t],e),t.currentStep>=i?(z.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(o,1)):++o}},K=z.options.resolve,Z=["push","pop","shift","splice","unshift"];function Q(t,e){var i=t._chartjs;if(i){var n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Z.forEach((function(e){delete t[e]})),delete t._chartjs)}}var J=function(t,e){this.initialize(t,e)};z.extend(J.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements(),i._type=i.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,i=e.scales,n=this.getDataset(),r=e.options.scales;null!==t.xAxisID&&t.xAxisID in i&&!n.xAxisID||(t.xAxisID=n.xAxisID||r.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in i&&!n.yAxisID||(t.yAxisID=n.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Q(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],r=i.data;for(t=0,e=n.length;t<e;++t)r[t]=r[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,i=this,n=i.getDataset(),r=n.data||(n.data=[]);i._data!==r&&(i._data&&Q(i._data,i),r&&Object.isExtensible(r)&&(e=i,(t=r)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Z.forEach((function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),r=n.apply(this,e);return z.each(t._chartjs.listeners,(function(t){"function"==typeof t[i]&&t[i].apply(t,e)})),r}})})))),i._data=r),i.resyncElements()},_configure:function(){this._config=z.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,i){"_meta"!==t&&"data"!==t&&z._merger(t,e,i)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:z.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,r=0;r<n;++r)i[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},getStyle:function(t){var e,i=this.getMeta(),n=i.dataset;return this._configure(),!1!==(e=n&&void 0===t?this._resolveDatasetElementOptions(n||{}):this._resolveDataElementOptions(i.data[t=t||0]||{},t)).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var i,n,r,o,a=this,s=a.chart,l=a._config,u=t.custom||{},c=s.options.elements[a.datasetElementType.prototype._type]||{},d=a._datasetElementOptions,h={},p={chart:s,dataset:a.getDataset(),datasetIndex:a.index,hover:e};for(i=0,n=d.length;i<n;++i)r=d[i],o=e?"hover"+r.charAt(0).toUpperCase()+r.slice(1):r,h[r]=K([u[o],l[o],c[o]],p);return h},_resolveDataElementOptions:function(t,e){var i=this,n=t&&t.custom,r=i._cachedDataOpts;if(r&&!n)return r;var o,a,s,l,u=i.chart,c=i._config,d=u.options.elements[i.dataElementType.prototype._type]||{},h=i._dataElementOptions,p={},f={chart:u,dataIndex:e,dataset:i.getDataset(),datasetIndex:i.index},g={cacheable:!n};if(n=n||{},z.isArray(h))for(a=0,s=h.length;a<s;++a)p[l=h[a]]=K([n[l],c[l],d[l]],f,e,g);else for(a=0,s=(o=Object.keys(h)).length;a<s;++a)p[l=o[a]]=K([n[l],c[h[l]],c[l],d[l]],f,e,g);return g.cacheable&&(i._cachedDataOpts=Object.freeze(p)),p},removeHoverStyle:function(t){z.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},r=t._model,o=z.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=K([n.hoverBackgroundColor,e.hoverBackgroundColor,o(r.backgroundColor)],void 0,i),r.borderColor=K([n.hoverBorderColor,e.hoverBorderColor,o(r.borderColor)],void 0,i),r.borderWidth=K([n.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,i)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,i,n,r,o,a=this.getMeta().dataset,s={};if(a){for(o=a._model,r=this._resolveDatasetElementOptions(a,!0),t=0,e=(n=Object.keys(r)).length;t<e;++t)s[i=n[t]]=o[i],o[i]=r[i];a.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),J.extend=z.inherits;var tt=J,et=2*Math.PI;function it(t,e){var i=e.startAngle,n=e.endAngle,r=e.pixelMargin,o=r/e.outerRadius,a=e.x,s=e.y;t.beginPath(),t.arc(a,s,e.outerRadius,i-o,n+o),e.innerRadius>r?t.arc(a,s,e.innerRadius-r,n+(o=r/e.innerRadius),i-o,!0):t.arc(a,s,r,n+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var nt=G.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=z.getAngleFromPoint(i,{x:t,y:e}),r=n.angle,o=n.distance,a=i.startAngle,s=i.endAngle;s<a;)s+=et;for(;r>s;)r-=et;for(;r<a;)r+=et;return r>=a&&r<=s&&o>=i.innerRadius&&o<=i.outerRadius}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n="inner"===i.borderAlign?.33:0,r={x:i.x,y:i.y,innerRadius:i.innerRadius,outerRadius:Math.max(i.outerRadius-n,0),pixelMargin:n,startAngle:i.startAngle,endAngle:i.endAngle,fullCircles:Math.floor(i.circumference/et)};if(e.save(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+et,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;t<r.fullCircles;++t)e.fill();r.endAngle=r.startAngle+i.circumference%et}e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.fill(),i.borderWidth&&function(t,e,i){var n="inner"===e.borderAlign;n?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),i.fullCircles&&function(t,e,i,n){var r,o=i.endAngle;for(n&&(i.endAngle=i.startAngle+et,it(t,i),i.endAngle=o,i.endAngle===i.startAngle&&i.fullCircles&&(i.endAngle+=et,i.fullCircles--)),t.beginPath(),t.arc(i.x,i.y,i.innerRadius,i.startAngle+et,i.startAngle,!0),r=0;r<i.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.startAngle+et),r=0;r<i.fullCircles;++r)t.stroke()}(t,e,i,n),n&&it(t,i),t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.stroke()}(e,i,r),e.restore()}}),rt=z.valueOrDefault,ot=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:ot,borderWidth:3,borderColor:ot,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var at=G.extend({_type:"line",draw:function(){var t,e,i,n=this,r=n._view,o=n._chart.ctx,a=r.spanGaps,s=n._children.slice(),l=N.global,u=l.elements.line,c=-1,d=n._loop;if(s.length){if(n._loop){for(t=0;t<s.length;++t)if(e=z.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),d=a;break}d&&s.push(s[0])}for(o.save(),o.lineCap=r.borderCapStyle||u.borderCapStyle,o.setLineDash&&o.setLineDash(r.borderDash||u.borderDash),o.lineDashOffset=rt(r.borderDashOffset,u.borderDashOffset),o.lineJoin=r.borderJoinStyle||u.borderJoinStyle,o.lineWidth=rt(r.borderWidth,u.borderWidth),o.strokeStyle=r.borderColor||l.defaultColor,o.beginPath(),(i=s[0]._view).skip||(o.moveTo(i.x,i.y),c=0),t=1;t<s.length;++t)i=s[t]._view,e=-1===c?z.previousItem(s,t):s[c],i.skip||(c!==t-1&&!a||-1===c?o.moveTo(i.x,i.y):z.canvas.lineTo(o,e._view,i),c=t);d&&o.closePath(),o.stroke(),o.restore()}}}),st=z.valueOrDefault,lt=N.global.defaultColor;function ut(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:lt,borderColor:lt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ct=G.extend({_type:"point",inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:ut,inXRange:ut,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._chart.ctx,n=e.pointStyle,r=e.rotation,o=e.radius,a=e.x,s=e.y,l=N.global,u=l.defaultColor;e.skip||(void 0===t||z.canvas._isPointInArea(e,t))&&(i.strokeStyle=e.borderColor||u,i.lineWidth=st(e.borderWidth,l.elements.point.borderWidth),i.fillStyle=e.backgroundColor||u,z.canvas.drawPoint(i,n,o,a,s,r))}}),dt=N.global.defaultColor;function ht(t){return t&&void 0!==t.width}function pt(t){var e,i,n,r,o;return ht(t)?(e=t.x-(o=t.width/2),i=t.x+o,n=Math.min(t.y,t.base),r=Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),i=Math.max(t.x,t.base),n=t.y-o,r=t.y+o),{left:e,top:n,right:i,bottom:r}}function ft(t,e,i){return t===e?i:t===i?e:t}function gt(t,e,i){var n=null===e,r=null===i,o=!(!t||n&&r)&&pt(t);return o&&(n||e>=o.left&&e<=o.right)&&(r||i>=o.top&&i<=o.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:dt,borderColor:dt,borderSkipped:"bottom",borderWidth:0}}});var mt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=pt(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){var n,r,o,a,s=t.borderWidth,l=function(t){var e=t.borderSkipped,i={};return e?(t.horizontal?t.base>t.x&&(e=ft(e,"left","right")):t.base<t.y&&(e=ft(e,"bottom","top")),i[e]=!0,i):i}(t);return z.isObject(s)?(n=+s.top||0,r=+s.right||0,o=+s.bottom||0,a=+s.left||0):n=r=o=a=+s||0,{t:l.top||n<0?0:n>i?i:n,r:l.right||r<0?0:r>e?e:r,b:l.bottom||o<0?0:o>i?i:o,l:l.left||a<0?0:a>e?e:a}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b}}}(e),n=i.outer,r=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===r.w&&n.h===r.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return gt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return ht(i)?gt(i,t,null):gt(i,null,e)},inXRange:function(t){return gt(this._view,t,null)},inYRange:function(t){return gt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return ht(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return ht(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),vt={},yt=at,_t=ct,bt=mt;vt.Arc=nt,vt.Line=yt,vt.Point=_t,vt.Rectangle=bt;var Tt=z._deprecated,wt=z.valueOrDefault;N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var xt=tt.extend({dataElementType:vt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,i=this;tt.prototype.initialize.apply(i,arguments),(t=i.getMeta()).stack=i.getDataset().stack,t.bar=!0,e=i._getIndexScale().options,Tt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Tt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Tt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Tt("bar chart",i._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Tt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,r=n.getMeta(),o=n.getDataset(),a=n._resolveDataElementOptions(t,e);t._xScale=n.getScaleForId(r.xAxisID),t._yScale=n.getScaleForId(r.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:n.chart.data.labels[e]},z.isArray(o.data[e])&&(t._model.borderSkipped=null),n._updateElementGeometry(t,e,i,a),t.pivot()},_updateElementGeometry:function(t,e,i,n){var r=this,o=t._model,a=r._getValueScale(),s=a.getBasePixel(),l=a.isHorizontal(),u=r._ruler||r.getRuler(),c=r.calculateBarValuePixels(r.index,e,n),d=r.calculateBarIndexPixels(r.index,e,u,n);o.horizontal=l,o.base=i?s:c.base,o.x=l?i?s:c.head:d.center,o.y=l?d.center:i?s:c.head,o.height=l?d.size:void 0,o.width=l?void 0:d.size},_getStacks:function(t){var e,i,n=this._getIndexScale(),r=n._getMatchingVisibleMetas(this._type),o=n.options.stacked,a=r.length,s=[];for(e=0;e<a&&(i=r[e],(!1===o||-1===s.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&s.push(i.stack),i.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this._getIndexScale(),n=[];for(t=0,e=this.getMeta().data.length;t<e;++t)n.push(i.getPixelForValue(null,t,this.index));return{pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this.getStackCount(),scale:i}},calculateBarValuePixels:function(t,e,i){var n,r,o,a,s,l,u,c=this.chart,d=this._getValueScale(),h=d.isHorizontal(),p=c.data.datasets,f=d._getMatchingVisibleMetas(this._type),g=d._parseValue(p[t].data[e]),m=i.minBarLength,v=d.options.stacked,y=this.getMeta().stack,_=void 0===g.start?0:g.max>=0&&g.min>=0?g.min:g.max,b=void 0===g.start?g.end:g.max>=0&&g.min>=0?g.max-g.min:g.min-g.max,T=f.length;if(v||void 0===v&&void 0!==y)for(n=0;n<T&&(r=f[n]).index!==t;++n)r.stack===y&&(o=void 0===(u=d._parseValue(p[r.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(g.min<0&&o<0||g.max>=0&&o>0)&&(_+=o));return a=d.getPixelForValue(_),l=(s=d.getPixelForValue(_+b))-a,void 0!==m&&Math.abs(l)<m&&(l=m,s=b>=0&&!h||b<0&&h?a-m:a+m),{size:l,base:a,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,i,n){var r="flex"===n.barThickness?function(t,e,i){var n,r=e.pixels,o=r[t],a=t>0?r[t-1]:null,s=t<r.length-1?r[t+1]:null,l=i.categoryPercentage;return null===a&&(a=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-a),n=o-(o-Math.min(a,s))/2*l,{chunk:Math.abs(s-a)/2*l/e.stackCount,ratio:i.barPercentage,start:n}}(e,i,n):function(t,e,i){var n,r,o=i.barThickness,a=e.stackCount,s=e.pixels[t],l=z.isNullOrUndef(o)?function(t,e){var i,n,r,o,a=t._length;for(r=1,o=e.length;r<o;++r)a=Math.min(a,Math.abs(e[r]-e[r-1]));for(r=0,o=t.getTicks().length;r<o;++r)n=t.getPixelForTick(r),a=r>0?Math.min(a,Math.abs(n-i)):a,i=n;return a}(e.scale,e.pixels):-1;return z.isNullOrUndef(o)?(n=l*i.categoryPercentage,r=i.barPercentage):(n=o*a,r=1),{chunk:n/a,ratio:r,start:s-n/2}}(e,i,n),o=this.getStackIndex(t,this.getMeta().stack),a=r.start+r.chunk*o+r.chunk/2,s=Math.min(wt(n.maxBarThickness,1/0),r.chunk*r.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),i=this.getMeta().data,n=this.getDataset(),r=i.length,o=0;for(z.canvas.clipArea(t.ctx,t.chartArea);o<r;++o){var a=e._parseValue(n.data[o]);isNaN(a.min)||isNaN(a.max)||i[o].draw()}z.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=z.extend({},tt.prototype._resolveDataElementOptions.apply(t,arguments)),i=t._getIndexScale().options,n=t._getValueScale().options;return e.barPercentage=wt(i.barPercentage,e.barPercentage),e.barThickness=wt(i.barThickness,e.barThickness),e.categoryPercentage=wt(i.categoryPercentage,e.categoryPercentage),e.maxBarThickness=wt(i.maxBarThickness,e.maxBarThickness),e.minBarLength=wt(n.minBarLength,e.minBarLength),e}}),St=z.valueOrDefault,kt=z.options.resolve;N._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var Ct=tt.extend({dataElementType:vt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,i=e.getMeta();z.each(i.data,(function(i,n){e.updateElement(i,n,t)}))},updateElement:function(t,e,i){var n=this,r=n.getMeta(),o=t.custom||{},a=n.getScaleForId(r.xAxisID),s=n.getScaleForId(r.yAxisID),l=n._resolveDataElementOptions(t,e),u=n.getDataset().data[e],c=n.index,d=i?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof u?u:NaN,e,c),h=i?s.getBasePixel():s.getPixelForValue(u,e,c);t._xScale=a,t._yScale=s,t._options=l,t._datasetIndex=c,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:i?0:l.radius,skip:o.skip||isNaN(d)||isNaN(h),x:d,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=St(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=St(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=St(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},_resolveDataElementOptions:function(t,e){var i=this,n=i.chart,r=i.getDataset(),o=t.custom||{},a=r.data[e]||{},s=tt.prototype._resolveDataElementOptions.apply(i,arguments),l={chart:n,dataIndex:e,dataset:r,datasetIndex:i.index};return i._cachedDataOpts===s&&(s=z.extend({},s)),s.radius=kt([o.radius,a.r,i._config.radius,n.options.elements.point.radius],l,e),s}}),Et=z.valueOrDefault,At=Math.PI,Mt=2*At,Pt=At/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,i,n,r=document.createElement("ul"),o=t.data,a=o.datasets,s=o.labels;if(r.setAttribute("class",t.id+"-legend"),a.length)for(e=0,i=a[0].data.length;e<i;++e)(n=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],s[e]&&n.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(i,n){var r=t.getDatasetMeta(0),o=r.controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[n])||r.data[n].hidden,index:n}})):[]}},onClick:function(t,e){var i,n,r,o=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)(r=a.getDatasetMeta(i)).data[o]&&(r.data[o].hidden=!r.data[o].hidden);a.update()}},cutoutPercentage:50,rotation:-Pt,circumference:Mt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return z.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}});var It=tt.extend({dataElementType:vt.Arc,linkScales:z.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
1dColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e,i,n=this,r=n.chart,o=r.chartArea,a=r.options,s=1,l=1,u=0,c=0,d=n.getMeta(),h=d.data,p=a.cutoutPercentage/100||0,f=a.circumference,g=n._getRingWeight(n.index);if(f<Mt){var m=a.rotation%Mt,v=(m+=m>=At?-Mt:m<-At?Mt:0)+f,y=Math.cos(m),_=Math.sin(m),b=Math.cos(v),T=Math.sin(v),w=m<=0&&v>=0||v>=Mt,x=m<=Pt&&v>=Pt||v>=Mt+Pt,S=m<=-Pt&&v>=-Pt||v>=At+Pt,k=m===-At||v>=At?-1:Math.min(y,y*p,b,b*p),C=S?-1:Math.min(_,_*p,T,T*p),E=w?1:Math.max(y,y*p,b,b*p),A=x?1:Math.max(_,_*p,T,T*p);s=(E-k)/2,l=(A-C)/2,u=-(E+k)/2,c=-(A+C)/2}for(e=0,i=h.length;e<i;++e)h[e]._options=n._resolveDataElementOptions(h[e],e);for(r.borderWidth=n.getMaxBorderWidth(),r.outerRadius=Math.max(Math.min((o.right-o.left-r.borderWidth)/s,(o.bottom-o.top-r.borderWidth)/l)/2,0),r.innerRadius=Math.max(r.outerRadius*p,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(n._getVisibleDatasetWeightTotal()||1),r.offsetX=u*r.outerRadius,r.offsetY=c*r.outerRadius,d.total=n.calculateTotal(),n.outerRadius=r.outerRadius-r.radiusLength*n._getRingWeightOffset(n.index),n.innerRadius=Math.max(n.outerRadius-r.radiusLength*g,0),e=0,i=h.length;e<i;++e)n.updateElement(h[e],e,t)},updateElement:function(t,e,i){var n=this,r=n.chart,o=r.chartArea,a=r.options,s=a.animation,l=(o.left+o.right)/2,u=(o.top+o.bottom)/2,c=a.rotation,d=a.rotation,h=n.getDataset(),p=i&&s.animateRotate||t.hidden?0:n.calculateCircumference(h.data[e])*(a.circumference/Mt),f=t._options||{};z.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,borderAlign:f.borderAlign,x:l+r.offsetX,y:u+r.offsetY,startAngle:c,endAngle:d,circumference:p,outerRadius:i&&s.animateScale?0:n.outerRadius,innerRadius:i&&s.animateScale?0:n.innerRadius,label:z.valueAtIndexOrDefault(h.label,e,r.data.labels[e])}});var g=t._model;i&&s.animateRotate||(g.startAngle=0===e?a.rotation:n.getMeta().data[e-1]._model.endAngle,g.endAngle=g.startAngle+g.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return z.each(i.data,(function(i,r){t=e.data[r],isNaN(t)||i.hidden||(n+=Math.abs(t))})),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Mt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,r,o,a,s,l,u=0,c=this.chart;if(!t)for(e=0,i=c.data.datasets.length;e<i;++e)if(c.isDatasetVisible(e)){t=(n=c.getDatasetMeta(e)).data,e!==this.index&&(o=n.controller);break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)r=t[e],o?(o._configure(),a=o._resolveDataElementOptions(r,e)):a=r._options,"inner"!==a.borderAlign&&(u=(l=a.hoverBorderWidth)>(u=(s=a.borderWidth)>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Et(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Et(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Et(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},_getRingWeight:function(t){return Math.max(Et(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Lt=xt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ot=z.valueOrDefault,Dt=z.options.resolve,Rt=z.canvas._isPointInArea;function Nt(t,e){var i=t&&t.options.ticks||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Bt(t,e,i){var n=i/2,r=Nt(t,n),o=Nt(e,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function Ft(t){var e,i,n,r;return z.isObject(t)?(e=t.top,i=t.right,n=t.bottom,r=t.left):e=i=n=r=t,{top:e,right:i,bottom:n,left:r}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var jt=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,i,n=this,r=n.getMeta(),o=r.dataset,a=r.data||[],s=n._config,l=n._showLine=Ot(s.showLine,n.chart.options.showLines);for(n._xScale=n.getScaleForId(r.xAxisID),n._yScale=n.getScaleForId(r.yAxisID),l&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),o._scale=n._yScale,o._datasetIndex=n.index,o._children=a,o._model=n._resolveDatasetElementOptions(o),o.pivot()),e=0,i=a.length;e<i;++e)n.updateElement(a[e],e,t);for(l&&0!==o._model.tension&&n.updateBezierControlPoints(),e=0,i=a.length;e<i;++e)a[e].pivot()},updateElement:function(t,e,i){var n,r,o=this,a=o.getMeta(),s=t.custom||{},l=o.getDataset(),u=o.index,c=l.data[e],d=o._xScale,h=o._yScale,p=a.dataset._model,f=o._resolveDataElementOptions(t,e);n=d.getPixelForValue("object"==typeof c?c:NaN,e,u),r=i?h.getBasePixel():o.calculatePointY(c,e,u),t._xScale=d,t._yScale=h,t._options=f,t._datasetIndex=u,t._index=e,t._model={x:n,y:r,skip:s.skip||isNaN(n)||isNaN(r),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:Ot(s.tension,p?p.tension:0),steppedLine:!!p&&p.steppedLine,hitRadius:f.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,i=e._config,n=t.custom||{},r=e.chart.options,o=r.elements.line,a=tt.prototype._resolveDatasetElementOptions.apply(e,arguments);return a.spanGaps=Ot(i.spanGaps,r.spanGaps),a.tension=Ot(i.lineTension,o.tension),a.steppedLine=Dt([n.steppedLine,i.steppedLine,o.stepped]),a.clip=Ft(Ot(i.clip,Bt(e._xScale,e._yScale,a.borderWidth))),a},calculatePointY:function(t,e,i){var n,r,o,a,s,l,u=this.chart,c=this._yScale,d=0,h=0;if(c.options.stacked){for(a=+c.getRightValue(t),l=(s=u._getSortedVisibleDatasetMetas()).length,n=0;n<l&&(r=s[n]).index!==i;++n)"line"===r.type&&r.yAxisID===c.id&&((o=+c.getRightValue(u.data.datasets[r.index].data[e]))<0?h+=o||0:d+=o||0);return c.getPixelForValue(a<0?h+a:d+a)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,r=this.chart,o=this.getMeta(),a=o.dataset._model,s=r.chartArea,l=o.data||[];function u(t,e,i){return Math.max(Math.min(t,i),e)}if(a.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===a.cubicInterpolationMode)z.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)i=l[t]._model,n=z.splineCurve(z.previousItem(l,t)._model,i,z.nextItem(l,t)._model,a.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(r.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Rt(i=l[t]._model,s)&&(t>0&&Rt(l[t-1]._model,s)&&(i.controlPointPreviousX=u(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=u(i.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Rt(l[t+1]._model,s)&&(i.controlPointNextX=u(i.controlPointNextX,s.left,s.right),i.controlPointNextY=u(i.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,i=this.getMeta(),n=i.data||[],r=e.chartArea,o=e.canvas,a=0,s=n.length;for(this._showLine&&(z.canvas.clipArea(e.ctx,{left:!1===(t=i.dataset._model.clip).left?0:r.left-t.left,right:!1===t.right?o.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?o.height:r.bottom+t.bottom}),i.dataset.draw(),z.canvas.unclipArea(e.ctx));a<s;++a)n[a].draw(r)},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ot(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Ot(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Ot(i.hoverBorderWidth,i.borderWidth),e.radius=Ot(i.hoverRadius,i.radius)}}),Ut=z.options.resolve;N._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,i,n,r=document.createElement("ul"),o=t.data,a=o.datasets,s=o.labels;if(r.setAttribute("class",t.id+"-legend"),a.length)for(e=0,i=a[0].data.length;e<i;++e)(n=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],s[e]&&n.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(i,n){var r=t.getDatasetMeta(0),o=r.controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[n])||r.data[n].hidden,index:n}})):[]}},onClick:function(t,e){var i,n,r,o=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)(r=a.getDatasetMeta(i)).data[o].hidden=!r.data[o].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var zt=tt.extend({dataElementType:vt.Arc,linkScales:z.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
1dColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,i,n,r=this,o=r.getDataset(),a=r.getMeta(),s=r.chart.options.startAngle||0,l=r._starts=[],u=r._angles=[],c=a.data;for(r._updateRadius(),a.count=r.countVisibleElements(),e=0,i=o.data.length;e<i;e++)l[e]=s,n=r._computeAngle(e),u[e]=n,s+=n;for(e=0,i=c.length;e<i;++e)c[e]._options=r._resolveDataElementOptions(c[e],e),r.updateElement(c[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,r=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,i){var n=this,r=n.chart,o=n.getDataset(),a=r.options,s=a.animation,l=r.scale,u=r.data.labels,c=l.xCenter,d=l.yCenter,h=a.startAngle,p=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),f=n._starts[e],g=f+(t.hidden?0:n._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};z.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:c,y:d,innerRadius:0,outerRadius:i?m:p,startAngle:i&&s.animateRotate?h:f,endAngle:i&&s.animateRotate?h:g,label:z.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return z.each(e.data,(function(e,n){isNaN(t.data[n])||e.hidden||i++})),i},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor,r=z.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=r(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=r(i.hoverBorderWidth,i.borderWidth)},_computeAngle:function(t){var e=this,i=this.getMeta().count,n=e.getDataset(),r=e.getMeta();return isNaN(n.data[t])||r.data[t].hidden?0:Ut([e.chart.options.elements.arc.angle,2*Math.PI/i],{chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index},t)}});N._set("pie",z.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Ht=It,Wt=z.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Vt=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,linkScales:z.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,i,n=this,r=n.getMeta(),o=r.dataset,a=r.data||[],s=n.chart.scale,l=n._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=n.index,o._children=a,o._loop=!0,o._model=n._resolveDatasetElementOptions(o),o.pivot(),e=0,i=a.length;e<i;++e)n.updateElement(a[e],e,t);for(n.updateBezierControlPoints(),e=0,i=a.length;e<i;++e)a[e].pivot()},updateElement:function(t,e,i){var n=this,r=t.custom||{},o=n.getDataset(),a=n.chart.scale,s=a.getPointPositionForValue(e,o.data[e]),l=n._resolveDataElementOptions(t,e),u=n.getMeta().dataset._model,c=i?a.xCenter:s.x,d=i?a.yCenter:s.y;t._scale=a,t._options=l,t._datasetIndex=n.index,t._index=e,t._model={x:c,y:d,skip:r.skip||isNaN(c)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Wt(r.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,i=t.chart.options,n=tt.prototype._resolveDatasetElementOptions.apply(t,arguments);return n.spanGaps=Wt(e.spanGaps,i.spanGaps),n.tension=Wt(e.lineTension,i.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,i,n,r=this.getMeta(),o=this.chart.chartArea,a=r.data||[];function s(t,e,i){return Math.max(Math.min(t,i),e)}for(r.dataset._model.spanGaps&&(a=a.filter((function(t){return!t._model.skip}))),t=0,e=a.length;t<e;++t)i=a[t]._model,n=z.splineCurve(z.previousItem(a,t,!0)._model,i,z.nextItem(a,t,!0)._model,i.tension),i.controlPointPreviousX=s(n.previous.x,o.left,o.right),i.controlPointPreviousY=s(n.previous.y,o.top,o.bottom),i.controlPointNextX=s(n.next.x,o.left,o.right),i.controlPointNextY=s(n.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Wt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Wt(i.hoverBorderWidth,i.borderWidth),e.radius=Wt(i.hoverRadius,i.radius)}});N._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var qt={bar:xt,bubble:Ct,doughnut:It,horizontalBar:Lt,line:jt,polarArea:zt,pie:Ht,radar:Vt,scatter:jt};function Gt(t,e){return t.native?{x:t.x,y:t.y}:z.getRelativePosition(t,e)}function Yt(t,e){var i,n,r,o,a,s,l=t._getSortedVisibleDatasetMetas();for(n=0,o=l.length;n<o;++n)for(r=0,a=(i=l[n].data).length;r<a;++r)(s=i[r])._view.skip||e(s)}function Xt(t,e){var i=[];return Yt(t,(function(t){t.inRange(e.x,e.y)&&i.push(t)})),i}function $t(t,e,i,n){var r=Number.POSITIVE_INFINITY,o=[];return Yt(t,(function(t){if(!i||t.inRange(e.x,e.y)){var a=t.getCenterPoint(),s=n(e,a);s<r?(o=[t],r=s):s===r&&o.push(t)}})),o}function Kt(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var r=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function Zt(t,e,i){var n=Gt(e,t);i.axis=i.axis||"x";var r=Kt(i.axis),o=i.intersect?Xt(t,n):$t(t,n,!1,r),a=[];return o.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[o[0]._index];e&&!e._view.skip&&a.push(e)})),a):[]}var Qt={modes:{single:function(t,e){var i=Gt(e,t),n=[];return Yt(t,(function(t){if(t.inRange(i.x,i.y))return n.push(t),n})),n.slice(0,1)}
1,label:Zt,index:Zt,dataset:function(t,e,i){var n=Gt(e,t);i.axis=i.axis||"xy";var r=Kt(i.axis),o=i.intersect?Xt(t,n):$t(t,n,!1,r);return o.length>0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return Zt(t,e,{intersect:!1})},point:function(t,e){return Xt(t,Gt(e,t))},nearest:function(t,e,i){var n=Gt(e,t);i.axis=i.axis||"xy";var r=Kt(i.axis);return $t(t,n,i.intersect,r)},x:function(t,e,i){var n=Gt(e,t),r=[],o=!1;return Yt(t,(function(t){t.inXRange(n.x)&&r.push(t),t.inRange(n.x,n.y)&&(o=!0)})),i.intersect&&!o&&(r=[]),r},y:function(t,e,i){var n=Gt(e,t),r=[],o=!1;return Yt(t,(function(t){t.inYRange(n.y)&&r.push(t),t.inRange(n.x,n.y)&&(o=!0)})),i.intersect&&!o&&(r=[]),r}}},Jt=z.extend;function te(t,e){return z.where(t,(function(t){return t.pos===e}))}function ee(t,e){return t.sort((function(t,i){var n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function ie(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ne(t,e,i){var n,r,o=i.box,a=t.maxPadding;if(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?o.height:o.width,t[i.pos]+=i.size,o.getPadding){var s=o.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(n=e.outerWidth-ie(a,t,"left","right"),r=e.outerHeight-ie(a,t,"top","bottom"),n!==t.w||r!==t.h){t.w=n,t.h=r;var l=i.horizontal?[n,t.w]:[r,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function re(t,e){var i,n=e.maxPadding;return i={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}function oe(t,e,i){var n,r,o,a,s,l,u=[];for(n=0,r=t.length;n<r;++n)(a=(o=t[n]).box).update(o.width||e.w,o.height||e.h,re(o.horizontal,e)),ne(e,i,o)&&(l=!0,u.length&&(s=!0)),a.fullWidth||u.push(o);return s&&oe(u,e,i)||l}function ae(t,e,i){var n,r,o,a,s=i.padding,l=e.x,u=e.y;for(n=0,r=t.length;n<r;++n)a=(o=t[n]).box,o.horizontal?(a.left=a.fullWidth?s.left:e.left,a.right=a.fullWidth?i.outerWidth-s.right:e.left+e.w,a.top=u,a.bottom=u+a.height,a.width=a.right-a.left,u=a.bottom):(a.left=l,a.right=l+a.width,a.top=e.top,a.bottom=e.top+e.h,a.height=a.bottom-a.top,l=a.right);e.x=l,e.y=u}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var se,le={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,r=["fullWidth","position","weight"],o=r.length,a=0;a<o;++a)i.hasOwnProperty(n=r[a])&&(e[n]=i[n])},update:function(t,e,i){if(t){var n=z.options.toPadding((t.options.layout||{}).padding),r=e-n.width,o=i-n.height,a=function(t){var e=function(t){var e,i,n,r=[];for(e=0,i=(t||[]).length;e<i;++e)r.push({index:e,box:n=t[e],pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return r}(t),i=ee(te(e,"left"),!0),n=ee(te(e,"right")),r=ee(te(e,"top"),!0),o=ee(te(e,"bottom"));return{leftAndTop:i.concat(r),rightAndBottom:n.concat(o),chartArea:te(e,"chartArea"),vertical:i.concat(n),horizontal:r.concat(o)}}(t.boxes),s=a.vertical,l=a.horizontal,u=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:r,vBoxMaxWidth:r/2/s.length,hBoxMaxHeight:o/2}),c=Jt({maxPadding:Jt({},n),w:r,h:o,x:n.left,y:n.top},n);!function(t,e){var i,n,r;for(i=0,n=t.length;i<n;++i)(r=t[i]).width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}(s.concat(l),u),oe(s,c,u),oe(l,c,u)&&oe(s,c,u),function(t){var e=t.maxPadding;function i(i){var n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(c),ae(a.leftAndTop,c,u),c.x+=c.w,c.y+=c.h,ae(a.rightAndBottom,c,u),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},z.each(a.chartArea,(function(e){var i=e.box;Jt(i,t.chartArea),i.update(c.w,c.h)}))}}},ue=(se=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&se.default||se,ce=["animationstart","webkitAnimationStart"],de={touchstart:"mousedown",touchmove:"mou
1semove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function he(t,e){var i=z.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var pe=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(i){}return t}()&&{passive:!0};function fe(t,e,i){t.addEventListener(e,i,pe)}function ge(t,e,i){t.removeEventListener(e,i,pe)}function me(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function ve(t){var e=document.createElement("div");return e.className=t||"",e}var ye={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var i=t.$chartjs||(t.$chartjs={});if(!i.containsStyles){i.containsStyles=!0,e="/* Chart.js */\n"+e;var n=document.createElement("style");n.setAttribute("type","text/css"),n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(e.host?e:document.head,ue)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(this._ensureLoaded(t),function(t,e){var i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===r||""===r){var o=he(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var a=he(t,"height");void 0!==o&&(t.height=a)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e.$chartjs){var i=e.$chartjs.initial;["height","width"].forEach((function(t){var n=i[t];z.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)})),z.each(i.style||{},(function(t,i){e.style[i]=t})),e.width=e.width,delete e.$chartjs}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var r=i.$chartjs||(i.$chartjs={});fe(n,e,(r.proxies||(r.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=de[t.type]||t.type,n=z.getRelativePosition(t,e);return me(i,e,n.x,n.y,t)}(e,t))})}else!function(t,e,i){var n,r,o,a,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=ve("chartjs-size-monitor"),i=ve("chartjs-size-monitor-expand"),n=ve("chartjs-size-monitor-shrink");i.appendChild(ve()),n.appendChild(ve()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var r=function(){e._reset(),t()};return fe(i,"scroll",r.bind(i,"expand")),fe(n,"scroll",r.bind(n,"shrink")),e}((n=function(){if(s.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,r=n?n.clientWidth:0;e(me("resize",i)),n&&n.clientWidth<r&&i.canvas&&e(me("resize",i))}},o=!1,a=[],function(){a=Array.prototype.slice.call(arguments),r=r||this,o||(o=!0,z.requestAnimFrame.call(window,(function(){o=!1,n.apply(r,a)})))}));!function(t,e){var i=t.$chartjs||(t.$chartjs={}),n=i.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};z.each(ce,(function(e){fe(t,e,n)})),i.reflow=!!t.offsetParent,t.classList.add("chartjs-render-monitor")}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}(n,i,t)},removeEventListener:function(t,e,i){var n,r,o,a=t.canvas;if("resize"!==e){var s=((i.$chartjs||{}).proxies||{})[t.id+"_"+e];s&&ge(a,e,s)}else o=(r=(n=a).$chartjs||{}).resizer,delete r.resizer,function(t){var e=t.$chartjs||{},i=e.renderProxy;i&&(z.each(ce,(function(e){ge(t,e,i)})),delete e.renderProxy),t.classList.remove("chartjs-render-monitor")}(n),o&&o.parentNode&&o.parentNode.removeChild(o)}};z.addEvent=fe,z.removeEvent=ge;var _e=z.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},ye._enabled?ye:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});N._set("global",{plugins:{}});var be={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins}
vendor: 4,292 bytes, line 1
1,notify:function(t,e,i){var n,r,o,a,s,l=this.descriptors(t),u=l.length;for(n=0;n<u;++n)if("function"==typeof(s=(o=(r=l[n]).plugin)[e])&&((a=[t].concat(i||[])).push(r.options),!1===s.apply(o,a)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],n=[],r=t&&t.config||{},o=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach((function(t){if(-1===i.indexOf(t)){var e=t.id,r=o[e];!1!==r&&(!0===r&&(r=z.clone(N.global.plugins[e])),i.push(t),n.push({plugin:t,options:r||{}}))}})),e.descriptors=n,e.id=this._cacheId,n},_invalidate:function(t){delete t.$plugins}},Te={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=z.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?z.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=z.extend(this.defaults[t],e))},addScalesToLayout:function(t){z.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,le.addBox(t,e)}))}},we=z.valueOrDefault,xe=z.rtl.getRtlAdapter;N._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:z.noop,title:function(t,e){var i="",n=e.labels,r=n?n.length:0;if(t.length>0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:r>0&&o.index<r&&(i=n[o.index])}return i},afterTitle:z.noop,beforeBody:z.noop,beforeLabel:z.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),z.isNullOrUndef(t.value)?i+=t.yLabel:i+=t.value,i},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:z.noop,afterBody:z.noop,beforeFooter:z.noop,footer:z.noop,afterFooter:z.noop}}});var Se={average:function(t){if(!t.length)return!1;var e,i,n=0,r=0,o=0;for(e=0,i=t.length;e<i;++e){var a=t[e];if(a&&a.hasValue()){var s=a.tooltipPosition();n+=s.x,r+=s.y,++o}}return{x:n/o,y:r/o}},nearest:function(t,e){var i,n,r,o=e.x,a=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var u=l.getCenterPoint(),c=z.distanceBetweenPoints(e,u);c<s&&(s=c,r=l)}}if(r){var d=r.tooltipPosition();o=d.x,a=d.y}return{x:o,y:a}}};function ke(t,e){return e&&(z.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ce(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ee(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:we(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:we(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:we(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:we(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:we(t.titleFontStyle,e.defaultFontStyle),titleFontSize:we(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:we(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:we(t.footerFontStyle,e.defaultFontStyle),footerFontSize:we(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackgroun
vendor: 4,758 bytes, line 1
1d:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ae(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Me(t){return ke([],Ce(t))}var Pe=G.extend({initialize:function(){this._model=Ee(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,i=e.callbacks,n=i.beforeTitle.apply(t,arguments),r=i.title.apply(t,arguments),o=i.afterTitle.apply(t,arguments),a=[];return a=ke(a,Ce(n)),a=ke(a,Ce(r)),ke(a,Ce(o))},getBeforeBody:function(){return Me(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,r=[];return z.each(t,(function(t){var o={before:[],lines:[],after:[]};ke(o.before,Ce(n.beforeLabel.call(i,t,e))),ke(o.lines,n.label.call(i,t,e)),ke(o.after,Ce(n.afterLabel.call(i,t,e))),r.push(o)})),r},getAfterBody:function(){return Me(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),n=e.footer.apply(t,arguments),r=e.afterFooter.apply(t,arguments),o=[];return o=ke(o,Ce(i)),o=ke(o,Ce(n)),ke(o,Ce(r))},update:function(t){var e,i,n,r,o,a,s,l,u,c,d=this,h=d._options,p=d._model,f=d._model=Ee(h),g=d._active,m=d._data,v={xAlign:p.xAlign,yAlign:p.yAlign},y={x:p.x,y:p.y},_={width:p.width,height:p.height},b={x:p.caretX,y:p.caretY};if(g.length){f.opacity=1;var T=[],w=[];b=Se[h.position].call(d,g,d._eventPosition);var x=[];for(e=0,i=g.length;e<i;++e)x.push((r=void 0,o=void 0,l=void 0,u=void 0,c=void 0,r=(n=g[e])._xScale,o=n._yScale||n._scale,a=n._index,u=(l=n._chart.getDatasetMeta(s=n._datasetIndex).controller)._getIndexScale(),c=l._getValueScale(),{xLabel:r?r.getLabelForIndex(a,s):"",yLabel:o?o.getLabelForIndex(a,s):"",label:u?""+u.getLabelForIndex(a,s):"",value:c?""+c.getLabelForIndex(a,s):"",index:a,datasetIndex:s,x:n._model.x,y:n._model.y}));h.filter&&(x=x.filter((function(t){return h.filter(t,m)}))),h.itemSort&&(x=x.sort((function(t,e){return h.itemSort(t,e,m)}))),z.each(x,(function(t){T.push(h.callbacks.labelColor.call(d,t,d._chart)),w.push(h.callbacks.labelTextColor.call(d,t,d._chart))})),f.title=d.getTitle(x,m),f.beforeBody=d.getBeforeBody(x,m),f.body=d.getBody(x,m),f.afterBody=d.getAfterBody(x,m),f.footer=d.getFooter(x,m),f.x=b.x,f.y=b.y,f.caretPadding=h.caretPadding,f.labelColors=T,f.labelTextColors=w,f.dataPoints=x,_=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,r=0,o=e.body,a=o.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0),s=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,d=e.footerFontSize;n+=s*u,n+=s?(s-1)*e.titleSpacing:0,n+=s?e.titleMarginBottom:0,n+=(a+=e.beforeBody.length+e.afterBody.length)*c,n+=a?(a-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*d,n+=l?(l-1)*e.footerSpacing:0;var h=0,p=function(t){r=Math.max(r,i.measureText(t).width+h)};return i.font=z.fontString(u,e._titleFontStyle,e._titleFontFamily),z.each(e.title,p),i.font=z.fontString(c,e._bodyFontStyle,e._bodyFontFamily),z.each(e.beforeBody.concat(e.afterBody),p),h=e.displayColors?c+2:0,z.each(o,(function(t){z.each(t.before,p),z.each(t.lines,p),z.each(t.after,p)})),h=0,i.font=z.fontString(d,e._footerFontStyle,e._footerFontFamily),z.each(e.footer,p),{width:r+=2*e.xPadding,height:n}}(this,f),y=function(t,e,i,n){var r=t.x,o=t.y,a=t.caretPadding,s=i.xAlign,l=i.yAlign,u=t.caretSize+a,c=t.cornerRadius+a;return"right"===s?r-=e.width:"center"===s&&((r-=e.width/2)+e.width>n.width&&(r=n.width-e.width),r<0&&(r=0)),"top"===l?o+=u:o-="bottom"===l?e.height+u:e.height/2,"center"===l?"left"===s?r+=u:"right"===s&&(r-=u):"left"===s?r-=c:"right"===s&&(r+=c),{x:r,y:o}}(f,_,v=function(t,e){var i,n,r,o,a,s=t._model,l=t._chart,u=t._chart.chartArea,c="center",d="center";s.y<e.height?d="top":s.y>l.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,p=(u.top+u.bottom)/2;"center"===d?(i=function(t){return t<=h},n=function(t){return t>h}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=p?"top":"bottom"},i(s.x)?(c="left",r(s.x)&&(c="center",d=a(s.y))):n(s.x)&&(c="right",o(s.x)&&(c="center",d=a(s.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:c,yAlign:f.yAlign?f.yAlign:d}}(this,_),d._chart)}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=y.x,f.y=y.y,f.width=_.width,f.height=_.height,f.caretX=b.x,f.caretY=b.y,d._model=f,t&&h.custom&&h.custom.call(d,f),d},drawCaret:function(t,e){var i=this._chart.ctx,n=this.getCaretPosition(t,e,this._view);i.lineTo(n.x1,n.y1),i.lineTo(n.x2,n.y2),i.lineTo(n.x3,n.y3)}
vendor: 9,278 bytes, line 1
1,getCaretPosition:function(t,e,i){var n,r,o,a,s,l,u=i.caretSize,c=i.cornerRadius,d=i.xAlign,h=i.yAlign,p=t.x,f=t.y,g=e.width,m=e.height;if("center"===h)s=f+m/2,"left"===d?(r=(n=p)-u,o=n,a=s+u,l=s-u):(r=(n=p+g)+u,o=n,a=s-u,l=s+u);else if("left"===d?(n=(r=p+c+u)-u,o=r+u):"right"===d?(n=(r=p+g-c-u)-u,o=r+u):(n=(r=i.caretX)-u,o=r+u),"top"===h)s=(a=f)-u,l=a;else{s=(a=f+m)+u,l=a;var v=o;o=n,n=v}return{x1:n,x2:r,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(t,e,i){var n,r,o,a=e.title,s=a.length;if(s){var l=xe(e.rtl,e.x,e.width);for(t.x=Ae(e,e._titleAlign),i.textAlign=l.textAlign(e._titleAlign),i.textBaseline="middle",n=e.titleFontSize,r=e.titleSpacing,i.fillStyle=e.titleFontColor,i.font=z.fontString(n,e._titleFontStyle,e._titleFontFamily),o=0;o<s;++o)i.fillText(a[o],l.x(t.x),t.y+n/2),t.y+=n+r,o+1===s&&(t.y+=e.titleMarginBottom-r)}},drawBody:function(t,e,i){var n,r,o,a,s,l,u,c,d=e.bodyFontSize,h=e.bodySpacing,p=e._bodyAlign,f=e.body,g=e.displayColors,m=0,v=g?Ae(e,"left"):0,y=xe(e.rtl,e.x,e.width),_=function(e){i.fillText(e,y.x(t.x+m),t.y+d/2),t.y+=d+h},b=y.textAlign(p);for(i.textAlign=p,i.textBaseline="middle",i.font=z.fontString(d,e._bodyFontStyle,e._bodyFontFamily),t.x=Ae(e,b),i.fillStyle=e.bodyFontColor,z.each(e.beforeBody,_),m=g&&"right"!==b?"center"===p?d/2+1:d+2:0,s=0,u=f.length;s<u;++s){for(n=f[s],o=e.labelColors[s],i.fillStyle=r=e.labelTextColors[s],z.each(n.before,_),l=0,c=(a=n.lines).length;l<c;++l){if(g){var T=y.x(v);i.fillStyle=e.legendColorBackground,i.fillRect(y.leftForLtr(T,d),t.y,d,d),i.lineWidth=1,i.strokeStyle=o.borderColor,i.strokeRect(y.leftForLtr(T,d),t.y,d,d),i.fillStyle=o.backgroundColor,i.fillRect(y.leftForLtr(y.xPlus(T,1),d-2),t.y+1,d-2,d-2),i.fillStyle=r}_(a[l])}z.each(n.after,_)}m=0,z.each(e.afterBody,_),t.y-=h},drawFooter:function(t,e,i){var n,r,o=e.footer,a=o.length;if(a){var s=xe(e.rtl,e.x,e.width);for(t.x=Ae(e,e._footerAlign),t.y+=e.footerMarginTop,i.textAlign=s.textAlign(e._footerAlign),i.textBaseline="middle",n=e.footerFontSize,i.fillStyle=e.footerFontColor,i.font=z.fontString(n,e._footerFontStyle,e._footerFontFamily),r=0;r<a;++r)i.fillText(o[r],s.x(t.x),t.y+n/2),t.y+=n+e.footerSpacing}},drawBackground:function(t,e,i,n){i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,i.lineWidth=e.borderWidth;var r=e.xAlign,o=e.yAlign,a=t.x,s=t.y,l=n.width,u=n.height,c=e.cornerRadius;i.beginPath(),i.moveTo(a+c,s),"top"===o&&this.drawCaret(t,n),i.lineTo(a+l-c,s),i.quadraticCurveTo(a+l,s,a+l,s+c),"center"===o&&"right"===r&&this.drawCaret(t,n),i.lineTo(a+l,s+u-c),i.quadraticCurveTo(a+l,s+u,a+l-c,s+u),"bottom"===o&&this.drawCaret(t,n),i.lineTo(a+c,s+u),i.quadraticCurveTo(a,s+u,a,s+u-c),"center"===o&&"left"===r&&this.drawCaret(t,n),i.lineTo(a,s+c),i.quadraticCurveTo(a,s,a+c,s),i.closePath(),i.fill(),e.borderWidth>0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=r,this.drawBackground(n,e,t,i),n.y+=e.yPadding,z.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),z.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:(i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&i._active.reverse()),(e=!z.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}});Pe.positioners=Se;var Ie=z.valueOrDefault;function Le(){return z.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var r,o,a,s=i[t].length;for(e[t]||(e[t]=[]),r=0;r<s;++r)o=Ie((a=i[t][r]).type,"xAxes"===t?"category":"linear"),r>=e[t].length&&e[t].push({}),z.merge(e[t][r],!e[t][r].type||a.type&&a.type!==e[t][r].type?[Te.getScaleDefaults(o),a]:a)}else z._merger(t,e,i,n)}})}function Oe(){return z.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){var r=e[t]||Object.create(null),o=i[t];"scales"===t?e[t]=Le(r,o):"scale"===t?e[t]=z.merge(r,[Te.getScaleDefaults(o.type),o]):z._merger(t,e,i,n)}})}function De(t){var e=t.options;z.each(t.scales,(function(e){le.removeBox(t,e)})),e=Oe(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Re(t,e,i){var n,r=function(t){return t.id===n};do{n=e+i++}while(z.findIndex(t,r)>=0);return n}function Ne(t){return"top"===t||"bottom"===t}function Be(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Fe=function(t,e){return this.construct(t,e),this};z.extend(Fe.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Oe(N.global,N[t.type],t.options||{}),t}(e);var n=_e.acquireContext(t,e),r=n&&n.canvas,o=r&&r.height,a=r&&r.width;i.id=z.uid(),i.ctx=n,i.canvas=r,i.config=e,i.width=a,i.height=o,i.aspectRatio=o?a/o:null,i.options=e.options,i._bufferedRender=!1,i._layers=[],i.chart=i,i.controller=i,Fe.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&r?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return be.notify(t,"beforeInit"),z.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),be.notify(t,"afterInit"),t},clear:function(){return z.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,r=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(z.getMaximumWidth(n))),a=Math.max(0,Math.floor(r?o/r:z.getMaximumHeight(n)));if((e.width!==o||e.height!==a)&&(n.width=e.width=o,n.height=e.height=a,n.style.width=o+"px",n.style.height=a+"px",z.retinaScale(e,i.devicePixelRatio),!t)){var s={width:o,height:a};be.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;z.each(e.xAxes,(function(t,i){t.id||(t.id=Re(e.xAxes,"x-axis-",i))})),z.each(e.yAxes,(function(t,i){t.id||(t.id=Re(e.yAxes,"y-axis-",i))})),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],r=Object.keys(i).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),z.each(n,(function(e){var n=e.options,o=n.id,a=Ie(n.type,e.dtype);Ne(n.position)!==Ne(e.dposition)&&(n.position=e.dposition),r[o]=!0;var s=null;if(o in i&&i[o].type===a)(s=i[o]).options=n,s.ctx=t.ctx,s.chart=t;else{var l=Te.getScaleConstructor(a);if(!l)return;s=new l({id:o,type:a,options:n,ctx:t.ctx,chart:t}),i[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),z.each(r,(function(t,e){t||delete i[e]})),t.scales=i,Te.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,i=this,n=[],r=i.data.datasets;for(t=0,e=r.length;t<e;t++){var o=r[t],a=i.getDatasetMeta(t),s=o.type||i.config.type;if(a.type&&a.type!==s&&(i.destroyDatasetMeta(t),a=i.getDatasetMeta(t)),a.type=s,a.order=o.order||0,a.index=t,a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{var l=qt[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(i,t),n.push(a.controller)}}return n},resetElements:function(){var t=this;z.each(t.data.datasets,(function(e,i){t.getDatasetMeta(i).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),De(n),be._invalidate(n),!1!==be.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var r=n.buildOrUpdateControllers();for(e=0,i=n.data.datasets.length;e<i;e++)n.getDatasetMeta(e).controller.buildOrUpdateElements();n.updateLayout(),n.options.animation&&n.options.animation.duration&&z.each(r,(function(t){t.reset()})),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],be.notify(n,"afterUpdate"),n._layers.sort(Be("z","_idx")),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){var t=this;!1!==be.notify(t,"beforeLayout")&&(le.update(this,this.width,this.height),t._layers=[],z.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}
1),t),t._layers.forEach((function(t,e){t._idx=e})),be.notify(t,"afterScaleUpdate"),be.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==be.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);be.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==be.notify(this,"beforeDatasetUpdate",[i])&&(e.controller._update(),be.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=e.options.animation,n=Ie(t.duration,i&&i.duration),r=t.lazy;if(!1!==be.notify(e,"beforeRender")){var o=function(t){be.notify(e,"afterRender"),z.callback(i&&i.onComplete,[t],e)};if(i&&n){var a=new X({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=e.currentStep,n=i/e.numSteps;t.draw((0,z.easing.effects[e.easing])(n),n,i)},onAnimationProgress:i.onProgress,onAnimationComplete:o});$.addAnimation(e,a,n,r)}else e.draw(),o(new X({numSteps:0,chart:e}));return e}},draw:function(t){var e,i,n=this;if(n.clear(),z.isNullOrUndef(t)&&(t=1),n.transition(t),!(n.width<=0||n.height<=0)&&!1!==be.notify(n,"beforeDraw",[t])){for(i=n._layers,e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(n.chartArea);for(n.drawDatasets(t);e<i.length;++e)i[e].draw(n.chartArea);n._drawTooltip(t),be.notify(n,"afterDraw",[t])}},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,i,n=[];for(e=0,i=(this.data.datasets||[]).length;e<i;++e)t&&!this.isDatasetVisible(e)||n.push(this.getDatasetMeta(e));return n.sort(Be("order","index")),n},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,i;if(!1!==be.notify(this,"beforeDatasetsDraw",[t])){for(i=(e=this._getSortedVisibleDatasetMetas()).length-1;i>=0;--i)this.drawDataset(e[i],t);be.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i={meta:t,index:t.index,easingValue:e};!1!==be.notify(this,"beforeDatasetDraw",[i])&&(t.controller.draw(e),be.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==be.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),be.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Qt.modes.single(this,t)},getElementsAtEvent:function(t){return Qt.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Qt.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=Qt.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return Qt.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),z.canvas.clear(i),_e.releaseContext(i.ctx),i.canvas=null,i.ctx=null),be.notify(i,"destroy"),delete Fe.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Pe({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};z.each(t.options.events,(function(n){_e.addEventListener(t,n,i),e[n]=i})),t.options.responsive&&(i=function(){t.resize()},_e.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,z.each(e,(function(e,i){_e.removeEventListener(t,i,e)})))}
vendor: 8,641 bytes, line 1
1,updateHoverStyle:function(t,e,i){var n,r,o,a=i?"set":"remove";for(r=0,o=t.length;r<o;++r)(n=t[r])&&this.getDatasetMeta(n._datasetIndex).controller[a+"HoverStyle"](n);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==be.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),be.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):n&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},r=n.hover;return i.lastActive=i.lastActive||[],i.active="mouseout"===t.type?[]:i.getElementsAtEventForMode(t,r.mode,r),z.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,r.mode,!1),i.active.length&&r.mode&&i.updateHoverStyle(i.active,r.mode,!0),e=!z.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),Fe.instances={};var je=Fe;function Ue(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ze(t){this.options=t||{}}Fe.Controller=Fe,Fe.types={},z.configMerge=Oe,z.scaleMerge=Le,z.extend(ze.prototype,{formats:Ue,parse:Ue,format:Ue,add:Ue,diff:Ue,startOf:Ue,endOf:Ue,_create:function(t){return t}}),ze.override=function(t){z.extend(ze.prototype,t)};var He={_date:ze},We={formatters:{values:function(t){return z.isArray(t)?t:""+t},linear:function(t,e,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var r=z.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var a=z.log10(Math.abs(t)),s=Math.floor(a)-Math.floor(r);s=Math.max(Math.min(s,20),0),o=t.toExponential(s)}else{var l=-1*Math.floor(r);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(z.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},Ve=z.isArray,qe=z.isNullOrUndef,Ge=z.valueOrDefault,Ye=z.valueAtIndexOrDefault;function Xe(t,e,i){var n,r=t.getTicks().length,o=Math.min(e,r-1),a=t.getPixelForTick(o),s=t._startPixel,l=t._endPixel;if(!(i&&(n=1===r?Math.max(a-s,l-a):0===e?(t.getPixelForTick(1)-a)/2:(a-t.getPixelForTick(o-1))/2,(a+=o<e?n:-n)<s-1e-6||a>l+1e-6)))return a}function $e(t){return t.drawTicks?t.tickMarkLength:0}function Ke(t){var e,i;return t.display?(e=z.options._parseFont(t),i=z.options.toPadding(t.padding),e.lineHeight+i.height):0}function Ze(t,e){return z.extend(z.options._parseFont({fontFamily:Ge(e.fontFamily,t.fontFamily),fontSize:Ge(e.fontSize,t.fontSize),fontStyle:Ge(e.fontStyle,t.fontStyle),lineHeight:Ge(e.lineHeight,t.lineHeight)}),{color:z.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function Qe(t){var e=Ze(t,t.minor);return{minor:e,major:t.major.enabled?Ze(t,t.major):e}}function Je(t){var e,i,n,r=[];for(i=0,n=t.length;i<n;++i)void 0!==(e=t[i])._index&&r.push(e);return r}function ti(t,e,i,n){var r,o,a,s,l=Ge(i,0),u=Math.min(Ge(n,t.length),t.length),c=0;for(e=Math.ceil(e),n&&(e=(r=n-i)/Math.floor(r/e)),s=l;s<0;)c++,s=Math.round(l+c*e);for(o=Math.max(l,0);o<u;o++)a=t[o],o===s?(a._index=o,c++,s=Math.round(l+c*e)):delete a.label}N._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:We.formatters.values,minor:{},major:{}}});var ei=G.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){z.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,r,o,a,s,l=this,u=l.options.ticks,c=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=z.extend({left:0,right:0,top:0,bottom:0},i),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],(!(a=l.afterBuildTicks(a)||a)||!a.length)&&l.ticks)for(a=[],n=0,r=l.ticks.length;n<r;++n)a.push({value:l.ticks[n],major:!1});return l._ticks=a,o=l._convertTicksToLabels((s=c<a.length)?function(t,e){for(var i=[],n=t.length/e,r=0,o=t.length;r<o;r+=n)i.push(t[Math.floor(r)]);return i}(a,c):a),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(a):a,s&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var t,e,i=this,n=i.options.ticks.reverse;i.isHorizontal()?(t=i.left,e=i.right):(t=i.top,e=i.bottom,n=!n),i._startPixel=t,i._endPixel=e,i._reversePixels=n,i._length=e-t},afterUpdate:function(){z.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){z.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){z.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){z.callback(this.options.beforeDataLimits,[this])},determineDataLimits:z.noop,afterDataLimits:function(){z.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){z.callback(this.options.beforeBuildTicks,[this])},buildTicks:z.noop,afterBuildTicks:function(t){var e=this;return Ve(t)&&t.length?z.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=z.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){z.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){z.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){z.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,i,n,r,o,a,s=this,l=s.options,u=l.ticks,c=s.getTicks().length,d=u.minRotation||0,h=u.maxRotation,p=d;!s._isVisible()||!u.display||d>=h||c<=1||!s.isHorizontal()?s.labelRotation=d:(e=(t=s._getLabelSizes()).widest.width,i=t.highest.height-t.highest.offset,n=Math.min(s.maxWidth,s.chart.width-e),e+6>(r=l.offset?s.maxWidth/c:n/(c-1))&&(r=n/(c-(l.offset?.5:1)),o=s.maxHeight-$e(l.gridLines)-u.padding-Ke(l.scaleLabel),a=Math.sqrt(e*e+i*i),p=z.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(o/a,1))-Math.asin(i/a))),p=Math.max(d,Math.min(h,p))),s.labelRotation=p)},afterCalculateTickRotation:function(){z.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){z.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=t.chart,n=t.options,r=n.ticks,o=n.scaleLabel,a=n.gridLines,s=t._isVisible(),l="bottom"===n.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=$e(a)+Ke(o)),u?s&&(e.height=$e(a)+Ke(o)):e.height=t.maxHeight,r.display&&s){var c=Qe(r),d=t._getLabelSizes(),h=d.first,p=d.last,f=d.widest,g=d.highest,m=.4*c.minor.lineHeight,v=r.padding;if(u){var y=0!==t.labelRotation,_=z.toRadians(t.labelRotation),b=Math.cos(_),T=Math.sin(_);e.height=Math.min(t.maxHeight,e.height+(T*f.width+b*(g.height-(y?g.offset:0))+(y?0:m))+v);var w,x,S=t.getPixelForTick(0)-t.left,k=t.right-t.getPixelForTick(t.getTicks().length-1);
1y?(w=l?b*h.width+T*h.offset:T*(h.height-h.offset),x=l?T*(p.height-p.offset):b*p.width+T*p.offset):(w=h.width/2,x=p.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((x-k)*t.width/(t.width-k),0)+3}else e.width=Math.min(t.maxWidth,e.width+(r.mirror?0:f.width+v+m)),t.paddingTop=h.height/2,t.paddingBottom=p.height/2}t.handleMargins(),u?(t.width=t._length=i.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){z.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(qe(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,i,n,r=this;for(r.ticks=t.map((function(t){return t.value})),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),i=0,n=t.length;i<n;++i)t[i].label=e[i];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=function(t,e,i,n){var r,o,a,s,l,u,c,d,h,p,f,g,m,v=i.length,y=[],_=[],b=[],T=0,w=0;for(r=0;r<v;++r){if(s=i[r].label,t.font=u=(l=i[r].major?e.major:e.minor).string,c=n[u]=n[u]||{data:{},gc:[]},d=l.lineHeight,h=p=0,qe(s)||Ve(s)){if(Ve(s))for(o=0,a=s.length;o<a;++o)qe(f=s[o])||Ve(f)||(h=z.measureText(t,c.data,c.gc,h,f),p+=d)}else h=z.measureText(t,c.data,c.gc,h,s),p=d;y.push(h),_.push(p),b.push(d/2),T=Math.max(h,T),w=Math.max(p,w)}function x(t){return{width:y[t]||0,height:_[t]||0,offset:b[t]||0}}return function(t,e){z.each(t,(function(t){var i,n=t.gc,r=n.length/2;if(r>e){for(i=0;i<r;++i)delete t.data[n[i]];n.splice(0,r)}}))}(n,v),g=y.indexOf(T),m=_.indexOf(w),{first:x(0),last:x(v-1),widest:x(g),highest:x(m)}}(t.ctx,Qe(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,i,n,r;return Ve(t)?(e=+this.getRightValue(t[0]),i=+this.getRightValue(t[1]),n=Math.min(e,i),r=Math.max(e,i)):(e=void 0,i=t=+this.getRightValue(t),n=t,r=t),{min:n,max:r,start:e,end:i}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:z.noop,getPixelForValue:z.noop,getValueForPixel:z.noop,getPixelForTick:function(t){var e=this.options.offset,i=this._ticks.length,n=1/Math.max(i-(e?0:1),1);return t<0||t>i-1?null:this.getPixelForDecimal(t*n+(e?n/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n,r,o=this.options.ticks,a=o.maxTicksLimit||this._length/this._tickSize()+1,s=o.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;e<i;e++)t[e].major&&n.push(e);return n}(t):[],l=s.length,u=s[0],c=s[l-1];if(l>a)return function(t,e,i){var n,r,o=0,a=e[0];for(i=Math.ceil(i),n=0;n<t.length;n++)r=t[n],n===a?(r._index=n,a=e[++o*i]):delete r.label}(t,s,l/a),Je(t);if(n=function(t,e,i,n){var r,o,a,s,l=function(t){var e,i,n=t.length;if(n<2)return!1;for(i=t[0],e=1;e<n;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),u=(e.length-1)/n;if(!l)return Math.max(u,1);for(a=0,s=(r=z.math._factorize(l)).length-1;a<s;a++)if((o=r[a])>u)return o;return Math.max(u,1)}(s,t,0,a),l>0){for(e=0,i=l-1;e<i;e++)ti(t,n,s[e],s[e+1]);return ti(t,n,z.isNullOrUndef(r=l>1?(c-u)/(l-1):null)?0:u-r,u),ti(t,n,c,z.isNullOrUndef(r)?t.length:c+r),Je(t)}return ti(t,n),Je(t)}
vendor: 17,252 bytes, line 1
1,_tickSize:function(){var t=this.options.ticks,e=z.toRadians(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,a=r?r.widest.width+o:0,s=r?r.highest.height+o:0;return this.isHorizontal()?s*i>a*n?a/i:s/n:s*n<a*i?s/i:a/n},_isVisible:function(){var t,e,i,n=this.chart,r=this.options.display;if("auto"!==r)return!!r;for(t=0,e=n.data.datasets.length;t<e;++t)if(n.isDatasetVisible(t)&&((i=n.getDatasetMeta(t)).xAxisID===this.id||i.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y=this,_=y.chart,b=y.options,T=b.gridLines,w=b.position,x=T.offsetGridLines,S=y.isHorizontal(),k=y._ticksToDraw,C=k.length+(x?1:0),E=$e(T),A=[],M=T.drawBorder?Ye(T.lineWidth,0,0):0,P=M/2,I=z._alignPixel,L=function(t){return I(_,t,M)};for("top"===w?(e=L(y.bottom),s=y.bottom-E,u=e-P,d=L(t.top)+P,p=t.bottom):"bottom"===w?(e=L(y.top),d=t.top,p=L(t.bottom)-P,s=e+P,u=y.top+E):"left"===w?(e=L(y.right),a=y.right-E,l=e-P,c=L(t.left)+P,h=t.right):(e=L(y.left),c=t.left,h=L(t.right)-P,a=e+P,l=y.left+E),i=0;i<C;++i)qe((n=k[i]||{}).label)&&i<k.length||(i===y.zeroLineIndex&&b.offset===x?(f=T.zeroLineWidth,g=T.zeroLineColor,m=T.zeroLineBorderDash||[],v=T.zeroLineBorderDashOffset||0):(f=Ye(T.lineWidth,i,1),g=Ye(T.color,i,"rgba(0,0,0,0.1)"),m=T.borderDash||[],v=T.borderDashOffset||0),void 0!==(r=Xe(y,n._index||i,x))&&(o=I(_,r,f),S?a=l=c=h=o:s=u=d=p=o,A.push({tx1:a,ty1:s,tx2:l,ty2:u,x1:c,y1:d,x2:h,y2:p,width:f,color:g,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,i,n,r,o,a,s,l,u,c,d,h=this,p=h.options,f=p.ticks,g=p.position,m=f.mirror,v=h.isHorizontal(),y=h._ticksToDraw,_=Qe(f),b=f.padding,T=$e(p.gridLines),w=-z.toRadians(h.labelRotation),x=[];for("top"===g?(o=h.bottom-T-b,a=w?"left":"center"):"bottom"===g?(o=h.top+T+b,a=w?"right":"center"):"left"===g?(r=h.right-(m?0:T)-b,a=m?"left":"right"):(r=h.left+(m?0:T)+b,a=m?"right":"left"),t=0,e=y.length;t<e;++t)qe(n=(i=y[t]).label)||(s=h.getPixelForTick(i._index||t)+f.labelOffset,u=(l=i.major?_.major:_.minor).lineHeight,c=Ve(n)?n.length:1,v?(r=s,d="top"===g?((w?1:.5)-c)*u:(w?0:.5)*u):(o=s,d=(1-c)*u/2),x.push({x:r,y:o,rotation:w,label:n,font:l,textOffset:d,textAlign:a}));return x},_drawGrid:function(t){var e=this,i=e.options.gridLines;if(i.display){var n,r,o,a,s,l=e.ctx,u=e.chart,c=z._alignPixel,d=i.drawBorder?Ye(i.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(o=0,a=h.length;o<a;++o)r=(s=h[o]).color,(n=s.width)&&r&&(l.save(),l.lineWidth=n,l.strokeStyle=r,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),i.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),i.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var p,f,g,m,v=d,y=Ye(i.lineWidth,h.ticksLength-1,1),_=h.borderValue;e.isHorizontal()?(p=c(u,e.left,v)-v/2,f=c(u,e.right,y)+y/2,g=m=_):(g=c(u,e.top,v)-v/2,m=c(u,e.bottom,y)+y/2,p=f=_),l.lineWidth=d,l.strokeStyle=Ye(i.color,0),l.beginPath(),l.moveTo(p,g),l.lineTo(f,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,i,n,r,o,a,s,l,u=t.ctx,c=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,n=c.length;e<n;++e){if(a=(o=c[e]).font,u.save(),u.translate(o.x,o.y),u.rotate(o.rotation),u.font=a.string,u.fillStyle=a.color,u.textBaseline="middle",u.textAlign=o.textAlign,l=o.textOffset,Ve(s=o.label))for(i=0,r=s.length;i<r;++i)u.fillText(""+s[i],0,l),l+=a.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,i=t.options,n=i.scaleLabel;if(n.display){var r,o,a=Ge(n.fontColor,N.global.defaultFontColor),s=z.options._parseFont(n),l=z.options.toPadding(n.padding),u=s.lineHeight/2,c=i.position,d=0;if(t.isHorizontal())r=t.left+t.width/2,o="bottom"===c?t.bottom-u-l.bottom:t.top+u+l.top;else{var h="left"===c;r=h?t.left+u+l.top:t.right-u-l.top,o=t.top+t.height/2,d=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(r,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle",e.fillStyle=a,e.font=s.string,e.fillText(n.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&i!==n&&t.draw===t._draw?[{z:n,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:i,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:i,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,i=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(n){return(!t||n.type===t)&&(i?n.xAxisID===e.id:n.yAxisID===e.id)}))}});ei.prototype._draw=ei.prototype.draw;var ii=ei,ni=z.isNullOrUndef,ri=ii.extend({determineDataLimits:function(){var t,e=this,i=e._getLabels(),n=e.options.ticks,r=n.min,o=n.max,a=0,s=i.length-1;void 0!==r&&(t=i.indexOf(r))>=0&&(a=t),void 0!==o&&(t=i.indexOf(o))>=0&&(s=t),e.minIndex=a,e.maxIndex=s,e.min=i[a],e.max=i[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,i=this.maxIndex;this.ticks=0===e&&i===t.length-1?t:t.slice(e,i+1)},getLabelForIndex:function(t,e){var i=this.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(i.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,i=t.ticks;ii.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),i&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(i.length-(e?0:1),1))},getPixelForValue:function(t,e,i){var n,r,o,a=this;return ni(e)||ni(i)||(t=a.chart.data.datasets[i].data[e]),ni(t)||(n=a.isHorizontal()?t.x:t.y),(void 0!==n||void 0!==t&&isNaN(e))&&(r=a._getLabels(),t=z.valueOrDefault(n,t),e=-1!==(o=r.indexOf(t))?o:e,isNaN(e)&&(e=t)),a.getPixelForDecimal((e-a._startValue)/a._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}});ri._defaults={position:"bottom"};var oi=z.isNullOrUndef,ai=ii.extend({getRightValue:function(t){return"string"==typeof t?+t:ii.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=z.sign(t.min),n=z.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:z.noop,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:z.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var i,n,r,o,a=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,c=t.min,d=t.max,h=t.precision,p=e.min,f=e.max,g=z.niceNum((f-p)/u/l)*l;if(g<1e-14&&oi(c)&&oi(d))return[p,f];(o=Math.ceil(f/g)-Math.floor(p/g))>u&&(g=z.niceNum(o*g/u/l)*l),s||oi(h)?i=Math.pow(10,z._decimalPlaces(g)):(i=Math.pow(10,h),g=Math.ceil(g*i)/i),n=Math.floor(p/g)*g,r=Math.ceil(f/g)*g,s&&(!oi(c)&&z.almostWhole(c/g,g/1e3)&&(n=c),!oi(d)&&z.almostWhole(d/g,g/1e3)&&(r=d)),o=z.almostEquals(o=(r-n)/g,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,r=Math.round(r*i)/i,a.push(oi(c)?n:c);for(var m=1;m<o;++m)a.push(Math.round((n+m*g)*i)/i);return a.push(oi(d)?r:d),a}(n,t);t.handleDirectionalChanges(),t.max=z.max(r),t.min=z.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),ii.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,i=e.getTicks(),n=e.min,r=e.max;ii.prototype._configure.call(e),e.options.offset&&i.length&&(n-=t=(r-n)/Math.max(i.length-1,1)/2,r+=t),e._startValue=n,e._endValue=r,e._valueRange=r-n}}),si={position:"left",ticks:{callback:We.formatters.linear}};function li(t,e,i,n){var r,o,a=t.options,s=function(t,e,i){var n=[i.type,void 0===e&&void 0===i.stack?i.index:"",i.stack].join(".");return void 0===t[n]&&(t[n]={pos:[],neg:[]}),t[n]}(e,a.stacked,i),l=s.pos,u=s.neg,c=n.length;for(r=0;r<c;++r)o=t._parseValue(n[r]),isNaN(o.min)||isNaN(o.max)||i.data[r].hidden||(l[r]=l[r]||0,u[r]=u[r]||0,a.relativePoints?l[r]=100:o.min<0||o.max<0?u[r]+=o.min:l[r]+=o.max)}function ui(t,e,i){var n,r,o=i.length;for(n=0;n<o;++n)r=t._parseValue(i[n]),isNaN(r.min)||isNaN(r.max)||e.data[n].hidden||(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}var ci=ai.extend({determineDataLimits:function(){var t,e,i,n,r=this,o=r.options,a=r.chart.data.datasets,s=r._getMatchingVisibleMetas(),l=o.stacked,u={},c=s.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<c;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<c;++t)i=a[(e=s[t]).index].data,l?li(r,u,e,i):ui(r,e,i);z.each(u,(function(t){n=t.pos.concat(t.neg),r.min=Math.min(r.min,z.min(n)),r.max=Math.max(r.max,z.max(n))})),r.min=z.isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=z.isFinite(r.max)&&!isNaN(r.max)?r.max:1,r.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=z.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}});ci._defaults=si;var di=z.valueOrDefault,hi=z.math.log10,pi={position:"left",ticks:{callback:We.formatters.logarithmic}};function fi(t,e){return z.isFinite(t)&&t>=0?t:e}var gi=ii.extend({determineDataLimits:function(){var t,e,i,n,r,o,a=this,s=a.options,l=a.chart,u=l.data.datasets,c=a.isHorizontal();function d(t){return c?t.xAxisID===a.id:t.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e)&&void 0!==e.stack){h=!0;break}if(s.stacked||h){var p={};for(t=0;t<u.length;t++){var f=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&d(e))for(void 0===p[f]&&(p[f]=[]),r=0,o=(n=u[t].data).length;r<o;r++){var g=p[f];i=a._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||e.data[r].hidden||i.min<0||i.max<0||(g[r]=g[r]||0,g[r]+=i.max)}}z.each(p,(function(t){if(t.length>0){var e=z.min(t),i=z.max(t);a.min=Math.min(a.min,e),a.max=Math.max(a.max,i)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e))for(r=0,o=(n=u[t].data).length;r<o;r++)i=a._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||e.data[r].hidden||i.min<0||i.max<0||(a.min=Math.min(i.min,a.min),a.max=Math.max(i.max,a.max),0!==i.min&&(a.minNotZero=Math.min(i.min,a.minNotZero)));a.min=z.isFinite(a.min)?a.min:null,a.max=z.isFinite(a.max)?a.max:null,a.minNotZero=z.isFinite(a.minNotZero)?a.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=fi(e.min,t.min),t.max=fi(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(hi(t.min))-1),t.max=Math.pow(10,Math.floor(hi(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(hi(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(hi(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(hi(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:fi(e.min),max:fi(e.max)},r=t.ticks=function(t,e){var i,n,r=[],o=di(t.min,Math.pow(10,Math.floor(hi(e.min)))),a=Math.floor(hi(e.max)),s=Math.ceil(e.max/Math.pow(10,a));0===o?(i=Math.floor(hi(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),r.push(o),o=n*Math.pow(10,i)):(i=Math.floor(hi(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{r.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(i<a||i===a&&n<s);var u=di(t.max,o);return r.push(u),r}(n,t);t.max=z.max(r),t.min=z.min(r),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),ii.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(hi(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,i=0;ii.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),i=di(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=hi(e),t._valueOffset=i,t._valueRange=(hi(t.max)-hi(e))/(1-i)},getPixelForValue:function(t){var e=this,i=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(i=(hi(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(i)},getValueForPixel:function(t){var e=this,i=e.getDecimalForPixel(t);return 0===i&&0===e.min?0:Math.pow(10,e._startValue+(i-e._valueOffset)*e._valueRange)}});gi._defaults=pi;var mi=z.valueOrDefault,vi=z.valueAtIndexOrDefault,yi=z.options.resolve,_i={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:We.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function bi(t){var e=t.ticks;return e.display&&t.display?mi(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function Ti(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i,end:e}:{start:e,end:e+i}}function wi(t){return 0===t||180===t?"center":t<180?"left":"right"}function xi(t,e,i,n){var r,o,a=i.y+n/2;if(z.isArray(e))for(r=0,o=e.length;r<o;++r)t.fillText(e[r],i.x,a),a+=n;else t.fillText(e,i.x,a)}function Si(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function ki(t){return z.isNumber(t)?t:0}var Ci=ai.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=bi(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;z.each(e.data.datasets,(function(r,o){if(e.isDatasetVisible(o)){var a=e.getDatasetMeta(o);z.each(r.data,(function(e,r){var o=+t.getRightValue(e);isNaN(o)||a.data[r].hidden||(i=Math.min(o,i),n=Math.max(o,n))}))}})),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/bi(this.options))},convertTicksToLabels:function(){var t=this;ai.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=z.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,r=z.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t.ctx.font=r.string,t._pointLabelSizes=[];var s,l,u,c=t.chart.data.labels.length;for(e=0;e<c;e++){n=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=r.lineHeight,i=z.isArray(u=t.pointLabels[e])?{w:z.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=i;var d=t.getIndexAngle(e),h=z.toDegrees(d)%360,p=Ti(h,n.x,i.w,0,180),f=Ti(h,n.y,i.h,90,270);p.start<o.l&&(o.l=p.start,a.l=d),p.end>o.r&&(o.r=p.end,a.r=d),f.start<o.t&&(o.t=f.start,a.t=d),f.end>o.b&&(o.b=f.end,a.b=d)}t.setReductions(t.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)}
1,setReductions:function(t,e,i){var n=this,r=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);r=ki(r),o=ki(o),a=ki(a),s=ki(s),n.drawingArea=Math.min(Math.floor(t-(r+o)/2),Math.floor(t-(a+s)/2)),n.setCenterPoint(r,o,a,s)},setCenterPoint:function(t,e,i,n){var r=this,o=i+r.drawingArea,a=r.height-r.paddingTop-n-r.drawingArea;r.xCenter=Math.floor((t+r.drawingArea+(r.width-e-r.drawingArea))/2+r.left),r.yCenter=Math.floor((o+a)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,i=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(z.isNullOrUndef(t))return NaN;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,i=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},_drawGrid:function(){var t,e,i,n=this,r=n.ctx,o=n.options,a=o.gridLines,s=o.angleLines,l=mi(s.lineWidth,a.lineWidth),u=mi(s.color,a.color);if(o.pointLabels.display&&function(t){var e=t.ctx,i=t.options,n=i.pointLabels,r=bi(i),o=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),a=z.options._parseFont(n);e.save(),e.font=a.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=t.getPointPosition(s,o+(0===s?r/2:0)+5),u=vi(n.fontColor,s,N.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(s),d=z.toDegrees(c);e.textAlign=wi(d),Si(d,t._pointLabelSizes[s],l),xi(e,t.pointLabels[s],l,a.lineHeight)}e.restore()}(n),a.display&&z.each(n.ticks,(function(t,i){0!==i&&(e=n.getDistanceFromCenterForValue(n.ticksAsNumbers[i]),function(t,e,i,n){var r,o=t.ctx,a=e.circular,s=t.chart.data.labels.length,l=vi(e.color,n-1),u=vi(e.lineWidth,n-1);if((a||s)&&l&&u){if(o.save(),o.strokeStyle=l,o.lineWidth=u,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),a)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{r=t.getPointPosition(0,i),o.moveTo(r.x,r.y);for(var c=1;c<s;c++)r=t.getPointPosition(c,i),o.lineTo(r.x,r.y)}o.closePath(),o.stroke(),o.restore()}}(n,a,e,i))})),s.display&&l&&u){for(r.save(),r.lineWidth=l,r.strokeStyle=u,r.setLineDash&&(r.setLineDash(yi([s.borderDash,a.borderDash,[]])),r.lineDashOffset=yi([s.borderDashOffset,a.borderDashOffset,0])),t=n.chart.data.labels.length-1;t>=0;t--)e=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),r.beginPath(),r.moveTo(n.xCenter,n.yCenter),r.lineTo(i.x,i.y),r.stroke();r.restore()}},_drawLabels:function(){var t=this,e=t.ctx,i=t.options.ticks;if(i.display){var n,r,o=t.getIndexAngle(0),a=z.options._parseFont(i),s=mi(i.fontColor,N.global.defaultFontColor);e.save(),e.font=a.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",z.each(t.ticks,(function(o,l){(0!==l||i.reverse)&&(n=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),i.showLabelBackdrop&&(r=e.measureText(o).width,e.fillStyle=i.backdropColor,e.fillRect(-r/2-i.backdropPaddingX,-n-a.size/2-i.backdropPaddingY,r+2*i.backdropPaddingX,a.size+2*i.backdropPaddingY)),e.fillStyle=s,e.fillText(o,0,-n))})),e.restore()}},_drawTitle:z.noop});Ci._defaults=_i;var Ei=z._deprecated,Ai=z.options.resolve,Mi=z.valueOrDefault,Pi=Number.MIN_SAFE_INTEGER||-9007199254740991,Ii=Number.MAX_SAFE_INTEGER||9007199254740991,Li={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Oi=Object.keys(Li);function Di(t,e){return t-e}function Ri(t){return z.valueOrDefault(t.time.min,t.ticks.min)}function Ni(t){return z.valueOrDefault(t.time.max,t.ticks.max)}
vendor: 26,142 bytes, line 1
1function Bi(t,e,i,n){var r=function(t,e,i){for(var n,r,o,a=0,s=t.length-1;a>=0&&a<=s;){if(o=t[n=a+s>>1],!(r=t[n-1]||null))return{lo:null,hi:o};if(o[e]<i)a=n+1;else{if(!(r[e]>i))return{lo:r,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],a=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=a[e]-o[e];return o[n]+(a[n]-o[n])*(s?(i-o[e])/s:0)}function Fi(t,e){var i=t._adapter,n=t.options.time,r=n.parser,o=r||n.format,a=e;return"function"==typeof r&&(a=r(a)),z.isFinite(a)||(a="string"==typeof o?i.parse(a,o):i.parse(a)),null!==a?+a:(r||"function"!=typeof o||(a=o(e),z.isFinite(a)||(a=i.parse(a))),a)}function ji(t,e){if(z.isNullOrUndef(e))return null;var i=t.options.time,n=Fi(t,t.getRightValue(e));return null===n||i.round&&(n=+t._adapter.startOf(n,i.round)),n}function Ui(t,e,i,n){var r,o,a=Oi.length;for(r=Oi.indexOf(t);r<a-1;++r)if((o=Li[Oi[r]]).common&&Math.ceil((i-e)/((o.steps?o.steps:Ii)*o.size))<=n)return Oi[r];return Oi[a-1]}function zi(t,e,i){var n,r,o=[],a={},s=e.length;for(n=0;n<s;++n)a[r=e[n]]=n,o.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){var r,o,a=t._adapter,s=+a.startOf(e[0].value,n),l=e[e.length-1].value;for(r=s;r<=l;r=+a.add(r,1,n))(o=i[r])>=0&&(e[o].major=!0);return e}(t,o,a,i):o}var Hi=ii.extend({initialize:function(){this.mergeTicksOptions(),ii.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,i=e.time||(e.time={}),n=t._adapter=new He._date(e.adapters.date);return Ei("time scale",i.format,"time.format","time.parser"),Ei("time scale",i.min,"time.min","ticks.min"),Ei("time scale",i.max,"time.max","ticks.max"),z.mergeIf(i.displayFormats,n.formats()),ii.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),ii.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,r,o,a,s=this,l=s.chart,u=s._adapter,c=s.options,d=c.time.unit||"day",h=Ii,p=Pi,f=[],g=[],m=[],v=s._getLabels();for(t=0,i=v.length;t<i;++t)m.push(ji(s,v[t]));for(t=0,i=(l.data.datasets||[]).length;t<i;++t)if(l.isDatasetVisible(t))if(z.isObject((r=l.data.datasets[t].data)[0]))for(g[t]=[],e=0,n=r.length;e<n;++e)o=ji(s,r[e]),f.push(o),g[t][e]=o;else g[t]=m.slice(0),a||(f=f.concat(m),a=!0);else g[t]=[];m.length&&(h=Math.min(h,m[0]),p=Math.max(p,m[m.length-1])),f.length&&(f=i>1?function(t){var e,i,n,r={},o=[];for(e=0,i=t.length;e<i;++e)r[n=t[e]]||(r[n]=!0,o.push(n));return o}(f).sort(Di):f.sort(Di),h=Math.min(h,f[0]),p=Math.max(p,f[f.length-1])),h=ji(s,Ri(c))||h,p=ji(s,Ni(c))||p,h=h===Ii?+u.startOf(Date.now(),d):h,p=p===Pi?+u.endOf(Date.now(),d)+1:p,s.min=Math.min(h,p),s.max=Math.max(h+1,p),s._table=[],s._timestamps={data:f,datasets:g,labels:m}},buildTicks:function(){var t,e,i,n=this,r=n.min,o=n.max,a=n.options,s=a.ticks,l=a.time,u=n._timestamps,c=[],d=n.getLabelCapacity(r),h=s.source,p=a.distribution;for(u="data"===h||"auto"===h&&"series"===p?u.data:"labels"===h?u.labels:function(t,e,i,n){var r,o=t._adapter,a=t.options,s=a.time,l=s.unit||Ui(s.minUnit,e,i,n),u=Ai([s.stepSize,s.unitStepSize,1]),c="week"===l&&s.isoWeekday,d=e,h=[];if(c&&(d=+o.startOf(d,"isoWeek",c)),d=+o.startOf(d,c?"day":l),o.diff(i,e,l)>1e5*u)throw e+" and "+i+" are too far apart with stepSize of "+u+" "+l;for(r=d;r<i;r=+o.add(r,u,l))h.push(r);return r!==i&&"ticks"!==a.bounds||h.push(r),h}(n,r,o,d),"ticks"===a.bounds&&u.length&&(r=u[0],o=u[u.length-1]),r=ji(n,Ri(a))||r,o=ji(n,Ni(a))||o,t=0,e=u.length;t<e;++t)(i=u[t])>=r&&i<=o&&c.push(i);return n.min=r,n.max=o,n._unit=l.unit||(s.autoSkip?Ui(l.minUnit,n.min,n.max,d):function(t,e,i,n,r){var o,a;for(o=Oi.length-1;o>=Oi.indexOf(i);o--)if(Li[a=Oi[o]].common&&t._adapter.diff(r,n,a)>=e-1)return a;return Oi[i?Oi.indexOf(i):0]}(n,c.length,l.minUnit,n.min,n.max)),n._majorUnit=s.major.enabled&&"year"!==n._unit?function(t){for(var e=Oi.indexOf(t)+1,i=Oi.length;e<i;++e)if(Li[Oi[e]].common)return Oi[e]}(n._unit):void 0,n._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var r,o,a,s,l,u=[],c=[e];for(r=0,o=t.length;r<o;++r)(s=t[r])>e&&s<i&&c.push(s);for(c.push(i),r=0,o=c.length;r<o;++r)l=c[r+1],s=c[r],void 0!==(a=c[r-1])&&void 0!==l&&Math.round((l+a)/2)===s||u.push({time:s,pos:r/(o-1)});return u}(n._timestamps.data,r,o,p),n._offsets=function(t,e,i,n,r){var o,a,s=0,l=0;return r.offset&&e.length&&(o=Bi(t,"time",e[0],"pos"),s=1===e.length?1-o:(Bi(t,"time",e[1],"pos")-o)/2,a=Bi(t,"time",e[e.length-1],"pos"),l=1===e.length?a:(a-Bi(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(n._table,c,0,0,a),s.reverse&&c.reverse(),zi(n,c,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i._adapter,r=i.chart.data,o=i.options.time,a=r.labels&&t<r.labels.length?r.labels[t]:"",s=r.datasets[e].data[t];return z.isObject(s)&&(a=i.getRightValue(s)),o.tooltipFormat?n.format(Fi(i,a),o.tooltipFormat):"string"==typeof a?a:n.format(Fi(i,a),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var r=this.options,o=r.time.displayFormats,a=this._majorUnit,s=o[a],l=i[e],u=r.ticks,c=a&&s&&l&&l.major,d=this._adapter.format(t,n||(c?s:o[this._unit])),h=c?u.major:u.minor,p=Ai([h.callback,h.userCallback,u.callback,u.userCallback]);return p?p(d,e,i):d},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(t[e].value,e,t));return n},getPixelForOffset:function(t){var e=this._offsets,i=Bi(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+i)*e.factor)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=ji(this,t)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end,n=Bi(this._table,"pos",i,"time");return this._adapter._create(n)},_getLabelSize:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=z.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(n),o=Math.sin(n),a=Mi(e.fontSize,N.global.defaultFontSize);return{w:i*r+a*o,h:i*o+a*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,i=e.options.time,n=i.displayFormats,r=n[i.unit]||n.millisecond,o=e.tickFormatFunction(t,0,zi(e,[t],e._majorUnit),r),a=e._getLabelSize(o),s=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h);return e.options.offset&&s--,s>0?s:1}});Hi._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Wi={category:ri,linear:ci,logarithmic:gi,radialLinear:Ci,time:Hi},Vi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};He._date.override("function"==typeof t?{_id:"moment",formats:function(){return Vi},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t(e).diff(t(i),n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var qi={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),r=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=r.length||0;return o?function(t,e){return e<o&&r[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return z.isArray(e)?function(t,i){return e[i]}:function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function Gi(t,e,i){var n,r=t._model||{},o=r.fill;if(void 0===o&&(o=!!r.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function Yi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,i,n,r,o,a=t.el._scale,s=a.options,l=a.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(i=s.ticks.reverse?a.min:a.max,n=a.getPointPositionForValue(0,e=s.ticks.reverse?a.max:a.min),r=0;r<l;++r)o="start"===u||"end"===u?a.getPointPositionForValue(r,"start"===u?e:i):a.getBasePosition(r),s.gridLines.circular&&(o.cx=n.x,o.cy=n.y,o.angle=a.getIndexAngle(r)-Math.PI/2),c.push(o);return c}(t):function(t){var e,i=t.el._model||{},n=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===r?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(z.isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}(t)}function Xi(t,e,i){var n,r=t[e].fill,o=[e];if(!i)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(n=t[r]))return!1;if(n.visible)return r;o.push(r),r=n.fill}return!1}function $i(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),qi[i](t))}function Ki(t){return t&&!t.skip}function Zi(t,e,i,n,r){var o,a,s,l;if(n&&r){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)z.canvas.lineTo(t,e[o-1],e[o]);if(void 0===i[0].angle)for(t.lineTo(i[r-1].x,i[r-1].y),o=r-1;o>0;--o)z.canvas.lineTo(t,i[o],i[o-1],!0);else for(a=i[0].cx,s=i[0].cy,l=Math.sqrt(Math.pow(i[0].x-a,2)+Math.pow(i[0].y-s,2)),o=r-1;o>0;--o)t.arc(a,s,l,i[o].angle,i[o-1].angle,!0)}}function Qi(t,e,i,n,r,o){var a,s,l,u,c,d,h,p,f=e.length,g=n.spanGaps,m=[],v=[],y=0,_=0;for(t.beginPath(),a=0,s=f;a<s;++a)c=i(u=e[l=a%f]._view,l,n),d=Ki(u),h=Ki(c),o&&void 0===p&&d&&(s=f+(p=a+1)),d&&h?(y=m.push(u),_=v.push(c)):y&&_&&(g?(d&&m.push(u),h&&v.push(c)):(Zi(t,m,v,y,_),y=_=0,m=[],v=[]));Zi(t,m,v,y,_),t.closePath(),t.fillStyle=r,t.fill()}var Ji={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,r,o,a=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;n<a;++n)o=null,(r=(i=t.getDatasetMeta(n)).dataset)&&r._model&&r instanceof vt.Line&&(o={visible:t.isDatasetVisible(n),fill:Gi(r,n,a),chart:t,el:r}),i.$filler=o,l.push(o);for(n=0;n<a;++n)(o=l[n])&&(o.fill=Xi(l,n,s),o.boundary=Yi(o),o.mapper=$i(o))},beforeDatasetsDraw:function(t){var e,i,n,r,o,a,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(i=l.length-1;i>=0;--i)(e=l[i].$filler)&&e.visible&&(o=(n=e.el)._children||[],s=(r=n._view).backgroundColor||N.global.defaultColor,(a=e.mapper)&&s&&o.length&&(z.canvas.clipArea(u,t.chartArea),Qi(u,o,a,r,s,n._loop),z.canvas.unclipArea(u)))}},tn=z.rtl.getRtlAdapter,en=z.noop,nn=z.valueOrDefault;function rn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,i=t.options.legend||{},n=i.labels&&i.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(i){var r=i.controller.getStyle(n?0:void 0);return{text:e[i.index].label,fillStyle:r.backgroundColor,hidden:!t.isDatasetVisible(i.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:i.index}}),this)}}},legendCallback:function(t){var e,i,n,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,i=o.length;e<i;e++)(n=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[e].backgroundColor,o[e].label&&n.appendChild(document.createTextNode(o[e].label));return r.outerHTML}});var on=G.extend({initialize:function(t){z.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:en,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:en,beforeSetDimensions:en,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:en,beforeBuildLabels:en,buildLabels:function(){var t=this,e=t.options.labels||{},i=z.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:en,beforeFit:en,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,r=t.ctx,o=z.options._parseFont(i),a=o.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n){if(r.font=o.string,u){var c=t.lineWidths=[0],d=0;r.textAlign="left",r.textBaseline="middle",z.each(t.legendItems,(function(t,e){var n=rn(i,a)+a/2+r.measureText(t.text).width;(0===e||c[c.length-1]+n+2*i.padding>l.width)&&(d+=a+i.padding,c[c.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:n,height:a},c[c.length-1]+=n+i.padding})),l.height+=d}else{var h=i.padding,p=t.columnWidths=[],f=t.columnHeights=[],g=i.padding,m=0,v=0;z.each(t.legendItems,(function(t,e){var n=rn(i,a)+a/2+r.measureText(t.text).width;e>0&&v+a+2*h>l.height&&(g+=m+i.padding,p.push(m),f.push(v),m=0,v=0),m=Math.max(m,n),v+=a+h,s[e]={left:0,top:0,width:n,height:a}})),g+=m,p.push(m),f.push(v),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:en,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=N.global,r=n.defaultColor,o=n.elements.line,a=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,d=tn(e.rtl,t.left,t.minSize.width),h=t.ctx,p=nn(i.fontColor,n.defaultFontColor),f=z.options._parseFont(i),g=f.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=p,h.fillStyle=p,h.font=f.string;var m=rn(i,g),v=t.legendHitBoxes,y=function(t,n){switch(e.align){case"start":return i.padding;case"end":return t-n;default:return(t-n+i.padding)/2}},_=t.isHorizontal();c=_?{x:t.left+y(l,u[0]),y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+y(a,s[0]),line:0},z.rtl.overrideTextDirection(t.ctx,e.textDirection);var b=g+i.padding;z.each(t.legendItems,(function(e,n){var p=h.measureText(e.text).width,f=m+g/2+p,T=c.x,w=c.y;d.setWidth(t.minSize.width),_?n>0&&T+f+i.padding>t.left+t.minSize.width&&(w=c.y+=b,c.line++,T=c.x=t.left+y(l,u[c.line])):n>0&&w+b>t.top+t.minSize.height&&(T=c.x=T+t.columnWidths[c.line]+i.padding,c.line++,w=c.y=t.top+y(a,s[c.line]));var x=d.x(T);!function(t,e,n){if(!(isNaN(m)||m<=0)){h.save();var a=nn(n.lineWidth,o.borderWidth);if(h.fillStyle=nn(n.fillStyle,r),h.lineCap=nn(n.lineCap,o.borderCapStyle),h.lineDashOffset=nn(n.lineDashOffset,o.borderDashOffset),h.lineJoin=nn(n.lineJoin,o.borderJoinStyle),h.lineWidth=a,h.strokeStyle=nn(n.strokeStyle,r),h.setLineDash&&h.setLineDash(nn(n.lineDash,o.borderDash)),i&&i.usePointStyle){var s=m*Math.SQRT2/2,l=d.xPlus(t,m/2);z.canvas.drawPoint(h,n.pointStyle,s,l,e+g/2,n.rotation)}else h.fillRect(d.leftForLtr(t,m),e,m,g),0!==a&&h.strokeRect(d.leftForLtr(t,m),e,m,g);h.restore()}}(x,w,e),v[n].left=d.leftForLtr(x,v[n].width),v[n].top=w,function(t,e,i,n){var r=g/2,o=d.xPlus(t,m+r),a=e+r;h.fillText(i.text,o,a),i.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,a),h.lineTo(d.xPlus(o,n),a),h.stroke())}(x,w,e,p),_?c.x+=f+i.padding:c.y+=b})),z.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var i,n,r,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(r=o.legendHitBoxes,i=0;i<r.length;++i)if(t>=(n=r[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,r="mouseup"===t.type?"click":t.type;if("mousemove"===r){if(!n.onHover&&!n.onLeave)return}else{if("click"!==r)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===r?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function an(t,e){var i=new on({ctx:t.ctx,options:e,chart:t});le.configure(t,i,e),le.addBox(t,i),t.legend=i}var sn={id:"legend",_element:on,beforeInit:function(t){var e=t.options.legend;e&&an(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(z.mergeIf(e,N.global.legend),i?(le.configure(t,i,e),i.options=e):an(t,e)):i&&(le.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},ln=z.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var un=G.extend({initialize:function(t){z.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:ln,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:ln,beforeSetDimensions:ln,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ln,beforeBuildLabels:ln,buildLabels:ln,afterBuildLabels:ln,beforeFit:ln,fit:function(){var t,e=this,i=e.options,n=e.minSize={},r=e.isHorizontal();i.display?(t=(z.isArray(i.text)?i.text.length:1)*z.options._parseFont(i).lineHeight+2*i.padding,e.width=n.width=r?e.maxWidth:t,e.height=n.height=r?t:e.maxHeight):e.width=n.width=e.height=n.height=0},afterFit:ln,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,r,o,a=z.options._parseFont(i),s=a.lineHeight,l=s/2+i.padding,u=0,c=t.top,d=t.left,h=t.bottom,p=t.right;e.fillStyle=z.valueOrDefault(i.fontColor,N.global.defaultFontColor),e.font=a.string,t.isHorizontal()?(r=d+(p-d)/2,o=c+l,n=p-d):(r="left"===i.position?d+l:p-l,o=c+(h-c)/2,n=h-c,u=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(r,o),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var f=i.text;if(z.isArray(f))for(var g=0,m=0;m<f.length;++m)e.fillText(f[m],0,g,n),g+=s;else e.fillText(f,0,0,n);e.restore()}}});function cn(t,e){var i=new un({ctx:t.ctx,options:e,chart:t});le.configure(t,i,e),le.addBox(t,i),t.titleBlock=i}var dn={},hn=Ji,pn=sn,fn={id:"title",_element:un,beforeInit:function(t){var e=t.options.title;e&&cn(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(z.mergeIf(e,N.global.title),i?(le.configure(t,i,e),i.options=e):cn(t,e)):i&&(le.removeBox(t,i),delete t.titleBlock)}};for(var gn in dn.filler=hn,dn.legend=pn,dn.title=fn,je.helpers=z,function(){function t(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function e(t){return null!=t&&"none"!==t}function i(i,n,r){var o=document.defaultView,a=z._getParentNode(i),s=o.getComputedStyle(i)[n],l=o.getComputedStyle(a)[n],u=e(s),c=e(l),d=Number.POSITIVE_INFINITY;return u||c?Math.min(u?t(s,i,r):d,c?t(l,a,r):d):"none"}z.where=function(t,e){if(z.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return z.each(t,(function(t){e(t)&&i.push(t)})),i},z.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,r=t.length;n<r;++n)if(e.call(i,t[n],n,t))return n;return-1},z.findNextWhere=function(t,e,i){z.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var r=t[n];if(e(r))return r}},z.findPreviousWhere=function(t,e,i){z.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var r=t[n];if(e(r))return r}},z.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},z.almostEquals=function(t,e,i){return Math.abs(t-e)<i},z.almostWhole=function(t,e){var i=Math.round(t);return i-e<=t&&i+e>=t},z.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},z.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},z.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},z.toRadians=function(t){return t*(Math.PI/180)},z.toDegrees=function(t){return t*(180/Math.PI)},z._decimalPlaces=function(t){if(z.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},z.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},z.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},z.aliasPixel=function(t){return t%2==0?0:.5},z._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,r=i/2;return Math.round((e-r)*n)/n+r},z.splineCurve=function(t,e,i,n){var r=t.skip?e:t,o=e,a=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),u=s/(s+l),c=l/(s+l),d=n*(u=isNaN(u)?0:u),h=n*(c=isNaN(c)?0:c);return{previous:{x:o.x-d*(a.x-r.x),y:o.y-d*(a.y-r.y)},next:{x:o.x+h*(a.x-r.x),y:o.y+h*(a.y-r.y)}}},z.EPSILON=Number.EPSILON||1e-14,z.splineCurveMonotone=function(t){var e,i,n,r,o,a,s,l,u,c=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),d=c.length;for(e=0;e<d;++e)if(!(n=c[e]).model.skip){if(i=e>0?c[e-1]:null,(r=e<d-1?c[e+1]:null)&&!r.model.skip){var h=r.model.x-n.model.x;n.deltaK=0!==h?(r.model.y-n.model.y)/h:0}n.mK=!i||i.model.skip?n.deltaK:!r||r.model.skip?i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?0:(i.deltaK+n.deltaK)/2}for(e=0;e<d-1;++e)r=c[e+1],(n=c[e]).model.skip||r.model.skip||(z.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=r.mK=0:(o=n.mK/n.deltaK,a=r.mK/n.deltaK,(l=Math.pow(o,2)+Math.pow(a,2))<=9||(s=3/Math.sqrt(l),n.mK=o*s*n.deltaK,r.mK=a*s*n.deltaK)));for(e=0;e<d;++e)(n=c[e]).model.skip||(r=e<d-1?c[e+1]:null,(i=e>0?c[e-1]:null)&&!i.model.skip&&(n.model.controlPointPreviousX=n.model.x-(u=(n.model.x-i.model.x)/3),n.model.controlPointPreviousY=n.model.y-u*n.mK),r&&!r.model.skip&&(n.model.controlPointNextX=n.model.x+(u=(r.model.x-n.model.x)/3),n.model.controlPointNextY=n.model.y+u*n.mK))},z.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},z.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},z.niceNum=function(t,e){var i=Math.floor(z.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},z.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},z.getRelativePosition=function(t,e){var i,n,r=t.originalEvent||t,o=t.target||t.srcElement,a=o.getBoundingClientRect(),s=r.touches;s&&s.length>0?(i=s[0].clientX,n=s[0].clientY):(i=r.clientX,n=r.clientY);var l=parseFloat(z.getStyle(o,"padding-left")),u=parseFloat(z.getStyle(o,"padding-top")),c=parseFloat(z.getStyle(o,"padding-right")),d=parseFloat(z.getStyle(o,"padding-bottom")),h=a.bottom-a.top-u-d;return{x:i=Math.round((i-a.left-l)/(a.right-a.left-l-c)*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-a.top-u)/h*o.height/e.currentDevicePixelRatio)}},z.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},z.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},z._calculatePadding=function(t,e,i){return(e=z.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},z._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},z.getMaximumWidth=function(t){var e=z._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-z._calculatePadding(e,"padding-left",i)-z._calculatePadding(e,"padding-right",i),r=z.getConstraintWidth(t);return isNaN(r)?n:Math.min(n,r)},z.getMaximumHeight=function(t){var e=z._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-z._calculatePadding(e,"padding-top",i)-z._calculatePadding(e,"padding-bottom",i),r=z.getConstraintHeight(t);return isNaN(r)?n:Math.min(n,r)},z.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},z.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,r=t.height,o=t.width;n.height=r*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=r+"px",n.style.width=o+"px")}},z.fontString=function(t,e,i){return e+" "+t+"px "+i},z.longestText=function(t,e,i,n){var r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var a,s,l,u,c,d=0,h=i.length;for(a=0;a<h;a++)if(null!=(u=i[a])&&!0!==z.isArray(u))d=z.measureText(t,r,o,d,u);else if(z.isArray(u))for(s=0,l=u.length;s<l;s++)null==(c=u[s])||z.isArray(c)||(d=z.measureText(t,r,o,d,c));var p=o.length/2;if(p>i.length){for(a=0;a<p;a++)delete r[o[a]];o.splice(0,p)}return d}
1,z.measureText=function(t,e,i,n,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n},z.numberOfLabelLines=function(t){var e=1;return z.each(t,(function(t){z.isArray(t)&&t.length>e&&(e=t.length)})),e},z.color=b?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),b(t)}:function(t){return console.error("Color.js not found!"),t},z.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:z.color(t).saturate(.5).darken(.1).rgbString()}}(),je._adapters=He,je.Animation=X,je.animationService=$,je.controllers=qt,je.DatasetController=tt,je.defaults=N,je.Element=G,je.elements=vt,je.Interaction=Qt,je.layouts=le,je.platform=_e,je.plugins=be,je.Scale=ii,je.scaleService=Te,je.Ticks=We,je.Tooltip=Pe,je.helpers.each(Wi,(function(t,e){je.scaleService.registerScaleType(e,t,t._defaults)})),dn)dn.hasOwnProperty(gn)&&je.plugins.register(dn[gn]);je.platform.initialize();var mn=je;return"undefined"!=typeof window&&(window.Chart=je),je.Chart=je,je.Legend=dn.legend._element,je.Title=dn.title._element,je.pluginService=je.plugins,je.PluginBase=je.Element.extend({}),je.canvasHelpers=je.helpers.canvas,je.layoutService=je.layouts,je.LinearScaleBase=ai,je.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){je[t]=function(e,i){return new je(e,je.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),mn}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.