vue-spear-tip 0.6.19 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +41 -41
- package/dist/{Button-pCNS2zU_.cjs → Button-DL8dzhLs.cjs} +1 -1
- package/dist/{Button-C8TgZIb0.js → Button-mNgrIBt0.js} +1 -1
- package/dist/{CodeHighlight-BtIZI4bR.cjs → CodeHighlight-CWT9ljxW.cjs} +1 -1
- package/dist/{CodeHighlight-BRxQqnpA.js → CodeHighlight-eMrWWqjO.js} +1 -1
- package/dist/{DateField-DchBLOyR.cjs → DateField-276tU7dR.cjs} +1 -1
- package/dist/{DateField-f7KPonnO.js → DateField-DJgLEfuJ.js} +2 -2
- package/dist/{Draggable-t9YiMTH7.cjs → Draggable-D9K46teR.cjs} +1 -1
- package/dist/{Draggable-5iUEhvqP.js → Draggable-xSaOZkIc.js} +1 -1
- package/dist/{Droppable-ZB7XSm7P.js → Droppable-DGc3gGXX.js} +1 -1
- package/dist/{Droppable-Bngj5bOY.cjs → Droppable-ozHn_LH7.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-CYT8CYt1.js → FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-Bbdo4olJ.cjs → FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs} +1 -1
- package/dist/{FilesArea-RivTz8Kc.js → FilesArea-C9z4gTb0.js} +2 -2
- package/dist/{FilesArea-D3T2h-W1.cjs → FilesArea-DZiv8wBT.cjs} +1 -1
- package/dist/{Scrollbar-Ocdwgu7q.js → Scrollbar-CBCuild6.js} +1 -1
- package/dist/{Scrollbar-CcoknXXp.cjs → Scrollbar-DpX61NhD.cjs} +1 -1
- package/dist/{SelectField-lNu4v9cs.js → SelectField-BN765HUF.js} +154 -148
- package/dist/{SelectField-CoX17KKw.cjs → SelectField-BTQ-c5YW.cjs} +3 -3
- package/dist/{StringField-BbygO1Co.cjs → StringField-D4k0FAo8.cjs} +1 -1
- package/dist/{StringField-NZ1i2QQ3.js → StringField-DXuKHlpt.js} +2 -2
- package/dist/{SwitchField-CtRl0F19.js → SwitchField-BdKQGeSb.js} +2 -2
- package/dist/{SwitchField-_G48VVZT.cjs → SwitchField-Dj2QpW85.cjs} +1 -1
- package/dist/{Tabs-eTgdVZbO.js → Tabs-CAbUgriG.js} +1 -1
- package/dist/{Tabs-HEDRRUS3.cjs → Tabs-Dm8Aj2Y8.cjs} +1 -1
- package/dist/{TextField-cBCKI0cn.js → TextField-BTofkhCU.js} +2 -2
- package/dist/{TextField-Bd-lZTSW.cjs → TextField-DJkk40xg.cjs} +1 -1
- package/dist/{index-DNKvxD16.js → index-Cd_DL4JD.js} +3 -3
- package/dist/{index-8tGGISA9.cjs → index-DZjDh7FL.cjs} +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/{Button-DefvS2tb.js → Button-8C6MeUM7.js} +1 -1
- package/docs/static/{CodeHighlight-BVIlCbbZ.js → CodeHighlight-DFeMy3ki.js} +1 -1
- package/docs/static/{DateField-DWZSZHD8.js → DateField-Cf48x5xH.js} +1 -1
- package/docs/static/{Draggable-Bm-4m4gO.js → Draggable-CS4w2yK4.js} +1 -1
- package/docs/static/{Droppable-Cnqe7Gg7.js → Droppable-wLX0xjMl.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-wRSTrf2p.js → FieldComponent.vue_vue_type_script_lang-Ig4MpRH0.js} +1 -1
- package/docs/static/{FilesArea-3G-jGZpj.js → FilesArea-Cl92W6MM.js} +1 -1
- package/docs/static/{NoSymbolIcon-CYY6lnSa.js → NoSymbolIcon-NizHqgdb.js} +1 -1
- package/docs/static/{Scrollbar-DFH9Klrw.js → Scrollbar-l6hENTT0.js} +1 -1
- package/docs/static/{SelectField-CLO6Fxfz.js → SelectField-CC7fBKuR.js} +8 -8
- package/docs/static/{StringField-BuCcwPUS.js → StringField-2LaMICQ8.js} +1 -1
- package/docs/static/{SwitchField-CyGjl8KD.js → SwitchField-DaP3PVMB.js} +1 -1
- package/docs/static/{Tabs-D1sUGHr1.js → Tabs-CBsULMP9.js} +1 -1
- package/docs/static/{TextField-BVkaf8OT.js → TextField-DUq1jGAW.js} +1 -1
- package/docs/static/index-DpXxVeQv.js +2 -0
- package/docs/static/{main-DjEys_aT.js → main-BIpS3Kki.js} +3 -3
- package/package.json +1 -1
- package/docs/static/index-DK4vwxii.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Tt=Object.defineProperty;var b=(s,l)=>Tt(s,"name",{value:l,configurable:!0});import{K as Ge,G as vt,P as se,C as gt,h as De,o as J,c as ne,n as xe,l as Te,I as Pe,a as F,H as ye,w as ge,e as Fe,t as ve,b as ke,f as be,i as Pt,g as Re,m as Ct,L as pt,D as Ft,j as yt,A as Ce,M as tt,u as nt,J as Ne,N as _t,O as lt,r as et,W as Et,E as Rt,F as Mt,Q as Ut,k as xt}from"./main-DjEys_aT.js";import{F as jt}from"./FieldComponent.vue_vue_type_script_lang-wRSTrf2p.js";import{c as Qe,g as $t,a as Lt}from"./_commonjsHelpers-BO6-jdEg.js";var Zt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Oe=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Ht(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Zt(l,d,a),a},"__decorateClass$6"),Ue;let ze=(Ue=class extends Ge{components={VSTButton:vt};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;areaKey="";isImage=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-title",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(l){if(!this.canChange)return l.preventDefault();this.$parent.isDragStarted=!0,l.dataTransfer.dropEffect="move",l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash,area:this.areaKey}))}dragOver(l){this.$parent.isDragStarted&&(l.preventDefault(),this.isDroppable=!0)}dragLeave(l){l.preventDefault(),this.isDroppable=!1}onDrop(l){this.isDroppable=!1;const d=decodeURI(l.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|");let k=l.dataTransfer.getData("itemID");const a={name:d[0],hash:d[1]?d[1]:null};typeof k=="string"&&k&&k!=JSON.stringify(a)&&(k=JSON.parse(k),this.$parent?.files?.some?.(o=>o.hash==k.hash)&&this.$emit("sort",k,a))}eURI(l){return encodeURI(l)}viewHover(l,d){let k=l.target;if(d&&k?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"){const a=k.querySelector(".file-view-text");a&&(a.style.display="block",a.style.cursor="zoom-in")}else{const a=k.querySelector(".file-view-text");a&&(a.style.display="none",a.style.cursor="auto")}}},b(Ue,"FileItem"),Ue);Oe([se(Object)],ze.prototype,"file",2);Oe([se(String)],ze.prototype,"fileName",2);Oe([se(String)],ze.prototype,"fileUri",2);Oe([se(String,null)],ze.prototype,"fileHash",2);Oe([se(Boolean)],ze.prototype,"canChange",2);Oe([se(Boolean)],ze.prototype,"onlyImages",2);Oe([se(Boolean)],ze.prototype,"hasDeleted",2);Oe([se(String)],ze.prototype,"areaKey",2);Oe([se(Boolean)],ze.prototype,"isImage",2);ze=Oe([gt],ze);const Vt=["data-id","title"],Wt={class:"file-deleted"},Kt={class:"file-deleted",style:{"padding-top":"20px"}},Gt={class:"file-deleted file-download"},Yt={class:"file-title"},Xt=["title"],Jt={class:"absolute right--15px top-0 py0 text-neutral-600! uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},qt=["src"],Qt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},en={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},tn={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},nn={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},rn={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},sn={class:"file-buttons absolute flex flex w100% bottom-5px"},an={class:"file-loading-indicator"},on={class:"text-center mt-2"},ln={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},dn=["data-value"],hn={class:"text-center text-9px mt-2 pt3px"},un={key:0,class:"p-0 text-center"},fn={key:1};function cn(s,l,d,k,a,o){const r=De("VSTButton");return J(),ne("div",{class:xe(["file-item",{"file-item-drop":s.isDroppable,"file-view-mode":!s.canChange,"only-images":s.onlyImages,"border-1px border-solid border-#e5e15e":!s.file?.new,"border-1px border-solid border-lightblue-300":s.file?.new}]),ref:"draggable",draggable:"true",onDrop:l[6]||(l[6]=i=>s.hasDeleted||!s.canChange?null:s.onDrop(i)),onDragstart:l[7]||(l[7]=i=>s.hasDeleted||!s.canChange?null:s.startDrag(i)),onDragover:l[8]||(l[8]=i=>s.hasDeleted||!s.canChange?null:s.dragOver(i)),onDragleave:l[9]||(l[9]=i=>s.hasDeleted||!s.canChange?null:s.dragLeave(i)),onDragend:l[10]||(l[10]=i=>s.$parent.isDragStarted=!1),"data-id":s.eURI(s.fileName+"|"+(s.fileHash?s.fileHash:"")),title:!s.onlyImages&&!s.VST.$reactive.isIphone&&!s.file.deleted?s.fileName:null},[s.file.loaded==100?(J(),ne("div",{key:0,class:xe(["file-container relative min-h92px",{}])},[Te(F("div",Wt,[l[12]||(l[12]=F("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),ye(r,{size:"sm",theme:"empty",onClickTap:l[0]||(l[0]=i=>s.$emit("restore",s.fileName,s.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:ge(()=>[...l[11]||(l[11]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),F("path",{d:"M3 4.001v5h5"}),F("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[Pe,s.file.deleted]]),Te(F("div",Kt,[l[13]||(l[13]=Fe("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),l[14]||(l[14]=F("br",null,null,-1)),l[15]||(l[15]=Fe()),F("b",null,ve(s.fileName),1)],512),[[Pe,!s.file.found]]),Te(F("div",Gt,[...l[16]||(l[16]=[F("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[Pe,s.file.spin]]),F("div",Yt,[F("div",{class:"cursor-text text-center",title:s.canChange&&!s.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[F("b",null,ve(s.fileName.split(".").slice(0,-1).join(".")),1)],8,Xt)]),F("div",{class:"file-content",onMouseenter:l[2]||(l[2]=i=>s.viewHover(i,!0)),onMouseleave:l[3]||(l[3]=i=>s.viewHover(i,!1))},[ye(r,{size:"md",theme:"empty",onClickTap:l[1]||(l[1]=i=>s.$emit("view",s.fileName))},{default:ge(()=>[F("div",Jt,ve(s.file.ext),1),s.fileType=="image"?(J(),ne("img",{key:0,class:"max-w52px! max-h52px! rd-lg!",src:s.file.uri},null,8,qt)):s.fileType=="excel"?(J(),ne("svg",Qt,[...l[17]||(l[17]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),F("path",{d:"M8 15h8"},null,-1),F("path",{d:"M11 11v7"},null,-1)])])):s.fileType=="doc"?(J(),ne("svg",en,[...l[18]||(l[18]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):s.fileType=="video"?(J(),ne("svg",tn,[...l[19]||(l[19]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),F("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):s.fileExt=="pdf"?(J(),ne("svg",nn,[...l[20]||(l[20]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),F("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),F("path",{d:"M17 18h2"},null,-1),F("path",{d:"M20 15h-3v6"},null,-1),F("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(J(),ne("svg",rn,[...l[21]||(l[21]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M12 17v.01"},null,-1),F("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),l[22]||(l[22]=F("div",{class:"file-view-text z22!",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},[F("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),F("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),F("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),F("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),F("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),F("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),F("path",{d:"M12 12h-.01"})])],-1))]),_:1})],32),F("div",sn,[ye(r,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:l[4]||(l[4]=i=>s.$emit("download",s.fileName))},{default:ge(()=>[...l[23]||(l[23]=[F("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),F("path",{d:"M12 13l0 9"}),F("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),s.canChange?(J(),ke(r,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:l[5]||(l[5]=i=>s.$emit("delete",s.fileName,s.file.deleted=!0))},{default:ge(()=>[...l[24]||(l[24]=[F("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M4 7h16"}),F("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),F("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),F("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):be("",!0)])])):(J(),ne("div",{key:1,class:xe(["file-loading",{"only-images":s.onlyImages}])},[F("div",an,[F("div",on,[F("b",null,ve(s.file.loaded)+"%",1)]),F("div",ln,[F("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${s.file.loaded}%`,style:Pt(`width: ${s.file.loaded}%`)},null,12,dn)]),F("div",hn,[F("b",null,ve(s.file.loadedSize)+" / "+ve(s.file.sizeNamed),1)])])],2)),s.file.loaded==100?(J(),ne("div",{key:2,class:xe(["file-info relative",{"text-center":s.canChange&&!s.onlyImages,"bg-#e2df4463":!s.file?.new,"bg-lightblue-200/60":s.file?.new}])},[s.onlyImages?(J(),ne("div",un,[F("b",null," "+ve(s.file.sizeNamed),1)])):(J(),ne("div",fn,[l[25]||(l[25]=Fe("Размер ",-1)),F("b",null,ve(s.file.sizeNamed),1)]))],2)):be("",!0)],42,Vt)}b(cn,"render$6");const pn=Re(ze,[["render",cn],["__scopeId","data-v-4d776467"]]),mn={class:"controll"},vn={class:"controll__item controll__item--circle"},gn={class:"controll__pan controll__item--circle__inner"},wn={class:"controll__pan__up controll__item--circle__inner__up"},bn={class:"controll__pan__right controll__item--circle__inner__right"},yn={class:"controll__pan__down controll__item--circle__inner__down"},_n={class:"controll__pan__left controll__item--circle__inner__left"},xn={class:"controll__home controll__item controll__item--list-item"},kn={class:"controll__zoom-in controll__item controll__item--list-item"},zn={class:"controll__zoom-in controll__item controll__item--list-item"},Sn=Ct({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(s,{emit:l}){const d=l;function k(o,r){d("buttondown",{key:r})}b(k,"u");function a(o,r){d("buttonup",{key:r})}return b(a,"n"),(o,r)=>(J(),ne("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:r[31]||(r[31]=Ne(()=>{},["stop"])),onMousedown:r[32]||(r[32]=Ne(()=>{},["stop"]))},[F("ul",mn,[F("li",vn,[F("ul",gn,[F("li",wn,[F("a",{onPointerdown:r[0]||(r[0]=i=>k(i,"pan-up")),onPointerup:r[1]||(r[1]=i=>a(i,"pan-up")),onPointercancel:r[2]||(r[2]=i=>a(i,"pan-up")),onPointerleave:r[3]||(r[3]=i=>a(i,"pan-up")),onContextmenu:r[4]||(r[4]=Ne(()=>{},["prevent"]))},r[33]||(r[33]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[F("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),F("li",bn,[F("a",{onPointerdown:r[5]||(r[5]=i=>k(i,"pan-right")),onPointerup:r[6]||(r[6]=i=>a(i,"pan-right")),onPointercancel:r[7]||(r[7]=i=>a(i,"pan-right")),onPointerleave:r[8]||(r[8]=i=>a(i,"pan-right")),onContextmenu:r[9]||(r[9]=Ne(()=>{},["prevent"]))},r[34]||(r[34]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[F("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),F("li",yn,[F("a",{onPointerdown:r[10]||(r[10]=i=>k(i,"pan-down")),onPointerup:r[11]||(r[11]=i=>a(i,"pan-down")),onPointercancel:r[12]||(r[12]=i=>a(i,"pan-down")),onPointerleave:r[13]||(r[13]=i=>a(i,"pan-down")),onContextmenu:r[14]||(r[14]=Ne(()=>{},["prevent"]))},r[35]||(r[35]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[F("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),F("li",_n,[F("a",{onPointerdown:r[15]||(r[15]=i=>k(i,"pan-left")),onPointercancel:r[16]||(r[16]=i=>a(i,"pan-left")),onPointerup:r[17]||(r[17]=i=>a(i,"pan-left")),onPointerleave:r[18]||(r[18]=i=>a(i,"pan-left")),onContextmenu:r[19]||(r[19]=Ne(()=>{},["prevent"]))},r[36]||(r[36]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[F("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),F("li",xn,[F("a",{onPointerdown:r[20]||(r[20]=i=>k(i,"home"))},r[37]||(r[37]=[_t('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),F("li",kn,[F("a",{onPointerdown:r[21]||(r[21]=i=>k(i,"zoom-in")),onPointerup:r[22]||(r[22]=i=>a(i,"zoom-in")),onPointercancel:r[23]||(r[23]=i=>a(i,"zoom-in")),onPointerleave:r[24]||(r[24]=i=>a(i,"zoom-in")),onContextmenu:r[25]||(r[25]=Ne(()=>{},["prevent"]))},r[38]||(r[38]=[_t('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),F("li",zn,[F("a",{onPointerdown:r[26]||(r[26]=i=>k(i,"zoom-out")),onPointerup:r[27]||(r[27]=i=>a(i,"zoom-out")),onPointercancel:r[28]||(r[28]=i=>a(i,"zoom-out")),onPointerleave:r[29]||(r[29]=i=>a(i,"zoom-out")),onContextmenu:r[30]||(r[30]=Ne(()=>{},["prevent"]))},r[39]||(r[39]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[F("circle",{cx:"11",cy:"11",r:"8"}),F("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),F("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),It=b((s,l)=>{const d=s.__vccOpts||s;for(const[k,a]of l)d[k]=a;return d},"C"),Cn=It(Sn,[["__scopeId","data-v-3ba139de"]]);function Fn(){let s=0;function l(k,a,o,r){k(),s=window.setTimeout(()=>{s=window.setInterval(()=>{a()},r)},o)}b(l,"i");function d(){s&&(window.clearInterval(s),s=0)}return b(d,"l"),{startHold:l,clearHold:d}}b(Fn,"R");const qe="control-btn";function En({props:s,transform:l}){let d=Fn();function k(p){d.startHold(()=>{l.changeZoom(p*s.buttonZoomStep*.5,qe)},()=>{l.changeZoom(p*s.buttonZoomStep*.5,qe)},300,50)}b(k,"u");function a(p){if(!s.disabled)switch(p.key){case"home":i();break;case"zoom-in":k(1);break;case"zoom-out":k(-1);break;case"pan-left":r({x:1,y:0});break;case"pan-right":r({x:-1,y:0});break;case"pan-up":r({x:0,y:1});break;case"pan-down":r({x:0,y:-1});break}}b(a,"n");function o(p){d.clearHold()}b(o,"a");function r(p){d.startHold(()=>{l.changePan(p.x*s.buttonPanStep,p.y*s.buttonPanStep,qe)},()=>{l.changePan(p.x*s.buttonPanStep,p.y*s.buttonPanStep,qe)},300,50)}b(r,"e");function i(){l.goHome(qe)}return b(i,"o"),{onButtonDown:a,onButtonUp:o}}b(En,"A");function In({props:s,transform:l}){let d={x:0,y:0};function k(r){s.disabled||r.pointerType!=="mouse"||!s.mouseEnabled||(d={x:r.clientX,y:r.clientY},document.addEventListener("pointermove",o,{passive:!1}),document.addEventListener("pointerup",function(i){document.removeEventListener("pointermove",o)}),document.addEventListener("pointerleave",function(i){document.removeEventListener("pointermove",o)}),document.addEventListener("pointercancel",function(i){document.removeEventListener("pointermove",o)}))}b(k,"u");function a(r){if(s.disabled||!s.dblClickEnabled||!s.zoomEnabled)return;const i={x:r.clientX,y:r.clientY};l.changeZoom(s.dblClickZoomStep,"dblClick",i)}b(a,"n");function o(r){if(s.disabled||!s.panEnabled||r.pointerType!=="mouse"||!s.mouseEnabled)return;let i={x:r.clientX-d.x,y:r.clientY-d.y};l.changePan(i.x,i.y,r.pointerType),d={x:r.clientX,y:r.clientY},r.preventDefault()}return b(o,"a"),{onPointerDown:k,onDblClick:a}}b(In,"F");function On({props:s,transform:l}){let d=nt({}),k=nt(0),a=null;function o(p){if(s.disabled||!s.touchEnabled||!s.panEnabled&&!s.zoomEnabled||(p.preventDefault(),p.touches.length<1))return;const g=p.touches.item(0);if(!g)return;let x=0,_={x:g.clientX,y:g.clientY};if(p.touches.length===2){const f=p.touches.item(1);let m=r({x:g?g.clientX:0,y:g?g.clientY:0},{x:f?f.clientX:0,y:f?f.clientY:0});k.value<=0?(k.value=m.distance,x=0):(x=m.distance/k.value*l.zoom.value-l.zoom.value,k.value=m.distance),_=m.center}if(s.zoomEnabled&&l.changeZoom(x,"touch",_),a===null){a={x:_.x,y:_.y};return}const C={x:_.x-a.x,y:_.y-a.y};s.panEnabled&&l.changePan(C.x,C.y,"touch"),a={x:_.x,y:_.y}}b(o,"a");function r(p,g){let x=Math.sqrt(Math.pow(p.x-g.x,2)+Math.pow(p.y-g.y,2)),_={x:(p.x+g.x)/2,y:(p.y+g.y)/2};return{distance:x,center:_}}b(r,"e");function i(p){s.disabled||!s.touchEnabled||(a=null,document.addEventListener("touchmove",o,{passive:!1}),document.addEventListener("touchend",function(g){p.touches.length<2&&(k.value=-1),document.removeEventListener("touchmove",o)}))}return b(i,"o"),{onTouchStart:i,touchCount:tt(()=>Object.keys(d.value).length)}}b(On,"G");function An({props:s,onChange:l,container:d,target:k}){const a=nt({x:0,y:0}),o=nt(0);Ft(()=>{o.value=s.minZoom,a.value={x:s.pan!=null?s.pan.x:s.initialPanX,y:s.pan!=null?s.pan.y:s.initialPanY},s.zoom?o.value=s.zoom:s.initialZoom>=s.minZoom&&s.initialZoom<=s.maxZoom&&(o.value=s.initialZoom)}),pt(()=>s.zoom,()=>{isNaN(s.zoom)||(o.value=s.zoom)}),pt(()=>s.pan,()=>{s.pan&&(a.value.x=s.pan.x,a.value.y=s.pan.y)},{deep:!0});function r(g,x,_){if(isNaN(g)||g===0)return;const C=o.value;let f=o.value+g;if(f>s.maxZoom?f=s.maxZoom:f<s.minZoom&&(f=s.minZoom),Math.abs(C-f)<1e-4)return;if(o.value=f,s.zoomOrigin==="center"&&(_=mt(d.value)),s.zoomOrigin!=="content-center"){_||(_=mt(d.value));const h=Dn(d.value,a.value),w={x:(f-C)*((h.x-_.x)/C),y:(f-C)*((h.y-_.y)/C)};i(w.x,w.y,"zoom")}let m={zoom:f,delta:{zoom:g,pan:{x:0,y:0}},pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:x};l("zoom",m)}b(r,"e");function i(g,x,_){isNaN(g)&&(g=0),isNaN(x)&&(x=0),a.value={x:a.value.x+g,y:a.value.y+x};let C={zoom:o.value,delta:{zoom:0,pan:{x:g,y:x}},pan:{x:a.value.x,y:a.value.y,deltaX:g,deltaY:x},type:_};l("panned",C)}b(i,"o");function p(g){o.value=s.initialZoom,l("zoom",{zoom:o.value,pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:g});let x={x:s.initialPanX-a.value.x,y:s.initialPanY-a.value.y};a.value={x:s.initialPanX,y:s.initialPanY},l("panned",{zoom:o.value,pan:{x:a.value.x,y:a.value.y,deltaX:x.x,deltaY:x.y},type:g})}return b(p,"d"),{zoom:tt(()=>o.value),pan:tt(()=>a.value),setZoom:b(g=>{o.value=g},"setZoom"),setPan:b(g=>{a.value=g},"setPan"),changeZoom:r,changePan:i,goHome:p}}b(An,"J");function mt(s){const l=s.getBoundingClientRect();return{x:l.left+l.width/2,y:l.top+l.height/2}}b(mt,"B");function Dn(s,l){const d=mt(s);return{x:d.x+l.x,y:d.y+l.y}}b(Dn,"Q");function Bn({props:s,transform:l}){function d(k){if(s.disabled||!s.wheelEnabled||!s.zoomEnabled)return;const a=Math.abs(k.deltaY)>0?k.deltaY:k.deltaX,o=s.wheelZoomStep*-1*a/Math.abs(a),r={x:k.clientX,y:k.clientY};l.changeZoom(o,"wheel",r),k.preventDefault()}return b(d,"l"),{onWheel:d}}b(Bn,"ee");function Nn({props:s,onChange:l,container:d,target:k}){const a=An({props:s,onChange:l,container:d,target:k}),o=On({props:s,transform:a}),r=Bn({props:s,transform:a}),i=In({props:s,transform:a}),p=En({props:s,transform:a});return{zoom:a.zoom,pan:a.pan,setZoom:a.setZoom,setPan:a.setPan,onWheel:r.onWheel,onTouchStart:o.onTouchStart,onButtonUp:p.onButtonUp,onButtonDown:p.onButtonDown,onPointerDown:i.onPointerDown,onDblClick:i.onDblClick}}b(Nn,"te");const Tn=Ct({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(s,{emit:l}){let d=l,k=s,a=nt(),o=tt(()=>{var x;return(x=a.value)==null?void 0:x.querySelector(k.selector)}),r=Nn({props:k,onChange:i,container:a,target:o});function i(x,_){x==="zoom"?d("update:zoom",_.zoom):x==="panned"&&d("update:pan",_.pan),d(x,_)}b(i,"o");let p=tt(()=>`translate(${r.pan.value.x}px, ${r.pan.value.y}px) scale(${r.zoom.value})`);function g(){o.value&&(o.value.style.transform=p.value,o.value.style.transformOrigin="center center",o.value.style.transition="transform 0.07s ease-out",o.value.style.transformBox="fill-box")}return b(g,"s"),pt(p,()=>{g()},{flush:"post"}),Ft(()=>{g()}),(x,_)=>(J(),ne("div",{ref_key:"container",ref:a,class:xe(x.$style.container),onDblclick:_[0]||(_[0]=(...C)=>Ce(r).onDblClick&&Ce(r).onDblClick(...C)),onPointerdown:_[1]||(_[1]=(...C)=>Ce(r).onPointerDown&&Ce(r).onPointerDown(...C)),onWheel:_[2]||(_[2]=(...C)=>Ce(r).onWheel&&Ce(r).onWheel(...C)),onTouchstart:_[3]||(_[3]=(...C)=>Ce(r).onTouchStart&&Ce(r).onTouchStart(...C))},[yt(x.$slots,"default",{},void 0,!0),yt(x.$slots,"buttons",{},()=>[Ce(k).enableControlButton?(J(),ke(Cn,{key:0,onButtondown:Ce(r).onButtonDown,onButtonup:Ce(r).onButtonUp},null,8,["onButtondown","onButtonup"])):be("",!0)],!0)],34))}}),Pn="_container_irdvc_2",Rn="_buttons_irdvc_11",Mn={container:Pn,buttons:Rn},Un={$style:Mn},jn=It(Tn,[["__cssModules",Un],["__scopeId","data-v-fce7d501"]]);var $n=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,dt=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Ln(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&$n(l,d,a),a},"__decorateClass$5"),je;let We=(je=class extends Ge{components={Zoomable:jn};uri="";ext="";fileName="";beforeMount(){const l=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");l&&(l.style.display="none",this.hookWhenComponentDestroy(()=>l.style.display="flex"))}},b(je,"ImageViewerFilesField"),je);dt([se(String)],We.prototype,"uri",2);dt([se(String)],We.prototype,"ext",2);dt([se(String)],We.prototype,"fileName",2);We=dt([lt],We);const Zn={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},Hn={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},Vn=["src"];function Wn(s,l,d,k,a,o){const r=De("Zoomable");return J(),ne("div",Zn,[F("div",Hn,[ye(r,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(s.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:ge(()=>[F("img",{class:"w100%",src:s.uri},null,8,Vn)]),_:1},8,["pan"])]),(J(),ke(et("style"),null,{default:ge(()=>[...l[0]||(l[0]=[Fe(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}b(Wn,"render$5");const Kn=Re(We,[["render",Wn]]);var Gn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Ot=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Yn(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Gn(l,d,a),a},"__decorateClass$4"),$e;let at=($e=class extends Ge{file={};mounted(){}},b($e,"ExcelViewerFilesField"),$e);Ot([se(Object,null)],at.prototype,"file",2);at=Ot([lt],at);const Xn={class:"mt150px",id:"excelView",ref:"excelView"};function Jn(s,l,d,k,a,o){return J(),ne("div",Xn,"Скоро будет!",512)}b(Jn,"render$4");const qn=Re(at,[["render",Jn]]);var Qn=Object.defineProperty,er=Object.getOwnPropertyDescriptor,At=b((s,l,d,k)=>{for(var a=k>1?void 0:k?er(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Qn(l,d,a),a},"__decorateClass$3"),Le;let ot=(Le=class extends Ge{file={}},b(Le,"DocxViewerFilesField"),Le);At([se(Object,null)],ot.prototype,"file",2);ot=At([lt],ot);const tr={class:"p15px mt150px"};function nr(s,l,d,k,a,o){return J(),ne("div",tr,"Скоро")}b(nr,"render$3");const rr=Re(ot,[["render",nr]]);var ir=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,ht=b((s,l,d,k)=>{for(var a=k>1?void 0:k?sr(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&ir(l,d,a),a},"__decorateClass$2"),Ze;let Ke=(Ze=class extends Ge{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const l=await fetch(this.uri);if(!l.ok)throw new Error(`HTTP error ${l.status}`);const d=await l.blob(),k="application/pdf",a=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([d],a,{type:k})}catch(l){console.error("Failed to fetch the file:",l)}}async loadAndShowPdf(){const l=await this.fetchPdfFile();if(l){const k=`
|
|
1
|
+
var Tt=Object.defineProperty;var b=(s,l)=>Tt(s,"name",{value:l,configurable:!0});import{K as Ge,G as vt,P as se,C as gt,h as De,o as J,c as ne,n as xe,l as Te,I as Pe,a as F,H as ye,w as ge,e as Fe,t as ve,b as ke,f as be,i as Pt,g as Re,m as Ct,L as pt,D as Ft,j as yt,A as Ce,M as tt,u as nt,J as Ne,N as _t,O as lt,r as et,W as Et,E as Rt,F as Mt,Q as Ut,k as xt}from"./main-BIpS3Kki.js";import{F as jt}from"./FieldComponent.vue_vue_type_script_lang-Ig4MpRH0.js";import{c as Qe,g as $t,a as Lt}from"./_commonjsHelpers-BO6-jdEg.js";var Zt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Oe=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Ht(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Zt(l,d,a),a},"__decorateClass$6"),Ue;let ze=(Ue=class extends Ge{components={VSTButton:vt};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;areaKey="";isImage=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-title",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(l){if(!this.canChange)return l.preventDefault();this.$parent.isDragStarted=!0,l.dataTransfer.dropEffect="move",l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash,area:this.areaKey}))}dragOver(l){this.$parent.isDragStarted&&(l.preventDefault(),this.isDroppable=!0)}dragLeave(l){l.preventDefault(),this.isDroppable=!1}onDrop(l){this.isDroppable=!1;const d=decodeURI(l.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|");let k=l.dataTransfer.getData("itemID");const a={name:d[0],hash:d[1]?d[1]:null};typeof k=="string"&&k&&k!=JSON.stringify(a)&&(k=JSON.parse(k),this.$parent?.files?.some?.(o=>o.hash==k.hash)&&this.$emit("sort",k,a))}eURI(l){return encodeURI(l)}viewHover(l,d){let k=l.target;if(d&&k?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"){const a=k.querySelector(".file-view-text");a&&(a.style.display="block",a.style.cursor="zoom-in")}else{const a=k.querySelector(".file-view-text");a&&(a.style.display="none",a.style.cursor="auto")}}},b(Ue,"FileItem"),Ue);Oe([se(Object)],ze.prototype,"file",2);Oe([se(String)],ze.prototype,"fileName",2);Oe([se(String)],ze.prototype,"fileUri",2);Oe([se(String,null)],ze.prototype,"fileHash",2);Oe([se(Boolean)],ze.prototype,"canChange",2);Oe([se(Boolean)],ze.prototype,"onlyImages",2);Oe([se(Boolean)],ze.prototype,"hasDeleted",2);Oe([se(String)],ze.prototype,"areaKey",2);Oe([se(Boolean)],ze.prototype,"isImage",2);ze=Oe([gt],ze);const Vt=["data-id","title"],Wt={class:"file-deleted"},Kt={class:"file-deleted",style:{"padding-top":"20px"}},Gt={class:"file-deleted file-download"},Yt={class:"file-title"},Xt=["title"],Jt={class:"absolute right--15px top-0 py0 text-neutral-600! uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},qt=["src"],Qt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},en={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},tn={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},nn={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},rn={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},sn={class:"file-buttons absolute flex flex w100% bottom-5px"},an={class:"file-loading-indicator"},on={class:"text-center mt-2"},ln={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},dn=["data-value"],hn={class:"text-center text-9px mt-2 pt3px"},un={key:0,class:"p-0 text-center"},fn={key:1};function cn(s,l,d,k,a,o){const r=De("VSTButton");return J(),ne("div",{class:xe(["file-item",{"file-item-drop":s.isDroppable,"file-view-mode":!s.canChange,"only-images":s.onlyImages,"border-1px border-solid border-#e5e15e":!s.file?.new,"border-1px border-solid border-lightblue-300":s.file?.new}]),ref:"draggable",draggable:"true",onDrop:l[6]||(l[6]=i=>s.hasDeleted||!s.canChange?null:s.onDrop(i)),onDragstart:l[7]||(l[7]=i=>s.hasDeleted||!s.canChange?null:s.startDrag(i)),onDragover:l[8]||(l[8]=i=>s.hasDeleted||!s.canChange?null:s.dragOver(i)),onDragleave:l[9]||(l[9]=i=>s.hasDeleted||!s.canChange?null:s.dragLeave(i)),onDragend:l[10]||(l[10]=i=>s.$parent.isDragStarted=!1),"data-id":s.eURI(s.fileName+"|"+(s.fileHash?s.fileHash:"")),title:!s.onlyImages&&!s.VST.$reactive.isIphone&&!s.file.deleted?s.fileName:null},[s.file.loaded==100?(J(),ne("div",{key:0,class:xe(["file-container relative min-h92px",{}])},[Te(F("div",Wt,[l[12]||(l[12]=F("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),ye(r,{size:"sm",theme:"empty",onClickTap:l[0]||(l[0]=i=>s.$emit("restore",s.fileName,s.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:ge(()=>[...l[11]||(l[11]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),F("path",{d:"M3 4.001v5h5"}),F("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[Pe,s.file.deleted]]),Te(F("div",Kt,[l[13]||(l[13]=Fe("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),l[14]||(l[14]=F("br",null,null,-1)),l[15]||(l[15]=Fe()),F("b",null,ve(s.fileName),1)],512),[[Pe,!s.file.found]]),Te(F("div",Gt,[...l[16]||(l[16]=[F("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[Pe,s.file.spin]]),F("div",Yt,[F("div",{class:"cursor-text text-center",title:s.canChange&&!s.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[F("b",null,ve(s.fileName.split(".").slice(0,-1).join(".")),1)],8,Xt)]),F("div",{class:"file-content",onMouseenter:l[2]||(l[2]=i=>s.viewHover(i,!0)),onMouseleave:l[3]||(l[3]=i=>s.viewHover(i,!1))},[ye(r,{size:"md",theme:"empty",onClickTap:l[1]||(l[1]=i=>s.$emit("view",s.fileName))},{default:ge(()=>[F("div",Jt,ve(s.file.ext),1),s.fileType=="image"?(J(),ne("img",{key:0,class:"max-w52px! max-h52px! rd-lg!",src:s.file.uri},null,8,qt)):s.fileType=="excel"?(J(),ne("svg",Qt,[...l[17]||(l[17]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),F("path",{d:"M8 15h8"},null,-1),F("path",{d:"M11 11v7"},null,-1)])])):s.fileType=="doc"?(J(),ne("svg",en,[...l[18]||(l[18]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):s.fileType=="video"?(J(),ne("svg",tn,[...l[19]||(l[19]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),F("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):s.fileExt=="pdf"?(J(),ne("svg",nn,[...l[20]||(l[20]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),F("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),F("path",{d:"M17 18h2"},null,-1),F("path",{d:"M20 15h-3v6"},null,-1),F("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(J(),ne("svg",rn,[...l[21]||(l[21]=[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),F("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),F("path",{d:"M12 17v.01"},null,-1),F("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),l[22]||(l[22]=F("div",{class:"file-view-text z22!",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},[F("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),F("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),F("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),F("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),F("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),F("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),F("path",{d:"M12 12h-.01"})])],-1))]),_:1})],32),F("div",sn,[ye(r,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:l[4]||(l[4]=i=>s.$emit("download",s.fileName))},{default:ge(()=>[...l[23]||(l[23]=[F("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),F("path",{d:"M12 13l0 9"}),F("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),s.canChange?(J(),ke(r,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:l[5]||(l[5]=i=>s.$emit("delete",s.fileName,s.file.deleted=!0))},{default:ge(()=>[...l[24]||(l[24]=[F("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[F("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),F("path",{d:"M4 7h16"}),F("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),F("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),F("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):be("",!0)])])):(J(),ne("div",{key:1,class:xe(["file-loading",{"only-images":s.onlyImages}])},[F("div",an,[F("div",on,[F("b",null,ve(s.file.loaded)+"%",1)]),F("div",ln,[F("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${s.file.loaded}%`,style:Pt(`width: ${s.file.loaded}%`)},null,12,dn)]),F("div",hn,[F("b",null,ve(s.file.loadedSize)+" / "+ve(s.file.sizeNamed),1)])])],2)),s.file.loaded==100?(J(),ne("div",{key:2,class:xe(["file-info relative",{"text-center":s.canChange&&!s.onlyImages,"bg-#e2df4463":!s.file?.new,"bg-lightblue-200/60":s.file?.new}])},[s.onlyImages?(J(),ne("div",un,[F("b",null," "+ve(s.file.sizeNamed),1)])):(J(),ne("div",fn,[l[25]||(l[25]=Fe("Размер ",-1)),F("b",null,ve(s.file.sizeNamed),1)]))],2)):be("",!0)],42,Vt)}b(cn,"render$6");const pn=Re(ze,[["render",cn],["__scopeId","data-v-4d776467"]]),mn={class:"controll"},vn={class:"controll__item controll__item--circle"},gn={class:"controll__pan controll__item--circle__inner"},wn={class:"controll__pan__up controll__item--circle__inner__up"},bn={class:"controll__pan__right controll__item--circle__inner__right"},yn={class:"controll__pan__down controll__item--circle__inner__down"},_n={class:"controll__pan__left controll__item--circle__inner__left"},xn={class:"controll__home controll__item controll__item--list-item"},kn={class:"controll__zoom-in controll__item controll__item--list-item"},zn={class:"controll__zoom-in controll__item controll__item--list-item"},Sn=Ct({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(s,{emit:l}){const d=l;function k(o,r){d("buttondown",{key:r})}b(k,"u");function a(o,r){d("buttonup",{key:r})}return b(a,"n"),(o,r)=>(J(),ne("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:r[31]||(r[31]=Ne(()=>{},["stop"])),onMousedown:r[32]||(r[32]=Ne(()=>{},["stop"]))},[F("ul",mn,[F("li",vn,[F("ul",gn,[F("li",wn,[F("a",{onPointerdown:r[0]||(r[0]=i=>k(i,"pan-up")),onPointerup:r[1]||(r[1]=i=>a(i,"pan-up")),onPointercancel:r[2]||(r[2]=i=>a(i,"pan-up")),onPointerleave:r[3]||(r[3]=i=>a(i,"pan-up")),onContextmenu:r[4]||(r[4]=Ne(()=>{},["prevent"]))},r[33]||(r[33]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[F("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),F("li",bn,[F("a",{onPointerdown:r[5]||(r[5]=i=>k(i,"pan-right")),onPointerup:r[6]||(r[6]=i=>a(i,"pan-right")),onPointercancel:r[7]||(r[7]=i=>a(i,"pan-right")),onPointerleave:r[8]||(r[8]=i=>a(i,"pan-right")),onContextmenu:r[9]||(r[9]=Ne(()=>{},["prevent"]))},r[34]||(r[34]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[F("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),F("li",yn,[F("a",{onPointerdown:r[10]||(r[10]=i=>k(i,"pan-down")),onPointerup:r[11]||(r[11]=i=>a(i,"pan-down")),onPointercancel:r[12]||(r[12]=i=>a(i,"pan-down")),onPointerleave:r[13]||(r[13]=i=>a(i,"pan-down")),onContextmenu:r[14]||(r[14]=Ne(()=>{},["prevent"]))},r[35]||(r[35]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[F("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),F("li",_n,[F("a",{onPointerdown:r[15]||(r[15]=i=>k(i,"pan-left")),onPointercancel:r[16]||(r[16]=i=>a(i,"pan-left")),onPointerup:r[17]||(r[17]=i=>a(i,"pan-left")),onPointerleave:r[18]||(r[18]=i=>a(i,"pan-left")),onContextmenu:r[19]||(r[19]=Ne(()=>{},["prevent"]))},r[36]||(r[36]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[F("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),F("li",xn,[F("a",{onPointerdown:r[20]||(r[20]=i=>k(i,"home"))},r[37]||(r[37]=[_t('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),F("li",kn,[F("a",{onPointerdown:r[21]||(r[21]=i=>k(i,"zoom-in")),onPointerup:r[22]||(r[22]=i=>a(i,"zoom-in")),onPointercancel:r[23]||(r[23]=i=>a(i,"zoom-in")),onPointerleave:r[24]||(r[24]=i=>a(i,"zoom-in")),onContextmenu:r[25]||(r[25]=Ne(()=>{},["prevent"]))},r[38]||(r[38]=[_t('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),F("li",zn,[F("a",{onPointerdown:r[26]||(r[26]=i=>k(i,"zoom-out")),onPointerup:r[27]||(r[27]=i=>a(i,"zoom-out")),onPointercancel:r[28]||(r[28]=i=>a(i,"zoom-out")),onPointerleave:r[29]||(r[29]=i=>a(i,"zoom-out")),onContextmenu:r[30]||(r[30]=Ne(()=>{},["prevent"]))},r[39]||(r[39]=[F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[F("circle",{cx:"11",cy:"11",r:"8"}),F("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),F("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),It=b((s,l)=>{const d=s.__vccOpts||s;for(const[k,a]of l)d[k]=a;return d},"C"),Cn=It(Sn,[["__scopeId","data-v-3ba139de"]]);function Fn(){let s=0;function l(k,a,o,r){k(),s=window.setTimeout(()=>{s=window.setInterval(()=>{a()},r)},o)}b(l,"i");function d(){s&&(window.clearInterval(s),s=0)}return b(d,"l"),{startHold:l,clearHold:d}}b(Fn,"R");const qe="control-btn";function En({props:s,transform:l}){let d=Fn();function k(p){d.startHold(()=>{l.changeZoom(p*s.buttonZoomStep*.5,qe)},()=>{l.changeZoom(p*s.buttonZoomStep*.5,qe)},300,50)}b(k,"u");function a(p){if(!s.disabled)switch(p.key){case"home":i();break;case"zoom-in":k(1);break;case"zoom-out":k(-1);break;case"pan-left":r({x:1,y:0});break;case"pan-right":r({x:-1,y:0});break;case"pan-up":r({x:0,y:1});break;case"pan-down":r({x:0,y:-1});break}}b(a,"n");function o(p){d.clearHold()}b(o,"a");function r(p){d.startHold(()=>{l.changePan(p.x*s.buttonPanStep,p.y*s.buttonPanStep,qe)},()=>{l.changePan(p.x*s.buttonPanStep,p.y*s.buttonPanStep,qe)},300,50)}b(r,"e");function i(){l.goHome(qe)}return b(i,"o"),{onButtonDown:a,onButtonUp:o}}b(En,"A");function In({props:s,transform:l}){let d={x:0,y:0};function k(r){s.disabled||r.pointerType!=="mouse"||!s.mouseEnabled||(d={x:r.clientX,y:r.clientY},document.addEventListener("pointermove",o,{passive:!1}),document.addEventListener("pointerup",function(i){document.removeEventListener("pointermove",o)}),document.addEventListener("pointerleave",function(i){document.removeEventListener("pointermove",o)}),document.addEventListener("pointercancel",function(i){document.removeEventListener("pointermove",o)}))}b(k,"u");function a(r){if(s.disabled||!s.dblClickEnabled||!s.zoomEnabled)return;const i={x:r.clientX,y:r.clientY};l.changeZoom(s.dblClickZoomStep,"dblClick",i)}b(a,"n");function o(r){if(s.disabled||!s.panEnabled||r.pointerType!=="mouse"||!s.mouseEnabled)return;let i={x:r.clientX-d.x,y:r.clientY-d.y};l.changePan(i.x,i.y,r.pointerType),d={x:r.clientX,y:r.clientY},r.preventDefault()}return b(o,"a"),{onPointerDown:k,onDblClick:a}}b(In,"F");function On({props:s,transform:l}){let d=nt({}),k=nt(0),a=null;function o(p){if(s.disabled||!s.touchEnabled||!s.panEnabled&&!s.zoomEnabled||(p.preventDefault(),p.touches.length<1))return;const g=p.touches.item(0);if(!g)return;let x=0,_={x:g.clientX,y:g.clientY};if(p.touches.length===2){const f=p.touches.item(1);let m=r({x:g?g.clientX:0,y:g?g.clientY:0},{x:f?f.clientX:0,y:f?f.clientY:0});k.value<=0?(k.value=m.distance,x=0):(x=m.distance/k.value*l.zoom.value-l.zoom.value,k.value=m.distance),_=m.center}if(s.zoomEnabled&&l.changeZoom(x,"touch",_),a===null){a={x:_.x,y:_.y};return}const C={x:_.x-a.x,y:_.y-a.y};s.panEnabled&&l.changePan(C.x,C.y,"touch"),a={x:_.x,y:_.y}}b(o,"a");function r(p,g){let x=Math.sqrt(Math.pow(p.x-g.x,2)+Math.pow(p.y-g.y,2)),_={x:(p.x+g.x)/2,y:(p.y+g.y)/2};return{distance:x,center:_}}b(r,"e");function i(p){s.disabled||!s.touchEnabled||(a=null,document.addEventListener("touchmove",o,{passive:!1}),document.addEventListener("touchend",function(g){p.touches.length<2&&(k.value=-1),document.removeEventListener("touchmove",o)}))}return b(i,"o"),{onTouchStart:i,touchCount:tt(()=>Object.keys(d.value).length)}}b(On,"G");function An({props:s,onChange:l,container:d,target:k}){const a=nt({x:0,y:0}),o=nt(0);Ft(()=>{o.value=s.minZoom,a.value={x:s.pan!=null?s.pan.x:s.initialPanX,y:s.pan!=null?s.pan.y:s.initialPanY},s.zoom?o.value=s.zoom:s.initialZoom>=s.minZoom&&s.initialZoom<=s.maxZoom&&(o.value=s.initialZoom)}),pt(()=>s.zoom,()=>{isNaN(s.zoom)||(o.value=s.zoom)}),pt(()=>s.pan,()=>{s.pan&&(a.value.x=s.pan.x,a.value.y=s.pan.y)},{deep:!0});function r(g,x,_){if(isNaN(g)||g===0)return;const C=o.value;let f=o.value+g;if(f>s.maxZoom?f=s.maxZoom:f<s.minZoom&&(f=s.minZoom),Math.abs(C-f)<1e-4)return;if(o.value=f,s.zoomOrigin==="center"&&(_=mt(d.value)),s.zoomOrigin!=="content-center"){_||(_=mt(d.value));const h=Dn(d.value,a.value),w={x:(f-C)*((h.x-_.x)/C),y:(f-C)*((h.y-_.y)/C)};i(w.x,w.y,"zoom")}let m={zoom:f,delta:{zoom:g,pan:{x:0,y:0}},pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:x};l("zoom",m)}b(r,"e");function i(g,x,_){isNaN(g)&&(g=0),isNaN(x)&&(x=0),a.value={x:a.value.x+g,y:a.value.y+x};let C={zoom:o.value,delta:{zoom:0,pan:{x:g,y:x}},pan:{x:a.value.x,y:a.value.y,deltaX:g,deltaY:x},type:_};l("panned",C)}b(i,"o");function p(g){o.value=s.initialZoom,l("zoom",{zoom:o.value,pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:g});let x={x:s.initialPanX-a.value.x,y:s.initialPanY-a.value.y};a.value={x:s.initialPanX,y:s.initialPanY},l("panned",{zoom:o.value,pan:{x:a.value.x,y:a.value.y,deltaX:x.x,deltaY:x.y},type:g})}return b(p,"d"),{zoom:tt(()=>o.value),pan:tt(()=>a.value),setZoom:b(g=>{o.value=g},"setZoom"),setPan:b(g=>{a.value=g},"setPan"),changeZoom:r,changePan:i,goHome:p}}b(An,"J");function mt(s){const l=s.getBoundingClientRect();return{x:l.left+l.width/2,y:l.top+l.height/2}}b(mt,"B");function Dn(s,l){const d=mt(s);return{x:d.x+l.x,y:d.y+l.y}}b(Dn,"Q");function Bn({props:s,transform:l}){function d(k){if(s.disabled||!s.wheelEnabled||!s.zoomEnabled)return;const a=Math.abs(k.deltaY)>0?k.deltaY:k.deltaX,o=s.wheelZoomStep*-1*a/Math.abs(a),r={x:k.clientX,y:k.clientY};l.changeZoom(o,"wheel",r),k.preventDefault()}return b(d,"l"),{onWheel:d}}b(Bn,"ee");function Nn({props:s,onChange:l,container:d,target:k}){const a=An({props:s,onChange:l,container:d,target:k}),o=On({props:s,transform:a}),r=Bn({props:s,transform:a}),i=In({props:s,transform:a}),p=En({props:s,transform:a});return{zoom:a.zoom,pan:a.pan,setZoom:a.setZoom,setPan:a.setPan,onWheel:r.onWheel,onTouchStart:o.onTouchStart,onButtonUp:p.onButtonUp,onButtonDown:p.onButtonDown,onPointerDown:i.onPointerDown,onDblClick:i.onDblClick}}b(Nn,"te");const Tn=Ct({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(s,{emit:l}){let d=l,k=s,a=nt(),o=tt(()=>{var x;return(x=a.value)==null?void 0:x.querySelector(k.selector)}),r=Nn({props:k,onChange:i,container:a,target:o});function i(x,_){x==="zoom"?d("update:zoom",_.zoom):x==="panned"&&d("update:pan",_.pan),d(x,_)}b(i,"o");let p=tt(()=>`translate(${r.pan.value.x}px, ${r.pan.value.y}px) scale(${r.zoom.value})`);function g(){o.value&&(o.value.style.transform=p.value,o.value.style.transformOrigin="center center",o.value.style.transition="transform 0.07s ease-out",o.value.style.transformBox="fill-box")}return b(g,"s"),pt(p,()=>{g()},{flush:"post"}),Ft(()=>{g()}),(x,_)=>(J(),ne("div",{ref_key:"container",ref:a,class:xe(x.$style.container),onDblclick:_[0]||(_[0]=(...C)=>Ce(r).onDblClick&&Ce(r).onDblClick(...C)),onPointerdown:_[1]||(_[1]=(...C)=>Ce(r).onPointerDown&&Ce(r).onPointerDown(...C)),onWheel:_[2]||(_[2]=(...C)=>Ce(r).onWheel&&Ce(r).onWheel(...C)),onTouchstart:_[3]||(_[3]=(...C)=>Ce(r).onTouchStart&&Ce(r).onTouchStart(...C))},[yt(x.$slots,"default",{},void 0,!0),yt(x.$slots,"buttons",{},()=>[Ce(k).enableControlButton?(J(),ke(Cn,{key:0,onButtondown:Ce(r).onButtonDown,onButtonup:Ce(r).onButtonUp},null,8,["onButtondown","onButtonup"])):be("",!0)],!0)],34))}}),Pn="_container_irdvc_2",Rn="_buttons_irdvc_11",Mn={container:Pn,buttons:Rn},Un={$style:Mn},jn=It(Tn,[["__cssModules",Un],["__scopeId","data-v-fce7d501"]]);var $n=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,dt=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Ln(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&$n(l,d,a),a},"__decorateClass$5"),je;let We=(je=class extends Ge{components={Zoomable:jn};uri="";ext="";fileName="";beforeMount(){const l=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");l&&(l.style.display="none",this.hookWhenComponentDestroy(()=>l.style.display="flex"))}},b(je,"ImageViewerFilesField"),je);dt([se(String)],We.prototype,"uri",2);dt([se(String)],We.prototype,"ext",2);dt([se(String)],We.prototype,"fileName",2);We=dt([lt],We);const Zn={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},Hn={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},Vn=["src"];function Wn(s,l,d,k,a,o){const r=De("Zoomable");return J(),ne("div",Zn,[F("div",Hn,[ye(r,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(s.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:ge(()=>[F("img",{class:"w100%",src:s.uri},null,8,Vn)]),_:1},8,["pan"])]),(J(),ke(et("style"),null,{default:ge(()=>[...l[0]||(l[0]=[Fe(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}b(Wn,"render$5");const Kn=Re(We,[["render",Wn]]);var Gn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Ot=b((s,l,d,k)=>{for(var a=k>1?void 0:k?Yn(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Gn(l,d,a),a},"__decorateClass$4"),$e;let at=($e=class extends Ge{file={};mounted(){}},b($e,"ExcelViewerFilesField"),$e);Ot([se(Object,null)],at.prototype,"file",2);at=Ot([lt],at);const Xn={class:"mt150px",id:"excelView",ref:"excelView"};function Jn(s,l,d,k,a,o){return J(),ne("div",Xn,"Скоро будет!",512)}b(Jn,"render$4");const qn=Re(at,[["render",Jn]]);var Qn=Object.defineProperty,er=Object.getOwnPropertyDescriptor,At=b((s,l,d,k)=>{for(var a=k>1?void 0:k?er(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&Qn(l,d,a),a},"__decorateClass$3"),Le;let ot=(Le=class extends Ge{file={}},b(Le,"DocxViewerFilesField"),Le);At([se(Object,null)],ot.prototype,"file",2);ot=At([lt],ot);const tr={class:"p15px mt150px"};function nr(s,l,d,k,a,o){return J(),ne("div",tr,"Скоро")}b(nr,"render$3");const rr=Re(ot,[["render",nr]]);var ir=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,ht=b((s,l,d,k)=>{for(var a=k>1?void 0:k?sr(l,d):l,o=s.length-1,r;o>=0;o--)(r=s[o])&&(a=(k?r(l,d,a):r(a))||a);return k&&a&&ir(l,d,a),a},"__decorateClass$2"),Ze;let Ke=(Ze=class extends Ge{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const l=await fetch(this.uri);if(!l.ok)throw new Error(`HTTP error ${l.status}`);const d=await l.blob(),k="application/pdf",a=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([d],a,{type:k})}catch(l){console.error("Failed to fetch the file:",l)}}async loadAndShowPdf(){const l=await this.fetchPdfFile();if(l){const k=`
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import{o as t,c as l,a as c}from"./main-
|
|
1
|
+
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import{o as t,c as l,a as c}from"./main-BIpS3Kki.js";function i(e,r){return t(),l("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c("path",{"fill-rule":"evenodd",d:"m5.965 4.904 9.131 9.131a6.5 6.5 0 0 0-9.131-9.131Zm8.07 10.192L4.904 5.965a6.5 6.5 0 0 0 9.131 9.131ZM4.343 4.343a8 8 0 1 1 11.314 11.314A8 8 0 0 1 4.343 4.343Z","clip-rule":"evenodd"})])}a(i,"render");export{i as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var a=(i,t)=>ue(i,"name",{value:t,configurable:!0});import{K as de,P as R,O as fe,o as K,c as pe,j as ve,b as me,w as ge,e as be,t as w,r as ye,n as Ee,g as Se}from"./main-DjEys_aT.js";function j(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(j,"isObject");var Oe=typeof global=="object"&&global&&global.Object===Object&&global,xe=typeof self=="object"&&self&&self.Object===Object&&self,re=Oe||xe||Function("return this")(),I=a(function(){return re.Date.now()},"now"),we=/\s/;function Ae(i){for(var t=i.length;t--&&we.test(i.charAt(t)););return t}a(Ae,"trimmedEndIndex");var We=/^\s+/;function ke(i){return i&&i.slice(0,Ae(i)+1).replace(We,"")}a(ke,"baseTrim");var P=re.Symbol,se=Object.prototype,Me=se.hasOwnProperty,Ce=se.toString,D=P?P.toStringTag:void 0;function ze(i){var t=Me.call(i,D),r=i[D];try{i[D]=void 0;var e=!0}catch{}var s=Ce.call(i);return e&&(t?i[D]=r:delete i[D]),s}a(ze,"getRawTag");var Te=Object.prototype,Le=Te.toString;function Ne(i){return Le.call(i)}a(Ne,"objectToString");var _e="[object Null]",De="[object Undefined]",Z=P?P.toStringTag:void 0;function Re(i){return i==null?i===void 0?De:_e:Z&&Z in Object(i)?ze(i):Ne(i)}a(Re,"baseGetTag");function He(i){return i!=null&&typeof i=="object"}a(He,"isObjectLike");var Be="[object Symbol]";function Ve(i){return typeof i=="symbol"||He(i)&&Re(i)==Be}a(Ve,"isSymbol");var J=NaN,je=/^[-+]0x[0-9a-f]+$/i,Pe=/^0b[01]+$/i,$e=/^0o[0-7]+$/i,Ie=parseInt;function ee(i){if(typeof i=="number")return i;if(Ve(i))return J;if(j(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=j(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=ke(i);var r=Pe.test(i);return r||$e.test(i)?Ie(i.slice(2),r?2:8):je.test(i)?J:+i}a(ee,"toNumber");var Xe="Expected a function",Ye=Math.max,qe=Math.min;function B(i,t,r){var e,s,l,o,n,c,h=0,v=!1,d=!1,m=!0;if(typeof i!="function")throw new TypeError(Xe);t=ee(t)||0,j(r)&&(v=!!r.leading,d="maxWait"in r,l=d?Ye(ee(r.maxWait)||0,t):l,m="trailing"in r?!!r.trailing:m);function f(u){var y=e,E=s;return e=s=void 0,h=u,o=i.apply(E,y),o}a(f,"invokeFunc");function C(u){return h=u,n=setTimeout(b,t),v?f(u):o}a(C,"leadingEdge");function O(u){var y=u-c,E=u-h,G=t-y;return d?qe(G,l-E):G}a(O,"remainingWait");function S(u){var y=u-c,E=u-h;return c===void 0||y>=t||y<0||d&&E>=l}a(S,"shouldInvoke");function b(){var u=I();if(S(u))return x(u);n=setTimeout(b,O(u))}a(b,"timerExpired");function x(u){return n=void 0,m&&e?f(u):(e=s=void 0,o)}a(x,"trailingEdge");function H(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(H,"cancel");function $(){return n===void 0?o:x(I())}a($,"flush");function _(){var u=I(),y=S(u);if(e=arguments,s=this,c=u,y){if(n===void 0)return C(c);if(d)return clearTimeout(n),n=setTimeout(b,t),f(c)}return n===void 0&&(n=setTimeout(b,t)),o}return a(_,"debounced"),_.cancel=H,_.flush=$,_}a(B,"debounce");var Fe="Expected a function";function Ue(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Fe);return j(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),B(i,t,{leading:e,maxWait:t,trailing:s})}a(Ue,"throttle");var T=a(function(){return T=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),T.apply(this,arguments)},"__assign");function le(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(le,"getElementWindow$1");function oe(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(oe,"getElementDocument$1");var ne=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ae(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ae,"addClasses$1");function ce(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ce,"removeClasses$1");function he(i){return".".concat(i.split(" ").join("."))}a(he,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Qe=Object.freeze({__proto__:null,addClasses:ae,canUseDOM:U,classNamesToQuery:he,getElementDocument:oe,getElementWindow:le,getOptions:ne,removeClasses:ce}),z=null,te=null;U&&window.addEventListener("resize",function(){te!==window.devicePixelRatio&&(te=window.devicePixelRatio,z=null)});function ie(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(ie,"scrollbarWidth");var A=le,X=oe,Ge=ne,W=ae,k=ce,p=he,V=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,v,d,m,f,C,O;if(!(!e.draggedAxis||!e.contentWrapperEl)){var S,b=e.axis[e.draggedAxis].track,x=(o=(l=b.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,H=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,_=parseInt((v=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&v!==void 0?v:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?S=s.pageY:S=s.pageX;var u=S-((m=(d=b.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((C=(f=b.rect)===null||f===void 0?void 0:f[e.axis[e.draggedAxis].sizeAttr])!==null&&C!==void 0?C:0)-H.size-u:u;var y=u/(x-H.size),E=y*($-_);e.draggedAxis==="x"&&e.isRtl&&(E=!((O=i.getRtlHelpers())===null||O===void 0)&&O.isScrollingToNegative?-E:E),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=E}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=T(T({},i.defaultOptions),r),this.classNames=T(T({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=Ue(this._onMouseMove,64),this.onWindowResize=B(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=B(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=B(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:ie()}catch{return ie()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(p(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(p(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(p(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(p(this.classNames.offset)),this.maskEl=this.el.querySelector(p(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,p(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(p(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(p(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(p(this.classNames.track)).concat(p(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(p(this.classNames.track)).concat(p(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(p(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(p(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var v=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>v,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>v-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var v=h/(o-c),d=~~((n-l.size)*v);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var v=this.axis[r].scrollbar,d=(l=(s=v.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,m=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),f=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],C=r==="y"?this.mouseY-d:this.mouseX-d,O=C<0?-1:1,S=O===-1?f-m:f+m,b=40,x=a(function(){e.contentWrapperEl&&(O===-1?f>S&&(f-=b,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=f,h.requestAnimationFrame(x)):f<S&&(f+=b,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=f,h.requestAnimationFrame(x)))},"scrollTo");x()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=Ge,i.helpers=Qe,i})(),q=a(function(i,t){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},q(i,t)},"extendStatics");function Ke(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");q(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(Ke,"__extends");var Q=V.helpers,Y=Q.getOptions,g=Q.addClasses,Ze=Q.canUseDOM,F=(function(i){Ke(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,Y(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),g(this.wrapperEl,this.classNames.wrapper),g(this.contentWrapperEl,this.classNames.contentWrapper),g(this.offsetEl,this.classNames.offset),g(this.maskEl,this.classNames.mask),g(this.contentEl,this.classNames.contentEl),g(this.placeholderEl,this.classNames.placeholder),g(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),g(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");g(o,this.classNames.track),g(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),g(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),g(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}V.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){V.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,Y(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,Y(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(V);Ze&&F.initHtmlApi();var Je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?et(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&Je(t,r,s),s},"__decorateClass"),L;let M=(L=class extends de{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(L,"Scrollbar"),L);N([R(Boolean)],M.prototype,"autoHide",2);N([R(String)],M.prototype,"color",2);N([R(String)],M.prototype,"margin",2);N([R(String)],M.prototype,"width",2);N([R(String)],M.prototype,"direction",2);M=N([fe],M);const tt=["data-simplebar-auto-hide","data-simplebar-direction"];function it(i,t,r,e,s,l){return K(),pe("div",{class:Ee(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[ve(i.$slots,"default"),(K(),me(ye("style"),null,{default:ge(()=>[be("."+w(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+w(i.color)+" !important; margin: "+w(i.margin)+" !important; cursor: grabbing !important; width: "+w(i.width)+" !important; } ."+w(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+w(i.color)+" !important; margin: "+w(i.margin)+" !important; cursor: grab !important; width: "+w(i.width)+" !important; }",1)]),_:1}))],10,tt)}a(it,"render");const lt=Se(M,[["render",it]]);export{lt as default};
|
|
1
|
+
var ue=Object.defineProperty;var a=(i,t)=>ue(i,"name",{value:t,configurable:!0});import{K as de,P as R,O as fe,o as K,c as pe,j as ve,b as me,w as ge,e as be,t as w,r as ye,n as Ee,g as Se}from"./main-BIpS3Kki.js";function j(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(j,"isObject");var Oe=typeof global=="object"&&global&&global.Object===Object&&global,xe=typeof self=="object"&&self&&self.Object===Object&&self,re=Oe||xe||Function("return this")(),I=a(function(){return re.Date.now()},"now"),we=/\s/;function Ae(i){for(var t=i.length;t--&&we.test(i.charAt(t)););return t}a(Ae,"trimmedEndIndex");var We=/^\s+/;function ke(i){return i&&i.slice(0,Ae(i)+1).replace(We,"")}a(ke,"baseTrim");var P=re.Symbol,se=Object.prototype,Me=se.hasOwnProperty,Ce=se.toString,D=P?P.toStringTag:void 0;function ze(i){var t=Me.call(i,D),r=i[D];try{i[D]=void 0;var e=!0}catch{}var s=Ce.call(i);return e&&(t?i[D]=r:delete i[D]),s}a(ze,"getRawTag");var Te=Object.prototype,Le=Te.toString;function Ne(i){return Le.call(i)}a(Ne,"objectToString");var _e="[object Null]",De="[object Undefined]",Z=P?P.toStringTag:void 0;function Re(i){return i==null?i===void 0?De:_e:Z&&Z in Object(i)?ze(i):Ne(i)}a(Re,"baseGetTag");function He(i){return i!=null&&typeof i=="object"}a(He,"isObjectLike");var Be="[object Symbol]";function Ve(i){return typeof i=="symbol"||He(i)&&Re(i)==Be}a(Ve,"isSymbol");var J=NaN,je=/^[-+]0x[0-9a-f]+$/i,Pe=/^0b[01]+$/i,$e=/^0o[0-7]+$/i,Ie=parseInt;function ee(i){if(typeof i=="number")return i;if(Ve(i))return J;if(j(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=j(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=ke(i);var r=Pe.test(i);return r||$e.test(i)?Ie(i.slice(2),r?2:8):je.test(i)?J:+i}a(ee,"toNumber");var Xe="Expected a function",Ye=Math.max,qe=Math.min;function B(i,t,r){var e,s,l,o,n,c,h=0,v=!1,d=!1,m=!0;if(typeof i!="function")throw new TypeError(Xe);t=ee(t)||0,j(r)&&(v=!!r.leading,d="maxWait"in r,l=d?Ye(ee(r.maxWait)||0,t):l,m="trailing"in r?!!r.trailing:m);function f(u){var y=e,E=s;return e=s=void 0,h=u,o=i.apply(E,y),o}a(f,"invokeFunc");function C(u){return h=u,n=setTimeout(b,t),v?f(u):o}a(C,"leadingEdge");function O(u){var y=u-c,E=u-h,G=t-y;return d?qe(G,l-E):G}a(O,"remainingWait");function S(u){var y=u-c,E=u-h;return c===void 0||y>=t||y<0||d&&E>=l}a(S,"shouldInvoke");function b(){var u=I();if(S(u))return x(u);n=setTimeout(b,O(u))}a(b,"timerExpired");function x(u){return n=void 0,m&&e?f(u):(e=s=void 0,o)}a(x,"trailingEdge");function H(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(H,"cancel");function $(){return n===void 0?o:x(I())}a($,"flush");function _(){var u=I(),y=S(u);if(e=arguments,s=this,c=u,y){if(n===void 0)return C(c);if(d)return clearTimeout(n),n=setTimeout(b,t),f(c)}return n===void 0&&(n=setTimeout(b,t)),o}return a(_,"debounced"),_.cancel=H,_.flush=$,_}a(B,"debounce");var Fe="Expected a function";function Ue(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Fe);return j(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),B(i,t,{leading:e,maxWait:t,trailing:s})}a(Ue,"throttle");var T=a(function(){return T=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),T.apply(this,arguments)},"__assign");function le(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(le,"getElementWindow$1");function oe(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(oe,"getElementDocument$1");var ne=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ae(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ae,"addClasses$1");function ce(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ce,"removeClasses$1");function he(i){return".".concat(i.split(" ").join("."))}a(he,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Qe=Object.freeze({__proto__:null,addClasses:ae,canUseDOM:U,classNamesToQuery:he,getElementDocument:oe,getElementWindow:le,getOptions:ne,removeClasses:ce}),z=null,te=null;U&&window.addEventListener("resize",function(){te!==window.devicePixelRatio&&(te=window.devicePixelRatio,z=null)});function ie(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(ie,"scrollbarWidth");var A=le,X=oe,Ge=ne,W=ae,k=ce,p=he,V=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,v,d,m,f,C,O;if(!(!e.draggedAxis||!e.contentWrapperEl)){var S,b=e.axis[e.draggedAxis].track,x=(o=(l=b.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,H=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,_=parseInt((v=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&v!==void 0?v:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?S=s.pageY:S=s.pageX;var u=S-((m=(d=b.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((C=(f=b.rect)===null||f===void 0?void 0:f[e.axis[e.draggedAxis].sizeAttr])!==null&&C!==void 0?C:0)-H.size-u:u;var y=u/(x-H.size),E=y*($-_);e.draggedAxis==="x"&&e.isRtl&&(E=!((O=i.getRtlHelpers())===null||O===void 0)&&O.isScrollingToNegative?-E:E),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=E}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=T(T({},i.defaultOptions),r),this.classNames=T(T({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=Ue(this._onMouseMove,64),this.onWindowResize=B(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=B(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=B(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:ie()}catch{return ie()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(p(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(p(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(p(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(p(this.classNames.offset)),this.maskEl=this.el.querySelector(p(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,p(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(p(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(p(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(p(this.classNames.track)).concat(p(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(p(this.classNames.track)).concat(p(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(p(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(p(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var v=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>v,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>v-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var v=h/(o-c),d=~~((n-l.size)*v);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var v=this.axis[r].scrollbar,d=(l=(s=v.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,m=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),f=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],C=r==="y"?this.mouseY-d:this.mouseX-d,O=C<0?-1:1,S=O===-1?f-m:f+m,b=40,x=a(function(){e.contentWrapperEl&&(O===-1?f>S&&(f-=b,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=f,h.requestAnimationFrame(x)):f<S&&(f+=b,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=f,h.requestAnimationFrame(x)))},"scrollTo");x()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=Ge,i.helpers=Qe,i})(),q=a(function(i,t){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},q(i,t)},"extendStatics");function Ke(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");q(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(Ke,"__extends");var Q=V.helpers,Y=Q.getOptions,g=Q.addClasses,Ze=Q.canUseDOM,F=(function(i){Ke(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,Y(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),g(this.wrapperEl,this.classNames.wrapper),g(this.contentWrapperEl,this.classNames.contentWrapper),g(this.offsetEl,this.classNames.offset),g(this.maskEl,this.classNames.mask),g(this.contentEl,this.classNames.contentEl),g(this.placeholderEl,this.classNames.placeholder),g(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),g(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");g(o,this.classNames.track),g(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),g(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),g(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}V.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){V.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,Y(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,Y(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(V);Ze&&F.initHtmlApi();var Je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?et(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&Je(t,r,s),s},"__decorateClass"),L;let M=(L=class extends de{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(L,"Scrollbar"),L);N([R(Boolean)],M.prototype,"autoHide",2);N([R(String)],M.prototype,"color",2);N([R(String)],M.prototype,"margin",2);N([R(String)],M.prototype,"width",2);N([R(String)],M.prototype,"direction",2);M=N([fe],M);const tt=["data-simplebar-auto-hide","data-simplebar-direction"];function it(i,t,r,e,s,l){return K(),pe("div",{class:Ee(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[ve(i.$slots,"default"),(K(),me(ye("style"),null,{default:ge(()=>[be("."+w(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+w(i.color)+" !important; margin: "+w(i.margin)+" !important; cursor: grabbing !important; width: "+w(i.width)+" !important; } ."+w(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+w(i.color)+" !important; margin: "+w(i.margin)+" !important; cursor: grab !important; width: "+w(i.width)+" !important; }",1)]),_:1}))],10,tt)}a(it,"render");const lt=Se(M,[["render",it]]);export{lt as default};
|