22 lines
619 KiB
JavaScript
22 lines
619 KiB
JavaScript
|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.TCPlayer=e()}(this,function(){function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function each(t,e){keys(t).forEach(function(n){return e(t[n],n)})}function reduce(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return keys(t).reduce(function(n,r){return e(n,t[r],r)},n)}function assign(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[t].concat(n)):(n.forEach(function(e){e&&each(e,function(e,n){t[n]=e})}),t)}function isObject$1(t){return!!t&&"object"===(void 0===t?"undefined":_typeof(t))}function isPlain(t){return isObject$1(t)&&"[object Object]"===toString.call(t)&&t.constructor===Object}function isFunction(t){return"function"==typeof t&&"number"!=typeof t.nodeType}function clean(t){return t.replace(/\n\r?\s*/g,"")}function computedStyle(t,e){if(!t||!e)return"";if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(t);return n?n[e]:""}return t.currentStyle[e]||""}function isNonBlankString(t){return"string"==typeof t&&/\S/.test(t)}function throwIfWhitespace(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function classRegExp(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function isReal(){return document_1===window_1.document&&"undefined"!=typeof document_1.createElement}function isEl(t){return isObject$1(t)&&1===t.nodeType}function isInFrame(){try{return window_1.parent!==window_1.self}catch(t){return!0}}function createQuerier(t){return function(e,n){if(!isNonBlankString(e))return document_1[t](null);isNonBlankString(n)&&(n=document_1.querySelector(n));var r=isEl(n)?n:document_1;return r[t]&&r[t](e)}}function createEl(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},r=arguments[3],i=document_1.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(log$2.warn(tsml(_templateObject,t,n)),i.setAttribute(t,n)):"textContent"===t?textContent(i,n):i[t]=n}),Object.getOwnPropertyNames(n).forEach(function(t){i.setAttribute(t,n[t])}),r&&appendContent(i,r),i}function textContent(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function prependTo(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function hasClass(t,e){return throwIfWhitespace(e),t.classList?t.classList.contains(e):classRegExp(e).test(t.className)}function addClass(t,e){return t.classList?t.classList.add(e):hasClass(t,e)||(t.className=(t.className+" "+e).trim()),t}function removeClass(t,e){return t.classList?t.classList.remove(e):(throwIfWhitespace(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function toggleClass(t,e,n){var r=hasClass(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?addClass(t,e):removeClass(t,e),t}function setAttributes(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)})}function getAttributes(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function getAttribute(t,e){return t.getAttribute(e)}function setAttribute(t,e,n){t.setAttribute(e,n)}function removeAttribute(t,e){t.removeAttribute(e)}function blockTextSelection(){document_1.body.focus(),document_1.onselectstart=function(){return!1}}function unblockTextSelection(){document_1.onselectstart=function(){return!0
|
||
|
|
;var s="",a=!1,l=t,c=e,u=n,h=null,p="",d=!0,f="auto",g="start",y=50,v="middle",m=50,_="middle";if(Object.defineProperty(r,"id",extend$2({},o,{get:function(){return s},set:function(t){s=""+t}})),Object.defineProperty(r,"pauseOnExit",extend$2({},o,{get:function(){return a},set:function(t){a=!!t}})),Object.defineProperty(r,"startTime",extend$2({},o,{get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");l=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",extend$2({},o,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",extend$2({},o,{get:function(){return u},set:function(t){u=""+t,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",extend$2({},o,{get:function(){return h},set:function(t){h=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",extend$2({},o,{get:function(){return p},set:function(t){var e=findDirectionSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",extend$2({},o,{get:function(){return d},set:function(t){d=!!t,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",extend$2({},o,{get:function(){return f},set:function(t){if("number"!=typeof t&&t!==autoKeyword)throw new SyntaxError("An invalid number or illegal string was specified.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",extend$2({},o,{get:function(){return g},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",extend$2({},o,{get:function(){return y},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",extend$2({},o,{get:function(){return v},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",extend$2({},o,{get:function(){return m},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",extend$2({},o,{get:function(){return _},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),r.displayState=undefined,i)return r}function findScrollSetting(t){return"string"==typeof t&&(!!scrollSetting[t.toLowerCase()]&&t.toLowerCase())}function isValidPercentValue(t){return"number"==typeof t&&t>=0&&t<=100}function VTTRegion(){var t=100,e=3,n=0,r=100,i=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!isValidPercentValue(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 r},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return s},set:function(t){var e=findScrollSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");s=e}}})}function createTrackHelper(t,e,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{},o=t
|
||
|
|
prependTo:prependTo,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,setAttributes:setAttributes,getAttributes:getAttributes,getAttribute:getAttribute,setAttribute:setAttribute,removeAttribute:removeAttribute,blockTextSelection:blockTextSelection,unblockTextSelection:unblockTextSelection,getBoundingClientRect:getBoundingClientRect,findPosition:findPosition,getPointerPosition:getPointerPosition,isTextNode:isTextNode,emptyEl:emptyEl,normalizeContent:normalizeContent,appendContent:appendContent,insertContent:insertContent,isSingleLeftClick:isSingleLeftClick,$:$,$$:$$}),_guid=1,elData={},elIdAttr="vdata"+(new Date).getTime(),_supportsPassive=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){_supportsPassive=!0}});window_1.addEventListener("test",null,t),window_1.removeEventListener("test",null,t)}catch(e){}}();var passiveEvents=["touchstart","touchmove"],Events=(Object.freeze||Object)({fixEvent:fixEvent,on:on,off:off,trigger:trigger,one:one}),_windowLoaded=!1,videojs$2=void 0,autoSetup=function(){if(isReal()){var t=document_1.getElementsByTagName("video"),e=document_1.getElementsByTagName("audio"),n=document_1.getElementsByTagName("video-js"),r=[];if(t&&t.length>0)for(var i=0,o=t.length;i<o;i++)r.push(t[i]);if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)r.push(e[s]);if(n&&n.length>0)for(var l=0,c=n.length;l<c;l++)r.push(n[l]);if(r&&r.length>0)for(var u=0,h=r.length;u<h;u++){var p=r[u];if(!p||!p.getAttribute){autoSetupTimeout(1);break}if(p.player===undefined){var d=p.getAttribute("data-setup");null!==d&&videojs$2(p)}}else _windowLoaded||autoSetupTimeout(1)}};isReal()&&"complete"===document_1.readyState?_windowLoaded=!0:one(window_1,"load",function(){_windowLoaded=!0});var createStyleElement=function(t){var e=document_1.createElement("style");return e.className=t,e},setTextContent=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},bind=function(t,e,n){e.guid||(e.guid=newGUID());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},throttle=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(undefined,arguments),n=r)}},EventTarget=function(){};EventTarget.prototype.allowedEvents_={},EventTarget.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},on(this,t,e),this.addEventListener=n},EventTarget.prototype.addEventListener=EventTarget.prototype.on,EventTarget.prototype.off=function(t,e){off(this,t,e)},EventTarget.prototype.removeEventListener=EventTarget.prototype.off,EventTarget.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},one(this,t,e),this.addEventListener=n},EventTarget.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=fixEvent(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),trigger(this,t)},EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;var isEvented=function(t){return t instanceof EventTarget||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},isValidEventType=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},validateTarget=function(t){if(!t.nodeName&&!isEvented(t))throw new Error("Invalid target; must be a DOM node or evented object.")},validateEventType=function(t){if(!isValidEventType(t))throw new Error("Invalid event type; must be a non-empty string or array.")},validateListener=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},normalizeListenArgs=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),validateTarget(r),validateEventType(i),validateListener(o),o=bind(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},listen=function(t,e,n,r){validateTarget(t),t.nodeName?Events[e](t,n,r):t[e](n,r)},EventedMixin={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];va
|
||
|
|
;for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].selected){disableOthers$1(i,i[s]);break}if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),o.changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){var n=this;e.selected&&disableOthers$1(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,disableOthers$1(n,e),n.changing_=!1,n.trigger("change"))})},e}(TrackList),TextTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);var o=void 0;if(IS_IE8){o=document_1.createElement("custom");for(var s in TrackList.prototype)"constructor"!==s&&(o[s]=TrackList.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(o[a]=e.prototype[a])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){return!("disabled"===e.mode&&!e.label)&&(!("captions"===e.kind&&!e.label)&&(!(IS_IOS&&"subtitles"===e.kind&&!window.textTrackCleared_)&&(t.prototype.addTrack.call(this,e),e.addEventListener("modechange",bind(this,function(){this.trigger("change")})),void(-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",bind(this,function(){this.trigger("selectedlanguagechange")}))))))},e}(TrackList),HtmlTrackElementList=function(){function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i<o;i++)n.addTrackElement_(e[i]);if(IS_IE8)return n}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===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),TextTrackCueList=function(){function t(e){classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}if(t.prototype.setCues_.call(n,e),Object.defineProperty(n,"length",{get:function(){return this.length_}}),IS_IE8)return n}return t.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},t.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"},Track=function(t){function e(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var i=p
|
||
|
|
},filterSource=function t(e){if(Array.isArray(e)){var n=[];e.forEach(function(e){e=t(e),Array.isArray(e)?n=n.concat(e):isObject$1(e)&&n.push(e)}),e=n}else e="string"==typeof e&&e.trim()?[fixSource({src:e})]:isObject$1(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[fixSource(e)]:[];return e},fixSource=function(t){if(!t.type){var e=getMimetype(t.src);e&&(t.type=e)}return t},enc=createCommonjsModule(function(module,exports){!function(t,e){module.exports=e()}(self,function(){return function(){function __webpack_require__(t){var e=__webpack_module_cache__[t];if(e!==undefined)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}var __webpack_modules__={"./node_modules/@tencent/js-armor-loader/dist/runtime.js":function node_modulesTencentJsArmorLoaderDistRuntimeJs(module){function T(t,e,n,r,i,o,s,a){function l(){return function(t,e,n){return new(Function.bind.apply(t,e))}.apply(null,arguments)}var c,u=!r,h=(t=+t,e=e||[0],r=r||[[this],[{}]],i=i||{},[]),p=null;Function.prototype.bind||(c=[].slice,Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("bind101");var e=c.call(arguments,1),n=e.length,r=this,i=function(){},o=function(){return e.length=n,e.push.apply(e,arguments),r.apply(i.prototype.isPrototypeOf(this)?this:t,e)};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o});for(var d=([function(){var t=r.pop();i[t]||(n[t]=n[t](),i[t]=1),r.push([n,t])},function(){r[r.length-1]=n[r[r.length-1]]},function(){var n=e[t++],i=r[r.length-2-n];r[r.length-2-n]=r.pop(),r.push(i)},function(){var t=r.pop();r.push(t[0][t[1]])},function(){r[r.length-2]=r[r.length-2]&r.pop()},function(){r.push(r[r.length-1])},function(){r[r.length-2]=r[r.length-2]^r.pop()},function(){throw r[r.length-1]},function(){r[r.length-2]=r[r.length-2]<=r.pop()},function(){r[r.length-2]=r[r.length-2]*r.pop()},function(){r[r.length-2]=r[r.length-2]==r.pop()},function(){r.push([e[t++]])},function(){var n=e[t++],i=n?r.slice(-n):[],n=(r.length-=n,i.unshift(null),r.pop());r.push(l(n[0][n[1]],i))},function(){var t=r[r.length-2],e=Object.getOwnPropertyDescriptor(t[0],t[1])||{configurable:!0,enumerable:!0};e.set=r[r.length-1],Object.defineProperty(t[0],t[1],e)},function(){var t=r.pop(),e=r.pop();r.push([e[0][e[1]],t])},function(){r[r.length-1]+=String.fromCharCode(e[t++])},function(){r.push(~r.pop())},function(){r[r.length-1]=e[t++]},function(){r.push(r[e[t++]][0])},function(){return!!p},function(){r[r[r.length-1][0]]=r[r[r.length-1][0]]===undefined?[]:r[r[r.length-1][0]]},function(){var t=r.pop();r.push([r[r.pop()][0],t])},function(){r[r.length-2]=r[r.length-2]/r.pop()},function(){r.push(!r.pop())},function(){r.push([r.pop(),r.pop()].reverse())},function(){h.push([e[t++],r.length,e[t++]])},function(){var t=r.pop();r.push(delete t[0][t[1]])},function(){return!0},function(){p=null},function(){r[r.length-2]=r[r.length-2]>>>r.pop()},function(){r[r.length-1].length?r.push(r[r.length-1].shift(),!0):r.push(undefined,!1)},function(){var n=e[t++],i=n?r.slice(-n):[],n=(r.length-=n,r.pop());r.push(n[0][n[1]].apply(n[0],i))},function(){r[r.length-2]=r[r.length-2]in r.pop()},function(){var n=e[t++];r[r.length-1]&&(t=n)},function(){for(var l=e[t++],c=[],u=e[t++],h=e[t++],p=[],d=0;d<u;d++)c[e[t++]]=r[e[t++]];for(d=0;d<h;d++)p[d]=e[t++];r.push(function f(){var t=c.slice(0);t[0]=[this],t[1]=[arguments],t[2]=[f];for(var r=0;r<p.length&&r<arguments.length;r++)0<p[r]&&(t[p[r]]=[arguments[r]]);return T(l,e,n,t,i,o,s,a)})},function(){var t=r[r.length-2],e=Object.getOwnPropertyDescriptor(t[0],t[1])||{configurable:!0,enumerable:!0};e.get=r[r.length-1],Object.defineProperty(t[0],t[1],e)},function(){var t=r.pop();i[t]||(n[t]=n[t](),i[t]=1),r.push(n[t])},function(){r.pop()},function(){r[r.length-2]=r[r.length-2]>r.pop()},function(){var n=e[t++];r[n]=r[n]===undefined?[]:r[n]},function(){r.push(!1)},function(){r.push("")},function(){r.push(e[t++])},function(){r.length=e[t++]},function(){r[r[r.length-2][0]][0]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]<r.pop()}
|
||
|
|
},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],g=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],v=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3
|
||
|
|
if(!(this instanceof M))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(t,!0)}),this._prepare()};k.prototype._prepare=function(){var t=d[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var n,r=4*(t+1),i=this.key.length/4,o=l(this.key),e=0;e<i;e++)n=e>>2,this._Ke[n][e%4]=o[e],this._Kd[t-n][e%4]=o[e];for(var s,a=0,c=i;c<r;){if(s=o[i-1],o[0]^=g[s>>16&255]<<24^g[s>>8&255]<<16^g[255&s]<<8^g[s>>24&255]^f[a]<<24,a+=1,8!=i)for(var e=1;e<i;e++)o[e]^=o[e-1];else{for(var e=1;e<i/2;e++)o[e]^=o[e-1];s=o[i/2-1],o[i/2]^=g[255&s]^g[s>>8&255]<<8^g[s>>16&255]<<16^g[s>>24&255]<<24;for(var e=i/2+1;e<i;e++)o[e]^=o[e-1]}for(var u,h,e=0;e<i&&c<r;)u=c>>2,h=c%4,this._Ke[u][h]=o[e],this._Kd[t-u][h]=o[e++],c++}for(var u=1;u<t;u++)for(var h=0;h<4;h++)s=this._Kd[u][h],this._Kd[u][h]=P[s>>24&255]^w[s>>16&255]^D[s>>8&255]^A[255&s]},k.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,n=[0,0,0,0],r=l(t),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var o=1;o<e;o++){for(var i=0;i<4;i++)n[i]=v[r[i]>>24&255]^m[r[(i+1)%4]>>16&255]^_[r[(i+2)%4]>>8&255]^b[255&r[(i+3)%4]]^this._Ke[o][i];r=n.slice()}for(var a,c=s(16),i=0;i<4;i++)a=this._Ke[e][i],c[4*i]=255&(g[r[i]>>24&255]^a>>24),c[4*i+1]=255&(g[r[(i+1)%4]>>16&255]^a>>16),c[4*i+2]=255&(g[r[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(g[255&r[(i+3)%4]]^a);return c},k.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,n=[0,0,0,0],r=l(t),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var o=1;o<e;o++){for(var i=0;i<4;i++)n[i]=T[r[i]>>24&255]^C[r[(i+3)%4]>>16&255]^S[r[(i+2)%4]>>8&255]^E[255&r[(i+1)%4]]^this._Kd[o][i];r=n.slice()}for(var a,c=s(16),i=0;i<4;i++)a=this._Kd[e][i],c[4*i]=255&(y[r[i]>>24&255]^a>>24),c[4*i+1]=255&(y[r[(i+3)%4]>>16&255]^a>>16),c[4*i+2]=255&(y[r[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(y[255&r[(i+1)%4]]^a);return c};var I=function x(t,e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else e=s(16);this._lastCipherblock=o(e,!0),this._aes=new k(t)};I.prototype.encrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){a(t,n,0,r,r+16);for(var i=0;i<16;i++)n[i]^=this._lastCipherblock[i];this._lastCipherblock=this._aes.encrypt(n),a(this._lastCipherblock,e,r)}return e},I.prototype.decrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){a(t,n,0,r,r+16),n=this._aes.decrypt(n);for(var i=0;i<16;i++)e[r+i]=n[i]^this._lastCipherblock[i];a(t,this._lastCipherblock,0,r,r+16)}return e};var R=function L(t){if(!(this instanceof L))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=s(16),this.setValue(t)):this.setBytes(t)};R.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");if(t>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var e=15;e>=0;--e)this._counter[e]=t%256,t=parseInt(t/256)},R.prototype.setBytes=function(t){if(t=o(t,!0),16!=t.length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var j={AES:k,Counter:R,modeOfOperation:{cbc:I},utils:{hex:p,utf8:h},padding:{pkcs7:{pad:c,strip:u}},_arrayTest:{coerceArray:o,createArray:s,copyArray:a}},O=j},"./utils/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,{isVisible:function(){return r}});var r=function(t){if(!t)return!1
|
||
|
|
if(n.isEven())return!1;for(e=1;e<u.length;){for(var r=u[e],i=e+1;i<u.length&&r<h;)r*=u[i++];for(r=n.modInt(r);e<i;)if(r%u[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,s=!1,a=0;--i>=0;){var l=8==r?255&+e[i]:o(e,i);l<0?"-"==e.charAt(i)&&(s=!0):(s=!1,0==a?this[this.t++]=l:a+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM,a=this.t-1;a>=0;--a)e[a+o+1]=this[a]>>r|s,s=(this[a]&i)<<n;for(var a=o-1;a>=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)return void(e.t=0);var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=n&&n.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=r());var l=r(),c=this.s,u=e.s,h=this.DB-a(o[o.t-1]);h>0?(o.lShiftTo(h,l),s.lShiftTo(h,i)):(o.copyTo(l),s.copyTo(i));var p=l.t,d=l[p-1];if(0!=d){var f=d*(1<<this.F1)+(p>1?l[p-2]>>this.F2:0),g=this.FV/f,y=(1<<this.F1)/f,v=1<<this.F2,m=i.t,_=m-p,b=null==n?r():n;for(l.dlShiftTo(_,b),i.compareTo(b)>=0&&(i[i.t++]=1,i.subTo(b,i)),t.ONE.dlShiftTo(p,b),b.subTo(l,l);l.t<p;)l[l.t++]=0;for(;--_>=0;){var T=i[--m]==d?this.DM:Math.floor(i[m]*g+(i[m-1]+v)*y);if((i[m]+=l.am(0,T,i,_,0,p))<T)for(l.dlShiftTo(_,b),i.subTo(b,i);i[m]<--T;)i.subTo(b,i)}null!=n&&(i.drShiftTo(p,n),c!=u&&t.ZERO.subTo(n,n)),i.t=p,i.clamp(),h>0&&i.rShiftTo(h,i),c<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var i=r(),o=r(),s=n.convert(this),l=a(e)-1;for(s.copyTo(i);--l>=0;)if(n.sqrTo(i,o),(e&1<<l)>0)n.mulTo(o,s,i);else{var c=i;i=o,o=c}return n.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==thi
|
||
|
|
t!==undefined&&(t.str!==undefined?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):t.hex!==undefined?this.setStringHex(t.hex):t.date!==undefined&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},i.YAHOO.lang.extend(o.asn1.DERGeneralizedTime,o.asn1.DERAbstractTime),o.asn1.DERSequence=function(t){o.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},i.YAHOO.lang.extend(o.asn1.DERSequence,o.asn1.DERAbstractStructured),o.asn1.DERSet=function(t){o.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&"undefined"!=typeof t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},i.YAHOO.lang.extend(o.asn1.DERSet,o.asn1.DERAbstractStructured),o.asn1.DERTaggedObject=function(t){o.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("undefined"!=typeof t.tag&&(this.hT=t.tag),"undefined"!=typeof t.explicit&&(this.isExplicit=t.explicit),"undefined"!=typeof t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},i.YAHOO.lang.extend(o.asn1.DERTaggedObject,o.asn1.ASN1Object)},"./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js":function(t,e,n){"use strict";n.r(e),n.d(e,{YAHOO:function(){return r}});var r={};r.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;i<s.length;i+=1){var n=s[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(a){}o(t.prototype,n)}}}},"./node_modules/md5/md5.js":function(t,e,n){!function(){var e=n("./node_modules/crypt/crypt.js"),r=n("./node_modules/charenc/charenc.js").utf8,i=n("./node_modules/is-buffer/index.js"),o=n("./node_modules/charenc/charenc.js").bin,s=function a(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var s=e.bytesToWords(t),l=8*t.length,c=1732584193,u=-271733879,h=-1732584194,p=271733878,d=0;d<s.length;d++)s[d]=16711935&(s[d]<<8|s[d]>>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[l>>>5]|=128<<l%32,s[14+(l+64>>>9<<4)]=l;for(var f=a._ff,g=a._gg,y=a._hh,v=a._ii,d=0;d<s.length;d+=16){var m=c,_=u,b=h,T=p;c=f(c,u,h,p,s[d+0],7,-680876936),p=f(p,c,u,h,s[d+1],12,-389564586),h=f(h,p,c,u,s[d+2],17,606105819),u=f(u,h,p,c,s[d+3],22,-1044525330),c=f(c,u,h,p,s[d+4],7,-176418897),p=f(p,c,u,h,s[d+5],12,1200080426),h=f(h,p,c,u,s[d+6],17,-1473231341),u=f(u,h,p,c,s[d+7],22,-45705983),c=f(c,u,h,p,s[d+8],7,1770035416),p=f(p,c,u,h,s[d+9],12,-1958414417),h=f(h,p,c,u,s[d+10],17,-42063),u=f(u,h,p,c,s[d+11],22,-1990404162),c=f(c,u,h,p,s[d+12],7,1804603682),p=f(p,c,u,h,s[d+13],12,-40341101),h=f(h,p,c,u,s[d+14],17,-1502002290),u=f(u,h,p,c,s[d+15],22,1236535329),c=g(c,u,h,p,s[d+1],5,-165796510),p=g(p,c,u,h,s[d+6],9,-1069501632),h=g(h,p,c,u,s[d+11],14,643717713),u=g(u,h,p,c,s[d+0],20,-373897302),c=g(c,u,h,p,s[d+5],5,-701558691),p=g(p,c,u,h,s[d+10],9,38016083),h=g(h,p,c,u,s[d+15],14,-660478335)
|
||
|
|
;["object","boolean","number","function","string","symbol"].forEach(function(t,e){_e[t]=function(n){return(void 0===n?"undefined":_typeof(n))===t||"a"+(e<1?"n ":" ")+t}});var be={};_e.transitional=function(t,e,n){function r(t,e){return"[Axios v"+me+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,i,o){if(!1===t)throw new u(r(i," has been removed"+(e?" in "+e:"")),u.ERR_DEPRECATED);return e&&!be[i]&&(be[i]=!0),!t||t(n,i,o)}};var Te={assertOptions:$,validators:_e},Ce=Te.validators,Se=function(){function t(e){classCallCheck(this,t),this.defaults=e,this.interceptors={request:new Jt,response:new Jt}}return t.prototype.request=function(t,e){"string"==typeof t?(e=e||{},e.url=t):e=t||{},e=H(this.defaults,e);var n=e,r=n.transitional,i=n.paramsSerializer,o=n.headers;r!==undefined&&Te.assertOptions(r,{silentJSONParsing:Ce.transitional(Ce["boolean"]),forcedJSONParsing:Ce.transitional(Ce["boolean"]),clarifyTimeoutError:Ce.transitional(Ce["boolean"])},!1),null!=i&&(Vt.isFunction(i)?e.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:Ce["function"],serialize:Ce["function"]},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();var s=void 0;s=o&&Vt.merge(o.common,o[e.method]),s&&Vt.forEach(["delete","get","head","post","put","patch","common"],function(t){delete o[t]}),e.headers=ue.concat(s,o);var a=[],l=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(l=l&&t.synchronous,a.unshift(t.fulfilled,t.rejected))});var c=[];this.interceptors.response.forEach(function(t){c.push(t.fulfilled,t.rejected)});var u=void 0,h=0,p=void 0;if(!l){var d=[V.bind(this),undefined];for(d.unshift.apply(d,a),d.push.apply(d,c),p=d.length,u=Promise.resolve(e);h<p;)u=u.then(d[h++],d[h++]);return u}p=a.length;var f=e;for(h=0;h<p;){var g=a[h++],y=a[h++];try{f=g(f)}catch(v){y.call(this,v);break}}try{u=V.call(this,f)}catch(v){return Promise.reject(v)}for(h=0,p=c.length;h<p;)u=u.then(c[h++],c[h++]);return u},t.prototype.getUri=function(t){return t=H(this.defaults,t),_(B(t.baseURL,t.url),t.params,t.paramsSerializer)},t}();Vt.forEach(["delete","get","head","options"],function(t){Se.prototype[t]=function(e,n){return this.request(H(n||{},{method:t,url:e,data:(n||{}).data}))}}),Vt.forEach(["post","put","patch"],function(t){function e(e){return function(n,r,i){return this.request(H(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Se.prototype[t]=e(),Se.prototype[t+"Form"]=e(!0)});var Ee=Se,Pe=function(){function t(e){if(classCallCheck(this,t),"function"!=typeof e)throw new TypeError("executor must be a function.");var n=void 0;this.promise=new Promise(function(t){n=t});var r=this;this.promise.then(function(t){if(r._listeners){for(var e=r._listeners.length;e-- >0;)r._listeners[e](t);r._listeners=null}}),this.promise.then=function(t){var e=void 0,n=new Promise(function(t){r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},e(function(t,e,i){r.reason||(r.reason=new O(t,e,i),n(r.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(t){if(this.reason)return void t(this.reason);this._listeners?this._listeners.push(t):this._listeners=[t]},t.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},t.source=function(){var e=void 0;return{token:new t(function(t){e=t}),cancel:e}},t}(),we=Pe,De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge
|
||
|
|
return p.g(p.v(0,p.d(["KwQnAicDNBErHCcCJwMnBCcFJwYnBycIJwknCicLJwwnDScOJw8nECcRJxInEycUJxUnFicXJxgnGScaJxsqAAAfACkPdw9yD2EPcBg0DCsdJwInAwsDKQ9wD3IPZQ92FQsDKQ9uD2UPeA90FQMvAgAlBSoAQyF+JTQRJSULBCoBJEUALCUlCwUoLAIAJRECACkPbw9wD3QPaQ9vD24Pcw9fDikPbA9pD2MPZQ9uD3MPZQ9DD28Pbg9mD2kPZw4DFyHKJTTfOyULAykPbg9lD3gPdBUqCS8lJTRXNwsFOSwlJQsEKQ9zD2UPYw9yD2UPdA9LD2UPeRUqAgApD28PcA90D2kPbw9uD3MPXw4pD2wPaQ9jD2UPbg9zD2UPQw9vD24PZg9pD2cOKQ9zD2UPYw9yD2UPdA9LD2UPeQ4DLyUlCwQpD2UPbg9jD3IPeQ9wD3QPZQ9kD0wPaQ9jD2UPbg9zD2UPVw9lD2IVKgIAKQ9vD3APdA9pD28Pbg9zD18OKQ9sD2kPYw9lD24Pcw9lD0MPbw9uD2YPaQ9nDikPZQ9uD2MPcg95D3APdA9lD2QOAy8lJQsEKQ9zD2kPZw9uD2EPdA91D3IPZQ9XD2UPYhUqAgApD28PcA90D2kPbw9uD3MPXw4pD2wPaQ9jD2UPbg9zD2UPQw9vD24PZg9pD2cOKQ9zD2kPZw9uD2EPdA91D3IPZQ4DLyUlCwMpD24PZQ94D3QVKg4vJSU0V0U0KwUqCUMhJTQiJSUqAgApD28PcA90D2kPbw9uD3MPXw4pD2wPaQ9jD2UPbg9zD2UPVQ9yD2wOAxchJTQ0JQsDKQ9uD2UPeA90FSoOLyUlNFcqCwYqAgApD28PcA90D2kPbw9uD3MPXw4pD2wPaQ9jD2UPbg9zD2UPVQ9yD2wOAywlJQsDKQ9uD2UPeA90FSoNLyUlCwApD3IPZQ9xD3UPZQ9zD3QPTA9pD2MPZQ9uD3MPZRUSBioBHwIbNBEFKg1DISU0KyUlCwQLAykPcw9lD24PdBUDLCUlNCIFKg5DISU0RSUlCwQpD2EPcA9wD0kPZBUDFyE0NyULBCkPcw9lD2MPcg9lD3QPSw9lD3kVAxcXISU0DyULAykPbg9lD3gPdBUqEC8lJTRXNwsDKQ9hD2IPcg91D3APdBUpD3IPZQ90D3UPcg9uKB8CGzQnBSoQQyElNAIlJQsHKgMAKQ90D2MPcA9jD3IPeQ9wD3QPbw4DLCUlCwgLBykPQQ9lD3MPZA9lD2MPcg95D3APdBUDLCUlCwkLBykPUw9pD2cPbg9ED2UPYw9yD3kPcA90FQMsJSULCgsHKQ9nD2UPbg9LD2UPeRUDLCUlCwspD2MPNA85D2YPYQ8xD2MPNg84DzcPNA8zD24PYw83D3cPMQ84DzQPMw9jDzgPYg81DzYPMg84D2wPcA9iDzEPNywlJQsMKQ8tDy0PLQ8tDy0PQg9FD0cPSQ9ODyAPUA9VD0IPTA9JD0MPIA9LD0UPWQ8tDy0PLQ8tDy0PTQ9JD0kPQg9JD2oPQQ9OD0IPZw9rD3EPaA9rD2kPRw85D3cPMA9CD0EPUQ9FD0YPQQ9BD08PQw9BD1EPOA9BD00PSQ9JD0IPQw9nD0sPQw9BD1EPRQ9BD3EPNA90D2UPcQ9rD1cPLw9UD1UPcg91D1UPOA85D0UPbA9OD1YPZA9LD3IPcA9TD0wPKw9ID0MPSQ9UD3IPdQ95D2IPNg9CD1MPOQ9tD1cPNg9NDzQPbQ9xD20PeA9ED2gPYQ96D0QPbQ9RD2cPTQ9LD04PZg9zD0EPMA9kDzIPaw94D0YPdQ9jD0MPcw9YD1QPeQ9lD3MPRg9OD2EPag9hD2kPcw9rD3IPQQ96D1YPSg9wD04PRw9PDzcPNQ9iD1EPRg9hD3APNA9qD1kPeg9KD1kPcw9rD0kPdQ9hD3MPNg9mD2cPSQ9TDzcPeg9TD20PRw9YD2cPUg9jD3APNg9pDzAPWg9CD0gPMw9wD2sPVg9DD1gPYw9nD2YPTA9mD3MPVg9DD08PKw9zD04PMA8xD2oPRg9oD0YPZw9PD0MPMA9MD1kPMg9mDzEPcA9KDysPMw9qD3EPaw90D0EPbA9ND0kPeA95DzgPUQ85D3QPNw9YD3cPdw9MDzUPLw9uDzgPLw9TD2wPZQ9kD3APNw9UD3cPdQ9SD2QPbg9sDzIPTw9QD2wPMw95D2MPQw9UD1IPaw9YD3QPTw9JD28PUg9OD0IPOQ92D2cPZA85D1gPbw9vD1QPSw9pD0UPZA9DD1gPQw83D1cPOQ9yD3kPdg90D3cPQw9pD0EPQg84DzIPdg9FD2YPSA9XD1gPWA9nD3oPaA9zD1APQw8xDzMPVQ9SD3UPRg95DzEPSg9xD2IPVw9KD3QPVA9DD0MPYw9mD3MPQw9WD3gPdQ9CD3APbA9oD1YPSg9BD1EPNw9KD3MPRg81D1MPTQ9uD3QPZA9KD0QPaw9wDzcPcg9KD0wPaA9wD3IPZw9zD2EPaQ9tDzIPQw9SD2oPYw9WD3MPZQ9OD20Pdw85DzcPYg93D0kPRA9BD1EPQQ9CDy0PLQ8tDy0PLQ9FD04PRA8gD1APVQ9CD0wPSQ9DDyAPSw9FD1kPLQ8tDy0PLQ8tLCUlCw0pDy0PLQ8tDy0PLQ9CD0UPRw9JD04PIA9QD1UPQg9MD0kPQw8gD0sPRQ9ZDy0PLQ8tDy0PLQ9ND0kPSQ9CD0kPag9BD04PQg9nD2sPcQ9oD2sPaQ9HDzkPdw8wD0IPQQ9RD0UPRg9BD0EPTw9DD0EPUQ84D0EPTQ9JD0kPQg9DD2cPSw9DD0EPUQ9FD0EPbg9TD04PLw9ED1gPYQ8rD1IPcQ82D3UPdA91D3YPNg9aD3QPQQ9mD00PdA90D1IPWg9OD3kPZA9FD0YPQw8zD28PRw9ID2MPeg9ID1kPRA8yD1QPWA95DzUPeg9oD1EPcg9UD1kPSQ9YD24POA9lD1oPMQ9TD2oPQg9xD3YPKw9CD2MPNw9mD1MPZw8rD3IPMQ9OD2gPTg9ZD0EPQQ9oD0sPWA9vD3cPaA9WD0oPWA9lD0wPOA9OD3QPQQ9BDzgPag84D1kPdA9rD3IPdA96D2oPSA9CD3oPbA9mD28PNA81DzcPcg94D1UPeg9zD08PVA9pD0cPNQ9aD1UPcw9UD1MPeQ9FD0EPWg9PDzgPYQ9zD1UPRw9qD2wPWg8wD3APKw9oD1APQQ90D2EPWA81D2gPcw9zD1MPdg82D28POA96DzIPcw9xD1gPNw9DD1cPaw9oD2QPbQ8xD2UPMw9QD1cPQQ93DzgPbg9ODzcPYg9kD2UPTw91DzIPeQ9sD3EPdw9FDzYPcQ95D0MPeA9HD2kPUw9sD0IPRg9YDzIPNg9ED1UPMA9PDzUPYw9sD3cPKw81DysPWQ9DD2sPUg9qD0UPaQ9vD0gPcg9DDzIPQg9hD0kPTg9hDzkPbQ9YD1oPZQ92D0EPUw9VD1oPMQ9rD3kPbg9wD3cPUA9vD3MPaQ9kD1kPRQ9CD0sPag9iD1UPWg84DzQPRQ9VD0kPaQ8vDysPeA9XD0sPUQ8wD1QPSg9lD2IPLw9ID0YPNA80D24Pbw9SD0QPaQ9nDzMPbQ9hD2QPZA93DzgPbg8rD2IPUw9rD3APZQ9nD0MPdQ85D0oPQw9oD2kPUg84D0cPdA9VD3gPUA9KD0gPTQ9UD0oPMw9LD3QPbA9ZD0UPLw9ID1cPZg9TDy8Pag81D3cPSQ9ED0EPUQ9BD0IPLQ8tDy0PLQ8tD0UPTg9EDyAPUA9VD0IPTA9JD0MPIA9LD0UPWQ8tDy0PLQ8tDy0sJSULAykPcA9yD2UPdhUqFC8lJQsOEgUhJRIKCwQpD2EPcA9wD0kPZBUDEgs7AjQrJQsEKQ9zD2UPYw9yD2UPdA9LD2UPeRUDLCUlCw8qBAApD3APYQ9yD3MPZQ4SCAsEKQ9lD24PYw9yD3kPcA90D2UPZA9MD2kPYw9lD24Pcw9lD1cPZQ9iFQMSDjsCHwEsJSULEBIJCwQpD2UPbg9jD3IPeQ9wD3QPZQ9kD0wPaQ9jD2UPbg9zD2UPVw9lD2IV
|
||
|
|
Component.registerComponent("RemainingTimeDisplay",RemainingTimeDisplay);var LiveDisplay=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.isLoadedMetaData=!1,i.hide(),i.on(i.player(),"durationchange",i.onDurationChange),i.on(i.player(),"loadedmetadata",i.onLoadMetadata),n.on("loadnewvideo",videojs.bind(i,i.resetStatus)),i}return inherits(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=createEl("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.resetStatus=function(){this.setStatus(!1)},e.prototype.onDurationChange=function(){this.isLoadedMetaData&&this.update()},e.prototype.onLoadMetadata=function(){this.setStatus(!0),this.update()},e.prototype.setStatus=function(t){this.isLoadedMetaData=t},e.prototype.update=function(){this.player().duration()===Infinity&&"dvrLive"!==this.player().dvrMode()?this.show():this.hide()},e}(Component);Component.registerComponent("LiveDisplay",LiveDisplay);var DvrButton=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.hide(),i.mode=n.dvrMode(),i.on(i.player(),"loadedmetadata",i.onLoadMetadata),i}return inherits(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-dvr-control vjs-control"},{style:"line-height: 3em; cursor: pointer"});return this.contentEl_=createEl("div",{className:"vjs-dvr-button-display",innerHTML:"dvrEvent"===this.mode?""+this.localize("返回直播"):""+this.localize("直播回看")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.handleClick=function(){if(this.dvrMode=this.player().dvrMode(),"dvrLive"===this.dvrMode){get_1(this,"player_.options_.plugins.Dvr.shiftURL")&&this.player_.LiveDvr().timeShift(0)}else{get_1(this,"player_.options_.plugins.Dvr.liveURL")&&this.player_.LiveDvr().timeShift(100)}},e.prototype.updateStatus=function(t){var e=document.getElementsByClassName("vjs-dvr-button-display")[0],n="dvrLive"===t?""+this.localize("直播回看"):""+this.localize("返回直播");e&&(e.innerHTML=n)},e.prototype.onLoadMetadata=function(){this.dvrMode=this.player().dvrMode(),this.updateStatus(this.dvrMode),"dvrEvent"===this.dvrMode||"dvrLive"===this.dvrMode?this.show():this.hide()},e}(Button);Component.registerComponent("DvrButton",DvrButton);var Slider=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return inherits(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 n=arguments.length>1&&arguments[1
|
||
|
|
"vjs-menu-button "+e+" "+Button.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",bind(this,function(t){this.unpressButton(),this.el_.blur()})),(IS_IOS||IS_ANDROID)&&"SubsCapsButton"===this.name_&&("vjs-menu"===this.menu.el_.className?this.buttonPressed_=!1:this.buttonPressed_=!0),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){on(document_1,"keydown",bind(this,this.handleKeyPress))},e.prototype.handleBlur=function(){off(document_1,"keydown",bind(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"),IS_IOS&&isInFrame())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}(Component);Component.registerComponent("MenuButton",MenuButton);var TrackButton=function(t){function e(n,r){classCallCheck(this,e);var i=r.tracks,o=possibleConstructorReturn(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return possibleConstructorReturn(o);var s=bind(o,o.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),o.player_.on("ready",s),o.player_.on("dispose",function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s)}),o}return inherits(e,t),e}(MenuButton);Component.registerComponent("TrackButton",TrackButton);var MenuItem=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.selectable=r.selectable,i.selected(r.selected),i.selectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitem"),i}return inherits(e,t),e.prototype.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",assign({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},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.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText("")))},e}(ClickableComponent);Component.registerComponent("MenuItem",MenuItem);var TextTrackMenuItem=function(t){function e(n,r){classCallCheck(this,e);var i=r.track,o=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var s=possibleConstructorReturn(this,t.call(this,n,r));s.track=i;var a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];s.handleTracksChange.apply(s,e)},l=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];
|
||
|
|
;r.addEventListener(e,n),t.on("dispose",function(t){return r.removeEventListener(e,n)})}),t.on("loadstart",s),t.on("dispose",function(e){return t.off("loadstart",s)})}})},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=document_1.createElement("video");var r=this.options_.tag&&getAttributes(this.options_.tag),i=mergeOptions({},r);TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete i.controls,setAttributes(t,assign(i,{id:this.options_.techId,"class":"vjs-tech"}))}t.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&setAttribute(t,"preload",this.options_.preload);for(var o=["loop","muted","playsinline","autoplay"],s=0;s<o.length;s++){var a=o[s],l=this.options_[a];void 0!==l&&(l?setAttribute(t,a,a):removeAttribute(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,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),t.readyState>=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(t){this.trigger(t)},this)})}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(e){log$2(e,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===Infinity&&IS_ANDROID&&IS_CHROME&&0===this.el_.currentTime){var e=function n(){t.el_.currentTime>0&&(t.el_.duration===Infinity&&t.trigger("durationchange"),t.off("timeupdate",n))};return this.on("timeupdate",e),NaN}return 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})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)})}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=window_1.navigator&&window_1.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(t===undefined)return this.el_.src;this.setSrc(t)},e.prototype.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},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,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=document_1.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e["default"]&&(n["default"]=e["default"]),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},e.prototype.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextT
|
||
|
|
return t!==undefined&&0!==t?void(this.cache_.lastVolume=t):this.cache_.lastVolume},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){return t!==undefined?(this.isFullscreen_=!!t,void this.toggleFullscreenClass_()):!!this.isFullscreen_},e.prototype.fullscreenType=function(t){return t!==undefined?void(this.fullscreenType_=t):this.fullscreenType_},e.prototype.requestFullscreen=function(t){var e=FullscreenApi;if(this.isFullscreen(!0),t||this.options_.fakeFullscreen){this.fullscreenType("css");var n=this;return(IS_IOS||IS_ANDROID)&&n.forceFixSubtitlesFont(),IS_IOS?(n.el_.style.width="100vw",n.el_.style.height="100%",n.el_.style.position="fixed",n.el_.style.zIndex="999",n.el_.style.top="0",document_1.body.style.overflowY="hidden",document_1.addEventListener("touchmove",preventScroll,{passive:!1}),this.trigger("fullscreenchange")):(this.enterFullWindow(),this.trigger("fullscreenchange")),!1}this.fullscreenType("system"),e.requestFullscreen?(on(document_1,e.fullscreenchange,bind(this,this.documentFullscreenChange_)),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(t){var e=FullscreenApi,n=this.fullscreenType();if(this.isFullscreen(!1),"css"===n||this.options_.fakeFullscreen)return(IS_IOS||IS_ANDROID)&&this.releaseSubtitlesFont(),IS_IOS?(this.el_.removeAttribute("style"),document_1.removeEventListener("touchmove",preventScroll,{passive:!1}),document_1.body.style.overflowY="",this.trigger("fullscreenchange")):(this.exitFullWindow(),this.trigger("fullscreenchange")),!1;e.requestFullscreen?document_1[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.forceFixSubtitlesFont=function(){loadCssText("tcp_force_fix_font","\n .vjs-text-track-display div div {\n font: "+(get_1(this.getChild("textTrackDisplay").el_,"children[0].children[0].style.font")||"10px sans-serif")+"!important;\n }\n ")},e.prototype.releaseSubtitlesFont=function(t){var e=get_1(this.getChild("textTrackDisplay").el_,"children[0].children[0]");e&&(e.style.display="none"),t&&setTimeout(function(){releaseCssText("tcp_force_fix_font")},1e3)},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document_1.documentElement.style.overflow,on(document_1,"keydown",bind(this,this.fullWindowOnEscKey)),document_1.documentElement.style.overflow="hidden",addClass(document_1.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,off(document_1,"keydown",this.fullWindowOnEscKey),document_1.documentElement.style.overflow=this.docOrigOverflow,removeClass(document_1.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.setForbidFartherSeek=function(t){if(t===undefined)return!!this.options_.forbidFartherSeek;this.options_.forbidFartherSeek=t},e.prototype.disablePictureInPicture=function(t){if(t===undefined)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},e.prototype.isInPictureInPicture=function(t){return t!==undefined?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},e.prototype.requestPictureInPicture=function(){try{if("pictureInPictureEnabled"in document_1&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")}catch(t){}},e.prototype.exitPictureInPicture=function(){if("pictureInPictureEnabled"in document_1)return document_1.exitPictureInPicture()},e.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Tech.getTech(i);if(o||(o=Component.getComponent
|
||
|
|
;"all"!==e&&(window_1.setTimeout(function(){r.one("error",d)},0),r.one("playing",function(t){}))},e.prototype.getInfoV4=function(t){var e=this.player(),n=this.assemblyPathV4("getplayinfo",t.appID,t.fileID),r=e.options_,i=t.t,o=t.us,s=t.rlimit,a=t.psign,l=t.exper,c={};t.ssign?c.super_sign=t.ssign:a&&(c={t:i,psign:a},(o||0==o)&&(c.us=o),s&&(c.rlimit=s),l&&(c.exper=l)),t.playerConfig&&(c.pcfg=t.playerConfig),t.playerID&&(c.playerid=t.playerID),this.requestTimestamp=+(new Date).getTime(),e.trigger({type:"playcgistart",data:{time:this.requestTimestamp,url:n}}),log$2("playcgi v4 loading");var u=queryString.stringify(c);u?(n+=(~n.indexOf("?")?"&":"?")+u,n=n.replace("?&","?")):n+=~n.indexOf("?")?"":"?";var h=r&&r.hlsConfig&&(r.hlsConfig.disable||r.hlsConfig.skipHlsJs);n=this.enModule.generatePlayCgiUrl(n,browser,h),this.getInfoRetryTimes=0,this.getInfoRequest=function(t){t&&this.playCGIHosts[this.playCGIIndex+1]&&(n=n.replace(this.playCGIHosts[this.playCGIIndex],this.playCGIHosts[this.playCGIIndex+1]),this.playCGIIndex++),IE_VERSION&&IE_VERSION<10?jsonp(n,{param:c,timeout:3e3,prefix:"TcCallBack"},bind(this,this.onResultV4)):xhr({url:n,timeout:3e3},bind(this,this.onResultV4))},this.getInfoRequest()},e.prototype.onResultV4=function(t,e,n){var r=e,i=r.rawRequest;try{n?e=JSON.parse(n):t||e.body||(t=new Error("ServerError"))}catch(h){t=new Error("ServerError")}var o=this.player();if(t){if(log$2("playcgi v4 loaded failure"),this.getInfoRetryTimes<8)return this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0});o.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:t,result:e}});var s=12;switch(t.message){case"XMLHttpRequest timeout":case"Timeout":s=10;break;case"ServerError":s=11}this.player().error({code:s})}else{if(o.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:t,result:e,rawRequest:i,overlayIv:this.enModule.overlayIv,overlayKey:this.enModule.overlayKey}}),0!=e.code)return log$2("playcgi v4 loaded failure"),e.code>=2e3&&e.code<3e3&&this.getInfoRetryTimes<8?(this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0})):void this.player().error({code:e.code});if(log$2("playcgi v4 loaded success",e),4===e.version){var a=e.media;this.setPoster({coverUrl:a.basicInfo.coverUrl}),this.setGhostContent(a.ghostWatermarkInfo),this.setSrcV4(a),this.setVttThumbnailV4(a),this.setDots(a)}else if(2===e.version){var l=e.coverInfo,c=e.videoInfo,u=e.playerInfo;this.setPoster(l),this.setLogo(u),this.setSrc(e),this.setPatch(u),this.setVttThumbnail(e),this.setDots(e),this.setOriginDuration(c)}}},e.prototype.setSrcV4=function(t,e){var n=this,r=this.player(),i=r.options_,o=void 0,s=r.options_.plugins,a=r.DRM().options||s.DRM,l=[],c="plain";e=e||(a?a.skipPlan:"");var u=[],h=[];if("Original"===t.audioVideoType||"Transcode"===t.audioVideoType)return this.setSrc(t),!1;if(!t.streamingInfo)return void this.player().error({code:13,message:"no stream info"});if(t.streamingInfo){if(t.streamingInfo.drmOutput&&Array.isArray(t.streamingInfo.drmOutput)){for(var p=t.streamingInfo.drmOutput,d=0;d<p.length;d++)h.push(p[d].type);if(IS_ANY_SAFARI&&!IS_MQQB&&-1!==h.indexOf("FairPlay")&&"fairplay"!=e&&"all"!=e){var f=h.indexOf("FairPlay"),g=p[f].subStreams;l.push(g),u.push({src:unifyProtocol(p[f].url),type:this.getMIMEType(p[f].url),qualityLabelList:g,keySystems:{"com.apple.fps.1_0":{certificateUri:t.streamingInfo.fairPlayCertificateUrl||(a||{}).certificateUri,licenseUri:t.streamingInfo.fairplayLicenseUrl}}}),log$2("DRM source fairplay",o)}else if(window_1.navigator.requestMediaKeySystemAccess&&-1!==h.indexOf("Widevine")&&!IS_SAFARI&&"widevine"!==e&&"all"!==e){var y=h.indexOf("Widevine"),v=p[y].subStreams,m=v[v.length-1];("audio"===m.type||0===m.width&&0===m.height)&&v.pop(),l.push(v),u.push({src:unifyProtocol(p[y].url),type:this.getMIMEType(p[y].url),qualityLabelList:v,keySystems:{"com.widevine.alpha":{serverURL:t.streamingInfo.widevineLicenseUrl}}}),log$2("DRM source widevine",o)}if(-1!==h.indexOf("SimpleAES")&&"all"!=e){var _,b=h.indexOf("SimpleAES");c="SimpleAES"
|
||
|
|
Object.keys(this.dashjs.MediaPlayer.events).forEach(function(e){t.mediaPlayer_.off(t.dashjs.MediaPlayer.events[e],videojs.bind(t,t.onEvent))}),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash},t.prototype.duration=function(){return this.mediaPlayer_?this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?Infinity:this.mediaPlayer_.duration():0},t.hooks=function(e,n){return t.hooks_[e]=t.hooks_[e]||[],n&&(t.hooks_[e]=t.hooks_[e].concat(n)),t.hooks_[e]},t.hook=function(e,n){t.hooks(e,n)},t.removeHook=function(e,n){var r=t.hooks(e).indexOf(n);return-1!==r&&(t.hooks_[e]=t.hooks_[e].slice(),t.hooks_[e].splice(r,1),!0)},t.prototype.onMetaData=function(t){var e=this,n=this.mediaPlayer_,r=n.getBitrateInfoListFor("video"),i=n.getSettings(),o=i.streaming.abr.autoSwitchBitrate.video,s=[];if(r.length>0){s.push({id:-1,label:"auto",selected:o}),r.forEach(function(t,n){s.push({id:n,label:e.getLevelLabel(t),selected:!o&&e.currentQuality.video===n})});var a={qualityData:{video:s},callbacks:{video:videojs.bind(this,this.switchQuality)}};this.tech_.setTimeout(function(){this.trigger({type:"masterplaylistchange",data:a})},1)}},t.prototype.switchQuality=function(t){var e=this.mediaPlayer_;-1===t.id?e.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):t.id!=this.currentQuality[t.trackType]&&(e.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),e.setQualityFor(t.trackType,t.id))},t.prototype.getLevelLabel=function(t){return t.height?t.height+"p":t.width?Math.round(9*t.width/16)+"p":t.bitrate?t.bitrate/1e3+"kbps":0},t.prototype.onEvent=function(t){switch(this.tech_.trigger({type:"dash_"+t.type,data:t}),t.type){case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_REQUESTED:this.tech_.trigger({type:"dashqualityswitching",data:t});break;case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED:this.tech_.trigger({type:"dashqualityswitched",data:t}),this.currentQuality[t.mediaType]=t.newQuality}},t}();Html5DashJS.hooks_={};var canHandleKeySystems=function(t){t=JSON.parse(JSON.stringify(t)),Html5DashJS.updateSourceData&&(videojs.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),t=Html5DashJS.updateSourceData(t)),Html5DashJS.hooks("updatesource").forEach(function(e){t=e(t)});var e=document_1.createElement("video");return!(t.keySystemOptions&&!window_1.navigator.requestMediaKeySystemAccess&&!e.msSetMediaKeys)};videojs.DashSourceHandler=function(){return{name:"dashSourceHandler",canHandleSource:function(t){var e=/\.mpd/i;return canHandleKeySystems(t)?videojs.DashSourceHandler.canPlayType(t.type)?"probably":e.test(t.src)?"maybe":"":""},handleSource:function(t,e,n){return new Html5DashJS(t,e,n)},canPlayType:function(t){return videojs.DashSourceHandler.canPlayType(t)}}},videojs.DashSourceHandler.canPlayType=function(t){return/^application\/dash\+xml/i.test(t)?"probably":""},TCPlayer.mountDashProvider=mountDashProvider,mountDashProvider(),videojs.Html5DashJS=Html5DashJS;var Component$6=videojs.getComponent("Component"),hlsOption=["fileID","requestID","mediaType","mimeType","provider","resolution","rate","frames","buffer","connectionSpeed"],mp4Option=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer"],dashOption=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer","provider","connectionSpeed"],infoOption=["info"],VideoStatisticWrapper=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.nodelist={},i.status={fileID:"",requestID:"",mediaType:"",mimeType:"",provider:"",resolution:"",rate:"",frames:"",buffer:"",connectionSpeed:"",info:""},n.on("playcgiend",function(){clearTimeout(i.timeoutID),Object.keys(i.status).forEach(function(t){i.nodelist[t].reset()})}),n.on("statistic",videojs.bind(i,function(t){"open"===t.data.action?i.tick():i.clearTimeout(i.timeoutID)})),i.init(),i}return inherits(e,t),e.prototype.tick=function(){var t=this;this.timeoutID=setTimeout(videojs.bind(this,function(){t.tick()}),1e3),this.updatePanel()},e.prototype.createEl=function()
|
||
|
|
}(),_defineProperty=defineProperty$1,_baseAssignValue=baseAssignValue,objectProto$5=Object.prototype,hasOwnProperty$6=objectProto$5.hasOwnProperty,_assignValue=assignValue,argsTag$1="[object Arguments]",_baseIsArguments=baseIsArguments,objectProto$7=Object.prototype,hasOwnProperty$8=objectProto$7.hasOwnProperty,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(t){return isObjectLike_1(t)&&hasOwnProperty$8.call(t,"callee")&&!propertyIsEnumerable.call(t,"callee")},stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i?_root.Buffer:undefined,s=o?o.isBuffer:undefined,a=s||stubFalse_1;t.exports=a}),MAX_SAFE_INTEGER$1=9007199254740991,isLength_1=isLength,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag$2="[object Function]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$1]=typedArrayTags[float64Tag$1]=typedArrayTags[int8Tag$1]=typedArrayTags[int16Tag$1]=typedArrayTags[int32Tag$1]=typedArrayTags[uint8Tag$1]=typedArrayTags[uint8ClampedTag$1]=typedArrayTags[uint16Tag$1]=typedArrayTags[uint32Tag$1]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$1]=typedArrayTags[boolTag$1]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag$1]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$2]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag$1]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag$1]=typedArrayTags[setTag$1]=typedArrayTags[stringTag$1]=typedArrayTags[weakMapTag$1]=!1;var _baseIsTypedArray=baseIsTypedArray,_baseUnary=baseUnary,_nodeUtil=createCommonjsModule(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&_freeGlobal.process,s=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=s}),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,_overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_cloneBuffer=createCommonjsModule(function(t,e){function n(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}var r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o?_root.Buffer:undefined,a=s?s.allocUnsafe:undefined;t.exports=n}),getPrototype=_overArg(Object.getPrototypeOf,Object),DataView$1=_getNative(_root,"DataView"),_DataView=DataView$1,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set$1=_getNative(_root,"Set"),_Set=Set$1,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$2="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$2)&&(getTag=function(t){var e=_baseGetTag(t),n="[object Object]"==e?t.constructor:undefined,r=n?_toSource(n):"";if(r)switch(r){case dataViewCtorString:return dat
|
||
|
|
var t=this.player,e=t.options_;return e.autoplay&&"Flash"==t.techName_?"loadedmetadata":"playing"},e}(Plugin$9);videojs.registerPlugin("ContinuePlay",ContinuePlay);var defaults$2={align:"top-left",className:"",content:"",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[]},Component$13=videojs.getComponent("Component"),dom$1=videojs.dom||videojs,registerPlugin$1=videojs.registerPlugin||videojs.plugin,isNumber=function(t){return"number"==typeof t&&t===t},hasNoWhitespace=function(t){return"string"==typeof t&&/^\S+$/.test(t)},Overlay=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return["start","end"].forEach(function(t){var e=i.options_[t];if(isNumber(e))i[t+"Event_"]="timeupdate";else if(hasNoWhitespace(e))i[t+"Event_"]=e;else if("start"===t)throw new Error('invalid "start" option; expected number or string')}),["endListener_","rewindListener_","startListener_"].forEach(function(t){i[t]=function(n){return e.prototype[t].call(i,n)}}),"timeupdate"===i.startEvent_&&i.on(n,"timeupdate",i.rewindListener_),i.debug('created, listening to "'+i.startEvent_+'" for "start" and "'+(i.endEvent_||"nothing")+'" for "end"'),i.hide(),i}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_,e=t.content,n=t.showBackground?"tcp-overlay-background":"tcp-overlay-no-background",r=dom$1.createEl("div",{className:"\n tcp-overlay\n tcp-overlay-"+t.align+"\n "+t.className+"\n "+n+"\n vjs-hidden\n "});return"string"==typeof e?r.innerHTML=e:videojs.browser.IS_IE8||e instanceof window_1.DocumentFragment?r.appendChild(e):dom$1.appendContent(r,e),r},e.prototype.debug=function(){if(this.options_.debug){for(var t=videojs.log,e=t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.hasOwnProperty(r[0])&&"function"==typeof t[r[0]]&&(e=t[r.shift()]),e.apply(undefined,["overlay#"+this.id()+": "].concat(r))}},e.prototype.hide=function(){return t.prototype.hide.call(this),this.debug("hidden"),this.debug('bound `startListener_` to "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_)),this.options_.once?(videojs.browser.IS_IOS&&videojs.browser.IS_WECHAT?this.player().hasStarted()||this.player().ready(videojs.bind(this,function(){this.startListener_({type:this.startEvent_})})):this.player().hasStarted()||this.on(this.player(),this.startEvent_,this.startListener_),this):("pause"===this.startEvent_?this.on(this.player(),this.startEvent_,this.startOnPause_):this.on(this.player(),this.startEvent_,this.startListener_),this)},e.prototype.startOnPause_=function(t){var e=this.player();"pause"===t.type?e.seeking()||e.ended()||this.startListener_({type:"pause"}):e.paused()&&this.startListener_({type:"pause"})},e.prototype.shouldHide_=function(t,e){var n=this.options_.end;return isNumber(n)?t>=n:n===e},e.prototype.show=function(){return t.prototype.show.call(this),"pause"===this.startEvent_&&this.off(this.player(),this.startEvent_,this.startOnPause_),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug('unbound `startListener_` from "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_)),this},e.prototype.shouldShow_=function(t,e){var n=this.options_.start,r=this.options_.end;return isNumber(n)?isNumber(r)?t>=n&&t<r:this.hasShownSinceSeek_?Math.floor(t)===n:(this.hasShownSinceSeek_=!0,t>=n):n===e},e.prototype.startListener_=function(t){var e=this.player().currentTime();this.shouldShow_(e,t.type)&&this.show()},e.prototype.endListener_=function(t){var e=this.player().currentTime();this.shouldHide_(e,t.type)&&this.hide()},e.prototype.rewindListener_=function(t){var e=this.player().currentTime(),n=this.previousTime_,r=this.options_.start,i=this.options_.end;e<n&&(this.debug("rewind detected"),isNumber(i)&&!this.shouldShow_(e)?(this.debug("hiding; "+i+" is an integer and overlay should not show at thi
|
||
|
|
e.prototype.getNetworkType=function(){var t=navigator.userAgent,e=t.match(/NetType\/\w+/)?t.match(/NetType\/\w+/)[0]:"NetType/other";e=e.toLowerCase().replace("nettype/","");var n;switch(e){case"wifi":n="1";break;case"4g":n="2";break;case"3g":case"3gnet":n="3";break;case"2g":n="4";break;default:n="0xFF"}return n},e}(Plugin$14);videojs.registerPlugin("PlayerMetrics",PlayerMetrics);var Plugin$15=videojs.getPlugin("plugin"),log$13=videojs.log,ProgressMarker=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return n.ready(videojs.bind(i,i.init)),i}return inherits(e,t),e.prototype.init=function(){var t=this.player;if(t.options_.dots){var e=function r(){Array.isArray(t.options_.dots)&&t.options_.dots.length>0&&(t.options_.dots.forEach(function(e){!e.emitted&&e.timeOffset-1e3*(t.currentTime()||0)<500&&(e.emitted=!0,t.trigger("marker",e.content))}),t.options_.dots[t.options_.dots.length-1].emitted||window.requestAnimationFrame(r))};window.requestAnimationFrame(e)}if(IS_IOS||IS_ANDROID)return!1;if(!t.controlBar||!this.player.controlBar.progressControl)return void log$13("ProgressMarker can not initialize without control bar or progress control");log$13("ProgressMarker initializing");var n=t.controlBar.getChild("ProgressControl").getChild("SeekBar");n.getChild("ProgressMarkerGenerator")&&n.removeChild("ProgressMarkerGenerator"),t.options_.plugins.ProgressMarker&&(n.addChild("ProgressMarkerGenerator"),log$13("ProgressMarker initialized"),t.trigger({type:"feature",data:"marker"}))},e}(Plugin$15);videojs.registerPlugin("ProgressMarker",ProgressMarker);var Component$16=videojs.getComponent("Component"),PlayListItem=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_,e=videojs.dom.createEl("div",{className:"tcp-playlist-item"}),n=videojs.dom.createEl("div",{className:"tcp-playlist-item-video",innerHTML:t.img?'<img src="'+t.img+'" class="tcp-playlist-item-img">':'<img src="https://imgcache.qq.com/open_proj/proj_qcloud_v2/mc_2014/video/console/v2/css/img/vod/default-cover.png" height="100" class="tcp-playlist-item-img">'}),r=videojs.dom.createEl("div",{className:"tcp-playlist-item-duration",textContent:this.timeFormat(t.duration)});n.appendChild(r);var i=videojs.dom.createEl("div",{className:"tcp-playlist-item-desc",textContent:t.text});return e.appendChild(n),e.appendChild(i),this.bindEvent(e),e},e.prototype.bindEvent=function(t){var e=this;videojs.on(t,["click"],function(){e.player_.trigger({type:"playItem",data:e.options_})})},e.prototype.timeFormat=function(t){var e="",n=Math.floor(t/3600);0!=n&&(t-=3600*n,n<10&&(n="0"+n),e+=n+":");var r=Math.floor(t/60);return r<10&&(r="0"+r),t-=60*r,t<10&&(t="0"+t),e+=r+":"+t},e}(Component$16);videojs.registerComponent("PlayListItem",PlayListItem);var Component$17=videojs.getComponent("Component"),PlayListTitle=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_;return videojs.dom.createEl("div",{className:"tcp-playlist-title",textContent:t.title})},e}(Component$17);videojs.registerComponent("PlayListTitle",PlayListTitle);var Component$15=videojs.getComponent("Component"),PlayListBox=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.init(),i.activeIndex=-1,i}return inherits(e,t),e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist-box"})},e.prototype.init=function(){var t=this,e=this.options_.data;this.addChild("PlayListTitle",{title:this.options_.title}),e.forEach(function(e,n){e.index=n,t.addChild("PlayListItem",e)}),this.player_.on("ready",function(){t.options_.loop&&(t.activeIndex=0,t.player_.on("ended",videojs.bind(t,function(){t.player_.trigger({type:"playItem"})})))}),this.player_.on("playItem",function(n){var r=n.data,i=void 0;t.activeIndex=r?r.index:(t.activeIndex+1)%e.length,i=e[t.a
|
||
|
|
;r.xp2pConfig&&"webrtc"===r.xp2pConfig.format&&r.xp2pConfig.useXP2P&&Object.assign(e,{p2pEnable:r.xp2pConfig.useXP2P,p2pConfig:{cloudAppid:r.xp2pConfig.tencentCloudAppId,xp2pAppid:r.xp2pConfig.xp2pAppId,appKey:r.xp2pConfig.xp2pAppKey,xp2pDomain:r.xp2pConfig.xp2pPackage}});var o=new t;i.webrtcConfig=e,o.setPlayerView(n.el()),o.setConfig(e),o.setPlayListener({onPlayEvent:videojs.bind(i,i.onPlayEvent),onPlayStats:videojs.bind(i,i.onPlayStats),onPlayReport:videojs.bind(i,i.onPlayReport),onPlaySEI:videojs.bind(i,i.onPlaySEI)}),o.startPlay(i.player.currentSrc()),i.player.one("playing",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on playing: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.one("error",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on error: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.trigger({type:"webrtcInstanceCreated",data:{webrtc:o}}),i.webrtcPlayer=o};window.TXLivePlayer?o():loadScript(WEBRTC_PATH,function(){o()})}return t.prototype.onPlayStats=function(t){this.tech.player().trigger({type:"webrtcstats",data:t})},t.prototype.onPlayEvent=function(t,e){-2003===t?this.eventStack.push({event:t,data:e}):this.eventStack.push({event:t,message:e&&e.message});var n=this.tech.player();if(n.trigger({type:"debug",data:{code:t,data:e}}),1005===t&&n.addClass("vjs-waiting"),t<-2e3){if(-2003===t&&e&&e.videoActive&&(n.trigger("blocked"),n.trigger({type:"webrtcevent",data:{code:2005}})),-2003===t)return!1;if(-2005===t||-2001===t||-2004===t){n.trigger({type:"debug",data:{message:"debug === webrtc 状态码 "+t+",进入降级逻辑"}});var r=n.options_.webrtcConfig;if(!r||!1!==r.fallback)return this.switchPlaySource(),!1}return n.error({code:t,source:e}),!1}n.trigger({type:"webrtcevent",data:{code:t,data:e}})},t.prototype.onPlayReport=function(t){if(!1===this.report)return!1;if(t.fromTxliveplayer=!0,40101===t.uint32_command){this.tech.player().trigger({type:"debug",data:{code:"report",data:t}}),this.playerMetrics.report_40101(t)}40100===t.uint32_command&&this.playerMetrics.report_40100(t),40102===t.uint32_command&&this.playerMetrics.report_40102(t)},t.prototype.onPlaySEI=function(t){this.tech.player().trigger({type:"webrtcsei",data:t})},t.prototype.dispose=function(){this.webrtcPlayer&&(this.webrtcPlayer.setPlayListener({onPlayEvent:function(){},onPlayStats:function(){}}),this.webrtcPlayer.stopPlay(),this.webrtcPlayer.setPlayerView(videojs.dom.createEl("video"))),this.webrtcPlayer=null},t.prototype.setSource=function(t){var e=this;this.webrtcPlayer.startPlay(t.src),this.tech.player().one("webrtcevent",function(t){-1002===t.data.code&&e.tech.player().play()})},t.prototype.recovery=function(){var t=this,e=this.tech.player(),n=void 0;e.one("waiting",function(){n=setTimeout(function(){e.one("webrtcevent",function(n){if(1004===n.data.code){t.webrtcPlayer&&t.webrtcPlayer.startPlay(e.src()),e.play();var r=function i(t){1002===t.data.code&&(e.play(),e.off("webrtcevent",i))};e.on("webrtcevent",r)}}),t.webrtcPlayer&&t.webrtcPlayer.stopPlay()},2e3)}),e.one("playing",function(){n&&clearTimeout(n)})},t.prototype.switchPlaySource=function(){var t=this.tech.player(),e=void 0,n=this.tech.currentSource_.src;e=this.webrtcConfig&&this.webrtcConfig.fallbackUrl?[{src:this.webrtcConfig.fallbackUrl}]:[{src:(this.convertProtocol(n)||[])[0]}],t.trigger({type:"webrtcfallback",data:{target:e[0].src}}),t.options_.autoplay&&(t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide());var r=[];t.options_.hlsConfig&&t.options_.hlsConfig.skipHlsJs?e.forEach(function(t){t.src?r.push({src:t.src,skipHlsJs:!0}):r.push({src:t,skipHlsJs:!0})}):r=[].concat(e),reportLog({str_ext_content:"webrtc fallback: "+JSON.stringify(r),str_stream_url:t.cache_&&t.cache_.src}),t.src(r);var i=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata",o=function s(){t.options_.autoplay&&t.play(),t.one("progress",function(){t.options_.autoplay&&t.play(),t.off(i,s)})};t.on(i,o)},t.prototy
|