aboutsummaryrefslogtreecommitdiffstats
path: root/dist/files_versions-files_versions.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/files_versions-files_versions.js')
-rw-r--r--dist/files_versions-files_versions.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/dist/files_versions-files_versions.js b/dist/files_versions-files_versions.js
index c95c684abf9..f21d722793a 100644
--- a/dist/files_versions-files_versions.js
+++ b/dist/files_versions-files_versions.js
@@ -1,3 +1,2 @@
-/*! For license information please see files_versions-files_versions.js.license?v=ff58db621a84a705fe92 */
-(()=>{var e,i,n,s={90488:(e,i,n)=>{"use strict";var s=n(85471),r=n(53334),o=n(43627),a=n.n(o),l=n(85168),c=n(16406),d=n(61338),u=n(21777),p=n(46222),h=n(53278),f=n(63814),m=n(71089),v=n(51651),g=n(63623);const b=(0,f.dC)("dav"),A=(0,g.UU)(b),w=t=>{A.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=t?t:""})};(0,u.zo)(w),w((0,u.do)());const _=A,y=(0,n(35947).YK)().setApp("files_version").detectUser().build();const C={name:"BackupRestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var x=n(14486);const N=(0,x.A)(C,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon backup-restore-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var E=n(11037);const V={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},L=(0,x.A)(V,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,k={name:"FileCompareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},S=(0,x.A)(k,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-compare-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,18H6V16H10V18M10,14H6V12H10V14M10,1V2H6C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H10V23H12V1H10M20,8V20C20,21.11 19.11,22 18,22H14V20H18V11H14V9H18.5L14,4.5V2L20,8M16,14H14V12H16V14M16,18H14V16H16V18Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,I={name:"ImageOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},O=(0,x.A)(I,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-off-outline-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M22 20.7L3.3 2L2 3.3L3 4.3V19C3 20.1 3.9 21 5 21H19.7L20.7 22L22 20.7M5 19V6.3L12.6 13.9L11.1 15.8L9 13.1L6 17H15.7L17.7 19H5M8.8 5L6.8 3H19C20.1 3 21 3.9 21 5V17.2L19 15.2V5H8.8"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var T=n(93919),P=n(63420),D=n(10700),R=n(41944),$=n(44559),H=n(57874),B=n(26287),F=n(38613),j=n(35810);const z=(t,e)=>0!=(t&e),M=(0,s.pM)({name:"Version",components:{NcActionLink:D.A,NcActionButton:P.A,NcAvatar:R.A,NcListItem:$.N,BackupRestore:N,Download:L,FileCompare:S,Pencil:T.A,Delete:E.A,ImageOffOutline:O},directives:{tooltip:H.A},created(){this.fetchDisplayName()},filters:{humanReadableSize:t=>(0,j.v7)(t),humanDateFromNow:t=>(0,v.A)(t).fromNow()},props:{version:{type:Object,required:!0},fileInfo:{type:Object,required:!0},isCurrent:{type:Boolean,default:!1},isFirstVersion:{type:Boolean,default:!1},loadPreview:{type:Boolean,default:!1},canView:{type:Boolean,default:!1},canCompare:{type:Boolean,default:!1}},emits:["click","compare","restore","delete","label-update-request"],data:()=>({previewLoaded:!1,previewErrored:!1,capabilities:(0,F.C)("core","capabilities",{files:{version_labeling:!1,version_deletion:!1}}),versionAuthor:""}),computed:{versionLabel(){var t;const e=null!==(t=this.version.label)&&void 0!==t?t:"";return this.isCurrent?""===e?(0,r.Tl)("files_versions","Current version"):"".concat(e," (").concat((0,r.Tl)("files_versions","Current version"),")"):this.isFirstVersion&&""===e?(0,r.Tl)("files_versions","Initial version"):e},downloadURL(){return this.isCurrent?(0,f.aU)()+(0,m.HS)("/remote.php/webdav",this.fileInfo.path,this.fileInfo.name):(0,f.aU)()+this.version.url},formattedDate(){return(0,v.A)(this.version.mtime).format("LLL")},enableLabeling(){return!0===this.capabilities.files.version_labeling},enableDeletion(){return!0===this.capabilities.files.version_deletion},hasDeletePermissions(){return z(this.fileInfo.permissions,j.aX.DELETE)},hasUpdatePermissions(){return z(this.fileInfo.permissions,j.aX.UPDATE)},isDownloadable(){if(0==(this.fileInfo.permissions&j.aX.READ))return!1;if("shared"===this.fileInfo.mountType){const t=this.fileInfo.shareAttributes.find((t=>"permissions"===t.scope&&"download"===t.key))||{};if(!1===(null==t?void 0:t.enabled))return!1}return!0}},methods:{labelUpdate(){this.$emit("label-update-request")},restoreVersion(){this.$emit("restore",this.version)},async deleteVersion(){await this.$nextTick(),await this.$nextTick(),this.$emit("delete",this.version)},async fetchDisplayName(){if(this.version.author)try{const{data:t}=await B.A.get((0,f.KT)("/cloud/users/".concat(this.version.author)));this.versionAuthor=t.ocs.data.displayname}catch(t){this.versionAuthor=null}},click(){this.canView?this.$emit("click",{version:this.version}):window.location=this.downloadURL},compareVersion(){if(!this.canView)throw new Error("Cannot compare version of this file");this.$emit("compare",{version:this.version})},t:r.Tl}});var U=n(85072),q=n.n(U),W=n(97825),G=n.n(W),K=n(77659),Y=n.n(K),X=n(55056),Z=n.n(X),Q=n(10540),J=n.n(Q),tt=n(41113),et=n.n(tt),it=n(68466),nt={};nt.styleTagTransform=et(),nt.setAttributes=Z(),nt.insert=Y().bind(null,"head"),nt.domAPI=G(),nt.insertStyleElement=J(),q()(it.A,nt),it.A&&it.A.locals&&it.A.locals;const st=(0,x.A)(M,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{staticClass:"version",attrs:{"force-display-actions":!0,"data-files-versions-version":t.version.fileVersion},on:{click:t.click},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loadPreview||t.previewLoaded?!t.isCurrent&&!t.version.hasPreview||t.previewErrored?e("div",{staticClass:"version__image"},[e("ImageOffOutline",{attrs:{size:20}})],1):e("img",{staticClass:"version__image",attrs:{src:t.version.previewUrl,alt:"",decoding:"async",fetchpriority:"low",loading:"lazy"},on:{load:function(e){t.previewLoaded=!0},error:function(e){t.previewErrored=!0}}}):e("div",{staticClass:"version__image"})]},proxy:!0},{key:"name",fn:function(){return[e("div",{staticClass:"version__info"},[t.versionLabel?e("div",{staticClass:"version__info__label"},[t._v(t._s(t.versionLabel))]):t._e(),t._v(" "),t.versionAuthor?e("div",{staticClass:"version__info"},[t.versionLabel?e("div",[t._v("•")]):t._e(),t._v(" "),e("NcAvatar",{staticClass:"avatar",attrs:{user:t.version.author,size:16,"disable-menu":!0,"disable-tooltip":!0,"show-user-status":!1}}),t._v(" "),e("div",[t._v(t._s(t.versionAuthor))])],1):t._e()])]},proxy:!0},{key:"subname",fn:function(){return[e("div",{staticClass:"version__info version__info__subline"},[e("span",{attrs:{title:t.formattedDate}},[t._v(t._s(t._f("humanDateFromNow")(t.version.mtime)))]),t._v(" "),e("span",[t._v("•")]),t._v(" "),e("span",[t._v(t._s(t._f("humanReadableSize")(t.version.size)))])])]},proxy:!0},{key:"actions",fn:function(){return[t.enableLabeling&&t.hasUpdatePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"label","close-after-click":!0},on:{click:t.labelUpdate},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Pencil",{attrs:{size:22}})]},proxy:!0}],null,!1,3072546167)},[t._v("\n\t\t\t"+t._s(""===t.version.label?t.t("files_versions","Name this version"):t.t("files_versions","Edit version name"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.canView&&t.canCompare?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"compare","close-after-click":!0},on:{click:t.compareVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("FileCompare",{attrs:{size:22}})]},proxy:!0}],null,!1,1958207595)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Compare to current version"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.hasUpdatePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"restore","close-after-click":!0},on:{click:t.restoreVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("BackupRestore",{attrs:{size:22}})]},proxy:!0}],null,!1,2239038444)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Restore version"))+"\n\t\t")]):t._e(),t._v(" "),t.isDownloadable?e("NcActionLink",{attrs:{"data-cy-files-versions-version-action":"download",href:t.downloadURL,"close-after-click":!0,download:t.downloadURL},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Download",{attrs:{size:22}})]},proxy:!0}],null,!1,927269758)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Download version"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.enableDeletion&&t.hasDeletePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"delete","close-after-click":!0},on:{click:t.deleteVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Delete",{attrs:{size:22}})]},proxy:!0}],null,!1,2429175571)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Delete version"))+"\n\t\t")]):t._e()]},proxy:!0}])})}),[],!1,null,"4c3acd0e",null).exports,rt=(0,s.pM)({name:"VirtualScrolling",props:{sections:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},headerHeight:{type:Number,default:75},renderDistance:{type:Number,default:.5},bottomBufferRatio:{type:Number,default:2},scrollToKey:{type:String,default:""}},data:()=>({scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}),computed:{visibleSections(){y.debug("[VirtualScrolling] Computing visible section",{sections:this.sections});const t=this.containerHeight,e=this.scrollPosition,i=e+t;let n=0,s=0;const r=this.sections.map((r=>(s+=this.headerHeight,{...r,rows:r.rows.reduce(((r,o)=>{n=s,s+=o.height;let a=0;return s<e?a=(e-s)/t:n>i&&(a=(n-i)/t),a>this.renderDistance?r:[...r,{...o,distance:a}]}),[])}))).filter((t=>t.rows.length>0)),o=r.flatMap((t=>{let{rows:e}=t;return e})).flatMap((t=>{let{items:e}=t;return e})),a=this._rowIdToKeyMap;o.forEach((t=>t.key=a[t.id]));const l=o.map((t=>{let{key:e}=t;return e})).filter((t=>void 0!==t)),c=Object.values(a).filter((t=>!l.includes(t)));return o.filter((t=>{let{key:e}=t;return void 0===e})).forEach((t=>{var e;return t.key=null!==(e=c.pop())&&void 0!==e?e:Math.random().toString(36).substr(2)})),this._rowIdToKeyMap=o.reduce(((t,e)=>{let{id:i,key:n}=e;return{...t,["".concat(i)]:n}}),{}),r},totalHeight(){return this.sections.map((t=>this.headerHeight+t.height)).reduce(((t,e)=>t+e),0)+0},paddingTop(){if(0===this.visibleSections.length)return 0;let t=0;for(const e of this.sections)if(e.key===this.visibleSections[0].rows[0].sectionKey){for(const i of e.rows){if(i.key===this.visibleSections[0].rows[0].key)return t;t+=i.height}t+=this.headerHeight}else t+=this.headerHeight+e.height;return t},rowsContainerStyle(){return{height:"".concat(this.totalHeight,"px"),paddingTop:"".concat(this.paddingTop,"px")}},isNearBottom(){const t=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.totalHeight-t},container(){return y.debug("[VirtualScrolling] Computing container"),null!==this.containerElement?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom(t){y.debug("[VirtualScrolling] isNearBottom changed",{value:t}),t&&this.$emit("need-content")},visibleSections(){this.isNearBottom&&this.$emit("need-content")},scrollToKey(t){let e=0;for(const i of this.sections){if(i.key===t)break;e+=this.headerHeight+i.height}y.debug("[VirtualScrolling] Scrolling to",{currentRowTopDistanceFromTop:e}),this.container.scrollTo({top:e,behavior:"smooth"})}},beforeCreate(){this._rowIdToKeyMap={}},mounted(){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.contentRect;e.target===this.container&&(this.containerHeight=t.height),e.target.classList.contains("vs-rows-container")&&(this.rowsContainerHeight=t.height)}})),this.useWindow?(window.addEventListener("resize",this.updateContainerSize,{passive:!0}),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition,{passive:!0})},beforeDestroy(){var t;this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition(){var t;null!==(t=this._onScrollHandle)&&void 0!==t||(this._onScrollHandle=requestAnimationFrame((()=>{this._onScrollHandle=null,this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop})))},updateContainerSize(){this.containerHeight=window.innerHeight}}});var ot=n(26201),at={};at.styleTagTransform=et(),at.setAttributes=Z(),at.insert=Y().bind(null,"head"),at.domAPI=G(),at.insertStyleElement=J(),q()(ot.A,at),ot.A&&ot.A.locals&&ot.A.locals;const lt=(0,x.A)(rt,(function(){var t=this,e=t._self._c;return t._self._setupProxy,t.useWindow||null!==t.containerElement?e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:t.rowsContainerStyle},[t._t("default",null,{visibleSections:t.visibleSections}),t._v(" "),t._t("loader")],2):e("div",{ref:"container",staticClass:"vs-container"},[e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:t.rowsContainerStyle},[t._t("default",null,{visibleSections:t.visibleSections}),t._v(" "),t._t("loader")],2)])}),[],!1,null,"49a1883f",null).exports;var ct=n(85338),dt=n(9518),ut=n(82182);const pt=(0,s.pM)({name:"VersionLabelForm",components:{NcButton:dt.A,NcTextField:ut.A,Check:ct.A},props:{versionLabel:{type:String,default:""}},data(){return{innerVersionLabel:this.versionLabel}},mounted(){this.$nextTick((()=>{this.$refs.labelInput.$el.getElementsByTagName("input")[0].focus()}))},methods:{setVersionLabel(t){this.$emit("label-update",t)},t:r.Tl}});var ht=n(81122),ft={};ft.styleTagTransform=et(),ft.setAttributes=Z(),ft.insert=Y().bind(null,"head"),ft.domAPI=G(),ft.insertStyleElement=J(),q()(ht.A,ft),ht.A&&ht.A.locals&&ht.A.locals;const mt={name:"VersionTab",components:{Version:st,VirtualScrolling:lt,VersionLabelForm:(0,x.A)(pt,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("form",{staticClass:"version-label-modal",on:{submit:function(e){return e.preventDefault(),t.setVersionLabel(t.innerVersionLabel)}}},[e("label",[e("div",{staticClass:"version-label-modal__title"},[t._v(t._s(t.t("files_versions","Version name")))]),t._v(" "),e("NcTextField",{ref:"labelInput",attrs:{value:t.innerVersionLabel,placeholder:t.t("files_versions","Version name"),"label-outside":!0},on:{"update:value":function(e){t.innerVersionLabel=e}}})],1),t._v(" "),e("div",{staticClass:"version-label-modal__info"},[t._v("\n\t\t"+t._s(t.t("files_versions","Named versions are persisted, and excluded from automatic cleanups when your storage quota is full."))+"\n\t")]),t._v(" "),e("div",{staticClass:"version-label-modal__actions"},[e("NcButton",{attrs:{disabled:0===t.innerVersionLabel.trim().length},on:{click:function(e){return t.setVersionLabel("")}}},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Remove version name"))+"\n\t\t")]),t._v(" "),e("NcButton",{attrs:{type:"primary","native-type":"submit"},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Check")]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Save version name"))+"\n\t\t")])],1)])}),[],!1,null,"20b51aac",null).exports,NcLoadingIcon:p.A,NcModal:h.A},mixins:[c.A],data:()=>({fileInfo:null,isActive:!1,versions:[],loading:!1,showVersionLabelForm:!1}),computed:{sections(){return[{key:"versions",rows:this.orderedVersions.map((t=>({key:t.mtime,height:68,sectionKey:"versions",items:[t]}))),height:68*this.orderedVersions.length}]},orderedVersions(){return[...this.versions].sort(((t,e)=>t.mtime===this.fileInfo.mtime?-1:e.mtime===this.fileInfo.mtime?1:e.mtime-t.mtime))},initialVersionMtime(){return this.versions.map((t=>t.mtime)).reduce(((t,e)=>Math.min(t,e)))},viewerFileInfo(){let t="";return 1&this.fileInfo.permissions&&(t+="R"),2&this.fileInfo.permissions&&(t+="W"),8&this.fileInfo.permissions&&(t+="D"),{...this.fileInfo,mime:this.fileInfo.mimetype,basename:this.fileInfo.name,filename:this.fileInfo.path+"/"+this.fileInfo.name,permissions:t,fileid:this.fileInfo.id}},canView(){var t;return null===(t=window.OCA.Viewer)||void 0===t||null===(t=t.mimetypesCompare)||void 0===t?void 0:t.includes(this.fileInfo.mimetype)},canCompare(){return!this.isMobile}},mounted(){(0,d.B1)("files_versions:restore:restored",this.fetchVersions)},beforeUnmount(){(0,d.al)("files_versions:restore:restored",this.fetchVersions)},methods:{async update(t){this.fileInfo=t,this.resetState(),this.fetchVersions()},async setIsActive(t){this.isActive=t},async fetchVersions(){try{this.loading=!0,this.versions=await async function(t){var e;const i="/versions/".concat(null===(e=(0,u.HW)())||void 0===e?void 0:e.uid,"/versions/").concat(t.id);try{return(await _.getDirectoryContents(i,{data:'<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:"\n\txmlns:oc="http://owncloud.org/ns"\n\txmlns:nc="http://nextcloud.org/ns"\n\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t<d:prop>\n\t\t<d:getcontentlength />\n\t\t<d:getcontenttype />\n\t\t<d:getlastmodified />\n\t\t<d:getetag />\n\t\t<nc:version-label />\n\t\t<nc:version-author />\n\t\t<nc:has-preview />\n\t</d:prop>\n</d:propfind>',details:!0})).data.filter((t=>{let{mime:e}=t;return""!==e})).map((e=>function(t,e){var i;const n=1e3*(0,v.A)(t.lastmod).unix();let s="";return s=n===e.mtime?(0,f.Jv)("/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0",{fileId:e.id,fileEtag:e.etag}):(0,f.Jv)("/apps/files_versions/preview?file={file}&version={fileVersion}",{file:(0,m.HS)(e.path,e.name),fileVersion:t.basename}),{fileId:e.id,label:t.props["version-label"],author:null!==(i=t.props["version-author"])&&void 0!==i?i:null,filename:t.filename,basename:(0,v.A)(n).format("LLL"),mime:t.mime,etag:"".concat(t.props.getetag),size:t.size,type:t.type,mtime:n,permissions:"R",hasPreview:1===t.props["has-preview"],previewUrl:s,url:(0,m.HS)("/remote.php/dav",t.filename),source:(0,f.dC)("dav")+(0,m.O0)(t.filename),fileVersion:t.basename}}(e,t)))}catch(t){throw y.error("Could not fetch version",{exception:t}),t}}(this.fileInfo)}finally{this.loading=!1}},async handleRestore(e){const i=this.fileInfo;this.fileInfo={...this.fileInfo,size:e.size,mtime:e.mtime};const n={preventDefault:!1,fileInfo:this.fileInfo,version:e};if((0,d.Ic)("files_versions:restore:requested",n),!n.preventDefault)try{await async function(t){try{var e,i;y.debug("Restoring version",{url:t.url}),await _.moveFile("/versions/".concat(null===(e=(0,u.HW)())||void 0===e?void 0:e.uid,"/versions/").concat(t.fileId,"/").concat(t.fileVersion),"/versions/".concat(null===(i=(0,u.HW)())||void 0===i?void 0:i.uid,"/restore/target"))}catch(t){throw y.error("Could not restore version",{exception:t}),t}}(e),""!==e.label?(0,l.Te)(t("files_versions","".concat(e.label," restored"))):e.mtime===this.initialVersionMtime?(0,l.Te)(t("files_versions","Initial version restored")):(0,l.Te)(t("files_versions","Version restored")),(0,d.Ic)("files_versions:restore:restored",e)}catch(n){this.fileInfo=i,(0,l.Qg)(t("files_versions","Could not restore version")),(0,d.Ic)("files_versions:restore:failed",e)}},handleLabelUpdateRequest(t){this.showVersionLabelForm=!0,this.editedVersion=t},async handleLabelUpdate(t){const e=this.editedVersion.label;this.editedVersion.label=t,this.showVersionLabelForm=!1;try{await async function(t,e){return await _.customRequest(t.filename,{method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:"\n\t\t\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t\t<d:set>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<nc:version-label>'.concat(e,"</nc:version-label>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:set>\n\t\t\t\t\t</d:propertyupdate>")})}(this.editedVersion,t),this.editedVersion=null}catch(t){this.editedVersion.label=e,(0,l.Qg)(this.t("files_versions","Could not set version label")),logger.error("Could not set version label",{exception:t})}},async handleDelete(e){const i=this.versions.indexOf(e);this.versions.splice(i,1);try{await async function(t){await _.deleteFile(t.filename)}(e)}catch(i){this.versions.push(e),(0,l.Qg)(t("files_versions","Could not delete version"))}},resetState(){this.$set(this,"versions",[])},openVersion(t){let{version:e}=t;if(e.mtime===this.fileInfo.mtime)return void OCA.Viewer.open({fileInfo:this.viewerFileInfo});const i=this.versions.map((t=>{var e,i;return{...t,filename:t.mtime===this.fileInfo.mtime?a().join("files",null!==(e=null===(i=(0,u.HW)())||void 0===i?void 0:i.uid)&&void 0!==e?e:"",this.fileInfo.path,this.fileInfo.name):t.filename,hasPreview:!1,previewUrl:void 0}}));OCA.Viewer.open({fileInfo:i.find((t=>t.source===e.source)),enableSidebar:!1})},compareVersion(t){let{version:e}=t;const i=this.versions.map((t=>({...t,hasPreview:!1,previewUrl:void 0})));OCA.Viewer.compare(this.viewerFileInfo,i.find((t=>t.source===e.source)))}}};var vt=n(34808),gt={};gt.styleTagTransform=et(),gt.setAttributes=Z(),gt.insert=Y().bind(null,"head"),gt.domAPI=G(),gt.insertStyleElement=J(),q()(vt.A,gt),vt.A&&vt.A.locals&&vt.A.locals;const bt=(0,x.A)(mt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"versions-tab__container"},[e("VirtualScrolling",{attrs:{sections:t.sections,"header-height":0},scopedSlots:t._u([{key:"default",fn:function(i){let{visibleSections:n}=i;return[e("ul",{attrs:{"data-files-versions-versions-list":""}},[1===n.length?t._l(n[0].rows,(function(i){return e("Version",{key:i.items[0].mtime,attrs:{"can-view":t.canView,"can-compare":t.canCompare,"load-preview":t.isActive,version:i.items[0],"file-info":t.fileInfo,"is-current":i.items[0].mtime===t.fileInfo.mtime,"is-first-version":i.items[0].mtime===t.initialVersionMtime},on:{click:t.openVersion,compare:t.compareVersion,restore:t.handleRestore,"label-update-request":function(e){return t.handleLabelUpdateRequest(i.items[0])},delete:t.handleDelete}})})):t._e()],2)]}}])},[t._v(" "),t.loading?e("NcLoadingIcon",{staticClass:"files-list-viewer__loader",attrs:{slot:"loader"},slot:"loader"}):t._e()],1),t._v(" "),t.showVersionLabelForm?e("NcModal",{attrs:{title:t.t("files_versions","Name this version")},on:{close:function(e){t.showVersionLabelForm=!1}}},[e("VersionLabelForm",{attrs:{"version-label":t.editedVersion.label},on:{"label-update":t.handleLabelUpdate}})],1):t._e()],1)}),[],!1,null,null,null).exports;var At=n(80284);s.Ay.prototype.t=r.Tl,s.Ay.prototype.n=r.zw,s.Ay.use(At.Ay);const wt=s.Ay.extend(bt);let _t=null;window.addEventListener("DOMContentLoaded",(function(){var t;void 0!==(null===(t=OCA.Files)||void 0===t?void 0:t.Sidebar)&&OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab({id:"version_vue",name:(0,r.Tl)("files_versions","Versions"),iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-backup-restore" viewBox="0 0 24 24"><path d="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" /></svg>',async mount(t,e,i){_t&&_t.$destroy(),_t=new wt({parent:i}),await _t.update(e),_t.$mount(t)},update(t){_t.update(t)},setIsActive(t){_t&&_t.setIsActive(t)},destroy(){_t.$destroy(),_t=null},enabled(t){var e;return!(null===(e=null==t?void 0:t.isDirectory())||void 0===e||e)}}))}))},68466:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".version[data-v-4c3acd0e]{display:flex;flex-direction:row}.version__info[data-v-4c3acd0e]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--color-main-text);font-weight:500}.version__info__label[data-v-4c3acd0e]{font-weight:700}.version__info__subline[data-v-4c3acd0e]{color:var(--color-text-maxcontrast)}.version__image[data-v-4c3acd0e]{width:3rem;height:3rem;border:1px solid var(--color-border);border-radius:var(--border-radius-large);display:flex;justify-content:center;color:var(--color-text-light)}","",{version:3,sources:["webpack://./apps/files_versions/src/components/Version.vue"],names:[],mappings:"AACA,0BACC,YAAA,CACA,kBAAA,CAEA,gCACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,4BAAA,CACA,eAAA,CAEA,uCACC,eAAA,CAGD,yCACA,mCAAA,CAID,iCACC,UAAA,CACA,WAAA,CACA,oCAAA,CACA,wCAAA,CAGA,YAAA,CACA,sBAAA,CACA,6BAAA",sourcesContent:["\n.version {\n\tdisplay: flex;\n\tflex-direction: row;\n\n\t&__info {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tgap: 0.5rem;\n\t\tcolor: var(--color-main-text);\n\t\tfont-weight: 500;\n\n\t\t&__label {\n\t\t\tfont-weight: 700;\n\t\t}\n\n\t\t&__subline {\n\t\tcolor: var(--color-text-maxcontrast)\n\t}\n\t}\n\n\t&__image {\n\t\twidth: 3rem;\n\t\theight: 3rem;\n\t\tborder: 1px solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t// Useful to display no preview icon.\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tcolor: var(--color-text-light);\n\t}\n}\n"],sourceRoot:""}]);const a=o},81122:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".version-label-modal[data-v-20b51aac]{display:flex;justify-content:space-between;flex-direction:column;height:250px;padding:16px}.version-label-modal__title[data-v-20b51aac]{margin-bottom:12px;font-weight:600}.version-label-modal__info[data-v-20b51aac]{margin-top:12px;color:var(--color-text-maxcontrast)}.version-label-modal__actions[data-v-20b51aac]{display:flex;justify-content:space-between;margin-top:64px}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VersionLabelForm.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,6BAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,6CACC,kBAAA,CACA,eAAA,CAGD,4CACC,eAAA,CACA,mCAAA,CAGD,+CACC,YAAA,CACA,6BAAA,CACA,eAAA",sourcesContent:["\n.version-label-modal {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: column;\n\theight: 250px;\n\tpadding: 16px;\n\n\t&__title {\n\t\tmargin-bottom: 12px;\n\t\tfont-weight: 600;\n\t}\n\n\t&__info {\n\t\tmargin-top: 12px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tmargin-top: 64px;\n\t}\n}\n"],sourceRoot:""}]);const a=o},26201:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".vs-container[data-v-49a1883f]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-49a1883f]{box-sizing:border-box;will-change:scroll-position,padding;contain:layout paint style}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VirtualScrolling.vue"],names:[],mappings:"AACA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA,CACA,mCAAA,CACA,0BAAA",sourcesContent:["\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n\twill-change: scroll-position, padding;\n\tcontain: layout paint style;\n}\n"],sourceRoot:""}]);const a=o},34808:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".versions-tab__container{height:100%}","",{version:3,sources:["webpack://./apps/files_versions/src/views/VersionTab.vue"],names:[],mappings:"AACA,yBACC,WAAA",sourcesContent:["\n.versions-tab__container {\n\theight: 100%;\n}\n"],sourceRoot:""}]);const a=o},42634:()=>{},15340:()=>{},79838:()=>{},35810:(t,e,i)=>{"use strict";i.d(e,{Al:()=>I,H4:()=>k,PY:()=>L,Q$:()=>S,R3:()=>A,VL:()=>b,aX:()=>h,lJ:()=>V,pt:()=>w,v7:()=>P});var n=i(21777),s=i(35947),r=i(43627),o=i(71089),a=i(63814),l=i(44719),c=i(36117),d=i(2568);const u=null===(p=(0,n.HW)())?(0,s.YK)().setApp("files").build():(0,s.YK)().setApp("files").setUid(p.uid).build();var p,h=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(h||{});const f=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],m={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},v=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...f]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},g=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...m}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},b=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${g()}>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},A=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${g()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,n.HW)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const _=function(t,e){return null!==t.match(e)},y=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=h.NONE&&t.permissions<=h.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&_(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,r.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(C).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var C=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(C||{});class x{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(x.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,i)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,i),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,i)=>this.readonlyAttributes.includes(e)?(u.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,i)};constructor(t,e){y(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,o.O0)(this.source.slice(t.length))}get basename(){return(0,r.basename)(this.source)}get extension(){return(0,r.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,r.dirname)(t.slice(e+i.length)||"/")}const t=new URL(this.source);return(0,r.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:h.NONE:h.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return _(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,r.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(e+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){y({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,r.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,i]of Object.entries(t))try{void 0===i?delete this.attributes[e]:this.attributes[e]=i}catch(t){if(t instanceof TypeError)continue;throw t}}}class N extends x{get type(){return w.File}}class E extends x{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const V=`/files/${(0,n.HW)()?.uid}`,L=(0,a.dC)("dav"),k=function(t=L,e={}){const i=(0,l.UU)(t,{headers:e});function s(t){i.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,n.zo)(s),s((0,n.do)()),(0,l.Gu)().patch("fetch",((t,e)=>{const i=e.headers;return i?.method&&(e.method=i.method,delete i.method),fetch(t,e)})),i},S=(t,e="/",i=V)=>{const n=new AbortController;return new c.CancelablePromise((async(s,r,o)=>{o((()=>n.abort()));try{s((await t.getDirectoryContents(`${i}${e}`,{signal:n.signal,details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${g()}>\n\t\t\t<d:prop>\n\t\t\t\t${v()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>I(t,i))))}catch(t){r(t)}}))},I=function(t,e=V,i=L){let s=(0,n.HW)()?.uid;const r=document.querySelector("input#isPublic")?.value;if(r)s=s??document.querySelector("input#sharingUserId")?.value,s=s??"anonymous";else if(!s)throw new Error("No user id found");const o=t.props,a=function(t=""){let e=h.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=h.CREATE),t.includes("G")&&(e|=h.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=h.UPDATE),t.includes("D")&&(e|=h.DELETE),t.includes("R")&&(e|=h.SHARE),e):e}(o?.permissions),l=String(o?.["owner-id"]||s),c={id:o?.fileid||0,source:`${i}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",size:o?.size||Number.parseInt(o.getcontentlength||"0"),permissions:a,owner:l,root:e,attributes:{...t,...o,hasPreview:o?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new N(c):new E(c)};window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);const O=["B","KB","MB","GB","TB","PB"],T=["B","KiB","MiB","GiB","TiB","PiB"];function P(t,e=!1,i=!1,n=!1){i=i&&!n,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;s=Math.min((i?T.length:O.length)-1,s);const r=i?T[s]:O[s];let o=(t/Math.pow(n?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==o?"< 1 ":"0 ")+(i?T[1]:O[1]):(o=s<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,d.lO)()),o+" "+r)}var D={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),s=n.length;for(let r=0;r<s;r++)t[n[r]]="strict"===i?[e[n[r]]]:e[n[r]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const s=[];s.startIndex=e.lastIndex-n[0].length;const r=n.length;for(let t=0;t<r;t++)s.push(n[t]);i.push(s),n=e.exec(t)}return i},t.nameRegexp=i}(D);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var R={};const $={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};R.buildOptions=function(t){return Object.assign({},$,t)},R.defaultOptions=$,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var H={};function B(t,e,i){let n;const s={};for(let r=0;r<t.length;r++){const o=t[r],a=F(o);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=B(o[a],e,l);const i=z(t,e);o[":@"]?j(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(t)):e.isArray(a,l,i)?s[a]=[t]:s[a]=t}}}return"string"==typeof n?n.length>0&&(s[e.textNodeName]=n):void 0!==n&&(s[e.textNodeName]=n),s}function F(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function j(t,e,i,n){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];n.isArray(r,i+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function z(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}H.prettify=function(t,e){return B(t,e)};const{buildOptions:M}=R,{prettify:U}=H;function q(t,e,i,n){let s="",r=!1;for(let o=0;o<t.length;o++){const a=t[o],l=W(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];K(c,e)||(t=e.tagValueProcessor(l,t),t=Y(t,e)),r&&(s+=n),s+=t,r=!1;continue}if(l===e.cdataPropName){r&&(s+=n),s+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,r=!1;continue}if(l===e.commentPropName){s+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=G(a[":@"],e),i="?xml"===l?"":n;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=i+`<${l}${o}${t}?>`,r=!0;continue}let d=n;""!==d&&(d+=e.indentBy);const u=n+`<${l}${G(a[":@"],e)}`,p=q(a[l],e,c,d);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=u+">":s+=u+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?s+=u+`>${p}${n}</${l}>`:(s+=u+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?s+=n+e.indentBy+p+n:s+=p,s+=`</${l}>`):s+=u+"/>",r=!0}return s}function W(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function G(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let s=e.attributeValueProcessor(n,t[n]);s=Y(s,e),!0===s&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return i}function K(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function Y(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const X=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),q(t,e,"",i)},Z={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Q(t){this.options=Object.assign({},Z,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=et),this.processTextOrObjNode=J,this.options.format?(this.indentate=tt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function J(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function tt(t){return this.options.indentBy.repeat(t)}function et(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Q.prototype.build=function(t){return this.options.preserveOrder?X(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Q.prototype.j2x=function(t,e){let i="",n="";for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(n+="");else if(null===t[s])this.isAttribute(s)?n+="":"?"===s[0]?n+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)n+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const r=this.isAttribute(s);if(r)i+=this.buildAttrPairStr(r,""+t[s]);else if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const i=t[s].length;let r="";for(let o=0;o<i;o++){const i=t[s][o];void 0===i||(null===i?"?"===s[0]?n+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+s+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?r+=this.j2x(i,e+1).val:r+=this.processTextOrObjNode(i,s,e):r+=this.buildTextValNode(i,s,"",e))}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,"",e)),n+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let r=0;r<n;r++)i+=this.buildAttrPairStr(e[r],""+t[s][e[r]])}else n+=this.processTextOrObjNode(t[s],s,e);return{attrStr:i,val:n}},Q.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},Q.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+r+this.tagEndChar+t+this.indentate(n)+s:this.indentate(n)+"<"+e+i+r+">"+t+s}},Q.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Q.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+s+"</"+e+this.tagEndChar}},Q.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t}}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return s[t].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=s,e=[],o.O=(t,i,n,s)=>{if(!i){var r=1/0;for(d=0;d<e.length;d++){i=e[d][0],n=e[d][1],s=e[d][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||r>=s)&&Object.keys(o.O).every((t=>o.O[t](i[l])))?i.splice(l--,1):(a=!1,s<r&&(r=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[i,n,s]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,i)=>(o.f[i](t,e),e)),[])),o.u=t=>t+"-"+t+".js?v="+{1110:"a5d6e6f59aa058840a1e",5455:"3ac95a973131d586425e"}[t],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i={},n="nextcloud:",o.l=(t,e,s,r)=>{if(i[t])i[t].push(e);else{var a,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+s){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",n+s),a.src=t),i[t]=[e];var p=(e,n)=>{a.onerror=a.onload=null,clearTimeout(h);var s=i[t];if(delete i[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((t=>t(n))),e)return e(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),o.j=2250,(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=i[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{o.b=document.baseURI||self.location.href;var t={2250:0};o.f.j=(e,i)=>{var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise(((i,s)=>n=t[e]=[i,s]));i.push(n[2]=s);var r=o.p+o.u(e),a=new Error;o.l(r,(i=>{if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,n[1](a)}}),"chunk-"+e,e)}},o.O.j=e=>0===t[e];var e=(e,i)=>{var n,s,r=i[0],a=i[1],l=i[2],c=0;if(r.some((e=>0!==t[e]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(l)var d=l(o)}for(e&&e(i);c<r.length;c++)s=r[c],o.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return o.O(d)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),o.nc=void 0;var a=o.O(void 0,[4208],(()=>o(90488)));a=o.O(a)})();
-//# sourceMappingURL=files_versions-files_versions.js.map?v=ff58db621a84a705fe92 \ No newline at end of file
+(()=>{var e,i,r,n={25359:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(71354),n=i.n(r),s=i(76314),o=i.n(s)()(n());o.push([e.id,".version[data-v-7fcf8237]{display:flex;flex-direction:row}.version__info[data-v-7fcf8237]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--color-main-text);font-weight:500;overflow:hidden}.version__info__label[data-v-7fcf8237]{font-weight:700;overflow:hidden;text-overflow:ellipsis;min-width:110px}.version__info__author_name[data-v-7fcf8237]{overflow:hidden;text-overflow:ellipsis}.version__info__date[data-v-7fcf8237]{overflow:hidden;text-overflow:ellipsis}.version__info__subline[data-v-7fcf8237]{color:var(--color-text-maxcontrast)}.version__image[data-v-7fcf8237]{width:3rem;height:3rem;border:1px solid var(--color-border);border-radius:var(--border-radius-large);display:flex;justify-content:center;color:var(--color-text-light)}","",{version:3,sources:["webpack://./apps/files_versions/src/components/Version.vue"],names:[],mappings:"AACA,0BACC,YAAA,CACA,kBAAA,CAEA,gCACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,4BAAA,CACA,eAAA,CACA,eAAA,CAEA,uCACC,eAAA,CAEA,eAAA,CACA,sBAAA,CACA,eAAA,CAGD,6CACC,eAAA,CACA,sBAAA,CAGD,sCAEC,eAAA,CACA,sBAAA,CAGD,yCACC,mCAAA,CAIF,iCACC,UAAA,CACA,WAAA,CACA,oCAAA,CACA,wCAAA,CAGA,YAAA,CACA,sBAAA,CACA,6BAAA",sourcesContent:["\n.version {\n\tdisplay: flex;\n\tflex-direction: row;\n\n\t&__info {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tgap: 0.5rem;\n\t\tcolor: var(--color-main-text);\n\t\tfont-weight: 500;\n\t\toverflow: hidden;\n\n\t\t&__label {\n\t\t\tfont-weight: 700;\n\t\t\t// Fix overflow on narrow screens\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmin-width: 110px;\n\t\t}\n\n\t\t&__author_name {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__date {\n\t\t\t// Fix overflow on narrow screens\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__subline {\n\t\t\tcolor: var(--color-text-maxcontrast)\n\t\t}\n\t}\n\n\t&__image {\n\t\twidth: 3rem;\n\t\theight: 3rem;\n\t\tborder: 1px solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t// Useful to display no preview icon.\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tcolor: var(--color-text-light);\n\t}\n}\n"],sourceRoot:""}]);const a=o},26201:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(71354),n=i.n(r),s=i(76314),o=i.n(s)()(n());o.push([e.id,".vs-container[data-v-49a1883f]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-49a1883f]{box-sizing:border-box;will-change:scroll-position,padding;contain:layout paint style}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VirtualScrolling.vue"],names:[],mappings:"AACA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA,CACA,mCAAA,CACA,0BAAA",sourcesContent:["\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n\twill-change: scroll-position, padding;\n\tcontain: layout paint style;\n}\n"],sourceRoot:""}]);const a=o},35810:(e,t,i)=>{"use strict";i.d(t,{Al:()=>a.r,H4:()=>a.c,KT:()=>x,Q$:()=>a.e,R3:()=>a.n,VL:()=>a.l,aX:()=>a.P,di:()=>F,lJ:()=>a.d,nF:()=>S,pt:()=>a.F,ur:()=>B,v7:()=>$});var r,n,s,o,a=i(68896),l=i(380),c=i(83141),u=i(87485),d=(i(43627),i(53334)),p=i(65606),f=i(62045).hp;function m(){if(n)return r;n=1;const e="object"==typeof p&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return r=e}function h(){if(o)return s;o=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return s={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var v,E,A,g,_,T,b,I,N,C,w,L,y,O={exports:{}};function R(){if(b)return T;b=1;const e=m(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:i}=h(),{safeRe:r,t:n}=(v||(v=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:n}=h(),s=m(),o=(t=e.exports={}).re=[],a=t.safeRe=[],l=t.src=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",n],[d,r]],f=(e,t,i)=>{const r=(e=>{for(const[t,i]of p)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),n=u++;s(e,n,t),c[e]=n,l[n]=t,o[n]=new RegExp(t,i?"g":void 0),a[n]=new RegExp(r,i?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${d}+`),f("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),f("FULL",`^${l[c.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),f("LOOSE",`^${l[c.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),f("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),f("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",l[c.COERCE],!0),f("COERCERTLFULL",l[c.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(O,O.exports)),O.exports),s=function(){if(A)return E;A=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return E=i=>i?"object"!=typeof i?e:i:t}(),{compareIdentifiers:o}=function(){if(_)return g;_=1;const e=/^[0-9]+$/,t=(t,i)=>{const r=e.test(t),n=e.test(i);return r&&n&&(t=+t,i=+i),t===i?0:r&&!n?-1:n&&!r?1:t<i?-1:1};return g={compareIdentifiers:t,rcompareIdentifiers:(e,i)=>t(i,e)}}();class a{constructor(o,l){if(l=s(l),o instanceof a){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?r[n.LOOSE]:r[n.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof a)){if("string"==typeof t&&t===this.version)return 0;t=new a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof a||(e=new a(e,this.options)),o(this.major,e.major)||o(this.minor,e.minor)||o(this.patch,e.patch)}comparePre(t){if(t instanceof a||(t=new a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let i=0;do{const r=this.prerelease[i],n=t.prerelease[i];if(e("prerelease compare",i,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return o(r,n)}while(++i)}compareBuild(t){t instanceof a||(t=new a(t,this.options));let i=0;do{const r=this.build[i],n=t.build[i];if(e("build compare",i,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return o(r,n)}while(++i)}inc(e,t,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(i)?1:0;if(!t&&!1===i)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===i&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return T=a}!function(){if(w)return C;w=1;const e=function(){if(N)return I;N=1;const e=R();return I=(t,i,r=!1)=>{if(t instanceof e)return t;try{return new e(t,i)}catch(e){if(!r)return null;throw e}}}();C=(t,i)=>{const r=e(t,i);return r?r.version:null}}(),function(){if(y)return L;y=1;const e=R();L=(t,i)=>new e(t,i).major}(),l.m;var D;D||(D=1,function(e){e.parser=function(e,t){return new r(e,t)},e.SAXParser=r,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(t,n){if(!(this instanceof r))return new r(t,n);var s=this;!function(e){for(var t=0,r=i.length;t<r;t++)e[i[t]]=""}(s),s.q=s.c="",s.bufferCheckPosition=e.MAX_BUFFER_LENGTH,s.opt=n||{},s.opt.lowercase=s.opt.lowercase||s.opt.lowercasetags,s.looseCase=s.opt.lowercase?"toLowerCase":"toUpperCase",s.tags=[],s.closed=s.closedRoot=s.sawRoot=!1,s.tag=s.error=null,s.strict=!!t,s.noscript=!(!t&&!s.opt.noscript),s.state=C.BEGIN,s.strictEntities=s.opt.strictEntities,s.ENTITIES=s.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),s.attribList=[],s.opt.xmlns&&(s.ns=Object.create(d)),void 0===s.opt.unquotedAttributeValues&&(s.opt.unquotedAttributeValues=!t),s.trackPosition=!1!==s.opt.position,s.trackPosition&&(s.position=s.line=s.column=0),L(s,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);return t}),r.prototype={end:function(){S(this)},write:function(t){var r=this;if(this.error)throw this.error;if(r.closed)return D(r,"Cannot write after close. Assign an onready handler.");if(null===t)return S(r);"object"==typeof t&&(t=t.toString());for(var n=0,s="";s=k(t,n++),r.c=s,s;)switch(r.trackPosition&&(r.position++,"\n"===s?(r.line++,r.column=0):r.column++),r.state){case C.BEGIN:if(r.state=C.BEGIN_WHITESPACE,"\ufeff"===s)continue;U(r,s);continue;case C.BEGIN_WHITESPACE:U(r,s);continue;case C.TEXT:if(r.sawRoot&&!r.closedRoot){for(var l=n-1;s&&"<"!==s&&"&"!==s;)(s=k(t,n++))&&r.trackPosition&&(r.position++,"\n"===s?(r.line++,r.column=0):r.column++);r.textNode+=t.substring(l,n-1)}"<"!==s||r.sawRoot&&r.closedRoot&&!r.strict?(E(s)||r.sawRoot&&!r.closedRoot||F(r,"Text data outside of root node."),"&"===s?r.state=C.TEXT_ENTITY:r.textNode+=s):(r.state=C.OPEN_WAKA,r.startTagPosition=r.position);continue;case C.SCRIPT:"<"===s?r.state=C.SCRIPT_ENDING:r.script+=s;continue;case C.SCRIPT_ENDING:"/"===s?r.state=C.CLOSE_TAG:(r.script+="<"+s,r.state=C.SCRIPT);continue;case C.OPEN_WAKA:if("!"===s)r.state=C.SGML_DECL,r.sgmlDecl="";else if(E(s));else if(_(p,s))r.state=C.OPEN_TAG,r.tagName=s;else if("/"===s)r.state=C.CLOSE_TAG,r.tagName="";else if("?"===s)r.state=C.PROC_INST,r.procInstName=r.procInstBody="";else{if(F(r,"Unencoded <"),r.startTagPosition+1<r.position){var c=r.position-r.startTagPosition;s=new Array(c).join(" ")+s}r.textNode+="<"+s,r.state=C.TEXT}continue;case C.SGML_DECL:if(r.sgmlDecl+s==="--"){r.state=C.COMMENT,r.comment="",r.sgmlDecl="";continue}r.doctype&&!0!==r.doctype&&r.sgmlDecl?(r.state=C.DOCTYPE_DTD,r.doctype+="<!"+r.sgmlDecl+s,r.sgmlDecl=""):(r.sgmlDecl+s).toUpperCase()===o?(y(r,"onopencdata"),r.state=C.CDATA,r.sgmlDecl="",r.cdata=""):(r.sgmlDecl+s).toUpperCase()===a?(r.state=C.DOCTYPE,(r.doctype||r.sawRoot)&&F(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===s?(y(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=C.TEXT):A(s)?(r.state=C.SGML_DECL_QUOTED,r.sgmlDecl+=s):r.sgmlDecl+=s;continue;case C.SGML_DECL_QUOTED:s===r.q&&(r.state=C.SGML_DECL,r.q=""),r.sgmlDecl+=s;continue;case C.DOCTYPE:">"===s?(r.state=C.TEXT,y(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=s,"["===s?r.state=C.DOCTYPE_DTD:A(s)&&(r.state=C.DOCTYPE_QUOTED,r.q=s));continue;case C.DOCTYPE_QUOTED:r.doctype+=s,s===r.q&&(r.q="",r.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:"]"===s?(r.doctype+=s,r.state=C.DOCTYPE):"<"===s?(r.state=C.OPEN_WAKA,r.startTagPosition=r.position):A(s)?(r.doctype+=s,r.state=C.DOCTYPE_DTD_QUOTED,r.q=s):r.doctype+=s;continue;case C.DOCTYPE_DTD_QUOTED:r.doctype+=s,s===r.q&&(r.state=C.DOCTYPE_DTD,r.q="");continue;case C.COMMENT:"-"===s?r.state=C.COMMENT_ENDING:r.comment+=s;continue;case C.COMMENT_ENDING:"-"===s?(r.state=C.COMMENT_ENDED,r.comment=R(r.opt,r.comment),r.comment&&y(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+s,r.state=C.COMMENT);continue;case C.COMMENT_ENDED:">"!==s?(F(r,"Malformed comment"),r.comment+="--"+s,r.state=C.COMMENT):r.doctype&&!0!==r.doctype?r.state=C.DOCTYPE_DTD:r.state=C.TEXT;continue;case C.CDATA:"]"===s?r.state=C.CDATA_ENDING:r.cdata+=s;continue;case C.CDATA_ENDING:"]"===s?r.state=C.CDATA_ENDING_2:(r.cdata+="]"+s,r.state=C.CDATA);continue;case C.CDATA_ENDING_2:">"===s?(r.cdata&&y(r,"oncdata",r.cdata),y(r,"onclosecdata"),r.cdata="",r.state=C.TEXT):"]"===s?r.cdata+="]":(r.cdata+="]]"+s,r.state=C.CDATA);continue;case C.PROC_INST:"?"===s?r.state=C.PROC_INST_ENDING:E(s)?r.state=C.PROC_INST_BODY:r.procInstName+=s;continue;case C.PROC_INST_BODY:if(!r.procInstBody&&E(s))continue;"?"===s?r.state=C.PROC_INST_ENDING:r.procInstBody+=s;continue;case C.PROC_INST_ENDING:">"===s?(y(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=C.TEXT):(r.procInstBody+="?"+s,r.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:_(m,s)?r.tagName+=s:(x(r),">"===s?$(r):"/"===s?r.state=C.OPEN_TAG_SLASH:(E(s)||F(r,"Invalid character in tag name"),r.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:">"===s?($(r,!0),M(r)):(F(r,"Forward-slash in opening tag not followed by >"),r.state=C.ATTRIB);continue;case C.ATTRIB:if(E(s))continue;">"===s?$(r):"/"===s?r.state=C.OPEN_TAG_SLASH:_(p,s)?(r.attribName=s,r.attribValue="",r.state=C.ATTRIB_NAME):F(r,"Invalid attribute name");continue;case C.ATTRIB_NAME:"="===s?r.state=C.ATTRIB_VALUE:">"===s?(F(r,"Attribute without value"),r.attribValue=r.attribName,V(r),$(r)):E(s)?r.state=C.ATTRIB_NAME_SAW_WHITE:_(m,s)?r.attribName+=s:F(r,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if("="===s)r.state=C.ATTRIB_VALUE;else{if(E(s))continue;F(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",y(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===s?$(r):_(p,s)?(r.attribName=s,r.state=C.ATTRIB_NAME):(F(r,"Invalid attribute name"),r.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(E(s))continue;A(s)?(r.q=s,r.state=C.ATTRIB_VALUE_QUOTED):(r.opt.unquotedAttributeValues||D(r,"Unquoted attribute value"),r.state=C.ATTRIB_VALUE_UNQUOTED,r.attribValue=s);continue;case C.ATTRIB_VALUE_QUOTED:if(s!==r.q){"&"===s?r.state=C.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=s;continue}V(r),r.q="",r.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:E(s)?r.state=C.ATTRIB:">"===s?$(r):"/"===s?r.state=C.OPEN_TAG_SLASH:_(p,s)?(F(r,"No whitespace between attributes"),r.attribName=s,r.attribValue="",r.state=C.ATTRIB_NAME):F(r,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!g(s)){"&"===s?r.state=C.ATTRIB_VALUE_ENTITY_U:r.attribValue+=s;continue}V(r),">"===s?$(r):r.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(r.tagName)">"===s?M(r):_(m,s)?r.tagName+=s:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=C.SCRIPT):(E(s)||F(r,"Invalid tagname in closing tag"),r.state=C.CLOSE_TAG_SAW_WHITE);else{if(E(s))continue;T(p,s)?r.script?(r.script+="</"+s,r.state=C.SCRIPT):F(r,"Invalid tagname in closing tag."):r.tagName=s}continue;case C.CLOSE_TAG_SAW_WHITE:if(E(s))continue;">"===s?M(r):F(r,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var u,d;switch(r.state){case C.TEXT_ENTITY:u=C.TEXT,d="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:u=C.ATTRIB_VALUE_QUOTED,d="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:u=C.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===s){var f=B(r);r.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(f)?(r.entity="",r.state=u,r.write(f)):(r[d]+=f,r.entity="",r.state=u)}else _(r.entity.length?v:h,s)?r.entity+=s:(F(r,"Invalid character in entity name"),r[d]+="&"+r.entity+s,r.entity="",r.state=u);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(t){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),n=0,s=0,o=i.length;s<o;s++){var a=t[i[s]].length;if(a>r)switch(i[s]){case"textNode":O(t);break;case"cdata":y(t,"oncdata",t.cdata),t.cdata="";break;case"script":y(t,"onscript",t.script),t.script="";break;default:D(t,"Max buffer length exceeded: "+i[s])}n=Math.max(n,a)}var l=e.MAX_BUFFER_LENGTH-n;t.bufferCheckPosition=l+t.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;O(e=this),""!==e.cdata&&(y(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(y(e,"onscript",e.script),e.script="")}};try{t=require("stream").Stream}catch(e){t=function(){}}t||(t=function(){});var n=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function s(e,i){if(!(this instanceof s))return new s(e,i);t.apply(this),this._parser=new r(e,i),this.writable=!0,this.readable=!0;var o=this;this._parser.onend=function(){o.emit("end")},this._parser.onerror=function(e){o.emit("error",e),o._parser.error=null},this._decoder=null,n.forEach((function(e){Object.defineProperty(o,"on"+e,{get:function(){return o._parser["on"+e]},set:function(t){if(!t)return o.removeAllListeners(e),o._parser["on"+e]=t,t;o.on(e,t)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(t.prototype,{constructor:{value:s}}),s.prototype.write=function(e){if("function"==typeof f&&"function"==typeof f.isBuffer&&f.isBuffer(e)){if(!this._decoder){var t=c.I;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,i){var r=this;return r._parser["on"+e]||-1===n.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),t.prototype.on.call(r,e,i)};var o="[CDATA[",a="DOCTYPE",l="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",d={xml:l,xmlns:u},p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,h=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function E(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function A(e){return'"'===e||"'"===e}function g(e){return">"===e||E(e)}function _(e,t){return e.test(t)}function T(e,t){return!_(e,t)}var b,I,N,C=0;for(var w in e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var i=e.ENTITIES[t],r="number"==typeof i?String.fromCharCode(i):i;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[w]]=w;function L(e,t,i){e[t]&&e[t](i)}function y(e,t,i){e.textNode&&O(e),L(e,t,i)}function O(e){e.textNode=R(e.opt,e.textNode),e.textNode&&L(e,"ontext",e.textNode),e.textNode=""}function R(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function D(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,L(e,"onerror",t),e}function S(e){return e.sawRoot&&!e.closedRoot&&F(e,"Unclosed root tag"),e.state!==C.BEGIN&&e.state!==C.BEGIN_WHITESPACE&&e.state!==C.TEXT&&D(e,"Unexpected end"),O(e),e.c="",e.closed=!0,L(e,"onend"),r.call(e,e.strict,e.opt),e}function F(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&D(e,t)}function x(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,i=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(i.ns=t.ns),e.attribList.length=0,y(e,"onopentagstart",i)}function P(e,t){var i=e.indexOf(":")<0?["",e]:e.split(":"),r=i[0],n=i[1];return t&&"xmlns"===e&&(r="xmlns",n=""),{prefix:r,local:n}}function V(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=P(e.attribName,!0),i=t.prefix,r=t.local;if("xmlns"===i)if("xml"===r&&e.attribValue!==l)F(e,"xml: prefix must be bound to "+l+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==u)F(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var n=e.tag,s=e.tags[e.tags.length-1]||e;n.ns===s.ns&&(n.ns=Object.create(s.ns)),n.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,y(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function $(e,t){if(e.opt.xmlns){var i=e.tag,r=P(e.tagName);i.prefix=r.prefix,i.local=r.local,i.uri=i.ns[r.prefix]||"",i.prefix&&!i.uri&&(F(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),i.uri=r.prefix);var n=e.tags[e.tags.length-1]||e;i.ns&&n.ns!==i.ns&&Object.keys(i.ns).forEach((function(t){y(e,"onopennamespace",{prefix:t,uri:i.ns[t]})}));for(var s=0,o=e.attribList.length;s<o;s++){var a=e.attribList[s],l=a[0],c=a[1],u=P(l,!0),d=u.prefix,p=u.local,f=""===d?"":i.ns[d]||"",m={name:l,value:c,prefix:d,local:p,uri:f};d&&"xmlns"!==d&&!f&&(F(e,"Unbound namespace prefix: "+JSON.stringify(d)),m.uri=d),e.tag.attributes[l]=m,y(e,"onattribute",m)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),y(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=C.TEXT:e.state=C.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function M(e){if(!e.tagName)return F(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=C.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=C.SCRIPT);y(e,"onscript",e.script),e.script=""}var t=e.tags.length,i=e.tagName;e.strict||(i=i[e.looseCase]());for(var r=i;t--&&e.tags[t].name!==r;)F(e,"Unexpected close tag");if(t<0)return F(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=C.TEXT);e.tagName=i;for(var n=e.tags.length;n-- >t;){var s=e.tag=e.tags.pop();e.tagName=e.tag.name,y(e,"onclosetag",e.tagName);var o={};for(var a in s.ns)o[a]=s.ns[a];var l=e.tags[e.tags.length-1]||e;e.opt.xmlns&&s.ns!==l.ns&&Object.keys(s.ns).forEach((function(t){var i=s.ns[t];y(e,"onclosenamespace",{prefix:t,uri:i})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=C.TEXT}function B(e){var t,i=e.entity,r=i.toLowerCase(),n="";return e.ENTITIES[i]?e.ENTITIES[i]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(i=r).charAt(0)&&("x"===i.charAt(1)?(i=i.slice(2),n=(t=parseInt(i,16)).toString(16)):(i=i.slice(1),n=(t=parseInt(i,10)).toString(10))),i=i.replace(/^0+/,""),isNaN(t)||n.toLowerCase()!==i?(F(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function U(e,t){"<"===t?(e.state=C.OPEN_WAKA,e.startTagPosition=e.position):E(t)||(F(e,"Non-whitespace before first tag."),e.textNode=t,e.state=C.TEXT)}function k(e,t){var i="";return t<e.length&&(i=e.charAt(t)),i}C=e.STATE,String.fromCodePoint||(b=String.fromCharCode,I=Math.floor,N=function(){var e,t,i=[],r=-1,n=arguments.length;if(!n)return"";for(var s="";++r<n;){var o=Number(arguments[r]);if(!isFinite(o)||o<0||o>1114111||I(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?i.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,i.push(e,t)),(r+1===n||i.length>16384)&&(s+=b.apply(null,i),i.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N)}({}));var S=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(S||{});class F extends Error{constructor(e){super(`Invalid ${e.reason} '${e.segment}' in filename '${e.filename}'`,{cause:e})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function x(e){const t=(0,u.F)().files,i=t.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const t of i)if(e.includes(t))throw new F({segment:t,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(t.forbidden_filenames??[".htaccess"]).includes(e))throw new F({filename:e,segment:e,reason:"reserved name"});const r=e.indexOf(".",1),n=e.substring(0,-1===r?void 0:r);if((t.forbidden_filename_basenames??[]).includes(n))throw new F({filename:e,segment:n,reason:"reserved name"});const s=t.forbidden_filename_extensions??[".part",".filepart"];for(const t of s)if(e.length>t.length&&e.endsWith(t))throw new F({segment:t,reason:"extension",filename:e})}const P=["B","KB","MB","GB","TB","PB"],V=["B","KiB","MiB","GiB","TiB","PiB"];function $(e,t=!1,i=!1,r=!1){i=i&&!r,"string"==typeof e&&(e=Number(e));let n=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;n=Math.min((i?V.length:P.length)-1,n);const s=i?V[n]:P[n];let o=(e/Math.pow(r?1e3:1024,n)).toFixed(1);return!0===t&&0===n?("0.0"!==o?"< 1 ":"0 ")+(i?V[1]:P[1]):(o=n<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,d.lO)()),o+" "+s)}function M(e){return e instanceof Date?e.toISOString():String(e)}function B(e,t={}){const i={sortingMode:"basename",sortingOrder:"asc",...t};return function(e,t,i){i=i??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(i[t]??"asc")?1:-1)),n=Intl.Collator([(0,d.Z0)(),(0,d.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,i)=>{for(const[s,o]of t.entries()){const t=n.compare(M(o(e)),M(o(i)));if(0!==t)return t*r[s]}return 0}))}(e,[...i.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...i.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==i.sortingMode?[e=>e[i.sortingMode]??e.attributes[i.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename||"").lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],..."mtime"===i.sortingMode?["asc"===i.sortingOrder?"desc":"asc"]:[],..."mtime"!==i.sortingMode&&"basename"!==i.sortingMode?[i.sortingOrder]:[],i.sortingOrder,i.sortingOrder])}},42634:()=>{},46079:(e,i,r)=>{"use strict";var n=r(85471),s=r(53334),o=r(43627),a=r.n(o),l=r(21777),c=r(85168),u=r(61338),d=r(53429),p=r(59892),f=r(63814),m=r(71225),h=r(51651),v=r(60669);const E=(0,f.dC)("dav"),A=(0,v.UU)(E),g=e=>{A.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};(0,l.zo)(g),g((0,l.do)());const _=A,T=(0,r(35947).YK)().setApp("files_version").detectUser().build();var b=r(35810),I=r(81222),N=r(65043);const C={name:"BackupRestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var w=r(14486);const L=(0,w.A)(C,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon backup-restore-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,y={name:"DeleteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},O=(0,w.A)(y,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon delete-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,R={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},D=(0,w.A)(R,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,S={name:"FileCompareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},F=(0,w.A)(S,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-compare-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,18H6V16H10V18M10,14H6V12H10V14M10,1V2H6C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H10V23H12V1H10M20,8V20C20,21.11 19.11,22 18,22H14V20H18V11H14V9H18.5L14,4.5V2L20,8M16,14H14V12H16V14M16,18H14V16H16V18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,x={name:"ImageOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},P=(0,w.A)(x,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon image-off-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M22 20.7L3.3 2L2 3.3L3 4.3V19C3 20.1 3.9 21 5 21H19.7L20.7 22L22 20.7M5 19V6.3L12.6 13.9L11.1 15.8L9 13.1L6 17H15.7L17.7 19H5M8.8 5L6.8 3H19C20.1 3 21 3.9 21 5V17.2L19 15.2V5H8.8"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var V=r(16502),$=r(57505),M=r(72298),B=r(41944),U=r(4604),k=r(1522),G=r(59656);const H=(e,t)=>!!(e&t),X=(0,n.pM)({name:"Version",components:{NcActionLink:M.A,NcActionButton:$.A,NcAvatar:B.A,NcDateTime:U.A,NcListItem:k.A,BackupRestore:L,Download:D,FileCompare:F,Pencil:V.A,Delete:O,ImageOffOutline:P},directives:{tooltip:G.A},props:{version:{type:Object,required:!0},fileInfo:{type:Object,required:!0},isCurrent:{type:Boolean,default:!1},isFirstVersion:{type:Boolean,default:!1},loadPreview:{type:Boolean,default:!1},canView:{type:Boolean,default:!1},canCompare:{type:Boolean,default:!1}},emits:["click","compare","restore","delete","label-update-request"],data:()=>({previewLoaded:!1,previewErrored:!1,capabilities:(0,I.C)("core","capabilities",{files:{version_labeling:!1,version_deletion:!1}}),versionAuthor:""}),computed:{humanReadableSize(){return(0,b.v7)(this.version.size)},versionLabel(){const e=this.version.label??"";return this.isCurrent?""===e?(0,s.t)("files_versions","Current version"):`${e} (${(0,s.t)("files_versions","Current version")})`:this.isFirstVersion&&""===e?(0,s.t)("files_versions","Initial version"):e},versionHumanExplicitDate(){return(0,h.A)(this.version.mtime).format("LLLL")},downloadURL(){return this.isCurrent?(0,f.aU)()+(0,m.HS)("/remote.php/webdav",this.fileInfo.path,this.fileInfo.name):(0,f.aU)()+this.version.url},enableLabeling(){return!0===this.capabilities.files.version_labeling},enableDeletion(){return!0===this.capabilities.files.version_deletion},hasDeletePermissions(){return H(this.fileInfo.permissions,b.aX.DELETE)},hasUpdatePermissions(){return H(this.fileInfo.permissions,b.aX.UPDATE)},isDownloadable(){if(!(this.fileInfo.permissions&b.aX.READ))return!1;if("shared"===this.fileInfo.mountType){const e=this.fileInfo.shareAttributes.find((e=>"permissions"===e.scope&&"download"===e.key))||{};if(!1===e?.value)return!1}return!0}},created(){this.fetchDisplayName()},methods:{labelUpdate(){this.$emit("label-update-request")},restoreVersion(){this.$emit("restore",this.version)},async deleteVersion(){await this.$nextTick(),await this.$nextTick(),this.$emit("delete",this.version)},async fetchDisplayName(){if(this.versionAuthor=null,this.version.author)if(this.version.author===(0,l.HW)()?.uid)this.versionAuthor=(0,s.t)("files_versions","You");else try{const{data:e}=await N.Ay.post((0,f.Jv)("/displaynames"),{users:[this.version.author]});this.versionAuthor=e.users[this.version.author]}catch(e){T.warn("Could not load user display name",{error:e})}},click(){this.canView?this.$emit("click",{version:this.version}):window.location.href=this.downloadURL},compareVersion(){if(!this.canView)throw new Error("Cannot compare version of this file");this.$emit("compare",{version:this.version})},t:s.t}});var j=r(85072),z=r.n(j),q=r(97825),Y=r.n(q),W=r(77659),Q=r.n(W),K=r(55056),Z=r.n(K),J=r(10540),ee=r.n(J),te=r(41113),ie=r.n(te),re=r(25359),ne={};ne.styleTagTransform=ie(),ne.setAttributes=Z(),ne.insert=Q().bind(null,"head"),ne.domAPI=Y(),ne.insertStyleElement=ee(),z()(re.A,ne),re.A&&re.A.locals&&re.A.locals;const se=(0,w.A)(X,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcListItem",{staticClass:"version",attrs:{"force-display-actions":!0,"actions-aria-label":e.t("files_versions","Actions for version from {versionHumanExplicitDate}",{versionHumanExplicitDate:e.versionHumanExplicitDate}),"data-files-versions-version":e.version.fileVersion},on:{click:e.click},scopedSlots:e._u([{key:"icon",fn:function(){return[e.loadPreview||e.previewLoaded?e.version.previewUrl&&!e.previewErrored?t("img",{staticClass:"version__image",attrs:{src:e.version.previewUrl,alt:"",decoding:"async",fetchpriority:"low",loading:"lazy"},on:{load:function(t){e.previewLoaded=!0},error:function(t){e.previewErrored=!0}}}):t("div",{staticClass:"version__image"},[t("ImageOffOutline",{attrs:{size:20}})],1):t("div",{staticClass:"version__image"})]},proxy:!0},{key:"name",fn:function(){return[t("div",{staticClass:"version__info"},[e.versionLabel?t("div",{staticClass:"version__info__label",attrs:{"data-cy-files-version-label":"",title:e.versionLabel}},[e._v("\n\t\t\t\t"+e._s(e.versionLabel)+"\n\t\t\t")]):e._e(),e._v(" "),e.versionAuthor?t("div",{staticClass:"version__info",attrs:{"data-cy-files-version-author-name":""}},[e.versionLabel?t("span",[e._v("•")]):e._e(),e._v(" "),t("NcAvatar",{staticClass:"avatar",attrs:{user:e.version.author,size:20,"disable-menu":"","disable-tooltip":"","show-user-status":!1}}),e._v(" "),t("div",{staticClass:"version__info__author_name",attrs:{title:e.versionAuthor}},[e._v("\n\t\t\t\t\t"+e._s(e.versionAuthor)+"\n\t\t\t\t")])],1):e._e()])]},proxy:!0},{key:"subname",fn:function(){return[t("div",{staticClass:"version__info version__info__subline"},[t("NcDateTime",{staticClass:"version__info__date",attrs:{"relative-time":"short",timestamp:e.version.mtime}}),e._v(" "),t("span",[e._v("•")]),e._v(" "),t("span",[e._v(e._s(e.humanReadableSize))])],1)]},proxy:!0},{key:"actions",fn:function(){return[e.enableLabeling&&e.hasUpdatePermissions?t("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"label","close-after-click":!0},on:{click:e.labelUpdate},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Pencil",{attrs:{size:22}})]},proxy:!0}],null,!1,3072546167)},[e._v("\n\t\t\t"+e._s(""===e.version.label?e.t("files_versions","Name this version"):e.t("files_versions","Edit version name"))+"\n\t\t")]):e._e(),e._v(" "),!e.isCurrent&&e.canView&&e.canCompare?t("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"compare","close-after-click":!0},on:{click:e.compareVersion},scopedSlots:e._u([{key:"icon",fn:function(){return[t("FileCompare",{attrs:{size:22}})]},proxy:!0}],null,!1,1958207595)},[e._v("\n\t\t\t"+e._s(e.t("files_versions","Compare to current version"))+"\n\t\t")]):e._e(),e._v(" "),!e.isCurrent&&e.hasUpdatePermissions?t("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"restore","close-after-click":!0},on:{click:e.restoreVersion},scopedSlots:e._u([{key:"icon",fn:function(){return[t("BackupRestore",{attrs:{size:22}})]},proxy:!0}],null,!1,2239038444)},[e._v("\n\t\t\t"+e._s(e.t("files_versions","Restore version"))+"\n\t\t")]):e._e(),e._v(" "),e.isDownloadable?t("NcActionLink",{attrs:{"data-cy-files-versions-version-action":"download",href:e.downloadURL,"close-after-click":!0,download:e.downloadURL},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Download",{attrs:{size:22}})]},proxy:!0}],null,!1,927269758)},[e._v("\n\t\t\t"+e._s(e.t("files_versions","Download version"))+"\n\t\t")]):e._e(),e._v(" "),!e.isCurrent&&e.enableDeletion&&e.hasDeletePermissions?t("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"delete","close-after-click":!0},on:{click:e.deleteVersion},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Delete",{attrs:{size:22}})]},proxy:!0}],null,!1,2429175571)},[e._v("\n\t\t\t"+e._s(e.t("files_versions","Delete version"))+"\n\t\t")]):e._e()]},proxy:!0}])})}),[],!1,null,"7fcf8237",null).exports,oe=(0,n.pM)({name:"VirtualScrolling",props:{sections:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},headerHeight:{type:Number,default:75},renderDistance:{type:Number,default:.5},bottomBufferRatio:{type:Number,default:2},scrollToKey:{type:String,default:""}},data:()=>({scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}),computed:{visibleSections(){T.debug("[VirtualScrolling] Computing visible section",{sections:this.sections});const e=this.containerHeight,t=this.scrollPosition,i=t+e;let r=0,n=0;const s=this.sections.map((s=>(n+=this.headerHeight,{...s,rows:s.rows.reduce(((s,o)=>{r=n,n+=o.height;let a=0;return n<t?a=(t-n)/e:r>i&&(a=(r-i)/e),a>this.renderDistance?s:[...s,{...o,distance:a}]}),[])}))).filter((e=>e.rows.length>0)),o=s.flatMap((e=>{let{rows:t}=e;return t})).flatMap((e=>{let{items:t}=e;return t})),a=this._rowIdToKeyMap;o.forEach((e=>e.key=a[e.id]));const l=o.map((e=>{let{key:t}=e;return t})).filter((e=>void 0!==e)),c=Object.values(a).filter((e=>!l.includes(e)));return o.filter((e=>{let{key:t}=e;return void 0===t})).forEach((e=>e.key=c.pop()??Math.random().toString(36).substr(2))),this._rowIdToKeyMap=o.reduce(((e,t)=>{let{id:i,key:r}=t;return{...e,[`${i}`]:r}}),{}),s},totalHeight(){return this.sections.map((e=>this.headerHeight+e.height)).reduce(((e,t)=>e+t),0)+0},paddingTop(){if(0===this.visibleSections.length)return 0;let e=0;for(const t of this.sections)if(t.key===this.visibleSections[0].rows[0].sectionKey){for(const i of t.rows){if(i.key===this.visibleSections[0].rows[0].key)return e;e+=i.height}e+=this.headerHeight}else e+=this.headerHeight+t.height;return e},rowsContainerStyle(){return{height:`${this.totalHeight}px`,paddingTop:`${this.paddingTop}px`}},isNearBottom(){const e=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.totalHeight-e},container(){return T.debug("[VirtualScrolling] Computing container"),null!==this.containerElement?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom(e){T.debug("[VirtualScrolling] isNearBottom changed",{value:e}),e&&this.$emit("need-content")},visibleSections(){this.isNearBottom&&this.$emit("need-content")},scrollToKey(e){let t=0;for(const i of this.sections){if(i.key===e)break;t+=this.headerHeight+i.height}T.debug("[VirtualScrolling] Scrolling to",{currentRowTopDistanceFromTop:t}),this.container.scrollTo({top:t,behavior:"smooth"})}},beforeCreate(){this._rowIdToKeyMap={}},mounted(){this.resizeObserver=new ResizeObserver((e=>{for(const t of e){const e=t.contentRect;t.target===this.container&&(this.containerHeight=e.height),t.target.classList.contains("vs-rows-container")&&(this.rowsContainerHeight=e.height)}})),this.useWindow?(window.addEventListener("resize",this.updateContainerSize,{passive:!0}),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition,{passive:!0})},beforeDestroy(){this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),this.resizeObserver?.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition(){this._onScrollHandle??=requestAnimationFrame((()=>{this._onScrollHandle=null,this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop}))},updateContainerSize(){this.containerHeight=window.innerHeight}}});var ae=r(26201),le={};le.styleTagTransform=ie(),le.setAttributes=Z(),le.insert=Q().bind(null,"head"),le.domAPI=Y(),le.insertStyleElement=ee(),z()(ae.A,le),ae.A&&ae.A.locals&&ae.A.locals;const ce=(0,w.A)(oe,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.useWindow||null!==e.containerElement?t("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:e.rowsContainerStyle},[e._t("default",null,{visibleSections:e.visibleSections}),e._v(" "),e._t("loader")],2):t("div",{ref:"container",staticClass:"vs-container"},[t("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:e.rowsContainerStyle},[e._t("default",null,{visibleSections:e.visibleSections}),e._v(" "),e._t("loader")],2)])}),[],!1,null,"49a1883f",null).exports;var ue=r(65659),de=r(94219),pe=r(82182);const fe=(0,n.pM)({name:"VersionLabelDialog",components:{NcDialog:de.A,NcTextField:pe.A},props:{open:{type:Boolean,default:!1},versionLabel:{type:String,default:""}},data:()=>({editedVersionLabel:""}),computed:{dialogButtons(){const e=[];return""===this.versionLabel.trim()?e.push({label:(0,s.t)("files_versions","Cancel")}):e.push({label:(0,s.t)("files_versions","Remove version name"),type:"error",nativeType:"reset",callback:()=>{this.setVersionLabel("")}}),[...e,{label:(0,s.t)("files_versions","Save version name"),type:"primary",nativeType:"submit",icon:ue}]}},watch:{versionLabel:{immediate:!0,handler(e){this.editedVersionLabel=e??""}},open:{immediate:!0,handler(e){e&&this.$nextTick((()=>this.$refs.labelInput.focus())),this.editedVersionLabel=this.versionLabel}}},methods:{setVersionLabel(e){this.$emit("label-update",e)},t:s.t}});var me=r(48225),he={};he.styleTagTransform=ie(),he.setAttributes=Z(),he.insert=Q().bind(null,"head"),he.domAPI=Y(),he.insertStyleElement=ee(),z()(me.A,he),me.A&&me.A.locals&&me.A.locals;const ve={name:"VersionTab",components:{Version:se,VirtualScrolling:ce,VersionLabelDialog:(0,w.A)(fe,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{attrs:{buttons:e.dialogButtons,"content-classes":"version-label-modal","is-form":"",open:e.open,size:"normal",name:e.t("files_versions","Name this version")},on:{"update:open":function(t){return e.$emit("update:open",t)},submit:function(t){return e.setVersionLabel(e.editedVersionLabel)}}},[t("NcTextField",{ref:"labelInput",staticClass:"version-label-modal__input",attrs:{label:e.t("files_versions","Version name"),placeholder:e.t("files_versions","Version name"),value:e.editedVersionLabel},on:{"update:value":function(t){e.editedVersionLabel=t}}}),e._v(" "),t("p",{staticClass:"version-label-modal__info"},[e._v("\n\t\t"+e._s(e.t("files_versions","Named versions are persisted, and excluded from automatic cleanups when your storage quota is full."))+"\n\t")])],1)}),[],!1,null,"096a95fb",null).exports,NcLoadingIcon:p.A},setup:()=>({isMobile:(0,d.al)()}),data:()=>({fileInfo:null,isActive:!1,versions:[],loading:!1,showVersionLabelForm:!1,editedVersion:null}),computed:{sections(){return[{key:"versions",rows:this.orderedVersions.map((e=>({key:e.mtime,height:68,sectionKey:"versions",items:[e]}))),height:68*this.orderedVersions.length}]},orderedVersions(){return[...this.versions].sort(((e,t)=>e.mtime===this.fileInfo.mtime?-1:t.mtime===this.fileInfo.mtime?1:t.mtime-e.mtime))},initialVersionMtime(){return this.versions.map((e=>e.mtime)).reduce(((e,t)=>Math.min(e,t)))},viewerFileInfo(){let e="";return 1&this.fileInfo.permissions&&(e+="R"),2&this.fileInfo.permissions&&(e+="W"),8&this.fileInfo.permissions&&(e+="D"),{...this.fileInfo,mime:this.fileInfo.mimetype,basename:this.fileInfo.name,filename:this.fileInfo.path+"/"+this.fileInfo.name,permissions:e,fileid:this.fileInfo.id}},canView(){return window.OCA.Viewer?.mimetypesCompare?.includes(this.fileInfo.mimetype)},canCompare(){return!this.isMobile}},mounted(){(0,u.B1)("files_versions:restore:restored",this.fetchVersions)},beforeUnmount(){(0,u.al)("files_versions:restore:restored",this.fetchVersions)},methods:{async update(e){this.fileInfo=e,this.resetState(),this.fetchVersions()},async setIsActive(e){this.isActive=e},async fetchVersions(){try{this.loading=!0,this.versions=await async function(e){const t=`/versions/${(0,l.HW)()?.uid}/versions/${e.id}`;try{return(await _.getDirectoryContents(t,{data:'<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:"\n\txmlns:oc="http://owncloud.org/ns"\n\txmlns:nc="http://nextcloud.org/ns"\n\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t<d:prop>\n\t\t<d:getcontentlength />\n\t\t<d:getcontenttype />\n\t\t<d:getlastmodified />\n\t\t<d:getetag />\n\t\t<nc:version-label />\n\t\t<nc:version-author />\n\t\t<nc:has-preview />\n\t</d:prop>\n</d:propfind>',details:!0})).data.filter((e=>{let{mime:t}=e;return""!==t})).map((t=>function(e,t){const i=1e3*(0,h.A)(e.lastmod).unix();let r="";return r=i===t.mtime?(0,f.Jv)("/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0&forceIcon=1&mimeFallback=1",{fileId:t.id,fileEtag:t.etag}):(0,f.Jv)("/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1",{file:(0,m.HS)(t.path,t.name),fileVersion:e.basename}),{fileId:t.id,label:e.props["version-label"]&&String(e.props["version-label"]),author:e.props["version-author"]??null,filename:e.filename,basename:(0,h.A)(i).format("LLL"),mime:e.mime,etag:`${e.props.getetag}`,size:e.size,type:e.type,mtime:i,permissions:"R",previewUrl:r,url:(0,m.HS)("/remote.php/dav",e.filename),source:(0,f.dC)("dav")+(0,m.O0)(e.filename),fileVersion:e.basename}}(t,e)))}catch(e){throw T.error("Could not fetch version",{exception:e}),e}}(this.fileInfo)}finally{this.loading=!1}},async handleRestore(e){const i=this.fileInfo;this.fileInfo={...this.fileInfo,size:e.size,mtime:e.mtime};const r={preventDefault:!1,fileInfo:this.fileInfo,version:e};if((0,u.Ic)("files_versions:restore:requested",r),!r.preventDefault)try{await async function(e){try{T.debug("Restoring version",{url:e.url}),await _.moveFile(`/versions/${(0,l.HW)()?.uid}/versions/${e.fileId}/${e.fileVersion}`,`/versions/${(0,l.HW)()?.uid}/restore/target`)}catch(e){throw T.error("Could not restore version",{exception:e}),e}}(e),e.label?(0,c.Te)(t("files_versions",`${e.label} restored`)):e.mtime===this.initialVersionMtime?(0,c.Te)(t("files_versions","Initial version restored")):(0,c.Te)(t("files_versions","Version restored")),(0,u.Ic)("files_versions:restore:restored",e)}catch(r){this.fileInfo=i,(0,c.Qg)(t("files_versions","Could not restore version")),(0,u.Ic)("files_versions:restore:failed",e)}},handleLabelUpdateRequest(e){this.showVersionLabelForm=!0,this.editedVersion=e},async handleLabelUpdate(e){const t=this.editedVersion.label;this.editedVersion.label=e,this.showVersionLabelForm=!1;try{await async function(e,t){return await _.customRequest(e.filename,{method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:"\n\t\t\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t\t<d:set>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<nc:version-label>${t}</nc:version-label>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:set>\n\t\t\t\t\t</d:propertyupdate>`})}(this.editedVersion,e),this.editedVersion=null}catch(e){this.editedVersion.label=t,(0,c.Qg)(this.t("files_versions","Could not set version label")),logger.error("Could not set version label",{exception:e})}},async handleDelete(e){const i=this.versions.indexOf(e);this.versions.splice(i,1);try{await async function(e){await _.deleteFile(e.filename)}(e)}catch(i){this.versions.push(e),(0,c.Qg)(t("files_versions","Could not delete version"))}},resetState(){this.$set(this,"versions",[])},openVersion(e){let{version:t}=e;if(t.mtime===this.fileInfo.mtime)return void OCA.Viewer.open({fileInfo:this.viewerFileInfo});const i=this.versions.map((e=>({...e,filename:e.mtime===this.fileInfo.mtime?a().join("files",(0,l.HW)()?.uid??"",this.fileInfo.path,this.fileInfo.name):e.filename,previewUrl:void 0})));OCA.Viewer.open({fileInfo:i.find((e=>e.source===t.source)),enableSidebar:!1})},compareVersion(e){let{version:t}=e;const i=this.versions.map((e=>({...e,previewUrl:void 0})));OCA.Viewer.compare(this.viewerFileInfo,i.find((e=>e.source===t.source)))}}};var Ee=r(64956),Ae={};Ae.styleTagTransform=ie(),Ae.setAttributes=Z(),Ae.insert=Q().bind(null,"head"),Ae.domAPI=Y(),Ae.insertStyleElement=ee(),z()(Ee.A,Ae),Ee.A&&Ee.A.locals&&Ee.A.locals;const ge=(0,w.A)(ve,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"versions-tab__container"},[t("VirtualScrolling",{attrs:{sections:e.sections,"header-height":0},scopedSlots:e._u([{key:"default",fn:function(i){let{visibleSections:r}=i;return[t("ul",{attrs:{"aria-label":e.t("files_versions","File versions"),"data-files-versions-versions-list":""}},[1===r.length?e._l(r[0].rows,(function(i){return t("Version",{key:i.items[0].mtime,attrs:{"can-view":e.canView,"can-compare":e.canCompare,"load-preview":e.isActive,version:i.items[0],"file-info":e.fileInfo,"is-current":i.items[0].mtime===e.fileInfo.mtime,"is-first-version":i.items[0].mtime===e.initialVersionMtime},on:{click:e.openVersion,compare:e.compareVersion,restore:e.handleRestore,"label-update-request":function(t){return e.handleLabelUpdateRequest(i.items[0])},delete:e.handleDelete}})})):e._e()],2),e._v(" "),e.loading?t("NcLoadingIcon",{staticClass:"files-list-viewer__loader",attrs:{slot:"loader"},slot:"loader"}):e._e()]}}])}),e._v(" "),e.editedVersion?t("VersionLabelDialog",{attrs:{open:e.showVersionLabelForm,"version-label":e.editedVersion.label},on:{"update:open":function(t){e.showVersionLabelForm=t},"label-update":e.handleLabelUpdate}}):e._e()],1)}),[],!1,null,null,null).exports;var _e=r(80284);n.Ay.prototype.t=s.Tl,n.Ay.prototype.n=s.zw,n.Ay.use(_e.Ay);const Te=n.Ay.extend(ge);let be=null;window.addEventListener("DOMContentLoaded",(function(){void 0!==OCA.Files?.Sidebar&&OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab({id:"version_vue",name:(0,s.Tl)("files_versions","Versions"),iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-backup-restore" viewBox="0 0 24 24"><path d="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" /></svg>',async mount(e,t,i){be&&be.$destroy(),be=new Te({parent:i}),await be.update(t),be.$mount(e)},update(e){be.update(e)},setIsActive(e){be&&be.setIsActive(e)},destroy(){be.$destroy(),be=null},enabled:e=>!(e?.isDirectory()??1)}))}))},48225:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(71354),n=i.n(r),s=i(76314),o=i.n(s)()(n());o.push([e.id,".version-label-modal__info[data-v-096a95fb]{color:var(--color-text-maxcontrast);margin-block:calc(3*var(--default-grid-baseline))}.version-label-modal__input[data-v-096a95fb]{margin-block-start:calc(2*var(--default-grid-baseline))}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VersionLabelDialog.vue"],names:[],mappings:"AAEC,4CACC,mCAAA,CACA,iDAAA,CAGD,6CACC,uDAAA",sourcesContent:["\n.version-label-modal {\n\t&__info {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tmargin-block: calc(3 * var(--default-grid-baseline));\n\t}\n\n\t&__input {\n\t\tmargin-block-start: calc(2 * var(--default-grid-baseline));\n\t}\n}\n"],sourceRoot:""}]);const a=o},59169:()=>{},63779:()=>{},64956:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(71354),n=i.n(r),s=i(76314),o=i.n(s)()(n());o.push([e.id,".versions-tab__container{height:100%}","",{version:3,sources:["webpack://./apps/files_versions/src/views/VersionTab.vue"],names:[],mappings:"AACA,yBACC,WAAA",sourcesContent:["\n.versions-tab__container {\n\theight: 100%;\n}\n"],sourceRoot:""}]);const a=o},77199:()=>{},86833:()=>{}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=n,e=[],o.O=(t,i,r,n)=>{if(!i){var s=1/0;for(u=0;u<e.length;u++){i=e[u][0],r=e[u][1],n=e[u][2];for(var a=!0,l=0;l<i.length;l++)(!1&n||s>=n)&&Object.keys(o.O).every((e=>o.O[e](i[l])))?i.splice(l--,1):(a=!1,n<s&&(s=n));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[i,r,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,i)=>(o.f[i](e,t),t)),[])),o.u=e=>e+"-"+e+".js?v="+{640:"ce8e671e5f815db1f8e8",3580:"6c010e0aed50d3c00035",5771:"a4e2a98efcfb7393c5bd",5810:"e0ecfcd31fb108c51bfd"}[e],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="nextcloud:",o.l=(e,t,n,s)=>{if(i[e])i[e].push(t);else{var a,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",r+n),a.src=e),i[e]=[t];var p=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);var n=i[e];if(delete i[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(r))),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=2250,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=i[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={2250:0,5810:0};o.f.j=(t,i)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var n=new Promise(((i,n)=>r=e[t]=[i,n]));i.push(r[2]=n);var s=o.p+o.u(t),a=new Error;o.l(s,(i=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+s+")",a.name="ChunkLoadError",a.type=n,a.request=s,r[1](a)}}),"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,i)=>{var r,n,s=i[0],a=i[1],l=i[2],c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(i);c<s.length;c++)n=s[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(u)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),o.nc=void 0;var a=o.O(void 0,[4208],(()=>o(46079)));a=o.O(a)})();
+//# sourceMappingURL=files_versions-files_versions.js.map?v=49269f59bc014c6b54bc \ No newline at end of file