Files
nextcloud-server-mirror/dist/files_sharing-files_sharing_tab.js
2026-10-10 07:05:55 +00:00

2 lines
10 KiB
JavaScript

(()=>{var e={67820(e,t,r){"use strict";var n=r(21777),o=r(45967),i=r(53334);const a=/-(\w)/g,s=e=>e.replace(a,(e,t)=>t?t.toUpperCase():""),c=/\B([A-Z])/g,l=e=>e.replace(c,"-$1").toLowerCase();function u(e,t,r){e[t]=[].concat(e[t]||[]),e[t].unshift(r)}function d(e,t){e&&(e.$options[t]||[]).forEach(t=>{t.call(e)})}function p(e,t){const r=[];for(let n=0,o=t.length;n<o;n++)r.push(f(e,t[n]));return r}function f(e,t){if(3===t.nodeType)return t.data.trim()?t.data:null;if(1===t.nodeType){const r={attrs:h(t),domProps:{innerHTML:t.innerHTML}};return r.attrs.slot&&(r.slot=r.attrs.slot,delete r.attrs.slot),e(t.tagName,r)}return null}function h(e){const t={};for(let r=0,n=e.attributes.length;r<n;r++){const n=e.attributes[r];t[n.nodeName]=n.nodeValue}return t}const b=function(e,t){const r="function"==typeof t&&!t.cid;let n,o,i,a=!1;function c(e){if(a)return;const t="function"==typeof e?e.options:e,r=Array.isArray(t.props)?t.props:Object.keys(t.props||{});n=r.map(l),o=r.map(s);const c=Array.isArray(t.props)?{}:t.props||{};i=o.reduce((e,t,n)=>(e[t]=c[r[n]],e),{}),u(t,"beforeCreate",function(){const e=this.$emit;this.$emit=(t,...r)=>(this.$root.$options.customElement.dispatchEvent(function(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}(t,r)),e.call(this,t,...r))}),u(t,"created",function(){o.forEach(e=>{this.$root.props[e]=this[e]})}),o.forEach(e=>{Object.defineProperty(h.prototype,e,{get(){return this._wrapper.props[e]},set(t){this._wrapper.props[e]=t},enumerable:!1,configurable:!0})}),a=!0}function f(e,t){const r=s(t),n=e.hasAttribute(t)?e.getAttribute(t):void 0;e._wrapper.props[r]=function(e,t,{type:r}={}){if(/function Boolean/.test(String(r)))return"true"===e||"false"===e?"true"===e:""===e||e===t||null!=e||e;if(/function Number/.test(String(r))){const t=parseFloat(e,10);return isNaN(t)?e:t}return e}(n,t,i[r])}class h extends HTMLElement{constructor(){const r=super();r.attachShadow({mode:"open"});const n=r._wrapper=new e({name:"shadow-root",customElement:r,shadowRoot:r.shadowRoot,data:()=>({props:{},slotChildren:[]}),render(e){return e(t,{ref:"inner",props:this.props},this.slotChildren)}});new MutationObserver(e=>{let t=!1;for(let n=0;n<e.length;n++){const o=e[n];a&&"attributes"===o.type&&o.target===r?f(r,o.attributeName):t=!0}t&&(n.slotChildren=Object.freeze(p(n.$createElement,r.childNodes)))}).observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}get vueComponent(){return this._wrapper.$refs.inner}connectedCallback(){const e=this._wrapper;if(e._isMounted)d(this.vueComponent,"activated");else{const r=()=>{e.props=Object.assign(function(e){const t={};return e.forEach(e=>{t[e]=void 0}),t}(o),e.props),n.forEach(t=>{const r=s(t);(void 0===e.props[r]||this.hasAttribute(t))&&f(this,t)})};a?r():t().then(e=>{(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e),r()}),e.slotChildren=Object.freeze(p(e.$createElement,this.childNodes)),e.$mount(),this.shadowRoot.appendChild(e.$el)}}disconnectedCallback(){d(this.vueComponent,"deactivated")}}return r||c(t),h};var g=r(85471),m=r(48564);r.nc=(0,n.aV)(),window.OCA.Sharing??={},Object.assign(window.OCA.Sharing,{ShareSearch:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._state={},this._state.results=[],m.A.debug("OCA.Sharing.ShareSearch initialized")}get state(){return this._state}addNewResult(e){return""!==e.displayName.trim()&&"function"==typeof e.handler?(this._state.results.push(e),!0):(m.A.error("Invalid search result provided",{result:e}),!1)}}}),Object.assign(window.OCA.Sharing,{ExternalShareActions:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._state={},this._state.actions=[],m.A.debug("OCA.Sharing.ExternalShareActions initialized")}get state(){return this._state}registerAction(e){return m.A.warn("OCA.Sharing.ExternalShareActions is deprecated, use `registerSidebarAction` from `@nextcloud/sharing` instead"),"object"==typeof e&&"string"==typeof e.id&&"function"==typeof e.data&&Array.isArray(e.shareType)&&"object"==typeof e.handlers&&Object.values(e.handlers).every(e=>"function"==typeof e)?this._state.actions.findIndex(t=>t.id===e.id)>-1?(m.A.error(`An action with the same id ${e.id} already exists`,e),!1):(this._state.actions.push(e),!0):(m.A.error("Invalid action provided",e),!1)}}}),Object.assign(window.OCA.Sharing,{ShareTabSections:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_sections"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._sections=[]}registerSection(e){this._sections.push(e)}getSections(){return this._sections}}}),g.Ay.prototype.t=i.t,g.Ay.prototype.n=i.n;const v="files_sharing-sidebar-tab";(0,o.dC)().registerTab({id:"sharing",displayName:(0,i.t)("files_sharing","Sharing"),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-share-variant" viewBox="0 0 24 24"><path d="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z" /></svg>',order:10,tagName:v,async onInit(){const{default:e}=await Promise.all([r.e(4208),r.e(7281)]).then(()=>r(67918)),t=b(g.Ay,e);Object.defineProperty(t.prototype,"attachShadow",{value(){return this}}),Object.defineProperty(t.prototype,"shadowRoot",{get(){return this}}),window.customElements.define(v,t)}})},48564(e,t,r){"use strict";const n=(0,r(35947).YK)().setApp("files_sharing").detectUser().build();r.d(t,["A",0,n])},63779(){},77199(){}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,(()=>{const e=[];r.O=(t,n,o)=>{if(!n){for(var i=0;i<e.length;i++){let[n,o]=e[i],s=!0;for(var a=0;a<n.length;a++)r.O.j(n[a])?n.splice(a--,1):s=!1;if(s){e.splice(i--,1);const r=o();void 0!==r&&(t=r)}}return t}e.push([n,o])}})(),r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++],a=0===i?{enumerable:!0,value:t[n++]}:{enumerable:!0,get:i};r.o(e,o)||Object.defineProperty(e,o,a)}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>{const t=[];return r.f.j(e,t),Promise.all(t)},r.u=e=>e+"-"+e+".js?v="+{451:"fc54e5ca411ef69c363d",857:"7df76d83ddc257b2632e",3600:"84358453b4d6868f7e9c",4017:"808775e77c7d18946064",4515:"f77c636a9d5c12f5059e",5862:"7ef93f7f33f9a069a0de",6198:"a49a8c0b88812d2a4a88",6798:"5a4f5cc8965ca8e3f45b",7281:"53bc12ee98d08e8a774a",7471:"6f6bd6e485f3c799404c",7859:"90097d6186e001a6fb28",8259:"79b917f7438068af7e66",8374:"12538bc344d59c0bf4ba",8689:"1df6e7225e2f49ae3fd0"}[e],r.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={},t="nextcloud-ui-legacy:";r.l=(n,o,i,a)=>{if(e[n])return void e[n].push(o);let s,c;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+i){s=r;break}}}s||(c=!0,s=document.createElement("script"),s.charset="utf-8",r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack",t+i),s.src=n),e[n]=[o];const u=(t,r)=>{s.onerror=s.onload=null,clearTimeout(d);const o=e[n];if(delete e[n],s.parentNode?.removeChild(s),o?.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),c&&document.head.appendChild(s)}})(),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=4958,r.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{let e;globalThis.importScripts&&(e=globalThis.location+"");const t=globalThis.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=e})(),(()=>{r.b="undefined"!=typeof document&&document.baseURI||self.location.href;const e={4958:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{const i=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=i);const a=new Error,s=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",a.name="ChunkLoadError",a.type=e,a.request=r,a.event=n,o[1](a)}};r.l(r.p+r.u(t),s,"chunk-"+t,t)}},r.O.j=t=>0===e[t];const t=(t,n)=>{let[o,i,a]=n;var s,c,l=0;if(o.some(t=>0!==e[t])){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);if(a)var u=a(r)}for(t&&t(n);l<o.length;l++)c=o[l],r.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return r.O(u)},n=globalThis.webpackChunknextcloud_ui_legacy||=[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.nc=void 0;let n=r.O(void 0,[4208],()=>r(67820));n=r.O(n)})();
//# sourceMappingURL=files_sharing-files_sharing_tab.js.map?v=0b1414d0940b02bb2c45