/g,">").replace(/'/g,"'").replace(/"/g,"""):""},type:function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=/\[object (\w+)\]/.exec(Object.prototype.toString.call(e));return t?t[1].toLowerCase():""},keys:function(e){var t=[];return e?Object.keys?Object.keys(e):(this.objEach(e,(function(e){t.push(e)})),t):t},bind:function(e,t){return e.bind?e.bind(t):function(){return e.apply(t,arguments)}},extend:function(e){if("object"!=this.type(e)&&"function"!=this.type(e))return e;for(var t,n,o=1,r=arguments.length;o=3)n=arguments[2];else for(;;){if(r in e){n=e[r++];break}if(++r>=i)throw new TypeError("reduceRight of empty array with no initial value")}for(;r=2?n[1]:null,arguments)}},verCompare:function(e,t){if(e===t)return 0;e=e.split("."),t=t.split(".");for(var n=e.length>=t.length?e.length:t.length,i=0;n--;){var o=Number(e[i]||0),r=Number(t[i++]||0);if(r>o)return 1;if(r0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=f.bind(i);return o.listener=n,i.wrapFn=o,o}function h(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=g(c,u);for(n=0;n=0;r--)if(n[r]===t||n[r].listener===t){a=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){var i=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",r=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,r=Object.create(o.prototype),a=new k(i||[]);return r._invoke=function(e,t,n){var i="suspendedStart";return function(o,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw r;return q()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),r}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function d(){}function f(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==t&&n.call(g,o)&&(h=g);var y=p.prototype=d.prototype=Object.create(h);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var i;this._invoke=function(o,r){function a(){return new t((function(i,a){!function i(o,r,a,s){var c=u(e[o],e,r);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}(o,r,i,a)}))}return i=i?i.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,l;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";e.exports={set:function(e,t,n,i,o){if(o){var r=new Date,a=new Date;a.setTime(r.getTime()+36e5*o)}return document.cookie=e+"="+t+"; "+(o?"expires="+a.toGMTString()+"; ":"")+(i?"path="+i+"; ":"path=/; ")+(n?"domain="+n+";":"domain="+window.location.host+";"),!0},get:function(e,t){var n=new RegExp("(?:^|;+|\\s+)"+e+"=([^;]*)"),i=(t||document.cookie).match(n);return i?i[1]:""},del:function(e,t,n){var i=new Date;i.setTime(i.getTime()-1),document.cookie=e+"=; expires="+i.toGMTString()+";"+(n?"path="+n+"; ":"path=/; ")+(t?"domain="+t+";":"domain="+window.location.host+";")}}},function(e,t,n){var i,o=n(4),r=n(1),a=new o;function s(){if(window.Promise)return window.Promise;var e=function(){return{then:t}},t=function(){return console.error("[tvbridge] 该浏览不支持Promise"),new e};return e.resolve=t,e.resolve=t,e}var c=window.external,u=c&&c.CallHandler;if(u){if(!window.qqliveNotifyRegistered){var l=window.QQLive_OnObserve;window.QQLive_OnObserve=function(e,t){var n=t;if("string"==typeof t)try{n=JSON.parse(t)}catch(e){n=t}a.emit("qqlive:"+e,n),l&&l.apply(window,arguments)},window.qqliveNotifyRegistered=!0}i={callHandler:function(e,t,n){setTimeout((function(){var i;try{i=c.CallHandler.call(c,e,JSON.stringify(t))}catch(e){return void(n&&n(null,e))}try{i=JSON.parse(i)}catch(e){return void(n&&n(i))}"object"==typeof i&&n&&n(i)}))},on:function(e,t){t&&(window.external.AddObserver(e),a.on("qqlive:"+e,t))},off:function(e,t){a.off("qqlive:"+e,t)}},a.emit("ready",i)}else{var d=function(){var e=window.TenvideoJSBridge;e&&(i={callHandler:function(t,n,i){return e.callHandler?e.callHandler(t,n,i):e.invoke?e.invoke(t,n,i):void 0},on:function(t,n){if(n){var i=function(e){if(e&&"string"==typeof e)try{e=JSON.parse(decodeURIComponent(e))}catch(e){}return n(e)};if(e.registerHandler)return e.registerHandler(t,i);if(e.on)return e.on(t,i)}},off:function(){}})};d(),i||document.addEventListener("onTenvideoJSBridgeReady",(function(){d(),a.emit("ready",i)}),!1)}var f={on:function(e,t){switch(e){case"ready":return f.ready(t);default:f.ready().then((function(n){n.on(e,t)}))}},off:function(e,t){f.ready().then((function(n){n.off(e,t)}))},listen:function(e,t){var n;return f.on("onMessage",(function(i){n||i.type===e&&t&&t(i.data)})),function(){n=!0}},notify:function(e,t){return f.invoke("message",{type:e,data:t})},invoke:function(e,t,n){return"function"==r.type(t)&&(n=t,t=void 0),n=r.once(n||p),new(s())((function(i){f.ready((function(o){o.callHandler(e,t,(function(e){if(e&&"string"==typeof e)try{e=JSON.parse(t&&t.$$skipDecode?e:decodeURIComponent(e))}catch(e){}try{n(e)}finally{i(e)}}))}))}))},ready:function(e){return e=r.once(e||p),new(s())((function(t){function n(n){try{e(n)}finally{t(n)}}if(i)n(i);else{var o;o=a.on("ready",(function(e){o&&o(),o=null,n(e)}))}}))},play:function(e,t){return f.invoke("play",e,t)}};function p(){}e.exports=f},function(e,t){var n="main";e.exports={setToPlayer:function(){n="player"},get:function(){return n||""},set:function(e){n=e}}},function(e,t){var n=navigator.userAgent;e.exports={win:/windows/i.test(n),mac:/mac/i.test(n)}},function(e){e.exports=JSON.parse('{"_from":"@tencent/video-interact-bridge@7.4.16","_id":"@tencent/video-interact-bridge@7.4.16","_inBundle":false,"_integrity":"sha1-r4K5Ig/ejfyZznFkjnv7Mrrxip4=","_location":"/@tencent/video-interact-bridge","_phantomChildren":{"ms":"2.0.0"},"_requested":{"type":"version","registry":true,"raw":"@tencent/video-interact-bridge@7.4.16","name":"@tencent/video-interact-bridge","escapedName":"@tencent%2fvideo-interact-bridge","scope":"@tencent","rawSpec":"7.4.16","saveSpec":null,"fetchSpec":"7.4.16"},"_requiredBy":["/"],"_resolved":"https://mirrors.tencent.com/npm/@tencent/video-interact-bridge/download/@tencent/video-interact-bridge-7.4.16.tgz","_shasum":"af82b9220fde8dfc99ce71648e7bfb32baf18a9e","_spec":"@tencent/video-interact-bridge@7.4.16","_where":"/Users/matianyu/project/iv_pages","author":{"name":"aprilcai"},"bundleDependencies":false,"config":{"ghooks":{"pre-commit":"npm run lint","commit-msg":"validate-commit-msg"},"validate-commit-msg":{"types":["feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"],"scope":{"required":false,"allowed":["*"],"validate":false,"multiple":false},"warnOnFail":false,"maxSubjectLength":100,"subjectPattern":".+","subjectPatternErrorMsg":"subject does not match subject pattern!","helpMessage":"","autoFix":false}},"dependencies":{"@tencent/merge-boss":"^1.0.0","@tencent/peckerjs":"0.0.4","@tencent/txmv-core":"^2.1.14","@tencent/txv-client-common":"^1.1.2","@tencent/vfe-deploy":"^3.0.0","@tencent/video-interact-report":"^1.1.20","axios":"^0.19.0","es6-promise":"^4.2.8","nosleep.js":"^0.9.0","object.assign":"^4.1.0","qrcode":"^1.4.4","qs":"^6.7.0","url":"^0.11.0"},"deprecated":false,"description":"互动视频工具APP Bridge,包含对腾讯视频APP内的JSApi和后台接口封装。包括APP内分享、摄像头和震动等能力,获取用户互动信息等接口","devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-env":"^1.7.0","colors":"^1.4.0","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.17.3","ghooks":"^2.0.4","http-server":"^0.12.1","qrcode-terminal":"^0.12.0","validate-commit-msg":"^2.14.0","vfe-deploy":"^2.2.0","webpack":"^4.34.0","webpack-cli":"^3.3.4"},"keywords":[],"license":"ISC","main":"src/api/api.js","name":"@tencent/video-interact-bridge","repository":{"type":"git","url":"http://git.code.oa.com/video_iv_platform/video-interact-bridge.git"},"scripts":{"dev":"node .build/build.js","h":"node .build/echohelp.js","lint":"npx eslint ./src/**/*.js --fix","prod":"node .build/build.prod.js","test":"node .build/deploy.js -e dev -t example","test:218":"node .build/deploy.js -e test -t example"},"version":"7.4.16"}')},function(e,t,n){"use strict";var i,o,r=n(5),a=n(16),s=n(1),c=n(18),u=new(n(4)),l={appid:"wxca942bbff22e0e51"},d={img:"",title:document.title,content:document.title,link:location.href},f={show:_,hide:_};function p(){var e=s.extend({link:location.href},d,i);return{title:e.title,subTitle:e.content,singleTitle:e.title,content:e.content,contentTail:"",imageUrl:e.img,url:e.link||window.location.href,style:1,picList:[]}}function h(e){var t;window.TenvideoJSBridge.invoke("setMoreInfo",{hasRefresh:!1,hasShare:!0,hasFollow:!1,shareInfo:(t=s.extend({link:location.href},d),{title:t.title,subTitle:t.content,singleTitle:t.title,content:t.content,contentTail:"",imageUrl:t.img,url:t.link||window.location.href,style:1,picList:[]})},(function(){e&&e()}))}function v(e){return{hasRefresh:!1,hasShare:!0,hasFollow:!1,shareInfo:e}}function g(e){window.mqq?e():u.on("share:qqready",e)}function y(){g((function(){var e={title:(i.title||"").slice(0,45),desc:(i.content||"").slice(0,60),share_url:i.link,image_url:i.img||""};mqq.data.setShareInfo(e,(function(){console.log("[@tencent/share] setQQShareInfo",e)}))}))}function m(e,t){var n;if(u.emit("share"),t=t||_,i=s.extend({_isSharedOnce:!0},d,e),console.log("[Share] Info:",i),i.callback=function(){n||(n=!0,i=null,t.apply(this,arguments))},r.isQQ())clearTimeout(b),y(),mqq.ui.showShareMenu(),b=setTimeout((function(){i&&i.callback&&i.callback()}),1e4);else if(r.isWX()){f.show();var o=i.callback;i.callback=function(){f.hide(),o.apply(this,arguments)}}else r.isQQLive()&&c.ready((function(){var e=p(),t=window.TenvideoJSBridge;t.invoke("setMoreInfo",v(e),(function(){t.invoke("openToolsDialog",void 0,(function(){n||(!0,setTimeout((function(){i&&i.callback&&i.callback()}),500))}))}))}))}if(document.addEventListener("WeixinJSBridgeReady",(function(){function e(e,t){u.emit("share");var n=function(){var e=s.extend({link:location.href},d,i);return{appid:l.appid,img_url:e.img||"",img_width:"120",img_height:"90",link:e.link||"",desc:e.content||"",title:e.title}}(),o=(i||{}).callback||_;window.WeixinJSBridge.invoke(e,n,(function(e){try{o()}finally{u.emit("share:success",{type:t})}}))}window.WeixinJSBridge.on("menu:share:timeline",e.bind(null,"shareTimeline","timeline")),window.WeixinJSBridge.on("menu:share:appmessage",e.bind(null,"sendAppMessage","appmessage")),window.WeixinJSBridge.on("menu:share:qq",e.bind(null,"shareQQ","qq")),window.WeixinJSBridge.on("menu:share:weiboApp",e.bind(null,"shareWeiboApp","weiboApp")),window.WeixinJSBridge.on("menu:share:QZone",e.bind(null,"shareQZone","QZone"))})),c.ready((function(){window.TenvideoJSBridge.on("onShareFinish",(function(e){try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}var t=0==e.errCode;try{o&&h()}finally{t&&u.emit("share:success",{type:""})}})),window.TenvideoJSBridge.on("onToolsDialogShow",(function(){u.emit("share")})),window.TenvideoJSBridge.on("onToolsDialogClose",(function(){o&&h()}))})),m.setInfo=function(e){return i=s.extend({},d,e),r.isQQ()?y():r.isQQLive()?c.ready((function(){var e=p();window.TenvideoJSBridge.invoke("setMoreInfo",v(e),(function(){}))})):r.isWX(),m},m.config=function(e,t){return l[e]=t,m},m.defaultInfo=function(e){return e&&(d=s.extend({},d,e),o=!0,r.isQQLive()?c.ready((function(){h()})):r.isQQ()&&g((function(){var e={title:(d.title||"").slice(0,45),desc:(d.content||"").slice(0,60),share_url:d.link,image_url:d.img||""};mqq.data.setShareInfo(e,(function(){console.log("[@tencent/share] setQQDefaultShareInfo",e)}))}))),m},m.sign=function(){console.log("[Share] 请使用 @tencent/wxsign")},m.wxNotice=function(e,t){return e&&(f.show=e),t&&(f.hide=t),m},m.on=function(){return u.on.apply(u,arguments)},m.off=function(){return u.off.apply(u,arguments)},r.isQQ())var w=20,b=setInterval((function(){return window.mqq?(clearInterval(b),void u.emit("share:qqready")):w--<0?(console.log("[Share] poll fail."),clearInterval(b),void a("//open.mobile.qq.com/sdk/qqapi.js?_bid=152",(function(){window.mqq?u.emit("share:qqready"):console.log("[Share] load qqapi fail.")}))):void 0}),100);function _(){}e.exports=m},function(e,t,n){"use strict";var i=n(1),o=n(17),r={},a={},s=[],c=!1,u=/^(\b|http:|https:)\/\/vm\.gtimg\.cn/;function l(e){~i.indexOf(s,e)||(s.push(e),c||(c=!0,setTimeout((function(){c=!1;var e=[];function t(e,t){var n=a[e];!t&&(r[e]=!0),a[e]=null,i.forEach(n,(function(e){e&&e(t)}))}i.forEach(s,(function(n){!function(e){return u.test(e)}(n)?o(n,(function(e){t(n,e)})):e.push(n)})),s=[],e.length&&o(function(e){if(1==e.length)return e[0];var t="";return"file:"==location.protocol&&(t="http:"),t+"//vm.gtimg.cn/c/="+i.map(e,(function(e){return e.replace(u,"")})).join(",")}(e),(function(n){i.forEach(e,(function(e){t(e,n)}))}))}))))}function d(e,t){r[e]?t&&t():a[e]?a[e].push(t):(a[e]=[t],l(e))}d.load=o,e.exports=d},function(e,t,n){"use strict";var i=/^(complete|loaded)$/,o="undefined"!=typeof opera&&"[object Opera]"===opera.toString();function r(){}function a(e,t){return function(){e(t)}}e.exports=function(e,t,n){t=t||r;var s,c,u=(n=n||{}).timeout||3e4,l=function(){var e=document.createElement("script");return e.type="text/javascript",e.charset="utf-8",e.async=!0,e}();function d(e){("load"===e.type||i.test((e.currentTarget||e.srcElement).readyState))&&p(e)}function f(e){clearTimeout(c),s||(s=1,document.body.removeChild(l),t(e))}var p=a(f,null),h=a(f,"load script error: "+e),v=a(f,"load script timeout: "+e);return!l.attachEvent||l.attachEvent.toString&&l.attachEvent.toString().indexOf("[native code")<0||o?(l.addEventListener("load",d,!1),l.addEventListener("error",h,!1)):(l.attachEvent("onreadystatechange",d),l.attachEvent("onerror",h)),l.src=e,c=setTimeout(v,u),document.body.appendChild(l),l}},function(e,t,n){"use strict";var i=n(4),o=n(1),r=n(5),a=new i,s=!1;function c(){s||(s=!0,window.WebViewJavascriptBridge&&(window.TenvideoJSBridge=window.WebViewJavascriptBridge,window.TenvideoJSBridge.invoke=window.WebViewJavascriptBridge.callHandler,window.TenvideoJSBridge.on=window.WebViewJavascriptBridge.registerHandler),a.emit("qqlive:share:ready"))}function u(e){if(window.TenvideoJSBridge)return e(window.TenvideoJSBridge);a.on("qqlive:share:ready",(function(){e(window.TenvideoJSBridge)}))}document.addEventListener("onTenvideoJSBridgeReady",c),document.addEventListener("WebViewJavascriptBridgeReady",c),window.TenvideoJSBridge&&c(),r.isQQLive()&&function e(){window.TenvideoJSBridge?c():setTimeout(e,200)}(),u((function(e){e.on("onActionLoginFinish",(function(e){a.emit("qqlive:login:finish",e)})),e.on("actionLoginFinish",(function(e){a.emit("qqlive:login:finish",e)})),e.on("onActionLogoutFinish",(function(e){a.emit("qqlive:logout:finish",e)})),e.on("actionLogoutFinish",(function(e){a.emit("qqlive:logout:finish",e)}))})),e.exports={ready:u,invoke:function(e,t,n){u((function(i){i.invoke(e,t,(function(e){try{"string"==o.type(e)&&(e=JSON.parse(e))}catch(e){console.log(e)}n&&n(e)}))}))},getMainLogin:function(e){r.isIOS()?this.invoke("getMainLogin",null,e):this.invoke("getMainLoginType",null,e)},getUserInfo:function(e,t){return"string"==o.type(e)&&(e=[e]),this.invoke("getUserInfo",{type:e},t)},getCookie:function(e,t){return"string"==o.type(e)&&(e=[e]),this.invoke("getCookie",{type:e},t)},login:function(e,t){this.invoke("actionLogin",{type:e||"tv"},t||function(){})},changeAccount:function(){var e=this;a.off("qqlive:logout:finish"),e.invoke("actionLogin",{type:"tv"},(function(){}));var t,n,i=(t=function(t){a.off("qqlive:logout:finish",i),e.invoke("actionLogin",{type:"tv"},(function(){location.reload()}))},function(){n||(n=!0,t&&t.apply(this,arguments))});a.on("qqlive:logout:finish",i)}}},function(e,t,n){"use strict";n.r(t);n(8),n(9);var i=n(0),o=n.n(i);const{version:r}=n(14),a=navigator.userAgent,s=/android/i.test(a),c=s&&/qqlivebrowser/i.test(a),u=/qqlivebrowser/i.test(a)&&/mobile/i.test(a)||c,l=!u&&!/mobile/i.test(a)&&/qqlive/i.test(a),d=(l&&/mac/i.test(a),/ipad/i.test(a)&&/qqlivehdbrowser/i.test(a)),f=/Weibo/.test(a),p=/mobile/i.test(a)||f||c;/huawei/i.test(a),/tbs/i.test(a),p&&/micromessenger/i.test(a),p&&/\s+qq\//i.test(a);!function(){let e="",t=[];try{u||d?(t=/android/i.test(a)?/android\s+([0-9,\\.]+)/gi.exec(a):/iphone\s+os\s+([0-9,\\_]+)/gi.exec(a),e=Boolean(t)&&t.length>1?t[1].replace(/_/g,"."):""):(t=/mac/i.test(a)?/mac\s+os\s+x\s+([0-9,\\_]+)/gi.exec(a):/Windows[\s+\w+]?\s+?(\d+\.\d+)/gi.exec(a),e=Boolean(t)&&t.length>1?t[1].replace(/_/g,"."):"")}catch(t){e=""}}();let h=!1;function v(...e){h&&window.console.log("[bridgeHelper][Js-Bridge]: "+Math.round(performance.now()),...e)}const g=e=>{let t=e;if(t&&null!==t&&void 0!==e||(t={}),"0"!==t&&"1"!==t||(t={result:e}),"string"==typeof t)try{t=JSON.parse(t)}catch(e){t={}}return void 0!==t.errCode?t.errCode=+t.errCode:t.errCode=0,void 0===t.errMsg&&(t.errMsg="ok"),t},y={handlers:{},onceHandlers:{},on(e,t){const{handlers:n}=this;void 0===n[e]&&(n[e]=[]),n[e].push(t)},once(e,t){t.once=!0,this.on(e,t)},emit(e,t){const{handlers:n}=this;if(void 0!==n[e]){const i=n[e];for(let e=0,n=i.length;e{const e=window.TenvideoJSBridge;e.$once=(t,n)=>{v("once "+t);y.once(t,n),e.on(t,e=>{y.emit(t,g(e))})},e.$on=(t,n)=>{v("on "+t);y.on(t,n),e.on(t,e=>{y.emit(t,g(e))})},e.$invoke=(t,n,i)=>{v("invoke "+t,n);e.invoke(t,n,e=>{v("invokeResult: "+t,n,e);const o=g(e);"function"==typeof i&&i(o)},"fromh5"),/android/i.test(navigator.userAgent)&&"openUrl"===t&&setTimeout(()=>{i({errCode:0,errMsg:"ok"})})}};var w=e=>{l?(o.a.$on=(e,t)=>{o.a.on(e,n=>{v(`pc 回调触发 event=${e}, res=`,n),t(g(n))})},o.a.$invoke=(e,t,n)=>{o.a.invoke(e,t).then(i=>{v(`pc 执行 api=${e}, param=`,t,", res=",i),n&&n({code:0,msg:"ok",result:i})})},e(o.a)):window.TenvideoJSBridge?(m(),e(window.TenvideoJSBridge)):document.addEventListener("onTenvideoJSBridgeReady",()=>{m(),e(window.TenvideoJSBridge)},!1)},b=n(2),_=n.n(b);/ QQLiveBrowser\//.test(navigator.userAgent);const x=/MicroMessenger/gi.test(navigator.userAgent),k=!navigator.userAgent.match(/QQReader/)&&navigator.userAgent.match(/QQ\/(\d+\.\d+)/i)||navigator.userAgent.match(/V1_AND_SQ_([\d\.]+)/);function S(e){return new Promise(t=>{const n=document.getElementsByTagName("head")[0];let i=!1;const o=document.createElement("script");o.src=e,o.onload=o.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,t())},n.appendChild(o)})}function q(e,t){if(!e)return"";let n="";t&&Object.keys(t).forEach(e=>{n+=`${e}:${t[e]};`}),e.style.cssText=n}var L=n(3),T=n(6);const O={uri:"",metaId:"",nodeId:"",playerType:"tenvideoH5",bridgeType:"tenvideoWeb",containerId:"iv_page_container"},I={message:new T.EventEmitter,iv:null,duration:0,isEnd:!1,beforeInit:async()=>Object.assign(O,{uri:"tenvideo:///mzc002004sayt8h",playerInstance:""}),init:async({env:e,uri:t,metaId:n,nodeId:i,playerType:o,bridgeType:r,containerId:a,playerInstance:s})=>{let c="";try{const e=JSON.parse(localStorage.getItem("_iv_config_"));Math.abs(Date.now()-e.time)<3e4&&(c=e.tplid)}catch(e){}const u=await new Promise(l=>{const d={playerType:o,containerId:a,bridgeType:r,playerInstance:s,businessId:"6459",config:function(e,o){o=o||{uri:t,metaId:n,nodeId:i};return I.curl=e,new Promise((function(t,n){e({method:"POST",withCredentials:!0,headers:{"Content-Type":"application/json"},data:o,url:`https://${L.IV_HOST}/iv_service/get_interact_video`}).then((function(e){if(e&&!e.headers["trpc-ret"]){if(c){(e.data.interactVideo.componentList||[]).forEach(e=>{e.id===c&&(e.url=e.url.replace("/comps/","/tcomps/")+"?_="+Math.random())})}t(e.data.interactVideo),l(e.data.interactVideo.meta)}else{var i=e&&e.headers["trpc-error-msg"]?e.headers["trpc-error-msg"]:"error";n(new Error(i))}}))}))}};e&&(d.environment=e),I.iv=window.iv=new window.iv.InteractVideo(d);let f="";I.iv.on("beginPlay",()=>{I.iv.engine.on("interactInfoUpdate",async({id:e,extendConfig:t})=>{const n=I.iv.player;I.duration=await n.getDuration(),I.isEnd=t&&t.isEnd,I.curl({method:"POST",withCredentials:!0,headers:{"Content-Type":"application/json"},data:{metaId:u.id,nodeId:e,fromNodeId:f},url:`https://${L.IV_HOST}/iv_service/report_interact_video`}),f=e}),I.iv.player.on("timeupdate",e=>{I.message.emit("timeupdate",e)})}),I.iv.on("readyToPlay",(function(e){window.playBlocked=!0}))});return I.initStory(u),u},afterInit:async()=>{console.log("afterInit")},async initStory(e){const t=e.id,{data:n}=await new Promise(e=>{var n=new XMLHttpRequest;n.onload=t=>{if(4===n.readyState){if(200===n.status)return void e(JSON.parse(n.responseText));e({})}},setTimeout(()=>{e({})},3e3),n.open("GET",`https://v.qq.com/cache/wuji/object/${t}?appid=iv_platform&schemaid=ivstory_runtime_scripts&appkey=aca6c801296c4361a82e61238175ac9b`),n.send()});try{const e=n.jspath;e&&await S(e)}catch(e){console.warn("故事线配置加载失败,使用默认故事线")}if(!window.VideoInteractOverview)return void console.warn("没有故事线方法");const i=new window.VideoInteractOverview({mode:L.isTest?"test":void 0,el:"#overview",appId:"tivf67a158fc50a8b8",dramaId:t,source:"preview"===this.type?"preview":"",preview_session:this.session||"",type:this.type}),o=async()=>{const e=I.iv;if(e.bridge){if(e.bridge){const{result:{isLogin:t}}=await e.bridge.isLogin();if(!t)return e.player.pause(),void e.bridge.login()}this.message.emit("story>open"),i.show({noLogin:!1})}};this.message.on("player>storyClick",()=>{o(),iv.engine&&iv.engine.msg.emit("btnClick",{type:"story"})}),i.onClose(()=>{this.message.emit("story>close")}),i.onSelectView(e=>{const{branch_id:t}=e;I.iv.action({jump:t})}),I.iv.on("showInteract",()=>{this.message.emit("iv>show")}),I.iv.on("hideInteract",()=>{this.message.emit("iv>hide")});let r=!1;I.message.on("timeupdate",e=>{const t=I.isEnd&&e>I.duration-.3;t||(r=!1),t&&!r&&(r=!0,o())})}};var j=I;function E(e=window.location.href){const t={};return e.replace(/[?&](.+?)=([^]*)/g,(e,n,i)=>t[n]=decodeURIComponent(i)),t}E();const P=E();let C;const B=document.getElementById("backBtn");function Q(){let e=function(e){const t=document.documentElement.clientWidth,n=document.documentElement.clientHeight;let i;return t/n<=e?i=t:t/n>e&&(i=n*e),t-i}(1.77)/2;B.style.padding=`0 ${e}px`,B.style.display="block"}function M(){B.style.display="none"}var N=Object.assign({},j,{beforeInit:async()=>{const{cid:e}=P,t=await new Promise(async e=>{w(t=>{t?(t.$on("onStartToPlayInteractVideo",t=>{const{currentPlayVid:n}=t;e(n)}),t.$invoke("interactPageReady")):e("")})});let n=!1,i=!1,o=3;return j.message.on("iv>show",()=>{i=!0,w(e=>{e.$invoke("startFullScreenCountDown",{timeCount:o}),o=0}),Q()}),j.message.on("iv>hide",()=>{i=!1,M()}),w(e=>{if(e){let t;B.addEventListener("click",()=>{e.$invoke("backToSmallScreen"),e.$invoke("hideH5",{isShowControl:1})}),setTimeout(()=>{e.$on("onInteractStoryLineClick",()=>{j.message.emit("player>storyClick")})},1e3),j.message.on("story>open",async()=>{j.iv&&j.iv.player&&j.iv.player.getState&&(t=await j.iv.player.getState()),e.$invoke("showH5",null),e.$invoke("setPlayerState",!1)}),j.message.on("story>close",()=>{t&&"play"!==t||e.$invoke("setPlayerState",!0),i||e.$invoke("hideH5",{isShowControl:0})}),setTimeout(()=>{e.on("onQQVideoOrientation",async t=>{if(n=t>0,n)i&&(Q(),e.invoke("showH5"));else{M();-1===function(e,t){e=String(e).split("."),t=String(t).split(".");try{for(let n=0,i=Math.max(e.length,t.length);no)return 1}}catch(e){return-1}return 0}(await new Promise(async e=>{C?e(C):w(t=>{t.$invoke("getAppInfo",null,t=>{const{version:n}=t.result;C=n,e(C)})})}),"7.9.0")&&e.invoke("hideH5",{isShowControl:0})}})},1e3)}}),{uri:`tenvideo://${t}/${e}`,playerType:"tenvideoNative",bridgeType:"tenvideoWeb",containerId:"iv_page_container"}},afterInit:async()=>{window.iv.on("showBackBtn",(function(e){console.log("=====showBackBtn===="),Q()})),window.iv.on("hideBackBtn",(function(e){console.log("=====hideBackBtn====",e),M()}))}});let J;function R(){return!!new RegExp("lolapp").test(navigator.userAgent)}var A={share:{title:"互动视频",content:"一起来玩互动视频",img:"",link:window.location.href}};R()&&(console.log("初始化掌盟分享"),window.qtconfig=function(e){J=e;var t=`qtconfig://${e}?from=funplay&screen_direction=horizontal&share=${encodeURIComponent(JSON.stringify({share:["qq","wx","lolfriend","weibo"],sharetype:"url"}))}`;window.location.href=t},window.qtshare=function(e){const{share:t}=A,{title:n,content:i,img:o,link:r}=t;console.log("使用分享信息",A.share);const a={sharetype:"url",img_url:o,title:n,content:i,url:r,thumb_url:o,source:"iv"};window.location.href=`qtshare://${e}?title=${a.title}&content=${a.content}&thumb_url=${a.thumb_url}&url=${encodeURIComponent(a.url)}`},new RegExp("iPhone").test(navigator.userAgent)?(document.body.style.height=window.innerHeight-45+"px",document.body.style.overflow="hidden"):document.body.style.height=window.innerHeight+"px"),console.log("isZM",R);class V{constructor(){this.shareSDK=null,this.options=null}static getInstance(){return V.instance||(V.instance=new V)}async init(e){this.options=e,R()?(console.log("设置掌盟分享信息",e),function(e){console.log("设置掌盟分享信息",e),A.share=e}(e)):(k?await S("//res.wx.qq.com/open/js/jweixin-1.0.0.js"):x&&await S("//open.mobile.qq.com/sdk/qqapi.js?_bid=152"),this.shareSDK=n(15),this.shareSDK.sign({},e=>console.debug("share init failed"+e.message)),this.shareSDK.defaultInfo(e))}share(e){this.shareSDK(e||this.options)}}V.instance=null;const $=new V;var H=class{constructor(e){e&&(this.streamRatio=1.1,this.container=document.getElementById(e),this.onInit(),this.rotate())}onInit(){window.addEventListener("orientationchange",()=>{setTimeout(()=>{this.rotate()},100)}),window.addEventListener("resize",()=>{setTimeout(()=>{this.rotate()},100)})}rotate(e){this.streamRatio=e||this.streamRatio;const t=document.documentElement.clientWidth,n=document.documentElement.clientHeight,i=t>n;let o=!0;this.streamRatio&&(o=this.streamRatio>=1),o!==i?(this.container.cssText="",q(this.container,{width:n+2+"px",height:t+2+"px",top:Math.ceil((n-t)/2)+"px",left:0-Math.ceil((n-t)/2)+"px",transform:"rotate(90deg)","transform-origin":"50% 50%"})):q(this.container,{width:"100vw",height:"100vh",top:0,left:0,transform:"","transform-origin":""})}};const W=E();async function D(e){const t=e.id,{cid:n}=W,{data:i}=await new Promise(e=>{var n=new XMLHttpRequest;n.onload=t=>{if(4===n.readyState){if(200===n.status)return void e(JSON.parse(n.responseText));e({})}},setTimeout(()=>{e({})},3e3),n.open("GET",`https://v.qq.com/cache/wuji/object/${t}?appid=iv_platform&schemaid=ivstory_runtime_scripts&appkey=aca6c801296c4361a82e61238175ac9b`),n.send()}),{poster:o,playbtn:r,title:a,sharetitle:s,sharecontent:c,shareposter:u}=i||{},l=document.getElementsByClassName("btns-wrapper")[0],d=document.getElementsByClassName("play-btn")[0];o&&(l.style.backgroundImage=`url(${o})`,window.iv.bridge?window.iv.bridge.report({type:"expose",data:{reportkey:"hdsp_ready"+n,mod_id:"hdh5_ready",sub_mod_id:"",data_type:""}}):window.iv.on("bridgeReady",e=>{e.report({type:"expose",data:{reportkey:"hdsp_ready"+n,mod_id:"hdh5_ready",sub_mod_id:"",data_type:""}})})),r&&(d.src=r),d.addEventListener("click",()=>{window.iv.startPlay(),window.iv.bridge?window.iv.bridge.report({type:"click",data:{reportkey:"hdsp_start",mod_id:"hdh5_playicon",sub_mod_id:"",data_type:"button"}}):window.iv.on("bridgeReady",e=>{e.report({type:"click",data:{reportkey:"hdsp_start",mod_id:"hdh5_playicon",sub_mod_id:"",data_type:"button"}})})}),function(e){document.title=e||"",_.a.on("ready",()=>{document.title===e&&_.a.invoke("refreshTitle",{title:e||""})}),window.mqq&&window.mqq.ui&&window.mqq.ui.refreshTitle()}(a||""),console.log("取得分享信息",a,s,c,u);const f=u||o,p={title:s||a||"互动视频",content:c||"一起来玩互动视频",link:window.location.href,img:f.replace("https","http")};console.log("更新互动信息"),$.init(p)}function F(){document.getElementsByClassName("btns-wrapper")[0].style.display="flex"}const U={share:Object.assign({},j,{beforeInit:async()=>{const{cid:e,vid:t}=W;document.getElementById("iv_video_container").style.display="block";new H("iv_page_wrapper");var n=new Txiplayer({container:"#iv_video_container",enableUI:!0,forceRotate:!0,story:!0});n.on("storyClick",()=>{j.message.emit("player>storyClick")});let i={};n.on("statechange",e=>{i=e});let o="pause";return j.message.on("story>open",()=>{o=i.new,n.hideControl(),n.pause()}),j.message.on("story>close",()=>{"playing"===o&&"end"!==i.new&&"idle"!==i.new&&n.play()}),{uri:`tenvideo://${t}/${e}`,playerType:"tenvideoH5",bridgeType:"tenvideoWeb",containerId:"iv_page_container",playerInstance:n}},afterInit:async e=>{D(e),window.playBlocked&&F(),window.iv.on("readyToPlay",(function(e){console.log("=====readyToPlay===="),F()})),window.iv.on("beginPlay",(function(e){console.log("=====beginPlay====",e),document.getElementsByClassName("btns-wrapper")[0].style.display="none"})),window.iv.on("error",(function(e){console.log("=====error====",e)})),window.iv.on("showInteract",(function(e){console.log("互动层展示")})),window.iv.on("hideInteract",(function(e){console.log("互动层隐藏")}))}}),app:N};var G=n(7),K=n.n(G);window.regeneratorRuntime=K.a,function(){const{isNewInteract:e,interactType:t}=window.__STATE__.payloads;e.isNew?async function({type:e},t){const{beforeInit:n,init:i,afterInit:o}=U[e||"share"],r=await n();r.env=t,console.log("initInfo",r);const a=await i(r);console.log("meta info",a),await o(a)}(t,e.env):(console.log("初始化老互动"),console.log("bootIndex",bootIndex),window.bootIndex&&bootIndex())}()}]);