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