/*! For license information please see core-main.js.LICENSE.txt */ (()=>{var e,o={6772:()=>{Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},97782:()=>{if("undefined"==typeof console||void 0===console.log){window.console||(window.console={});const e=()=>{},t=["log","debug","warn","info","error","assert","time","timeEnd"];for(let n=0;n{var o,i=n(19755);i.prototype.tooltip=(o=i.prototype.tooltip,function(e){try{return o.call(this,e)}catch(t){if(t instanceof TypeError&&"destroy"===e)return void 0===window.TESTING&&console.error("Deprecated call $.tooltip('destroy') has been deprecated and should be removed"),o.call(this,"dispose");if(t instanceof TypeError&&"fixTitle"===e)return void 0===window.TESTING&&console.error("Deprecated call $.tooltip('fixTitle') has been deprecated and should be removed"),o.call(this,"_fixTitle")}})},76389:()=>{if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){const e=document.createElement("style");e.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(e)}},4818:(e,o,i)=>{"use strict";var a={};i.r(a),i.d(a,{deleteKey:()=>P,getApps:()=>y,getKeys:()=>k,getValue:()=>x,setValue:()=>E});var s={};i.r(s),i.d(s,{formatLinksPlain:()=>at,formatLinksRich:()=>it,plainToRich:()=>nt,richToPlain:()=>ot});var r={};i.r(r),i.d(r,{dismiss:()=>rt,query:()=>st});var l=i(19755),c=i.n(l),d=(i(28594),i(35666),i(97782),i(6772),i(76389),i(74854)),u=i(79753);const p={},h=[];var g=i(64492),f=i(26932);const A={updatableNotification:null,getDefaultNotificationFunction:null,setDefault(e){this.getDefaultNotificationFunction=e},hide(e,t){g.default.isFunction(e)&&(t=e,e=void 0),e?(e.each((function(){c()(this)[0].toastify?c()(this)[0].toastify.hideToast():console.error("cannot hide toast because object is not set"),this===this.updatableNotification&&(this.updatableNotification=null)})),t&&t.call(),this.getDefaultNotificationFunction&&this.getDefaultNotificationFunction()):console.error("Missing argument $row in OC.Notification.hide() call, caller needs to be adjusted to only dismiss its own notification")},showHtml(e,t){(t=t||{}).isHTML=!0,t.timeout=t.timeout?t.timeout:f.Rl;const n=(0,f.PV)(e,t);return n.toastElement.toastify=n,c()(n.toastElement)},show(e,t){(t=t||{}).timeout=t.timeout?t.timeout:f.Rl;const n=(0,f.PV)(function(e){return e.toString().split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}(e),t);return n.toastElement.toastify=n,c()(n.toastElement)},showUpdate(e){return this.updatableNotification&&this.updatableNotification.hideToast(),this.updatableNotification=(0,f.PV)(e,{timeout:f.Rl}),this.updatableNotification.toastElement.toastify=this.updatableNotification,c()(this.updatableNotification.toastElement)},showTemporary(e,t){(t=t||{}).timeout=t.timeout||f.TN;const n=(0,f.PV)(e,t);return n.toastElement.toastify=n,c()(n.toastElement)},isHidden:()=>!c()("#content").find(".toastify").length},m=g.default.throttle((()=>{A.showTemporary(t("core","Connection to server lost"))}),7e3,{trailing:!1});let v=!1;const w={enableDynamicSlideToggle(){v=!0},showAppSidebar:function(e){(e||c()("#app-sidebar")).removeClass("disappear").show(),c()("#app-content").trigger(new(c().Event)("appresized"))},hideAppSidebar:function(e){(e||c()("#app-sidebar")).hide().addClass("disappear"),c()("#app-content").trigger(new(c().Event)("appresized"))}};var C=i(64492);function b(e,t,n){"post"!==e&&"delete"!==e||!Se.PasswordConfirmation.requiresPasswordConfirmation()?(n=n||{},c().ajax({type:e.toUpperCase(),url:(0,u.generateOcsUrl)("apps/provisioning_api/api/v1/config/apps")+t,data:n.data||{},success:n.success,error:n.error})):Se.PasswordConfirmation.requirePasswordConfirmation(C.bind(b,this,e,t,n))}function y(e){b("get","",e)}function k(e,t){b("get","/"+e,t)}function x(e,t,n,o){(o=o||{}).data={defaultValue:n},b("get","/"+e+"/"+t,o)}function E(e,t,n,o){(o=o||{}).data={value:n},b("post","/"+e+"/"+t,o)}function P(e,t,n){b("delete","/"+e+"/"+t,n)}const B=window.oc_appconfig||{},O={getValue:function(e,t,n,o){x(e,t,n,{success:o})},setValue:function(e,t,n){E(e,t,n)},getApps:function(e){y({success:e})},getKeys:function(e,t){k(e,{success:t})},deleteKey:function(e,t){P(e,t)}},T=void 0!==window._oc_appswebroots&&window._oc_appswebroots;var j=i(72316),D=i.n(j),I=i(87240);const _={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read:"PROPFIND"};function z(e,t){if(g.default.isArray(e))return g.default.map(e,(function(e){return z(e,t)}));var n={href:e.href};return g.default.each(e.propStat,(function(e){if("HTTP/1.1 200 OK"===e.status)for(var o in e.properties){var i=o;o in t&&(i=t[o]),n[i]=e.properties[o]}})),n.id||(n.id=N(n.href)),n}function N(e){var t=e.indexOf("?");t>0&&(e=e.substr(0,t));var n,o=e.split("/");do{n=o[o.length-1],o.pop()}while(!n&&o.length>0);return n}function M(e){return e>=200&&e<=299}function S(e,t,n,o){return e.propPatch(t.url,function(e,t){var n,o={};for(n in e){var i=t[n],a=e[n];i||(console.warn('No matching DAV property for property "'+n),i=n),(g.default.isBoolean(a)||g.default.isNumber(a))&&(a=""+a),o[i]=a}return o}(n.changed,t.davProperties),o).then((function(e){M(e.status)?g.default.isFunction(t.success)&&t.success(n.toJSON()):g.default.isFunction(t.error)&&t.error(e)}))}const L=D().noConflict();Object.assign(L,{davCall:(e,t)=>{var n=new I.dav.Client({baseUrl:e.url,xmlNamespaces:g.default.extend({"DAV:":"d","http://owncloud.org/ns":"oc"},e.xmlNamespaces||{})});n.resolveUrl=function(){return e.url};var o=g.default.extend({"X-Requested-With":"XMLHttpRequest",requesttoken:OC.requestToken},e.headers);return"PROPFIND"===e.type?function(e,t,n,o){return e.propFind(t.url,g.default.values(t.davProperties)||[],t.depth,o).then((function(e){if(M(e.status)){if(g.default.isFunction(t.success)){var n=g.default.invert(t.davProperties),o=z(e.body,n);t.depth>0&&o.shift(),t.success(o)}}else g.default.isFunction(t.error)&&t.error(e)}))}(n,e,0,o):"PROPPATCH"===e.type?S(n,e,t,o):"MKCOL"===e.type?function(e,t,n,o){return e.request(t.type,t.url,o,null).then((function(i){M(i.status)?S(e,t,n,o):g.default.isFunction(t.error)&&t.error(i)}))}(n,e,t,o):function(e,t,n,o){return o["Content-Type"]="application/json",e.request(t.type,t.url,o,t.data).then((function(e){if(M(e.status)){if(g.default.isFunction(t.success)){if("PUT"===t.type||"POST"===t.type||"MKCOL"===t.type){var o=e.body||n.toJSON(),i=e.xhr.getResponseHeader("Content-Location");return"POST"===t.type&&i&&(o.id=N(i)),void t.success(o)}if(207===e.status){var a=g.default.invert(t.davProperties);t.success(z(e.body,a))}else t.success(e.body)}}else g.default.isFunction(t.error)&&t.error(e)}))}(n,e,t,o)},davSync:(e=>(t,n,o)=>{var i={type:_[t]||t},a=n instanceof e.Collection;if("update"===t&&(n.hasInnerCollection?i.type="MKCOL":(n.usePUT||n.collection&&n.collection.usePUT)&&(i.type="PUT")),o.url||(i.url=g.default.result(n,"url")||function(){throw new Error('A "url" property or function must be specified')}()),null!=o.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(i.data=JSON.stringify(o.attrs||n.toJSON(o))),"PROPFIND"!==i.type&&(i.processData=!1),"PROPFIND"===i.type||"PROPPATCH"===i.type){var s=n.davProperties;!s&&n.model&&(s=n.model.prototype.davProperties),s&&(g.default.isFunction(s)?i.davProperties=s.call(n):i.davProperties=s),i.davProperties=g.default.extend(i.davProperties||{},o.davProperties),g.default.isUndefined(o.depth)&&(o.depth=a?1:0)}var r=o.error;o.error=function(e,t,n){o.textStatus=t,o.errorThrown=n,r&&r.call(o.context,e,t,n)};var l=o.xhr=e.davCall(g.default.extend(i,o),n);return n.trigger("request",n,l,o),l})(L)});const U=L;var F=i(76632);const R=window._oc_config||{};var Q=i(64492);const G=j.Model.extend({defaults:{fullName:"",lastMessage:"",actions:[],hasOneAction:!1,hasTwoActions:!1,hasManyActions:!1},initialize:function(){0===this.get("actions").length?this.set("hasOneAction",!0):1===this.get("actions").length?(this.set("hasTwoActions",!0),this.set("secondAction",this.get("actions")[0])):this.set("hasManyActions",!0)}}),H=j.Collection.extend({model:G}),K=j.View.extend({_collection:void 0,_subViews:[],initialize:function(e){this._collection=e.collection},render:function(){var e=this;return e.$el.html(""),e._subViews=[],e._collection.forEach((function(t){var n=new Y({model:t});n.render(),e.$el.append(n.$el),n.on("toggle:actionmenu",e._onChildActionMenuToggle,e),e._subViews.push(n)})),e},_onChildActionMenuToggle:function(e){this._subViews.forEach((function(t){t.trigger("parent:toggle:actionmenu",e)}))}}),Y=j.View.extend({className:"contact",_template:void 0,_model:void 0,_actionMenuShown:!1,events:{"click .icon-more":"_onToggleActionsMenu"},contactTemplate:i(10944),template:function(e){return this.contactTemplate(e)},initialize:function(e){this._model=e.model,this.on("parent:toggle:actionmenu",this._onOtherActionMenuOpened,this)},render:function(){return this.$el.html(this.template({contact:this._model.toJSON()})),this.delegateEvents(),this.$("div.avatar").imageplaceholder(this._model.get("fullName")),this.$(".top-action").tooltip({placement:"left"}),this.$(".second-action").tooltip({placement:"left"}),this},_onToggleActionsMenu:function(){this._actionMenuShown=!this._actionMenuShown,this._actionMenuShown?this.$(".menu").show():this.$(".menu").hide(),this.trigger("toggle:actionmenu",this.$el)},_onOtherActionMenuOpened:function(e){this.$el.is(e)||(this._actionMenuShown=!1,this.$(".menu").hide())}}),q=j.View.extend({_loadingTemplate:void 0,_errorTemplate:void 0,_contentTemplate:void 0,_contactsTemplate:void 0,_contacts:void 0,_searchTerm:"",events:{"input #contactsmenu-search":"_onSearch"},templates:{loading:i(95386),error:i(20421),menu:i(66115),list:i(34083)},_onSearch:Q.debounce((function(e){var t=this.$("#contactsmenu-search").val();t!==this._searchTerm&&(this.trigger("search",this.$("#contactsmenu-search").val()),this._searchTerm=t)}),700),loadingTemplate:function(e){return this.templates.loading(e)},errorTemplate:function(e){return this.templates.error(Q.extend({couldNotLoadText:t("core","Could not load your contacts")},e))},contentTemplate:function(e){return this.templates.menu(Q.extend({searchContactsText:t("core","Search contacts …")},e))},contactsTemplate:function(e){return this.templates.list(Q.extend({noContactsFoundText:t("core","No contacts found"),showAllContactsText:t("core","Show all contacts …"),contactsAppMgmtText:t("core","Install the Contacts app")},e))},initialize:function(e){this.options=e},showLoading:function(e){this.render(),this._contacts=void 0,this.$(".content").html(this.loadingTemplate({loadingText:e}))},showError:function(){this.render(),this._contacts=void 0,this.$(".content").html(this.errorTemplate())},showContacts:function(e,t){this._contacts=e.contacts,this.render({contacts:e.contacts});var n=new K({collection:e.contacts});n.render(),this.$(".content").html(this.contactsTemplate({contacts:e.contacts,searchTerm:t,contactsAppEnabled:e.contactsAppEnabled,contactsAppURL:Se.generateUrl("/apps/contacts"),canInstallApp:Se.isUserAdmin(),contactsAppMgmtURL:Se.generateUrl("/settings/apps/social/contacts")})),this.$("#contactsmenu-contacts").html(n.$el)},render:function(e){var t=this.$("#contactsmenu-search").val();return this.$el.html(this.contentTemplate(e)),this.$("#contactsmenu-search").val(t),this.$("#contactsmenu-search").focus(),this}}),J=function(e){this.initialize(e)};J.prototype={$el:void 0,_$trigger:void 0,_view:void 0,_contactsPromise:void 0,initialize:function(e){this.$el=e.el,this._$trigger=e.trigger,this._view=new q({el:this.$el}),this._view.on("search",(function(e){this._loadContacts(e)}),this),Se.registerMenu(this._$trigger,this.$el,function(){this._toggleVisibility(!0)}.bind(this),!0),this.$el.on("beforeHide",function(){this._toggleVisibility(!1)}.bind(this))},_toggleVisibility:function(e){return e?this._loadContacts():(this.$el.html(""),Promise.resolve())},_getContacts:function(e){var t=Se.generateUrl("/contactsmenu/contacts");return Promise.resolve(c().ajax(t,{method:"POST",data:{filter:e}}))},_loadContacts:function(e){var n=this;return n._contactsPromise||(n._contactsPromise=n._getContacts(e)),Q.isUndefined(e)||""===e?n._view.showLoading(t("core","Loading your contacts …")):n._view.showLoading(t("core","Looking for {term} …",{term:e})),n._contactsPromise.then((function(t){t.contacts=new H(t.contacts),n._view.showContacts(t,e)}),(function(e){n._view.showError(),console.error("There was an error loading your contacts",e)})).then((function(){delete n._contactsPromise})).catch(console.error.bind(this))}};const W=J,V=document.getElementsByTagName("head")[0].getAttribute("data-user"),Z=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),X=void 0!==V&&V,$={Search:class{constructor(){console.warn("OCA.Search is deprecated. Please use the unified search API instead")}}},ee={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,dialogsCounter:0,alert:function(e,t,n,o){this.message(e,t,"alert",ee.OK_BUTTON,n,o)},info:function(e,t,n,o){this.message(e,t,"info",ee.OK_BUTTON,n,o)},confirm:function(e,t,n,o){return this.message(e,t,"notice",ee.YES_NO_BUTTONS,n,o)},confirmDestructive:function(e,t,n,o,i){return this.message(e,t,"none",n,o,void 0===i||i)},confirmHtml:function(e,t,n,o){return this.message(e,t,"notice",ee.YES_NO_BUTTONS,n,o,!0)},prompt:function(e,n,o,i,a,s){return c().when(this._getMessageTemplate()).then((function(r){var l="oc-dialog-"+ee.dialogsCounter+"-content",d="#"+l,u=r.octemplate({dialog_name:l,title:n,message:e,type:"notice"}),p=c()("");p.attr("type",s?"password":"text").attr("id",l+"-input").attr("placeholder",a);var h=c()("