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
24 KiB
2 lines
24 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6444],{6629:function(Ze,te,s){var a=s(59301),O=s(93314),ne=s(3113),$=Object.defineProperty,ae=Object.defineProperties,H=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,G=(_,u,C)=>u in _?$(_,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):_[u]=C,g=(_,u)=>{for(var C in u||(u={}))ve.call(u,C)&&G(_,C,u[C]);if(I)for(var C of I(u))he.call(u,C)&&G(_,C,u[C]);return _},ye=(_,u)=>ae(_,H(u));const le=({img:_,buttonProps:u={},styles:C={},customText:J,ButtonText:se,ButtonClick:pe,Buttonclass:x,ButtonTwo:i,imgStyles:h,loading:E=!1})=>a.createElement("section",{className:"tc animated fadeIn",style:g(g({},{color:"#999",margin:"100px auto",visibility:E?"hidden":"visible"}),C)},a.createElement("img",{src:_||O,style:ye(g({},h),{pointerEvents:"none",userSelect:"none"})}),a.createElement("p",{className:"mt20 font14"},J||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&a.createElement(ne.ZP,g({className:x,onClick:pe},u),se),i&&i);te.Z=le},95333:function(Ze,te,s){s.d(te,{Z:function(){return pe}});var a=s(59301),O={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ne=s(3113),$=s(74516),ae=s(90612),H=s(6848),I=s(15826),ve=s(21797),he=s(6629),G=s(46961),g=s(70891),ye=Object.defineProperty,le=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,C=(x,i,h)=>i in x?ye(x,i,{enumerable:!0,configurable:!0,writable:!0,value:h}):x[i]=h,J=(x,i)=>{for(var h in i||(i={}))_.call(i,h)&&C(x,h,i[h]);if(le)for(var h of le(i))u.call(i,h)&&C(x,h,i[h]);return x},se=(x,i,h)=>new Promise((E,k)=>{var Ee=m=>{try{ce(h.next(m))}catch(ie){k(ie)}},ue=m=>{try{ce(h.throw(m))}catch(ie){k(ie)}},ce=m=>m.done?E(m.value):Promise.resolve(m.value).then(Ee,ue);ce((h=h.apply(x,i)).next())}),pe=({editOffice:x="view",data:i,theme:h,type:E,filename:k,monacoEditor:Ee,className:ue,style:ce,close:m,onClose:ie,hasMask:ge,disabledDownload:oe,onImgDimensions:d,showNodata:$e,recordInfo:de})=>{const[Ke,Fe]=(0,a.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Te,xe]=(0,a.useState)(""),[Q,we]=(0,a.useState)(),Ne=window.ENV==="build"?"/react/build":"",Oe=location.host.startsWith("localhost")?G.Z.PROXY_SERVER:G.Z.API_SERVER,Ie=10*(1024*1024),_e=(0,a.useRef)();i!=null&&i.startsWith("/api")&&E!=="txt"&&(i=G.Z.API_SERVER+i);const ke=j=>j.substring(j.lastIndexOf("/")+1).split(".").pop();k&&(Ee.filename=k),(0,a.useEffect)(()=>{var j,W;const U=(W=(j=document.cookie)==null?void 0:j.replace(/\s/g,""))==null?void 0:W.split(";");U==null||U.map(Le=>{let De=Le.split("=");De[0]==="_educoder_session"&&xe(De[1])})},[]),(0,a.useEffect)(()=>{E==="office"&&(i.indexOf("bigfilescdn.")>-1||i.indexOf("bigfiles1")>-1?we({url:i,fileType:ke(i),model:i.indexOf("model=edit")?"edit":"view"}):Ae())},[E,i]);const Ae=()=>se(void 0,null,function*(){console.log("data:",i);let j=i;i.startsWith("http")||(j=location.origin+j);let W=new URL(j).pathname.split("/").pop();const U=yield(0,ve.gJ)({attachment_id:W});U.url=Oe+U.url,we(U)}),Se=()=>{if(i.startsWith("http")||i.startsWith("blob:")){Re();return}(0,I.Sv)(k||"educoder",i,k)},Re=()=>{de&&(0,g.fc)({id:de==null?void 0:de.id,watch_type:1,course_id:de==null?void 0:de.course_id}),(0,I.Nd)(k||"educoder",decodeURIComponent(i))};return a.createElement("div",{style:J({},ce||{}),className:`${ge&&O.bgBlack} ${E?O.wrp:"hide"}`},m&&a.createElement("div",{className:O.close,ref:_e},!!d&&a.createElement(H.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>_e.current},a.createElement("span",{onClick:()=>{ie(),d()}},a.createElement("i",{className:"icon-yulanpizhu"}))),!oe&&a.createElement(H.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>_e.current},a.createElement("span",{onClick:Re},a.createElement("i",{className:"icon-quxiaozhiding"}))),a.createElement(H.Z,{title:"\u5173\u95ED",getPopupContainer:()=>_e.current},a.createElement("span",{className:"",onClick:ie},a.createElement("i",{className:"icon-guanbi1"})))),a.createElement("div",{className:`${O[ue]} ${ue} ${O.monaco} ${E==="txt"?"show":"hide"}`},E==="txt"&&a.createElement(a.Fragment,null,a.createElement(ae.ZP,J({},Ee)))),E==="audio"&&a.createElement("audio",{src:`${(i==null?void 0:i.indexOf("http://"))>-1||(i==null?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${i}`,autoPlay:!0}),E==="video"&&a.createElement(a.Fragment,null,(i==null?void 0:i.indexOf("http"))>-1?a.createElement("video",{controls:!0,src:`${i}`,autoPlay:!0}):a.createElement("video",{controls:!0,src:`data:video/mp4;base64,${i}`,autoPlay:!0})),E==="office"&&Q&&a.createElement("iframe",{src:`${Ne}/office.html?key=${Q.key}&url=${btoa(Q.url)}&callbackUrl=${Oe+Q.callbackUrl}&fileType=${Q.fileType}&title=${Q.title}&model=${x}&officeServer=${G.Z.ONLYOFFICE}&disabledDownload=${!!oe}`}),E==="html"&&a.createElement("iframe",{src:i+"&disposition=inline"}),E==="pdf"&&a.createElement("iframe",{src:`${Ne}/js/pdfview/index.html?url=${encodeURIComponent(i)}&disabledDownload=${!!oe}`}),E==="image"&&a.createElement("img",{src:`${(i==null?void 0:i.indexOf("http://"))>-1||(i==null?void 0:i.indexOf("https://"))>-1?"":"data:image/png;base64,"}${i}`}),(E==="other"||E==="download")&&a.createElement(a.Fragment,null,$e?a.createElement(he.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:a.createElement(ne.ZP,{icon:a.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Se},"\u4E0B\u8F7D")}):a.createElement(ne.ZP,{type:"primary",size:"middle",onClick:Se},a.createElement($.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},11142:function(Ze,te,s){s.d(te,{Z:function(){return O}});var a=s(59301);function O(ne,$){const ae=(0,a.useRef)();(0,a.useEffect)(()=>{ae.current=ne}),(0,a.useEffect)(()=>{function H(){ae.current()}if($!==null){let I=setInterval(H,$);return()=>clearInterval(I)}},[$])}},57797:function(Ze,te,s){s.r(te),s.d(te,{default:function(){return et},formatQuery:function(){return Ye}});var a=s(59301),O=s(63144),ne=s(71418),$={bg:"bg___eq_Aq",container:"container___j770l",widthle:"widthle___ouh1T"},ae=s(24334),H=s(45401),I=s(43418),ve=s(97022),he=s(78673),G=s(64165),g={contentWrap:"contentWrap___xMJQi",title:"title___z4t4P",footer:"footer___CLzrT",footer_left:"footer_left___N2sZZ",footer_bfcs:"footer_bfcs___UmvUE",footer_bfcs_value:"footer_bfcs_value___yiYga",pingfen:"pingfen___aEEMe",fenshu:"fenshu___I6HCo",radioGroup:"radioGroup___RT1dL",wrap:"wrap___QZGSJ",introName:"introName___m17tA",rating:"rating___MXLBr",modalRating:"modalRating___aluwj",zdbf:"zdbf___9PNEF"},ye=s(11142),le=s(33288),_=s(15826),u=s(59301),C=Object.defineProperty,J=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,x=(n,t,e)=>t in n?C(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,i=(n,t)=>{for(var e in t||(t={}))se.call(t,e)&&x(n,e,t[e]);if(J)for(var e of J(t))pe.call(t,e)&&x(n,e,t[e]);return n},h=(n,t)=>{var e={};for(var r in n)se.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&J)for(var r of J(n))t.indexOf(r)<0&&pe.call(n,r)&&(e[r]=n[r]);return e},E=(n,t,e)=>new Promise((r,w)=>{var B=f=>{try{D(e.next(f))}catch(y){w(y)}},z=f=>{try{D(e.throw(f))}catch(y){w(y)}},D=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,z);D((e=e.apply(n,t)).next())});const k=n=>{var t=n,{videoDetail:e,globalSetting:r,loading:w,dispatch:B}=t,z=h(t,["videoDetail","globalSetting","loading","dispatch"]);const{queryParams:D,selectParams:f,videoList:y}=e,{subject_id:M,videoId:me}=D,{checkBoxValue:Pe,radioValue:p}=f,re={videoId:me},fe={query:D},Y=(0,a.useRef)(),K=(0,a.useRef)(),q=(0,a.useRef)(),X=(0,a.useRef)(5),{video_item:c}=e.detail||{};(0,ye.Z)(()=>E(void 0,null,function*(){K.current&&(console.log("videoRef lastUpdatedTime: ",Y.current.getLastUpdatedTime()),console.log(Y.current),yield be())}),X.current*1e3);const be=(A=!1)=>{const S=A?{is_f:1}:{};return(0,le.DH)(i(i({},S),{id:re.videoId,point:Y.current.getLastUpdatedTime(),total:Y.current.getDuration()}))},We=A=>(A.ed==="1"&&(K.current=!1,be(!0)),!K.current&&!A.ed&&(K.current=!0,X.current=Y.current.getDuration()<=5?1:5,be()),B({type:"userDetail/logWatchHistory",payload:A})),Ue=()=>{K.current=!1},ze=()=>{K.current=!0},Me=()=>{q.current=5,I.default.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:u.createElement("div",{className:"tc font14"},u.createElement(ve.Z,{defaultValue:q.current,onChange:A=>q.current=A,className:g.modalRating})),onOk:()=>E(void 0,null,function*(){if((yield(0,le.jK)({id:re.videoId,star:q.current})).status===0){const{course_id:S}=(0,_.oP)();B({type:"videoDetail/getVideoDetail",payload:{id:re.videoId,videoId:re.videoId,course_id:S,subject_id:M}})}})})},Ve=A=>{const S=window.filterVideoSign,l=S.findIndex(L=>L.id===me);if(l===S.length-1)return;const o=S[l+1].id,N=S[l+1].can_view,P=S[l+1].link,R=S[l+1].is_public;if(window.checkBoxValue){if(P){window.open(P);return}if(!N){I.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:u.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(!R){I.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:u.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}B({type:"videoDetail/handleListItemClick",payload:{videoId:o}}),window.videoTimer=setTimeout(()=>{A.current.play()},2e3)}},Ce=(A,S)=>{if(A==="checkBox"){const l=S;window.checkBoxValue=l,B({type:"videoDetail/setSelectValue",payload:{radioValue:p,checkBoxValue:l}});return}B({type:"videoDetail/setSelectValue",payload:{checkBoxValue:Pe,radioValue:S.target.value}})},Xe=()=>y.findIndex(l=>l.id===me)===y.length-1?u.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):u.createElement("div",null,u.createElement(he.Z,{onChange:l=>{Ce("checkBox",l)},defaultChecked:Pe,size:"small"}),u.createElement("span",{className:g.zdbf},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891"));return u.createElement("aside",{className:g.contentWrap},u.createElement("aside",{className:g.wrap},u.createElement("header",null),u.createElement("div",{className:g.title},c==null?void 0:c.name),!(c!=null&&c.can_edit)&&!(c!=null&&c.is_public)?u.createElement(G.Z,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):u.createElement(H.Z,{ref:Y,startTime:c==null?void 0:c.last_point,src:c!=null&&c.is_link?c==null?void 0:c.link:(c==null?void 0:c.play_url)&&ae.Base64.decode(c==null?void 0:c.play_url),videoId:c==null?void 0:c.video_id,logWatchHistory:We,handlePause:Ue,handlePlay:ze,allow_skip:c==null?void 0:c.allow_skip,handlePlayEnded:Ve,toLog:()=>{}}),u.createElement("div",{className:g.footer},u.createElement("div",{className:g.footer_left},u.createElement("div",{className:g.pingfen},"\u8BC4\u5206"),u.createElement(ve.Z,{value:c==null?void 0:c.star,disabled:!0,className:g.rating,style:{color:"#FFA100",fontSize:12,marginLeft:10}}),u.createElement("div",{className:g.fenshu},(c==null?void 0:c.star)||0,"\u5206")),!(c!=null&&c.can_edit)&&!(c!=null&&c.is_public)?null:u.createElement("div",null,u.createElement("div",{className:g.checkBox},Xe()))),u.createElement("div",{className:"mt10"},(c==null?void 0:c.description)&&u.createElement("span",{className:g.introName},"\u7B80\u4ECB\uFF1A",c.description))))};var Ee=(0,O.connect)(({videoDetail:n,loading:t,globalSetting:e})=>({videoDetail:n,globalSetting:e,loading:t}))(k),ue=s(8591),ce=s(48209),m={flex_box_center:"flex_box_center___yWqSL",flex_space_between:"flex_space_between___LgFmv",flex_box_vertical_center:"flex_box_vertical_center____lt6U",flex_box_center_end:"flex_box_center_end___UqkaD",flex_box_column:"flex_box_column___V8XLF",list:"list___8tjfT",tree_style:"tree_style___ZzDvO",title:"title___IVfkQ",gray:"gray___RnyYk",brght:"brght___EWRNa",s1:"s1___dPBQg",s3:"s3___SRBBG",active:"active___hsNCX",tree_line:"tree_line___EGn30",tabs_style:"tabs_style___Nwkiq",tabs_item:"tabs_item___Vzu_U",tabs_item_active:"tabs_item_active___BcIwZ"},ie=s(21797),ge=s(84015),oe=s(46961),d=s(59301),$e=Object.defineProperty,de=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Q=(n,t,e)=>t in n?$e(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,we=(n,t)=>{for(var e in t||(t={}))Te.call(t,e)&&Q(n,e,t[e]);if(Fe)for(var e of Fe(t))xe.call(t,e)&&Q(n,e,t[e]);return n},Ne=(n,t)=>de(n,Ke(t)),Oe=(n,t)=>{var e={};for(var r in n)Te.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&Fe)for(var r of Fe(n))t.indexOf(r)<0&&xe.call(n,r)&&(e[r]=n[r]);return e},je=(n,t,e)=>new Promise((r,w)=>{var B=f=>{try{D(e.next(f))}catch(y){w(y)}},z=f=>{try{D(e.throw(f))}catch(y){w(y)}},D=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,z);D((e=e.apply(n,t)).next())});const Ie=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:d.createElement("i",{className:"iconfont icon-shixun2 font20"}),bq:d.createElement("span",{style:{border:"1px solid #FF9D18",color:"#FF9D18"},className:m.s1},"\u5B9E\u8BAD")},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:d.createElement("i",{className:"iconfont icon-shipin font20"}),bq:d.createElement("span",{style:{border:"1px solid #9B18FF",color:"#9B18FF"},className:m.s1},"\u89C6\u9891")},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:d.createElement("i",{className:"iconfont icon-jiaoxueanli font20"}),bq:d.createElement("span",{style:{border:"1px solid #3061D0",color:"#3061D0"},className:m.s1},"\u8D44\u6599")},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:d.createElement("i",{className:"iconfont icon-kongbai font20"}),bq:d.createElement("span",null)}],_e=n=>{var t=n,{dispatch:e,pathsDetail:r,videoDetail:w,user:B}=t,z=Oe(t,["dispatch","pathsDetail","videoDetail","user"]);const{queryParams:D,stages:f,cust_seq:y,active:M}=w,{subject_id:me,course_id:Pe}=D,p=(0,O.useParams)(),[re]=(0,O.useSearchParams)(),[fe,Y]=(0,a.useState)([]),[K,q]=(0,a.useState)([(M==null?void 0:M.id)||Number(p.videoId)]),[X,c]=(0,a.useState)("\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55"),be=[".PDF",".DOC",".DOCX",".XLS",".XLSX",".PPT",".PPTX"];(0,a.useEffect)(()=>{e(me?{type:"videoDetail/getStageData",payload:{subject_id:me,page_type:"video"}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:Pe}})},[]),(0,a.useEffect)(()=>{We()},[w==null?void 0:w.stages]);const We=()=>{let l=fe;f.forEach((v,o)=>{l.push({title:d.createElement("div",{title:v.stage_name,className:m.title},v.stage_name),value:v==null?void 0:v.stage_id,key:v==null?void 0:v.stage_id,icon:d.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Ue(v.items||[])})}),Y(l)},Ue=l=>{function v(o){var N;const P=o.children,R=Array.isArray(P)&&P.length>0,L=o==null?void 0:o.id,{name:F,item_type:V,id:b}=o,ee=(N=Ie.find(Be=>Be.type===V))==null?void 0:N.bq,Z=m.brght,T=M.id===b?`${Z} ${m.active}`:Z;return{title:d.createElement("div",{onClick:()=>Ce(o),className:Z,title:F},ee,d.createElement("div",{className:m.s3},F)),value:L,key:L,icon:d.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:R?P==null?void 0:P.map(Be=>v(Be)):[]}}return l==null?void 0:l.map(o=>v(o))},ze=(l,v)=>je(void 0,null,function*(){e({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF0C\u8BF7\u7A0D\u540E..."}});const o=v?yield(0,ge.BK)({id:l}):yield(0,ge.Ir)({id:l});if(e({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),o!=null&&o.game_identifier||o!=null&&o.identifier){(0,_.xg)(v?`/tasks/${o==null?void 0:o.identifier}/jupyter`:`/tasks/${o.game_identifier}`);return}(o==null?void 0:o.status)===2?Ve(o==null?void 0:o.message):(o==null?void 0:o.status)===3&&Me(o==null?void 0:o.message)}),Me=l=>{I.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:d.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",l,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Ve=l=>{l=l!=null&&l.includes(".json")?l:`${l}.json`,I.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:d.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:()=>je(void 0,null,function*(){const v=yield(0,ie.$Q)({url:l});if(!v)return;ue.ZP.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF01");const o=yield(0,ge.Ir)({id:v.shixun_identifier});if(o!=null&&o.game_identifier){(0,_.xg)(`/tasks/${o.game_identifier}`);return}(o==null?void 0:o.status)===2?Ve(o==null?void 0:o.message):(o==null?void 0:o.status)===3&&Me(o==null?void 0:o.message)})})},Ce=l=>{var v,o,N,P,R;if((l==null?void 0:l.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);const{id:L,item_type:F,identifier:V,is_jupyter:b,url:ee,link:Z}=l;if(F==="VideoItem"&&!Z){if(!((v=B.userInfo)!=null&&v.admin)&&!((o=B.userInfo)!=null&&o.business)&&!l.can_view){I.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:d.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}e({type:"videoDetail/handleListItemClick",payload:{videoId:L}}),e({type:"videoDetail/getVideoDetail",payload:Ne(we({id:L},D),{videoId:L}),callback:T=>{if(T&&T.video_item&&!T.video_item.can_edit&&!l.is_public){I.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:d.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}}});return}if(F==="VideoItem"&&Z){l.link&&(0,le.DH)({is_f:1,id:l.id,point:0,total:0}),window.open(Z);return}if(F==="Shixun"){ze(V,b);return}if(F==="Attachment"){if(Z){(0,_.xg)(Z);return}let T=(P=l==null?void 0:l.name)==null?void 0:P.substr((N=l==null?void 0:l.name)==null?void 0:N.lastIndexOf("."));if(be.includes(T.toUpperCase())){e({type:"videoDetail/handleListItemClick",payload:{attachmentId:L}});return}else{if(!((R=r.detail)!=null&&R.allow_download)){ue.ZP.info("\u6559\u5B66\u8BFE\u4EF6\u4E0D\u652F\u6301\u4E0B\u8F7D");return}(0,_.FH)(l.name,oe.Z.API_SERVER+l.url);return}}window.open(oe.Z.IMG_SERVER+ee)},Xe=l=>{let v=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],o=["","\u5341","\u767E","\u5343","\u4E07"];l=parseInt(l);let N=L=>{let F=L.toString().split("").reverse(),V="";for(var b=0;b<F.length;b++)V=(b==0&&F[b]==0||b>0&&F[b]==0&&F[b-1]==0?"":v[F[b]]+(F[b]==0?o[0]:o[b]))+V;return V},P=Math.floor(l/1e4),R=l%1e4;return R.toString().length<4&&(R="0"+R),P?N(P)+"\u4E07"+N(R):N(l)},A=(l,v,o,N)=>{var P;const{name:R,item_type:L,id:F}=l,V=`${v+1}-${o+1}-${N+1}`,b=(P=Ie.find(T=>T.type===L))==null?void 0:P.icon,ee=m.brght,Z=M.id===F?`${ee} ${m.active}`:ee;return d.createElement("div",{key:V,onClick:()=>Ce(l),className:Z,style:{paddingLeft:52}},d.createElement("span",{className:m.s1},b),!!y&&d.createElement("span",{className:m.s2},V),d.createElement("span",{className:m.s3},"\u203B ",R))},S=(l,v,o)=>{var N;const{name:P,item_type:R,id:L,children:F}=l,V=`${v+1}-${o+1}`,b=(N=Ie.find(T=>T.type===R))==null?void 0:N.icon,ee=m.brght,Z=M.id===L?`${ee} ${m.active}`:ee;return d.createElement(a.Fragment,{key:V},d.createElement("div",{onClick:()=>Ce(l),className:Z},d.createElement("span",{className:m.s1},b),!!y&&d.createElement("span",{className:m.s2},V),d.createElement("span",{className:m.s3},"\u203B ",P)),!!F.length&&F.map((T,Be)=>A(T,v,o,Be)))};return d.createElement("aside",{className:m.list},d.createElement("div",{className:m.tabs_style},d.createElement("div",{className:m.tabs_item,onClick:()=>{c("\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55")}},"\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55",X=="\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55"&&d.createElement("div",{className:m.tabs_item_active}))),d.createElement("div",{className:m.tree_style},(fe==null?void 0:fe.length)>0&&d.createElement(ce.default,{selectedKeys:K,onSelect:(l,v)=>{q([...l])},blockNode:!0,treeData:fe,defaultExpandAll:!0,className:m.tree_line})))};var ke=(0,O.connect)(({user:n,videoDetail:t,loading:e,globalSetting:r,pathsDetail:w})=>({user:n,videoDetail:t,globalSetting:r,loading:e,pathsDetail:w}))(_e),Ae=s(95333),Se=Object.defineProperty,Re=Object.defineProperties,j=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,De=(n,t,e)=>t in n?Se(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,He=(n,t)=>{for(var e in t||(t={}))U.call(t,e)&&De(n,e,t[e]);if(W)for(var e of W(t))Le.call(t,e)&&De(n,e,t[e]);return n},Ge=(n,t)=>Re(n,j(t)),Je=(n,t)=>{var e={};for(var r in n)U.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&W)for(var r of W(n))t.indexOf(r)<0&&Le.call(n,r)&&(e[r]=n[r]);return e},Qe=(n,t,e)=>new Promise((r,w)=>{var B=f=>{try{D(e.next(f))}catch(y){w(y)}},z=f=>{try{D(e.throw(f))}catch(y){w(y)}},D=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,z);D((e=e.apply(n,t)).next())});const Ye=n=>{const{subject_id:t}=n;return{subject_id:t,course_id:t}},qe=n=>{var t=n,{videoDetail:e,globalSetting:r,loading:w,pathsDetail:B,dispatch:z}=t,D=Je(t,["videoDetail","globalSetting","loading","pathsDetail","dispatch"]),f,y;const{queryParams:M,videoList:me,attachmentList:Pe,active:p}=e,{subject_id:re,videoId:fe}=M,Y={videoId:fe};(0,a.useEffect)(()=>{if(p){const{item_type:X,id:c}=p;X==="VideoItem"&&z({type:"videoDetail/getVideoDetail",payload:Ge(He({},M),{id:c})})}},[p.id]),console.log("---",p),(0,a.useEffect)(()=>{re&&K()},[]);function K(){return Qe(this,null,function*(){const X=yield z({type:"pathsDetail/getPathsDetail",payload:{id:re}})})}(0,a.useEffect)(()=>{var X,c;(0,_.Dk)((c=(X=e.detail)==null?void 0:X.video_item)==null?void 0:c.name)},[e]);let q={width:1200};return p&&p.item_type==="Attachment"&&p.content_type==="application/pdf"&&(q={width:1250,marginLeft:(document.body.clientWidth-1200)/2}),a.createElement(ne.Z,{spinning:!1},a.createElement("section",{className:$.bg},a.createElement("div",{className:$.container,style:q},a.createElement(ke,null),p&&p.item_type==="VideoItem"&&a.createElement(Ee,null),p&&p.item_type==="Attachment"&&p.content_type==="application/pdf"&&p.url&&a.createElement("div",{className:$.widthle},a.createElement(Ae.Z,{disabledDownload:!((f=B.detail)!=null&&f.allow_download),type:"pdf",data:oe.Z.API_SERVER+p.url,style:{position:"absolute",zIndex:1}})),p&&p.item_type==="Attachment"&&["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(p.content_type)&&p.url&&a.createElement("div",{className:$.widthle},a.createElement(Ae.Z,{disabledDownload:!((y=B.detail)!=null&&y.allow_download),type:"office",data:oe.Z.API_SERVER+p.url,style:{position:"absolute",zIndex:1}})))))};var et=(0,O.connect)(({videoDetail:n,loading:t,globalSetting:e,pathsDetail:r})=>({videoDetail:n,globalSetting:e,loading:t,pathsDetail:r}))(qe)}}]);
|