diff --git a/core/src/jquery/css/jquery.ocdialog.scss b/core/src/jquery/css/jquery.ocdialog.scss
index 1911dd29dc48a..6fba1a78d4025 100644
--- a/core/src/jquery/css/jquery.ocdialog.scss
+++ b/core/src/jquery/css/jquery.ocdialog.scss
@@ -4,7 +4,7 @@
border-radius: var(--border-radius-large);
box-shadow: 0 0 30px var(--color-box-shadow);
padding: 24px;
- z-index: 10000;
+ z-index: 100001;
font-size: 100%;
box-sizing: border-box;
min-width: 200px;
@@ -69,7 +69,7 @@
.oc-dialog-dim {
background-color: #000;
opacity: .2;
- z-index: 9999;
+ z-index: 100001;
position: fixed;
top: 0;
left: 0;
diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js
index 2d547443be9d8..75cfdc3ad0525 100644
--- a/core/src/jquery/ocdialog.js
+++ b/core/src/jquery/ocdialog.js
@@ -234,7 +234,7 @@ $.widget('oc.ocdialog', {
}
this.overlay = $('
')
.addClass('oc-dialog-dim')
- .appendTo(contentDiv)
+ .insertBefore(this.$dialog)
this.overlay.on('click keydown keyup', function(event) {
if (event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) {
event.preventDefault()
diff --git a/dist/core-main.js b/dist/core-main.js
index 926254425d03c..75654bea0cfa3 100644
--- a/dist/core-main.js
+++ b/dist/core-main.js
@@ -1,3 +1,3 @@
/*! For license information please see core-main.js.LICENSE.txt */
-(()=>{var e,i,o,r={41548:(e,i,o)=>{"use strict";var r={};o.r(r),o.d(r,{deleteKey:()=>k,getApps:()=>v,getKeys:()=>x,getValue:()=>w,setValue:()=>y});var s={};o.r(s),o.d(s,{formatLinksPlain:()=>fi,formatLinksRich:()=>Ai,plainToRich:()=>di,richToPlain:()=>pi});var a={};o.r(a),o.d(a,{dismiss:()=>bi,query:()=>mi}),o(84315),o(7452);var c=o(61338),l=o(4523),u=o(74692),h=o.n(u),d=o(85168),p=o(96763);const A={updatableNotification:null,getDefaultNotificationFunction:null,setDefault(t){this.getDefaultNotificationFunction=t},hide(t,e){l.default.isFunction(t)&&(e=t,t=void 0),t?(t.each((function(){h()(this)[0].toastify?h()(this)[0].toastify.hideToast():p.error("cannot hide toast because object is not set"),this===this.updatableNotification&&(this.updatableNotification=null)})),e&&e.call(),this.getDefaultNotificationFunction&&this.getDefaultNotificationFunction()):p.error("Missing argument $row in OC.Notification.hide() call, caller needs to be adjusted to only dismiss its own notification")},showHtml(t,e){(e=e||{}).isHTML=!0,e.timeout=e.timeout?e.timeout:d.DH;const i=(0,d.rG)(t,e);return i.toastElement.toastify=i,h()(i.toastElement)},show(t,e){(e=e||{}).timeout=e.timeout?e.timeout:d.DH;const i=(0,d.rG)(function(t){return t.toString().split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}(t),e);return i.toastElement.toastify=i,h()(i.toastElement)},showUpdate(t){return this.updatableNotification&&this.updatableNotification.hideToast(),this.updatableNotification=(0,d.rG)(t,{timeout:d.DH}),this.updatableNotification.toastElement.toastify=this.updatableNotification,h()(this.updatableNotification.toastElement)},showTemporary(t,e){(e=e||{}).timeout=e.timeout||d.aR;const i=(0,d.rG)(t,e);return i.toastElement.toastify=i,h()(i.toastElement)},isHidden:()=>!h()("#content").find(".toastify").length},f=l.default.throttle((()=>{A.showTemporary(t("core","Connection to server lost"))}),7e3,{trailing:!1});let g=!1;const m={enableDynamicSlideToggle(){g=!0},showAppSidebar:function(t){(t||h()("#app-sidebar")).removeClass("disappear").show(),h()("#app-content").trigger(new(h().Event)("appresized"))},hideAppSidebar:function(t){(t||h()("#app-sidebar")).hide().addClass("disappear"),h()("#app-content").trigger(new(h().Event)("appresized"))}};var b=o(63814);function C(t,e,i){"post"!==t&&"delete"!==t||!_t.PasswordConfirmation.requiresPasswordConfirmation()?(i=i||{},h().ajax({type:t.toUpperCase(),url:(0,b.KT)("apps/provisioning_api/api/v1/config/apps")+e,data:i.data||{},success:i.success,error:i.error})):_t.PasswordConfirmation.requirePasswordConfirmation(_.bind(C,this,t,e,i))}function v(t){C("get","",t)}function x(t,e){C("get","/"+t,e)}function w(t,e,i,n){(n=n||{}).data={defaultValue:i},C("get","/"+t+"/"+e,n)}function y(t,e,i,n){(n=n||{}).data={value:i},C("post","/"+t+"/"+e,n)}function k(t,e,i){C("delete","/"+t+"/"+e,i)}const B=window.oc_appconfig||{},E={getValue:function(t,e,i,n){w(t,e,i,{success:n})},setValue:function(t,e,i){y(t,e,i)},getApps:function(t){v({success:t})},getKeys:function(t,e){x(t,{success:e})},deleteKey:function(t,e){k(t,e)}},D=void 0!==window._oc_appswebroots&&window._oc_appswebroots;var I=o(21391),S=o.n(I),T=o(78112),M=o(96763);const P={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read:"PROPFIND"};function O(t,e){if(l.default.isArray(t))return l.default.map(t,(function(t){return O(t,e)}));var i={href:t.href};return l.default.each(t.propStat,(function(t){if("HTTP/1.1 200 OK"===t.status)for(var n in t.properties){var o=n;n in e&&(o=e[n]),i[o]=t.properties[n]}})),i.id||(i.id=z(i.href)),i}function z(t){var e=t.indexOf("?");e>0&&(t=t.substr(0,e));var i,n=t.split("/");do{i=n[n.length-1],n.pop()}while(!i&&n.length>0);return i}function R(t){return t>=200&&t<=299}function H(t,e,i,n){return t.propPatch(e.url,function(t,e){var i,n={};for(i in t){var o=e[i],r=t[i];o||(M.warn('No matching DAV property for property "'+i),o=i),(l.default.isBoolean(r)||l.default.isNumber(r))&&(r=""+r),n[o]=r}return n}(i.changed,e.davProperties),n).then((function(t){R(t.status)?l.default.isFunction(e.success)&&e.success(i.toJSON()):l.default.isFunction(e.error)&&e.error(t)}))}const N=S().noConflict();Object.assign(N,{davCall:(t,e)=>{var i=new T.dav.Client({baseUrl:t.url,xmlNamespaces:l.default.extend({"DAV:":"d","http://owncloud.org/ns":"oc"},t.xmlNamespaces||{})});i.resolveUrl=function(){return t.url};var n=l.default.extend({"X-Requested-With":"XMLHttpRequest",requesttoken:OC.requestToken},t.headers);return"PROPFIND"===t.type?function(t,e,i,n){return t.propFind(e.url,l.default.values(e.davProperties)||[],e.depth,n).then((function(t){if(R(t.status)){if(l.default.isFunction(e.success)){var i=l.default.invert(e.davProperties),n=O(t.body,i);e.depth>0&&n.shift(),e.success(n)}}else l.default.isFunction(e.error)&&e.error(t)}))}(i,t,0,n):"PROPPATCH"===t.type?H(i,t,e,n):"MKCOL"===t.type?function(t,e,i,n){return t.request(e.type,e.url,n,null).then((function(o){R(o.status)?H(t,e,i,n):l.default.isFunction(e.error)&&e.error(o)}))}(i,t,e,n):function(t,e,i,n){return n["Content-Type"]="application/json",t.request(e.type,e.url,n,e.data).then((function(t){if(R(t.status)){if(l.default.isFunction(e.success)){if("PUT"===e.type||"POST"===e.type||"MKCOL"===e.type){var n=t.body||i.toJSON(),o=t.xhr.getResponseHeader("Content-Location");return"POST"===e.type&&o&&(n.id=z(o)),void e.success(n)}if(207===t.status){var r=l.default.invert(e.davProperties);e.success(O(t.body,r))}else e.success(t.body)}}else l.default.isFunction(e.error)&&e.error(t)}))}(i,t,e,n)},davSync:(t=>(e,i,n)=>{var o={type:P[e]||e},r=i instanceof t.Collection;if("update"===e&&(i.hasInnerCollection?o.type="MKCOL":(i.usePUT||i.collection&&i.collection.usePUT)&&(o.type="PUT")),n.url||(o.url=l.default.result(i,"url")||function(){throw new Error('A "url" property or function must be specified')}()),null!=n.data||!i||"create"!==e&&"update"!==e&&"patch"!==e||(o.data=JSON.stringify(n.attrs||i.toJSON(n))),"PROPFIND"!==o.type&&(o.processData=!1),"PROPFIND"===o.type||"PROPPATCH"===o.type){var s=i.davProperties;!s&&i.model&&(s=i.model.prototype.davProperties),s&&(l.default.isFunction(s)?o.davProperties=s.call(i):o.davProperties=s),o.davProperties=l.default.extend(o.davProperties||{},n.davProperties),l.default.isUndefined(n.depth)&&(n.depth=r?1:0)}var a=n.error;n.error=function(t,e,i){n.textStatus=e,n.errorThrown=i,a&&a.call(n.context,t,e,i)};var c=n.xhr=t.davCall(l.default.extend(o,n),i);return i.trigger("request",i,c,n),c})(N)});const U=N;var j=o(71089);const L=window._oc_config||{},F=document.getElementsByTagName("head")[0].getAttribute("data-user"),W=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Y=void 0!==F&&F;var q=o(39285),Q=o(36882),G=o(43627);const X={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(t,e,i,n){this.message(t,e,"alert",X.OK_BUTTON,i,n)},info:function(t,e,i,n){this.message(t,e,"info",X.OK_BUTTON,i,n)},confirm:function(t,e,i,n){return this.message(t,e,"notice",X.YES_NO_BUTTONS,i,n)},confirmDestructive:function(t,e,i,n,o){return this.message(t,e,"none",i,n,void 0===o||o)},confirmHtml:function(t,e,i,n){return this.message(t,e,"notice",X.YES_NO_BUTTONS,i,n,!0)},prompt:function(e,i,n,o,r,s){return h().when(this._getMessageTemplate()).then((function(a){var c="oc-dialog-"+X.dialogsCounter+"-content",u="#"+c,d=a.octemplate({dialog_name:c,title:i,message:e,type:"notice"}),p=h()("
");p.attr("type",s?"password":"text").attr("id",c+"-input").attr("placeholder",r);var A=h()("
").attr("for",c+"-input").text(r+": ");d.append(A),d.append(p),void 0===o&&(o=!1),h()("body").append(d),void 0!==n&&(n=l.default.once(n));var f=[{text:t("core","No"),click:function(){void 0!==n&&n(!1,p.val()),h()(u).ocdialog("close")}},{text:t("core","Yes"),click:function(){void 0!==n&&n(!0,p.val()),h()(u).ocdialog("close")},defaultButton:!0}];h()(u).ocdialog({closeOnEscape:!0,modal:o,buttons:f,close:function(){void 0!==n&&n(!1,p.val())}}),p.focus(),X.dialogsCounter++}))},filepicker(e,i){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:d.bh.Choose,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0;const c=(t,e)=>{const i=t=>{const e=(null==t?void 0:t.root)||"";let i=(null==t?void 0:t.path)||"";return i.startsWith(e)&&(i=i.slice(e.length)||"/"),i};return n?n=>t(n.map(i),e):n=>t(i(n[0]),e)},l=(0,d.a1)(e);r===this.FILEPICKER_TYPE_CUSTOM?(a.buttons||[]).forEach((t=>{l.addButton({callback:c(i,t.type),label:t.text,type:t.defaultButton?"primary":"secondary"})})):l.setButtonFactory(((e,n)=>{var o,s;const a=[],l=(null==e||null===(o=e[0])||void 0===o||null===(o=o.attributes)||void 0===o?void 0:o.displayName)||(null==e||null===(s=e[0])||void 0===s?void 0:s.basename),u=l||(0,G.basename)(n);return r===d.bh.Choose&&a.push({callback:c(i,d.bh.Choose),label:l&&!this.multiSelect?t("core","Choose {file}",{file:l}):t("core","Choose"),type:"primary"}),r!==d.bh.CopyMove&&r!==d.bh.Copy||a.push({callback:c(i,d.bh.Copy),label:u?t("core","Copy to {target}",{target:u}):t("core","Copy"),type:"primary",icon:Q}),r!==d.bh.Move&&r!==d.bh.CopyMove||a.push({callback:c(i,d.bh.Move),label:u?t("core","Move to {target}",{target:u}):t("core","Move"),type:r===d.bh.Move?"primary":"secondary",icon:q}),a})),o&&l.setMimeTypeFilter("string"==typeof o?[o]:o||[]),"function"==typeof(null==a?void 0:a.filter)&&l.setFilter((t=>a.filter((t=>{var e,i,n,o,r,s;return{id:t.fileid||null,path:t.path,mimetype:t.mime||null,mtime:(null===(e=t.mtime)||void 0===e?void 0:e.getTime())||null,permissions:t.permissions,name:(null===(i=t.attributes)||void 0===i?void 0:i.displayName)||t.basename,etag:(null===(n=t.attributes)||void 0===n?void 0:n.etag)||null,hasPreview:(null===(o=t.attributes)||void 0===o?void 0:o.hasPreview)||null,mountType:(null===(r=t.attributes)||void 0===r?void 0:r.mountType)||null,quotaAvailableBytes:(null===(s=t.attributes)||void 0===s?void 0:s.quotaAvailableBytes)||null,icon:null,sharePermissions:null}})(t)))),l.allowDirectories(!0===(null==a?void 0:a.allowDirectoryChooser)||(null==o?void 0:o.includes("httpd/unix-directory"))||!1).setMultiSelect(n).startAt(s).build().pick()},message:function(e,i,n,o,r,s,a){return h().when(this._getMessageTemplate()).then((function(c){var l="oc-dialog-"+X.dialogsCounter+"-content",u="#"+l,d=c.octemplate({dialog_name:l,title:i,message:e,type:n},a?{escapeFunction:""}:{});void 0===s&&(s=!1),h()("body").append(d);var p=[];switch(o){case X.YES_NO_BUTTONS:p=[{text:t("core","No"),click:function(){void 0!==r&&r(!1),h()(u).ocdialog("close")}},{text:t("core","Yes"),click:function(){void 0!==r&&r(!0),h()(u).ocdialog("close")},defaultButton:!0}];break;case X.OK_BUTTON:p[0]={text:t("core","OK"),click:function(){h()(u).ocdialog("close"),void 0!==r&&r()},defaultButton:!0};break;default:"object"==typeof o&&o.type===X.YES_NO_BUTTONS&&(p=[{text:o.cancel||t("core","No"),click:function(){void 0!==r&&r(!1),h()(u).ocdialog("close")}},{text:o.confirm||t("core","Yes"),click:function(){void 0!==r&&r(!0),h()(u).ocdialog("close")},defaultButton:!0,classes:o.confirmClasses}])}h()(u).ocdialog({closeOnEscape:!0,closeCallback:()=>{r&&r(!1)},modal:s,buttons:p}),X.dialogsCounter++})).fail((function(n,o){0===n?alert(i+": "+e):alert(t("core","Error loading message template: {error}",{error:o}))}))},_fileexistsshown:!1,fileexists:function(e,i,o,r){var s=this,a=new(h().Deferred),c=function(t,e,i,n,o){n=Math.round(n),o=Math.round(o);for(var r=t.getContext("2d").getImageData(0,0,e,i),s=t.getContext("2d").getImageData(0,0,n,o),a=r.data,c=s.data,l=e/n,u=i/o,h=Math.ceil(l/2),d=Math.ceil(u/2),p=0;p
=-1&&S<=1&&(g=2*S*S*S-3*S*S+1)>0&&(w+=g*a[3+(I=4*(D+k*e))],b+=g,a[I+3]<255&&(g=g*a[I+3]/250),C+=g*a[I],v+=g*a[I+1],x+=g*a[I+2],m+=g)}c[f]=C/m,c[f+1]=v/m,c[f+2]=x/m,c[f+3]=w/b}t.getContext("2d").clearRect(0,0,Math.max(e,n),Math.max(i,o)),t.width=n,t.height=o,t.getContext("2d").putImageData(s,0,0)},l=function(i,n,o){var r=i.find(".template").clone().removeClass("template").addClass("conflict"),s=r.find(".original"),a=r.find(".replacement");r.data("data",e),r.find(".filename").text(n.name),s.find(".size").text(_t.Util.humanFileSize(n.size)),s.find(".mtime").text(_t.Util.formatDate(n.mtime)),o.size&&o.lastModified&&(a.find(".size").text(_t.Util.humanFileSize(o.size)),a.find(".mtime").text(_t.Util.formatDate(o.lastModified)));var l=n.directory+"/"+n.name,u={file:l,x:96,y:96,c:n.etag,forceIcon:0},d=Files.generatePreviewUrl(u);d=d.replace(/'/g,"%27"),s.find(".icon").css({"background-image":"url('"+d+"')"}),function(t){var e=new(h().Deferred),i=t.type&&t.type.split("/").shift();if(window.FileReader&&"image"===i){var n=new FileReader;n.onload=function(t){var i=new Blob([t.target.result]);window.URL=window.URL||window.webkitURL;var n=window.URL.createObjectURL(i),o=new Image;o.src=n,o.onload=function(){var t,i,n,r,s,a,l,u=(t=o,s=document.createElement("canvas"),a=t.width,l=t.height,a>l?(n=0,i=(a-l)/2):(n=(l-a)/2,i=0),r=Math.min(a,l),s.width=r,s.height=r,s.getContext("2d").drawImage(t,i,n,r,r,0,0,r,r),c(s,r,r,96,96),s.toDataURL("image/png",.7));e.resolve(u)}},n.readAsArrayBuffer(t)}else e.reject();return e}(o).then((function(t){a.find(".icon").css("background-image","url("+t+")")}),(function(){l=_t.MimeType.getIconUrl(o.type),a.find(".icon").css("background-image","url("+l+")")}));var p=i.find(".conflict").length;s.find("input:checkbox").attr("id","checkbox_original_"+p),a.find("input:checkbox").attr("id","checkbox_replacement_"+p),i.append(r),o.lastModified>n.mtime?a.find(".mtime").css("font-weight","bold"):o.lastModifiedn.size?a.find(".size").css("font-weight","bold"):o.size&&o.size0?(h()(d).find(".allnewfiles").prop("checked",!1),h()(d).find(".allnewfiles + .count").text(t("core","({count} selected)",{count:e}))):(h()(d).find(".allnewfiles").prop("checked",!1),h()(d).find(".allnewfiles + .count").text("")),m()})),h()(d).on("click",".original,.allexistingfiles",(function(){var e=h()(d).find('.conflict .original input[type="checkbox"]:checked').length;e===h()(d+" .conflict").length?(h()(d).find(".allexistingfiles").prop("checked",!0),h()(d).find(".allexistingfiles + .count").text(t("core","(all selected)"))):e>0?(h()(d).find(".allexistingfiles").prop("checked",!1),h()(d).find(".allexistingfiles + .count").text(t("core","({count} selected)",{count:e}))):(h()(d).find(".allexistingfiles").prop("checked",!1),h()(d).find(".allexistingfiles + .count").text("")),m()})),a.resolve()})).fail((function(){a.reject(),alert(t("core","Error loading file exists template"))}));return a.promise()},_getMessageTemplate:function(){var t=h().Deferred();if(this.$messageTemplate)t.resolve(this.$messageTemplate);else{var e=this;h().get(_t.filePath("core","templates","message.html"),(function(i){e.$messageTemplate=h()(i),t.resolve(e.$messageTemplate)})).fail((function(e,i,n){t.reject(e.status,n)}))}return t.promise()},_getFileExistsTemplate:function(){var t=h().Deferred();if(this.$fileexistsTemplate)t.resolve(this.$fileexistsTemplate);else{var e=this;h().get(_t.filePath("files","templates","fileexists.html"),(function(i){e.$fileexistsTemplate=h()(i),t.resolve(e.$fileexistsTemplate)})).fail((function(){t.reject()}))}return t.promise()}},V=X,K=((t,e)=>{let i=t.getElementsByTagName("head")[0].getAttribute("data-requesttoken");return{getToken:()=>i,setToken:t=>{i=t,e("csrf-token-update",{token:i})}}})(document,c.Ic),J=K.getToken,Z=K.setToken,$=function(t,e){var i,n,o="";if(this.typelessListeners=[],this.closed=!1,this.listeners={},e)for(i in e)o+=i+"="+encodeURIComponent(e[i])+"&";if(o+="requesttoken="+encodeURIComponent(J()),this.useFallBack||"undefined"==typeof EventSource){var r="oc_eventsource_iframe_"+$.iframeCount;$.fallBackSources[$.iframeCount]=this,this.iframe=h()(""),this.iframe.attr("id",r),this.iframe.hide(),n="&",-1===t.indexOf("?")&&(n="?"),this.iframe.attr("src",t+n+"fallback=true&fallback_id="+$.iframeCount+"&"+o),h()("body").append(this.iframe),this.useFallBack=!0,$.iframeCount++}else n="&",-1===t.indexOf("?")&&(n="?"),this.source=new EventSource(t+n+o),this.source.onmessage=function(t){for(var e=0;e(0,dt.o)(),requirePasswordConfirmation(t,e,i){(0,dt.C)().then(t,i)}},At={_plugins:{},register(t,e){let i=this._plugins[t];i||(i=this._plugins[t]=[]),i.push(e)},getPlugins(t){return this._plugins[t]||[]},attach(t,e,i){const n=this.getPlugins(t);for(let t=0;t-1&&parseInt(navigator.userAgent.split("/").pop())<51){const t=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let e,i=0,n=t.length;i=0?t.substr(e+1):t.length?t.substr(1):""},_decodeQuery:t=>t.replace(/\+/g," "),parseUrlQuery(){const t=this._parseHashQuery();let e;return t&&(e=_t.parseQueryString(this._decodeQuery(t))),e=l.default.extend(e||{},_t.parseQueryString(this._decodeQuery(location.search))),e||{}},_onPopState(t){if(this._cancelPop)return void(this._cancelPop=!1);let e;if(this._handlers.length){e=t&&t.state,l.default.isString(e)?e=_t.parseQueryString(e):e||(e=this.parseUrlQuery()||{});for(let t=0;t="0"&&i<="9";s!==r&&(o++,e[o]="",r=s),e[o]+=i,n++}return e}const wt={History:bt,humanFileSize:Ct.v7,computerFileSize(t){if("string"!=typeof t)return null;const e=t.toLowerCase().trim();let i=null;const n=e.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i);return null===n?null:(i=parseFloat(e),isFinite(i)?(n[5]&&(i*={b:1,k:1024,kb:1024,mb:1048576,m:1048576,gb:1073741824,g:1073741824,tb:1099511627776,t:1099511627776,pb:0x4000000000000,p:0x4000000000000}[n[5]]),i=Math.round(i),i):null)},formatDate:(t,e)=>(void 0===window.TESTING&&_t.debug&&vt.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),e=e||"LLL",mt()(t).format(e)),relativeModifiedDate(e){void 0===window.TESTING&&_t.debug&&vt.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const i=mt()().diff(mt()(e));return i>=0&&i<45e3?t("core","seconds ago"):mt()(e).fromNow()},getScrollBarWidth(){if(this._scrollBarWidth)return this._scrollBarWidth;const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const i=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return i===n&&(n=e.clientWidth),document.body.removeChild(e),this._scrollBarWidth=i-n,this._scrollBarWidth},stripTime:t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),naturalSortCompare(t,e){let i;const n=xt(t),o=xt(e);for(i=0;n[i]&&o[i];i++)if(n[i]!==o[i]){const t=Number(n[i]),e=Number(o[i]);return t==n[i]&&e==o[i]?t-e:n[i].localeCompare(o[i],_t.getLanguage())}return n.length-o.length},waitFor(t,e){const i=function(){!0!==t()&&setTimeout(i,e)};i()},isCookieSetToValue(t,e){const i=document.cookie.split(";");for(let n=0;n!$_",fileIsBlacklisted:t=>!!t.match(L.blacklist_files_regex),Apps:m,AppConfig:E,appConfig:B,appswebroots:D,Backbone:U,config:L,currentUser:Y,dialogs:V,EventSource:tt,getCurrentUser:()=>({uid:Y,displayName:W}),isUserAdmin:()=>st,L10N:ut,_ajaxConnectionLostHandler:f,_processAjaxError:t=>{(0!==t.status||"abort"!==t.statusText&&"timeout"!==t.statusText&&!_t._reloadCalled)&&(l.default.contains([302,303,307,401],t.status)&&_t.currentUser?setTimeout((function(){if(!_t._userIsNavigatingAway&&!_t._reloadCalled){let t=0;const e=5,i=setInterval((function(){A.showUpdate(n("core","Problem loading page, reloading in %n second","Problem loading page, reloading in %n seconds",e-t)),t>=e&&(clearInterval(i),_t.reload()),t++}),1e3);_t._reloadCalled=!0}}),100):0===t.status&&setTimeout((function(){_t._userIsNavigatingAway||_t._reloadCalled||_t._ajaxConnectionLostHandler()}),100))},registerXHRForErrorProcessing:t=>{t.addEventListener&&(t.addEventListener("load",(()=>{4===t.readyState&&(t.status>=200&&t.status<300||304===t.status||h()(document).trigger(new(h().Event)("ajaxError"),t))})),t.addEventListener("error",(()=>{h()(document).trigger(new(h().Event)("ajaxError"),t)})))},getCapabilities:()=>(OC.debug&&it.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,et.F)()),hideMenus:rt,registerMenu:function(t,e,i,n){e.addClass("menu");const o="A"===t.prop("tagName")||"BUTTON"===t.prop("tagName");t.on(o?"click.menu":"click.menu keyup.menu",(function(o){o.preventDefault(),o.key&&"Enter"!==o.key||(e.is(nt)?rt():(nt&&rt(),!0===n&&e.parent().addClass("openedMenu"),t.attr("aria-expanded",!0),e.slideToggle(50,i),nt=e,ot=t))}))},showMenu:(t,e,i)=>{e.is(nt)||(rt(),nt=e,ot=t,e.trigger(new(h().Event)("beforeShow")),e.show(),e.trigger(new(h().Event)("afterShow")),l.default.isFunction(i)&&i())},unregisterMenu:(t,e)=>{e.is(nt)&&rt(),t.off("click.menu").removeClass("menutoggle"),e.removeClass("menu")},basename:j.P8,encodePath:j.O0,dirname:j.pD,isSamePath:j.ys,joinPaths:j.HS,getHost:()=>window.location.host,getHostName:()=>window.location.hostname,getPort:()=>window.location.port,getProtocol:()=>window.location.protocol.split(":")[0],getCanonicalLocale:lt.lO,getLocale:lt.JK,getLanguage:lt.Z0,buildQueryString:t=>t?h().map(t,(function(t,e){let i=encodeURIComponent(e);return null!=t&&(i+="="+encodeURIComponent(t)),i})).join("&"):"",parseQueryString:t=>{let e,i;const n={};let o;if(!t)return null;e=t.indexOf("?"),e>=0&&(t=t.substr(e+1));const r=t.replace(/\+/g,"%20").split("&");for(let t=0;t=0?[s.substr(0,e),s.substr(e+1)]:[s],i.length&&(o=decodeURIComponent(i[0]),o&&(n[o]=i.length>1?decodeURIComponent(i[1]):null))}return n},msg:ht,Notification:A,PasswordConfirmation:pt,Plugins:At,theme:ft,Util:wt,debug:yt,filePath:b.fg,generateUrl:b.Jv,get:(Dt=window,t=>{const e=t.split("."),i=e.pop();for(let t=0;t(e,i)=>{const n=e.split("."),o=n.pop();for(let e=0;e{window.location=t},reload:()=>{window.location.reload()},requestToken:J(),linkTo:b.uM,linkToOCS:(t,e)=>(0,b.KT)(t,{},{ocsVersion:e||1})+"/",linkToRemote:b.dC,linkToRemoteBase:t=>(0,b.aU)()+"/remote.php/"+t,webroot:Bt};var Dt;(0,c.B1)("csrf-token-update",(t=>{OC.requestToken=t.token,Et.info("OC.requestToken changed",t.token)}));var It=o(38613),St=o(92457),Tt=o(96763);let Mt=null;const Pt=async()=>{try{const t=await(async()=>{const t=(0,b.Jv)("/csrftoken");return(await h().get(t)).token})();Z(t)}catch(t){Tt.error("session heartbeat failed",t)}},Ot=()=>{const t=setInterval(Pt,1e3*(()=>{let t=NaN;return Mt.session_lifetime&&(t=Math.floor(Mt.session_lifetime/2)),Math.min(86400,Math.max(60,isNaN(t)?900:t))})());return Tt.info("session heartbeat polling started"),t};var zt=o(85471),Rt=o(26287);const Ht={name:"ContactsIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Nt=o(14486);const Ut=(0,Nt.A)(Ht,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon contacts-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M20,0H4V2H20V0M4,24H20V22H4V24M20,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6A2,2 0 0,0 20,4M12,6.75A2.25,2.25 0 0,1 14.25,9A2.25,2.25 0 0,1 12,11.25A2.25,2.25 0 0,1 9.75,9A2.25,2.25 0 0,1 12,6.75M17,17H7V15.5C7,13.83 10.33,13 12,13C13.67,13 17,13.83 17,15.5V17Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var jt=o(17334),Lt=o.n(jt),Ft=o(55602),Wt=o(9518),Yt=o(10833),qt=o(94305),Qt=o(46222),Gt=o(10700),Xt=o(63961),Vt=o(24764),Kt=o(41944);const Jt={name:"Contact",components:{NcActionLink:Gt.A,NcActionText:Xt.A,NcActions:Vt.A,NcAvatar:Kt.A},props:{contact:{required:!0,type:Object}},computed:{actions(){return this.contact.topAction?[this.contact.topAction,...this.contact.actions]:this.contact.actions},preloadedUserStatus(){if(this.contact.status)return{status:this.contact.status,message:this.contact.statusMessage,icon:this.contact.statusIcon}}}};var Zt=o(85072),$t=o.n(Zt),te=o(97825),ee=o.n(te),ie=o(77659),ne=o.n(ie),oe=o(55056),re=o.n(oe),se=o(10540),ae=o.n(se),ce=o(41113),le=o.n(ce),ue=o(88330),he={};he.styleTagTransform=le(),he.setAttributes=re(),he.insert=ne().bind(null,"head"),he.domAPI=ee(),he.insertStyleElement=ae(),$t()(ue.A,he),ue.A&&ue.A.locals&&ue.A.locals;const de=(0,Nt.A)(Jt,(function(){var t,e=this,i=e._self._c;return i("li",{staticClass:"contact"},[i("NcAvatar",{staticClass:"contact__avatar",attrs:{size:44,user:e.contact.isUser?e.contact.uid:void 0,"is-no-user":!e.contact.isUser,"disable-menu":!0,"display-name":e.contact.avatarLabel,"preloaded-user-status":e.preloadedUserStatus}}),e._v(" "),i("a",{staticClass:"contact__body",attrs:{href:e.contact.profileUrl||(null===(t=e.contact.topAction)||void 0===t?void 0:t.hyperlink)}},[i("div",{staticClass:"contact__body__full-name"},[e._v(e._s(e.contact.fullName))]),e._v(" "),e.contact.lastMessage?i("div",{staticClass:"contact__body__last-message"},[e._v(e._s(e.contact.lastMessage))]):e._e(),e._v(" "),e.contact.statusMessage?i("div",{staticClass:"contact__body__status-message"},[e._v(e._s(e.contact.statusMessage))]):i("div",{staticClass:"contact__body__email-address"},[e._v(e._s(e.contact.emailAddresses[0]))])]),e._v(" "),e.actions.length?i("NcActions",{attrs:{inline:e.contact.topAction?1:0}},[e._l(e.actions,(function(t,n){return["#"!==t.hyperlink?i("NcActionLink",{key:n,staticClass:"other-actions",attrs:{href:t.hyperlink},scopedSlots:e._u([{key:"icon",fn:function(){return[i("img",{staticClass:"contact__action__icon",attrs:{"aria-hidden":"true",src:t.icon}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t"+e._s(t.title)+"\n\t\t\t")]):i("NcActionText",{key:n,staticClass:"other-actions",scopedSlots:e._u([{key:"icon",fn:function(){return[i("img",{staticClass:"contact__action__icon",attrs:{"aria-hidden":"true",src:t.icon}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t"+e._s(t.title)+"\n\t\t\t")])]}))],2):e._e()],1)}),[],!1,null,"1e31737f",null).exports;var pe=o(53529);const Ae=null===(fe=(0,St.HW)())?(0,pe.YK)().setApp("core").build():(0,pe.YK)().setApp("core").setUid(fe.uid).build();var fe;const ge={data:()=>({OC:_t}),methods:{t:ut.translate.bind(ut),n:ut.translatePlural.bind(ut)}};var me=o(82182);const be={name:"ContactsMenu",components:{Contact:de,Contacts:Ut,Magnify:Ft.A,NcButton:Wt.A,NcEmptyContent:Yt.A,NcHeaderMenu:qt.N,NcLoadingIcon:Qt.A,NcTextField:me.A},mixins:[ge],data(){const t=(0,St.HW)();return{contactsAppEnabled:!1,contactsAppURL:(0,b.Jv)("/apps/contacts"),contactsAppMgmtURL:(0,b.Jv)("/settings/apps/social/contacts"),canInstallApp:t.isAdmin,contacts:[],loadingText:void 0,error:!1,searchTerm:""}},methods:{async handleOpen(){await this.getContacts("")},async getContacts(t){this.loadingText=""===t?(0,lt.Tl)("core","Loading your contacts …"):(0,lt.Tl)("core","Looking for {term} …",{term:t}),this.error=!1;try{const{data:{contacts:e,contactsAppEnabled:i}}=await Rt.A.post((0,b.Jv)("/contactsmenu/contacts"),{filter:t});this.contacts=e,this.contactsAppEnabled=i,this.loadingText=void 0}catch(e){Ae.error("could not load contacts",{error:e,searchTerm:t}),this.error=!0}},onInputDebounced:Lt()((function(){this.getContacts(this.searchTerm)}),500),onReset(){this.searchTerm="",this.contacts=[],this.focusInput()},focusInput(){this.$nextTick((()=>{this.$refs.contactsMenuInput.focus(),this.$refs.contactsMenuInput.select()}))}}},Ce=be;var ve=o(54040),xe={};xe.styleTagTransform=le(),xe.setAttributes=re(),xe.insert=ne().bind(null,"head"),xe.domAPI=ee(),xe.insertStyleElement=ae(),$t()(ve.A,xe),ve.A&&ve.A.locals&&ve.A.locals;const we=(0,Nt.A)(Ce,(function(){var t=this,e=t._self._c;return e("NcHeaderMenu",{staticClass:"contactsmenu",attrs:{id:"contactsmenu","aria-label":t.t("core","Search contacts")},on:{open:t.handleOpen},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("Contacts",{attrs:{size:20}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"contactsmenu__menu"},[e("div",{staticClass:"contactsmenu__menu__input-wrapper"},[e("NcTextField",{ref:"contactsMenuInput",staticClass:"contactsmenu__menu__search",attrs:{value:t.searchTerm,"trailing-button-icon":"close",label:t.t("core","Search contacts"),"trailing-button-label":t.t("core","Reset search"),"show-trailing-button":""!==t.searchTerm,placeholder:t.t("core","Search contacts …"),id:"contactsmenu__menu__search"},on:{"update:value":function(e){t.searchTerm=e},input:t.onInputDebounced,"trailing-button-click":t.onReset}})],1),t._v(" "),t.error?e("NcEmptyContent",{attrs:{name:t.t("core","Could not load your contacts")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Magnify")]},proxy:!0}],null,!1,931131664)}):t.loadingText?e("NcEmptyContent",{attrs:{name:t.loadingText},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}])}):0===t.contacts.length?e("NcEmptyContent",{attrs:{name:t.t("core","No contacts found")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Magnify")]},proxy:!0}])}):e("div",{staticClass:"contactsmenu__menu__content"},[e("div",{attrs:{id:"contactsmenu-contacts"}},[e("ul",t._l(t.contacts,(function(t){return e("Contact",{key:t.id,attrs:{contact:t}})})),1)]),t._v(" "),t.contactsAppEnabled?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e("NcButton",{attrs:{type:"tertiary",href:t.contactsAppURL}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Show all contacts"))+"\n\t\t\t\t")])],1):t.canInstallApp?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e("NcButton",{attrs:{type:"tertiary",href:t.contactsAppMgmtURL}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Install the Contacts app"))+"\n\t\t\t\t")])],1):t._e()])],1)])}),[],!1,null,"21a53255",null).exports,ye={name:"AppMenu",components:{NcActions:Vt.A,NcActionLink:Gt.A},data:()=>({apps:(0,It.C)("core","apps",{}),appLimit:0,observer:null}),computed:{appList(){return Object.values(this.apps)},mainAppList(){return this.appList.slice(0,this.appLimit)},popoverAppList(){return this.appList.slice(this.appLimit)},appLabel:()=>e=>e.name+(e.active?" ("+t("core","Currently open")+")":"")+(e.unread>0?" ("+n("core","{count} notification","{count} notifications",e.unread,{count:e.unread})+")":"")},mounted(){this.observer=new ResizeObserver(this.resize),this.observer.observe(this.$el),this.resize(),(0,c.B1)("nextcloud:app-menu.refresh",this.setApps)},beforeDestroy(){this.observer.disconnect(),(0,c.al)("nextcloud:app-menu.refresh",this.setApps)},methods:{setNavigationCounter(t,e){this.$set(this.apps[t],"unread",e)},setApps(t){let{apps:e}=t;this.apps=e},resize(){const t=this.$el.offsetWidth;let e=Math.floor(t/50)-1;1==this.appList.length-e&&e--,e<1&&(e=0),this.appLimit=e}}},ke=ye;var Be=o(9578),Ee={};Ee.styleTagTransform=le(),Ee.setAttributes=re(),Ee.insert=ne().bind(null,"head"),Ee.domAPI=ee(),Ee.insertStyleElement=ae(),$t()(Be.A,Ee),Be.A&&Be.A.locals&&Be.A.locals;const _e=(0,Nt.A)(ke,(function(){var t=this,e=t._self._c;return e("nav",{staticClass:"app-menu",attrs:{"aria-label":t.t("core","Applications menu")}},[e("ul",{staticClass:"app-menu-main"},t._l(t.mainAppList,(function(i){return e("li",{key:i.id,staticClass:"app-menu-entry",class:{"app-menu-entry__active":i.active},attrs:{"data-app-id":i.id}},[e("a",{class:{"has-unread":i.unread>0},attrs:{href:i.href,"aria-label":t.appLabel(i),title:i.name,"aria-current":!!i.active&&"page",target:i.target?"_blank":void 0,rel:i.target?"noopener noreferrer":void 0}},[e("img",{attrs:{src:i.icon,alt:""}}),t._v(" "),e("div",{staticClass:"app-menu-entry--label"},[t._v("\n\t\t\t\t\t"+t._s(i.name)+"\n\t\t\t\t\t"),i.unread>0?e("span",{staticClass:"hidden-visually unread-counter"},[t._v(t._s(i.unread))]):t._e()])])])})),0),t._v(" "),e("NcActions",{staticClass:"app-menu-more",attrs:{"aria-label":t.t("core","More apps")}},t._l(t.popoverAppList,(function(i){return e("NcActionLink",{key:i.id,staticClass:"app-menu-popover-entry",attrs:{"aria-label":t.appLabel(i),"aria-current":!!i.active&&"page",href:i.href},scopedSlots:t._u([{key:"icon",fn:function(){return[e("div",{staticClass:"app-icon",class:{"has-unread":i.unread>0}},[e("img",{attrs:{src:i.icon,alt:""}})])]},proxy:!0}],null,!0)},[t._v("\n\t\t\t"+t._s(i.name)+"\n\t\t\t"),i.unread>0?e("span",{staticClass:"hidden-visually unread-counter"},[t._v(t._s(i.unread))]):t._e()])})),1)],1)}),[],!1,null,"62f74e6b",null).exports,{profileEnabled:De}=(0,It.C)("user_status","profileEnabled",!1),Ie={name:"ProfileUserMenuEntry",components:{NcLoadingIcon:Qt.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,required:!0}},data:()=>({profileEnabled:De,displayName:(0,St.HW)().displayName,loading:!1}),mounted(){(0,c.B1)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,c.B1)("settings:display-name:updated",this.handleDisplayNameUpdate)},beforeDestroy(){(0,c.al)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,c.al)("settings:display-name:updated",this.handleDisplayNameUpdate)},methods:{handleClick(){this.profileEnabled&&(this.loading=!0)},handleProfileEnabledUpdate(t){this.profileEnabled=t},handleDisplayNameUpdate(t){this.displayName=t}}},Se=Ie;var Te=o(3058),Me={};Me.styleTagTransform=le(),Me.setAttributes=re(),Me.insert=ne().bind(null,"head"),Me.domAPI=ee(),Me.insertStyleElement=ae(),$t()(Te.A,Me),Te.A&&Te.A.locals&&Te.A.locals;const Pe=(0,Nt.A)(Se,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"menu-entry",attrs:{id:t.id}},[e(t.profileEnabled?"a":"span",{tag:"component",staticClass:"menu-entry__wrapper",class:{active:t.active,"menu-entry__wrapper--link":t.profileEnabled},attrs:{href:t.profileEnabled?t.href:void 0},on:{click:function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.handleClick.apply(null,arguments)}}},[e("span",{staticClass:"menu-entry__content"},[e("span",{staticClass:"menu-entry__displayname"},[t._v(t._s(t.displayName))]),t._v(" "),t.loading?e("NcLoadingIcon",{attrs:{size:18}}):t._e()],1),t._v(" "),t.profileEnabled?e("span",[t._v(t._s(t.name))]):t._e()])],1)}),[],!1,null,"34b2b979",null).exports,Oe=(0,It.C)("core","versionHash",""),ze={name:"UserMenuEntry",components:{NcLoadingIcon:Qt.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,required:!0},icon:{type:String,required:!0}},data:()=>({loading:!1}),computed:{cachedIcon(){return"".concat(this.icon,"?v=").concat(Oe)}},methods:{handleClick(){this.loading=!0}}};var Re=o(67720),He={};He.styleTagTransform=le(),He.setAttributes=re(),He.insert=ne().bind(null,"head"),He.domAPI=ee(),He.insertStyleElement=ae(),$t()(Re.A,He),Re.A&&Re.A.locals&&Re.A.locals;const Ne=(0,Nt.A)(ze,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"menu-entry",attrs:{id:t.id}},[t.href?e("a",{class:{active:t.active},attrs:{href:t.href},on:{click:function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.handleClick.apply(null,arguments)}}},[t.loading?e("NcLoadingIcon",{staticClass:"menu-entry__loading-icon",attrs:{size:18}}):e("img",{attrs:{src:t.cachedIcon,alt:""}}),t._v("\n\t\t"+t._s(t.name)+"\n\t")],1):e("button",[e("img",{attrs:{src:t.cachedIcon,alt:""}}),t._v("\n\t\t"+t._s(t.name)+"\n\t")])])}),[],!1,null,"4252d05c",null).exports,Ue=(0,It.C)("core","settingsNavEntries",[]),{profile:je,...Le}=Ue,Fe=t=>{const e=Object.fromEntries([{type:"online",label:(0,lt.Tl)("user_status","Online")},{type:"away",label:(0,lt.Tl)("user_status","Away")},{type:"dnd",label:(0,lt.Tl)("user_status","Do not disturb"),subline:(0,lt.Tl)("user_status","Mute all notifications")},{type:"invisible",label:(0,lt.Tl)("user_status","Invisible"),subline:(0,lt.Tl)("user_status","Appear offline")}].map((t=>{let{type:e,label:i}=t;return[e,i]})));return e[t]?e[t]:t},We={name:"UserMenu",components:{NcAvatar:Kt.A,NcHeaderMenu:qt.N,ProfileUserMenuEntry:Pe,UserMenuEntry:Ne},data(){var t,e;return{profileEntry:je,otherEntries:Le,displayName:null===(t=(0,St.HW)())||void 0===t?void 0:t.displayName,userId:null===(e=(0,St.HW)())||void 0===e?void 0:e.uid,isLoadingUserStatus:!0,userStatus:{status:null,icon:null,message:null}}},computed:{translatedUserStatus(){return{...this.userStatus,status:Fe(this.userStatus.status)}},avatarDescription(){return[t("core","Avatar of {displayName}",{displayName:this.displayName}),...Object.values(this.translatedUserStatus).filter(Boolean)].join(" — ")}},async created(){var t;if(null===(t=(0,et.F)())||void 0===t||null===(t=t.user_status)||void 0===t||!t.enabled)return void(this.isLoadingUserStatus=!1);const e=(0,b.KT)("/apps/user_status/api/v1/user_status");try{const t=await Rt.A.get(e),{status:i,icon:n,message:o}=t.data.ocs.data;this.userStatus={status:i,icon:n,message:o}}catch(t){Ae.error("Failed to load user status")}this.isLoadingUserStatus=!1},mounted(){(0,c.B1)("user_status:status.updated",this.handleUserStatusUpdated),(0,c.Ic)("core:user-menu:mounted")},methods:{handleUserStatusUpdated(t){this.userId===t.userId&&(this.userStatus={status:t.status,icon:t.icon,message:t.message})}}};var Ye=o(32400),qe={};qe.styleTagTransform=le(),qe.setAttributes=re(),qe.insert=ne().bind(null,"head"),qe.domAPI=ee(),qe.insertStyleElement=ae(),$t()(Ye.A,qe),Ye.A&&Ye.A.locals&&Ye.A.locals;const Qe=(0,Nt.A)(We,(function(){var t=this,e=t._self._c;return e("NcHeaderMenu",{staticClass:"user-menu",attrs:{id:"user-menu","is-nav":"","aria-label":t.t("core","Settings menu"),description:t.avatarDescription},scopedSlots:t._u([{key:"trigger",fn:function(){return[t.isLoadingUserStatus?t._e():e("NcAvatar",{staticClass:"user-menu__avatar",attrs:{"disable-menu":!0,"disable-tooltip":!0,user:t.userId,"preloaded-user-status":t.userStatus}})]},proxy:!0}])},[t._v(" "),e("ul",[e("ProfileUserMenuEntry",{attrs:{id:t.profileEntry.id,name:t.profileEntry.name,href:t.profileEntry.href,active:t.profileEntry.active}}),t._v(" "),t._l(t.otherEntries,(function(t){return e("UserMenuEntry",{key:t.id,attrs:{id:t.id,name:t.name,href:t.href,active:t.active,icon:t.icon}})}))],2)])}),[],!1,null,"278043d4",null).exports,Ge=t=>{const e=window.location.protocol+"//"+window.location.host+(0,b.aU)();return t.startsWith(e)||(t=>!t.startsWith("https://")&&!t.startsWith("http://"))(t)&&t.startsWith((0,b.aU)())},Xe=()=>{var t;XMLHttpRequest.prototype.open=(t=XMLHttpRequest.prototype.open,function(e,i,n){t.apply(this,arguments),Ge(i)&&!this.getResponseHeader("X-Requested-With")&&this.setRequestHeader("X-Requested-With","XMLHttpRequest")}),window.fetch=function(t){return(e,i)=>{var n;return Ge(null!==(n=e.url)&&void 0!==n?n:e.toString())?(i||(i={}),i.headers||(i.headers=new Headers),i.headers instanceof Headers&&!i.headers.has("X-Requested-With")?i.headers.append("X-Requested-With","XMLHttpRequest"):i.headers instanceof Object&&!i.headers["X-Requested-With"]&&(i.headers["X-Requested-With"]="XMLHttpRequest"),t(e,i)):t(e,i)}}(window.fetch)},Ve=()=>{setInterval((()=>{h()(".live-relative-timestamp").each((function(){const t=parseInt(h()(this).attr("data-timestamp"),10);h()(this).text(mt()(t).fromNow())}))}),3e4)},Ke={zh:"zh-cn",zh_Hans:"zh-cn",zh_Hans_CN:"zh-cn",zh_Hans_HK:"zh-cn",zh_Hans_MO:"zh-cn",zh_Hans_SG:"zh-cn",zh_Hant:"zh-hk",zh_Hant_HK:"zh-hk",zh_Hant_MO:"zh-mo",zh_Hant_TW:"zh-tw"};let Je=_t.getLocale();Object.prototype.hasOwnProperty.call(Ke,Je)&&(Je=Ke[Je]),mt().locale(Je);const Ze=()=>{if(Xe(),h()(window).on("unload.main",(()=>{_t._unloadCalled=!0})),h()(window).on("beforeunload.main",(()=>{setTimeout((()=>{_t._userIsNavigatingAway=!0,setTimeout((()=>{_t._unloadCalled||(_t._userIsNavigatingAway=!1)}),1e4)}),1)})),h()(document).on("ajaxError.main",(function(t,e,i){i&&i.allowAuthErrors||_t._processAjaxError(e)})),(()=>{if((()=>{try{Mt=(0,It.C)("core","config")}catch(t){Mt=_t.config}})(),(()=>{if(!Mt.auto_logout||!(0,St.HW)())return;let t=Date.now();window.addEventListener("mousemove",(e=>{t=Date.now(),localStorage.setItem("lastActive",t)})),window.addEventListener("touchstart",(e=>{t=Date.now(),localStorage.setItem("lastActive",t)})),window.addEventListener("storage",(e=>{"lastActive"===e.key&&(t=e.newValue)}));let e=0;e=setInterval((()=>{const i=Date.now()-1e3*Mt.session_lifetime;if(t{Tt.info("browser is online again, resuming heartbeat"),t=Ot();try{await Pt(),Tt.info("session token successfully updated after resuming network"),(0,c.Ic)("networkOnline",{success:!0})}catch(t){Tt.error("could not update session token after resuming network",t),(0,c.Ic)("networkOnline",{success:!1})}})),window.addEventListener("offline",(()=>{Tt.info("browser is offline, stopping heartbeat"),(0,c.Ic)("networkOffline",{}),clearInterval(t),Tt.info("session heartbeat polling stopped")}))})(),_t.registerMenu(h()("#expand"),h()("#expanddiv"),!1,!0),h()(document).on("mouseup.closemenus",(t=>{const e=h()(t.target);if(e.closest(".menu").length||e.closest(".menutoggle").length)return!1;_t.hideMenus()})),(()=>{zt.Ay.mixin({methods:{t:lt.Tl,n:lt.zw}});const t=document.getElementById("header-left__appmenu");if(!t)return;const e=new(zt.Ay.extend(_e))({}).$mount(t);Object.assign(OC,{setNavigationCounter(t,i){e.setNavigationCounter(t,i)}})})(),(()=>{const t=document.getElementById("user-menu");t&&new zt.Ay({el:t,render:t=>t(Qe)})})(),(()=>{const t=document.getElementById("contactsmenu");t&&new zt.Ay({el:t,render:t=>t(we)})})(),h()("#app-navigation").length&&!h()("html").hasClass("lte9")&&!h()("#app-content").hasClass("no-snapper")){const t=new Snap({element:document.getElementById("app-content"),disable:"right",maxPosition:300,minDragDistance:100});h()("#app-content").prepend('');let e=!1;t.on("animating",(()=>{e=!0})),t.on("animated",(()=>{e=!1})),t.on("start",(()=>{e=!0})),t.on("end",(()=>{e=!1})),t.on("open",(()=>{s.attr("aria-hidden","false")})),t.on("close",(()=>{s.attr("aria-hidden","true")}));const i=t.open,n=t.close,o=()=>{e||"closed"!==t.state().state||i("left")},r=()=>{e||"closed"===t.state().state||n()};window.TESTING||(t.open=()=>{l.default.defer(o)},t.close=()=>{l.default.defer(r)}),h()("#app-navigation-toggle").click((e=>{"left"!==t.state().state&&t.open()})),h()("#app-navigation-toggle").keypress((e=>{"left"===t.state().state?t.close():t.open()}));const s=h()("#app-navigation");s.attr("aria-hidden","true"),s.delegate("a, :button","click",(e=>{const i=h()(e.target);i.is(".app-navigation-noclose")||i.closest(".app-navigation-noclose").length||i.is(".app-navigation-entry-utils-menu-button")||i.closest(".app-navigation-entry-utils-menu-button").length||i.is(".add-new")||i.closest(".add-new").length||i.is("#app-settings")||i.closest("#app-settings").length||t.close()}));let a=!1,c=!0,u=!1;_t.allowNavigationBarSlideGesture=()=>{c=!0,u&&(t.enable(),a=!0,u=!1)},_t.disallowNavigationBarSlideGesture=()=>{if(c=!1,a){const e=!0;t.disable(e),a=!1,u=!0}};const d=()=>{h()(window).width()>1024?(s.attr("aria-hidden","false"),t.close(),t.disable(),a=!1,u=!1):c?(t.enable(),a=!0,u=!1):u=!0};h()(window).resize(l.default.debounce(d,250)),d()}Ve()};o(99660);var $e=o(3131),ti={};ti.styleTagTransform=le(),ti.setAttributes=re(),ti.insert=ne().bind(null,"head"),ti.domAPI=ee(),ti.insertStyleElement=ae(),$t()($e.A,ti),$e.A&&$e.A.locals&&$e.A.locals;var ei=o(13169),ii={};ii.styleTagTransform=le(),ii.setAttributes=re(),ii.insert=ne().bind(null,"head"),ii.domAPI=ee(),ii.insertStyleElement=ae(),$t()(ei.A,ii),ei.A&&ei.A.locals&&ei.A.locals;var ni=o(57576),oi=o.n(ni),ri=o(18922),si=o.n(ri),ai=(o(44275),o(35156)),ci={};ci.styleTagTransform=le(),ci.setAttributes=re(),ci.insert=ne().bind(null,"head"),ci.domAPI=ee(),ci.insertStyleElement=ae(),$t()(ai.A,ci),ai.A&&ai.A.locals&&ai.A.locals,o(57223),o(53425);var li=o(86140),ui={};ui.styleTagTransform=le(),ui.setAttributes=re(),ui.insert=ne().bind(null,"head"),ui.domAPI=ee(),ui.insertStyleElement=ae(),$t()(li.A,ui),li.A&&li.A.locals&&li.A.locals;const hi=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/gi;function di(t){return this.formatLinksRich(t)}function pi(t){return this.formatLinksPlain(t)}function Ai(t){return t.replace(hi,(function(t,e,i,n,o){let r=n;return i?"http://"===i&&(r=i+n):i="https://",e+''+r+""+o}))}function fi(t){const e=h()("").html(t);return e.find("a").each((function(){const t=h()(this);t.html(t.attr("href"))})),e.html()}var gi=o(96763);function mi(e){const i=(e=e||{}).dismiss||{};h().ajax({type:"GET",url:e.url||(0,b.KT)("core/whatsnew?format=json"),success:e.success||function(e,n,o){!function(e,i,n,o){if(gi.debug("querying Whats New data was successful: "+i),gi.debug(e),200!==n.status)return;let r,s,a,c;const u=document.createElement("div");u.classList.add("popovermenu","open","whatsNewPopover","menu-left");const h=document.createElement("ul");r=document.createElement("li"),s=document.createElement("span"),s.className="menuitem",a=document.createElement("span"),a.innerText=t("core","New in")+" "+e.ocs.data.product,a.className="caption",s.appendChild(a),c=document.createElement("span"),c.className="icon-close",c.onclick=function(){bi(e.ocs.data.version,o)},s.appendChild(c),r.appendChild(s),h.appendChild(r);for(const t in e.ocs.data.whatsNew.regular){const i=e.ocs.data.whatsNew.regular[t];r=document.createElement("li"),s=document.createElement("span"),s.className="menuitem",c=document.createElement("span"),c.className="icon-checkmark",s.appendChild(c),a=document.createElement("p"),a.innerHTML=l.default.escape(i),s.appendChild(a),r.appendChild(s),h.appendChild(r)}l.default.isUndefined(e.ocs.data.changelogURL)||(r=document.createElement("li"),s=document.createElement("a"),s.href=e.ocs.data.changelogURL,s.rel="noreferrer noopener",s.target="_blank",c=document.createElement("span"),c.className="icon-link",s.appendChild(c),a=document.createElement("span"),a.innerText=t("core","View changelog"),s.appendChild(a),r.appendChild(s),h.appendChild(r)),u.appendChild(h),document.body.appendChild(u)}(e,n,o,i)},error:e.error||Ci})}function bi(t,e){e=e||{},h().ajax({type:"POST",url:e.url||(0,b.KT)("core/whatsnew"),data:{version:encodeURIComponent(t)},success:e.success||vi,error:e.error||xi}),h()(".whatsNewPopover").remove()}function Ci(t,e,i){gi.debug("querying Whats New Data resulted in an error: "+e+i),gi.debug(t)}function vi(t){}function xi(t){gi.debug("dismissing Whats New data resulted in an error: "+t)}const wi={disableKeyboardShortcuts:()=>(0,It.C)("theming","shortcutsDisabled",!1),setPageHeading:function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}};var yi=o(70580),ki=o.n(yi);const Bi={},Ei={},_i={},Di={loadScript(t,e){const i=t+e;return Object.prototype.hasOwnProperty.call(Ei,i)?Promise.resolve():(Ei[i]=!0,new Promise((function(i,n){const o=OC.filePath(t,"js",e),r=document.createElement("script");r.src=o,r.setAttribute("nonce",btoa(OC.requestToken)),r.onload=()=>i(),r.onerror=()=>n(new Error("Failed to load script from ".concat(o))),document.head.appendChild(r)})))},loadStylesheet(t,e){const i=t+e;return Object.prototype.hasOwnProperty.call(_i,i)?Promise.resolve():(_i[i]=!0,new Promise((function(i,n){const o=OC.filePath(t,"css",e),r=document.createElement("link");r.href=o,r.type="text/css",r.rel="stylesheet",r.onload=()=>i(),r.onerror=()=>n(new Error("Failed to load stylesheet from ".concat(o))),document.head.appendChild(r)})))}},Ii={success:(t,e)=>(0,d.Te)(t,e),warning:(t,e)=>(0,d.I9)(t,e),error:(t,e)=>(0,d.Qg)(t,e),info:(t,e)=>(0,d.cf)(t,e),message:(t,e)=>(0,d.rG)(t,e)},Si={Accessibility:wi,AppConfig:r,Collaboration:{registerType(t,e){Bi[t]=e},trigger:t=>Bi[t].action(),getTypes:()=>Object.keys(Bi),getIcon:t=>Bi[t].typeIconClass||"",getLabel:t=>ki()(Bi[t].typeString||t),getLink:(t,e)=>void 0!==Bi[t]?Bi[t].link(e):""},Comments:s,InitialState:{loadState:It.C},Loader:Di,Toast:Ii,WhatsNew:a};var Ti=o(96763);const Mi=function(){void 0===window.TESTING&&_t.debug&&Ti.warn.apply(Ti,arguments)},Pi=(t,e,i)=>{(Array.isArray(t)?t:[t]).forEach((t=>{void 0!==window[t]&&delete window[t],Object.defineProperty(window,t,{get:()=>(Mi(i?"".concat(t," is deprecated: ").concat(i):"".concat(t," is deprecated")),e())})}))};window._=l.default,Pi(["$","jQuery"],(()=>h()),"The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own."),Pi("Backbone",(()=>S()),"please ship your own, this will be removed in Nextcloud 20"),Pi(["Clipboard","ClipboardJS"],(()=>oi()),"please ship your own, this will be removed in Nextcloud 20"),window.dav=T.dav,Pi("Handlebars",(()=>ct()),"please ship your own, this will be removed in Nextcloud 20"),Pi("md5",(()=>si()),"please ship your own, this will be removed in Nextcloud 20"),Pi("moment",(()=>mt()),"please ship your own, this will be removed in Nextcloud 20"),window.OC=_t,Pi("initCore",(()=>Ze),"this is an internal function"),Pi("oc_appswebroots",(()=>_t.appswebroots),"use OC.appswebroots instead, this will be removed in Nextcloud 20"),Pi("oc_config",(()=>_t.config),"use OC.config instead, this will be removed in Nextcloud 20"),Pi("oc_current_user",(()=>_t.getCurrentUser().uid),"use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20"),Pi("oc_debug",(()=>_t.debug),"use OC.debug instead, this will be removed in Nextcloud 20"),Pi("oc_defaults",(()=>_t.theme),"use OC.theme instead, this will be removed in Nextcloud 20"),Pi("oc_isadmin",_t.isUserAdmin,"use OC.isUserAdmin() instead, this will be removed in Nextcloud 20"),Pi("oc_requesttoken",(()=>J()),"use OC.requestToken instead, this will be removed in Nextcloud 20"),Pi("oc_webroot",(()=>_t.webroot),"use OC.getRootPath() instead, this will be removed in Nextcloud 20"),Pi("OCDialogs",(()=>_t.dialogs),"use OC.dialogs instead, this will be removed in Nextcloud 20"),window.OCP=Si,window.OCA={},h().fn.select2=((t,e,i)=>{const n=t,o=function(){return Mi("The ".concat("select2"," library is deprecated! It will be removed in nextcloud ").concat(19,".")),n.apply(this,arguments)};return Object.assign(o,n),o})(h().fn.select2),window.t=l.default.bind(_t.L10N.translate,_t.L10N),window.n=l.default.bind(_t.L10N.translatePlural,_t.L10N),h().fn.avatar=function(t,e,i,n,o,r){const s=function(t){t.imageplaceholder("?"),t.css("background-color","#b9b9b9")};if(void 0!==t&&(t=String(t)),void 0!==r&&(r=String(r)),void 0===e&&(e=this.height()>0?this.height():this.data("size")>0?this.data("size"):64),this.height(e),this.width(e),void 0===t){if(void 0===this.data("user"))return void s(this);t=this.data("user")}t=String(t).replace(/\//g,"");const a=this;let c;c=t===_t.getCurrentUser().uid?_t.generateUrl("/avatar/{user}/{size}?v={version}",{user:t,size:Math.ceil(e*window.devicePixelRatio),version:oc_userconfig.avatar.version}):_t.generateUrl("/avatar/{user}/{size}",{user:t,size:Math.ceil(e*window.devicePixelRatio)});const l=new Image;l.onload=function(){a.clearimageplaceholder(),a.append(l),"function"==typeof o&&o()},l.onerror=function(){a.clearimageplaceholder(),void 0!==r?a.imageplaceholder(t,r):s(a),"function"==typeof o&&o()},e<32?a.addClass("icon-loading-small"):a.addClass("icon-loading"),l.width=e,l.height=e,l.src=c,l.alt=""};const Oi=t=>"click"===t.type||"keydown"===t.type&&"Enter"===t.key,zi=o(66235);h().fn.contactsMenu=function(e,i,n){if(-1===[0,4,6].indexOf(i))return;const o=this;n.append('');const r=n.find("div.contactsmenu-popover");o.on("click keydown",(function(n){if(Oi(n)){if(!r.hasClass("hidden"))return r.addClass("hidden"),void r.hide();r.removeClass("hidden"),r.show(),r.hasClass("loaded")||(r.addClass("loaded"),h().ajax(_t.generateUrl("/contactsmenu/findOne"),{method:"POST",data:{shareType:i,shareWith:e}}).then((function(e){let i;r.find("ul").find("li").addClass("hidden"),i=e.topAction?[e.topAction].concat(e.actions):[{hyperlink:"#",title:t("core","No action available")}],i.forEach((function(t){r.find("ul").append(zi(t))})),o.trigger("load")}),(function(e){let i;r.find("ul").find("li").addClass("hidden"),i=404===e.status?t("core","No action available"):t("core","Error fetching contact actions"),r.find("ul").append(zi({hyperlink:"#",title:i})),o.trigger("loaderror",e)})))}})),h()(document).click((function(t){const e=r.has(t.target).length>0;let i=o.has(t.target).length>0;o.each((function(){h()(this).is(t.target)&&(i=!0)})),e||i||(r.addClass("hidden"),r.hide())}))},h().fn.exists=function(){return this.length>0},h().fn.filterAttr=function(t,e){return this.filter((function(){return h()(this).attr(t)===e}))};var Ri=o(52697);h().widget("oc.ocdialog",{options:{width:"auto",height:"auto",closeButton:!0,closeOnEscape:!0,closeCallback:null,modal:!1},_create(){const t=this;this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,height:this.element[0].style.height},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this.$dialog=h()('').attr({tabIndex:-1,role:"dialog","aria-modal":!0}).insertBefore(this.element),this.$dialog.append(this.element.detach()),this.element.removeAttr("title").addClass("oc-dialog-content").appendTo(this.$dialog),1===t.element.find("input").length&&t.element.find("input").on("keydown",(function(e){if(Oi(e)&&t.$buttonrow){const e=t.$buttonrow.find("button.primary");e&&!e.prop("disabled")&&e.click()}})),this.$dialog.css({display:"inline-block",position:"fixed"}),this.enterCallback=null,h()(document).on("keydown keyup",(function(e){if(e.target===t.$dialog.get(0)||0!==t.$dialog.find(h()(e.target)).length)return 27===e.keyCode&&"keydown"===e.type&&t.options.closeOnEscape?(e.stopImmediatePropagation(),t.close(),!1):13===e.keyCode?(e.stopImmediatePropagation(),null!==t.enterCallback?(t.enterCallback(),e.preventDefault(),!1):"keyup"===e.type&&(e.preventDefault(),!1)):void 0})),this._setOptions(this.options),this._createOverlay(),this._useFocusTrap()},_init(){this._trigger("open")},_setOption(e,i){const n=this;switch(e){case"title":if(this.$title)this.$title.text(i);else{const t=h()(''+i+"
");this.$title=t.prependTo(this.$dialog)}this._setSizes();break;case"buttons":if(this.$buttonrow)this.$buttonrow.empty();else{const t=h()('');this.$buttonrow=t.appendTo(this.$dialog)}1===i.length?this.$buttonrow.addClass("onebutton"):2===i.length?this.$buttonrow.addClass("twobuttons"):3===i.length&&this.$buttonrow.addClass("threebuttons"),h().each(i,(function(t,e){const i=h()(" ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;try{r.id}catch(t){r=document.body}return e.wrap(n),(e[0]===r||t.contains(e[0],r))&&t(r).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.13.2",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*n,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(k+"placeholder",i)),e.css({position:n,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=k+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,o){return o=o||{},t.each(i,(function(t,i){var r=e.cssUnit(i);r[0]>0&&(o[i]=r[0]*n+r[1])})),o}}),t.fn.extend({effect:function(){var i=e.apply(this,arguments),n=t.effects.effect[i.effect],o=n.mode,r=i.queue,s=r||"fx",a=i.complete,c=i.mode,l=[],u=function(e){var i=t(this),n=t.effects.mode(i,c)||o;i.data(E,!0),l.push(n),o&&("show"===n||n===o&&"hide"===n)&&i.show(),o&&"none"===n||t.effects.saveStyle(i),"function"==typeof e&&e()};if(t.fx.off||!n)return c?this[c](i.duration,a):this.each((function(){a&&a.call(this)}));function h(e){var r=t(this);function s(){"function"==typeof a&&a.call(r[0]),"function"==typeof e&&e()}i.mode=l.shift(),!1===t.uiBackCompat||o?"none"===i.mode?(r[c](),s()):n.call(r[0],i,(function(){r.removeData(E),t.effects.cleanUp(r),"hide"===i.mode&&r.hide(),s()})):(r.is(":hidden")?"hide"===c:"show"===c)?(r[c](),s()):n.call(r[0],i,s)}return!1===r?this.each(u).each(h):this.queue(s,u).queue(s,h)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])})),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),o=t(e.to),r="fixed"===o.css("position"),s=t("body"),a=r?s.scrollTop():0,c=r?s.scrollLeft():0,l=o.offset(),u={top:l.top-a,left:l.left-c,height:o.innerHeight(),width:o.innerWidth()},h=n.offset(),d=t("