aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/src/components/TransferOwnershipDialogue.vue2
-rw-r--r--dist/files-personal-settings.js4
-rw-r--r--dist/files-personal-settings.js.map2
3 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue
index b14f86e8fe2..be554c9f4b1 100644
--- a/apps/files/src/components/TransferOwnershipDialogue.vue
+++ b/apps/files/src/components/TransferOwnershipDialogue.vue
@@ -42,7 +42,7 @@
:options="formatedUserSuggestions"
:multiple="false"
:searchable="true"
- :placeholder="t('files', 'Search users')"
+ :placeholder="t('files', 'Search for an account')"
:preselect-first="true"
:preserve-search="true"
:loading="loadingUsers"
diff --git a/dist/files-personal-settings.js b/dist/files-personal-settings.js
index 11e10632703..e7080f4765d 100644
--- a/dist/files-personal-settings.js
+++ b/dist/files-personal-settings.js
@@ -1,3 +1,3 @@
/*! For license information please see files-personal-settings.js.LICENSE.txt */
-(()=>{"use strict";var e,r={40161:(e,r,s)=>{var n=s(20144),i=s(45994),a=s(4820),o=s(20296),l=s.n(o),c=s(79753),d=s(64024),u=s(98266),f=s.n(u),p=s(10861),h=s.n(p);const g=(0,s(17499).IY)().setApp("files").detectUser().build(),m=(0,d.fn)(t("files","Choose a file or folder to transfer")).setMultiSelect(!1).setModal(!0).setType(1).allowDirectories().build(),v={name:"TransferOwnershipDialogue",components:{NcMultiselect:f(),NcButton:h()},data:()=>({directory:void 0,directoryPickerError:void 0,submitError:void 0,loadingUsers:!1,selectedUser:null,userSuggestions:{},config:{minSearchStringLength:parseInt(OC.config["sharing.minSearchStringLength"],10)||0}}),computed:{canSubmit(){return!!this.directory&&!!this.selectedUser},formatedUserSuggestions(){return Object.keys(this.userSuggestions).map((e=>{const t=this.userSuggestions[e];return{user:t.uid,displayName:t.displayName,icon:"icon-user"}}))},submitButtonText(){if(!this.canSubmit)return t("files","Transfer");const e=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:e[e.length-1],userid:this.selectedUser.displayName})},readableDirectory(){return this.directory?this.directory.substring(1):""}},created(){this.findUserDebounced=l()(this.findUser,300),this.findUser("")},methods:{start(){this.directoryPickerError=void 0,m.pick().then((e=>""===e?"/":e)).then((e=>{if(g.debug("path ".concat(e," selected for transferring ownership")),!e.startsWith("/"))throw new Error(t("files","Invalid path selected"));this.directory=e})).catch((e=>{g.error("Selecting object for transfer aborted: ".concat(e.message||"Unknown error"),{error:e}),this.directoryPickerError=e.message||t("files","Unknown error")}))},async findUser(e){if(this.query=e.trim(),!(e.length<this.config.minSearchStringLength)){this.loadingUsers=!0;try{const t=await a.default.get((0,c.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:e,perPage:20,lookup:!1}});this.userSuggestions={},t.data.ocs.data.exact.users.concat(t.data.ocs.data.users).forEach((e=>{n.default.set(this.userSuggestions,e.value.shareWith,{uid:e.value.shareWith,displayName:e.label})}))}catch(e){g.error("could not fetch users",{error:e})}finally{this.loadingUsers=!1}}},submit(){this.canSubmit||g.warn("ignoring form submit"),this.submitError=void 0;const e={path:this.directory,recipient:this.selectedUser.user};g.debug("submit transfer ownership form",e);const r=(0,c.generateOcsUrl)("apps/files/api/v1/transferownership");a.default.post(r,e).then((e=>e.data)).then((e=>{g.info("Transfer ownership request sent",{data:e}),this.directory=void 0,this.selectedUser=null,(0,d.s$)(t("files","Ownership transfer request sent"))})).catch((e=>{var r;g.error("Could not send ownership transfer request",{error:e}),403===(null==e||null===(r=e.response)||void 0===r?void 0:r.status)?this.submitError=t("files","Cannot transfer ownership of a file or folder you do not own"):this.submitError=e.message||t("files","Unknown error")}))}}};var b=s(93379),w=s.n(b),A=s(7795),y=s.n(A),C=s(90569),_=s.n(C),x=s(3565),S=s.n(x),U=s(19216),k=s.n(U),O=s(44589),T=s.n(O),E=s(20163),D={};D.styleTagTransform=T(),D.setAttributes=S(),D.insert=_().bind(null,"head"),D.domAPI=y(),D.insertStyleElement=k(),w()(E.Z,D),E.Z&&E.Z.locals&&E.Z.locals;var j=s(51900);const B={name:"PersonalSettings",components:{TransferOwnershipDialogue:(0,j.Z)(v,(function(){var e=this,t=e._self._c;return t("div",[t("h3",[e._v(e._s(e.t("files","Transfer ownership of a file or folder"))+" ")]),e._v(" "),t("form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("p",{staticClass:"transfer-select-row"},[t("span",[e._v(e._s(e.readableDirectory))]),e._v(" "),void 0===e.directory?t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Choose file or folder to transfer"))+"\n\t\t\t")]):t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Change"))+"\n\t\t\t")]),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.directoryPickerError))])],1),e._v(" "),t("p",{staticClass:"new-owner-row"},[t("label",{attrs:{for:"targetUser"}},[t("span",[e._v(e._s(e.t("files","New owner")))])]),e._v(" "),t("NcMultiselect",{staticClass:"middle-align",attrs:{id:"targetUser",options:e.formatedUserSuggestions,multiple:!1,searchable:!0,placeholder:e.t("files","Search users"),"preselect-first":!0,"preserve-search":!0,loading:e.loadingUsers,"track-by":"user",label:"displayName","internal-search":!1,"clear-on-select":!1,"user-select":!0},on:{"search-change":e.findUserDebounced},model:{value:e.selectedUser,callback:function(t){e.selectedUser=t},expression:"selectedUser"}})],1),e._v(" "),t("p",[t("input",{staticClass:"primary",attrs:{type:"submit",disabled:!e.canSubmit},domProps:{value:e.submitButtonText}}),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.submitError))])])])])}),[],!1,null,"02afe3a0",null).exports}},N=(0,j.Z)(B,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"section",attrs:{id:"files-personal-settings"}},[t("h2",[e._v(e._s(e.t("files","Files")))]),e._v(" "),t("TransferOwnershipDialogue")],1)}),[],!1,null,null,null).exports;s.nc=btoa((0,i.IH)()),n.default.prototype.t=t,window.TESTING||(new(n.default.extend(N))).$mount("#files-personal-settings")},20163:(e,t,r)=>{r.d(t,{Z:()=>o});var s=r(87537),n=r.n(s),i=r(23645),a=r.n(i)()(n());a.push([e.id,".middle-align[data-v-02afe3a0]{vertical-align:middle}p[data-v-02afe3a0]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-02afe3a0]{display:flex}.new-owner-row label[data-v-02afe3a0]{display:flex;align-items:center}.new-owner-row label span[data-v-02afe3a0]{margin-right:8px}.new-owner-row .multiselect[data-v-02afe3a0]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-02afe3a0]{margin-right:8px}","",{version:3,sources:["webpack://./apps/files/src/components/TransferOwnershipDialogue.vue"],names:[],mappings:"AACA,+BACC,qBAAA,CAED,mBACC,eAAA,CACA,kBAAA,CAED,gCACC,YAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CAEA,2CACC,gBAAA,CAIF,6CACC,WAAA,CACA,eAAA,CAID,2CACC,gBAAA",sourcesContent:["\n.middle-align {\n\tvertical-align: middle;\n}\np {\n\tmargin-top: 12px;\n\tmargin-bottom: 12px;\n}\n.new-owner-row {\n\tdisplay: flex;\n\n\tlabel {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\tspan {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t\tmax-width: 280px;\n\t}\n}\n.transfer-select-row {\n\tspan {\n\t\tmargin-right: 8px;\n\t}\n}\n"],sourceRoot:""}]);const o=a}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=r,e=[],n.O=(t,r,s,i)=>{if(!r){var a=1/0;for(d=0;d<e.length;d++){r=e[d][0],s=e[d][1],i=e[d][2];for(var o=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(o=!1,i<a&&(a=i));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[r,s,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=1623,(()=>{n.b=document.baseURI||self.location.href;var e={1623:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,i,a=r[0],o=r[1],l=r[2],c=0;if(a.some((t=>0!==e[t]))){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(l)var d=l(n)}for(t&&t(r);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(d)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var i=n.O(void 0,[7874],(()=>n(40161)));i=n.O(i)})();
-//# sourceMappingURL=files-personal-settings.js.map?v=295ed02ae4cd5d4c6f7a \ No newline at end of file
+(()=>{"use strict";var e,r={78852:(e,r,s)=>{var n=s(20144),i=s(45994),a=s(4820),o=s(20296),l=s.n(o),c=s(79753),d=s(64024),u=s(98266),f=s.n(u),p=s(10861),h=s.n(p);const g=(0,s(17499).IY)().setApp("files").detectUser().build(),m=(0,d.fn)(t("files","Choose a file or folder to transfer")).setMultiSelect(!1).setModal(!0).setType(1).allowDirectories().build(),v={name:"TransferOwnershipDialogue",components:{NcMultiselect:f(),NcButton:h()},data:()=>({directory:void 0,directoryPickerError:void 0,submitError:void 0,loadingUsers:!1,selectedUser:null,userSuggestions:{},config:{minSearchStringLength:parseInt(OC.config["sharing.minSearchStringLength"],10)||0}}),computed:{canSubmit(){return!!this.directory&&!!this.selectedUser},formatedUserSuggestions(){return Object.keys(this.userSuggestions).map((e=>{const t=this.userSuggestions[e];return{user:t.uid,displayName:t.displayName,icon:"icon-user"}}))},submitButtonText(){if(!this.canSubmit)return t("files","Transfer");const e=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:e[e.length-1],userid:this.selectedUser.displayName})},readableDirectory(){return this.directory?this.directory.substring(1):""}},created(){this.findUserDebounced=l()(this.findUser,300),this.findUser("")},methods:{start(){this.directoryPickerError=void 0,m.pick().then((e=>""===e?"/":e)).then((e=>{if(g.debug("path ".concat(e," selected for transferring ownership")),!e.startsWith("/"))throw new Error(t("files","Invalid path selected"));this.directory=e})).catch((e=>{g.error("Selecting object for transfer aborted: ".concat(e.message||"Unknown error"),{error:e}),this.directoryPickerError=e.message||t("files","Unknown error")}))},async findUser(e){if(this.query=e.trim(),!(e.length<this.config.minSearchStringLength)){this.loadingUsers=!0;try{const t=await a.default.get((0,c.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:e,perPage:20,lookup:!1}});this.userSuggestions={},t.data.ocs.data.exact.users.concat(t.data.ocs.data.users).forEach((e=>{n.default.set(this.userSuggestions,e.value.shareWith,{uid:e.value.shareWith,displayName:e.label})}))}catch(e){g.error("could not fetch users",{error:e})}finally{this.loadingUsers=!1}}},submit(){this.canSubmit||g.warn("ignoring form submit"),this.submitError=void 0;const e={path:this.directory,recipient:this.selectedUser.user};g.debug("submit transfer ownership form",e);const r=(0,c.generateOcsUrl)("apps/files/api/v1/transferownership");a.default.post(r,e).then((e=>e.data)).then((e=>{g.info("Transfer ownership request sent",{data:e}),this.directory=void 0,this.selectedUser=null,(0,d.s$)(t("files","Ownership transfer request sent"))})).catch((e=>{var r;g.error("Could not send ownership transfer request",{error:e}),403===(null==e||null===(r=e.response)||void 0===r?void 0:r.status)?this.submitError=t("files","Cannot transfer ownership of a file or folder you do not own"):this.submitError=e.message||t("files","Unknown error")}))}}};var b=s(93379),w=s.n(b),A=s(7795),y=s.n(A),C=s(90569),_=s.n(C),x=s(3565),S=s.n(x),U=s(19216),k=s.n(U),O=s(44589),T=s.n(O),E=s(6355),D={};D.styleTagTransform=T(),D.setAttributes=S(),D.insert=_().bind(null,"head"),D.domAPI=y(),D.insertStyleElement=k(),w()(E.Z,D),E.Z&&E.Z.locals&&E.Z.locals;var j=s(51900);const B={name:"PersonalSettings",components:{TransferOwnershipDialogue:(0,j.Z)(v,(function(){var e=this,t=e._self._c;return t("div",[t("h3",[e._v(e._s(e.t("files","Transfer ownership of a file or folder"))+" ")]),e._v(" "),t("form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("p",{staticClass:"transfer-select-row"},[t("span",[e._v(e._s(e.readableDirectory))]),e._v(" "),void 0===e.directory?t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Choose file or folder to transfer"))+"\n\t\t\t")]):t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Change"))+"\n\t\t\t")]),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.directoryPickerError))])],1),e._v(" "),t("p",{staticClass:"new-owner-row"},[t("label",{attrs:{for:"targetUser"}},[t("span",[e._v(e._s(e.t("files","New owner")))])]),e._v(" "),t("NcMultiselect",{staticClass:"middle-align",attrs:{id:"targetUser",options:e.formatedUserSuggestions,multiple:!1,searchable:!0,placeholder:e.t("files","Search for an account"),"preselect-first":!0,"preserve-search":!0,loading:e.loadingUsers,"track-by":"user",label:"displayName","internal-search":!1,"clear-on-select":!1,"user-select":!0},on:{"search-change":e.findUserDebounced},model:{value:e.selectedUser,callback:function(t){e.selectedUser=t},expression:"selectedUser"}})],1),e._v(" "),t("p",[t("input",{staticClass:"primary",attrs:{type:"submit",disabled:!e.canSubmit},domProps:{value:e.submitButtonText}}),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.submitError))])])])])}),[],!1,null,"3b8774c3",null).exports}},N=(0,j.Z)(B,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"section",attrs:{id:"files-personal-settings"}},[t("h2",[e._v(e._s(e.t("files","Files")))]),e._v(" "),t("TransferOwnershipDialogue")],1)}),[],!1,null,null,null).exports;s.nc=btoa((0,i.IH)()),n.default.prototype.t=t,window.TESTING||(new(n.default.extend(N))).$mount("#files-personal-settings")},6355:(e,t,r)=>{r.d(t,{Z:()=>o});var s=r(87537),n=r.n(s),i=r(23645),a=r.n(i)()(n());a.push([e.id,".middle-align[data-v-3b8774c3]{vertical-align:middle}p[data-v-3b8774c3]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-3b8774c3]{display:flex}.new-owner-row label[data-v-3b8774c3]{display:flex;align-items:center}.new-owner-row label span[data-v-3b8774c3]{margin-right:8px}.new-owner-row .multiselect[data-v-3b8774c3]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-3b8774c3]{margin-right:8px}","",{version:3,sources:["webpack://./apps/files/src/components/TransferOwnershipDialogue.vue"],names:[],mappings:"AACA,+BACC,qBAAA,CAED,mBACC,eAAA,CACA,kBAAA,CAED,gCACC,YAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CAEA,2CACC,gBAAA,CAIF,6CACC,WAAA,CACA,eAAA,CAID,2CACC,gBAAA",sourcesContent:["\n.middle-align {\n\tvertical-align: middle;\n}\np {\n\tmargin-top: 12px;\n\tmargin-bottom: 12px;\n}\n.new-owner-row {\n\tdisplay: flex;\n\n\tlabel {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\tspan {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t\tmax-width: 280px;\n\t}\n}\n.transfer-select-row {\n\tspan {\n\t\tmargin-right: 8px;\n\t}\n}\n"],sourceRoot:""}]);const o=a}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=r,e=[],n.O=(t,r,s,i)=>{if(!r){var a=1/0;for(d=0;d<e.length;d++){r=e[d][0],s=e[d][1],i=e[d][2];for(var o=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(o=!1,i<a&&(a=i));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[r,s,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=1623,(()=>{n.b=document.baseURI||self.location.href;var e={1623:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,i,a=r[0],o=r[1],l=r[2],c=0;if(a.some((t=>0!==e[t]))){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(l)var d=l(n)}for(t&&t(r);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(d)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var i=n.O(void 0,[7874],(()=>n(78852)));i=n.O(i)})();
+//# sourceMappingURL=files-personal-settings.js.map?v=efa8f96e0e99b338a979 \ No newline at end of file
diff --git a/dist/files-personal-settings.js.map b/dist/files-personal-settings.js.map
index 4b67fa8a6ed..6ca861e80d2 100644
--- a/dist/files-personal-settings.js.map
+++ b/dist/files-personal-settings.js.map
@@ -1 +1 @@
-{"version":3,"file":"files-personal-settings.js?v=295ed02ae4cd5d4c6f7a","mappings":";uBAAIA,2ICuBJ,SAAeC,WAAAA,MACbC,OAAO,SACPC,aACAC,QCoDIC,GAAS,QAAqBC,EAAE,QAAS,wCAC/CC,gBAAAA,GACAC,UAAAA,GACAC,QAAAA,GACAC,mBACAN,QCnFsM,EDqFtM,CACAO,KAAAA,4BACAC,WAAAA,CACAC,cAAAA,IACAC,SAAAA,KAEAC,KAAAA,KACA,CACAC,eAAAA,EACAC,0BAAAA,EACAC,iBAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,gBAAAA,CAAAA,EACAC,OAAAA,CACAC,sBAAAA,SAAAA,GAAAA,OAAAA,iCAAAA,KAAAA,KAIAC,SAAAA,CACAC,YACA,2CACA,EACAC,0BACA,kDACA,gCACA,OACAC,KAAAA,EAAAA,IACAC,YAAAA,EAAAA,YACAC,KAAAA,YACA,GAEA,EACAC,mBACA,mBACA,6BAEA,0CACA,gDAAAC,KAAAA,EAAAA,EAAAA,OAAAA,GAAAC,OAAAA,KAAAA,aAAAA,aACA,EACAC,oBACA,sBAGA,4BAFA,EAGA,GAEAC,UACA,8CACA,iBACA,EACAC,QAAAA,CACAC,QACA,iCAEA/B,EAAAA,OACAgC,MAAAA,GAAAA,KAAAA,EAAAA,IAAAA,IACAA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B,GAAGL,EAASkD,MAAM9D,GAAgC,IAAxBwD,EAAgBxD,KAAa,CACtD,IAAIG,KAAYyD,EACZ1D,EAAoB+B,EAAE2B,EAAazD,KACrCD,EAAoBO,EAAEN,GAAYyD,EAAYzD,IAGhD,GAAG0D,EAAS,IAAIlD,EAASkD,EAAQ3D,EAClC,CAEA,IADGyD,GAA4BA,EAA2BxI,GACrD8F,EAAIL,EAASM,OAAQD,IACzBwC,EAAU7C,EAASK,GAChBf,EAAoB+B,EAAEuB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBQ,EAAEC,EAAO,EAGjCoD,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBjE,KAAO4D,EAAqBO,KAAK,KAAMF,EAAmBjE,KAAKmE,KAAKF,QClDvF7D,EAAoBgE,QAAKrF,ECGzB,IAAIsF,EAAsBjE,EAAoBQ,OAAE7B,EAAW,CAAC,OAAO,IAAOqB,EAAoB,SAC9FiE,EAAsBjE,EAAoBQ,EAAEyD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?a4cb","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?2a1f","webpack:///nextcloud/apps/files/src/components/PersonalSettings.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/PersonalSettings.vue","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?6355","webpack://nextcloud/./apps/files/src/components/PersonalSettings.vue?7d7e","webpack://nextcloud/./apps/files/src/components/PersonalSettings.vue?3bbf","webpack:///nextcloud/apps/files/src/main-personal-settings.js","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue?vue&type=style&index=0&id=02afe3a0&prod&scoped=true&lang=scss&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","<!--\n - @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -->\n\n<template>\n\t<div>\n\t\t<h3>{{ t('files', 'Transfer ownership of a file or folder') }} </h3>\n\t\t<form @submit.prevent=\"submit\">\n\t\t\t<p class=\"transfer-select-row\">\n\t\t\t\t<span>{{ readableDirectory }}</span>\n\t\t\t\t<NcButton v-if=\"directory === undefined\" @click.prevent=\"start\">\n\t\t\t\t\t{{ t('files', 'Choose file or folder to transfer') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else @click.prevent=\"start\">\n\t\t\t\t\t{{ t('files', 'Change') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<span class=\"error\">{{ directoryPickerError }}</span>\n\t\t\t</p>\n\t\t\t<p class=\"new-owner-row\">\n\t\t\t\t<label for=\"targetUser\">\n\t\t\t\t\t<span>{{ t('files', 'New owner') }}</span>\n\t\t\t\t</label>\n\t\t\t\t<NcMultiselect id=\"targetUser\"\n\t\t\t\t\tv-model=\"selectedUser\"\n\t\t\t\t\t:options=\"formatedUserSuggestions\"\n\t\t\t\t\t:multiple=\"false\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:placeholder=\"t('files', 'Search users')\"\n\t\t\t\t\t:preselect-first=\"true\"\n\t\t\t\t\t:preserve-search=\"true\"\n\t\t\t\t\t:loading=\"loadingUsers\"\n\t\t\t\t\ttrack-by=\"user\"\n\t\t\t\t\tlabel=\"displayName\"\n\t\t\t\t\t:internal-search=\"false\"\n\t\t\t\t\t:clear-on-select=\"false\"\n\t\t\t\t\t:user-select=\"true\"\n\t\t\t\t\tclass=\"middle-align\"\n\t\t\t\t\t@search-change=\"findUserDebounced\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"submit\"\n\t\t\t\t\tclass=\"primary\"\n\t\t\t\t\t:value=\"submitButtonText\"\n\t\t\t\t\t:disabled=\"!canSubmit\">\n\t\t\t\t<span class=\"error\">{{ submitError }}</span>\n\t\t\t</p>\n\t\t</form>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport debounce from 'debounce'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getFilePickerBuilder, showSuccess } from '@nextcloud/dialogs'\nimport NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'\nimport Vue from 'vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\n\nimport logger from '../logger.js'\n\nconst picker = getFilePickerBuilder(t('files', 'Choose a file or folder to transfer'))\n\t.setMultiSelect(false)\n\t.setModal(true)\n\t.setType(1)\n\t.allowDirectories()\n\t.build()\n\nexport default {\n\tname: 'TransferOwnershipDialogue',\n\tcomponents: {\n\t\tNcMultiselect,\n\t\tNcButton,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdirectory: undefined,\n\t\t\tdirectoryPickerError: undefined,\n\t\t\tsubmitError: undefined,\n\t\t\tloadingUsers: false,\n\t\t\tselectedUser: null,\n\t\t\tuserSuggestions: {},\n\t\t\tconfig: {\n\t\t\t\tminSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,\n\t\t\t},\n\t\t}\n\t},\n\tcomputed: {\n\t\tcanSubmit() {\n\t\t\treturn !!this.directory && !!this.selectedUser\n\t\t},\n\t\tformatedUserSuggestions() {\n\t\t\treturn Object.keys(this.userSuggestions).map((uid) => {\n\t\t\t\tconst user = this.userSuggestions[uid]\n\t\t\t\treturn {\n\t\t\t\t\tuser: user.uid,\n\t\t\t\t\tdisplayName: user.displayName,\n\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tsubmitButtonText() {\n\t\t\tif (!this.canSubmit) {\n\t\t\t\treturn t('files', 'Transfer')\n\t\t\t}\n\t\t\tconst components = this.readableDirectory.split('/')\n\t\t\treturn t('files', 'Transfer {path} to {userid}', { path: components[components.length - 1], userid: this.selectedUser.displayName })\n\t\t},\n\t\treadableDirectory() {\n\t\t\tif (!this.directory) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn this.directory.substring(1)\n\t\t},\n\t},\n\tcreated() {\n\t\tthis.findUserDebounced = debounce(this.findUser, 300)\n\t\tthis.findUser('')\n\t},\n\tmethods: {\n\t\tstart() {\n\t\t\tthis.directoryPickerError = undefined\n\n\t\t\tpicker.pick()\n\t\t\t\t.then(dir => dir === '' ? '/' : dir)\n\t\t\t\t.then(dir => {\n\t\t\t\t\tlogger.debug(`path ${dir} selected for transferring ownership`)\n\t\t\t\t\tif (!dir.startsWith('/')) {\n\t\t\t\t\t\tthrow new Error(t('files', 'Invalid path selected'))\n\t\t\t\t\t}\n\t\t\t\t\t// /ocs/v2.php/apps/files/api/v1/transferownership\n\t\t\t\t\t// /ocs/v2.php/apps/files/api/v1/transferownership\n\t\t\t\t\tthis.directory = dir\n\t\t\t\t}).catch(error => {\n\t\t\t\t\tlogger.error(`Selecting object for transfer aborted: ${error.message || 'Unknown error'}`, { error })\n\n\t\t\t\t\tthis.directoryPickerError = error.message || t('files', 'Unknown error')\n\t\t\t\t})\n\t\t},\n\t\tasync findUser(query) {\n\t\t\tthis.query = query.trim()\n\n\t\t\tif (query.length < this.config.minSearchStringLength) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loadingUsers = true\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\titemType: 'file',\n\t\t\t\t\t\tsearch: query,\n\t\t\t\t\t\tperPage: 20,\n\t\t\t\t\t\tlookup: false,\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tthis.userSuggestions = {}\n\t\t\t\tresponse.data.ocs.data.exact.users.concat(response.data.ocs.data.users).forEach(user => {\n\t\t\t\t\tVue.set(this.userSuggestions, user.value.shareWith, {\n\t\t\t\t\t\tuid: user.value.shareWith,\n\t\t\t\t\t\tdisplayName: user.label,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('could not fetch users', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loadingUsers = false\n\t\t\t}\n\t\t},\n\t\tsubmit() {\n\t\t\tif (!this.canSubmit) {\n\t\t\t\tlogger.warn('ignoring form submit')\n\t\t\t}\n\n\t\t\tthis.submitError = undefined\n\t\t\tconst data = {\n\t\t\t\tpath: this.directory,\n\t\t\t\trecipient: this.selectedUser.user,\n\t\t\t}\n\t\t\tlogger.debug('submit transfer ownership form', data)\n\n\t\t\tconst url = generateOcsUrl('apps/files/api/v1/transferownership')\n\n\t\t\taxios.post(url, data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(data => {\n\t\t\t\t\tlogger.info('Transfer ownership request sent', { data })\n\n\t\t\t\t\tthis.directory = undefined\n\t\t\t\t\tthis.selectedUser = null\n\t\t\t\t\tshowSuccess(t('files', 'Ownership transfer request sent'))\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tlogger.error('Could not send ownership transfer request', { error })\n\n\t\t\t\t\tif (error?.response?.status === 403) {\n\t\t\t\t\t\tthis.submitError = t('files', 'Cannot transfer ownership of a file or folder you do not own')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.submitError = error.message || t('files', 'Unknown error')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.middle-align {\n\tvertical-align: middle;\n}\np {\n\tmargin-top: 12px;\n\tmargin-bottom: 12px;\n}\n.new-owner-row {\n\tdisplay: flex;\n\n\tlabel {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\tspan {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t\tmax-width: 280px;\n\t}\n}\n.transfer-select-row {\n\tspan {\n\t\tmargin-right: 8px;\n\t}\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=02afe3a0&prod&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=02afe3a0&prod&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TransferOwnershipDialogue.vue?vue&type=template&id=02afe3a0&scoped=true&\"\nimport script from \"./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"\nexport * from \"./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=02afe3a0&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"02afe3a0\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=script&lang=js&\"","<!--\n - @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -->\n\n<template>\n\t<div id=\"files-personal-settings\" class=\"section\">\n\t\t<h2>{{ t('files', 'Files') }}</h2>\n\t\t<TransferOwnershipDialogue />\n\t</div>\n</template>\n\n<script>\nimport TransferOwnershipDialogue from './TransferOwnershipDialogue.vue'\n\nexport default {\n\tname: 'PersonalSettings',\n\tcomponents: {\n\t\tTransferOwnershipDialogue,\n\t},\n}\n</script>\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('h3',[_vm._v(_vm._s(_vm.t('files', 'Transfer ownership of a file or folder'))+\" \")]),_vm._v(\" \"),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('p',{staticClass:\"transfer-select-row\"},[_c('span',[_vm._v(_vm._s(_vm.readableDirectory))]),_vm._v(\" \"),(_vm.directory === undefined)?_c('NcButton',{on:{\"click\":function($event){$event.preventDefault();return _vm.start.apply(null, arguments)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Choose file or folder to transfer'))+\"\\n\\t\\t\\t\")]):_c('NcButton',{on:{\"click\":function($event){$event.preventDefault();return _vm.start.apply(null, arguments)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Change'))+\"\\n\\t\\t\\t\")]),_vm._v(\" \"),_c('span',{staticClass:\"error\"},[_vm._v(_vm._s(_vm.directoryPickerError))])],1),_vm._v(\" \"),_c('p',{staticClass:\"new-owner-row\"},[_c('label',{attrs:{\"for\":\"targetUser\"}},[_c('span',[_vm._v(_vm._s(_vm.t('files', 'New owner')))])]),_vm._v(\" \"),_c('NcMultiselect',{staticClass:\"middle-align\",attrs:{\"id\":\"targetUser\",\"options\":_vm.formatedUserSuggestions,\"multiple\":false,\"searchable\":true,\"placeholder\":_vm.t('files', 'Search users'),\"preselect-first\":true,\"preserve-search\":true,\"loading\":_vm.loadingUsers,\"track-by\":\"user\",\"label\":\"displayName\",\"internal-search\":false,\"clear-on-select\":false,\"user-select\":true},on:{\"search-change\":_vm.findUserDebounced},model:{value:(_vm.selectedUser),callback:function ($$v) {_vm.selectedUser=$$v},expression:\"selectedUser\"}})],1),_vm._v(\" \"),_c('p',[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"disabled\":!_vm.canSubmit},domProps:{\"value\":_vm.submitButtonText}}),_vm._v(\" \"),_c('span',{staticClass:\"error\"},[_vm._v(_vm._s(_vm.submitError))])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./PersonalSettings.vue?vue&type=template&id=6bbac28a&\"\nimport script from \"./PersonalSettings.vue?vue&type=script&lang=js&\"\nexport * from \"./PersonalSettings.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"section\",attrs:{\"id\":\"files-personal-settings\"}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Files')))]),_vm._v(\" \"),_c('TransferOwnershipDialogue')],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\n\nimport PersonalSettings from './components/PersonalSettings.vue'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(getRequestToken())\n\nVue.prototype.t = t\n\nif (!window.TESTING) {\n\tconst View = Vue.extend(PersonalSettings)\n\tnew View().$mount('#files-personal-settings')\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".middle-align[data-v-02afe3a0]{vertical-align:middle}p[data-v-02afe3a0]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-02afe3a0]{display:flex}.new-owner-row label[data-v-02afe3a0]{display:flex;align-items:center}.new-owner-row label span[data-v-02afe3a0]{margin-right:8px}.new-owner-row .multiselect[data-v-02afe3a0]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-02afe3a0]{margin-right:8px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TransferOwnershipDialogue.vue\"],\"names\":[],\"mappings\":\"AACA,+BACC,qBAAA,CAED,mBACC,eAAA,CACA,kBAAA,CAED,gCACC,YAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CAEA,2CACC,gBAAA,CAIF,6CACC,WAAA,CACA,eAAA,CAID,2CACC,gBAAA\",\"sourcesContent\":[\"\\n.middle-align {\\n\\tvertical-align: middle;\\n}\\np {\\n\\tmargin-top: 12px;\\n\\tmargin-bottom: 12px;\\n}\\n.new-owner-row {\\n\\tdisplay: flex;\\n\\n\\tlabel {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\n\\t\\tspan {\\n\\t\\t\\tmargin-right: 8px;\\n\\t\\t}\\n\\t}\\n\\n\\t.multiselect {\\n\\t\\tflex-grow: 1;\\n\\t\\tmax-width: 280px;\\n\\t}\\n}\\n.transfer-select-row {\\n\\tspan {\\n\\t\\tmargin-right: 8px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1623;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1623: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(40161)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getLoggerBuilder","setApp","detectUser","build","picker","t","setMultiSelect","setModal","setType","allowDirectories","name","components","NcMultiselect","NcButton","data","directory","directoryPickerError","submitError","loadingUsers","selectedUser","userSuggestions","config","minSearchStringLength","computed","canSubmit","formatedUserSuggestions","user","displayName","icon","submitButtonText","path","userid","readableDirectory","created","methods","start","then","logger","error","params","format","itemType","search","perPage","lookup","response","Vue","uid","submit","recipient","axios","showSuccess","catch","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","TransferOwnershipDialogue","_vm","this","_c","_self","_v","_s","on","$event","preventDefault","apply","arguments","staticClass","undefined","attrs","findUserDebounced","model","value","callback","$$v","expression","domProps","__webpack_nonce__","btoa","getRequestToken","window","TESTING","PersonalSettings","$mount","___CSS_LOADER_EXPORT___","push","module","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"files-personal-settings.js?v=efa8f96e0e99b338a979","mappings":";uBAAIA,2ICuBJ,SAAeC,WAAAA,MACbC,OAAO,SACPC,aACAC,QCoDIC,GAAS,QAAqBC,EAAE,QAAS,wCAC/CC,gBAAAA,GACAC,UAAAA,GACAC,QAAAA,GACAC,mBACAN,QCnFsM,EDqFtM,CACAO,KAAAA,4BACAC,WAAAA,CACAC,cAAAA,IACAC,SAAAA,KAEAC,KAAAA,KACA,CACAC,eAAAA,EACAC,0BAAAA,EACAC,iBAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,gBAAAA,CAAAA,EACAC,OAAAA,CACAC,sBAAAA,SAAAA,GAAAA,OAAAA,iCAAAA,KAAAA,KAIAC,SAAAA,CACAC,YACA,2CACA,EACAC,0BACA,kDACA,gCACA,OACAC,KAAAA,EAAAA,IACAC,YAAAA,EAAAA,YACAC,KAAAA,YACA,GAEA,EACAC,mBACA,mBACA,6BAEA,0CACA,gDAAAC,KAAAA,EAAAA,EAAAA,OAAAA,GAAAC,OAAAA,KAAAA,aAAAA,aACA,EACAC,oBACA,sBAGA,4BAFA,EAGA,GAEAC,UACA,8CACA,iBACA,EACAC,QAAAA,CACAC,QACA,iCAEA/B,EAAAA,OACAgC,MAAAA,GAAAA,KAAAA,EAAAA,IAAAA,IACAA,MAAAA,IAEA,GADAC,EAAAA,MAA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C,IAAxBwD,EAAgBxD,KAAa,CACtD,IAAIG,KAAYyD,EACZ1D,EAAoB+B,EAAE2B,EAAazD,KACrCD,EAAoBO,EAAEN,GAAYyD,EAAYzD,IAGhD,GAAG0D,EAAS,IAAIlD,EAASkD,EAAQ3D,EAClC,CAEA,IADGyD,GAA4BA,EAA2BxI,GACrD8F,EAAIL,EAASM,OAAQD,IACzBwC,EAAU7C,EAASK,GAChBf,EAAoB+B,EAAEuB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBQ,EAAEC,EAAO,EAGjCoD,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBjE,KAAO4D,EAAqBO,KAAK,KAAMF,EAAmBjE,KAAKmE,KAAKF,QClDvF7D,EAAoBgE,QAAKrF,ECGzB,IAAIsF,EAAsBjE,EAAoBQ,OAAE7B,EAAW,CAAC,OAAO,IAAOqB,EAAoB,SAC9FiE,EAAsBjE,EAAoBQ,EAAEyD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?2a6c","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?2a1f","webpack:///nextcloud/apps/files/src/components/PersonalSettings.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/PersonalSettings.vue","webpack://nextcloud/./apps/files/src/components/TransferOwnershipDialogue.vue?6355","webpack://nextcloud/./apps/files/src/components/PersonalSettings.vue?7d7e","webpack://nextcloud/./apps/files/src/components/PersonalSettings.vue?3bbf","webpack:///nextcloud/apps/files/src/main-personal-settings.js","webpack:///nextcloud/apps/files/src/components/TransferOwnershipDialogue.vue?vue&type=style&index=0&id=3b8774c3&prod&scoped=true&lang=scss&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","<!--\n - @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -->\n\n<template>\n\t<div>\n\t\t<h3>{{ t('files', 'Transfer ownership of a file or folder') }} </h3>\n\t\t<form @submit.prevent=\"submit\">\n\t\t\t<p class=\"transfer-select-row\">\n\t\t\t\t<span>{{ readableDirectory }}</span>\n\t\t\t\t<NcButton v-if=\"directory === undefined\" @click.prevent=\"start\">\n\t\t\t\t\t{{ t('files', 'Choose file or folder to transfer') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else @click.prevent=\"start\">\n\t\t\t\t\t{{ t('files', 'Change') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<span class=\"error\">{{ directoryPickerError }}</span>\n\t\t\t</p>\n\t\t\t<p class=\"new-owner-row\">\n\t\t\t\t<label for=\"targetUser\">\n\t\t\t\t\t<span>{{ t('files', 'New owner') }}</span>\n\t\t\t\t</label>\n\t\t\t\t<NcMultiselect id=\"targetUser\"\n\t\t\t\t\tv-model=\"selectedUser\"\n\t\t\t\t\t:options=\"formatedUserSuggestions\"\n\t\t\t\t\t:multiple=\"false\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:placeholder=\"t('files', 'Search for an account')\"\n\t\t\t\t\t:preselect-first=\"true\"\n\t\t\t\t\t:preserve-search=\"true\"\n\t\t\t\t\t:loading=\"loadingUsers\"\n\t\t\t\t\ttrack-by=\"user\"\n\t\t\t\t\tlabel=\"displayName\"\n\t\t\t\t\t:internal-search=\"false\"\n\t\t\t\t\t:clear-on-select=\"false\"\n\t\t\t\t\t:user-select=\"true\"\n\t\t\t\t\tclass=\"middle-align\"\n\t\t\t\t\t@search-change=\"findUserDebounced\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"submit\"\n\t\t\t\t\tclass=\"primary\"\n\t\t\t\t\t:value=\"submitButtonText\"\n\t\t\t\t\t:disabled=\"!canSubmit\">\n\t\t\t\t<span class=\"error\">{{ submitError }}</span>\n\t\t\t</p>\n\t\t</form>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport debounce from 'debounce'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getFilePickerBuilder, showSuccess } from '@nextcloud/dialogs'\nimport NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'\nimport Vue from 'vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\n\nimport logger from '../logger.js'\n\nconst picker = getFilePickerBuilder(t('files', 'Choose a file or folder to transfer'))\n\t.setMultiSelect(false)\n\t.setModal(true)\n\t.setType(1)\n\t.allowDirectories()\n\t.build()\n\nexport default {\n\tname: 'TransferOwnershipDialogue',\n\tcomponents: {\n\t\tNcMultiselect,\n\t\tNcButton,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdirectory: undefined,\n\t\t\tdirectoryPickerError: undefined,\n\t\t\tsubmitError: undefined,\n\t\t\tloadingUsers: false,\n\t\t\tselectedUser: null,\n\t\t\tuserSuggestions: {},\n\t\t\tconfig: {\n\t\t\t\tminSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,\n\t\t\t},\n\t\t}\n\t},\n\tcomputed: {\n\t\tcanSubmit() {\n\t\t\treturn !!this.directory && !!this.selectedUser\n\t\t},\n\t\tformatedUserSuggestions() {\n\t\t\treturn Object.keys(this.userSuggestions).map((uid) => {\n\t\t\t\tconst user = this.userSuggestions[uid]\n\t\t\t\treturn {\n\t\t\t\t\tuser: user.uid,\n\t\t\t\t\tdisplayName: user.displayName,\n\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tsubmitButtonText() {\n\t\t\tif (!this.canSubmit) {\n\t\t\t\treturn t('files', 'Transfer')\n\t\t\t}\n\t\t\tconst components = this.readableDirectory.split('/')\n\t\t\treturn t('files', 'Transfer {path} to {userid}', { path: components[components.length - 1], userid: this.selectedUser.displayName })\n\t\t},\n\t\treadableDirectory() {\n\t\t\tif (!this.directory) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn this.directory.substring(1)\n\t\t},\n\t},\n\tcreated() {\n\t\tthis.findUserDebounced = debounce(this.findUser, 300)\n\t\tthis.findUser('')\n\t},\n\tmethods: {\n\t\tstart() {\n\t\t\tthis.directoryPickerError = undefined\n\n\t\t\tpicker.pick()\n\t\t\t\t.then(dir => dir === '' ? '/' : dir)\n\t\t\t\t.then(dir => {\n\t\t\t\t\tlogger.debug(`path ${dir} selected for transferring ownership`)\n\t\t\t\t\tif (!dir.startsWith('/')) {\n\t\t\t\t\t\tthrow new Error(t('files', 'Invalid path selected'))\n\t\t\t\t\t}\n\t\t\t\t\t// /ocs/v2.php/apps/files/api/v1/transferownership\n\t\t\t\t\t// /ocs/v2.php/apps/files/api/v1/transferownership\n\t\t\t\t\tthis.directory = dir\n\t\t\t\t}).catch(error => {\n\t\t\t\t\tlogger.error(`Selecting object for transfer aborted: ${error.message || 'Unknown error'}`, { error })\n\n\t\t\t\t\tthis.directoryPickerError = error.message || t('files', 'Unknown error')\n\t\t\t\t})\n\t\t},\n\t\tasync findUser(query) {\n\t\t\tthis.query = query.trim()\n\n\t\t\tif (query.length < this.config.minSearchStringLength) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loadingUsers = true\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\titemType: 'file',\n\t\t\t\t\t\tsearch: query,\n\t\t\t\t\t\tperPage: 20,\n\t\t\t\t\t\tlookup: false,\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tthis.userSuggestions = {}\n\t\t\t\tresponse.data.ocs.data.exact.users.concat(response.data.ocs.data.users).forEach(user => {\n\t\t\t\t\tVue.set(this.userSuggestions, user.value.shareWith, {\n\t\t\t\t\t\tuid: user.value.shareWith,\n\t\t\t\t\t\tdisplayName: user.label,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('could not fetch users', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loadingUsers = false\n\t\t\t}\n\t\t},\n\t\tsubmit() {\n\t\t\tif (!this.canSubmit) {\n\t\t\t\tlogger.warn('ignoring form submit')\n\t\t\t}\n\n\t\t\tthis.submitError = undefined\n\t\t\tconst data = {\n\t\t\t\tpath: this.directory,\n\t\t\t\trecipient: this.selectedUser.user,\n\t\t\t}\n\t\t\tlogger.debug('submit transfer ownership form', data)\n\n\t\t\tconst url = generateOcsUrl('apps/files/api/v1/transferownership')\n\n\t\t\taxios.post(url, data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(data => {\n\t\t\t\t\tlogger.info('Transfer ownership request sent', { data })\n\n\t\t\t\t\tthis.directory = undefined\n\t\t\t\t\tthis.selectedUser = null\n\t\t\t\t\tshowSuccess(t('files', 'Ownership transfer request sent'))\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tlogger.error('Could not send ownership transfer request', { error })\n\n\t\t\t\t\tif (error?.response?.status === 403) {\n\t\t\t\t\t\tthis.submitError = t('files', 'Cannot transfer ownership of a file or folder you do not own')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.submitError = error.message || t('files', 'Unknown error')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.middle-align {\n\tvertical-align: middle;\n}\np {\n\tmargin-top: 12px;\n\tmargin-bottom: 12px;\n}\n.new-owner-row {\n\tdisplay: flex;\n\n\tlabel {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\tspan {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t\tmax-width: 280px;\n\t}\n}\n.transfer-select-row {\n\tspan {\n\t\tmargin-right: 8px;\n\t}\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=3b8774c3&prod&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=3b8774c3&prod&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TransferOwnershipDialogue.vue?vue&type=template&id=3b8774c3&scoped=true&\"\nimport script from \"./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"\nexport * from \"./TransferOwnershipDialogue.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TransferOwnershipDialogue.vue?vue&type=style&index=0&id=3b8774c3&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3b8774c3\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=script&lang=js&\"","<!--\n - @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -->\n\n<template>\n\t<div id=\"files-personal-settings\" class=\"section\">\n\t\t<h2>{{ t('files', 'Files') }}</h2>\n\t\t<TransferOwnershipDialogue />\n\t</div>\n</template>\n\n<script>\nimport TransferOwnershipDialogue from './TransferOwnershipDialogue.vue'\n\nexport default {\n\tname: 'PersonalSettings',\n\tcomponents: {\n\t\tTransferOwnershipDialogue,\n\t},\n}\n</script>\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('h3',[_vm._v(_vm._s(_vm.t('files', 'Transfer ownership of a file or folder'))+\" \")]),_vm._v(\" \"),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('p',{staticClass:\"transfer-select-row\"},[_c('span',[_vm._v(_vm._s(_vm.readableDirectory))]),_vm._v(\" \"),(_vm.directory === undefined)?_c('NcButton',{on:{\"click\":function($event){$event.preventDefault();return _vm.start.apply(null, arguments)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Choose file or folder to transfer'))+\"\\n\\t\\t\\t\")]):_c('NcButton',{on:{\"click\":function($event){$event.preventDefault();return _vm.start.apply(null, arguments)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Change'))+\"\\n\\t\\t\\t\")]),_vm._v(\" \"),_c('span',{staticClass:\"error\"},[_vm._v(_vm._s(_vm.directoryPickerError))])],1),_vm._v(\" \"),_c('p',{staticClass:\"new-owner-row\"},[_c('label',{attrs:{\"for\":\"targetUser\"}},[_c('span',[_vm._v(_vm._s(_vm.t('files', 'New owner')))])]),_vm._v(\" \"),_c('NcMultiselect',{staticClass:\"middle-align\",attrs:{\"id\":\"targetUser\",\"options\":_vm.formatedUserSuggestions,\"multiple\":false,\"searchable\":true,\"placeholder\":_vm.t('files', 'Search for an account'),\"preselect-first\":true,\"preserve-search\":true,\"loading\":_vm.loadingUsers,\"track-by\":\"user\",\"label\":\"displayName\",\"internal-search\":false,\"clear-on-select\":false,\"user-select\":true},on:{\"search-change\":_vm.findUserDebounced},model:{value:(_vm.selectedUser),callback:function ($$v) {_vm.selectedUser=$$v},expression:\"selectedUser\"}})],1),_vm._v(\" \"),_c('p',[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"disabled\":!_vm.canSubmit},domProps:{\"value\":_vm.submitButtonText}}),_vm._v(\" \"),_c('span',{staticClass:\"error\"},[_vm._v(_vm._s(_vm.submitError))])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./PersonalSettings.vue?vue&type=template&id=6bbac28a&\"\nimport script from \"./PersonalSettings.vue?vue&type=script&lang=js&\"\nexport * from \"./PersonalSettings.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"section\",attrs:{\"id\":\"files-personal-settings\"}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Files')))]),_vm._v(\" \"),_c('TransferOwnershipDialogue')],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\n\nimport PersonalSettings from './components/PersonalSettings.vue'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(getRequestToken())\n\nVue.prototype.t = t\n\nif (!window.TESTING) {\n\tconst View = Vue.extend(PersonalSettings)\n\tnew View().$mount('#files-personal-settings')\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".middle-align[data-v-3b8774c3]{vertical-align:middle}p[data-v-3b8774c3]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-3b8774c3]{display:flex}.new-owner-row label[data-v-3b8774c3]{display:flex;align-items:center}.new-owner-row label span[data-v-3b8774c3]{margin-right:8px}.new-owner-row .multiselect[data-v-3b8774c3]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-3b8774c3]{margin-right:8px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TransferOwnershipDialogue.vue\"],\"names\":[],\"mappings\":\"AACA,+BACC,qBAAA,CAED,mBACC,eAAA,CACA,kBAAA,CAED,gCACC,YAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CAEA,2CACC,gBAAA,CAIF,6CACC,WAAA,CACA,eAAA,CAID,2CACC,gBAAA\",\"sourcesContent\":[\"\\n.middle-align {\\n\\tvertical-align: middle;\\n}\\np {\\n\\tmargin-top: 12px;\\n\\tmargin-bottom: 12px;\\n}\\n.new-owner-row {\\n\\tdisplay: flex;\\n\\n\\tlabel {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\n\\t\\tspan {\\n\\t\\t\\tmargin-right: 8px;\\n\\t\\t}\\n\\t}\\n\\n\\t.multiselect {\\n\\t\\tflex-grow: 1;\\n\\t\\tmax-width: 280px;\\n\\t}\\n}\\n.transfer-select-row {\\n\\tspan {\\n\\t\\tmargin-right: 8px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1623;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1623: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(78852)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getLoggerBuilder","setApp","detectUser","build","picker","t","setMultiSelect","setModal","setType","allowDirectories","name","components","NcMultiselect","NcButton","data","directory","directoryPickerError","submitError","loadingUsers","selectedUser","userSuggestions","config","minSearchStringLength","computed","canSubmit","formatedUserSuggestions","user","displayName","icon","submitButtonText","path","userid","readableDirectory","created","methods","start","then","logger","error","params","format","itemType","search","perPage","lookup","response","Vue","uid","submit","recipient","axios","showSuccess","catch","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","TransferOwnershipDialogue","_vm","this","_c","_self","_v","_s","on","$event","preventDefault","apply","arguments","staticClass","undefined","attrs","findUserDebounced","model","value","callback","$$v","expression","domProps","__webpack_nonce__","btoa","getRequestToken","window","TESTING","PersonalSettings","$mount","___CSS_LOADER_EXPORT___","push","module","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file