1import{K as Qt,r as Zt,b as je,d as we,a as Ee,L as Jt,M as Xt,N as Wt,O as eo,m as st,E as nt,P as to,c as oo,e as lo,s as ao,t as so,Q as no,R as io,S as co,v as uo,l as ro}from"./ui-1491e31a.js";import{y as d,m as pe,o as n,e as p,T as r,Y as _,f as o,a2 as s,a1 as z,a8 as W,a9 as te,U as _e,Z,a3 as V,a7 as He,aY as mo,aP as Ue,aQ as Pe,O as oe,G as Ge,v as Ne,aS as Ze,p as he,q as H,Q as ye,a0 as fo,ar as Ye,aV as Ae,V as it,aq as ct,aR as dt,aW as po,r as qe,am as _o,aT as ze,aU as Re,P as ho,A as vo}from"./vendor-4a1bf3a7.js";import{_ as me,J as xe,v as Ve,u as Fe,aR as Je,I as go,n as $e,ab as yo,aW as bo,aX as wo,aY as Co,a6 as ko,aZ as xo,a_ as $o,c as Q,a$ as Fo,b0 as So,f as Te,b1 as Xe,aO as We,b2 as To,aP as Do,b3 as Io,b4 as Eo,b5 as Uo,b6 as Po,b7 as No,b8 as et,G as zo,a9 as tt,b9 as ot,ba as Ro,aa as Vo,a7 as Oo,bb as Mo,bc as Lo,bd as Bo,be as Ao,T as jo,bf as Ho,b as Go}from"./index-6bbd9216.js";import{u as Yo}from"./usePDF-efdff09b.js";import{n as ut}from"./utils-60681157.js";import{d as De,_ as Ke}from"./icon_copy-765b6ca4.js";import"./dom-f7cab880.js";import"./pdf-9bb28b9a.js";import"./oss-c0d776a2.js";const qo=["title"],Ko={class:"content flex flex-col"},Qo={class:"font-normal text-base leading-[20px]"},Zo={class:"dialog-footer mt-8"},Jo={__name:"SameNameTip",props:{dialogVisible:Boolean,fileName:String,file:Object},emits:["continue","close"],setup(g,{emit:h}){const O=g,P=h,x=d(""),$=d("Replace"),i=d("Replace"),w=pe(()=>$.value==="Rename"&&x.value.trim().length===0),R=()=>{$.value=i.value="Replace",x.value=""},E=()=>{$.value=i.value,!w.value&&(P("continue",{type:$.value,replaceName:x.value.trim()+`.${xe(O.file.name)}`}),R())},y=()=>{P("close"),R()};return(u,N)=>{const T=Qt,U=Zt,G=je,L=we,Y=Ee;return n(),p("div",{class:"container",onClick:N[2]||(N[2]=He(()=>{},["stop"]))},[r(Y,{"model-value":g.dialogVisible,class:"text-left",width:"30%","close-on-click-modal":!1,"close-on-press-escape":!1,onClose:y},{header:_(()=>[o("span",{title:g.fileName,class:"text-[#3C3C43]/[0.6]"},s(g.fileName),9,qo)]),footer:_(()=>[o("div",Zo,[r(L,{class:"cancel font-normal text-base leading-[20px]",onClick:y},{default:_(()=>[z(s(u.$t("common.documentCloud.cancel")),1)]),_:1}),r(L,{type:"primary",class:"font-normal text-base leading-[20px]",disabled:w.value,onClick:E},{default:_(()=>[z(s(u.$t("common.documentCloud.continue")),1)]),_:1},8,["disabled"])])]),default:_(()=>[W(o("h2",{class:"title font-bold text-xl leading-[24px]"},s(u.$t("common.documentCloud.Rename")),513),[[te,$.value==="Rename"]]),o("div",Ko,[$.value==="Replace"?(n(),p(_e,{key:0},[o("p",Qo,s(u.$t("common.documentCloud.location")),1),r(U,{modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=j=>i.value=j),class:"select-type mt-8 flex flex-col gap-4",fill:"#FFFFFF"},{default:_(()=>[r(T,{label:"Replace",size:"large"},{default:_(()=>[z(s(u.$t("common.documentCloud.replaceExit")),1)]),_:1}),r(T,{label:"Rename",size:"large"},{default:_(()=>[z(s(u.$t("common.documentCloud.renameFile")),1)]),_:1})]),_:1},8,["modelValue"])],64)):$.value==="Rename"?(n(),Z(G,{key:1,modelValue:x.value,"onUpdate:modelValue":N[1]||(N[1]=j=>x.value=j),class:"rename-input mt-3",placeholder:"Enter the new file's name",clearable:""},null,8,["modelValue"])):V("",!0)])]),_:1},8,["model-value"])])}}},Xo=me(Jo,[["__scopeId","data-v-a556a043"]]),Wo={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},el=mo('<circle cx="8" cy="8" r="7.75" fill="#EDFFED" stroke="url(#a)" stroke-width=".5"></circle><path stroke="url(#b)" stroke-linecap="round" stroke-linejoin="round" d="m12 6-5 5-3-3"></path><defs><linearGradient id="a" x1="2" x2="16" y1="0" y2="18.857" gradientUnits="userSpaceOnUse"><stop stop-color="#32D9A1"></stop><stop offset="1" stop-color="#00BC7D"></stop></linearGradient><linearGradient id="b" x1="5" x2="8.49" y1="6" y2="13.521" gradientUnits="userSpaceOnUse"><stop stop-color="#32D9A1"></stop><stop offset="1" stop-color="#00BC7D"></stop></linearGradient></defs>',3),tl=[el];function ol(g,h){return n(),p("svg",Wo,tl)}const ll={render:ol},al={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},sl=o("circle",{cx:"8",cy:"8",r:"7.75",fill:"#FFEDED",stroke:"#FF5E23","stroke-width":".5"},null,-1),nl=o("path",{stroke:"#FF5E23","stroke-linecap":"round","stroke-linejoin":"round",d:"m5 5 3 3m3 3L8 8m0 0 3-3-6 6"},null,-1),il=[sl,nl];function cl(g,h){return n(),p("svg",al,il)}const dl={render:cl},ul="https://static.hipdf.com/default_format-4d9b1321.svg",rl="https://static.hipdf.com/bmp_format-0895f83a.svg",lt="https://static.hipdf.com/docx_format-abab4d84.svg",ml="https://static.hipdf.com/gif_format-f8efb79b.svg",fl="https://static.hipdf.com/heic_format-0a87c151.svg",pl="https://static.hipdf.com/heif_format-c992c1df.svg",_l="https://static.hipdf.com/htm_format-69cecb59.svg",hl="https://static.hipdf.com/html_format-638e15a1.svg",vl="https://static.hipdf.com/jpeg_format-5623dd4a.svg",gl="https://static.hipdf.com/jpg_format-65f7942f.svg",yl="https://static.hipdf.com/key_format-0558427c.svg",bl="https://static.hipdf.com/numbers_format-a330181a.svg",wl="https://static.hipdf.com/pages_format-ccb3ce31.svg",Cl="https://static.hipdf.com/pdf_format-e79b9e52.svg",kl="https://static.hipdf.com/png_format-91e92832.svg",xl="https://static.hipdf.com/ppt_format-9a41925c.svg",$l="https://static.hipdf.com/pptx_format-7aa720a6.svg",Fl="https://static.hipdf.com/rtf_format-28ee252d.svg",Sl="https://static.hipdf.com/rtfd_format-b70f12d7.svg",Tl="https://static.hipdf.com/tif_format-8f170ab0.svg",Dl="https://static.hipdf.com/tiff_format-0cd7875e.svg",Il="https://static.hipdf.com/txt_format-fa05c426.svg",El="https://static.hipdf.com/webarchive_format-ea948b73.svg",Ul="https://static.hipdf.com/xls_format-baafce3b.svg",Pl="https://static.hipdf.com/xlsx_format-87269590.svg",at={default:ul,bmp:rl,doc:lt,docx:lt,gif:ml,heic:fl,heif:pl,htm:_l,html:hl,jpeg:vl,jpg:gl,key:yl,numbers:bl,pages:wl,pdf:Cl,png:kl,ppt:xl,pptx:$l,rtf:Fl,rtfd:Sl,tif:Tl,tiff:Dl,txt:Il,webarchive:El,xls:Ul,xlsx:Pl};const Nl={class:"progress-block-header"},zl={class:"progress-header-item"},Rl={class:"progress-header-item gap-3"},Vl={class:"file-info flex flex-auto justify-between items-center"},Ol={class:"file-content flex gap-2"},Ml=["src"],Ll={class:"file-detail-info w-[170px] text-left"},Bl=["title"],Al=["title"],jl={key:1,class:"file-upload-fail truncate font-normal text-xs"},Hl={class:"file-upload-type flex items-center gap-6"},Gl={__name:"UploadProgressDialog",setup(g){const{t:h}=Ue(),{currentFolderPath:O,isVip:P}=Ve(),{$bus:x}=Fe(),$=Pe(),{lessThan100M:i,lessThan2000Pages:w}=ko(),{getPDFPagesV2:R}=Yo(),E=d(!1),y=d(!0),u=oe([]),N=d(!1),T=oe([]),U=d(0),G=oe({sizeUpgrade:!1,pageNumUpgrade:!1}),L=d(0),Y=pe(()=>u.filter(a=>a.fsm.state==="ossUploading").length),j=pe(()=>O.value),le=pe(()=>u.some(a=>["localAdd","ossUploading"].includes(a.fsm.state))),q=pe(()=>Je[P.value?"vip":"notVip"].Others.singleFileSize),B=pe(()=>Je[P.value?"vip":"notVip"].Others.singlePagesSize);Ge(()=>{x.on("upload:local-file",ee),x.on("upload:download-file-from-url",ie),document.addEventListener("click",D)}),Ne(()=>{x.off("upload:local-file",ee),x.off("upload:download-file-from-url",ie),document.removeEventListener("click",D)});const ie=({url:a,uploadFileTime:m,name:c=""},C=!0)=>{let v=go[xe(c)];fetch(a).then(K=>K.blob()).then(K=>{const ge=new File([K],c,{type:v||K?.type});ee({showUploadProgressDialog:C,fileList:[ge]}),ut.removeItem(`document-cloud:upload:file-from-url:${m}`)}).catch(K=>{const{code:ge,status:ue}=K;$e(ge||ue,!1)})},ae=a=>(a.fsm.upload(),wo({data:a.OSSUploadData}).then(m=>m).catch(async m=>{let{code:c,result:C}=m;if(c===4002)T.push(a);else if(c===4200)a.file_id=C.file_id,a.last_time=C.create_time,a.img_path=C.img_path,a.protected=C.protected,a.fsm.uploadSuccess(),
1++U.value;else{const{code:v,status:K}=m;$e(v||K,$.getters.isVip),a.fsm.uploadError()}})),ce=(a,m)=>{Co(a,m).then(c=>{m.file_id=c.file_id,m.last_time=Ze.unix(c.create_time).format("YYYY-MM-DD HH:mm:ss"),m.progress=1,m.parentPath=j.value,m.fsm.uploadSuccess(),++U.value}).catch(c=>{let{code:C,status:v}=c;!C&&!v&&(C=3999),$e(C||v,$.getters.isVip),m.progress=0,m.fsm.uploadError()})},se=async(a,m=!1)=>{const c=a.name;return P.value?a.size>q.value?(i(),h("common.documentCloud.sizeLimit")):xe(c)==="pdf"&&await R(a)>B.value?(w(),h("common.documentCloud.pageLimit")):!1:a.size>q.value?((!G.sizeUpgrade||m)&&(G.sizeUpgrade=!0,$.commit("SET_PAY_DATA",{show:!0,guide:"sizeUpgrade"})),h("common.documentCloud.sizeUpgrade")):xe(c)==="pdf"&&await R(a)>B.value?((!G.pageNumUpgrade||m)&&(G.pageNumUpgrade=!0,$.commit("SET_PAY_DATA",{show:!0,guide:"normalPageLimit"})),h("common.documentCloud.pageUpgrade")):!1},de=async a=>{const{file:m}=a,c=a.OSSUploadData.num-1;let C=await bo(m,{});if(a.OSSUploadData.md5_code=C,await se(m,!0)){u[c].fsm.goto("ossUploadFailed");return}let K=await ae(u[c]);K&&ce(K,u[c])},F=async a=>{if(a.fsm.goto("localAdded"),await se(a.file,!0)){a.fsm.goto("ossUploadFailed");return}let c=await ae(a);c&&ce(c,a)},ee=async({showUploadProgressDialog:a,fileList:m})=>{if(E.value=a,!m||m.length===0)return;let c=u.length;for(const C of m){const v={file:C};v.uid=C?.uid||C.lastModified,v.fsm=new yo({uid:C.uid}),v.fsm.localAdd(),v.last_time=Ze().format("YYYY-MM-DD HH:mm:ss"),v.progress=0,v.OSSUploadData={file_name:C.name,file_size:C.size,path:j.value,file_from:C.file_from,num:++c,total_num:m.length,is_replace:!1},v.uploadID=++L.value,u.push(v),de(v)}},ve=async({type:a,replaceName:m})=>{if(T.length===0)return;const c=T.shift();a==="Replace"?c.OSSUploadData.is_replace=!0:a==="Rename"&&(c.OSSUploadData.file_name=m),c.fsm.goto("localAdded");let C=await ae(c);C&&ce(C,c)},b=()=>{if(T.length===0)return;T.shift().fsm.uploadError()},D=()=>{le.value||(u.length=0,T.length=0,U.value=0,G.sizeUpgrade=!1,G.pageNumUpgrade=!1),E.value=!1};return he(()=>T.length,a=>{a>0?N.value=!0:N.value=!1}),he(()=>le.value,a=>{!a&&U.value&&x.emit("cloud-upload:finish")}),(a,m)=>{const c=st,C=nt;return n(),p(_e,null,[W(o("div",{class:"upload-record-block fixed bottom-[88px] right-4 z-[2007] overflow-hidden",onClick:m[1]||(m[1]=He(()=>{},["stop"]))},[o("div",Nl,[o("div",zl,[W(o("div",{class:"text-[#3C3C43]/[0.6]"},s(U.value)+"/"+s(u.length)+s(a.$t("common.documentCloud.uploaded")),513),[[te,y.value]]),W(o("div",{class:"text-[#3C3C43]/[0.6]"},s(a.$t("common.documentCloud.uploading"))+s(Y.value)+" "+s(a.$t("common.documentCloud.items")),513),[[te,!y.value]])]),o("div",Rl,[o("div",{class:"arrow-block flex",onClick:m[0]||(m[0]=v=>y.value=!y.value)},[y.value?(n(),Z(c,{key:0,size:24,color:"#7F7F83"},{default:_(()=>[r(H(Jt))]),_:1})):(n(),Z(c,{key:1,size:24,color:"#7F7F83"},{default:_(()=>[r(H(Xt))]),_:1}))]),o("div",{class:"close-block flex",onClick:D},[r(c,{size:24,color:"#7F7F83"},{default:_(()=>[r(H(Wt))]),_:1})])])]),o("div",{class:ye(["progress-block-content px-1 overflow-y-scroll",y.value?"pb-5":""]),style:fo({height:y.value?"auto":"0"})},[(n(!0),p(_e,null,Ye(u,v=>(n(),p("div",{class:ye(["progress-content-item py-4 flex flex-col gap-4",v.fsm.state==="ossUploading"?"uploading":""]),key:v.uploadID},[o("div",Vl,[o("div",Ol,[o("img",{class:"w-[32px] h-[32px]",src:H(at)[H(xe)(v.file.name)]||H(at).default,alt:""},null,8,Ml),o("div",Ll,[o("div",{class:"file-title truncate font-normal text-sm leading-[18px]",title:v.file.name},s(v.OSSUploadData.file_name),9,Bl),["ossUploading","ossSuccessful"].includes(v.fsm.state)?(n(),p("div",{key:0,class:"file-upload-time truncate font-normal text-xs text-[#3C3C43]/[0.6]",title:v.last_time},s(v.fsm.state==="ossUploading"?"Uploading":"Uploaded")+" "+s(v.last_time),9,Al)):v.fsm.state==="ossUploadFailed"?(n(),p("div",jl,s(a.$t("common.documentCloud.failed")),1)):V("",!0)])]),o("div",Hl,[W(o("div",{class:"file-size text-xs text-[#3C3C43]/[0.6]"},s(H(Ae)(v.file.size,{base:2,standard:"jedec"})),513),[[te,v.fsm.state!=="ossUploadFailed"]]),v.fsm.state==="ossSuccessful"?(n(),Z(H(ll),{key:0})):v.fsm.state==="ossUploadFailed"?(n(),p(_e,{key:1},[r(c,{class:"cursor-pointer",size:16,onClick:K=>F(v)},{default:_(()=>[r(H(eo))]),_:2},1032,["onClick"]),r(H(dl))],64)):V("",!0)])]),W(r(C,{class:"h-[3px]",percentage:v.progress*100,"show-text":!1,color:"#4D64FD"},null,8,["percentage"]),[[te,v.fsm.state==="ossUploading"]])],2))),128))],6)],512),[[te,E.value]]),r(Xo,{dialogVisible:N.value,fileName:T[0]?T[0].OSSUploadData.file_name:"",file:T[0]?T[0].file:{name:""},onContinue:ve,onClose:b},null,8,["dialogVisible","fileName","file"])],64)}}},Yl=me(Gl,[["__scopeId","data-v-d6e7e272"]]);const ql={class:"exist-file"},Kl={key:0},Ql={key:1},Zl={class:"dialog-footer"},Jl={__name:"SecondConfirmDialog",props:{showDialog:{default:!1,type:Boolean},type:{default:"move",type:String},selectIds:{default:null,type:Object},confirmLoading:{default:!1,type:Boolean}},emits:["close","submitEvent"],setup(g,{emit:h}){const O=h,P=g,x=d(!1);he(()=>P.showDialog,w=>{x.value=w});function $(){O("close")}function i(){O("submitEvent")}return(w,R)=>{const E=we,y=Ee;return n(),p("div",ql,[r(y,{modelValue:x.value,"onUpdate:modelValue":R[0]||(R[0]=u=>x.value=u),title:"","close-on-click-modal":!1,width:"592px"},{footer:_(()=>[o("span",Zl,[r(E,{onClick:$},{default:_(()=>[z(s(w.$t("common.documentCloud.cancel")),1)]),_:1}),r(E,{type:"primary",onClick:i,loading:g.confirmLoading},{default:_(()=>[z(s(g.type==="move"?w.$t("common.documentCloud.replaceBtn"):w.$t("common.documentCloud.deleteBtn")),1)]),_:1},8,["loading"])])]),default:_(()=>[g.type==="move"?(n(),p("div",Kl,[o("h1",null,s(w.$t("common.documentCloud.fileName")),1),o("p",null,s(w.$t("common.documentCloud.withName"))+" "+s(g.selectIds.name)+'" '+s(w.$t("common.documentCloud.exitIn")),1)])):(n(),p("div",Ql,[o("h1",null,s(w.$t("common.documentCloud.select")),1),o("p",null,s(w.$t("common.documentCloud.deletion")),1)]))]),_:1},8,["modelValue"])])}}},rt=me(Jl,[["__scopeId","data-v-dce047d1"]]),Ie="https://static.hipdf.com/ic48_folder-20cbab6f.svg";const Xl={class:"document-dialog"},Wl={key:0,class:"h-[288px] overflow-auto"},ea={class:"custom-tree-node"}
1,ta=["src"],oa={class:"text-xl font-bold text-[#121212] mb-3"},la={class:"dialog-footer"},aa={__name:"DocumentDialog",props:{showDialog:{default:!1,type:Boolean},type:{default:"move",type:String},selectIds:{default:null,type:Object},directoryPath:{default:"/",type:String}},emits:["close","moveSuccess"],setup(g,{emit:h}){const{t:O}=Ue(),P=d(!1),x=d([]),$=d(null),i=d(!1),w=oe({page:1,path:"/",page_size:999}),R=oe({name:""}),E=oe({file_id:"",path:"/",new_name:"",replace:!1}),y=d(!1),u=(b,D,a)=>{y.value?a(new Error(O("common.documentCloud.theFolderAlreadyExists"))):a()},N=oe({name:[{required:!0,message:O("common.documentCloud.pleaseInputName"),trigger:["blur","change"]},{validator:u,trigger:["blur","change"]}]}),T=h,U=g,G=d(!0),L=d(""),Y=d(!1),j=d(null);he(()=>U.showDialog,b=>{P.value=b,R.name="",G.value=!0,y.value=!1,$.value&&$.value.resetFields(),it(()=>{j.value&&setTimeout(()=>{j.value.focus()},100)})});function le(b,D){return b.forEach(a=>{a.parentPath=D||"",a.file_name=a.name,a.file_size="-",a.file_id=a.did,a.listType="directoryType",a.img_path=Ie,a.last_time=Te(a.last_time,"yyyy-MM-dd hh:mm:ss"),a.paramsPath=a.path+a.name}),b}function q(b){let D=b.srcElement;D.src=De,D.onerror=null}function B(){T("close")}const ie={label:"name",children:"zones",isLeaf:"leaf",path:"path",disabled:"disabled"};function ae(){if(U.type==="New Folder")$.value.validate(b=>{if(b)i.value=!0,xo({name:R.name,path:U.directoryPath}).then(D=>{T("close",{name:R.name,did:D}),i.value=!1}).catch(D=>{y.value=!0,$.value.validate(),i.value=!1});else return!1});else{const{file_ids:b,dids:D}=U.selectIds;if(b.length===1&&D.length===0)E.file_id=b[0],E.replace=!1,E.path=L.value,ce();else{let a={path:L.value,file_ids:b,dids:D};$o(a).then(m=>{T("moveSuccess")}).catch(m=>{Q(O("common.documentCloud.moveFailed"))})}}}function ce(){i.value=!0,Fo(E).then(b=>{Y.value=!1,i.value=!1,T("moveSuccess")}).catch(b=>{i.value=!1,b.code!==4002?Q(b.msg):Y.value=!0})}function se(b,D){if(b.level===0)return D([{name:"PDFelement Cloud",paramsPath:"/"}]);w.path=b.data.paramsPath,So(w).then(a=>{const m=a&&w.page===1?le(a,w.path):[];D(x.value.concat(m))})}function de(b,D){const{path:a,parentPath:m}=U.selectIds;L.value=b.paramsPath;let c=!1;if(m.includes(b.paramsPath)&&(c=!0),!c&&a.length)for(let C of a)(b.paramsPath===C||b.paramsPath.indexOf(C)===0&&b.paramsPath.replace(C,"").charAt(0)==="/")&&(c=!0);G.value=c}function F(){E.replace=!0,ce()}function ee(){y.value=!1}function ve(){Y.value=!1}return(b,D)=>{const a=to,m=je,c=oo,C=lo,v=we,K=Ee,ge=rt;return n(),p(_e,null,[o("div",Xl,[r(K,{modelValue:P.value,"onUpdate:modelValue":D[3]||(D[3]=ue=>P.value=ue),title:U.type==="Move"?H(O)("common.documentCloud.moveDialogTitle"):"",width:"530px",class:ye(U.type==="New Folder"?"document-move document-folder":"document-move"),onClose:B,"close-on-click-modal":!1},{footer:_(()=>[o("span",la,[U.type==="New Folder"?(n(),Z(v,{key:0,onClick:B},{default:_(()=>[z(s(b.$t("common.cancel")),1)]),_:1})):V("",!0),r(v,{type:"primary",onClick:ae,loading:i.value,disabled:G.value&&U.type==="Move"},{default:_(()=>[z(s(U.type==="New Folder"?b.$t("common.documentCloud.createBtn"):b.$t("common.documentCloud.confirmBtn")),1)]),_:1},8,["loading","disabled"])])]),default:_(()=>[U.type==="Move"&&P.value?(n(),p("div",Wl,[r(a,{props:ie,load:se,lazy:"","check-strictly":"","highlight-current":"","expand-on-click-node":!1,onCurrentChange:de},{default:_(ue=>[o("span",ea,[o("img",{class:"file-thumbnail",src:H(Ie),alt:"",onError:D[0]||(D[0]=S=>q(S))},null,40,ta),o("span",null,s(ue.node.label),1)])]),_:1})])):V("",!0),W(o("div",null,[o("div",oa,s(b.$t("common.documentCloud.newFolder")),1),r(C,{ref_key:"newFolderFormRef",ref:$,model:R,rules:N,onSubmit:D[2]||(D[2]=He(()=>{},["prevent"]))},{default:_(()=>[r(c,{prop:"name"},{default:_(()=>[r(m,{ref_key:"nameInput",ref:j,modelValue:R.name,"onUpdate:modelValue":D[1]||(D[1]=ue=>R.name=ue),placeholder:H(O)("common.documentCloud.newFolderPlaceholder"),onKeyup:ct(ae,["enter"]),onInput:ee},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["model","rules"])],512),[[te,U.type==="New Folder"]])]),_:1},8,["modelValue","title","class"])]),r(ge,{showDialog:Y.value,type:"move",selectIds:g.selectIds,confirmLoading:i.value,onClose:ve,onSubmitEvent:F},null,8,["showDialog","selectIds","confirmLoading"])],64)}}},sa=me(aa,[["__scopeId","data-v-647caaf1"]]),na="https://static.hipdf.com/ic48_lock-093802c4.svg";const J=g=>(ze("data-v-1562ae57"),g=g(),Re(),g),ia={key:0,class:"document-table flex flex-col h-full"},ca={class:"document-table-search flex justify-between items-center pt-8 pb-2 document-table-search-padding"},da={key:0,class:"flex"},ua=["title"],ra=J(()=>
1o("span",{class:"icon-16arrow mx-1"},null,-1)),ma=["onClick"],fa={class:"flex items-center"},pa={key:0,class:"flex items-center"},_a={class:"text-[#3C3C43] opacity-60 shrink-0"},ha={class:"font-bold"},va={class:"flex batch-operation-spacing"},ga={key:0,class:"batch-operation-icon cursor-pointer"},ya={class:"batch-operation-icon cursor-pointer"},ba={key:1,class:"table-search w-[358px] table-search-spacing"},wa=J(()=>o("span",{class:"icon-search"},null,-1)),Ca={key:2,class:"new-folder new-folder-spacing"},ka=J(()=>o("span",{class:"icon-newFolder folder-icon-spacing"},null,-1)),xa={class:"h-full"},$a={class:"h-full"},Fa={class:"table-document-name",title:""},Sa=["src"],Ta={class:"table-last-modified"},Da={class:"table-last-modified"},Ia={class:"table-size"},Ea={key:0,class:"table-icon-content"},Ua=["onClick"],Pa={key:1,class:"table-icon-content"},Na=["onClick"],za={key:2,class:"table-light-icon-content"},Ra=["onClick"],Va=J(()=>o("span",{class:"el-dropdown-link"},[o("span",{class:"icon-ellipsis"})],-1)),Oa=J(()=>o("span",{class:"icon-open"},null,-1)),Ma={key:0,class:"flex items-center"},La=J(()=>o("span",{class:"icon-star"},null,-1)),Ba={key:1,class:"flex items-center"},Aa=J(()=>o("span",{class:"icon-unStar"},null,-1)),ja=J(()=>o("span",{class:"icon-share"},null,-1)),Ha=J(()=>o("span",{class:"icon-download"},null,-1)),Ga=J(()=>o("span",{class:"icon-rename"},null,-1)),Ya=J(()=>o("span",{class:"icon-move"},null,-1)),qa=J(()=>o("span",{class:"icon-delete"},null,-1)),Ka=J(()=>o("span",{class:"icon-remove"},null,-1)),Qa={key:0,class:"text-center p-2 flex justify-center items-center"},Za=J(()=>o("img",{class:"custom-loading",width:"24",height:"24",src:Ke,alt:""},null,-1)),Ja=[Za],Xa={key:1,class:"end-text text-center h-16 leading-8"},Wa={class:"h-full flex flex-col justify-center items-center"},es=J(()=>o("span",{class:"icon-noDocuments"},null,-1)),ts={class:"text-base text-[#121212]"},os={key:0},ls={key:0},as=["href"],ss={key:1},ns={key:2},is={key:1},cs={key:0,class:"moving-tips fixed min-w-[166px] top-22 text-center px-6 py-4 rounded-xl border border-solid border-[#4D64FD] bg-[#F4F6FF] mx-auto flex justify-center items-center"},ds=J(()=>o("img",{class:"custom-loading",width:"24",height:"24",src:Ke,alt:""},null,-1)),us={class:"ml-2 shrink-0"},rs={__name:"DocumentTable",props:{tableType:{type:String,default:"recent"}},setup(g){const{t:h}=Ue(),{$bus:O}=Fe(),P=Pe(),x=dt(),$=po(),i=g,w=d("500px"),R=d(null),E=d([]),y=d([]),u=d(!1),N=d(!1),T=d(!1),U=d(""),G=d(!1),L=d(!1),Y=d(!1),j=d(!1),le=d("Move"),q=d([]),B=d("/"),ie=d(!1),ae=d(null),ce=d(null),se=d(Xe),de=d(h("common.documentCloud.recentDocuments")),F=oe({file_ids:[],dids:[],task_ids:[],path:[],parentPath:[]}),ee=d(""),ve=d(null),b=d([]),D=d(!0),{getFinalToken:a}=Ve(),m=d(!1),c=oe({name:"",suffix:""}),C=d(!1),v=d(!1),K=d(null);he(()=>i.tableType,e=>{D.value=!1,D.value=!0,ft(e)},{deep:!0}),qe(()=>{if(O.on("active-close-login",()=>{window.open("https://www.hipdf.com/","_self")}),O.on("cloud-upload:finish",()=>{i.tableType==="document"&&(k.page=1,k.page_size=20,k.is_get_total=!0,k.is_star=!0,se.value=We,de.value=h("common.documentCloud.recentDocuments"),S.value=[],re())}),be(),window.onresize=function(){be()},R.value){const e=R.value.$refs.bodyWrapper.getElementsByClassName("el-scrollbar__wrap")[0];e.addEventListener("scroll",()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight;u.value||(t<=0&&!T.value?yt():(N.value=!1,be()))})}localStorage.getItem("auto-cloud-checked")==="true"?G.value=!0:localStorage.setItem("auto-cloud-checked",String(G.value))}),he(()=>a.value,e=>{e?it(()=>{re()}):P.commit("SET_LOGIN_WINDOW",!0)},{immediate:!0,deep:!0});const ge=e=>{E.value=e},ue=e=>{let t=_o(e);t.listType==="fileType"&&t.file_suffix!=="pdf"||X("open",t)},S=d([]),Ce=d(null),k=oe({page:1,page_size:20}),fe=pe(()=>e=>e==="fileType"),mt=(e,t)=>{e&&(b.value[t]=e)};he(()=>B.value,e=>{P.commit("SET_FOLDER_PATH",e)});async function ft(e){N.value=!1,k.page=1,k.page_size=20,k.name="";const{path:t}=x.currentRoute.value.query;switch(t?(B.value=t||"/",k.path=t||"/",q.value=B.value.split("/"),q.value.shift(),x.push({query:{},params:$.params})):(B.value="/",k.path="/",q.value=[]),e){case"starred":se.value=To,de.value=h("common.documentCloud.starredDocuments");break;case"document":se.value=We,k.is_get_total=!0,k.is_star=!0,de.value=h("common.documentCloud.documentCloud");break;
1case"recent":default:se.value=Xe,de.value=h("common.documentCloud.recentDocuments");break}S.value=[],U.value="",await re()}function pt(e,t){return E.value.includes(e.row)||y.value.includes(e.row)?{"background-color":"#EDEFFF"}:null}function be(e=0){let t=document.getElementsByClassName("document-table")[0],l=document.getElementsByClassName("document-table-search")[0],I=i.tableType==="document"?80:0;if(w.value=t.clientHeight-l.clientHeight-I-e+"px",e===64){const A=R.value.$refs.bodyWrapper.getElementsByClassName("el-scrollbar__wrap")[0];A.scrollHeight-A.clientHeight,setTimeout(()=>{A.scrollTo(0,A.scrollHeight)},100)}}async function re(){L.value=!1,Y.value=!1,k.page===1&&(u.value=!0),await se.value(k).then(e=>{u.value=!1,_t(e),S.value.length?L.value=!1:(k.name&&(Y.value=!0),L.value=!0),Ce.value=e.file_total||e.total,T.value=!1,be()}).catch(e=>{k.name&&(Y.value=!0),S.value.length||(L.value=!0),u.value=!1,T.value=!1})}function _t(e){let t=[],l=[];switch(i.tableType){case"starred":t=e.list?Me(e.list):[];break;case"document":t=e.file_list?Me(e.file_list,k.path):[],l=e.directory_list&&k.page===1?vt(e.directory_list,k.path):[];break;case"recent":default:t=e.recent_list?Me(e.recent_list):[];break}S.value=S.value.concat(l.concat(t))}function Me(e,t){return e.forEach(l=>{l.parentPath=t||"",l.isPdf=l.file_name?ht(l.file_name):!1,l.listType="fileType",l.img_path=l.protected?na:l.isPdf?l.img_path:De,l.last_time=Te(l.last_time||l.starred_time||l.update_time,"yyyy-MM-dd hh:mm:ss"),l.file_size=Do(l.file_size),i.tableType==="recent"&&(l.file_name=l.output_file_name),i.tableType==="starred"&&(l.star_status=1)}),e}function ht(e){return e.substring(e.lastIndexOf(".")).toLowerCase()===".pdf"}function vt(e,t){return e.forEach(l=>{l.parentPath=t||"",l.file_name=l.name,l.file_size="-",l.file_id=l.did,l.listType="directoryType",l.img_path=Ie,l.last_time=Te(l.last_time,"yyyy-MM-dd hh:mm:ss")}),e}function gt(e){let t=e.srcElement;t.src=De,t.onerror=null}function yt(){Ce.value<=k.page*k.page_size?(T.value=!1,N.value=!0,be(64)):(k.page=k.page+1,T.value=!0,N.value=!1,be(40),setTimeout(()=>{re()},10))}function X(e,t){ce.value=t.task_id||null,Se();let l=t.file_name;switch(e){case"open":bt(t);break;case"star":Ct(t);break;case"share":i.tableType==="recent"?(ae.value=null,ie.value=!0):At(t);break;case"download":Nt(t);break;case"rename":ee.value=l,t.isEdit=!0,t.listType==="directoryType"?(c.name=l,c.suffix=""):l.lastIndexOf(".")!==-1?(c.name=l.substring(0,l.lastIndexOf(".")),c.suffix=l.substring(l.lastIndexOf("."))):(c.name=l,c.suffix=""),setTimeout(()=>{b.value[t.file_id].focus(),b.value[t.file_id].select()},500);break;case"move":t.did?(F.dids=[t.did],F.path=[t.path+t.name],F.parentPath=[t.parentPath]):(F.file_ids=[t.file_id],F.parentPath=[t.parentPath]),F.name=t.file_name,j.value=!0,le.value="Move";break;case"delete":wt(t);break;case"remove":$t(t);break}}function bt(e){if(e.listType==="directoryType")B.value=e.path+e.name,q.value=B.value.split("/"),q.value.shift(),setTimeout(()=>{let t=ve.value.scrollWidth;ve.value.scrollTo(t,0)},100),Le(B.value);else if(e.listType==="fileType"){const t=x.resolve({path:"/preview",query:{file_id:e.file_id,file_name:e.file_name}});window.open(t.href,"_blank")}}async function wt(e){if(e.listType==="directoryType")await Eo({did:e.did}).then(t=>{Q(h("common.documentCloud.deleteTip"),"success");let l=null;S.value.forEach((I,A)=>{I.file_id===e.did&&(l=A)}),S.value.splice(l,1)}),S.value.length<=15&&Ce.value>k.page*k.page_size&&(k.page=1,re()),S.value.length||(L.value=!0);else if(e.listType==="fileType"){let{is_chained:t}=e;t?(K.value=e,C.value=!0):Qe(e)}}async function Qe(e){v.value=!0,await Uo({file_id:e.file_id}).then(t=>{v.value=!1,C.value=!1,Q(h("common.documentCloud.deleteTip"),"success");let l=null;S.value.forEach((I,A)=>{I.file_id===e.file_id&&(l=A)}),S.value.splice(l,1)}),S.value.length<=15&&Ce.value>k.page*k.page_size&&(k.page=1,re()),S.value.length||(L.value=!0)}async function Ct(e){e.star_status?(await Po({file_id:e.file_id}).then(t=>{let l=null;S.value.forEach((I,A)=>{I.file_id===e.file_id&&(I.star_status=0,l=A)}),i.tableType==="starred"&&S.value.splice(l,1)}),S.value.length||(L.value=!0)):No({file_id:e.file_id}).then(t=>{S.value.forEach(l=>{l.file_id===e.file_id&&(l.star_status=1)})})}const ke=d(!1);function kt(e,t){if(!e){Q(h("common.documentCloud.renameEmptyTip"));return}if(e.length>240){Q(h("common.documentCloud.renameExceedTip"));return}if(ke.value||e+c.suffix===ee.value){t.file_name=ee.value,t.isEdit=!1,ke.value=!1;return}if(t.listType==="directoryType"){let l={did:t.did,new_name:e,path:t.parentPath};Mo(l).then(I=>{t.isEdit=!1,t.file_name=e+c.suffix,Q(h("common.documentCloud.renameTip"),"success")}
1).catch(I=>{I.code===4002?(Q(h("common.documentCloud.renameExistTip",{name:e})),ke.value=!0,b.value[t.file_id].focus()):(t.file_name=ee.value,t.isEdit=!1,Q(h("common.documentCloud.renameFailedTip")))})}else{let l={file_id:t.file_id,new_name:e+c.suffix,path:t.parentPath};Lo(l).then(I=>{t.isEdit=!1,t.file_name=e+c.suffix,Q(h("common.documentCloud.renameTip"),"success")}).catch(I=>{I.code===4002?(Q(h("common.documentCloud.renameExistTip",{name:e})),ke.value=!0,b.value[t.file_id].focus()):(t.file_name=ee.value,t.isEdit=!1,Q(h("common.documentCloud.renameFailedTip")))})}}function xt(e,t,l){kt(e,t)}async function $t(e){let t={task_ids:[e.task_id]};await et(t).then(l=>{Q(h("common.documentCloud.clearTip"),"success");let I=null;S.value.forEach((A,ne)=>{A.task_id===e.task_id&&(I=ne)}),S.value.splice(I,1)}),S.value.length||(L.value=!0)}function Ft(e){k.page=1,k.name=e,S.value=[],re()}function St(e,t){e?y.value=[t]:y.value=[]}function Tt(e){if(!j.value||(j.value=!1,!e))return;let t={},l=Math.round(new Date().getTime()/1e3).toString();t.did=e.did,t.name=e.name,t.parentPath=B.value,t.path=B.value==="/"?B.value:B.value+"/",t.file_name=t.name,t.file_size="-",t.file_id=t.did,t.listType="directoryType",t.img_path=Ie,t.last_time=Te(l,"yyyy-MM-dd hh:mm:ss"),S.value.unshift(t),L.value=!1}function Dt(){j.value=!0,le.value="New Folder"}function It(e){const t=q.value.length-e-1;q.value.splice(e+1,t),B.value="/"+q.value.join("/"),B.value!==k.path&&Le(B.value)}function Et(){q.value=[],B.value!=="/"&&(B.value="/",Le(B.value))}function Le(e){k.page=1,k.path=e,k.page_size=20,U.value="",S.value=[],re()}function Ut(){ie.value=!1}function Pt(){j.value=!1,S.value=S.value.filter(e=>F.file_ids.indexOf(e.file_id)===-1&&F.dids.indexOf(e.file_id)===-1),F.file_ids.length+F.dids.length>1?Q(h("common.documentCloud.multiMoveTip"),"success"):Q(h("common.documentCloud.singleMoveTip"),"success"),Se(),S.value.length||(L.value=!0)}function Nt(e){if(i.tableType==="recent"){let t=zo+"document/download-doc?task_id="+e.task_id;window.open(t,"_blank")}else tt({file_id:e.file_id}).then(t=>{let{download_url:l}=t;l.indexOf("https")<0&&(l=l.replace("http:","https:")),window.open(l,"_self")})}function Be(e){switch(Se(),E.value.forEach(t=>{t.did?(F.dids.push(t.did),F.path.push(t.path+t.name),F.parentPath.push(t.parentPath)):t.task_id?F.task_ids.push(t.task_id):(F.file_ids.push(t.file_id),F.parentPath.push(t.parentPath))}),e){case"download":Rt();break;case"move":j.value=!0,le.value="Move";break;case"delete":zt();break}}async function zt(){let e=null,t=null;i.tableType==="recent"?(t=et,e={task_ids:F.task_ids}):(t=Bo,e={file_ids:F.file_ids,dids:F.dids}),await t(e).then(l=>{Q(h("common.documentCloud.deleteTip"),"success"),S.value=S.value.filter(I=>F.file_ids.indexOf(I.file_id)===-1&&F.dids.indexOf(I.file_id)===-1&&F.task_ids.indexOf(I.task_id)===-1),Se()}),S.value.length<=15&&Ce.value>k.page*k.page_size&&(k.page=1,re()),S.value.length||(L.value=!0)}function Rt(){let e=null,t=null;i.tableType==="recent"||(t=Ao,e={file_ids:F.file_ids,dids:F.dids}),t(e).then(l=>{Ot(l.task_id)})}function Vt(){O.emit("upload:no-data")}function Ot(e){ot({task_id:e}).then(l=>{if(l.result.task_list[0].is_done){Mt(e);return}let A=l.result.res_query_internal||1;setTimeout(()=>{ot(e)},A*1e3)}).catch(()=>{})}function Mt(e){Ro({task_id:e}).then(l=>{let I=l.result.url;window.open(I,"_blank")}).catch(()=>{})}function Lt(){C.value=!1}function Bt(){Qe(K.value)}function Se(){F.file_ids=[],F.dids=[],F.task_ids=[],F.path=[],F.parentPath=[]}function At(e){m.value=!0,tt({file_id:e.file_id}).then(t=>{let{download_url:l}=t;l.indexOf("https")<0&&(l=l.replace("http:","https:")),Vo({url:l,file_name:e.file_name}).then(I=>{m.value=!1,P.commit("SET_TASK_ID",I.file_id),P.commit("SET_FILE_ID",I.file_id),ae.value=I.file_id||null,ie.value=!0}).catch(I=>{Q(I.msg),m.value=!1})})}return Ne(()=>{O.off("active-close-login"),O.off("cloud-upload:finish")}),(e,t)=>{const l=je,I=we,A=so,ne=no,jt=io,Ht=co,Gt=sa,Yt=Oo,qt=rt,Kt=uo;return D.value?(n(),p("div",ia,[o("div",ca,[o("div",{ref_key:"scrollRef",ref:ve,class:"text-xl font-bold flex overflow-x-auto breadcrumb-spacing select-none"},[o("span",{class:ye([q.value.length?"text-[#3C3C43] opacity-60":"text-[#121212]","cursor-pointer shrink-0"]),onClick:Et},s(de.value),3),q.value.length?(n(),p("ul",da,[(n(!0),p(_e,null,Ye(q.value,(f,M)=>(n(),p("li",{class:ye(["shrink-0",M!==q.value.length-1?"text-[#3C3C43] opacity-60":"text-[#121212]"]),key:M,title:f},[ra,o("span",{class:"cursor-pointer",onClick:Qs=>It(M),onselectstart:"return false;"},s(f),9,ma)],10,ua))),128))])):V("",!0)],512),o("div",fa,[E.value.length?(n(),p("div",pa,[o("p",_a,[o("span",ha,s(E.value.length),1),z(" "+s(e.$t("common.documentCloud.selected")),1)]),o("ul",va,[i.tableType==="document"?(n(),p("li",ga,[o("span",{class:"icon-move",onClick:t[0]||(t[0]=f=>Be("move"))})])):V("",!0),o("li",ya,[i.tableType==="recent"?(n(),p("span",{key:0,class:"icon-remove",onClick:t[1]||(t[1]=f=>Be("delete"))})):(n(),p("span",{key:1,class:"icon-delete",onClick:t[2]||(t[2]=f=>Be("delete"))}))])])])):V("",!0),i.tableType==="document"?(n(),p("div",ba,[r(l,{modelValue:U.value,"onUpdate:modelValue":t[3]||(t[3]=f=>U.value=f),class:"",placeholder:e.$t("common.documentCloud.searchPlaceholder"),onChange:Ft,clearable:""},{prefix:_(()=>[wa]),_:1},8,["modelValue","placeholder"])])):V("",!0),i.tableType==="document"?(n(),p("div",Ca,[r(I,{onClick:Dt},{default:_(()=>[ka,z(" "+s(e.$t("common.documentCloud.newFolder")),1)]),_:1})])):V("",!0)])]),W((n(),p("div",xa,[W(o("div",$a,[r(H(ao),{ref_key:"multipleTableRef",ref:R,data:S.value,style:{width:"100%"},"max-height":w.value,onSelectionChange:ge,"empty-text":" ","row-style":pt,onRowDblclick:ue},{default:_(()=>[r(A,{type:"selection",width:"44"}),r(A,{label:e.$t("common.documentCloud.tableLabelDocumentName"),"show-overflow-tooltip":""},{default:_(f=>[o("div",Fa,[o("img",{class:"file-thumbnail",src:f.row.img_path||H(De),alt:"",onError:t[4]||(t[4]=M=>gt(M))},null,40,Sa),W(o("span",null,s(f.row.file_name),513),[[te,!f.row.isEdit]]),W(r(l,{ref:M=>mt(M,f.row.file_id),modelValue:c.name,"onUpdate:modelValue":t[5]||(t[5]=M=>c.name=M),class:"w-[calc(100%-72px)]",onInput:t[6]||(t[6]=M=>ke.value=!1),onBlur:()=>xt(c.name,f.row,"2"),onKeyup:t[7]||(t[7]=ct(M=>M.target.blur(),["enter"]))},null,8,["modelValue","onBlur"]),[[te,f.row.isEdit]])])]),_:1},8,["label"]),i.tableType==="recent"?(n(),Z(A,{key:0,label:e.$t("common.documentCloud.tableLabelOperation")},{default:_(f=>[o("div",Ta,s(f.row.operate_type),1)]),_:1},8,["label"])):V("",!0),r(A,{label:e.$t("common.documentCloud.tableLabelLastModified")},{default:_(f=>[o("div",Da,s(f.row.last_time),1)]),_:1},8,["label"]),r(A,{label:e.$t("common.documentCloud.tableLabelSize"),"show-overflow-tooltip":""},{default:_(f=>
1[o("div",Ia,s(f.row.file_size),1)]),_:1},8,["label"]),r(A,{label:"",align:"right"},{default:_(f=>[fe.value(f.row.listType)?(n(),p("div",Ea,[o("span",{onClick:M=>X("share",f.row),class:"table-icon icon-share"},null,8,Ua)])):V("",!0),fe.value(f.row.listType)&&!f.row.star_status&&i.tableType!=="recent"?(n(),p("div",Pa,[o("span",{onClick:M=>X("star",f.row),class:"table-icon icon-star"},null,8,Na)])):V("",!0),fe.value(f.row.listType)&&f.row.star_status&&i.tableType!=="recent"?(n(),p("div",za,[o("span",{onClick:M=>X("star",f.row),class:"table-icon icon-unStar"},null,8,Ra)])):V("",!0),r(Ht,{trigger:"click","popper-class":"operate-dialog",onVisibleChange:M=>St(M,f.row),disabled:!!E.value.length,placement:"bottom-end"},{dropdown:_(()=>[r(jt,null,{default:_(()=>[fe.value(f.row.listType)&&f.row.file_suffix!=="pdf"?V("",!0):(n(),Z(ne,{key:0,onClick:M=>X("open",f.row)},{default:_(()=>[Oa,z(s(e.$t("common.documentCloud.open")),1)]),_:2},1032,["onClick"])),fe.value(f.row.listType)&&i.tableType!=="recent"?(n(),Z(ne,{key:1,onClick:M=>X("star",f.row)},{default:_(()=>[f.row.star_status?(n(),p("div",Ba,[Aa,z(s(e.$t("common.documentCloud.unStar")),1)])):(n(),p("div",Ma,[La,z(s(e.$t("common.documentCloud.star")),1)]))]),_:2},1032,["onClick"])):V("",!0),fe.value(f.row.listType)?(n(),Z(ne,{key:2,onClick:M=>X("share",f.row)},{default:_(()=>[ja,z(s(e.$t("common.share")),1)]),_:2},1032,["onClick"])):V("",!0),fe.value(f.row.listType)?(n(),Z(ne,{key:3,onClick:M=>X("download",f.row)},{default:_(()=>[Ha,z(s(e.$t("common.download")),1)]),_:2},1032,["onClick"])):V("",!0),i.tableType!=="recent"?(n(),Z(ne,{key:4,onClick:M=>X("rename",f.row)},{default:_(()=>[Ga,z(s(e.$t("common.rename")),1)]),_:2},1032,["onClick"])):V("",!0),i.tableType==="document"?(n(),Z(ne,{key:5,onClick:M=>X("move",f.row)},{default:_(()=>[Ya,z(s(e.$t("common.move")),1)]),_:2},1032,["onClick"])):V("",!0),i.tableType!=="recent"?(n(),Z(ne,{key:6,onClick:M=>X("delete",f.row)},{default:_(()=>[qa,z(s(e.$t("common.delete")),1)]),_:2},1032,["onClick"])):V("",!0),fe.value(f.row.listType)&&i.tableType==="recent"?(n(),Z(ne,{key:7,onClick:M=>X("remove",f.row)},{default:_(()=>[Ka,z(s(e.$t("common.remove")),1)]),_:2},1032,["onClick"])):V("",!0)]),_:2},1024)]),default:_(()=>[Va]),_:2},1032,["onVisibleChange","disabled"])]),_:1})]),_:1},8,["data","max-height"]),T.value?(n(),p("p",Qa,Ja)):V("",!0),N.value?(n(),p("p",Xa,s(e.$t("common.end")),1)):V("",!0)],512),[[te,!L.value]]),W(o("div",Wa,[es,o("p",ts,[Y.value?(n(),p("span",is,s(e.$t("common.documentCloud.noSearchResults")),1)):(n(),p("span",os,[i.tableType==="recent"?(n(),p("span",ls,[z(s(e.$t("common.documentCloud.recentTip"))+" ",1),o("a",{class:"underline text-[#4D64FD] curs
1or-pointer",href:H(Io).hipdf},s(e.$t("common.documentCloud.giveHiPDFTry")),9,as)])):i.tableType==="starred"?(n(),p("span",ss,s(e.$t("common.documentCloud.nothingInHere")),1)):(n(),p("span",ns,[z(s(e.$t("common.documentCloud.thereAreNoDocumentsYet"))+" ",1),o("a",{class:"underline text-[#4D64FD] cursor-pointer",onClick:Vt},s(e.$t("common.documentCloud.uploadSomePDFsNow")),1)]))]))])],512),[[te,L.value]])])),[[Kt,u.value]]),r(Gt,{showDialog:j.value,type:le.value,selectIds:F,directoryPath:B.value,onClose:t[8]||(t[8]=f=>Tt(f)),onMoveSuccess:Pt},null,8,["showDialog","type","selectIds","directoryPath"]),r(Yt,{isShow:ie.value,fileId:ae.value,taskId:ce.value,onClose:Ut},null,8,["isShow","fileId","taskId"]),m.value?(n(),p("div",cs,[ds,o("span",us,s(e.$t("common.documentCloud.sharing")),1)])):V("",!0),r(qt,{showDialog:C.value,type:"delete",confirmLoading:v.value,onClose:Lt,onSubmitEvent:Bt},null,8,["showDialog","confirmLoading"])])):V("",!0)}}},ms=me(rs,[["__scopeId","data-v-1562ae57"]]),fs="https://static.hipdf.com/img_congrate-c834f7e8.png";const Oe=g=>(ze("data-v-a23146b8"),g=g(),Re(),g),ps={class:"container activity-share-success"},_s={class:"success-content"},hs=Oe(()=>o("img",{src:fs,alt:""},null,-1)),vs={class:"mb-[24px] text-xl leading-[24px] font-bold text-[#121212]/[1]"},gs=Oe(()=>o("br",null,null,-1)),ys={class:"text-[#4d64fd]/[1]"},bs={class:"success-text"},ws=Oe(()=>o("br",null,null,-1)),Cs=Oe(()=>o("br",null,null,-1)),ks={class:"success-button"},xs={__name:"ActivitySuccessDialog",props:{isShow:Boolean,spaceSize:{type:String,default:()=>"10G"}},emits:["close"],setup(g,{emit:h}){const O=g,{isShow:P}=ho(O),x=h,$=()=>{x("close")};return(i,w)=>{const R=we,E=Ee;return n(),p("div",ps,[r(E,{modelValue:H(P),"onUpdate:modelValue":w[0]||(w[0]=y=>vo(P)?P.value=y:null),width:"671px",center:"","destroy-on-close":"","close-on-click-modal":!1,onClose:$},{default:_(()=>[o("div",_s,[hs,o("div",vs,[z(s(i.$t("common.documentCloud.congratulations"))+" ",1),gs,z(" "+s(i.$t("common.documentCloud.youHaveReceived"))+" ",1),o("span",ys,s(g.spaceSize),1),z(" "+s(i.$t("common.documentCloud.cloudStorageSpace")),1)]),o("div",bs,[z(s(i.$t("common.documentCloud.successText"))+" ",1),ws,Cs,z(" "+s(i.$t("common.documentCloud.haveFunWithIt")),1)]),o("div",ks,[r(R,{type:"primary",onClick:$},{default:_(()=>[z(s(i.$t("common.documentCloud.goExplore")),1)]),_:1})])])]),_:1},8,["modelValue"])])}}},$s=me(xs,[["__scopeId","data-v-a23146b8"]]);const Fs=g=>(ze("data-v-f75b453e"),g=g(),Re(),g),Ss={class:"px-8 py-4 text-left"},Ts={class:"flex items-center mb-3 text-base font-normal leading-5 text-[#121212]"},Ds=Fs(()=>o("span",{class:"icon-documentCloud mr-2"},null,-1)),Is={class:"text-[#121212]/[1]"},Es={class:"mt-3 flex flex-wrap items-center justify-between"},Us={class:"text-base font-normal leading-5"},Ps={class:"text-[#121212]"},Ns={class:"text-[#3c3c43]/[0.6]"},zs={key:1,class:"w-4 animate-spin",src:Ke},Rs={__name:"CloudStorageCapacity",setup(g){const{$bus:h}=Fe(),{getFinalToken:O}=Ve(),P=10*Math.pow(1024,3),x=oe({already_capacity:0,total_capacity:0,scale_capacity:0}),$=d(!1),i=d(!1);Ge(()=>{h.on("cloud-upload:finish",w)}),Ne(()=>{h.off("cloud-upload:finish",w)});const w=()=>{jo().then(({already_capacity:y,total_capacity:u})=>{x.already_capacity=y,x.total_capacity=u,x.scale_capacity=y/u>1?100:y/u*100}).catch(y=>{const{code:u,status:N}=y;$e(u||N,!1)})},R=()=>{i.value||(i.value=!0,Ho().then(y=>{E(!0),w()}).catch(y=>{const{code:u,status:N}=y;$e(u||N,!1)}).finally(()=>{i.value=!1}))},E=y=>{$.value=y};return he(()=>O.value,y=>{y&&w()},{immediate:!0}),(y,u)=>{const N=nt,T=st,U=$s;return n(),p(_e,null,[o("div",Ss,[o("p",Ts,[Ds,o("span",Is,s(y.$t("common.documentCloud.storage")),1)]),r(N,{percentage:x.scale_capacity,"show-text":!1},null,8,["percentage"]),o("div",Es,[o("p",Us,[o("span",Ps,s(H(Ae)(x.already_capacity,{base:2,standard:"jedec"})),1),o("span",Ns," / "+s(H(Ae)(x.total_capacity,{base:2,standard:"jedec"})),1)]),x.total_capacity<P?(n(),p("p",{key:0,class:"flex items-center text-xs font-bold text-[#6980FF] cursor-pointer",onClick:R},[z(s(y.$t("common.documentCloud.freeStroage"))+" ",1),i.value?(n(),p("img",zs)):(n(),Z(T,{key:0,size:16},{default:_(()=>[r(H(ro))]),_:1}))])):V("",!0)])]),r(U,{isShow:$.value,onClose:u[0]||(u[0]=G=>E(!1))},null,8,["isShow"])],64)}}},Vs=me(Rs,[["__scopeId","data-v-f75b453e"]]);const Os=g=>(ze("data-v-55e1d887"),g=g(),Re(),g),Ms=Os(()=>o("span",{class:"icon-upload mr-1.5"},null,-1)),Ls=["accept"],Bs={__name:"CloudUploadBtn",props:{acceptFileType:{type:String,default:()=>".pdf,.bmp,.dib,.jpg,.jpeg,.jpe,.jfif,.gif,.tif,.tiff,.png,.ico,.pub,.mpp,.vsd,.doc,.docx,.txt,.rtf,.docm,.dotx,.dotm,.dot,.odt,.xls,.xlsx,.csv,.xlsm,.xl
1sb,.xlam,.xltx,.xltm,.xlt,.ods,.ppt,.pptx,.pptm,.pptsx,.pps,.pptsm,.potx,.pot,.potm,.odp,.html,.htm,.mhtml,.mht,.xml,.log,.dat,.ini,.config"}},setup(g){const{$bus:h,$sensorsApi:O}=Fe(),P=Pe(),x=d(null),$=pe(()=>P.getters.currentPageFeatures),i=w=>{h.emit("upload:local-file",{showUploadProgressDialog:!0,fileList:w.target.files}),w.target.value="",O.track("Uploadfile_way",{load_way:"Local",type:$.value})};return qe(()=>{h.on("upload:no-data",()=>{x.value.dispatchEvent(new MouseEvent("click"))})}),Ne(()=>{h.off("upload:no-data")}),(w,R)=>{const E=we;return n(),Z(E,{class:"upload-btn-wrapper m-8 flex gap-2 text-xl font-bold leading-[24px] relative",type:"primary"},{default:_(()=>[Ms,o("span",null,s(w.$t("common.documentCloud.uploadFiles")),1),o("input",{ref_key:"uploadRef",ref:x,class:"opacity-0 w-full h-full absolute top-0 left-0 z-10 cursor-pointer",type:"file",name:"file",multiple:!0,accept:g.acceptFileType,onChange:i},null,40,Ls)]),_:1})}}},As=me(Bs,[["__scopeId","data-v-55e1d887"]]);const js={style:{"background-color":"white"},class:"document-cloud flex h-[calc(100vh-60px)] xl:h-[calc(100vh-72px)]"},Hs={class:"left-menu flex flex-col w-1/6 min-w-[245px] border-r border-solid border-[#D8D8DF]"},Gs={class:"menu h-full"},Ys=["onClick"],qs={class:"right-container w-5/6 overflow-x-auto"},Ks={__name:"DocumentCloud",setup(g){const{t:h}=Ue(),O=dt(),P=d([{id:"recent",name:h("common.documentCloud.recentMenu"),icon:"icon-recent",active:!0},{id:"starred",name:h("common.documentCloud.starredMenu"),icon:"icon-starred",active:!1},{id:"document",name:h("common.documentCloud.documentCloud"),icon:"icon-documentCloud",active:!1}]),{isLogin:x}=Ve(),$=d("recent"),{$bus:i}=Fe(),w=Pe();Ge(()=>{R()}),qe(()=>{const{type:u}=O.currentRoute.value.query;$.value=u||"recent",x.value&&y()});const R=()=>{const u={featureName:"documentCloud"};w.commit("SET_CURRENT_PAGE_INFO",Object.assign(Go,u))},E=u=>{$.value=u},y=()=>{const N=new URLSearchParams(window.location.search).get("fileT");ut.getItem(`document-cloud:upload:file-from-url:${N}`).then(T=>{T&&i.emit("upload:download-file-from-url",{...T,uploadFileTime:N})})};return(u,N)=>{const T=As,U=Vs,G=ms,L=Yl;return n(),p("div",js,[o("div",Hs,[r(T),o("ul",Gs,[(n(!0),p(_e,null,Ye(P.value,(Y,j)=>(n(),p("li",{class:ye(["flex items-center py-5 px-8 text-base font-normal leading-5 text-[#121212] cursor-pointer hover:bg-[#F4F6FF]",{selected:$.value===Y.id}]),key:j,onClick:le=>E(Y.id)},[o("span",{class:ye(["mr-2",Y.icon])},null,2),o("span",null,s(Y.name),1)],10,Ys))),128))]),r(U)]),o("div",qs,[r(G,{tableType:$.value},null,8,["tableType"]),r(L)])])}}},sn=me(Ks,[["__scopeId","data-v-4cfde413"]]);export{sn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.