nextcloud/dist/core-main.js

3 lines
155 KiB
JavaScript
Raw Permalink Normal View History

/*! For license information please see core-main.js.LICENSE.txt */
(()=>{var e,o,i,a={67991:(e,o,i)=>{"use strict";var a={};i.r(a),i.d(a,{deleteKey:()=>P,getApps:()=>x,getKeys:()=>k,getValue:()=>E,setValue:()=>B});var r={};i.r(r),i.d(r,{formatLinksPlain:()=>Xe,formatLinksRich:()=>Ve,plainToRich:()=>Ze,richToPlain:()=>Je});var s={};i.r(s),i.d(s,{dismiss:()=>en,query:()=>tn});var l=i(19755),c=i.n(l);let u=!1;const d={enableDynamicSlideToggle(){u=!0},showAppSidebar:function(t){(t||c()("#app-sidebar")).removeClass("disappear").show(),c()("#app-content").trigger(new(c().Event)("appresized"))},hideAppSidebar:function(t){(t||c()("#app-sidebar")).hide().addClass("disappear"),c()("#app-content").trigger(new(c().Event)("appresized"))}};i(28594),i(35666),i(35202);var A=i(69183),p=i(79753),h=i(25108);const m={},f=[];var g=i(18181),v=i(64024),C=i(25108);const b={updatableNotification:null,getDefaultNotificationFunction:null,setDefault(t){this.getDefaultNotificationFunction=t},hide(t,e){g.default.isFunction(t)&&(e=t,t=void 0),t?(t.each((function(){c()(this)[0].toastify?c()(this)[0].toastify.hideToast():C.error("cannot hide toast because object is not set"),this===this.updatableNotification&&(this.updatableNotification=null)})),e&&e.call(),this.getDefaultNotificationFunction&&this.getDefaultNotificationFunction()):C.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:v.Rl;const n=(0,v.PV)(t,e);return n.toastElement.toastify=n,c()(n.toastElement)},show(t,e){(e=e||{}).timeout=e.timeout?e.timeout:v.Rl;const n=(0,v.PV)(function(t){return t.toString().split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;").split("'").join("&#039;")}(t),e);return n.toastElement.toastify=n,c()(n.toastElement)},showUpdate(t){return this.updatableNotification&&this.updatableNotification.hideToast(),this.updatableNotification=(0,v.PV)(t,{timeout:v.Rl}),this.updatableNotification.toastElement.toastify=this.updatableNotification,c()(this.updatableNotification.toastElement)},showTemporary(t,e){(e=e||{}).timeout=e.timeout||v.TN;const n=(0,v.PV)(t,e);return n.toastElement.toastify=n,c()(n.toastElement)},isHidden:()=>!c()("#content").find(".toastify").length},w=g.default.throttle((()=>{b.showTemporary(t("core","Connection to server lost"))}),7e3,{trailing:!1});function y(t,e,n){"post"!==t&&"delete"!==t||!Ft.PasswordConfirmation.requiresPasswordConfirmation()?(n=n||{},c().ajax({type:t.toUpperCase(),url:(0,p.generateOcsUrl)("apps/provisioning_api/api/v1/config/apps")+e,data:n.data||{},success:n.success,error:n.error})):Ft.PasswordConfirmation.requirePasswordConfirmation(_.bind(y,this,t,e,n))}function x(t){y("get","",t)}function k(t,e){y("get","/"+t,e)}function E(t,e,n,o){(o=o||{}).data={defaultValue:n},y("get","/"+t+"/"+e,o)}function B(t,e,n,o){(o=o||{}).data={value:n},y("post","/"+t+"/"+e,o)}function P(t,e,n){y("delete","/"+t+"/"+e,n)}const O=window.oc_appconfig||{},T={getValue:function(t,e,n,o){E(t,e,n,{success:o})},setValue:function(t,e,n){B(t,e,n)},getApps:function(t){x({success:t})},getKeys:function(t,e){k(t,{success:e})},deleteKey:function(t,e){P(t,e)}};var D=i(25108);const I=void 0!==window._oc_appswebroots&&window._oc_appswebroots;var j=i(72316),z=i.n(j),N=i(76591),S=i(25108);const U={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read:"PROPFIND"};function M(t,e){if(g.default.isArray(t))return g.default.map(t,(function(t){return M(t,e)}));var n={href:t.href};return g.default.each(t.propStat,(function(t){if("HTTP/1.1 200 OK"===t.status)for(var o in t.properties){var i=o;o in e&&(i=e[o]),n[i]=t.properties[o]}})),n.id||(n.id=L(n.href)),n}function L(t){var e=t.indexOf("?");e>0&&(t=t.substr(0,e));var n,o=t.split("/");do{n=o[o.length-1],o.pop()}while(!n&&o.length>0);return n}function F(t){return t>=200&&t<=299}function R(t,e,n,o){return t.propPatch(e.url,function(t,e){var n,o={};for(n in t){var i=e[n],a=t[n];i||(S.warn('No matching DAV property for property "'+n),i=n),(g.default.isBoolean(a)||g.default.isNumber(a))&&(a=""+a),o[i]=a}
//# sourceMappingURL=core-main.js.map?v=41acd38d3cce73f16345