You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Video__Detail__id.2dc543...

5 lines
102 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[230,14],{"1ZF9":function(Xe,Me,i){Xe.exports=i.p+"static/Authorize.cc9c212f.png"},"96GE":function(Xe,Me,i){"use strict";i.r(Me),i.d(Me,"formatQuery",function(){return at});var lt=i("T2oS"),qe=i("W9HT"),Be=i("k1fw"),st=i("PpiC"),pe=i("q1tI"),f=i.n(pe),se=i("9kvl"),ct=i("JqQi"),dt=i.n(ct),Pe=i("5Dmo"),we=i("3S7+"),$e=i("+L6B"),ce=i("2/Rp"),ze=i("pC0b"),He=i("GzdX"),Ge=i("9og8"),Ye=i("tJVT"),it=i("nUhQ"),ye=i.n(it),de=i("2qtc"),Je=i("kLXV"),ft=i("7Kak"),Re=i("9yH6"),me=i("miYZ"),_e=i("tsqr"),Ae=i("5NDa"),re=i("5rEg"),nt=i("Ty5D"),N=i("sWEp"),rt=i.n(N),Ve=i("qdXH");function Ie(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ie=function(){return h};var _,h={},$=Object.prototype,D=$.hasOwnProperty,ve=Object.defineProperty||function(n,e,t){n[e]=t.value},Te=typeof Symbol=="function"?Symbol:{},ge=Te.iterator||"@@iterator",ke=Te.asyncIterator||"@@asyncIterator",Ue=Te.toStringTag||"@@toStringTag";function F(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{F({},"")}catch(n){F=function(t,r,a){return t[r]=a}}function Ne(n,e,t,r){var a=e&&e.prototype instanceof I?e:I,o=Object.create(a.prototype),l=new G(r||[]);return ve(o,"_invoke",{value:B(n,t,l)}),o}function Fe(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(r){return{type:"throw",arg:r}}}h.wrap=Ne;var ee="suspendedStart",M="suspendedYield",K="executing",V="completed",p={};function I(){}function ie(){}function T(){}var Le={};F(Le,ge,function(){return this});var R=Object.getPrototypeOf,J=R&&R(R(w([])));J&&J!==$&&D.call(J,ge)&&(Le=J);var E=T.prototype=I.prototype=Object.create(Le);function ne(n){["next","throw","return"].forEach(function(e){F(n,e,function(t){return this._invoke(e,t)})})}function k(n,e){function t(a,o,l,m){var P=Fe(n[a],n,o);if(P.type!=="throw"){var Oe=P.arg,le=Oe.value;return le&&typeof le=="object"&&D.call(le,"__await")?e.resolve(le.__await).then(function(xe){t("next",xe,l,m)},function(xe){t("throw",xe,l,m)}):e.resolve(le).then(function(xe){Oe.value=xe,l(Oe)},function(xe){return t("throw",xe,l,m)})}m(P.arg)}var r;ve(this,"_invoke",{value:function(o,l){function m(){return new e(function(P,Oe){t(o,l,P,Oe)})}return r=r?r.then(m,m):m()}})}function B(n,e,t){var r=ee;return function(a,o){if(r===K)throw new Error("Generator is already running");if(r===V){if(a==="throw")throw o;return{value:_,done:!0}}for(t.method=a,t.arg=o;;){var l=t.delegate;if(l){var m=fe(l,t);if(m){if(m===p)continue;return m}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===ee)throw r=V,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=K;var P=Fe(n,e,t);if(P.type==="normal"){if(r=t.done?V:M,P.arg===p)continue;return{value:P.arg,done:t.done}}P.type==="throw"&&(r=V,t.method="throw",t.arg=P.arg)}}}function fe(n,e){var t=e.method,r=n.iterator[t];if(r===_)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=_,fe(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var a=Fe(r,n.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,p;var o=a.arg;return o?o.done?(e[n.resultName]=o.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=_),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function X(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function b(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function G(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(X,this),this.reset(!0)}function w(n){if(n||n===""){var e=n[ge];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,r=function a(){for(;++t<n.length;)if(D.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=_,a.done=!0,a};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return ie.prototype=T,ve(E,"constructor",{value:T,configurable:!0}),ve(T,"constructor",{value:ie,configurable:!0}),ie.displayName=F(T,Ue,"GeneratorFunction"),h.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===ie||(e.displayName||e.name)==="GeneratorFunction")},h.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,T):(n.__proto__=T,F(n,Ue,"GeneratorFunction")),n.prototype=Object.create(E),n},h.awrap=function(n){return{__await:n}},ne(k.prototype),F(k.prototype,ke,function(){return this}),h.AsyncIterator=k,h.async=function(n,e,t,r,a){a===void 0&&(a=Promise);var o=new k(Ne(n,e,t,r),a);return h.isGeneratorFunction(e)?o:o.next().then(function(l){return l.done?l.value:o.next()})},ne(E),F(E,Ue,"Generator"),F(E,ge,function(){return this}),F(E,"toString",function(){return"[object Generator]"}),h.keys=function(n){var e=Object(n),t=[];for(var r in e)t.push(r);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},h.values=w,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(b),!e)for(var t in this)t.charAt(0)==="t"&&D.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(Oe,le){return l.type="throw",l.arg=e,t.next=Oe,le&&(t.method="next",t.arg=_),!!le}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=D.call(o,"catchLoc"),P=D.call(o,"finallyLoc");if(m&&P){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&D.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=_),p}},h}var et=re.a.Search,De=function(h){var $,D=h.videoDetail,ve=h.globalSetting,Te=h.loading,ge=h.dispatch,ke=Object(st.a)(h,["videoDetail","globalSetting","loading","dispatch"]),Ue=Object(nt.m)(),F=Object(nt.l)(),Ne=Object(pe.useState)([]),Fe=Object(Ye.a)(Ne,2),ee=Fe[0],M=Fe[1],K=Object(pe.useState)(""),V=Object(Ye.a)(K,2),p=V[0],I=V[1],ie=Object(pe.useState)(),T=Object(Ye.a)(ie,2),Le=T[0],R=T[1],J=Object(pe.useState)(!1),E=Object(Ye.a)(J,2),ne=E[0],k=E[1],B=Object(pe.useState)(!1),fe=Object(Ye.a)(B,2),X=fe[0],b=fe[1];Object(pe.useEffect)(function(){D.actionTabs.key==="Banner-SendToClass"&&G()},[D.actionTabs.key]);var G=function(){var t=Object(Ge.a)(Ie().mark(function r(){var a,o;return Ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,Object(Ve.h)({});case 2:if(o=m.sent,!(o==null||((a=o.courses)===null||a===void 0)?void 0:a.length)){m.next=8;break}M((o==null?void 0:o.courses)||[]),b(!0),m.next=11;break;case 8:return e(),_e.b.info("\u60A8\u5F53\u524D\u6CA1\u6709\u7BA1\u7406\u4EFB\u4F55\u8BFE\u5802\uFF0C\u4E0D\u53EF\u53D1\u9001"),m.abrupt("return");case 11:case"end":return m.stop()}},r)}));return function(){return t.apply(this,arguments)}}(),w=function(r){M(ee==null?void 0:ee.map(function(a){return Object(Be.a)(Object(Be.a)({},a),{},{hide:!a.course_name.includes(r)})}))},n=function(){var t=Object(Ge.a)(Ie().mark(function r(){var a;return Ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(Le){l.next=3;break}return k(!0),l.abrupt("return");case 3:return l.next=5,Object(Ve.n)({id:Ue.videoId,course_id:Le});case 5:a=l.sent,(a==null?void 0:a.status)===0&&(_e.b.success("\u53D1\u9001\u6210\u529F"),e(),se.c===null||se.c===void 0||se.c.replace("/classrooms/".concat(Le,"/shixun_homework")));case 7:case"end":return l.stop()}},r)}));return function(){return t.apply(this,arguments)}}(),e=function(){I(""),R(null),k(!1),ge({type:"videoDetail/setActionTabs",payload:{}}),b(!1)};return f.a.createElement(Je.a,{centered:!0,keyboard:!1,closable:!1,title:"\u53D1\u9001\u81F3\u8BFE\u5802",visible:X,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:n,onCancel:e},f.a.createElement("div",{className:rt.a.wrap},f.a.createElement("div",{className:"mb10"},f.a.createElement(et,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:p,onChange:function(r){return I(r.target.value)},onSearch:function(r){I(r),w(r)}})),f.a.createElement("div",{className:rt.a.radioWrap},f.a.createElement(Re.a.Group,{value:Le,onChange:function(r){R(r.target.value),k(!1)}},ee==null||(($=ee.filter(function(t){return!(t==null?void 0:t.hide)}))===null||$===void 0)?void 0:$.map(function(t,r){return f.a.createElement(Re.a,{className:rt.a.radio,value:t.course_id,key:r},t.course_name)}))),ne&&f.a.createElement("div",{className:rt.a.colorFF0000},"\u8BF7\u9009\u62E9\u4F60\u8981\u53D1\u9001\u7684\u8BFE\u5802"),f.a.createElement("div",{className:rt.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u89C6\u9891\u9879\u76EE\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802")))},te=Object(se.a)(function(_){var h=_.videoDetail,$=_.loading,D=_.globalSetting;return{videoDetail:h,globalSetting:D,loading:$.models.index}})(De),A=i("sBCT"),U=i("1vsH"),ae=i("NLgs"),Q=i("Awhp"),ue=i("KrTs"),Ee=i("O3gP"),s=i("lrIw"),u=i("oBTY"),c=i("eoI0"),C=i.n(c),O=i("HBuW");function j(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */j=function(){return h};var _,h={},$=Object.prototype,D=$.hasOwnProperty,ve=Object.defineProperty||function(n,e,t){n[e]=t.value},Te=typeof Symbol=="function"?Symbol:{},ge=Te.iterator||"@@iterator",ke=Te.asyncIterator||"@@asyncIterator",Ue=Te.toStringTag||"@@toStringTag";function F(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{F({},"")}catch(n){F=function(t,r,a){return t[r]=a}}function Ne(n,e,t,r){var a=e&&e.prototype instanceof I?e:I,o=Object.create(a.prototype),l=new G(r||[]);return ve(o,"_invoke",{value:B(n,t,l)}),o}function Fe(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(r){return{type:"throw",arg:r}}}h.wrap=Ne;var ee="suspendedStart",M="suspendedYield",K="executing",V="completed",p={};function I(){}function ie(){}function T(){}var Le={};F(Le,ge,function(){return this});var R=Object.getPrototypeOf,J=R&&R(R(w([])));J&&J!==$&&D.call(J,ge)&&(Le=J);var E=T.prototype=I.prototype=Object.create(Le);function ne(n){["next","throw","return"].forEach(function(e){F(n,e,function(t){return this._invoke(e,t)})})}function k(n,e){function t(a,o,l,m){var P=Fe(n[a],n,o);if(P.type!=="throw"){var Oe=P.arg,le=Oe.value;return le&&typeof le=="object"&&D.call(le,"__await")?e.resolve(le.__await).then(function(xe){t("next",xe,l,m)},function(xe){t("throw",xe,l,m)}):e.resolve(le).then(function(xe){Oe.value=xe,l(Oe)},function(xe){return t("throw",xe,l,m)})}m(P.arg)}var r;ve(this,"_invoke",{value:function(o,l){function m(){return new e(function(P,Oe){t(o,l,P,Oe)})}return r=r?r.then(m,m):m()}})}function B(n,e,t){var r=ee;return function(a,o){if(r===K)throw new Error("Generator is already running");if(r===V){if(a==="throw")throw o;return{value:_,done:!0}}for(t.method=a,t.arg=o;;){var l=t.delegate;if(l){var m=fe(l,t);if(m){if(m===p)continue;return m}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===ee)throw r=V,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=K;var P=Fe(n,e,t);if(P.type==="normal"){if(r=t.done?V:M,P.arg===p)continue;return{value:P.arg,done:t.done}}P.type==="throw"&&(r=V,t.method="throw",t.arg=P.arg)}}}function fe(n,e){var t=e.method,r=n.iterator[t];if(r===_)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=_,fe(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var a=Fe(r,n.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,p;var o=a.arg;return o?o.done?(e[n.resultName]=o.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=_),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function X(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function b(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function G(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(X,this),this.reset(!0)}function w(n){if(n||n===""){var e=n[ge];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,r=function a(){for(;++t<n.length;)if(D.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=_,a.done=!0,a};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return ie.prototype=T,ve(E,"constructor",{value:T,configurable:!0}),ve(T,"constructor",{value:ie,configurable:!0}),ie.displayName=F(T,Ue,"GeneratorFunction"),h.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===ie||(e.displayName||e.name)==="GeneratorFunction")},h.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,T):(n.__proto__=T,F(n,Ue,"GeneratorFunction")),n.prototype=Object.create(E),n},h.awrap=function(n){return{__await:n}},ne(k.prototype),F(k.prototype,ke,function(){return this}),h.AsyncIterator=k,h.async=function(n,e,t,r,a){a===void 0&&(a=Promise);var o=new k(Ne(n,e,t,r),a);return h.isGeneratorFunction(e)?o:o.next().then(function(l){return l.done?l.value:o.next()})},ne(E),F(E,Ue,"Generator"),F(E,ge,function(){return this}),F(E,"toString",function(){return"[object Generator]"}),h.keys=function(n){var e=Object(n),t=[];for(var r in e)t.push(r);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},h.values=w,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(b),!e)for(var t in this)t.charAt(0)==="t"&&D.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(Oe,le){return l.type="throw",l.arg=e,t.next=Oe,le&&(t.method="next",t.arg=_),!!le}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=D.call(o,"catchLoc"),P=D.call(o,"finallyLoc");if(m&&P){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&D.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=_),p}},h}var he=function(h){var $,D,ve=h.videoDetail,Te=h.dispatch,ge=Te===void 0?function(){}:Te,ke=h.visible,Ue=h.onClose,F=Ue===void 0?function(){}:Ue,Ne=ve.queryParams,Fe=ve.queryParams,ee=Fe.subject_id,M=Fe.videoId,K={videoId:M},V=Object(pe.useState)(0),p=Object(Ye.a)(V,2),I=p[0],ie=p[1],T=Object(pe.useState)(""),Le=Object(Ye.a)(T,2),R=Le[0],J=Le[1],E=Object(pe.useState)([]),ne=Object(Ye.a)(E,2),k=ne[0],B=ne[1],fe=Object(pe.useState)([]),X=Object(Ye.a)(fe,2),b=X[0],G=X[1];Object(pe.useEffect)(function(){var r,a,o=((r=ve.detail)===null||r===void 0||((a=r.video_item)===null||a===void 0)?void 0:a.schools)||[];ie((o==null?void 0:o.length)?1:0),G(o)},[($=ve.detail)===null||$===void 0||((D=$.video_item)===null||D===void 0)?void 0:D.schools]);var w=function(){var r=Object(Ge.a)(j().mark(function a(o){var l;return j().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,Object(O.L)({q:o});case 2:l=P.sent,l&&B(l.shools_name||[]);case 4:case"end":return P.stop()}},a)}));return function(o){return r.apply(this,arguments)}}(),n=function(a){if(b.includes(a)){_e.b.info("\u8BF7\u52FF\u6307\u5B9A\u76F8\u540C\u7684\u5355\u4F4D");return}J(""),G([].concat(Object(u.a)(b),[a]))},e=function(){var r=Object(Ge.a)(j().mark(function a(){var o;return j().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!(I===1&&!(b==null?void 0:b.length))){m.next=2;break}return m.abrupt("return",_e.b.info("\u8BF7\u9009\u62E9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00"));case 2:return m.next=4,Object(Ve.a)(Object(Be.a)(Object(Be.a)({},Ne),{},{id:K.videoId,schools:I===0?[]:b,is_public:!(I===2)}));case 4:o=m.sent,(o==null?void 0:o.status)===0&&(_e.b.success("\u8BBE\u7F6E\u6210\u529F"),t());case 6:case"end":return m.stop()}},a)}));return function(){return r.apply(this,arguments)}}(),t=function(){F(),ge({type:"videoDetail/getVideoDetail",payload:Object(Be.a)(Object(Be.a)({},Ne),{},{id:K.videoId})})};return f.a.createElement(Je.a,{centered:!0,maskClosable:!1,title:"\u6743\u9650\u8BBE\u7F6E",width:530,className:C.a.modal,visible:ke,onOk:e,onCancel:t},f.a.createElement(f.a.Fragment,null,f.a.createElement(Re.a.Group,{value:I,onChange:function(a){return ie(a.target.value)}},f.a.createElement(Re.a,{value:0},"\u5BF9\u6240\u6709\u5355\u4F4D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),f.a.createElement(Re.a,{value:1},"\u5BF9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u4EC5\u5BF9\u4E0B\u65B9\u6307\u5B9A\u5355\u4F4D\u7528\u6237\u53EF\u89C1\uFF09")),f.a.createElement(Re.a,{value:2},"\u4E0D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u4E0D\u53EF\u89C1\uFF09"))),I===1&&f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{className:"mt10"},f.a.createElement(s.a,{showSearch:!0,className:C.a.selectSchool,placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5355\u4F4D\u540D\u79F0",value:R,onChange:function(a){J(a),w(a)},onSelect:n,options:k==null?void 0:k.map(function(r){return{value:r}})})),f.a.createElement("div",{className:"mt10"},b==null?void 0:b.map(function(r,a){return f.a.createElement(ue.a,{count:f.a.createElement("span",{className:C.a.delete,onClick:function(){return G(b.filter(function(l){return l!==r}))}},"x"),className:"mt10 mr20 current",key:a},f.a.createElement(ce.a,{type:"primary",ghost:!0},r))})))))},Ce=he;function Y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Y=function(){return h};var _,h={},$=Object.prototype,D=$.hasOwnProperty,ve=Object.defineProperty||function(n,e,t){n[e]=t.value},Te=typeof Symbol=="function"?Symbol:{},ge=Te.iterator||"@@iterator",ke=Te.asyncIterator||"@@asyncIterator",Ue=Te.toStringTag||"@@toStringTag";function F(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{F({},"")}catch(n){F=function(t,r,a){return t[r]=a}}function Ne(n,e,t,r){var a=e&&e.prototype instanceof I?e:I,o=Object.create(a.prototype),l=new G(r||[]);return ve(o,"_invoke",{value:B(n,t,l)}),o}function Fe(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(r){return{type:"throw",arg:r}}}h.wrap=Ne;var ee="suspendedStart",M="suspendedYield",K="executing",V="completed",p={};function I(){}function ie(){}function T(){}var Le={};F(Le,ge,function(){return this});var R=Object.getPrototypeOf,J=R&&R(R(w([])));J&&J!==$&&D.call(J,ge)&&(Le=J);var E=T.prototype=I.prototype=Object.create(Le);function ne(n){["next","throw","return"].forEach(function(e){F(n,e,function(t){return this._invoke(e,t)})})}function k(n,e){function t(a,o,l,m){var P=Fe(n[a],n,o);if(P.type!=="throw"){var Oe=P.arg,le=Oe.value;return le&&typeof le=="object"&&D.call(le,"__await")?e.resolve(le.__await).then(function(xe){t("next",xe,l,m)},function(xe){t("throw",xe,l,m)}):e.resolve(le).then(function(xe){Oe.value=xe,l(Oe)},function(xe){return t("throw",xe,l,m)})}m(P.arg)}var r;ve(this,"_invoke",{value:function(o,l){function m(){return new e(function(P,Oe){t(o,l,P,Oe)})}return r=r?r.then(m,m):m()}})}function B(n,e,t){var r=ee;return function(a,o){if(r===K)throw new Error("Generator is already running");if(r===V){if(a==="throw")throw o;return{value:_,done:!0}}for(t.method=a,t.arg=o;;){var l=t.delegate;if(l){var m=fe(l,t);if(m){if(m===p)continue;return m}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===ee)throw r=V,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=K;var P=Fe(n,e,t);if(P.type==="normal"){if(r=t.done?V:M,P.arg===p)continue;return{value:P.arg,done:t.done}}P.type==="throw"&&(r=V,t.method="throw",t.arg=P.arg)}}}function fe(n,e){var t=e.method,r=n.iterator[t];if(r===_)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=_,fe(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var a=Fe(r,n.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,p;var o=a.arg;return o?o.done?(e[n.resultName]=o.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=_),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function X(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function b(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function G(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(X,this),this.reset(!0)}function w(n){if(n||n===""){var e=n[ge];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,r=function a(){for(;++t<n.length;)if(D.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=_,a.done=!0,a};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return ie.prototype=T,ve(E,"constructor",{value:T,configurable:!0}),ve(T,"constructor",{value:ie,configurable:!0}),ie.displayName=F(T,Ue,"GeneratorFunction"),h.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===ie||(e.displayName||e.name)==="GeneratorFunction")},h.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,T):(n.__proto__=T,F(n,Ue,"GeneratorFunction")),n.prototype=Object.create(E),n},h.awrap=function(n){return{__await:n}},ne(k.prototype),F(k.prototype,ke,function(){return this}),h.AsyncIterator=k,h.async=function(n,e,t,r,a){a===void 0&&(a=Promise);var o=new k(Ne(n,e,t,r),a);return h.isGeneratorFunction(e)?o:o.next().then(function(l){return l.done?l.value:o.next()})},ne(E),F(E,Ue,"Generator"),F(E,ge,function(){return this}),F(E,"toString",function(){return"[object Generator]"}),h.keys=function(n){var e=Object(n),t=[];for(var r in e)t.push(r);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},h.values=w,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(b),!e)for(var t in this)t.charAt(0)==="t"&&D.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(Oe,le){return l.type="throw",l.arg=e,t.next=Oe,le&&(t.method="next",t.arg=_),!!le}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=D.call(o,"catchLoc"),P=D.call(o,"finallyLoc");if(m&&P){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&D.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=_),p}},h}var We=function(h){var $=h.user,D=h.videoDetail,ve=h.globalSetting,Te=h.loading,ge=h.dispatch,ke=Object(st.a)(h,["user","videoDetail","globalSetting","loading","dispatch"]),Ue=D.queryParams,F=D.queryParams,Ne=F.subject_id,Fe=F.videoId,ee={videoId:Fe},M=Object(pe.useState)(),K=Object(Ye.a)(M,2),V=K[0],p=K[1],I=Object(pe.useState)(),ie=Object(Ye.a)(I,2),T=ie[0],Le=ie[1],R=Object(pe.useState)(!1),J=Object(Ye.a)(R,2),E=J[0],ne=J[1],k=function(){ge({type:"videoDetail/setActionTabs",payload:{key:"Banner-SendToClass"}})},B=function(){var G=Object(Ge.a)(Y().mark(function w(){var n,e,t;return Y().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!(((n=$.userInfo)===null||n===void 0?void 0:n.admin)||((e=$.userInfo)===null||e===void 0?void 0:e.is_teacher)&&Object(ae.d)())){a.next=6;break}return a.next=3,Object(Ve.g)(Object(Be.a)({id:ee.videoId},Ue));case 3:t=a.sent,Le(t==null?void 0:t.video_item),p(!0);case 6:case"end":return a.stop()}},w)}));return function(){return G.apply(this,arguments)}}(),fe=function(){var G=Object(Ge.a)(Y().mark(function w(n){var e;return Y().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(Ve.m)(Object(Be.a)(Object(Be.a)({},n),{},{id:ee.videoId},Ue));case 2:return e=r.sent,(e==null?void 0:e.status)===0&&(p(!1),ge({type:"videoDetail/getVideoDetail",payload:Object(Be.a)({id:ee.videoId},Ue)})),r.abrupt("return",e);case 5:case"end":return r.stop()}},w)}));return function(n){return G.apply(this,arguments)}}(),X=D.detail||{},b=X.video_item;return f.a.createElement("aside",{className:ye.a.banner},f.a.createElement("aside",{className:ye.a.wrap},f.a.createElement("p",{className:ye.a.title},b==null?void 0:b.name),f.a.createElement("div",{className:ye.a.contentWrap},f.a.createElement("span",{className:"font14 c-white"},f.a.createElement("span",{className:"mr10"},"\u5B66\u4E60\u4EBA\u6570\uFF1A"),f.a.createElement("span",null,(b==null?void 0:b.study_video_items_count)||0),f.a.createElement("span",{className:"ml100 mr10"},"\u5B66\u5458\u8BC4\u5206\uFF1A"),f.a.createElement(He.a,{allowHalf:!0,value:Object(U.x)(b==null?void 0:b.star),disabled:!0,className:ye.a.rating})),f.a.createElement("div",null,(b==null?void 0:b.can_edit)&&f.a.createElement(ce.a,{className:"".concat(ye.a.button," ").concat(ye.a.buttonTransparent," mr15"),onClick:function(){return ne(!0)}},"\u6743\u9650\u8BBE\u7F6E"),(b==null?void 0:b.can_edit)&&f.a.createElement(ce.a,{className:"".concat(ye.a.button," ").concat(ye.a.buttonTransparent," mr15"),onClick:B},"\u7F16\u8F91"),f.a.createElement(we.a,{title:"\u53EF\u5C06\u672C\u89C6\u9891\u53D1\u9001\u81F3\u6211\u7684\u8BFE\u5802\u4E2D\u7684\u89C6\u9891\u680F\u76EE",placement:"bottom"},f.a.createElement(ce.a,{className:"".concat(ye.a.button," ").concat(ye.a.buttonTransparent," mr15"),onClick:k},"\u53D1\u9001\u81F3"))))),f.a.createElement(te,null),f.a.createElement(A.a,{editData:T,visible:V,onCancel:function(){return p(!1)},onOk:fe}),f.a.createElement(Ce,{dispatch:ge,videoDetail:D,visible:E,onClose:function(){return ne(!1)}}))},oe=Object(se.a)(function(_){var h=_.user,$=_.videoDetail,D=_.loading,ve=_.globalSetting;return{user:h,videoDetail:$,globalSetting:ve,loading:D}})(We),be=i("R9oj"),Qe=i("ECub"),x=i("sRBo"),v=i("kaz8"),y=i("J66h"),S=i("hgre"),W=i("9Bee"),Z=i("vZDz"),je=i.n(Z),Ze=i("9VGf");function Se(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Se=function(){return h};var _,h={},$=Object.prototype,D=$.hasOwnProperty,ve=Object.defineProperty||function(n,e,t){n[e]=t.value},Te=typeof Symbol=="function"?Symbol:{},ge=Te.iterator||"@@iterator",ke=Te.asyncIterator||"@@asyncIterator",Ue=Te.toStringTag||"@@toStringTag";function F(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{F({},"")}catch(n){F=function(t,r,a){return t[r]=a}}function Ne(n,e,t,r){var a=e&&e.prototype instanceof I?e:I,o=Object.create(a.prototype),l=new G(r||[]);return ve(o,"_invoke",{value:B(n,t,l)}),o}function Fe(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(r){return{type:"throw",arg:r}}}h.wrap=Ne;var ee="suspendedStart",M="suspendedYield",K="executing",V="completed",p={};function I(){}function ie(){}function T(){}var Le={};F(Le,ge,function(){return this});var R=Object.getPrototypeOf,J=R&&R(R(w([])));J&&J!==$&&D.call(J,ge)&&(Le=J);var E=T.prototype=I.prototype=Object.create(Le);function ne(n){["next","throw","return"].forEach(function(e){F(n,e,function(t){return this._invoke(e,t)})})}function k(n,e){function t(a,o,l,m){var P=Fe(n[a],n,o);if(P.type!=="throw"){var Oe=P.arg,le=Oe.value;return le&&typeof le=="object"&&D.call(le,"__await")?e.resolve(le.__await).then(function(xe){t("next",xe,l,m)},function(xe){t("throw",xe,l,m)}):e.resolve(le).then(function(xe){Oe.value=xe,l(Oe)},function(xe){return t("throw",xe,l,m)})}m(P.arg)}var r;ve(this,"_invoke",{value:function(o,l){function m(){return new e(function(P,Oe){t(o,l,P,Oe)})}return r=r?r.then(m,m):m()}})}function B(n,e,t){var r=ee;return function(a,o){if(r===K)throw new Error("Generator is already running");if(r===V){if(a==="throw")throw o;return{value:_,done:!0}}for(t.method=a,t.arg=o;;){var l=t.delegate;if(l){var m=fe(l,t);if(m){if(m===p)continue;return m}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===ee)throw r=V,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=K;var P=Fe(n,e,t);if(P.type==="normal"){if(r=t.done?V:M,P.arg===p)continue;return{value:P.arg,done:t.done}}P.type==="throw"&&(r=V,t.method="throw",t.arg=P.arg)}}}function fe(n,e){var t=e.method,r=n.iterator[t];if(r===_)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=_,fe(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var a=Fe(r,n.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,p;var o=a.arg;return o?o.done?(e[n.resultName]=o.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=_),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function X(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function b(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function G(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(X,this),this.reset(!0)}function w(n){if(n||n===""){var e=n[ge];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,r=function a(){for(;++t<n.length;)if(D.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=_,a.done=!0,a};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return ie.prototype=T,ve(E,"constructor",{value:T,configurable:!0}),ve(T,"constructor",{value:ie,configurable:!0}),ie.displayName=F(T,Ue,"GeneratorFunction"),h.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===ie||(e.displayName||e.name)==="GeneratorFunction")},h.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,T):(n.__proto__=T,F(n,Ue,"GeneratorFunction")),n.prototype=Object.create(E),n},h.awrap=function(n){return{__await:n}},ne(k.prototype),F(k.prototype,ke,function(){return this}),h.AsyncIterator=k,h.async=function(n,e,t,r,a){a===void 0&&(a=Promise);var o=new k(Ne(n,e,t,r),a);return h.isGeneratorFunction(e)?o:o.next().then(function(l){return l.done?l.value:o.next()})},ne(E),F(E,Ue,"Generator"),F(E,ge,function(){return this}),F(E,"toString",function(){return"[object Generator]"}),h.keys=function(n){var e=Object(n),t=[];for(var r in e)t.push(r);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},h.values=w,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(b),!e)for(var t in this)t.charAt(0)==="t"&&D.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(Oe,le){return l.type="throw",l.arg=e,t.next=Oe,le&&(t.method="next",t.arg=_),!!le}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=D.call(o,"catchLoc"),P=D.call(o,"finallyLoc");if(m&&P){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&D.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=_),p}},h}var ut=function(h){var $=h.videoDetail,D=h.globalSetting,ve=h.loading,Te=h.dispatch,ge=Object(st.a)(h,["videoDetail","globalSetting","loading","dispatch"]),ke=$.queryParams,Ue=$.selectParams,F=$.videoList,Ne=ke.subject_id,Fe=ke.videoId,ee=Ue.checkBoxValue,M=Ue.radioValue,K={videoId:Fe},V={query:ke},p=Object(pe.useRef)(),I=Object(pe.useRef)(),ie=Object(pe.useRef)(),T=Object(pe.useRef)(5),Le=$.detail||{},R=Le.video_item;Object(Ze.a)(Object(Ge.a)(Se().mark(function G(){return Se().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!I.current){n.next=5;break}return console.log("videoRef lastUpdatedTime: ",p.current.getLastUpdatedTime()),console.log(p.current),n.next=5,J();case 5:case"end":return n.stop()}},G)})),T.current*1e3);var J=function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=w?{is_f:1}:{};return Object(Ve.o)(Object(Be.a)(Object(Be.a)({},n),{id:K.videoId,point:p.current.getLastUpdatedTime(),total:p.current.getDuration()}))},E=function(w){return console.log("handlLogWatchHistory: ",w),w.ed==="1"&&(I.current=!1,J(!0)),!I.current&&!w.ed&&(I.current=!0,T.current=p.current.getDuration()<=5?1:5,J()),Te({type:"userDetail/logWatchHistory",payload:w})},ne=function(){I.current=!1},k=function(){I.current=!0},B=function(){ie.current=5,Je.a.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:f.a.createElement("div",{className:"tc font14"},f.a.createElement(He.a,{defaultValue:ie.current,onChange:function(n){return ie.current=n},className:je.a.modalRating})),onOk:function(){var w=Object(Ge.a)(Se().mark(function e(){var t;return Se().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(Ve.l)({id:K.videoId,star:ie.current});case 2:t=a.sent,t.status===0&&Te({type:"videoDetail/getVideoDetail",payload:Object(Be.a)({id:K.videoId},at(V.query))});case 4:case"end":return a.stop()}},e)}));function n(){return w.apply(this,arguments)}return n}()})},fe=function(w){var n=window.filterVideoSign,e=n.findIndex(function(m){return m.id===Fe}),t=e===n.length-1;if(t)return;var r=n[e+1].id,a=n[e+1].can_view,o=n[e+1].link,l=n[e+1].is_public;if(window.checkBoxValue){if(o){window.open(o);return}if(!a){Je.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!l){Je.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}Te({type:"videoDetail/handleList",payload:{videoId:r}}),window.videoTimer=setTimeout(function(){w.current.play()},2e3)}},X=function(w,n){if(w==="checkBox"){var e=n.target.checked;window.checkBoxValue=e,Te({type:"videoDetail/setSelectValue",payload:{radioValue:M,checkBoxValue:e}});return}Te({type:"videoDetail/setSelectValue",payload:{checkBoxValue:ee,radioValue:n.target.value}})},b=function(){var w=F.findIndex(function(e){return e.id===Fe}),n=w===F.length-1;return n?f.a.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):f.a.createElement(v.a,{onChange:function(t){X("checkBox",t)},checked:ee},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891")};return f.a.createElement("aside",{className:je.a.contentWrap},f.a.createElement("aside",{className:je.a.wrap},f.a.createElement("header",null,(R==null?void 0:R.description)&&f.a.createElement("span",{className:je.a.introName},"\u7B80\u4ECB"),Object(U.I)(R==null?void 0:R.my_star)?f.a.createElement(ce.a,{type:"primary",ghost:!0,onClick:B},"\u8BC4\u5206"):f.a.createElement("span",null,f.a.createElement("span",{className:"ml100 mr10 font14"},"\u6211\u7684\u8BC4\u5206\uFF1A"),f.a.createElement(He.a,{value:R==null?void 0:R.my_star,disabled:!0,className:je.a.rating}))),f.a.createElement("div",{className:"mt20"},f.a.createElement(W.a,{value:(R==null?void 0:R.description)||""})),!(R==null?void 0:R.can_edit)&&!(R==null?void 0:R.is_public)?f.a.createElement(Qe.a,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):f.a.createElement(S.a,{ref:p,startTime:R==null?void 0:R.last_point,src:(R==null?void 0:R.is_link)?R==null?void 0:R.link:(R==null?void 0:R.play_url)&&y.Base64.decode(R==null?void 0:R.play_url),videoId:R==null?void 0:R.video_id,logWatchHistory:E,handlePause:ne,handlePlay:k,videoSpeed:M,handlePlayEnded:fe}),!(R==null?void 0:R.can_edit)&&!(R==null?void 0:R.is_public)?null:f.a.createElement("div",{className:je.a.footer},f.a.createElement("div",{className:je.a.checkBox},b()),f.a.createElement("div",{className:je.a.radioGroup},f.a.createElement(Re.a.Group,{onChange:function(w){X("radio",w)},value:M},f.a.createElement(Re.a,{value:1},"1.0X"),f.a.createElement(Re.a,{value:1.5},"1.5X"),f.a.createElement(Re.a,{value:2},"2.0X"))))))},ot=Object(se.a)(function(_){var h=_.videoDetail,$=_.loading,D=_.globalSetting;return{videoDetail:h,globalSetting:D,loading:$}})(ut),g=i("MRWH"),d=i.n(g),L=i("V0Rq"),z=i("m3rI");function q(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */q=function(){return h};var _,h={},$=Object.prototype,D=$.hasOwnProperty,ve=Object.defineProperty||function(n,e,t){n[e]=t.value},Te=typeof Symbol=="function"?Symbol:{},ge=Te.iterator||"@@iterator",ke=Te.asyncIterator||"@@asyncIterator",Ue=Te.toStringTag||"@@toStringTag";function F(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{F({},"")}catch(n){F=function(t,r,a){return t[r]=a}}function Ne(n,e,t,r){var a=e&&e.prototype instanceof I?e:I,o=Object.create(a.prototype),l=new G(r||[]);return ve(o,"_invoke",{value:B(n,t,l)}),o}function Fe(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(r){return{type:"throw",arg:r}}}h.wrap=Ne;var ee="suspendedStart",M="suspendedYield",K="executing",V="completed",p={};function I(){}function ie(){}function T(){}var Le={};F(Le,ge,function(){return this});var R=Object.getPrototypeOf,J=R&&R(R(w([])));J&&J!==$&&D.call(J,ge)&&(Le=J);var E=T.prototype=I.prototype=Object.create(Le);function ne(n){["next","throw","return"].forEach(function(e){F(n,e,function(t){return this._invoke(e,t)})})}function k(n,e){function t(a,o,l,m){var P=Fe(n[a],n,o);if(P.type!=="throw"){var Oe=P.arg,le=Oe.value;return le&&typeof le=="object"&&D.call(le,"__await")?e.resolve(le.__await).then(function(xe){t("next",xe,l,m)},function(xe){t("throw",xe,l,m)}):e.resolve(le).then(function(xe){Oe.value=xe,l(Oe)},function(xe){return t("throw",xe,l,m)})}m(P.arg)}var r;ve(this,"_invoke",{value:function(o,l){function m(){return new e(function(P,Oe){t(o,l,P,Oe)})}return r=r?r.then(m,m):m()}})}function B(n,e,t){var r=ee;return function(a,o){if(r===K)throw new Error("Generator is already running");if(r===V){if(a==="throw")throw o;return{value:_,done:!0}}for(t.method=a,t.arg=o;;){var l=t.delegate;if(l){var m=fe(l,t);if(m){if(m===p)continue;return m}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===ee)throw r=V,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=K;var P=Fe(n,e,t);if(P.type==="normal"){if(r=t.done?V:M,P.arg===p)continue;return{value:P.arg,done:t.done}}P.type==="throw"&&(r=V,t.method="throw",t.arg=P.arg)}}}function fe(n,e){var t=e.method,r=n.iterator[t];if(r===_)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=_,fe(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var a=Fe(r,n.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,p;var o=a.arg;return o?o.done?(e[n.resultName]=o.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=_),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function X(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function b(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function G(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(X,this),this.reset(!0)}function w(n){if(n||n===""){var e=n[ge];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,r=function a(){for(;++t<n.length;)if(D.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=_,a.done=!0,a};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return ie.prototype=T,ve(E,"constructor",{value:T,configurable:!0}),ve(T,"constructor",{value:ie,configurable:!0}),ie.displayName=F(T,Ue,"GeneratorFunction"),h.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===ie||(e.displayName||e.name)==="GeneratorFunction")},h.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,T):(n.__proto__=T,F(n,Ue,"GeneratorFunction")),n.prototype=Object.create(E),n},h.awrap=function(n){return{__await:n}},ne(k.prototype),F(k.prototype,ke,function(){return this}),h.AsyncIterator=k,h.async=function(n,e,t,r,a){a===void 0&&(a=Promise);var o=new k(Ne(n,e,t,r),a);return h.isGeneratorFunction(e)?o:o.next().then(function(l){return l.done?l.value:o.next()})},ne(E),F(E,Ue,"Generator"),F(E,ge,function(){return this}),F(E,"toString",function(){return"[object Generator]"}),h.keys=function(n){var e=Object(n),t=[];for(var r in e)t.push(r);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},h.values=w,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(b),!e)for(var t in this)t.charAt(0)==="t"&&D.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(Oe,le){return l.type="throw",l.arg=e,t.next=Oe,le&&(t.method="next",t.arg=_),!!le}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=D.call(o,"catchLoc"),P=D.call(o,"finallyLoc");if(m&&P){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&D.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=_),p}},h}var H=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:f.a.createElement("i",{className:"iconfont icon-shixun2 font20"})},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:f.a.createElement("i",{className:"iconfont icon-shipin font20"})},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:f.a.createElement("i",{className:"iconfont icon-jiaoxueanli font20"})},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:f.a.createElement("i",{className:"iconfont icon-kongbai font20"})}],Ke=function(h){var $=h.dispatch,D=h.videoDetail,ve=h.user,Te=Object(st.a)(h,["dispatch","videoDetail","user"]),ge=D.queryParams,ke=D.stages,Ue=D.videoList,F=D.cust_seq,Ne=ge.subject_id,Fe=ge.videoId,ee=ge.course_id;Object(pe.useEffect)(function(){$(Ne?{type:"videoDetail/getStageData",payload:{subject_id:Ne}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:ee}})},[]);var M=function(){var J=Object(Ge.a)(q().mark(function E(ne,k){var B;return q().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if($({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!k){X.next=7;break}return X.next=4,Object(O.z)({id:ne});case 4:X.t0=X.sent,X.next=10;break;case 7:return X.next=9,Object(O.A)({id:ne});case 9:X.t0=X.sent;case 10:if(B=X.t0,$({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!((B==null?void 0:B.game_identifier)||(B==null?void 0:B.identifier))){X.next=15;break}return Object(U.L)(k?"/tasks/".concat(B==null?void 0:B.identifier,"/jupyter"):"/tasks/".concat(B.game_identifier)),X.abrupt("return");case 15:(B==null?void 0:B.status)===2?V(B==null?void 0:B.message):(B==null?void 0:B.status)===3&&K(B==null?void 0:B.message);case 16:case"end":return X.stop()}},E)}));return function(ne,k){return J.apply(this,arguments)}}(),K=function(E){Je.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:f.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",E,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},V=function J(E){var ne;E=((ne=E)===null||ne===void 0?void 0:ne.includes(".json"))?E:"".concat(E,".json"),Je.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:f.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var k=Object(Ge.a)(q().mark(function fe(){var X,b;return q().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(L.P)({url:E});case 2:if(X=w.sent,X){w.next=5;break}return w.abrupt("return");case 5:return _e.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),w.next=8,Object(O.A)({id:X.shixun_identifier});case 8:if(b=w.sent,!(b==null?void 0:b.game_identifier)){w.next=12;break}return Object(U.L)("/tasks/".concat(b.game_identifier)),w.abrupt("return");case 12:(b==null?void 0:b.status)===2?J(b==null?void 0:b.message):(b==null?void 0:b.status)===3&&K(b==null?void 0:b.message);case 13:case"end":return w.stop()}},fe)}));function B(){return k.apply(this,arguments)}return B}()})},p=D.detail||{},I=p.video_item,ie=function(E){if((E==null?void 0:E.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);var ne=E.id,k=E.item_type,B=E.identifier,fe=E.is_jupyter,X=E.url,b=E.link;if(k==="VideoItem"&&!b){var G,w;if(!((G=ve.userInfo)===null||G===void 0?void 0:G.admin)&&!((w=ve.userInfo)===null||w===void 0?void 0:w.business)&&!E.can_view){Je.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!I.can_edit&&!E.is_public){Je.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}$({type:"videoDetail/handleList",payload:{videoId:ne}});return}if(k==="VideoItem"&&!!b){E.link&&Object(Ve.o)({is_f:1,id:E.id,point:0,total:0}),window.open(b);return}if(k==="Shixun"){M(B,fe);return}window.open(z.a.IMG_SERVER+X)},T=function(E){var ne=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],k=["","\u5341","\u767E","\u5343","\u4E07"];E=parseInt(E);var B=function(G){for(var w=G.toString().split("").reverse(),n="",e=0;e<w.length;e++)n=(e==0&&w[e]==0||e>0&&w[e]==0&&w[e-1]==0?"":ne[w[e]]+(w[e]==0?k[0]:k[e]))+n;return n},fe=Math.floor(E/1e4),X=E%1e4;return X.toString().length<4&&(X="0"+X),fe?B(fe)+"\u4E07"+B(X):B(E)},Le=function(E,ne,k,B){var fe=E.name,X=E.item_type,b=E.id,G="".concat(ne+1,"-").concat(k+1,"-").concat(B+1),w=H.find(function(t){return t.type===X}).icon,n=X==="VideoItem"?d.a.brght:d.a.gray,e=Fe===b?"".concat(n," ").concat(d.a.active):n;return f.a.createElement("div",{key:G,onClick:function(){return ie(E)},className:e,style:{paddingLeft:52}},f.a.createElement("span",{className:d.a.s1},w),!!F&&f.a.createElement("span",{className:d.a.s2},G),f.a.createElement("span",{className:d.a.s3},"\u203B ",fe))},R=function(E,ne,k){var B=E.name,fe=E.item_type,X=E.id,b=E.children,G="".concat(ne+1,"-").concat(k+1),w=H.find(function(t){return t.type===fe}).icon,n=fe==="VideoItem"?d.a.brght:d.a.gray,e=Fe===X?"".concat(n," ").concat(d.a.active):n;return f.a.createElement(pe.Fragment,{key:G},f.a.createElement("div",{onClick:function(){return ie(E)},className:e},f.a.createElement("span",{className:d.a.s1},w),!!F&&f.a.createElement("span",{className:d.a.s2},G),f.a.createElement("span",{className:d.a.s3},"\u203B ",B)),!!b.length&&b.map(function(t,r){return Le(t,ne,k,r)}))};return f.a.createElement("aside",{className:d.a.list},ke.map(function(J,E){var ne=J.stage_name,k=J.shixuns_list,B=k===void 0?[]:k,fe=J.items,X=fe===void 0?[]:fe,b=Object(u.a)(X);return f.a.createElement("aside",{key:E,className:d.a.box},f.a.createElement("div",{className:d.a.title},T(E+1),"\u3001",ne),b.map(function(G,w){return R(G,E,w)}),E!==ke.length-1&&f.a.createElement("div",{className:d.a.line}))}))},tt=Object(se.a)(function(_){var h=_.user,$=_.videoDetail,D=_.loading,ve=_.globalSetting;return{user:h,videoDetail:$,globalSetting:ve,loading:D}})(Ke),at=function(h){var $=h.subject_id;return{subject_id:$,course_id:$}},ht=function(h){var $=h.videoDetail,D=h.globalSetting,ve=h.loading,Te=h.dispatch,ge=Object(st.a)(h,["videoDetail","globalSetting","loading","dispatch"]),ke=$.queryParams,Ue=ke.subject_id,F=ke.videoId,Ne={videoId:F},Fe={query:ke};return Object(pe.useEffect)(function(){if(console.log("\u9A8C\u8BC1\u6D4B\u8BD5\u73AF\u5883"),!Ne.videoId)return;Te({type:"videoDetail/getVideoDetail",payload:Object(Be.a)(Object(Be.a)({},ke),{},{id:Ne.videoId})})},[Ne.videoId]),Object(pe.useEffect)(function(){var ee,M;document.title=((ee=$.detail)===null||ee===void 0||((M=ee.video_item)===null||M===void 0)?void 0:M.name)||"EduCoder"},[$]),f.a.createElement(qe.a,{spinning:!1},f.a.createElement("section",{className:dt.a.bg},f.a.createElement(oe,null),f.a.createElement("div",{className:dt.a.container},f.a.createElement(tt,null),f.a.createElement(ot,null))))},vt=Me.default=Object(se.a)(function(_){var h=_.videoDetail,$=_.loading,D=_.globalSetting;return{videoDetail:h,globalSetting:D,loading:$}})(ht)},"9Bee":function(Xe,Me,i){"use strict";var lt=i("k1fw"),qe=i("q1tI"),Be=i.n(qe),st=i("vg9a"),pe=i("tJVT"),f=i("DlQD"),se=i.n(f),ct=i("rUJ1");function dt(A,U){var ae=A.match(/^(\s+)(?:```)/);if(ae===null)return U;var Q=ae[1];return U.split(`
`).map(function(ue){var Ee=ue.match(/^\s+/);if(Ee===null)return ue;var s=Object(pe.a)(Ee,1),u=s[0];return u.length>=Q.length?ue.slice(Q.length):ue}).join(`
`)}var Pe=[],we=["<ul>"],$e=new se.a.Renderer,ce=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ze(){Pe.length=0,we=["<ul>"]}var He={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ge(A,U,ae,Q){if(U>=A.length||A[U].level<=ae)return U;var ue=A[U];Q.push("<li><a href='#"+ue.anchor+"'>"+ue.text+"</a>"),U++;var Ee=[];return U=Ge(A,U,ue.level,Ee),Ee.length>0&&(Q.push("<ul>"),Ee.forEach(function(s){Q.push(s)}),Q.push("</ul>")),Q.push("</li>"),U=Ge(A,U,ae,Q),U}function Ye(){return Ge(Pe,0,0,we),we.push("</ul>"),we.join("")}var it={heading:function(U){var ae=ce.exec(U);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fences:function(U){var ae=this.rules.block.fences.exec(U);if(ae){var Q=ae[0],ue=dt(Q,ae[3]||""),Ee=ae[2]?ae[2].trim():ae[2];if(["latex","katex","math"].indexOf(Ee)>=0){var s=Je(),u=ue;ue=s,ft[s]={type:"block",expression:u}}return{type:"code",raw:Q,lang:Ee,text:ue}}}},ye=/(?:\${2})([^\n`]+?)(?:\${2})/gi,de=0,Je=function(){return"__special_katext_id_".concat(de++,"__")},ft={};function Re(){return ft}function me(){de=0,ft={}}function _e(A){return A=A.replace(ye,function(U,ae){var Q=Je();return ft[Q]={type:"inline",expression:ae},Q}),A}var Ae=$e.listitem;$e.listitem=function(A){return Ae(_e(A))};var re=$e.paragraph;$e.paragraph=function(A){return re(_e(A))};var nt=$e.tablecell;$e.tablecell=function(A,U){return nt(_e(A),U)},$e.code=function(A,U,ae){var Q=(U||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"<p class='editormd-tex'>".concat(A,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(U,'">').concat(ae?A:Object(ct.escape)(A,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ae?A:Object(ct.escape)(A,!0))+"</code></pre>"},$e.heading=function(A,U,ae){var Q=this.options.headerPrefix+ae.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Pe.push({anchor:Q,level:U,text:A}),"<h"+U+' id="'+Q+'">'+A+"</h"+U+">"},se.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),se.a.use({tokenizer:it,renderer:$e});var N=se.a,rt=i("SJMd"),Ve=i("m3rI"),Ie=i("Oy/b"),et=/<pre[^>]*>/g;function De(A){var U=document.createElement("div");return U.innerHTML=A,U.childNodes.length===0?"":U.childNodes[0].nodeValue}var te=Me.a=function(A){var U=A.value,ae=U===void 0?"":U,Q=A.className,ue=A.showTextOnly,Ee=A.showLines,s=A.style,u=s===void 0?{}:s,c=String(ae),C=Object(qe.useMemo)(function(){try{var Ce=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Y=/\"\/api\/attachments\/|\"\/attachments\/download\//g,We=/\(\s+\/files\/uploads\/|\(\/files\/uploads\//g;c=c.replace(Ce,"("+Ve.a.API_SERVER+"/api/attachments/").replace(Y,'"'+Ve.a.API_SERVER+"/api/attachments/").replace(We,'"'+Ve.a.API_SERVER+"/files/uploads/")}catch(x){}var oe=N(c);setTimeout(function(){return he()},300);var be=Re();if(c.match(/\[TOC\]/)&&(oe=oe.replace("<p>[TOC]</p>",Ye()),ze()),oe=oe.replace(/(__special_katext_id_\d+__)/g,function(x,v){var y=be[v],S=y.type,W=y.expression;return Object(Ie.renderToString)(De(W)||"",{displayMode:S==="block",throwOnError:!1,output:"html"})}),oe=oe.replace(/▁/g,"\u2581\u2581\u2581"),me(),ue){var Qe=document.createElement("div");return Qe.innerHTML=oe,Qe.innerText}return oe},[c]),O=Object(qe.useRef)();He.WebkitLineClamp=Ee,Ee&&(u=Object(lt.a)(Object(lt.a)({},u),He));function j(Ce){var Y=Ce.target;if(Y.tagName.toUpperCase()==="A"){var We=Y.getAttribute("href");if(We.startsWith("#")){Ce.preventDefault();var oe=document.getElementById(We.replace("#",""));oe&&oe.scrollIntoView(!0)}}}var he=function(){};return Object(qe.useEffect)(function(){if(O.current&&C&&(C.match(et)&&window.PR.prettyPrint()),O.current)return O.current.addEventListener("click",j),function(){O.current.removeEventListener("click",j),me(),ze()}},[C,O.current,j]),Be.a.createElement(Be.a.Fragment,null,Be.a.createElement("div",{ref:O,style:Object(lt.a)({},u),className:"".concat(Q||""," markdown-body "),dangerouslySetInnerHTML:{__html:C}}))}},"9VGf":function(Xe,Me,i){"use strict";i.d(Me,"a",function(){return Be});var lt=i("q1tI"),qe=i.n(lt);function Be(st,pe){var f=Object(lt.useRef)();Object(lt.useEffect)(function(){f.current=st}),Object(lt.useEffect)(function(){function se(){f.current()}if(pe!==null){var ct=setInterval(se,pe);return function(){return clearInterval(ct)}}},[pe])}},JqQi:function(Xe,Me,i){Xe.exports={bg:"bg___31owl",container:"container___2NGOo"}},MRWH:function(Xe,Me,i){Xe.exports={flex_box_center:"flex_box_center___30XbU",flex_space_between:"flex_space_between___3jfWA",flex_box_vertical_center:"flex_box_vertical_center___27kWs",flex_box_center_end:"flex_box_center_end___1RoAS",flex_box_column:"flex_box_column____3Jvr",list:"list___2NJ_T",box:"box___36KCF",title:"title___Kd2ce",gray:"gray___14ob6",brght:"brght___GgzyD",s1:"s1___IhDpz",s2:"s2___3hR0s",s3:"s3___23SCF",active:"active___2_5D5",line:"line___3Croa"}},NLgs:function(Xe,Me,i){"use strict";i.d(Me,"e",function(){return Ge}),i.d(Me,"f",function(){return Ye}),i.d(Me,"d",function(){return ye}),i.d(Me,"c",function(){return de}),i.d(Me,"a",function(){return Je}),i.d(Me,"b",function(){return ft});var lt=i("miYZ"),qe=i("tsqr"),Be=i("9og8"),st=i("2qtc"),pe=i("kLXV"),f=i("q1tI"),se=i.n(f),ct=i("9kvl"),dt=i("xKgJ"),Pe=i("1vsH"),we=i("RCxd"),$e=i("mOS8"),ce=i.n($e),ze=i("m3rI");function He(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */He=function(){return me};var Re,me={},_e=Object.prototype,Ae=_e.hasOwnProperty,re=Object.defineProperty||function(x,v,y){x[v]=y.value},nt=typeof Symbol=="function"?Symbol:{},N=nt.iterator||"@@iterator",rt=nt.asyncIterator||"@@asyncIterator",Ve=nt.toStringTag||"@@toStringTag";function Ie(x,v,y){return Object.defineProperty(x,v,{value:y,enumerable:!0,configurable:!0,writable:!0}),x[v]}try{Ie({},"")}catch(x){Ie=function(y,S,W){return y[S]=W}}function et(x,v,y,S){var W=v&&v.prototype instanceof ue?v:ue,Z=Object.create(W.prototype),je=new be(S||[]);return re(Z,"_invoke",{value:Ce(x,y,je)}),Z}function De(x,v,y){try{return{type:"normal",arg:x.call(v,y)}}catch(S){return{type:"throw",arg:S}}}me.wrap=et;var te="suspendedStart",A="suspendedYield",U="executing",ae="completed",Q={};function ue(){}function Ee(){}function s(){}var u={};Ie(u,N,function(){return this});var c=Object.getPrototypeOf,C=c&&c(c(Qe([])));C&&C!==_e&&Ae.call(C,N)&&(u=C);var O=s.prototype=ue.prototype=Object.create(u);function j(x){["next","throw","return"].forEach(function(v){Ie(x,v,function(y){return this._invoke(v,y)})})}function he(x,v){function y(W,Z,je,Ze){var Se=De(x[W],x,Z);if(Se.type!=="throw"){var ut=Se.arg,ot=ut.value;return ot&&typeof ot=="object"&&Ae.call(ot,"__await")?v.resolve(ot.__await).then(function(g){y("next",g,je,Ze)},function(g){y("throw",g,je,Ze)}):v.resolve(ot).then(function(g){ut.value=g,je(ut)},function(g){return y("throw",g,je,Ze)})}Ze(Se.arg)}var S;re(this,"_invoke",{value:function(Z,je){function Ze(){return new v(function(Se,ut){y(Z,je,Se,ut)})}return S=S?S.then(Ze,Ze):Ze()}})}function Ce(x,v,y){var S=te;return function(W,Z){if(S===U)throw new Error("Generator is already running");if(S===ae){if(W==="throw")throw Z;return{value:Re,done:!0}}for(y.method=W,y.arg=Z;;){var je=y.delegate;if(je){var Ze=Y(je,y);if(Ze){if(Ze===Q)continue;return Ze}}if(y.method==="next")y.sent=y._sent=y.arg;else if(y.method==="throw"){if(S===te)throw S=ae,y.arg;y.dispatchException(y.arg)}else y.method==="return"&&y.abrupt("return",y.arg);S=U;var Se=De(x,v,y);if(Se.type==="normal"){if(S=y.done?ae:A,Se.arg===Q)continue;return{value:Se.arg,done:y.done}}Se.type==="throw"&&(S=ae,y.method="throw",y.arg=Se.arg)}}}function Y(x,v){var y=v.method,S=x.iterator[y];if(S===Re)return v.delegate=null,y==="throw"&&x.iterator.return&&(v.method="return",v.arg=Re,Y(x,v),v.method==="throw")||y!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+y+"' method")),Q;var W=De(S,x.iterator,v.arg);if(W.type==="throw")return v.method="throw",v.arg=W.arg,v.delegate=null,Q;var Z=W.arg;return Z?Z.done?(v[x.resultName]=Z.value,v.next=x.nextLoc,v.method!=="return"&&(v.method="next",v.arg=Re),v.delegate=null,Q):Z:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,Q)}function We(x){var v={tryLoc:x[0]};1 in x&&(v.catchLoc=x[1]),2 in x&&(v.finallyLoc=x[2],v.afterLoc=x[3]),this.tryEntries.push(v)}function oe(x){var v=x.completion||{};v.type="normal",delete v.arg,x.completion=v}function be(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(We,this),this.reset(!0)}function Qe(x){if(x||x===""){var v=x[N];if(v)return v.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var y=-1,S=function W(){for(;++y<x.length;)if(Ae.call(x,y))return W.value=x[y],W.done=!1,W;return W.value=Re,W.done=!0,W};return S.next=S}}throw new TypeError(typeof x+" is not iterable")}return Ee.prototype=s,re(O,"constructor",{value:s,configurable:!0}),re(s,"constructor",{value:Ee,configurable:!0}),Ee.displayName=Ie(s,Ve,"GeneratorFunction"),me.isGeneratorFunction=function(x){var v=typeof x=="function"&&x.constructor;return!!v&&(v===Ee||(v.displayName||v.name)==="GeneratorFunction")},me.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,s):(x.__proto__=s,Ie(x,Ve,"GeneratorFunction")),x.prototype=Object.create(O),x},me.awrap=function(x){return{__await:x}},j(he.prototype),Ie(he.prototype,rt,function(){return this}),me.AsyncIterator=he,me.async=function(x,v,y,S,W){W===void 0&&(W=Promise);var Z=new he(et(x,v,y,S),W);return me.isGeneratorFunction(v)?Z:Z.next().then(function(je){return je.done?je.value:Z.next()})},j(O),Ie(O,Ve,"Generator"),Ie(O,N,function(){return this}),Ie(O,"toString",function(){return"[object Generator]"}),me.keys=function(x){var v=Object(x),y=[];for(var S in v)y.push(S);return y.reverse(),function W(){for(;y.length;){var Z=y.pop();if(Z in v)return W.value=Z,W.done=!1,W}return W.done=!0,W}},me.values=Qe,be.prototype={constructor:be,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=Re,this.done=!1,this.delegate=null,this.method="next",this.arg=Re,this.tryEntries.forEach(oe),!v)for(var y in this)y.charAt(0)==="t"&&Ae.call(this,y)&&!isNaN(+y.slice(1))&&(this[y]=Re)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var y=this;function S(ut,ot){return je.type="throw",je.arg=v,y.next=ut,ot&&(y.method="next",y.arg=Re),!!ot}for(var W=this.tryEntries.length-1;W>=0;--W){var Z=this.tryEntries[W],je=Z.completion;if(Z.tryLoc==="root")return S("end");if(Z.tryLoc<=this.prev){var Ze=Ae.call(Z,"catchLoc"),Se=Ae.call(Z,"finallyLoc");if(Ze&&Se){if(this.prev<Z.catchLoc)return S(Z.catchLoc,!0);if(this.prev<Z.finallyLoc)return S(Z.finallyLoc)}else if(Ze){if(this.prev<Z.catchLoc)return S(Z.catchLoc,!0)}else{if(!Se)throw new Error("try statement without catch or finally");if(this.prev<Z.finallyLoc)return S(Z.finallyLoc)}}}},abrupt:function(v,y){for(var S=this.tryEntries.length-1;S>=0;--S){var W=this.tryEntries[S];if(W.tryLoc<=this.prev&&Ae.call(W,"finallyLoc")&&this.prev<W.finallyLoc){var Z=W;break}}Z&&(v==="break"||v==="continue")&&Z.tryLoc<=y&&y<=Z.finallyLoc&&(Z=null);var je=Z?Z.completion:{};return je.type=v,je.arg=y,Z?(this.method="next",this.next=Z.finallyLoc,Q):this.complete(je)},complete:function(v,y){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&y&&(this.next=y),Q},finish:function(v){for(var y=this.tryEntries.length-1;y>=0;--y){var S=this.tryEntries[y];if(S.finallyLoc===v)return this.complete(S.completion,S.afterLoc),oe(S),Q}},catch:function(v){for(var y=this.tryEntries.length-1;y>=0;--y){var S=this.tryEntries[y];if(S.tryLoc===v){var W=S.completion;if(W.type==="throw"){var Z=W.arg;oe(S)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(v,y,S){return this.delegate={iterator:Qe(v),resultName:y,nextLoc:S},this.method==="next"&&(this.arg=Re),Q}},me}var Ge=function(me){return!!(Ye(me)&&it())},Ye=function(me){return Object(dt.p)()?!0:(me({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},it=function(){var me,_e=Object(ct.b)()._store.getState(),Ae=_e.user;return((me=Ae.userInfo)===null||me===void 0?void 0:me.profile_completed)?!0:(pe.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:se.a.createElement("div",{className:"tc font16"},"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){ct.c.push("/account/profile/edit")}}),!1)},ye=function(){var me,_e=Object(ct.b)()._store.getState(),Ae=_e.user;return((me=Ae.userInfo)===null||me===void 0?void 0:me.professional_certification)?!0:(pe.a.confirm({title:"\u63D0\u793A",centered:!0,content:se.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(Pe.L)("/account/certification")}}),!1)},de=function(){return Object(dt.a)()?!0:(pe.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",content:se.a.createElement("div",{className:"tc",style:{marginLeft:-38}},se.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650"),se.a.createElement("img",{src:Object(dt.t)()?i("WdTA"):"".concat(ze.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200}),se.a.createElement("div",{className:"tc"},"\u7FA4\u53F7\uFF1A",Object(dt.t)()?"693542422":"612934990")),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(Pe.L)("//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd")}}),!1)},Je=function(me,_e){return me?!0:(pe.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:se.a.createElement("div",null,se.a.createElement("p",null,_e||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),se.a.createElement("div",{style:{marginLeft:"110px"}},se.a.createElement("img",{src:i("1ZF9"),width:200}),se.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(Pe.L)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},ft=function(me){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",Ae=Object(ct.b)()._store.getState(),re=Ae.shixunsDetail.detail;return(re==null?void 0:re.public)===2||(re==null?void 0:re.public)===1||(re==null?void 0:re.shixun_status)===3?(pe.a.info({centered:!0,icon:se.a.createElement(we.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:se.a.createElement("div",{className:"tc",style:{marginLeft:-38}},se.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},se.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(re==null?void 0:re.public)===2?"\u5DF2\u516C\u5F00":(re==null?void 0:re.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",_e,"\u3002"),se.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),se.a.createElement("img",{style:{border:"4px solid #1890FF",borderRadius:"4px"},src:ce.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(re==null?void 0:re.shixun_status)===2?(pe.a.confirm({centered:!0,icon:se.a.createElement(we.a,null),title:"\u63D0\u793A",content:se.a.createElement("div",null,se.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",_e,"\u3002"),se.a.createElement("br",null),se.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){pe.a.confirm({width:440,centered:!0,icon:se.a.createElement(we.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var N=Object(Be.a)(He().mark(function Ve(){var Ie;return He().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,me({type:"shixunsDetail/cancelRelease",payload:{id:re==null?void 0:re.identifier}});case 2:Ie=De.sent,Ie.status!==401&&(qe.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),me({type:"shixunsDetail/getShixunsDetail",payload:{id:re==null?void 0:re.identifier}}),me({type:"practiceSetting/getCommonData",payload:{id:re==null?void 0:re.identifier}}));case 4:case"end":return De.stop()}},Ve)}));function rt(){return N.apply(this,arguments)}return rt}()})}}),!0):!1}},WdTA:function(Xe,Me,i){Xe.exports=i.p+"static/studnetqun.a5754d96.png"},eoI0:function(Xe,Me,i){Xe.exports={selectSchool:"selectSchool___2Vrh7",delete:"delete___qM8Jm"}},hgre:function(Xe,Me,i){"use strict";var lt=i("9og8"),qe=i("q1tI"),Be=i.n(qe),st=i("GUcZ"),pe=i("pWdF");function f(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return we};var Pe,we={},$e=Object.prototype,ce=$e.hasOwnProperty,ze=Object.defineProperty||function(s,u,c){s[u]=c.value},He=typeof Symbol=="function"?Symbol:{},Ge=He.iterator||"@@iterator",Ye=He.asyncIterator||"@@asyncIterator",it=He.toStringTag||"@@toStringTag";function ye(s,u,c){return Object.defineProperty(s,u,{value:c,enumerable:!0,configurable:!0,writable:!0}),s[u]}try{ye({},"")}catch(s){ye=function(c,C,O){return c[C]=O}}function de(s,u,c,C){var O=u&&u.prototype instanceof re?u:re,j=Object.create(O.prototype),he=new ue(C||[]);return ze(j,"_invoke",{value:A(s,c,he)}),j}function Je(s,u,c){try{return{type:"normal",arg:s.call(u,c)}}catch(C){return{type:"throw",arg:C}}}we.wrap=de;var ft="suspendedStart",Re="suspendedYield",me="executing",_e="completed",Ae={};function re(){}function nt(){}function N(){}var rt={};ye(rt,Ge,function(){return this});var Ve=Object.getPrototypeOf,Ie=Ve&&Ve(Ve(Ee([])));Ie&&Ie!==$e&&ce.call(Ie,Ge)&&(rt=Ie);var et=N.prototype=re.prototype=Object.create(rt);function De(s){["next","throw","return"].forEach(function(u){ye(s,u,function(c){return this._invoke(u,c)})})}function te(s,u){function c(O,j,he,Ce){var Y=Je(s[O],s,j);if(Y.type!=="throw"){var We=Y.arg,oe=We.value;return oe&&typeof oe=="object"&&ce.call(oe,"__await")?u.resolve(oe.__await).then(function(be){c("next",be,he,Ce)},function(be){c("throw",be,he,Ce)}):u.resolve(oe).then(function(be){We.value=be,he(We)},function(be){return c("throw",be,he,Ce)})}Ce(Y.arg)}var C;ze(this,"_invoke",{value:function(j,he){function Ce(){return new u(function(Y,We){c(j,he,Y,We)})}return C=C?C.then(Ce,Ce):Ce()}})}function A(s,u,c){var C=ft;return function(O,j){if(C===me)throw new Error("Generator is already running");if(C===_e){if(O==="throw")throw j;return{value:Pe,done:!0}}for(c.method=O,c.arg=j;;){var he=c.delegate;if(he){var Ce=U(he,c);if(Ce){if(Ce===Ae)continue;return Ce}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(C===ft)throw C=_e,c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);C=me;var Y=Je(s,u,c);if(Y.type==="normal"){if(C=c.done?_e:Re,Y.arg===Ae)continue;return{value:Y.arg,done:c.done}}Y.type==="throw"&&(C=_e,c.method="throw",c.arg=Y.arg)}}}function U(s,u){var c=u.method,C=s.iterator[c];if(C===Pe)return u.delegate=null,c==="throw"&&s.iterator.return&&(u.method="return",u.arg=Pe,U(s,u),u.method==="throw")||c!=="return"&&(u.method="throw",u.arg=new TypeError("The iterator does not provide a '"+c+"' method")),Ae;var O=Je(C,s.iterator,u.arg);if(O.type==="throw")return u.method="throw",u.arg=O.arg,u.delegate=null,Ae;var j=O.arg;return j?j.done?(u[s.resultName]=j.value,u.next=s.nextLoc,u.method!=="return"&&(u.method="next",u.arg=Pe),u.delegate=null,Ae):j:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,Ae)}function ae(s){var u={tryLoc:s[0]};1 in s&&(u.catchLoc=s[1]),2 in s&&(u.finallyLoc=s[2],u.afterLoc=s[3]),this.tryEntries.push(u)}function Q(s){var u=s.completion||{};u.type="normal",delete u.arg,s.completion=u}function ue(s){this.tryEntries=[{tryLoc:"root"}],s.forEach(ae,this),this.reset(!0)}function Ee(s){if(s||s===""){var u=s[Ge];if(u)return u.call(s);if(typeof s.next=="function")return s;if(!isNaN(s.length)){var c=-1,C=function O(){for(;++c<s.length;)if(ce.call(s,c))return O.value=s[c],O.done=!1,O;return O.value=Pe,O.done=!0,O};return C.next=C}}throw new TypeError(typeof s+" is not iterable")}return nt.prototype=N,ze(et,"constructor",{value:N,configurable:!0}),ze(N,"constructor",{value:nt,configurable:!0}),nt.displayName=ye(N,it,"GeneratorFunction"),we.isGeneratorFunction=function(s){var u=typeof s=="function"&&s.constructor;return!!u&&(u===nt||(u.displayName||u.name)==="GeneratorFunction")},we.mark=function(s){return Object.setPrototypeOf?Object.setPrototypeOf(s,N):(s.__proto__=N,ye(s,it,"GeneratorFunction")),s.prototype=Object.create(et),s},we.awrap=function(s){return{__await:s}},De(te.prototype),ye(te.prototype,Ye,function(){return this}),we.AsyncIterator=te,we.async=function(s,u,c,C,O){O===void 0&&(O=Promise);var j=new te(de(s,u,c,C),O);return we.isGeneratorFunction(u)?j:j.next().then(function(he){return he.done?he.value:j.next()})},De(et),ye(et,it,"Generator"),ye(et,Ge,function(){return this}),ye(et,"toString",function(){return"[object Generator]"}),we.keys=function(s){var u=Object(s),c=[];for(var C in u)c.push(C);return c.reverse(),function O(){for(;c.length;){var j=c.pop();if(j in u)return O.value=j,O.done=!1,O}return O.done=!0,O}},we.values=Ee,ue.prototype={constructor:ue,reset:function(u){if(this.prev=0,this.next=0,this.sent=this._sent=Pe,this.done=!1,this.delegate=null,this.method="next",this.arg=Pe,this.tryEntries.forEach(Q),!u)for(var c in this)c.charAt(0)==="t"&&ce.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=Pe)},stop:function(){this.done=!0;var u=this.tryEntries[0].completion;if(u.type==="throw")throw u.arg;return this.rval},dispatchException:function(u){if(this.done)throw u;var c=this;function C(We,oe){return he.type="throw",he.arg=u,c.next=We,oe&&(c.method="next",c.arg=Pe),!!oe}for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O],he=j.completion;if(j.tryLoc==="root")return C("end");if(j.tryLoc<=this.prev){var Ce=ce.call(j,"catchLoc"),Y=ce.call(j,"finallyLoc");if(Ce&&Y){if(this.prev<j.catchLoc)return C(j.catchLoc,!0);if(this.prev<j.finallyLoc)return C(j.finallyLoc)}else if(Ce){if(this.prev<j.catchLoc)return C(j.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return C(j.finallyLoc)}}}},abrupt:function(u,c){for(var C=this.tryEntries.length-1;C>=0;--C){var O=this.tryEntries[C];if(O.tryLoc<=this.prev&&ce.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var j=O;break}}j&&(u==="break"||u==="continue")&&j.tryLoc<=c&&c<=j.finallyLoc&&(j=null);var he=j?j.completion:{};return he.type=u,he.arg=c,j?(this.method="next",this.next=j.finallyLoc,Ae):this.complete(he)},complete:function(u,c){if(u.type==="throw")throw u.arg;return u.type==="break"||u.type==="continue"?this.next=u.arg:u.type==="return"?(this.rval=this.arg=u.arg,this.method="return",this.next="end"):u.type==="normal"&&c&&(this.next=c),Ae},finish:function(u){for(var c=this.tryEntries.length-1;c>=0;--c){var C=this.tryEntries[c];if(C.finallyLoc===u)return this.complete(C.completion,C.afterLoc),Q(C),Ae}},catch:function(u){for(var c=this.tryEntries.length-1;c>=0;--c){var C=this.tryEntries[c];if(C.tryLoc===u){var O=C.completion;if(O.type==="throw"){var j=O.arg;Q(C)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(u,c,C){return this.delegate={iterator:Ee(u),resultName:c,nextLoc:C},this.method==="next"&&(this.arg=Pe),Ae}},we}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function se(Pe,we){return Pe-we}function ct(Pe){Pe.sort(se);for(var we=0,$e=0;$e<Pe.length-1;$e++){var ce=Math.abs(Pe[$e+1]-Pe[$e]);ce<21&&(we+=ce)}return we}var dt=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;Me.a=Object(qe.forwardRef)(function(Pe,we){var $e,ce=Pe.src,ze=Pe.videoId,He=Pe.logWatchHistory,Ge=Pe.courseId,Ye=Ge===void 0?null:Ge,it=Pe.startTime,ye=Pe.handlePause,de=ye===void 0?function(){}:ye,Je=Pe.handlePlay,ft=Je===void 0?function(){}:Je,Re=Pe.handlePlayEnded,me=Re===void 0?function(){}:Re,_e=Pe.videoSpeed,Ae=_e===void 0?1:_e,re=ce==null||(($e=ce.split("."))===null||$e===void 0)?void 0:$e.pop(),nt=re==="flv",N=Object(qe.useRef)(),rt=navigator.userAgent.toLowerCase().match(dt),Ve=rt?rt[0]:"pc",Ie=Object(qe.useRef)(!1),et=0,De=0,te=0,A=null,U=!1,ae=20,Q=1,ue=!1,Ee=!1,s=[];Object(qe.useImperativeHandle)(we,function(){return{getLastUpdatedTime:function(){return N.current.currentTime},getDuration:function(){return N.current.duration}}});var u=Object(qe.useCallback)(function(c){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O={point:N.current.currentTime};A?(O.log_id=A,O.watch_duration=ct(s),O.total_duration=De):(Ye?(O.video_id=parseInt(ze,10),O.course_id=Ye):O.video_id=ze,O.duration=et,O.device=Ve),C&&(O.ed="1");function j(){return he.apply(this,arguments)}function he(){return he=Object(lt.a)(f().mark(function Ce(){var Y;return f().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ue=!0,oe.next=3,He(O);case 3:Y=oe.sent,A=Y,ue=!1,c&&c();case 7:case"end":return oe.stop()}},Ce)})),he.apply(this,arguments)}j()},[ze,Ye]);return Object(qe.useEffect)(function(){var c=null;return st.a.isSupported&&nt&&ce&&(ce==null?void 0:ce.indexOf(".m3u8"))<0?(c=st.a.createPlayer({type:"flv",volume:.8,cors:!0,url:ce,muted:!1}),N.current&&(c.attachMediaElement(N.current),c.load())):N.current.setAttribute("src",ce),function(){c&&(c.unload(),c.pause(),c.destroy(),c=null)}},[N,nt,ce]),Object(qe.useEffect)(function(){function c(){ft(),it&&!Ie.current&&(N.current.currentTime=it),Ie.current=!0,s.push(N.current.currentTime),U||(U=!0,u())}function C(){return O.apply(this,arguments)}function O(){return O=Object(lt.a)(f().mark(function oe(){return f().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:s.push(N.current.currentTime),u(function(){A=null,te=0,U=!1,ue=!1,Ee=!1,s=[],De=0,Q=1},!0);case 2:case"end":return Qe.stop()}},oe)})),O.apply(this,arguments)}function j(){if(!Ee){var oe=N.current.currentTime,be=oe-te;Math.abs(be)<10?(De+=Math.abs(be),te=oe,ue||De-Q*ae>=0&&(Q++,s.push(te),u())):(te=oe,u())}}function he(){Ee=!0}function Ce(){N.current.playing&&s.push(N.current.currentTime,te),te=N.current.currentTime,Ee=!1}function Y(){et=N.current.duration,et<=20&&(ae=et/3),N.current.addEventListener("play",c)}function We(){de()}return N.current.addEventListener("canplay",Y),N.current.addEventListener("ended",C),N.current.addEventListener("seeking",he),N.current.addEventListener("seeked",Ce),N.current.addEventListener("timeupdate",j),N.current.addEventListener("pause",We),function(){N.current.removeEventListener("canplay",Y),N.current.removeEventListener("play",c),N.current.removeEventListener("ended",C),N.current.removeEventListener("seeking",he),N.current.removeEventListener("seeked",Ce),N.current.removeEventListener("timeupdate",j),N.current.removeEventListener("pause",We),N.current.playing&&(s.push(te,N.current.currentTime),u())}},[N,ce]),Object(qe.useEffect)(function(){if(N.current.onended=function(){me(N)},N.current.oncontextmenu=function(){return!1},N.current.playbackRate=Ae,ce.indexOf(".m3u8")>-1){if(N.current.canPlayType("application/vnd.apple.mpegurl"))N.current.src=ce;else if(pe.a.isSupported()){var c=new pe.a;c.loadSource(ce),c.attachMedia(N.current)}}},[ce,Ae]),Be.a.createElement("video",{ref:N,controls:!0,autoPlay:!1,controlsList:"nodownload",muted:!1})})},kwm0:function(Xe,Me,i){Xe.exports={modal:"modal___1jX7c",uploadWrap:"uploadWrap___3-sVK",upload:"upload___2LemY",uploadLink:"uploadLink___j9Fsx",fileProgress:"fileProgress___11p3K",fileCancel:"fileCancel___3Mx9l",videoName:"videoName___2a-ZN",contentItem:"contentItem___1gUuj"}},mOS8:function(Xe,Me,i){Xe.exports=i.p+"static/403Qrcode.6c17b6f4.png"},nUhQ:function(Xe,Me,i){Xe.exports={flex_box_center:"flex_box_center___1OQ1z",flex_space_between:"flex_space_between___22uwF",flex_box_vertical_center:"flex_box_vertical_center___1xWAr",flex_box_center_end:"flex_box_center_end___1QTe3",flex_box_column:"flex_box_column___lWxZG",banner:"banner___1Hzq6",wrap:"wrap___1D5RS",title:"title___1LzGm",contentWrap:"contentWrap___19oxo",button:"button___3chJs",rating:"rating___3ODxx"}},sBCT:function(Xe,Me,i){"use strict";var lt=i("DZo9"),qe=i("8z0m"),Be=i("+L6B"),st=i("2/Rp"),pe=i("MXD1"),f=i("CFYs"),se=i("9og8"),ct=i("2qtc"),dt=i("kLXV"),Pe=i("miYZ"),we=i("tsqr"),$e=i("y8nQ"),ce=i("Vl3Y"),ze=i("tJVT"),He=i("k1fw"),Ge=i("oBTY"),Ye=i("5NDa"),it=i("5rEg"),ye=i("q1tI"),de=i.n(ye),Je=i("Ty5D"),ft=i("55Ip"),Re=i("9kvl"),me=i("kwm0"),_e=i.n(me),Ae=i("Aky1"),re=i("h/US"),nt=i("m3rI");function N(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */N=function(){return te};var De,te={},A=Object.prototype,U=A.hasOwnProperty,ae=Object.defineProperty||function(g,d,L){g[d]=L.value},Q=typeof Symbol=="function"?Symbol:{},ue=Q.iterator||"@@iterator",Ee=Q.asyncIterator||"@@asyncIterator",s=Q.toStringTag||"@@toStringTag";function u(g,d,L){return Object.defineProperty(g,d,{value:L,enumerable:!0,configurable:!0,writable:!0}),g[d]}try{u({},"")}catch(g){u=function(L,z,q){return L[z]=q}}function c(g,d,L,z){var q=d&&d.prototype instanceof We?d:We,H=Object.create(q.prototype),Ke=new ut(z||[]);return ae(H,"_invoke",{value:Z(g,L,Ke)}),H}function C(g,d,L){try{return{type:"normal",arg:g.call(d,L)}}catch(z){return{type:"throw",arg:z}}}te.wrap=c;var O="suspendedStart",j="suspendedYield",he="executing",Ce="completed",Y={};function We(){}function oe(){}function be(){}var Qe={};u(Qe,ue,function(){return this});var x=Object.getPrototypeOf,v=x&&x(x(ot([])));v&&v!==A&&U.call(v,ue)&&(Qe=v);var y=be.prototype=We.prototype=Object.create(Qe);function S(g){["next","throw","return"].forEach(function(d){u(g,d,function(L){return this._invoke(d,L)})})}function W(g,d){function L(q,H,Ke,tt){var at=C(g[q],g,H);if(at.type!=="throw"){var ht=at.arg,vt=ht.value;return vt&&typeof vt=="object"&&U.call(vt,"__await")?d.resolve(vt.__await).then(function(_){L("next",_,Ke,tt)},function(_){L("throw",_,Ke,tt)}):d.resolve(vt).then(function(_){ht.value=_,Ke(ht)},function(_){return L("throw",_,Ke,tt)})}tt(at.arg)}var z;ae(this,"_invoke",{value:function(H,Ke){function tt(){return new d(function(at,ht){L(H,Ke,at,ht)})}return z=z?z.then(tt,tt):tt()}})}function Z(g,d,L){var z=O;return function(q,H){if(z===he)throw new Error("Generator is already running");if(z===Ce){if(q==="throw")throw H;return{value:De,done:!0}}for(L.method=q,L.arg=H;;){var Ke=L.delegate;if(Ke){var tt=je(Ke,L);if(tt){if(tt===Y)continue;return tt}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(z===O)throw z=Ce,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);z=he;var at=C(g,d,L);if(at.type==="normal"){if(z=L.done?Ce:j,at.arg===Y)continue;return{value:at.arg,done:L.done}}at.type==="throw"&&(z=Ce,L.method="throw",L.arg=at.arg)}}}function je(g,d){var L=d.method,z=g.iterator[L];if(z===De)return d.delegate=null,L==="throw"&&g.iterator.return&&(d.method="return",d.arg=De,je(g,d),d.method==="throw")||L!=="return"&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+L+"' method")),Y;var q=C(z,g.iterator,d.arg);if(q.type==="throw")return d.method="throw",d.arg=q.arg,d.delegate=null,Y;var H=q.arg;return H?H.done?(d[g.resultName]=H.value,d.next=g.nextLoc,d.method!=="return"&&(d.method="next",d.arg=De),d.delegate=null,Y):H:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,Y)}function Ze(g){var d={tryLoc:g[0]};1 in g&&(d.catchLoc=g[1]),2 in g&&(d.finallyLoc=g[2],d.afterLoc=g[3]),this.tryEntries.push(d)}function Se(g){var d=g.completion||{};d.type="normal",delete d.arg,g.completion=d}function ut(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(Ze,this),this.reset(!0)}function ot(g){if(g||g===""){var d=g[ue];if(d)return d.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var L=-1,z=function q(){for(;++L<g.length;)if(U.call(g,L))return q.value=g[L],q.done=!1,q;return q.value=De,q.done=!0,q};return z.next=z}}throw new TypeError(typeof g+" is not iterable")}return oe.prototype=be,ae(y,"constructor",{value:be,configurable:!0}),ae(be,"constructor",{value:oe,configurable:!0}),oe.displayName=u(be,s,"GeneratorFunction"),te.isGeneratorFunction=function(g){var d=typeof g=="function"&&g.constructor;return!!d&&(d===oe||(d.displayName||d.name)==="GeneratorFunction")},te.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,be):(g.__proto__=be,u(g,s,"GeneratorFunction")),g.prototype=Object.create(y),g},te.awrap=function(g){return{__await:g}},S(W.prototype),u(W.prototype,Ee,function(){return this}),te.AsyncIterator=W,te.async=function(g,d,L,z,q){q===void 0&&(q=Promise);var H=new W(c(g,d,L,z),q);return te.isGeneratorFunction(d)?H:H.next().then(function(Ke){return Ke.done?Ke.value:H.next()})},S(y),u(y,s,"Generator"),u(y,ue,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),te.keys=function(g){var d=Object(g),L=[];for(var z in d)L.push(z);return L.reverse(),function q(){for(;L.length;){var H=L.pop();if(H in d)return q.value=H,q.done=!1,q}return q.done=!0,q}},te.values=ot,ut.prototype={constructor:ut,reset:function(d){if(this.prev=0,this.next=0,this.sent=this._sent=De,this.done=!1,this.delegate=null,this.method="next",this.arg=De,this.tryEntries.forEach(Se),!d)for(var L in this)L.charAt(0)==="t"&&U.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=De)},stop:function(){this.done=!0;var d=this.tryEntries[0].completion;if(d.type==="throw")throw d.arg;return this.rval},dispatchException:function(d){if(this.done)throw d;var L=this;function z(ht,vt){return Ke.type="throw",Ke.arg=d,L.next=ht,vt&&(L.method="next",L.arg=De),!!vt}for(var q=this.tryEntries.length-1;q>=0;--q){var H=this.tryEntries[q],Ke=H.completion;if(H.tryLoc==="root")return z("end");if(H.tryLoc<=this.prev){var tt=U.call(H,"catchLoc"),at=U.call(H,"finallyLoc");if(tt&&at){if(this.prev<H.catchLoc)return z(H.catchLoc,!0);if(this.prev<H.finallyLoc)return z(H.finallyLoc)}else if(tt){if(this.prev<H.catchLoc)return z(H.catchLoc,!0)}else{if(!at)throw new Error("try statement without catch or finally");if(this.prev<H.finallyLoc)return z(H.finallyLoc)}}}},abrupt:function(d,L){for(var z=this.tryEntries.length-1;z>=0;--z){var q=this.tryEntries[z];if(q.tryLoc<=this.prev&&U.call(q,"finallyLoc")&&this.prev<q.finallyLoc){var H=q;break}}H&&(d==="break"||d==="continue")&&H.tryLoc<=L&&L<=H.finallyLoc&&(H=null);var Ke=H?H.completion:{};return Ke.type=d,Ke.arg=L,H?(this.method="next",this.next=H.finallyLoc,Y):this.complete(Ke)},complete:function(d,L){if(d.type==="throw")throw d.arg;return d.type==="break"||d.type==="continue"?this.next=d.arg:d.type==="return"?(this.rval=this.arg=d.arg,this.method="return",this.next="end"):d.type==="normal"&&L&&(this.next=L),Y},finish:function(d){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z.finallyLoc===d)return this.complete(z.completion,z.afterLoc),Se(z),Y}},catch:function(d){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z.tryLoc===d){var q=z.completion;if(q.type==="throw"){var H=q.arg;Se(z)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(d,L,z){return this.delegate={iterator:ot(d),resultName:L,nextLoc:z},this.method==="next"&&(this.arg=De),Y}},te}var rt=it.a.TextArea,Ve=1024,Ie=function(te,A){var U,ae=A.payload||{},Q=ae.uploadInfo,ue=Q===void 0?{}:Q;switch(A.type){case"addVideo":return{videoList:[].concat(Object(Ge.a)(te.videoList),[{name:ue.file.name,size:ue.file.size,type:ue.file.type,fileHash:ue.fileHash,state:ue.state,videoId:ue.videoId,loaded:ue.loaded||0,title:""}])};case"removeVideo":return{videoList:te.videoList.filter(function(Ee){return Ee.name!==A.payload.name})};case"removeAll":return{videoList:[]};case"updateProgress":return{videoList:te.videoList.map(function(Ee){return Ee.name===A.payload.uploadInfo.file.name?Object(He.a)(Object(He.a)({},Ee),{loaded:A.payload.progressPercent,videoId:ue.videoId,fileHash:ue.fileHash}):Ee})};case"updateTitle":return{videoList:(U=te.videoList)===null||U===void 0?void 0:U.map(function(Ee){return Ee.name===A.payload.item.name?Object(He.a)(Object(He.a)({},Ee),{title:A.payload.title}):Ee})};default:return{videoList:[]}}},et=function(te){var A,U=te.user,ae=te.globalSetting,Q=te.loading,ue=te.dispatch,Ee=te.visible,s=te.editData,u=te.onCancel,c=u===void 0?function(){}:u,C=te.onOk,O=C===void 0?function(){}:C,j=Object(Je.m)(),he=ce.a.useForm(),Ce=Object(ze.a)(he,1),Y=Ce[0],We=Object(ye.useReducer)(Ie,{videoList:[]}),oe=Object(ze.a)(We,2),be=oe[0],Qe=oe[1],x=Object(ye.useState)(!1),v=Object(ze.a)(x,2),y=v[0],S=v[1],W=Object(ye.useRef)(),Z=Object(ye.useState)(),je=Object(ze.a)(Z,2),Ze=je[0],Se=je[1],ut=Object(ye.useState)(!1),ot=Object(ze.a)(ut,2),g=ot[0],d=ot[1],L=Object(ye.useState)(!1),z=Object(ze.a)(L,2),q=z[0],H=z[1],Ke=Object(ye.useState)([]),tt=Object(ze.a)(Ke,2),at=tt[0],ht=tt[1],vt=Object(ye.useState)([]),_=Object(ze.a)(vt,2),h=_[0],$=_[1];Object(ye.useEffect)(function(){if(!s)return;d(s.is_link),Se(s.link),!s.is_link&&Qe({type:"addVideo",payload:{uploadInfo:{file:{name:s.file_name},videoId:s.video_id,loaded:100}}}),Y.setFieldsValue({name:s.name,description:s.description,attachment_id:s==null?void 0:s.attachment_id})},[s]);var D=function(){var M=document.getElementById("fileUpload");M.value=""},ve=function(M){var K;d(!1);var V=M.target.files[0];if(!V){D();return}var p=V.name.toLowerCase();if(p&&p.indexOf(".avi")==-1&&p.indexOf(".flv")==-1&&p.indexOf(".f4v")==-1&&p.indexOf(".m4v")==-1&&p.indexOf(".mov")==-1&&p.indexOf(".mp4")==-1&&p.indexOf(".rmvb")==-1&&p.indexOf(".swf")==-1&&p.indexOf(".webm")==-1&&p.indexOf(".wmv")==-1){we.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),D();return}if(V.size>Ve*1024*1024){we.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),D();return}if((K=be.videoList)===null||K===void 0?void 0:K.find(function(I){return I.name===V.name})){we.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),D();return}ge(V)},Te=function(M,K){dt.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:de.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",K?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){D(),Qe({type:"removeVideo",payload:{name:M}})}})},ge=function(M){var K,V='{"Vod":{}}';if(S(!0),W.current){W.current.addFile(M,null,null,null,V);return}Object(Ae.a)((K=U.userInfo)===null||K===void 0?void 0:K.login,{create:!W,addFileSuccess:function(I){Qe({type:"addVideo",payload:{uploadInfo:I}})},onUploadProgress:function(I,ie,T){var Le=Math.ceil(T*100);Qe({type:"updateProgress",payload:{uploadInfo:I,progressPercent:Le}}),D()},onUploadFailed:function(I){we.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(I){S(!1)},onUploadSucceed:function(I){S(!1)},onUploadError:function(I){S(!1)},gotUploader:function(I){I.addFile(M,null,null,null,V),W.current=I}})},ke=function(){var ee=Object(se.a)(N().mark(function M(){var K,V,p,I;return N().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,Y.validateFields();case 2:if(!(!g&&!((K=be.videoList)===null||K===void 0?void 0:K.length)||g&&!Ze)){T.next=5;break}return we.b.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE"),T.abrupt("return");case 5:H(!0),p=g?{link:Ze}:{video_id:(V=be.videoList)===null||V===void 0?void 0:V[0].videoId};debugger;return T.next=10,O(Object(He.a)(Object(He.a)({},p),{name:Y.getFieldValue("name"),attachment_id:Y.getFieldValue("attachment_id"),description:Y.getFieldValue("description")}));case 10:I=T.sent,H(!1),I.id&&Ue();case 13:case"end":return T.stop()}},M)}));return function(){return ee.apply(this,arguments)}}(),Ue=function(){Y.resetFields(),Qe({type:"removeAll"}),Se(null),d(null)},F=function(){c(),Ue()},Ne={name:"file",multiple:!0,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",action:nt.a.API_SERVER+"/api/attachments.json",withCredentials:!0,onRemove:function(M){$([])},onChange:function(M){var K=M.file.status;if(K!=="uploading",K==="removed"&&ht(M.fileList),K==="done"){var V,p,I;ht(M==null||((V=M.fileList)===null||V===void 0)?void 0:V.slice(-1)),Qe({type:"addVideo",payload:{uploadInfo:{videoId:M==null||((p=M.fileList[0])===null||p===void 0||((I=p.response)===null||I===void 0))?void 0:I.id,loaded:100,file:Object(He.a)({},M==null?void 0:M.fileList[0])}}}),d(!1),we.b.success("".concat(M.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))}else K==="error"&&we.b.error("".concat(M.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(M){var K=M.size/1024/1024<1e3;return K||we.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),K}},Fe=function(){var M,K,V,p,I,ie,T,Le,R,J,E,ne;return de.a.createElement(de.a.Fragment,null,!g&&!!((M=be.videoList)===null||M===void 0?void 0:M.length)&&de.a.createElement("div",{className:_e.a.fileProgress},((K=be.videoList)===null||K===void 0||((V=K[0])===null||V===void 0)?void 0:V.loaded)==100?de.a.createElement("div",{className:"".concat(_e.a.videoName," font14")},(p=be.videoList)===null||p===void 0||((I=p[0])===null||I===void 0)?void 0:I.name):de.a.createElement(f.a,{style:{width:"80%"},percent:(ie=be.videoList)===null||ie===void 0||((T=ie[0])===null||T===void 0)?void 0:T.loaded,status:((Le=be.videoList)===null||Le===void 0||((R=Le[0])===null||R===void 0)?void 0:R.loaded)==100?"normal":"active"}),de.a.createElement("div",{className:_e.a.fileCancel,onClick:function(){var B,fe,X,b;return Te((B=be.videoList)===null||B===void 0||((fe=B[0])===null||fe===void 0)?void 0:fe.name,((X=be.videoList)===null||X===void 0||((b=X[0])===null||b===void 0)?void 0:b.loaded)==100)}},((J=be.videoList)===null||J===void 0||((E=J[0])===null||E===void 0)?void 0:E.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),!((ne=be.videoList)===null||ne===void 0?void 0:ne.length)&&de.a.createElement("div",{className:_e.a.uploadWrap},de.a.createElement("label",{htmlFor:"fileUpload",style:{marginRight:"30px"}},de.a.createElement(qe.a,Ne,de.a.createElement(st.a,{className:_e.a.upload,disabled:(h==null?void 0:h.length)>0},de.a.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891"))),de.a.createElement("label",{className:"".concat(_e.a.upload," ").concat(_e.a.uploadLink),onClick:function(){return d(!0)}},de.a.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),g&&de.a.createElement(it.a,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:Ze,onChange:function(B){return Se(B.target.value)}}))};return de.a.createElement(dt.a,{centered:!0,maskClosable:!1,title:s?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:_e.a.modal,visible:Ee,confirmLoading:q,onOk:ke,onCancel:F},de.a.createElement(ce.a,{form:Y},de.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ve,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),de.a.createElement(ce.a.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},de.a.createElement(it.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),de.a.createElement(ce.a.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:_e.a.contentItem},Fe()),de.a.createElement(ce.a.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},de.a.createElement(re.a,{getFileProgress:function(M){if(M.file.status==="uploading"){H(!0);return}M.file.status==="done"&&H(!1)}})),de.a.createElement(ce.a.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},de.a.createElement(rt,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),de.a.createElement("div",{className:"c-grey-999"},de.a.createElement("div",null,"\u6CE8\u610F\uFF1A"),de.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",de.a.createElement(ft.Link,{to:"/users/".concat((A=U.userInfo)===null||A===void 0?void 0:A.login,"/videos/protocol"),target:"_blank",className:_e.a.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),de.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),de.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),de.a.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};Me.a=Object(Re.a)(function(De){var te=De.user,A=De.loading,U=De.globalSetting;return{user:te,globalSetting:U,loading:A}})(et)},sWEp:function(Xe,Me,i){Xe.exports={wrap:"wrap___3nJXB",title:"title___3AYM5",radioWrap:"radioWrap___dbSML",radio:"radio___3h-_z",colorFF0000:"colorFF0000___2d_ZE",pagination:"pagination___3WP6s"}},vZDz:function(Xe,Me,i){Xe.exports={contentWrap:"contentWrap___3Fc2r",footer:"footer___4nxVN",radioGroup:"radioGroup___359yE",wrap:"wrap___1OqR3",introName:"introName___3saG-",rating:"rating___3X95K",modalRating:"modalRating___A4qeN"}}}]);