%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/FilePicker-ajWx2Snh-DyNcJl0S.chunk.mjs

/*! third party licenses: js/vendor.LICENSE.txt */
var ht=Object.defineProperty;var $e=e=>{throw TypeError(e)};var mt=(e,i,t)=>i in e?ht(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var Ee=(e,i,t)=>mt(e,typeof i!="symbol"?i+"":i,t),fe=(e,i,t)=>i.has(e)||$e("Cannot "+t);var f=(e,i,t)=>(fe(e,i,"read from private field"),t?t.call(e):i.get(e)),L=(e,i,t)=>i.has(e)?$e("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,t),N=(e,i,t,r)=>(fe(e,i,"write to private field"),r?r.call(e,t):i.set(e,t),t),P=(e,i,t)=>(fe(e,i,"access private method"),t);var se=(e,i,t,r)=>({set _(n){N(e,i,n,t)},get _(){return f(e,i,r)}});import{V as ae,d as W,r as S,c as x,x as me,w as Ue,t as Ye,o as ne,p as vt,n as gt,h as yt}from"./vue.runtime.esm-fZsuJKoo.chunk.mjs";import{b as E,t as I,s as ye,p as Oe}from"./_plugin-vue2_normalizer-CQ6iBklL-DSXPAugt.chunk.mjs";import{d as _t,g as De,c as Ae,e as bt,s as wt,f as _e,h as Ct,i as kt,C as Ve,j as xt,k as St}from"./index-opjN8X5E.chunk.mjs";import{b as Nt,E as Ft,m as Bt,i as It,F as Lt,N as Ge,l as Pt,f as zt,x as $t,G as Et}from"./_plugin-vue2_normalizer-XF5BqDH-.chunk.mjs";import{n as be,a as we,C as Ot,N as Ce,G as Dt,aj as ke,k as At}from"./public-CBtR8U5E.chunk.mjs";import{s as Vt,u as Tt,e as Mt,g as Ht}from"./modulepreload-polyfill-DMTabKmO.chunk.mjs";import{a as Rt,c as Ke,_ as xe,U as jt}from"./index-WINsn-uD.chunk.mjs";import{l as Je}from"./index-Ubm2itxG.chunk.mjs";import{g as Wt}from"./emoji-picker-SoWZqoso.chunk.mjs";import{a as de}from"./index-CyNrdWBa.chunk.mjs";import"./index-DkzhscpN.chunk.mjs";const qt={name:"NcBreadcrumb",components:{NcActions:we,ChevronRight:Ot,NcButton:Ce},inheritAttrs:!1,props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},exact:{type:Boolean,default:!1},href:{type:String,default:void 0},icon:{type:String,default:""},forceIconText:{type:Boolean,default:!1},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["update:open","dropped"],data(){return{hovering:!1,crumbId:"crumb-id-".concat(Dt())}},computed:{linkAttributes(){return this.to?{to:this.to,exact:this.exact,...this.$attrs}:this.href?{href:this.href,...this.$attrs}:this.$attrs}},methods:{onOpenChange(e){this.$emit("update:open",e)},dropped(e){return this.disableDrop||(this.$emit("dropped",e,this.to||this.href),this.$parent.$emit("dropped",e,this.to||this.href),this.hovering=!1),!1},dragEnter(e){this.disableDrop||(this.hovering=!0)},dragLeave(e){this.disableDrop||e.target.contains(e.relatedTarget)||this.$refs.crumb.contains(e.relatedTarget)||(this.hovering=!1)}}};var Zt=function(){var e=this,i=e._self._c;return i("li",e._b({ref:"crumb",staticClass:"vue-crumb",class:{"vue-crumb--hovered":e.hovering},attrs:{draggable:"false"},on:{dragstart:function(t){return t.preventDefault(),(()=>{}).apply(null,arguments)},drop:function(t){return t.preventDefault(),e.dropped.apply(null,arguments)},dragover:function(t){return t.preventDefault(),(()=>{}).apply(null,arguments)},dragenter:e.dragEnter,dragleave:e.dragLeave}},"li",e._d({},[e.crumbId,""])),[(e.name||e.icon||e.$slots.icon)&&!e.$slots.default?i("NcButton",e._g(e._b({attrs:{title:e.title,"aria-label":e.icon?e.name:void 0,type:"tertiary"},scopedSlots:e._u([e.$slots.icon||e.icon?{key:"icon",fn:function(){return[e._t("icon",function(){return[i("span",{staticClass:"icon",class:e.icon})]})]},proxy:!0}:null,!(e.$slots.icon||e.icon)||e.forceIconText?{key:"default",fn:function(){return[e._v(" "+e._s(e.name)+" ")]},proxy:!0}:null],null,!0)},"NcButton",e.linkAttributes,!1),e.$listeners)):e._e(),e.$slots.default?i("NcActions",{ref:"actions",attrs:{type:"tertiary","force-menu":e.forceMenu,open:e.open,"menu-name":e.name,title:e.title,"force-name":!0,container:".vue-crumb[".concat(e.crumbId,"]")},on:{"update:open":e.onOpenChange},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("menu-icon")]},proxy:!0}],null,!0)},[e._t("default")],2):e._e(),i("ChevronRight",{staticClass:"vue-crumb__separator",attrs:{size:20}})],1)},Ut=[],Yt=be(qt,Zt,Ut,!1,null,"cfe13af3");const Qe=Yt.exports;var pe=Symbol(),Q=Symbol(),Te=Symbol(),Me=Symbol(),Se=function(e){return"frag"in e},Gt={get:function(){return this[Q]||this.parentElement},configurable:!0},X=function(e,i){Q in e||(e[Q]=i,Object.defineProperty(e,"parentNode",Gt))},Kt={get:function(){var e=this.parentNode.childNodes,i=e.indexOf(this);return i>-1&&e[i+1]||null}},oe=function(e){Te in e||(e[Te]=!0,Object.defineProperty(e,"nextSibling",Kt))},Jt=function(e,i){for(;e.parentNode!==i;){var t=e,r=t.parentNode;r&&(e=r)}return e},he,Xe=function(e){if(!he){var i=Object.getOwnPropertyDescriptor(Node.prototype,"childNodes");he=i.get}var t=he.apply(e),r=Array.from(t).map(function(n){return Jt(n,e)});return r.filter(function(n,s){return n!==r[s-1]})},Qt={get:function(){return this.frag||Xe(this)}},Xt={get:function(){return this.childNodes[0]||null}};function ei(){return this.childNodes.length>0}var He=function(e){Me in e||(e[Me]=!0,Object.defineProperties(e,{childNodes:Qt,firstChild:Xt}),e.hasChildNodes=ei)};function ti(){var e;(e=this.frag[0]).before.apply(e,arguments)}function ii(){var e=this.frag,i=e.splice(0,e.length);i.forEach(function(t){t.remove()})}var ri=function e(i){var t;return(t=Array.prototype).concat.apply(t,i.map(function(r){return Se(r)?e(r.frag):r}))},ni=function(e,i){var t=e[pe];i.before(t),X(t,e),e.frag.unshift(t)};function Re(e){if(Se(this)){var i=this.frag.indexOf(e);if(i>-1){var t=this.frag.splice(i,1),r=t[0];this.frag.length===0&&ni(this,r),e.remove()}}else{var n=Xe(this),s=n.indexOf(e);s>-1&&e.remove()}return e}function je(e,i){var t=this,r=e.frag||[e];if(Se(this)){if(e[Q]===this&&e.parentElement)return e;var n=this.frag;if(i){var s=n.indexOf(i);s>-1&&(n.splice.apply(n,[s,0].concat(r)),i.before.apply(i,r))}else{var c=n[n.length-1];n.push.apply(n,r),c.after.apply(c,r)}et(this)}else i?this.childNodes.includes(i)&&i.before.apply(i,r):this.append.apply(this,r);r.forEach(function(o){X(o,t)});var l=r[r.length-1];return oe(l),e}function si(e){if(e[Q]===this&&e.parentElement)return e;var i=this.frag,t=i[i.length-1];return t.after(e),X(e,this),et(this),i.push(e),e}var et=function(e){var i=e[pe];e.frag[0]===i&&(e.frag.shift(),i.remove())},ai={set:function(e){var i=this;if(this.frag[0]!==this[pe]&&this.frag.slice().forEach(function(r){return i.removeChild(r)}),e){var t=document.createElement("div");t.innerHTML=e,Array.from(t.childNodes).forEach(function(r){i.appendChild(r)})}},get:function(){return""}},oi={inserted:function(e){var i=e.parentNode,t=e.nextSibling,r=e.previousSibling,n=Array.from(e.childNodes),s=document.createComment("");n.length===0&&n.push(s),e.frag=n,e[pe]=s;var c=document.createDocumentFragment();c.append.apply(c,ri(n)),e.replaceWith(c),n.forEach(function(l){X(l,e),oe(l)}),He(e),Object.assign(e,{remove:ii,appendChild:si,insertBefore:je,removeChild:Re,before:ti}),Object.defineProperty(e,"innerHTML",ai),i&&(Object.assign(i,{removeChild:Re,insertBefore:je}),X(e,i),He(i)),t&&oe(e),r&&oe(r)},unbind:function(e){e.remove()}},tt={name:"Fragment",directives:{frag:oi},render:function(e){return e("div",{directives:[{name:"frag"}]},this.$slots.default)}};const We=(e,i,t)=>{if(e!==void 0)for(let r=e.length-1;r>=0;r--){const n=e[r],s=!n.componentOptions&&n.tag&&i.indexOf(n.tag)===-1,c=!!n.componentOptions&&typeof n.componentOptions.tag=="string",l=c&&i.indexOf(n.componentOptions.tag)===-1;(s||!c||l)&&((s||l)&&ae.util.warn("".concat(s?n.tag:n.componentOptions.tag," is not allowed inside the ").concat(t.$options.name," component"),t),e.splice(r,1))}},li={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ci=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},ui=[],di=be(li,ci,ui,!1,null,null);const pi=di.exports,z="vue-crumb",fi={name:"NcBreadcrumbs",components:{NcActions:we,NcActionButton:Nt,NcActionRouter:Ft,NcActionLink:Bt,NcBreadcrumb:Qe,IconFolder:pi},props:{rootIcon:{type:String,default:"icon-home"},ariaLabel:{type:String,default:null}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:{}}},beforeMount(){We(this.$slots.default,["NcBreadcrumb"],this)},beforeUpdate(){We(this.$slots.default,["NcBreadcrumb"],this)},created(){window.addEventListener("resize",Rt(()=>{this.handleWindowResize()},100)),Vt("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize),Tt("navigation-toggled",this.delayedResize)},methods:{closeActions(e){this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){var o;if(!this.$refs.container)return;const e=Object.values(this.breadcrumbsRefs),i=e.length,t=[],r=this.$refs.container.offsetWidth;let n=this.getTotalWidth(e);this.$refs.breadcrumb__actions&&(n+=this.$refs.breadcrumb__actions.offsetWidth);let s=n-r;s+=s>0?64:0;let c=0;const l=Math.floor(i/2);for(;s>0&&c<i-2;){const a=l+(c%2?c+1:c)/2*Math.pow(-1,c+i%2);s-=this.getWidth((o=e[a])==null?void 0:o.elm,a===e.length-1),t.push(a),c++}this.arraysEqual(this.hiddenIndices,t.sort((a,u)=>a-u))||(this.hiddenIndices=t)},arraysEqual(e,i){if(e.length!==i.length)return!1;if(e===i)return!0;if(e===null||i===null)return!1;for(let t=0;t<e.length;++t)if(e[t]!==i[t])return!1;return!0},getTotalWidth(e){return e.reduce((i,t,r)=>i+this.getWidth(t==null?void 0:t.elm,r===e.length-1),0)},getWidth(e,i){if(!(e!=null&&e.classList))return 0;const t=e.classList.contains("".concat(z,"--hidden"));e.style.minWidth="auto",i&&(e.style.maxWidth="210px"),e.classList.remove("".concat(z,"--hidden"));const r=e.offsetWidth;return t&&e.classList.add("".concat(z,"--hidden")),e.style.minWidth="",e.style.maxWidth="",r},preventDefault(e){return e.preventDefault&&e.preventDefault(),!1},dragStart(e){return this.preventDefault(e)},dropped(e,i,t){return t||this.$emit("dropped",e,i),this.menuBreadcrumbProps.open=!1,document.querySelectorAll(".".concat(z)).forEach(r=>{r.classList.remove("".concat(z,"--hovered"))}),this.preventDefault(e)},dragOver(e){return this.preventDefault(e)},dragEnter(e,i){if(!i&&e.target.closest){const t=e.target.closest(".".concat(z));t.classList&&t.classList.contains(z)&&(document.querySelectorAll(".".concat(z)).forEach(r=>{r.classList.remove("".concat(z,"--hovered"))}),t.classList.add("".concat(z,"--hovered")))}},dragLeave(e,i){if(!i&&!e.target.contains(e.relatedTarget)&&e.target.closest){const t=e.target.closest(".".concat(z));if(t.contains(e.relatedTarget))return;t.classList&&t.classList.contains(z)&&t.classList.remove("".concat(z,"--hovered"))}},hideCrumbs(){Object.values(this.breadcrumbsRefs).forEach((e,i)=>{var t;(t=e==null?void 0:e.elm)!=null&&t.classList&&(this.hiddenIndices.includes(i)?e.elm.classList.add("".concat(z,"--hidden")):e.elm.classList.remove("".concat(z,"--hidden")))})},isBreadcrumb(e){var i;return(((i=e==null?void 0:e.componentOptions)==null?void 0:i.tag)||(e==null?void 0:e.tag)||"").includes("NcBreadcrumb")}},render(e){const i=[];if(this.$slots.default.forEach(s=>{var c,l;if(this.isBreadcrumb(s)){i.push(s);return}(s==null?void 0:s.type)===tt&&((l=(c=s==null?void 0:s.children)==null?void 0:c.forEach)==null||l.call(c,o=>{this.isBreadcrumb(o)&&i.push(o)}))}),i.length===0)return;ae.set(i[0].componentOptions.propsData,"icon",this.rootIcon),ae.set(i[0].componentOptions.propsData,"ref","breadcrumbs");const t={};i.forEach((s,c)=>{ae.set(s,"ref","crumb-".concat(c)),t[c]=s});let r=[];if(!this.hiddenIndices.length)r=i;else{r=i.slice(0,Math.round(i.length/2)),r.push(e("NcBreadcrumb",{class:"dropdown",props:this.menuBreadcrumbProps,attrs:{"aria-hidden":!0},ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",nativeOn:{dragstart:this.dragStart,dragenter:()=>{this.menuBreadcrumbProps.open=!0},dragleave:this.closeActions},on:{"update:open":c=>{this.menuBreadcrumbProps.open=c}}},this.hiddenIndices.filter(c=>c<=i.length-1).map(c=>{const l=i[c],o=l.componentOptions.propsData.to,a=l.componentOptions.propsData.href,u=l.componentOptions.propsData.disableDrop,h=l.componentOptions.propsData.title,g=l.componentOptions.propsData.name;let d="NcActionButton",m="";a&&(d="NcActionLink",m=a),o&&(d="NcActionRouter",m=o);const p=e("IconFolder",{props:{size:20},slot:"icon"});return e(d,{class:z,props:{href:a||null,title:h,to:o||null},attrs:{draggable:!1},on:{...l.componentOptions.listeners},nativeOn:{dragstart:this.dragStart,drop:v=>this.dropped(v,m,u),dragover:this.dragOver,dragenter:v=>this.dragEnter(v,u),dragleave:v=>this.dragLeave(v,u)}},[p,g])})));const s=i.slice(Math.round(i.length/2));r=r.concat(s)}const n=[e("nav",{attrs:{"aria-label":this.ariaLabel}},[e("ul",{class:"breadcrumb__crumbs"},[r])])];return this.$slots.actions&&n.push(e("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions)),this.breadcrumbsRefs=t,e("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===i.length-2}],ref:"container"},n)}},hi=null,mi=null;var vi=be(fi,hi,mi,!1,null,"629bf30f");const gi=vi.exports;var it={exports:{}};(function(e){var i=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(o,a,u){this.fn=o,this.context=a,this.once=u||!1}function s(o,a,u,h,g){if(typeof u!="function")throw new TypeError("The listener must be a function");var d=new n(u,h||o,g),m=t?t+a:a;return o._events[m]?o._events[m].fn?o._events[m]=[o._events[m],d]:o._events[m].push(d):(o._events[m]=d,o._eventsCount++),o}function c(o,a){--o._eventsCount===0?o._events=new r:delete o._events[a]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var o=[],a,u;if(this._eventsCount===0)return o;for(u in a=this._events)i.call(a,u)&&o.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(a)):o},l.prototype.listeners=function(o){var a=t?t+o:o,u=this._events[a];if(!u)return[];if(u.fn)return[u.fn];for(var h=0,g=u.length,d=new Array(g);h<g;h++)d[h]=u[h].fn;return d},l.prototype.listenerCount=function(o){var a=t?t+o:o,u=this._events[a];return u?u.fn?1:u.length:0},l.prototype.emit=function(o,a,u,h,g,d){var m=t?t+o:o;if(!this._events[m])return!1;var p=this._events[m],v=arguments.length,w,y;if(p.fn){switch(p.once&&this.removeListener(o,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,a),!0;case 3:return p.fn.call(p.context,a,u),!0;case 4:return p.fn.call(p.context,a,u,h),!0;case 5:return p.fn.call(p.context,a,u,h,g),!0;case 6:return p.fn.call(p.context,a,u,h,g,d),!0}for(y=1,w=new Array(v-1);y<v;y++)w[y-1]=arguments[y];p.fn.apply(p.context,w)}else{var $=p.length,_;for(y=0;y<$;y++)switch(p[y].once&&this.removeListener(o,p[y].fn,void 0,!0),v){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,a);break;case 3:p[y].fn.call(p[y].context,a,u);break;case 4:p[y].fn.call(p[y].context,a,u,h);break;default:if(!w)for(_=1,w=new Array(v-1);_<v;_++)w[_-1]=arguments[_];p[y].fn.apply(p[y].context,w)}}return!0},l.prototype.on=function(o,a,u){return s(this,o,a,u,!1)},l.prototype.once=function(o,a,u){return s(this,o,a,u,!0)},l.prototype.removeListener=function(o,a,u,h){var g=t?t+o:o;if(!this._events[g])return this;if(!a)return c(this,g),this;var d=this._events[g];if(d.fn)d.fn===a&&(!h||d.once)&&(!u||d.context===u)&&c(this,g);else{for(var m=0,p=[],v=d.length;m<v;m++)(d[m].fn!==a||h&&!d[m].once||u&&d[m].context!==u)&&p.push(d[m]);p.length?this._events[g]=p.length===1?p[0]:p:c(this,g)}return this},l.prototype.removeAllListeners=function(o){var a;return o?(a=t?t+o:o,this._events[a]&&c(this,a)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,e.exports=l})(it);var yi=it.exports;const _i=Wt(yi);class rt extends Error{constructor(i){super(i),this.name="TimeoutError"}}class bi extends Error{constructor(i){super(),this.name="AbortError",this.message=i}}const qe=e=>globalThis.DOMException===void 0?new bi(e):new DOMException(e),Ze=e=>{const i=e.reason===void 0?qe("This operation was aborted."):e.reason;return i instanceof Error?i:qe(i)};function wi(e,i){const{milliseconds:t,fallback:r,message:n,customTimers:s={setTimeout,clearTimeout}}=i;let c;const l=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError("Expected `milliseconds` to be a positive number, got `".concat(t,"`"));if(i.signal){const{signal:h}=i;h.aborted&&a(Ze(h));const g=()=>{a(Ze(h))};h.addEventListener("abort",g,{once:!0}),e.finally(()=>{h.removeEventListener("abort",g)})}if(t===Number.POSITIVE_INFINITY){e.then(o,a);return}const u=new rt;c=s.setTimeout.call(void 0,()=>{if(r){try{o(r())}catch(h){a(h)}return}typeof e.cancel=="function"&&e.cancel(),n===!1?o():n instanceof Error?a(n):(u.message=n!=null?n:"Promise timed out after ".concat(t," milliseconds"),a(u))},t),(async()=>{try{o(await e)}catch(h){a(h)}})()}).finally(()=>{l.clear()});return l.clear=()=>{s.clearTimeout.call(void 0,c),c=void 0},l}function Ci(e,i,t){let r=0,n=e.length;for(;n>0;){const s=Math.trunc(n/2);let c=r+s;t(e[c],i)<=0?(r=++c,n-=s+1):n=s}return r}var V;class ki{constructor(){L(this,V,[])}enqueue(i,t){t={priority:0,...t};const r={priority:t.priority,run:i};if(this.size&&f(this,V)[this.size-1].priority>=t.priority){f(this,V).push(r);return}const n=Ci(f(this,V),r,(s,c)=>c.priority-s.priority);f(this,V).splice(n,0,r)}dequeue(){var i;return(i=f(this,V).shift())==null?void 0:i.run}filter(i){return f(this,V).filter(t=>t.priority===i.priority).map(t=>t.run)}get size(){return f(this,V).length}}V=new WeakMap;var Z,U,H,ee,Y,te,D,G,O,ie,A,K,M,re,b,nt,st,at,ot,lt,le,ve,ge,ce,ct,ue;class xi extends _i{constructor(t){var r,n,s,c;super();L(this,b);L(this,Z);L(this,U);L(this,H,0);L(this,ee);L(this,Y);L(this,te,0);L(this,D);L(this,G);L(this,O);L(this,ie);L(this,A,0);L(this,K);L(this,M);L(this,re);Ee(this,"timeout");if(t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:ki,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat((n=(r=t.intervalCap)==null?void 0:r.toString())!=null?n:"","` (").concat(typeof t.intervalCap,")"));if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat((c=(s=t.interval)==null?void 0:s.toString())!=null?c:"","` (").concat(typeof t.interval,")"));N(this,Z,t.carryoverConcurrencyCount),N(this,U,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0),N(this,ee,t.intervalCap),N(this,Y,t.interval),N(this,O,new t.queueClass),N(this,ie,t.queueClass),this.concurrency=t.concurrency,this.timeout=t.timeout,N(this,re,t.throwOnTimeout===!0),N(this,M,t.autoStart===!1)}get concurrency(){return f(this,K)}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(t,"` (").concat(typeof t,")"));N(this,K,t),P(this,b,ce).call(this)}async add(t,r={}){return r={timeout:this.timeout,throwOnTimeout:f(this,re),...r},new Promise((n,s)=>{f(this,O).enqueue(async()=>{var c;se(this,A)._++,se(this,H)._++;try{(c=r.signal)==null||c.throwIfAborted();let l=t({signal:r.signal});r.timeout&&(l=wi(Promise.resolve(l),{milliseconds:r.timeout})),r.signal&&(l=Promise.race([l,P(this,b,ct).call(this,r.signal)]));const o=await l;n(o),this.emit("completed",o)}catch(l){if(l instanceof rt&&!r.throwOnTimeout){n();return}s(l),this.emit("error",l)}finally{P(this,b,at).call(this)}},r),this.emit("add"),P(this,b,le).call(this)})}async addAll(t,r){return Promise.all(t.map(async n=>this.add(n,r)))}start(){return f(this,M)?(N(this,M,!1),P(this,b,ce).call(this),this):this}pause(){N(this,M,!0)}clear(){N(this,O,new(f(this,ie)))}async onEmpty(){f(this,O).size!==0&&await P(this,b,ue).call(this,"empty")}async onSizeLessThan(t){f(this,O).size<t||await P(this,b,ue).call(this,"next",()=>f(this,O).size<t)}async onIdle(){f(this,A)===0&&f(this,O).size===0||await P(this,b,ue).call(this,"idle")}get size(){return f(this,O).size}sizeBy(t){return f(this,O).filter(t).length}get pending(){return f(this,A)}get isPaused(){return f(this,M)}}Z=new WeakMap,U=new WeakMap,H=new WeakMap,ee=new WeakMap,Y=new WeakMap,te=new WeakMap,D=new WeakMap,G=new WeakMap,O=new WeakMap,ie=new WeakMap,A=new WeakMap,K=new WeakMap,M=new WeakMap,re=new WeakMap,b=new WeakSet,nt=function(){return f(this,U)||f(this,H)<f(this,ee)},st=function(){return f(this,A)<f(this,K)},at=function(){se(this,A)._--,P(this,b,le).call(this),this.emit("next")},ot=function(){P(this,b,ge).call(this),P(this,b,ve).call(this),N(this,G,void 0)},lt=function(){const t=Date.now();if(f(this,D)===void 0){const r=f(this,te)-t;if(r<0)N(this,H,f(this,Z)?f(this,A):0);else return f(this,G)===void 0&&N(this,G,setTimeout(()=>{P(this,b,ot).call(this)},r)),!0}return!1},le=function(){if(f(this,O).size===0)return f(this,D)&&clearInterval(f(this,D)),N(this,D,void 0),this.emit("empty"),f(this,A)===0&&this.emit("idle"),!1;if(!f(this,M)){const t=!f(this,b,lt);if(f(this,b,nt)&&f(this,b,st)){const r=f(this,O).dequeue();return r?(this.emit("active"),r(),t&&P(this,b,ve).call(this),!0):!1}}return!1},ve=function(){f(this,U)||f(this,D)!==void 0||(N(this,D,setInterval(()=>{P(this,b,ge).call(this)},f(this,Y))),N(this,te,Date.now()+f(this,Y)))},ge=function(){f(this,H)===0&&f(this,A)===0&&f(this,D)&&(clearInterval(f(this,D)),N(this,D,void 0)),N(this,H,f(this,Z)?f(this,A):0),P(this,b,ce).call(this)},ce=function(){for(;P(this,b,le).call(this););},ct=async function(t){return new Promise((r,n)=>{t.addEventListener("abort",()=>{n(t.reason)},{once:!0})})},ue=async function(t,r){return new Promise(n=>{const s=()=>{r&&!r()||(this.off(t,s),n())};this.on(t,s)})};var Si="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",Ni="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",Fi="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z";const Bi={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ii=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Li=[],Pi=E(Bi,Ii,Li,!1,null,null);const ut=Pi.exports,dt=()=>{var e,i,t;const r=Je("files","config",null),n=S((e=r==null?void 0:r.show_hidden)!=null?e:!0),s=S((i=r==null?void 0:r.sort_favorites_first)!=null?i:!0),c=S((t=r==null?void 0:r.crop_image_previews)!=null?t:!0);return ne(async()=>{var l,o,a,u,h,g;if(ke())console.debug("Skip loading files settings - currently on public share");else try{const{data:d}=await Ke.get(xe("/apps/files/api/v1/configs"));n.value=(o=(l=d==null?void 0:d.data)==null?void 0:l.show_hidden)!=null?o:!1,s.value=(u=(a=d==null?void 0:d.data)==null?void 0:a.sort_favorites_first)!=null?u:!0,c.value=(g=(h=d==null?void 0:d.data)==null?void 0:h.crop_image_previews)!=null?g:!0}catch(d){console.error("Could not load files settings",d),ye(I("Could not load files settings"))}}),{showHiddenFiles:n,sortFavoritesFirst:s,cropImagePreviews:c}},zi=e=>{var i,t,r,n,s,c,l,o,a,u,h,g;const d=F=>F==="asc"?"ascending":F==="desc"?"descending":"none",m=Je("files","viewConfigs",null),p=S({sortBy:(t=(i=m==null?void 0:m.files)==null?void 0:i.sorting_mode)!=null?t:"basename",order:d((n=(r=m==null?void 0:m.files)==null?void 0:r.sorting_direction)!=null?n:"asc")}),v=S({sortBy:(c=(s=m==null?void 0:m.recent)==null?void 0:s.sorting_mode)!=null?c:"basename",order:d((o=(l=m==null?void 0:m.recent)==null?void 0:l.sorting_direction)!=null?o:"asc")}),w=S({sortBy:(u=(a=m==null?void 0:m.favorites)==null?void 0:a.sorting_mode)!=null?u:"basename",order:d((g=(h=m==null?void 0:m.favorites)==null?void 0:h.sorting_direction)!=null?g:"asc")});ne(async()=>{var F,T,C,k,R,q,J,j,Ne,Fe,Be,Ie,Le,Pe,ze;if(ke())console.debug("Skip loading files views - currently on public share");else try{const{data:B}=await Ke.get(xe("/apps/files/api/v1/views"));p.value={sortBy:(C=(T=(F=B==null?void 0:B.data)==null?void 0:F.files)==null?void 0:T.sorting_mode)!=null?C:"basename",order:d((R=(k=B==null?void 0:B.data)==null?void 0:k.files)==null?void 0:R.sorting_direction)},w.value={sortBy:(j=(J=(q=B==null?void 0:B.data)==null?void 0:q.favorites)==null?void 0:J.sorting_mode)!=null?j:"basename",order:d((Fe=(Ne=B==null?void 0:B.data)==null?void 0:Ne.favorites)==null?void 0:Fe.sorting_direction)},v.value={sortBy:(Le=(Ie=(Be=B==null?void 0:B.data)==null?void 0:Be.recent)==null?void 0:Ie.sorting_mode)!=null?Le:"basename",order:d((ze=(Pe=B==null?void 0:B.data)==null?void 0:Pe.recent)==null?void 0:ze.sorting_direction)}}catch(B){console.error("Could not load files views",B),ye(I("Could not load files views"))}});const y=x(()=>de(e||"files")==="files"?p.value:de(e)==="recent"?v.value:w.value),$=x(()=>y.value.sortBy),_=x(()=>y.value.order);return{filesViewConfig:p,favoritesViewConfig:w,recentViewConfig:v,currentConfig:y,sortBy:$,order:_}},$i={name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ei=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Oi=[],Di=E($i,Ei,Oi,!1,null,null);const Ai=Di.exports,Vi={name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ti=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Mi=[],Hi=E(Vi,Ti,Mi,!1,null,null);const Ri=Hi.exports,pt={"file-picker__file-icon":"_file-picker__file-icon_19mjt_9"},ji=W({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup(e){return{__sfc:!0,fileListIconStyles:pt}}});var Wi=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[e.showCheckbox?i("td",{staticClass:"row-checkbox"},[i("span")]):e._e(),i("td",{staticClass:"row-name"},[i("div",{staticClass:"row-wrapper"},[i("span",{class:t.fileListIconStyles["file-picker__file-icon"]}),i("span")])]),e._m(0),e._m(1)])},qi=[function(){var e=this,i=e._self._c;return e._self._setupProxy,i("td",{staticClass:"row-size"},[i("span")])},function(){var e=this,i=e._self._c;return e._self._setupProxy,i("td",{staticClass:"row-modified"},[i("span")])}],Zi=E(ji,Wi,qi,!1,null,"15187afc");const Ui=Zi.exports,Yi=new xi({concurrency:5});function Gi(e){const{resolve:i,promise:t}=Promise.withResolvers();return Yi.add(()=>{const r=new Image;return r.onerror=()=>i(!1),r.onload=()=>i(!0),r.src=e,t}),t}function Ki(e,i={}){var t;i={size:32,cropPreview:!1,mimeFallback:!0,...i};try{const r=((t=e.attributes)==null?void 0:t.previewUrl)||xe("/core/preview?fileId={fileid}",{fileid:e.fileid});let n;try{n=new URL(r)}catch{n=new URL(r,window.location.origin)}return n.searchParams.set("x","".concat(i.size)),n.searchParams.set("y","".concat(i.size)),n.searchParams.set("mimeFallback","".concat(i.mimeFallback)),n.searchParams.set("a",i.cropPreview===!0?"0":"1"),n.searchParams.set("c","".concat(e.attributes.etag)),n}catch{return null}}const Ji=(e,i)=>{const t=S(null),r=S(!1);return yt(()=>{r.value=!1,t.value=Ki(de(e),de(i||{})),t.value&&Gi(t.value.href).then(n=>{r.value=n})}),{previewURL:t,previewLoaded:r}},Qi={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Xi=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},er=[],tr=E(Qi,Xi,er,!1,null,null);const ft=tr.exports,ir={name:"FilePreview"},rr=W({...ir,props:{node:null,cropImagePreviews:{type:Boolean}},setup(e){const i=e,t=S(pt),{previewURL:r,previewLoaded:n}=Ji(Ye(i,"node"),x(()=>({cropPreview:i.cropImagePreviews}))),s=x(()=>i.node.type===_e.File);return{__sfc:!0,fileListIconStyles:t,props:i,previewURL:r,previewLoaded:n,isFile:s,IconFile:ut,IconFolder:ft}}});var nr=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i("div",{class:t.fileListIconStyles["file-picker__file-icon"],style:t.previewLoaded?{backgroundImage:"url(".concat(t.previewURL,")")}:void 0},[t.previewLoaded?e._e():[t.isFile?i(t.IconFile,{attrs:{size:20}}):i(t.IconFolder,{attrs:{size:20}})]],2)},sr=[],ar=E(rr,nr,sr,!1,null,null);const or=ar.exports,lr=W({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null,cropImagePreviews:{type:Boolean}},emits:["update:selected","enter-directory"],setup(e,{emit:i}){const t=e,r=x(()=>{var u;return((u=t.node.attributes)==null?void 0:u.displayName)||t.node.basename.slice(0,t.node.extension?-t.node.extension.length:void 0)}),n=x(()=>t.node.extension),s=x(()=>t.node.type===_e.Folder),c=x(()=>t.canPick&&(t.allowPickDirectory||!s.value));function l(){i("update:selected",!t.selected)}function o(){s.value?i("enter-directory",t.node):l()}function a(u){u.key==="Enter"&&o()}return{__sfc:!0,props:t,emit:i,displayName:r,fileExtension:n,isDirectory:s,isPickable:c,toggleSelected:l,handleClick:o,handleKeyDown:a,formatFileSize:St,NcCheckboxRadioSwitch:Ge,NcDateTime:Et,t:I,FilePreview:or}}});var cr=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i("tr",e._g({class:["file-picker__row",{"file-picker__row--selected":e.selected&&!e.showCheckbox}],attrs:{tabindex:e.showCheckbox&&!t.isDirectory?void 0:0,"aria-selected":t.isPickable?e.selected:void 0,"data-filename":e.node.basename,"data-testid":"file-list-row"}},{click:t.handleClick,...!e.showCheckbox||t.isDirectory?{keydown:t.handleKeyDown}:{}}),[e.showCheckbox?i("td",{staticClass:"row-checkbox",on:{click:function(r){return r.stopPropagation(),(()=>{}).apply(null,arguments)}}},[i(t.NcCheckboxRadioSwitch,{attrs:{"aria-label":t.t("Select the row for {nodename}",{nodename:t.displayName}),checked:e.selected,disabled:!t.isPickable,"data-testid":"row-checkbox"},on:{"update:checked":t.toggleSelected}})],1):e._e(),i("td",{staticClass:"row-name"},[i("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[i(t.FilePreview,{attrs:{node:e.node,"crop-image-previews":e.cropImagePreviews}}),i("div",{staticClass:"file-picker__file-name",attrs:{title:t.displayName},domProps:{textContent:e._s(t.displayName)}}),i("div",{staticClass:"file-picker__file-extension",domProps:{textContent:e._s(t.fileExtension)}})],1)]),i("td",{staticClass:"row-size"},[e._v(" "+e._s(t.formatFileSize(e.node.size||0))+" ")]),i("td",{staticClass:"row-modified"},[i(t.NcDateTime,{attrs:{timestamp:e.node.mtime,"ignore-seconds":!0}})],1)])},ur=[],dr=E(lr,cr,ur,!1,null,"cb12dccb");const pr=dr.exports,fr=W({__name:"FileList",props:{currentView:null,multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(e,{emit:i}){const t=e,r=S(),{currentConfig:n}=zi(t.currentView),s=x(()=>{var _;return(_=r.value)!=null?_:n.value}),c=x(()=>s.value.sortBy==="basename"?s.value.order==="none"?void 0:s.value.order:void 0),l=x(()=>s.value.sortBy==="size"?s.value.order==="none"?void 0:s.value.order:void 0),o=x(()=>s.value.sortBy==="mtime"?s.value.order==="none"?void 0:s.value.order:void 0),a=_=>{s.value.sortBy===_?s.value.order==="ascending"?r.value={sortBy:s.value.sortBy,order:"descending"}:r.value={sortBy:s.value.sortBy,order:"ascending"}:r.value={sortBy:_,order:"ascending"}},{sortFavoritesFirst:u,cropImagePreviews:h}=dt(),g=x(()=>wt(t.files,{sortFoldersFirst:!0,sortFavoritesFirst:u.value,sortingOrder:s.value.order==="descending"?"desc":"asc",sortingMode:s.value.sortBy})),d=x(()=>t.files.filter(_=>t.allowPickDirectory||_.type!==_e.Folder)),m=x(()=>!t.loading&&t.selectedFiles.length>0&&t.selectedFiles.length>=d.value.length);function p(){t.selectedFiles.length<d.value.length?i("update:selectedFiles",d.value):i("update:selectedFiles",[])}function v(_){t.selectedFiles.includes(_)?i("update:selectedFiles",t.selectedFiles.filter(F=>F.path!==_.path)):t.multiselect?i("update:selectedFiles",[...t.selectedFiles,_]):i("update:selectedFiles",[_])}function w(_){i("update:path",_.path)}const y=S(4),$=S();{const _=()=>gt(()=>{var F,T,C,k,R;const q=((T=(F=$.value)==null?void 0:F.parentElement)==null?void 0:T.children)||[];let J=((k=(C=$.value)==null?void 0:C.parentElement)==null?void 0:k.clientHeight)||450;for(let j=0;j<q.length;j++)(R=$.value)!=null&&R.isSameNode(q[j])||(J-=q[j].clientHeight);y.value=Math.max(1,Math.floor((J-50)/50))});ne(()=>{window.addEventListener("resize",_),_()}),vt(()=>{window.removeEventListener("resize",_)})}return{__sfc:!0,props:t,emit:i,customSortingConfig:r,filesAppSorting:n,sortingConfig:s,sortByName:c,sortBySize:l,sortByModified:o,toggleSorting:a,sortFavoritesFirst:u,cropImagePreviews:h,sortedFiles:g,selectableFiles:d,allSelected:m,onSelectAll:p,onNodeSelected:v,onChangeDirectory:w,skeletonNumber:y,fileContainer:$,NcButton:Ce,NcCheckboxRadioSwitch:Ge,t:I,IconSortAscending:Ai,IconSortDescending:Ri,LoadingTableRow:Ui,FileListRow:pr}}});var hr=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i("div",{ref:"fileContainer",staticClass:"file-picker__files"},[i("table",[i("thead",[i("tr",[e.multiselect?i("th",{staticClass:"row-checkbox"},[i("span",{staticClass:"hidden-visually"},[e._v(" "+e._s(t.t("Select entry"))+" ")]),e.multiselect?i(t.NcCheckboxRadioSwitch,{attrs:{"aria-label":t.t("Select all entries"),checked:t.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":t.onSelectAll}}):e._e()],1):e._e(),i("th",{staticClass:"row-name",attrs:{"aria-sort":t.sortByName}},[i("div",{staticClass:"header-wrapper"},[i("span",{staticClass:"file-picker__header-preview"}),i(t.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(r){return t.toggleSorting("basename")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t.sortByName==="ascending"?i(t.IconSortAscending,{attrs:{size:20}}):t.sortByName==="descending"?i(t.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(t.t("Name"))+" ")])],1)]),i("th",{staticClass:"row-size",attrs:{"aria-sort":t.sortBySize}},[i(t.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(r){return t.toggleSorting("size")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t.sortBySize==="ascending"?i(t.IconSortAscending,{attrs:{size:20}}):t.sortBySize==="descending"?i(t.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(t.t("Size"))+" ")])],1),i("th",{staticClass:"row-modified",attrs:{"aria-sort":t.sortByModified}},[i(t.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(r){return t.toggleSorting("mtime")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t.sortByModified==="ascending"?i(t.IconSortAscending,{attrs:{size:20}}):t.sortByModified==="descending"?i(t.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(t.t("Modified"))+" ")])],1)])]),i("tbody",[e.loading?e._l(t.skeletonNumber,function(r){return i(t.LoadingTableRow,{key:r,attrs:{"show-checkbox":e.multiselect}})}):e._l(t.sortedFiles,function(r){return i(t.FileListRow,{key:r.fileid||r.path,attrs:{"allow-pick-directory":e.allowPickDirectory,"show-checkbox":e.multiselect,"can-pick":e.multiselect||e.selectedFiles.length===0||e.selectedFiles.includes(r),selected:e.selectedFiles.includes(r),node:r,"crop-image-previews":t.cropImagePreviews},on:{"update:selected":function(n){return t.onNodeSelected(r)},"enter-directory":t.onChangeDirectory}})})],2)])])},mr=[],vr=E(fr,hr,mr,!1,null,"006fdbd0");const gr=vr.exports,yr={name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var _r=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},br=[],wr=E(yr,_r,br,!1,null,null);const Cr=wr.exports,kr={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var xr=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Sr=[],Nr=E(kr,xr,Sr,!1,null,null);const Fr=Nr.exports,Br=W({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(e,{emit:i}){const t=e,r=S(!1),n=S(""),s=S();function c(){var a,u,h,g;const d=n.value.trim(),m=(u=(a=s.value)==null?void 0:a.$el)==null?void 0:u.querySelector("input");let p="";return d.length===0?p=I("Folder name cannot be empty."):d.includes("/")?p=I('"/" is not allowed inside a folder name.'):["..","."].includes(d)?p=I('"{name}" is an invalid folder name.',{name:d}):(h=window.OC.config)!=null&&h.blacklist_files_regex&&d.match((g=window.OC.config)==null?void 0:g.blacklist_files_regex)&&(p=I('"{name}" is not an allowed folder name',{name:d})),m&&m.setCustomValidity(p),p===""}const l=function(){const a=n.value.trim();c()&&(r.value=!1,i("create-node",a),n.value="")},o=x(()=>t.path.split("/").filter(a=>a!=="").map((a,u,h)=>({name:a,path:"/"+h.slice(0,u+1).join("/")})));return{__sfc:!0,props:t,emit:i,actionsOpen:r,newNodeName:n,nameInput:s,validateInput:c,onSubmit:l,pathElements:o,IconFolder:ft,IconHome:Cr,IconPlus:Fr,NcActions:we,NcActionInput:Pt,NcBreadcrumbs:gi,NcBreadcrumb:Qe,t:I}}});var Ir=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i(t.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:e._u([{key:"default",fn:function(){return[i(t.NcBreadcrumb,{attrs:{name:t.t("All files"),title:t.t("Home")},on:{click:function(r){return t.emit("update:path","/")}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.IconHome,{attrs:{size:20}})]},proxy:!0}])}),e._l(t.pathElements,function(r){return i(t.NcBreadcrumb,{key:r.path,attrs:{name:r.name,title:r.path},on:{click:function(n){return t.emit("update:path",r.path)}}})})]},proxy:!0},e.showMenu?{key:"actions",fn:function(){return[i(t.NcActions,{attrs:{"aria-label":t.t("Create directory"),"force-menu":!0,"force-name":!0,"menu-name":t.t("New"),open:t.actionsOpen,type:"secondary"},on:{"update:open":function(r){t.actionsOpen=r},close:function(r){t.newNodeName=""}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[i(t.NcActionInput,{ref:"nameInput",attrs:{value:t.newNodeName,label:t.t("New folder"),placeholder:t.t("New folder name")},on:{"update:value":function(r){t.newNodeName=r},submit:t.onSubmit,input:t.validateInput},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})},Lr=[],Pr=E(Br,Ir,Lr,!1,null,"b357227a");const zr=Pr.exports,$r={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Er=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Or=[],Dr=E($r,Er,Or,!1,null,null);const Ar=Dr.exports,Vr={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Tr=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Mr=[],Hr=E(Vr,Tr,Mr,!1,null,null);const Rr=Hr.exports,jr=e=>{const i=[{id:"files",label:I("All files"),icon:Ni},{id:"recent",label:I("Recent"),icon:Si},{id:"favorites",label:I("Favorites"),icon:Fi}],t=e.value?i.filter(({id:r})=>r==="files"):i;return{allViews:i,availableViews:t}},Wr=W({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(e,{emit:i}){const t=e,{availableViews:r}=jr(S(Ht()===null)),n=x(()=>{var s;return(s=r.filter(c=>c.id===t.currentView)[0])!=null?s:r[0]});return{__sfc:!0,props:t,emit:i,availableViews:r,currentViewObject:n,updateFilterValue:s=>i("update:filterString",s),IconClose:Ar,IconMagnify:Rr,NcButton:Ce,NcIconSvgWrapper:At,NcSelect:zt,NcTextField:$t,Fragment:tt,t:I}}});var qr=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i(t.Fragment,[i(t.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:e.filterString,label:t.t("Filter file list"),"show-trailing-button":!!e.filterString},on:{"update:value":t.updateFilterValue,"trailing-button-click":function(r){return t.updateFilterValue("")}},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[i(t.IconClose,{attrs:{size:16}})]},proxy:!0}])},[i(t.IconMagnify,{attrs:{size:16}})],1),t.availableViews.length>1&&!e.disabledNavigation?[e.isCollapsed?i(t.NcSelect,{attrs:{"aria-label":t.t("Current view selector"),clearable:!1,searchable:!1,options:t.availableViews,value:t.currentViewObject},on:{input:r=>t.emit("update:currentView",r.id)}}):i("ul",{staticClass:"file-picker__side"},e._l(t.availableViews,function(r){return i("li",{key:r.id},[i(t.NcButton,{attrs:{type:e.currentView===r.id?"primary":"tertiary",wide:!0},on:{click:function(n){return e.$emit("update:currentView",r.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.NcIconSvgWrapper,{attrs:{path:r.icon,size:20}})]},proxy:!0}],null,!0)},[e._v(" "+e._s(r.label)+" ")])],1)}),0)]:e._e()],2)},Zr=[],Ur=E(Wr,qr,Zr,!1,null,"b42054b8");const Yr=Ur.exports,Gr=function(e,i){const t=ke(),r=t?"/":Ct,n=x(()=>t?jt("webdav").replace("/remote.php","/public.php"):_t),s=x(()=>{if(t){const v=document.getElementById("sharingToken").value,w=btoa("".concat(v,":null"));return De(n.value,{Authorization:"Basic ".concat(w)})}return De()}),c=v=>kt(v,r,n.value),l=()=>{const v=new AbortController,w=Math.round(Date.now()/1e3)-60*60*24*14;return new Ve(async(y,$,_)=>{_(()=>v.abort());try{const{data:F}=await s.value.search("/",{signal:v.signal,details:!0,data:xt(w)}),T=F.results.map(c);y(T)}catch(F){$(F)}})},o=()=>{const v=new AbortController;return new Ve(async(w,y,$)=>{$(()=>v.abort());try{const _=(await s.value.getDirectoryContents("".concat(r).concat(i.value),{signal:v.signal,details:!0,includeSelf:!0,data:Ae()})).data.map(c);w({folder:_.find(F=>F.path===i.value),contents:_.filter(F=>F.path!==i.value)})}catch(_){y(_)}})},a=me([]),u=me(null),h=S(!0),g=S(null);async function d(v){const w=Oe.join(i.value,v);await s.value.createDirectory(Oe.join(r,w));const y=await m(w);return a.value=[...a.value,y],y}async function m(v,w=void 0){w=w!=null?w:r;const{data:y}=await s.value.stat("".concat(w).concat(v),{details:!0,data:Ae()});return c(y)}async function p(){g.value&&g.value.cancel(),h.value=!0,e.value==="favorites"?g.value=bt(s.value,i.value,r):e.value==="recent"?g.value=l():g.value=o();const v=await g.value;"folder"in v?(u.value=v.folder,a.value=v.contents):(u.value=null,a.value=v),g.value=null,h.value=!1}return Ue([e,i],()=>p()),ne(()=>p()),{isLoading:h,files:a,folder:u,loadFiles:p,createDirectory:d}},Kr=function(e){const i=x(()=>e.value.map(t=>t.split("/")));return{isSupportedMimeType:t=>{const r=t.split("/");return i.value.some(([n,s])=>(r[0]===n||n==="*")&&(r[1]===s||s==="*"))}}},Jr={name:"FilePicker"},Qr=W({...Jr,props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:void 0}},emits:["close"],setup(e,{emit:i}){const t=e,r=S(!0),n=x(()=>{const C=a.value.length===0&&t.allowPickDirectory&&v.value?[v.value]:a.value;return(typeof t.buttons=="function"?t.buttons(C,g.value,l.value):t.buttons).map(k=>({...k,disabled:k.disabled||w.value,callback:()=>{s=!0,c(k.callback,C)}}))});let s=!1;const c=async(C,k)=>{C(k),i("close",k),s=!1},l=S("files"),o=x(()=>l.value==="favorites"?I("Favorites"):l.value==="recent"?I("Recent"):""),a=me([]),u=S((window==null?void 0:window.sessionStorage.getItem("NC.FilePicker.LastPath"))||"/"),h=S("");Ue([h],()=>{t.path===void 0&&h.value&&window.sessionStorage.setItem("NC.FilePicker.LastPath",h.value),a.value=[]});const g=x({get:()=>l.value==="files"?h.value||t.path||u.value:"/",set:C=>{h.value=C}}),d=S(""),{isSupportedMimeType:m}=Kr(Ye(t,"mimetypeFilter")),{files:p,folder:v,isLoading:w,loadFiles:y,createDirectory:$}=Gr(l,g);ne(()=>y());const{showHiddenFiles:_}=dt(),F=x(()=>{let C=p.value;return _.value||(C=C.filter(k=>!k.basename.startsWith("."))),t.mimetypeFilter.length>0&&(C=C.filter(k=>k.type==="folder"||k.mime&&m(k.mime))),d.value&&(C=C.filter(k=>k.basename.toLowerCase().includes(d.value.toLowerCase()))),t.filterFn&&(C=C.filter(k=>t.filterFn(k))),C}),T=x(()=>l.value==="files"?I("Upload some content or sync with your devices!"):l.value==="recent"?I("Files and folders you recently modified will show up here."):I("Files and folders you mark as favorite will show up here."));return{__sfc:!0,props:t,emit:i,isOpen:r,dialogButtons:n,isHandlingCallback:s,handleButtonClick:c,currentView:l,viewHeadline:o,selectedFiles:a,savedPath:u,navigatedPath:h,currentPath:g,filterString:d,isSupportedMimeType:m,files:p,currentFolder:v,isLoading:w,loadFiles:y,createDirectory:$,showHiddenFiles:_,filteredFiles:F,noFilesDescription:T,onCreateFolder:async C=>{try{const k=await $(C);h.value=k.path,Mt("files:node:created",p.value.filter(R=>R.basename===C)[0])}catch(k){console.warn("Could not create new folder",{name:C,error:k}),ye(I("Could not create the new folder"))}},handleClose:C=>{!C&&!s&&i("close")},IconFile:ut,FileList:gr,FilePickerBreadcrumbs:zr,FilePickerNavigation:Yr,NcDialog:It,NcEmptyContent:Lt,t:I}}});var Xr=function(){var e=this,i=e._self._c,t=e._self._setupProxy;return i(t.NcDialog,{attrs:{container:e.container,buttons:t.dialogButtons,name:e.name,size:"large","content-classes":"file-picker__content","dialog-classes":"file-picker","navigation-classes":"file-picker__navigation",open:t.isOpen},on:{"update:open":[function(r){t.isOpen=r},t.handleClose]},scopedSlots:e._u([{key:"navigation",fn:function({isCollapsed:r}){return[i(t.FilePickerNavigation,{attrs:{"is-collapsed":r,"current-view":t.currentView,"filter-string":t.filterString,"disabled-navigation":e.disabledNavigation},on:{"update:currentView":function(n){t.currentView=n},"update:current-view":function(n){t.currentView=n},"update:filterString":function(n){t.filterString=n},"update:filter-string":function(n){t.filterString=n}}})]}}])},[i("div",{staticClass:"file-picker__main"},[t.currentView==="files"?i(t.FilePickerBreadcrumbs,{attrs:{path:t.currentPath,"show-menu":e.allowPickDirectory},on:{"update:path":function(r){t.currentPath=r},"create-node":t.onCreateFolder}}):i("div",{staticClass:"file-picker__view"},[i("h3",[e._v(e._s(t.viewHeadline))])]),t.isLoading||t.filteredFiles.length>0?i(t.FileList,{attrs:{"allow-pick-directory":e.allowPickDirectory,"current-view":t.currentView,files:t.filteredFiles,multiselect:e.multiselect,loading:t.isLoading,path:t.currentPath,"selected-files":t.selectedFiles,name:t.viewHeadline},on:{"update:path":[function(r){t.currentPath=r},function(r){t.currentView="files"}],"update:selectedFiles":function(r){t.selectedFiles=r},"update:selected-files":function(r){t.selectedFiles=r}}}):t.filterString?i(t.NcEmptyContent,{attrs:{name:t.t("No matching files"),description:t.t("No files matching your filter were found.")},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.IconFile)]},proxy:!0}])}):i(t.NcEmptyContent,{attrs:{name:t.t("No files in here"),description:t.noFilesDescription},scopedSlots:e._u([{key:"icon",fn:function(){return[i(t.IconFile)]},proxy:!0}])})],1)])},en=[],tn=E(Qr,Xr,en,!1,null,"20b719ba");const mn=tn.exports;export{mn as default};

Zerion Mini Shell 1.0