/*!
* JW Player
* Copyright (c) 2018, JW Player, All Rights Reserved
* This source code and its use and distribution is subject to the terms
* and conditions of the applicable license agreement.
* https://www.jwplayer.com/tos/
* This product includes portions of other software, see below.
*
*************************************************************************************************
The following software is used under MIT license
*************************************************************************************************
* AlloyFinger v0.1.10
* Copyright (c) 2016 腾讯 AlloyTeam
* https://github.com/AlloyTeam/AlloyFinger/blob/master/LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
!function(e){function t(a){if(i[a])return i[a].exports;var n=i[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,a){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,i){var a=i(10);"string"==typeof a&&(a=[["all-players",a,""]]),i(12).style(a,"all-players"),a.locals&&(e.exports=a.locals)},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,i){"use strict";function a(e){return JSON.parse(e.responseText)}function n(e){var t=void 0;try{if(e.responseXML&&e.responseXML.firstChild){var i=we.rssparser.parse(e.responseXML.firstChild);t=we.extend({playlist:i},i.feedData)}else t=a(e),ue.isArray(t)&&(t={playlist:t})}catch(e){t=null}return t}function r(e){var t=e.selectedItem,i=e.feedData,a=e.autoplayTimeout,n=e.onClick,r=e.interactionMethod,l=r,o="auto"===l;o||(l="play"===n?"manual":"link");var s={item:t,feedData:i,auto:o,autoplaytimer:a>=0?a:-1,position:t.index,method:l};return t.pin_set_id&&(s.pin_set_id=t.pin_set_id),s}function l(e){return{playlist:e.relatedItems,feedData:e.feedData}}function o(e,t){var i=t.relatedItems,a=t.feedData,n=t.relatedFile,r=t.interactionMethod,l={visible:e,method:r};return e&&(l.feed=n,l.items=i,l.autoplay="autoplay"===ve.oncomplete,l.feedData=a),l}function s(e){var t=e.type,i=e.actionType,a=e.interactionMethod,n=e.autoplay,r=e.autoplayTimeout,l=e.feedData,o=e.page,s=e.pages,d=s.current,c=s.nextUp,u=e.centeredItem,m=e.smallPlayer,j=e.itemsPerPage,f=e.ui,g=a;"PAGED"!==i&&"PAGED_SWIPE"!==i&&"RESIZED"!==i||(g=i.toLowerCase());var y=c&&n&&"complete"===a,v=w(o,c,d);return m&&(o=p(o,u,v.length,j),v=[v[u]]),{mode:h(t),feedData:l,itemsShown:v,page:o,reason:g,autoTimer:y&&r>=0?r:-1,ui:f}}function d(e){var t=e.type,i=e.selectedItem,a=e.feedData,n=e.page,r=e.pages,l=r.current,o=r.nextUp,s=e.centeredItem,d=e.smallPlayer,c=e.itemsPerPage,u=e.lastReasonShown,m=e.ui,j=u.toLowerCase(),f=w(n,o,l);return d&&(n=p(n,s,f.length,c),f=[i]),{mode:h(t),feedData:a,itemsShown:f,reason:j,target:i,index:f.indexOf(i)+1,page:n,ui:m}}function p(e,t,i,a){return e<0?(e+1)*a-(i-t):t+e*a}function c(e){var t=e.type,i=e.selectedItem,a=e.feedData,n=e.page,r=e.pages,l=r.current,o=r.nextUp,s=e.smallPlayer,d=e.ui,p=s?[i]:w(n,o,l);return{mode:h(t),feedData:a,itemsShown:p,target:i,ui:d}}function h(e){return"related"===e?"discovery":e}function w(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=i.slice(0);return 0===e&&a.unshift(t),a}function u(){return{}}function m(e,t){var i=new _e(e);return i.add(t),i}function j(e){return e?' style="background-image: url('+e+')"':""}function f(e){return e?' style="background-image: url('+e+')"':""}function g(){Ne=he.utils,qe=Ne.UI}function y(e,t){var i="left"===e?Ae.a:Se.a,a=x("jw-related-page jw-related-page-"+e,i);return a.setAttribute("aria-label","Page "+e),_(a,t,e),a}function v(e,t,i){var a=x("jw-related-close",i?Re.a:De.a,t,i);return a.setAttribute("aria-label",e),a}function x(e,t,i,a){var n=document.createElement("div");return n.className="jw-reset jw-icon jw-icon-inline "+e+(a?"":" jw-button-color"),n.appendChild(C(t)),n.setAttribute("role","button"),n.setAttribute("tabindex","0"),_(n,i),n}function b(e,t){return P(Ne.createElement(Oe(e)),e,t)}function k(e,t,i){var a=Ne.createElement(Ve(e));return a.setAttribute("data-jw-index",i),P(a,e,t)}function E(e,t,i){if(e){return P(Ne.createElement(Be(e,t)),e,i)}}function _(e,t,i){t&&(new qe(e).on("click tap enter",function(e){t(i||e)},{directSelect:!0}),e.addEventListener("mousedown",function(e){e.preventDefault()}))}function P(e,t,i){return e.setAttribute("aria-label","Video - "+t.title||"Untitled Video"),_(e,i,t),e}function C(e){return He||(He=new DOMParser),He.parseFromString(e,"image/svg+xml").documentElement}function I(e){if(e){var t=e.getBoundingClientRect(),i=2*t.height+2*t.width;e.style.strokeDasharray=i,e.style.strokeDashoffset=i}}function A(e,t,i,a){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=t*i+a,l=n?S(i):0,o=void 0;if(0===t){var s=function(t,i){return L(e,t,i)};o={previous:s(r-i,r),current:s(r+1,i+r-l),next:s(i+r-l,2*i+r-l)}}else o=t>0?D(e,i,r-l):D(e,i,r);return o}function T(e,t){if("shelf"===e)switch(t){case 7:case 6:case 5:return 5;case 4:return 4;case 3:case 2:return 3;case 1:case 0:default:return 0}switch(t){case 7:case 6:case 5:case 4:return 9;case 3:return 6;case 2:return 4;case 1:case 0:return 5;default:return 1}}function S(e){switch(e){case 9:return 2;case 6:case 4:return 1;default:return 0}}function L(e,t,i){return e.slice(Math.max(0,t),Math.max(0,i))}function D(e,t,i){return{previous:L(e,i-t,i),current:L(e,i,t+i),next:L(e,t+i,2*t+i)}}function M(e,t){return e.smallPlayer?R(e.centeredItem,e.page,e.pages,t):z(e.page,t)}function R(e,t,i,a){var n=i.current.length+1*(0===t&&!!i.nextUp);return"right"===a?++e>=n&&(e=0,t++):--e<0&&(e=i.previous.length-1,t--),{centeredItem:e,page:t}}function z(e,t){return{page:"right"===t?e+1:e-1}}function U(e,t,i){var a=e.nextUp,n=a?a.index:0,r=A(e.items,t,i,n);return r.nextUp=e.nextUp,r}function O(e){return e?st.createElement(e).textContent:""}function V(e){return dt.map(e,function(e,t){var i=e,a=i.duration;return(dt.isNumber(a)&&a>0||dt.isString(a)&&a.indexOf(":")<0)&&(i.duration=st.timeFormat(a)),i.index=t,i.indexText=t+1+". ",i.title=O(i.title),i})}function B(e,t){return dt.extend({},e,t)}function H(e){var t=Array.isArray(e.sources)&&e.sources[0]||{};return e.mediaid||e.file||t.file}function N(e,t){return e.filter(function(e){var i=Array.isArray(e.sources)&&e.sources[0]||{};return e.image&&e.title&&("play"===t&&(i.file||e.file)||"play"!==t&&e.link)})}function q(e){return e.map(function(e,t){var i=e;return i.duration=i.duration?mt.timeFormat(i.duration):"",i.index=t,i})}function F(e){return(e||[]).map(function(e){return H(e)})}function Y(e,t){return e.filter(function(e){return-1===t.indexOf(H(e))})}function G(e){return"overlay"===e.ui?0:e.page}function X(e,t,i){var a=A(e.availableItems,t,i,0,"overlay"===e.ui);return a.nextUp=e.nextUp,a}function W(e,t){return gt.extend({},e,t)}function J(e){var t=e.loadPromise;if(t){var i=this;return void t.then(function(e){Z.call(i,e)}).catch(function(){i.destroyInterface()})}Z.call(this,e.controls)}function Z(e){e?K.call(this):Q.call(this)}function K(){this.div||(this.div=this.player.getContainer().querySelector(".jw-button-container")),this.div&&this.shelfContainer&&this.div.appendChild(this.shelfContainer)}function Q(){this.div&&this.shelfContainer&&(this.div.removeChild(this.shelfContainer),this.div=null)}function $(e,t,i,a,n){var r=Math.max(0,a),l=Math.min(t.length,n),o=e.childNodes;if(o.length)te(e,r,l),function(a){var n=o[0];if(n)for(var r=parseInt(n.getAttribute("data-jw-index")),l=a;l=i||void 0===t)&&e.removeChild(a[n])}}function ie(e,t,i){function a(e){if(e)switch(e.keyCode){case 39:n(t,e),e.stopPropagation();break;case 37:r(t,e),e.stopPropagation()}}function n(e,t){!j&&b&&(0===y?m.removeClass(u,"jw-related-shelf-start"):m.addClass(u,"jw-related-shelf-slide-next"),y++,l(t),e("right"))}function r(e,t){!j&&k&&(1===y?m.addClass(u,"jw-related-shelf-start"):m.addClass(u,"jw-related-shelf-slide-prev"),y--,l(t),e("left"))}function l(e){E=o.bind(this,e),u.addEventListener("transitionend",E),m.addClass(u,"jw-related-shelf-animating"),j=!0}function o(e,t){if(t.target===u){if(t.stopImmediatePropagation(),u.removeEventListener("transitionend",E),j){s((y-1)*f,(y+2)*f),m.removeClass(u,["jw-related-shelf-animating","jw-related-shelf-slide-next","jw-related-shelf-slide-prev"]),j=!1;var i=u.querySelector(".jw-related-item-visible");e&&("enter"===e.type||"keydown"===e.type)&&i&&i.focus()}p()}}function s(e,t){if(v&&!(v.length<1)){$(u,v,g,e,t);for(var i=u.children,a=0;a=y*f&&r<(y+1)*f;m.toggleClass(n,"jw-related-item-visible",l),n.setAttribute("tabindex",l?"0":"-1")}}}function d(){ee(u),y=null}function p(){k=0!==y,m.toggleClass(h,"jw-off",!k),h.setAttribute("tabindex",k?"0":"-1"),b=y!==x-1,m.toggleClass(w,"jw-off",!b),w.setAttribute("tabindex",b?"0":"-1")}var c=this,h=e.querySelector(".jw-related-control-left"),w=e.querySelector(".jw-related-control-right"),u=e.querySelector(".jw-related-shelf-items"),m=he.utils,j=!1,f=void 0,g=void 0,y=void 0,v=void 0,x=void 0,b=!1,k=!1,E=void 0;this.load=function(e,t,i){f=t,g=i,d(),v=e,x=Math.ceil(e.length/f),c.scrollToFirstPage()},this.resize=function(e){if(e!==f&&v&&!(v.length<1)){var t=x>1&&y===x-1;f=e,x=Math.ceil(v.length/f),y=t?x-1:Math.min(y,x),s((y-1)*f,(y+2)*f),p(),0===y&&m.addClass(u,"jw-related-shelf-start")}},this.onShelfToggled=function(t){e.removeEventListener("keydown",a),t&&e.addEventListener("keydown",a)},this.enableSwipe=function(){return new Ce(u,{swipe:function(e){"Left"===e.direction?n(i):r(i)}})},this.scrollToFirstPage=function(){0===y||!v||v.length<1||(y=0,s(0,2*f),m.addClass(u,"jw-related-shelf-start"),p())},_(h,r.bind(this,t)),_(w,n.bind(this,t))}function ae(e,t){var i=e.pages.current.length+1*(0===e.page&&!!e.pages.nextUp);return e.smallPlayer&&0===e.actionType.indexOf("PAGED")&&e.centeredItem!==t.centeredItem&&e.centeredItem<=i&&t.page===e.page}function ne(e){clearTimeout(e.loadFeedsIdleTimeout),e.player_.off("play",e.loadFeeds,e)}function re(e,t){return e?Ut.extend({},e,t):null}function le(e,t){if(!e)return"api";var i=void 0;switch(e.type){case"click":case"tap":i="interaction"+(t?"_more":"");break;case"enter":case"escape":case"adBreak":i=e.type;break;case"pause":"interaction"===e.pauseReason&&(i="on_pause");break;case"playlistComplete":i="complete"}return i}function oe(e,t){var i=null;return e&&(e.indexOf("MEDIAID")>=0?t&&(i=e.replace("MEDIAID",t)):i=e),i}function se(e,t){var i={},a=function(e){return function(){t.dispatch(e.apply(null,arguments))}};return Ut.each(Ut.keys(e),function(t){i[t]=a(e[t])}),i}function de(e,t){var i={actionType:!0,interactionMethod:!0,pages:!0};return Ut.every(Ut.keys(e),function(a){return!!i[a]||e[a]===t[a]})}function pe(e,t){var i={feed:oe(e.recommendations,e.mediaid),recommendation:oe(t.recommendations,e.mediaid),file:oe(t.file,e.mediaid)};return i.isValid=i.feed||i.recommendation||i.file,i}Object.defineProperty(t,"__esModule",{value:!0});var ce={};i.d(ce,"cached",function(){return We}),i.d(ce,"close",function(){return Je}),i.d(ce,"open",function(){return Ze}),i.d(ce,"loaded",function(){return Ke}),i.d(ce,"loadFailed",function(){return Qe}),i.d(ce,"loading",function(){return $e}),i.d(ce,"page",function(){return et}),i.d(ce,"scroll",function(){return tt}),i.d(ce,"resize",function(){return it}),i.d(ce,"resetPagePosition",function(){return at}),i.d(ce,"selectItem",function(){return nt}),i.d(ce,"setupRelated",function(){return rt}),i.d(ce,"setupPlaylist",function(){return lt}),i.d(ce,"uiChanged",function(){return ot});var he={},we=void 0,ue=void 0,me=function(e){we=he.utils,ue=he._,this.currentRequest=null,this.requestOptions=e};me.prototype.load=function(e,t,i,a){var r=this;this.currentRequest&&this.abort();var l=function(e){if(r.currentRequest=null,r.lastResponseText===e.responseText)return void a();var l=n(e);if(l){r.lastResponseText=e.responseText;var o=l.playlist,s=ue.extend({},l);delete s.playlist,t(o,s,e.responseURL)}else r.lastResponseText=null,i("Playlist is not valid")},o=this.requestOptions;if(o&&o.queryParams){var s=Object.keys(o.queryParams).map(function(e){return e+"="+o.queryParams[e]});e=e+(e.indexOf("?")?"&":"?")+s}this.currentRequest=we.ajax(e,l,i)},me.prototype.loadRecommendation=function(e,t,i,a,r){var l=this;this.currentRequest&&this.abort();var o=function(e){l.currentRequest=null;var o=n(e);if(!o)return void a();var s=o.file||t;if(s){var d=function(e,t,a){i(e,t,a,o.params)};l.load(s,d,a,r)}else a(o)};this.currentRequest=we.ajax(e,o,a)},me.prototype.clearCache=function(){this.lastResponseText=null},me.prototype.abort=function(){this.currentRequest.onload=null,this.currentRequest.onreadystatechange=null,this.currentRequest.onerror=null,this.currentRequest.abort&&this.currentRequest.abort(),this.currentRequest=null,this.lastResponseText=null};var je=me,fe=function(e){this.subscribers=[],this.reducer=e,this.state=e(void 0,{})};fe.prototype.dispatch=function(e){var t=this;setTimeout(function(){var i=t.state;t.state=t.reducer(t.state,e),t.subscribers.forEach(function(e){e(t.state,i)})},0)},fe.prototype.subscribe=function(e){this.subscribers.push(e)},fe.prototype.getState=function(){return this.state},fe.prototype.getReducer=function(){return this.reducer},fe.prototype.replaceReducer=function(e){var t=this;setTimeout(function(){t.reducer=e},0),this.dispatch({type:"REDUCER_REPLACED"})};var ge=fe,ye=void 0,ve=void 0,xe=function(e){ye=he._,ve=e};xe.prototype.createEventData=function(e,t){var i=void 0;switch(e){case"setup":i=u();break;case"play":i=r(t);break;case"playlist":i=l(t);break;case"open":i=o(!0,t);break;case"close":i=o(!1,t);break;case"feedShown":i=s(t);break;case"feedClick":i=d(t);break;case"feedAutoAdvance":i=c(t);break;default:i={}}return t.relatedFile&&(i.relatedFile=t.relatedFile),t.recommendationParams&&(i=ye.extend(i,t.recommendationParams)),i.onclick="play"===t.onClick?"play":"link",i};var be=xe,ke=function(){this.timer=null,this.interval=null};ke.prototype.start=function(e,t,i,a){var n=this;this.timer=window.setTimeout(function(){n.clear(),i(e)},1e3*t);var r=t;this.interval=window.setInterval(function(){a(Math.max(0,r-=1))},1e3),a(Math.max(0,t))},ke.prototype.clear=function(){window.clearTimeout(this.timer),window.clearInterval(this.interval)};var Ee=ke,_e=function(e){this.handlers=[],this.el=e};_e.prototype.add=function(e){this.handlers.push(e)},_e.prototype.del=function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)},_e.prototype.dispatch=function(){for(var e=0,t=this.handlers.length;e1){var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y}e.preventDefault()}},move:function(e){if(e.touches){var t=this.preV,i=e.touches.length,a=e.touches[0].pageX,n=e.touches[0].pageY;if(i>1){var r=e.touches[1].pageX,l=e.touches[1].pageY,o={x:e.touches[1].pageX-a,y:e.touches[1].pageY-n};t.x=o.x,t.y=o.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(a-this.x2+r-this.sx2)/2,e.deltaY=(n-this.y2+l-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.sx2=r,this.sy2=l}else null!==this.x2?(e.deltaX=a-this.x2,e.deltaY=n-this.y2):(e.deltaX=0,e.deltaY=0);this.touchMove.dispatch(e),this.x2=a,this.y2=n,i>1&&e.preventDefault()}},end:function(e){if(e.changedTouches){var t=this;(this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30)&&(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout(function(){t.swipe.dispatch(e)},0)),this.touchEnd.dispatch(e),this.preV.x=0,this.preV.y=0,this.x1=this.x2=this.y1=this.y2=null}},cancelAll:function(){clearTimeout(this.swipeTimeout)},cancel:function(e){this.cancelAll(),this.touchCancel.dispatch(e)},_swipeDirection:function(e,t,i,a){return Math.abs(e-t)>=Math.abs(i-a)?e-t>0?"Left":"Right":i-a>0?"Up":"Down"},on:function(e,t){this[e]&&this[e].add(t)},off:function(e,t){this[e]&&this[e].del(t)},destroy:function(){return this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.swipe.del(),this.delta=null,this.last=null,this.now=null,this.preV=null,this.swipe=null,this.swipeTimeout=null,this.touchStart=null,this.touchMove=null,this.touchEnd=null,this.touchCancel=null,this.x1=null,this.x2=null,this.y1=null,this.y2=null,null}};var Ce=Pe,Ie=i(1),Ae=i.n(Ie),Te=i(2),Se=i.n(Te),Le=i(6),De=i.n(Le),Me=i(7),Re=i.n(Me),ze=i(3),Ue=i.n(ze),Oe=function(e){var t=e.indexText,i=void 0===t?"":t,a=e.image,n=void 0===a?"":a,r=e.duration,l=void 0===r?"":r,o=e.title,s=void 0===o?"":o;return'