diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-12 18:43:09 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-04-13 06:08:39 +0000 |
commit | 225d6e2dcf6ae330161ebd968afce48be55f5666 (patch) | |
tree | 914a4e84c651799b9e912f01cb67b743af699e3c /dist/files-sidebar.js | |
parent | f37b29eb2da66c66fd3752209c9e552948e35ca1 (diff) | |
download | nextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.tar.gz nextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.zip |
feat(files): better breakpoints and sidebar responsive design
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'dist/files-sidebar.js')
-rw-r--r-- | dist/files-sidebar.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/files-sidebar.js b/dist/files-sidebar.js index c1ff3b77396..ae0165a0524 100644 --- a/dist/files-sidebar.js +++ b/dist/files-sidebar.js @@ -1,3 +1,3 @@ /*! For license information please see files-sidebar.js.LICENSE.txt */ -!function(){var e,n={28011:function(e,n,i){"use strict";var r=i(20144),o=i(31352),s=i(65358),a=i(19755),l=i.n(a),u=i(4820),c=i(78595),f=i(80351),d=i.n(f),p=i(41922),h=i(10250),m=i.n(h),v=i(45400),b=i.n(v),g=i(93455),y=i.n(g);function j(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,r)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){j(o,i,r,s,a,"next",t)}function a(t){j(o,i,r,s,a,"throw",t)}s(void 0)}))}}function A(t){return S.apply(this,arguments)}function S(){return(S=w(regeneratorRuntime.mark((function t(e){var n,i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,u.default)({method:"PROPFIND",url:e,data:'<?xml version="1.0"?>\n\t\t\t<d:propfind xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>'});case 2:return n=t.sent,i=OCA.Files.App.fileList.filesClient._client.parseMultiStatus(n.data),(r=OCA.Files.App.fileList.filesClient._parseFileInfo(i[0])).get=function(t){return r[t]},r.isDirectory=function(){return"httpd/unix-directory"===r.mimetype},t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=i(62574);function _(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,r)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){_(o,i,r,s,a,"next",t)}function a(t){_(o,i,r,s,a,"throw",t)}s(void 0)}))}}var k={name:"SidebarTab",components:{NcAppSidebarTab:i.n(C)(),NcEmptyContent:y()},props:{fileInfo:{type:Object,default:function(){},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:function(){}}},data:function(){return{loading:!0}},computed:{activeTab:function(){return this.$parent.activeTab}},watch:{fileInfo:function(t,e){var n=this;return O(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t.id===e.id){i.next=5;break}return n.loading=!0,i.next=4,n.onUpdate(n.fileInfo);case 4:n.loading=!1;case 5:case"end":return i.stop()}}),i)})))()}},mounted:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.onMount(t.$refs.mount,t.fileInfo,t.$refs.tab);case 3:t.loading=!1;case 4:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onDestroy();case 2:case"end":return e.stop()}}),e)})))()}},T=i(51900),x=(0,T.Z)(k,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports,I={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:function(){},required:!0}},watch:{fileInfo:function(t){this.setFileInfo(t)}},mounted:function(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo:function(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}},F=(0,T.Z)(I,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports,z=i(25108);function E(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,r)}function L(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){E(o,i,r,s,a,"next",t)}function a(t){E(o,i,r,s,a,"throw",t)}s(void 0)}))}}var P={name:"Sidebar",components:{NcActionButton:b(),NcAppSidebar:m(),NcEmptyContent:y(),LegacyView:F,SidebarTab:x},data:function(){return{Sidebar:OCA.Files.Sidebar.state,error:null,loading:!0,fileInfo:null,starLoading:!1,isFullScreen:!1,hasLowHeight:!1}},computed:{file:function(){return this.Sidebar.file},tabs:function(){return this.Sidebar.tabs},views:function(){return this.Sidebar.views},davPath:function(){var t=OC.getCurrentUser().uid;return OC.linkToRemote("dav/files/".concat(t).concat((0,s.Ec)(this.file)))},activeTab:function(){return this.Sidebar.activeTab},subtitle:function(){return"".concat(this.size,", ").concat(this.time)},time:function(){return OC.Util.relativeModifiedDate(this.fileInfo.mtime)},fullTime:function(){return d()(this.fileInfo.mtime).format("LLL")},size:function(){return OC.Util.humanFileSize(this.fileInfo.size)},background:function(){return this.getPreviewIfAny(this.fileInfo)},appSidebar:function(){return this.fileInfo?{"data-mimetype":this.fileInfo.mimetype,"star-loading":this.starLoading,active:this.activeTab,background:this.background,class:{"app-sidebar--has-preview":this.fileInfo.hasPreview&&!this.isFullScreen,"app-sidebar--full":this.isFullScreen},compact:this.hasLowHeight||!this.fileInfo.hasPreview||this.isFullScreen,loading:this.loading,starred:this.fileInfo.isFavourited,subtitle:this.subtitle,subtitleTooltip:this.fullTime,title:this.fileInfo.name,titleTooltip:this.fileInfo.name}:this.error?{key:"error",subtitle:"",title:""}:{loading:this.loading,subtitle:"",title:""}},defaultAction:function(){return this.fileInfo&&OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.getDefaultFileAction&&OCA.Files.App.fileList.fileActions.getDefaultFileAction(this.fileInfo.mimetype,this.fileInfo.type,OC.PERMISSION_READ)},defaultActionListener:function(){return this.defaultAction?"figure-click":null},isSystemTagsEnabled:function(){return OCA&&"SystemTags"in OCA}},created:function(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy:function(){window.removeEventListener("resize",this.handleWindowResize)},methods:{canDisplay:function(t){return t.enabled(this.fileInfo)},resetData:function(){var t=this;this.error=null,this.fileInfo=null,this.$nextTick((function(){t.$refs.tabs&&t.$refs.tabs.updateTabs()}))},getPreviewIfAny:function(t){return t.hasPreview&&!this.isFullScreen?OC.generateUrl("/core/preview?fileId=".concat(t.id,"&x=").concat(screen.width,"&y=").concat(screen.height,"&a=true")):this.getIconUrl(t)},getIconUrl:function(t){var e=t.mimetype||"application/octet-stream";return"httpd/unix-directory"===e?"shared"===t.mountType||"shared-root"===t.mountType?OC.MimeType.getIconUrl("dir-shared"):"external-root"===t.mountType?OC.MimeType.getIconUrl("dir-external"):void 0!==t.mountType&&""!==t.mountType?OC.MimeType.getIconUrl("dir-"+t.mountType):t.shareTypes&&(t.shareTypes.indexOf(p.D.SHARE_TYPE_LINK)>-1||t.shareTypes.indexOf(p.D.SHARE_TYPE_EMAIL)>-1)?OC.MimeType.getIconUrl("dir-public"):t.shareTypes&&t.shareTypes.length>0?OC.MimeType.getIconUrl("dir-shared"):OC.MimeType.getIconUrl("dir"):OC.MimeType.getIconUrl(e)},setActiveTab:function(t){OCA.Files.Sidebar.setActiveTab(t)},toggleStarred:function(e){var n=this;return L(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,n.starLoading=!0,i.next=4,(0,u.default)({method:"PROPPATCH",url:n.davPath,data:'<?xml version="1.0"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t\t\t\t\t\t'.concat(e?"<d:set>":"<d:remove>","\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t").concat(e?"</d:set>":"</d:remove>","\n\t\t\t\t\t\t</d:propertyupdate>")});case 4:OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.triggerAction("Favorite",OCA.Files.App.fileList.getModelForFile(n.fileInfo.name),OCA.Files.App.fileList),i.next=11;break;case 7:i.prev=7,i.t0=i.catch(0),OC.Notification.showTemporary(t("files","Unable to change the favourite state of the file")),z.error("Unable to change favourite state",i.t0);case 11:n.starLoading=!1;case 12:case"end":return i.stop()}}),i,null,[[0,7]])})))()},onDefaultAction:function(){this.defaultAction&&this.defaultAction.action(this.fileInfo.name,{fileInfo:this.fileInfo,dir:this.fileInfo.dir,fileList:OCA.Files.App.fileList,$file:l()("body")})},toggleTags:function(){OCA.SystemTags&&OCA.SystemTags.View&&OCA.SystemTags.View.toggle()},open:function(e){var n=this;return L(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n.Sidebar.file=e,!e||""===e.trim()){i.next=21;break}return n.error=null,n.loading=!0,i.prev=4,i.next=7,A(n.davPath);case 7:n.fileInfo=i.sent,n.fileInfo.dir=n.file.split("/").slice(0,-1).join("/"),n.views.forEach((function(t){t.setFileInfo(n.fileInfo)})),n.$nextTick((function(){n.$refs.tabs&&n.$refs.tabs.updateTabs()})),i.next=18;break;case 13:throw i.prev=13,i.t0=i.catch(4),n.error=t("files","Error while loading the file data"),z.error("Error while loading the file data",i.t0),new Error(i.t0);case 18:return i.prev=18,n.loading=!1,i.finish(18);case 21:case"end":return i.stop()}}),i,null,[[4,13,18,21]])})))()},close:function(){this.Sidebar.file="",this.resetData()},setFullScreenMode:function(t){var e,n,i,r;this.isFullScreen=t,t?(null===(e=document.querySelector("#content"))||void 0===e?void 0:e.classList.add("with-sidebar--full"))||null===(n=document.querySelector("#content-vue"))||void 0===n||n.classList.add("with-sidebar--full"):(null===(i=document.querySelector("#content"))||void 0===i?void 0:i.classList.remove("with-sidebar--full"))||null===(r=document.querySelector("#content-vue"))||void 0===r||r.classList.remove("with-sidebar--full")},handleOpening:function(){(0,c.j8)("files:sidebar:opening")},handleOpened:function(){(0,c.j8)("files:sidebar:opened")},handleClosing:function(){(0,c.j8)("files:sidebar:closing")},handleClosed:function(){(0,c.j8)("files:sidebar:closed")},handleWindowResize:function(){this.hasLowHeight=document.documentElement.clientHeight<1024}}},R=i(93379),M=i.n(R),D=i(7795),U=i.n(D),B=i(90569),q=i.n(B),N=i(3565),$=i.n(N),H=i(19216),V=i.n(H),Z=i(44589),W=i.n(Z),K=i(88215),Y={};Y.styleTagTransform=W(),Y.setAttributes=$(),Y.insert=q().bind(null,"head"),Y.domAPI=U(),Y.insertStyleElement=V(),M()(K.Z,Y),K.Z&&K.Z.locals&&K.Z.locals;var G=(0,T.Z)(P,(function(){var t=this,e=t._self._c;return t.file?e("NcAppSidebar",t._b({ref:"sidebar",attrs:{"force-menu":!0,tabindex:"0"},on:t._d({close:t.close,"update:active":t.setActiveTab,"update:starred":t.toggleStarred,opening:t.handleOpening,opened:t.handleOpened,closing:t.handleClosing,closed:t.handleClosed},[t.defaultActionListener,function(e){return e.stopPropagation(),e.preventDefault(),t.onDefaultAction.apply(null,arguments)}]),scopedSlots:t._u([t.fileInfo?{key:"description",fn:function(){return t._l(t.views,(function(n){return e("LegacyView",{key:n.cid,attrs:{component:n,"file-info":t.fileInfo}})}))},proxy:!0}:null,t.fileInfo?{key:"secondary-actions",fn:function(){return[t.isSystemTagsEnabled?e("NcActionButton",{attrs:{"close-after-click":!0,icon:"icon-tag"},on:{click:t.toggleTags}},[t._v("\n\t\t\t"+t._s(t.t("files","Tags"))+"\n\t\t")]):t._e()]},proxy:!0}:null],null,!0)},"NcAppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),t.error?e("NcEmptyContent",{attrs:{icon:"icon-error"}},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t.fileInfo?t._l(t.tabs,(function(n){return[n.enabled(t.fileInfo)?e("SidebarTab",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],key:n.id,attrs:{id:n.id,name:n.name,icon:n.icon,"on-mount":n.mount,"on-update":n.update,"on-destroy":n.destroy,"on-scroll-bottom-reached":n.scrollBottomReached,"file-info":t.fileInfo},scopedSlots:t._u([void 0!==n.iconSvg?{key:"icon",fn:function(){return[e("span",{staticClass:"svg-icon",domProps:{innerHTML:t._s(n.iconSvg)}})]},proxy:!0}:null],null,!0)}):t._e()]})):t._e()],2):t._e()}),[],!1,null,"1b9af3ae",null),J=G.exports,Q=i(25108);function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function tt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,et(i.key),i)}}function et(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==X(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===X(e)?e:String(e)}var nt=function(){function t(){var e,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,i=void 0,(n=et(n="_state"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this._state={},this._state.tabs=[],this._state.views=[],this._state.file="",this._state.activeTab="",Q.debug("OCA.Files.Sidebar initialized")}var e,n;return e=t,(n=[{key:"state",get:function(){return this._state}},{key:"registerTab",value:function(t){return this._state.tabs.findIndex((function(e){return e.id===t.id}))>-1?(Q.error("An tab with the same id ".concat(t.id," already exists"),t),!1):(this._state.tabs.push(t),!0)}},{key:"registerSecondaryView",value:function(t){return this._state.views.findIndex((function(e){return e.id===t.id}))>-1?(Q.error("A similar view already exists",t),!1):(this._state.views.push(t),!0)}},{key:"file",get:function(){return this._state.file}},{key:"setActiveTab",value:function(t){this._state.activeTab=t}}])&&tt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),it=i(57005);function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function ot(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function st(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,lt(i.key),i)}}function at(t,e,n){return(e=lt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lt(t){var e=function(t,e){if("object"!==rt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==rt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===rt(e)?e:String(e)}var ut=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.id,r=n.name,o=n.icon,s=n.iconSvg,a=n.mount,l=n.update,u=n.destroy,c=n.enabled,f=n.scrollBottomReached;if(ot(this,t),at(this,"_id",void 0),at(this,"_name",void 0),at(this,"_icon",void 0),at(this,"_iconSvgSanitized",void 0),at(this,"_mount",void 0),at(this,"_update",void 0),at(this,"_destroy",void 0),at(this,"_enabled",void 0),at(this,"_scrollBottomReached",void 0),void 0===c&&(c=function(){return!0}),void 0===f&&(f=function(){}),"string"!=typeof i||""===i.trim())throw new Error("The id argument is not a valid string");if("string"!=typeof r||""===r.trim())throw new Error("The name argument is not a valid string");if(("string"!=typeof o||""===o.trim())&&"string"!=typeof s)throw new Error("Missing valid string for icon or iconSvg argument");if("function"!=typeof a)throw new Error("The mount argument should be a function");if("function"!=typeof l)throw new Error("The update argument should be a function");if("function"!=typeof u)throw new Error("The destroy argument should be a function");if("function"!=typeof c)throw new Error("The enabled argument should be a function");if("function"!=typeof f)throw new Error("The scrollBottomReached argument should be a function");this._id=i,this._name=r,this._icon=o,this._mount=a,this._update=l,this._destroy=u,this._enabled=c,this._scrollBottomReached=f,"string"==typeof s&&(0,it.t)(s).then((function(t){e._iconSvgSanitized=t}))}var e,n;return e=t,(n=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"icon",get:function(){return this._icon}},{key:"iconSvg",get:function(){return this._iconSvgSanitized}},{key:"mount",get:function(){return this._mount}},{key:"update",get:function(){return this._update}},{key:"destroy",get:function(){return this._destroy}},{key:"enabled",get:function(){return this._enabled}},{key:"scrollBottomReached",get:function(){return this._scrollBottomReached}}])&&st(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ct=i(25108);r.default.prototype.t=o.Iu,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new nt}),Object.assign(window.OCA.Files.Sidebar,{Tab:ut}),ct.debug("OCA.Files.Sidebar initialized"),window.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector("body > .content")||document.querySelector("body > #content");if(t&&!document.getElementById("app-sidebar")){var e=document.createElement("div");e.id="app-sidebar",t.appendChild(e)}var n=new(r.default.extend(J))({name:"SidebarRoot"});n.$mount("#app-sidebar"),window.OCA.Files.Sidebar.open=n.open,window.OCA.Files.Sidebar.close=n.close,window.OCA.Files.Sidebar.setFullScreenMode=n.setFullScreenMode}))},88215:function(t,e,n){"use strict";var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([t.id,'.app-sidebar--has-preview[data-v-1b9af3ae] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-1b9af3ae][data-mimetype="text/plain"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-1b9af3ae][data-mimetype="text/markdown"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-1b9af3ae]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-1b9af3ae] svg{width:20px;height:20px;fill:currentColor}',"",{version:3,sources:["webpack://./apps/files/src/views/Sidebar.vue"],names:[],mappings:"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA",sourcesContent:['\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype="text/plain"],\n\t\t&[data-mimetype="text/markdown"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),e.Z=s},46700:function(t,e,n){var i={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=46700}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,e=[],r.O=function(t,n,i,o){if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],i=e[c][1],o=e[c][2];for(var a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[l])}))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(c--,1);var u=i();void 0!==u&&(t=u)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,i,o]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=4092,function(){r.b=document.baseURI||self.location.href;var t={4092:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,s=n[0],a=n[1],l=n[2],u=0;if(s.some((function(e){return 0!==t[e]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var c=l(r)}for(e&&e(n);u<s.length;u++)o=s[u],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return r.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(28011)}));o=r.O(o)}(); -//# sourceMappingURL=files-sidebar.js.map?v=c21c2e0ae35c8959db05
\ No newline at end of file +(()=>{var e,i={28011:(e,i,n)=>{"use strict";var s=n(20144),r=n(31352),o=n(65358),a=n(19755),l=n.n(a),d=n(4820),c=n(78595),u=n(80351),f=n.n(u),h=n(41922),p=n(10250),m=n.n(p),b=n(45400),g=n.n(b),v=n(93455),y=n.n(v),j=n(62574);const A={name:"SidebarTab",components:{NcAppSidebarTab:n.n(j)(),NcEmptyContent:y()},props:{fileInfo:{type:Object,default:()=>{},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:()=>{}}},data:()=>({loading:!0}),computed:{activeTab(){return this.$parent.activeTab}},watch:{async fileInfo(t,e){t.id!==e.id&&(this.loading=!0,await this.onUpdate(this.fileInfo),this.loading=!1)}},async mounted(){this.loading=!0,await this.onMount(this.$refs.mount,this.fileInfo,this.$refs.tab),this.loading=!1},async beforeDestroy(){await this.onDestroy()}};var w=n(51900);const C=(0,w.Z)(A,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports,_={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:()=>{},required:!0}},watch:{fileInfo(t){this.setFileInfo(t)}},mounted(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}},S=(0,w.Z)(_,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;var O=n(25108);const T={name:"Sidebar",components:{NcActionButton:g(),NcAppSidebar:m(),NcEmptyContent:y(),LegacyView:S,SidebarTab:C},data:()=>({Sidebar:OCA.Files.Sidebar.state,error:null,loading:!0,fileInfo:null,starLoading:!1,isFullScreen:!1,hasLowHeight:!1}),computed:{file(){return this.Sidebar.file},tabs(){return this.Sidebar.tabs},views(){return this.Sidebar.views},davPath(){const t=OC.getCurrentUser().uid;return OC.linkToRemote("dav/files/".concat(t).concat((0,o.Ec)(this.file)))},activeTab(){return this.Sidebar.activeTab},subtitle(){return"".concat(this.size,", ").concat(this.time)},time(){return OC.Util.relativeModifiedDate(this.fileInfo.mtime)},fullTime(){return f()(this.fileInfo.mtime).format("LLL")},size(){return OC.Util.humanFileSize(this.fileInfo.size)},background(){return this.getPreviewIfAny(this.fileInfo)},appSidebar(){return this.fileInfo?{"data-mimetype":this.fileInfo.mimetype,"star-loading":this.starLoading,active:this.activeTab,background:this.background,class:{"app-sidebar--has-preview":this.fileInfo.hasPreview&&!this.isFullScreen,"app-sidebar--full":this.isFullScreen},compact:this.hasLowHeight||!this.fileInfo.hasPreview||this.isFullScreen,loading:this.loading,starred:this.fileInfo.isFavourited,subtitle:this.subtitle,subtitleTooltip:this.fullTime,title:this.fileInfo.name,titleTooltip:this.fileInfo.name}:this.error?{key:"error",subtitle:"",title:""}:{loading:this.loading,subtitle:"",title:""}},defaultAction(){return this.fileInfo&&OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.getDefaultFileAction&&OCA.Files.App.fileList.fileActions.getDefaultFileAction(this.fileInfo.mimetype,this.fileInfo.type,OC.PERMISSION_READ)},defaultActionListener(){return this.defaultAction?"figure-click":null},isSystemTagsEnabled:()=>OCA&&"SystemTags"in OCA},created(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize)},methods:{canDisplay(t){return t.enabled(this.fileInfo)},resetData(){this.error=null,this.fileInfo=null,this.$nextTick((()=>{this.$refs.tabs&&this.$refs.tabs.updateTabs()}))},getPreviewIfAny(t){return t.hasPreview&&!this.isFullScreen?OC.generateUrl("/core/preview?fileId=".concat(t.id,"&x=").concat(screen.width,"&y=").concat(screen.height,"&a=true")):this.getIconUrl(t)},getIconUrl(t){const e=t.mimetype||"application/octet-stream";return"httpd/unix-directory"===e?"shared"===t.mountType||"shared-root"===t.mountType?OC.MimeType.getIconUrl("dir-shared"):"external-root"===t.mountType?OC.MimeType.getIconUrl("dir-external"):void 0!==t.mountType&&""!==t.mountType?OC.MimeType.getIconUrl("dir-"+t.mountType):t.shareTypes&&(t.shareTypes.indexOf(h.D.SHARE_TYPE_LINK)>-1||t.shareTypes.indexOf(h.D.SHARE_TYPE_EMAIL)>-1)?OC.MimeType.getIconUrl("dir-public"):t.shareTypes&&t.shareTypes.length>0?OC.MimeType.getIconUrl("dir-shared"):OC.MimeType.getIconUrl("dir"):OC.MimeType.getIconUrl(e)},setActiveTab(t){OCA.Files.Sidebar.setActiveTab(t)},async toggleStarred(e){try{this.starLoading=!0,await(0,d.default)({method:"PROPPATCH",url:this.davPath,data:'<?xml version="1.0"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t\t\t\t\t\t'.concat(e?"<d:set>":"<d:remove>","\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t").concat(e?"</d:set>":"</d:remove>","\n\t\t\t\t\t\t</d:propertyupdate>")}),OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.triggerAction("Favorite",OCA.Files.App.fileList.getModelForFile(this.fileInfo.name),OCA.Files.App.fileList)}catch(e){OC.Notification.showTemporary(t("files","Unable to change the favourite state of the file")),O.error("Unable to change favourite state",e)}this.starLoading=!1},onDefaultAction(){this.defaultAction&&this.defaultAction.action(this.fileInfo.name,{fileInfo:this.fileInfo,dir:this.fileInfo.dir,fileList:OCA.Files.App.fileList,$file:l()("body")})},toggleTags(){OCA.SystemTags&&OCA.SystemTags.View&&OCA.SystemTags.View.toggle()},async open(e){if(this.Sidebar.file=e,e&&""!==e.trim()){this.error=null,this.loading=!0;try{this.fileInfo=await async function(t){const e=await(0,d.default)({method:"PROPFIND",url:t,data:'<?xml version="1.0"?>\n\t\t\t<d:propfind xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>'}),i=OCA.Files.App.fileList.filesClient._client.parseMultiStatus(e.data),n=OCA.Files.App.fileList.filesClient._parseFileInfo(i[0]);return n.get=t=>n[t],n.isDirectory=()=>"httpd/unix-directory"===n.mimetype,n}(this.davPath),this.fileInfo.dir=this.file.split("/").slice(0,-1).join("/"),this.views.forEach((t=>{t.setFileInfo(this.fileInfo)})),this.$nextTick((()=>{this.$refs.tabs&&this.$refs.tabs.updateTabs()}))}catch(e){throw this.error=t("files","Error while loading the file data"),O.error("Error while loading the file data",e),new Error(e)}finally{this.loading=!1}}},close(){this.Sidebar.file="",this.resetData()},setFullScreenMode(t){var e,i,n,s;this.isFullScreen=t,t?(null===(e=document.querySelector("#content"))||void 0===e?void 0:e.classList.add("with-sidebar--full"))||null===(i=document.querySelector("#content-vue"))||void 0===i||i.classList.add("with-sidebar--full"):(null===(n=document.querySelector("#content"))||void 0===n?void 0:n.classList.remove("with-sidebar--full"))||null===(s=document.querySelector("#content-vue"))||void 0===s||s.classList.remove("with-sidebar--full")},handleOpening(){(0,c.j8)("files:sidebar:opening")},handleOpened(){(0,c.j8)("files:sidebar:opened")},handleClosing(){(0,c.j8)("files:sidebar:closing")},handleClosed(){(0,c.j8)("files:sidebar:closed")},handleWindowResize(){this.hasLowHeight=document.documentElement.clientHeight<1024}}};var I=n(93379),k=n.n(I),F=n(7795),x=n.n(F),z=n(90569),E=n.n(z),L=n(3565),P=n.n(L),M=n(19216),R=n.n(M),D=n(44589),U=n.n(D),B=n(88215),q={};q.styleTagTransform=U(),q.setAttributes=P(),q.insert=E().bind(null,"head"),q.domAPI=x(),q.insertStyleElement=R(),k()(B.Z,q),B.Z&&B.Z.locals&&B.Z.locals;const N=(0,w.Z)(T,(function(){var t=this,e=t._self._c;return t.file?e("NcAppSidebar",t._b({ref:"sidebar",attrs:{"force-menu":!0,tabindex:"0"},on:t._d({close:t.close,"update:active":t.setActiveTab,"update:starred":t.toggleStarred,opening:t.handleOpening,opened:t.handleOpened,closing:t.handleClosing,closed:t.handleClosed},[t.defaultActionListener,function(e){return e.stopPropagation(),e.preventDefault(),t.onDefaultAction.apply(null,arguments)}]),scopedSlots:t._u([t.fileInfo?{key:"description",fn:function(){return t._l(t.views,(function(i){return e("LegacyView",{key:i.cid,attrs:{component:i,"file-info":t.fileInfo}})}))},proxy:!0}:null,t.fileInfo?{key:"secondary-actions",fn:function(){return[t.isSystemTagsEnabled?e("NcActionButton",{attrs:{"close-after-click":!0,icon:"icon-tag"},on:{click:t.toggleTags}},[t._v("\n\t\t\t"+t._s(t.t("files","Tags"))+"\n\t\t")]):t._e()]},proxy:!0}:null],null,!0)},"NcAppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),t.error?e("NcEmptyContent",{attrs:{icon:"icon-error"}},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t.fileInfo?t._l(t.tabs,(function(i){return[i.enabled(t.fileInfo)?e("SidebarTab",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],key:i.id,attrs:{id:i.id,name:i.name,icon:i.icon,"on-mount":i.mount,"on-update":i.update,"on-destroy":i.destroy,"on-scroll-bottom-reached":i.scrollBottomReached,"file-info":t.fileInfo},scopedSlots:t._u([void 0!==i.iconSvg?{key:"icon",fn:function(){return[e("span",{staticClass:"svg-icon",domProps:{innerHTML:t._s(i.iconSvg)}})]},proxy:!0}:null],null,!0)}):t._e()]})):t._e()],2):t._e()}),[],!1,null,"1b9af3ae",null).exports;var $=n(25108);var H=n(57005);function V(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Z=n(25108);s.default.prototype.t=r.Iu,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new class{constructor(){var t,e,i;t=this,i=void 0,(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e="_state"))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,this._state={},this._state.tabs=[],this._state.views=[],this._state.file="",this._state.activeTab="",$.debug("OCA.Files.Sidebar initialized")}get state(){return this._state}registerTab(t){return this._state.tabs.findIndex((e=>e.id===t.id))>-1?($.error("An tab with the same id ".concat(t.id," already exists"),t),!1):(this._state.tabs.push(t),!0)}registerSecondaryView(t){return this._state.views.findIndex((e=>e.id===t.id))>-1?($.error("A similar view already exists",t),!1):(this._state.views.push(t),!0)}get file(){return this._state.file}setActiveTab(t){this._state.activeTab=t}}}),Object.assign(window.OCA.Files.Sidebar,{Tab:class{constructor(){let{id:t,name:e,icon:i,iconSvg:n,mount:s,update:r,destroy:o,enabled:a,scrollBottomReached:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(V(this,"_id",void 0),V(this,"_name",void 0),V(this,"_icon",void 0),V(this,"_iconSvgSanitized",void 0),V(this,"_mount",void 0),V(this,"_update",void 0),V(this,"_destroy",void 0),V(this,"_enabled",void 0),V(this,"_scrollBottomReached",void 0),void 0===a&&(a=()=>!0),void 0===l&&(l=()=>{}),"string"!=typeof t||""===t.trim())throw new Error("The id argument is not a valid string");if("string"!=typeof e||""===e.trim())throw new Error("The name argument is not a valid string");if(("string"!=typeof i||""===i.trim())&&"string"!=typeof n)throw new Error("Missing valid string for icon or iconSvg argument");if("function"!=typeof s)throw new Error("The mount argument should be a function");if("function"!=typeof r)throw new Error("The update argument should be a function");if("function"!=typeof o)throw new Error("The destroy argument should be a function");if("function"!=typeof a)throw new Error("The enabled argument should be a function");if("function"!=typeof l)throw new Error("The scrollBottomReached argument should be a function");this._id=t,this._name=e,this._icon=i,this._mount=s,this._update=r,this._destroy=o,this._enabled=a,this._scrollBottomReached=l,"string"==typeof n&&(0,H.t)(n).then((t=>{this._iconSvgSanitized=t}))}get id(){return this._id}get name(){return this._name}get icon(){return this._icon}get iconSvg(){return this._iconSvgSanitized}get mount(){return this._mount}get update(){return this._update}get destroy(){return this._destroy}get enabled(){return this._enabled}get scrollBottomReached(){return this._scrollBottomReached}}}),Z.debug("OCA.Files.Sidebar initialized"),window.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector("body > .content")||document.querySelector("body > #content");if(t&&!document.getElementById("app-sidebar")){const e=document.createElement("div");e.id="app-sidebar",t.appendChild(e)}const e=new(s.default.extend(N))({name:"SidebarRoot"});e.$mount("#app-sidebar"),window.OCA.Files.Sidebar.open=e.open,window.OCA.Files.Sidebar.close=e.close,window.OCA.Files.Sidebar.setFullScreenMode=e.setFullScreenMode}))},88215:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(87537),s=i.n(n),r=i(23645),o=i.n(r)()(s());o.push([t.id,'.app-sidebar--has-preview[data-v-1b9af3ae] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-1b9af3ae][data-mimetype="text/plain"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-1b9af3ae][data-mimetype="text/markdown"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-1b9af3ae]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-1b9af3ae] svg{width:20px;height:20px;fill:currentColor}',"",{version:3,sources:["webpack://./apps/files/src/views/Sidebar.vue"],names:[],mappings:"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA",sourcesContent:['\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype="text/plain"],\n\t\t&[data-mimetype="text/markdown"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=o},46700:(t,e,i)=>{var n={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function s(t){var e=r(t);return i(e)}function r(t){if(!i.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=r,t.exports=s,s.id=46700}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={id:t,loaded:!1,exports:{}};return i[t].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=i,e=[],s.O=(t,i,n,r)=>{if(!i){var o=1/0;for(c=0;c<e.length;c++){i=e[c][0],n=e[c][1],r=e[c][2];for(var a=!0,l=0;l<i.length;l++)(!1&r||o>=r)&&Object.keys(s.O).every((t=>s.O[t](i[l])))?i.splice(l--,1):(a=!1,r<o&&(o=r));if(a){e.splice(c--,1);var d=n();void 0!==d&&(t=d)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[i,n,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=4092,(()=>{s.b=document.baseURI||self.location.href;var t={4092:0};s.O.j=e=>0===t[e];var e=(e,i)=>{var n,r,o=i[0],a=i[1],l=i[2],d=0;if(o.some((e=>0!==t[e]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var c=l(s)}for(e&&e(i);d<o.length;d++)r=o[d],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(c)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),s.nc=void 0;var r=s.O(void 0,[7874],(()=>s(28011)));r=s.O(r)})(); +//# sourceMappingURL=files-sidebar.js.map?v=8e1960c2acd5b1f88c7d
\ No newline at end of file |