(()=>{"use strict";var t,e,n,i={93806:(t,e,n)=>{var i=n(85072),r=n.n(i),s=n(97825),o=n.n(s),a=n(77659),l=n.n(a),d=n(55056),u=n.n(d),c=n(10540),h=n.n(c),f=n(41113),p=n.n(f),g=n(98290),E={};E.styleTagTransform=p(),E.setAttributes=u(),E.insert=l().bind(null,"head"),E.domAPI=o(),E.insertStyleElement=h(),r()(g.A,E),g.A&&g.A.locals&&g.A.locals;var m=n(53334),b=n(35810),N=n(21777);const v=`/trashbin/${(0,N.HW)()?.uid}/trash`,w=(0,b.H4)();var I=n(63814);const x=`\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t${(0,b.VX)()}\n\t\n`,y=t=>{const e=(0,b.Al)(t,v);return e.attributes.previewUrl=(0,I.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",{fileid:e.fileid}),e};var A=n(19231),O=n(71225),T=n(85471),L=n(77764);const _=t=>{const e=void 0!==t.attributes?.["trashbin-original-location"]?String(t.attributes?.["trashbin-original-location"]):null;if(!e)return(0,m.Tl)("files_trashbin","Unknown");const n=(0,O.pD)(e);return n===e?(0,m.Tl)("files_trashbin","All files"):n.replace(/^\//,"")},R=t=>{const e=void 0!==t.attributes?.["trashbin-deleted-by-id"]?String(t.attributes?.["trashbin-deleted-by-id"]):null,n=void 0!==t.attributes?.["trashbin-deleted-by-display-name"]?String(t.attributes?.["trashbin-deleted-by-display-name"]):null,i=((t,e)=>{const n=(0,N.HW)()?.uid;return t===n?(0,m.Tl)("files_trashbin","You"):t||e?null:(0,m.Tl)("files_trashbin","Unknown")})(e,n);return{userId:e,displayName:n,label:i}},C=[new b.VP({id:"original-location",title:(0,m.Tl)("files_trashbin","Original location"),render(t){const e=_(t),n=document.createElement("span");return n.title=e,n.textContent=e,n},sort(t,e){const n=_(t),i=_(e);return n.localeCompare(i)}}),new b.VP({id:"deleted-by",title:(0,m.Tl)("files_trashbin","Deleted by"),render(t){const{userId:e,displayName:n,label:i}=R(t);if(i){const t=document.createElement("span");return t.textContent=i,t}return new(T.Ay.extend(L.A))({propsData:{size:32,user:e??void 0,displayName:n??(0,m.Tl)("files_trashbin","Unknown")}}).$mount().$el},sort(t,e){const n=R(t).label??R(t).displayName??(0,m.Tl)("files_trashbin","Unknown"),i=R(e).label??R(e).displayName??(0,m.Tl)("files_trashbin","Unknown");return n.localeCompare(i)}}),new b.VP({id:"deleted",title:(0,m.Tl)("files_trashbin","Deleted"),render(t){const e=t.attributes?.["trashbin-deletion-time"],n=document.createElement("span");return e?(n.title=A.A.unix(e).format("LLL"),n.textContent=A.A.unix(e).fromNow(),n):(n.textContent=(0,m.Tl)("files_trashbin","A long time ago"),n)},sort(t,e){const n=t.attributes?.["trashbin-deletion-time"]||t?.mtime||0;return(e.attributes?.["trashbin-deletion-time"]||e?.mtime||0)-n}})];var $=n(61338),S=n(65043),P=n(35947);const F=(0,P.YK)().setApp("files").detectUser().build();(0,b.Gg)(new b.hY({id:"restore",displayName:()=>(0,m.Tl)("files_trashbin","Restore"),iconSvgInline:()=>'',enabled:(t,e)=>"trashbin"===e.id&&t.length>0&&t.map((t=>t.permissions)).every((t=>!!(t&b.aX.READ))),async exec(t){try{const e=(0,I.dC)((0,O.O0)(`dav/trashbin/${(0,N.HW)()?.uid}/restore/${t.basename}`));return await(0,S.Ay)({method:"MOVE",url:t.encodedSource,headers:{destination:e}}),(0,$.Ic)("files:node:deleted",t),!0}catch(t){return F.error(t),!1}},async execBatch(t,e,n){return Promise.all(t.map((t=>this.exec(t,e,n))))},order:1,inline:()=>!0}));var D=n(85168);const V=(0,P.YK)().setApp("files_trashbin").detectUser().build(),M=new b.VI({id:"empty-trash",displayName:()=>(0,m.t)("files_trashbin","Empty deleted files"),order:0,enabled:(t,e,n)=>"trashbin"===t.id&&e.length>0&&"/"===n.path,async exec(t,e){const n=new Promise((t=>{(0,D.As)((0,m.t)("files_trashbin","Confirm permanent deletion")).setSeverity(D.aR.Warning).setText((0,m.t)("files_trashbin","Are you sure you want to permanently delete all files and folders in the trash? This cannot be undone.")).setButtons([{label:(0,m.t)("files_trashbin","Cancel"),type:"secondary",callback:()=>t(!1)},{label:(0,m.t)("files_trashbin","Empty deleted files"),type:"error",callback:()=>t(!0)}]).build().show().then((()=>{t(!1)}))}));if(!0===await n)return await(async()=>{try{return await S.Ay.delete((0,I.dC)("dav")+`/trashbin/${(0,N.HW)()?.uid}/trash`),(0,D.Te)((0,m.t)("files_trashbin","All files have been permanently deleted")),!0}catch(t){return(0,D.Qg)((0,m.t)("files_trashbin","Failed to empty deleted files")),V.error("Failed to empty deleted files",{error:t}),!1}})(),void e.forEach((t=>(0,$.Ic)("files:node:deleted",t)));(0,D.cf)((0,m.t)("files_trashbin","Deletion cancelled"))}});(0,b.bh)().register(new b.Ss({id:"trashbin",name:(0,m.Tl)("files_trashbin","Deleted files"),caption:(0,m.Tl)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,m.Tl)("files_trashbin","No deleted files"),emptyCaption:(0,m.Tl)("files_trashbin","Files and folders you have deleted will show up here"),icon:'',order:50,sticky:!0,defaultSortKey:"deleted",columns:C,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await w.getDirectoryContents(`${v}${t}`,{details:!0,data:x,includeSelf:!0})).data.map(y),[n]=e.splice(e.findIndex((e=>e.path===t)),1);return{folder:n,contents:e}}})),(0,b.yC)(M)},98290:(t,e,n)=>{n.d(e,{A:()=>a});var i=n(71354),r=n.n(i),s=n(76314),o=n.n(s)()(r());o.push([t.id,"/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */.files-list__row-trashbin-original-location{width:150px !important}","",{version:3,sources:["webpack://./apps/files_trashbin/src/trashbin.scss"],names:[],mappings:"AAAA;;;EAAA,CAIA,4CACE,sBAAA",sourceRoot:""}]);const a=o},35810:(t,e,n)=>{n.d(e,{Al:()=>i.r,CP:()=>i.k,Gg:()=>d,H4:()=>i.c,Q$:()=>i.e,R3:()=>i.n,Ss:()=>Gt,VI:()=>u,VL:()=>i.l,VP:()=>N,VX:()=>i.j,aX:()=>i.P,bh:()=>b,hY:()=>l,lJ:()=>i.d,pt:()=>i.F,ur:()=>E,v7:()=>p,yC:()=>c});var i=n(68251),r=(n(43627),n(53334)),s=n(380),o=n(65606),a=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(a||{});class l{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(a).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const d=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],i.o.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?i.o.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};class u{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get iconSvgInline(){return this._action.iconSvgInline}get order(){return this._action.order}get enabled(){return this._action.enabled}get exec(){return this._action.exec}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("iconSvgInline"in t&&"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function")}}const c=t=>{void 0===window._nc_filelistactions&&(window._nc_filelistactions=[]),window._nc_filelistactions.find((e=>e.id===t.id))?i.o.error(`FileListAction with id "${t.id}" is already registered`,{action:t}):window._nc_filelistactions.push(t)};Error;const h=["B","KB","MB","GB","TB","PB"],f=["B","KiB","MiB","GiB","TiB","PiB"];function p(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;s=Math.min((n?f.length:h.length)-1,s);const o=n?f[s]:h[s];let a=(t/Math.pow(i?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==a?"< 1 ":"0 ")+(n?f[1]:h[1]):(a=s<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,r.lO)()),a+" "+o)}function g(t){return t instanceof Date?t.toISOString():String(t)}function E(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,n){n=n??[];const i=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),s=Intl.Collator([(0,r.Z0)(),(0,r.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[r,o]of e.entries()){const e=s.compare(g(o(t)),g(o(n)));if(0!==e)return e*i[r]}return 0}))}(t,[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}class m extends s.m{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const b=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new m,i.o.debug("Navigation service initialized")),window._nc_navigation};class N{_column;constructor(t){v(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const v=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var w={},I={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const i=Object.keys(e),r=i.length;for(let s=0;s5&&"xml"===i)return P("InvalidXml","XML declaration allowed only at the start of the document.",D(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function T(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}w.validate=function(t,e){e=Object.assign({},y,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)d+=t[o];if(d=d.trim(),"/"===d[d.length-1]&&(d=d.substring(0,d.length-1),o--),s=d,!x.isName(s)){let e;return e=0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",P("InvalidTag",e,D(t,o))}const u=R(t,o);if(!1===u)return P("InvalidAttr","Attributes for '"+d+"' have open quote.",D(t,o));let c=u.value;if(o=u.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const r=$(c,e);if(!0!==r)return P(r.err.code,r.err.msg,D(t,n+r.err.line));i=!0}else if(l){if(!u.tagClosed)return P("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",D(t,o));if(c.trim().length>0)return P("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",D(t,a));if(0===n.length)return P("InvalidTag","Closing tag '"+d+"' has not been opened.",D(t,a));{const e=n.pop();if(d!==e.tagName){let n=D(t,e.tagStartPos);return P("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+d+"'.",D(t,a))}0==n.length&&(r=!0)}}else{const s=$(c,e);if(!0!==s)return P(s.err.code,s.err.msg,D(t,o-c.length+s.err.line));if(!0===r)return P("InvalidXml","Multiple possible root nodes found.",D(t,o));-1!==e.unpairedTags.indexOf(d)||n.push({tagName:d,tagStartPos:a}),i=!0}for(o++;o0)||P("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):P("InvalidXml","Start tag expected.",1)};const L='"',_="'";function R(t,e){let n="",i="",r=!1;for(;e"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const C=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function $(t,e){const n=x.getAllMatches(t,C),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};M.buildOptions=function(t){return Object.assign({},G,t)},M.defaultOptions=G;const k=I;function j(t,e){let n="";for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1};const J=I,Q=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},tt=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,r=!1,s=!1,o="";for(;e"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&U(t,e))e+=7,[entityName,val,e]=j(t,e+1),-1===val.indexOf("&")&&(n[q(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&B(t,e))e+=8;else if(r&&H(t,e))e+=8;else if(r&&Y(t,e))e+=9;else{if(!X)throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}},et=function(t,e={}){if(e=Object.assign({},z,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(e.hex&&K.test(n))return Number.parseInt(n,16);{const r=Z.exec(n);if(r){const s=r[1],o=r[2];let a=(i=r[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substr(0,i.length-1)),i):i;const l=r[4]||r[6];if(!e.leadingZeros&&o.length>0&&s&&"."!==n[2])return t;if(!e.leadingZeros&&o.length>0&&!s&&"."!==n[1])return t;{const i=Number(n),r=""+i;return-1!==r.search(/[eE]/)||l?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===r&&""===a||r===a||s&&r==="-"+a?i:t:o?a===r||s+a===r?i:t:n===r||n===s+r?i:t}}return t}var i},nt=W;function it(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Et(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function st(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const ot=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function at(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=J.getAllMatches(t,ot),i=n.length,r={};for(let t=0;t",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",s=e}else if("?"===t[s+1]){let e=pt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new Q(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=ft(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=tt(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=ft(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);i=this.saveTextToParentTag(i,n,r);let a=this.parseTextData(o,n.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),s=e+2}else{let o=pt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let d=o.tagExp,u=o.attrExpPresent,c=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const h=n;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(n=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,l,c+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,e=n.tagContent}const i=new Q(a);a!==d&&u&&(i[":@"]=this.buildAttributesMap(d,r,a)),e&&(e=this.parseTextData(e,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new Q(a);a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new Q(a);this.tagsNodeStack.push(n),a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),n=t}i="",s=c}}else i+=t[s];return e.child};function dt(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const ut=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function ct(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function ht(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function ft(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function pt(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=ft(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=ft(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=ft(t,"]]>",n,"StopNode is not closed.")-2;else{const i=pt(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Et(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&et(t,n)}return J.isExist(t)?t:""}var mt={};function bt(t,e,n){let i;const r={};for(let s=0;s0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function Nt(t){const e=Object.keys(t);for(let t=0;t"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=it,this.parseXml=lt,this.parseTextData=rt,this.resolveNameSpace=st,this.buildAttributesMap=at,this.isItStopNode=ht,this.replaceEntitiesValue=ut,this.readStopNodeData=gt,this.saveTextToParentTag=ct,this.addChild=dt,this.ignoreAttributesFn=nt(this.options.ignoreAttributes)}},{prettify:yt}=mt,At=w;function Ot(t,e,n,i){let r="",s=!1;for(let o=0;o`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Lt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let u=i;""!==u&&(u+=e.indentBy);const c=i+`<${l}${Lt(a[":@"],e)}`,h=Ot(a[l],e,d,u);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=c+">":r+=c+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?r+=c+`>${h}${i}`:(r+=c+">",h&&""!==i&&(h.includes("/>")||h.includes("`):r+=c+"/>",s=!0}return r}function Tt(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n0&&(n="\n"),Ot(t,e,"",n)},$t=W,St={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Pt(t){this.options=Object.assign({},St,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=$t(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Vt),this.processTextOrObjNode=Ft,this.options.format?(this.indentate=Dt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Ft(t,e,n,i){const r=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}function Dt(t){return this.options.indentBy.repeat(t)}function Vt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Pt.prototype.build=function(t){return this.options.preserveOrder?Ct(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Pt.prototype.j2x=function(t,e,n){let i="",r="";const s=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(r+="");else if(null===t[o])this.isAttribute(o)?r+="":"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)r+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,s))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);r+=this.replaceEntitiesValue(e)}else r+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let s="",a="";for(let l=0;l"+t+r}},Pt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"0&&this.options.processEntities)for(let e=0;e"svg"===t.toLowerCase()))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in t&&"number"!=typeof t.order)throw new Error("View order must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof N))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var jt="object"==typeof o&&o.env&&o.env.NODE_DEBUG&&/\bsemver\b/i.test(o.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},Xt={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ut={exports:{}};!function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=Xt,s=jt,o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],d=e.t={};let u=0;const c="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",r],[c,i]],f=(t,e,n)=>{const i=(t=>{for(const[e,n]of h)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),r=u++;s(t,r,e),d[t]=r,l[r]=e,o[r]=new RegExp(e,n?"g":void 0),a[r]=new RegExp(i,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),f("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[d.NUMERICIDENTIFIER]}|${l[d.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NUMERICIDENTIFIERLOOSE]}|${l[d.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${c}+`),f("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),f("FULL",`^${l[d.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),f("LOOSE",`^${l[d.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),f("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),f("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",l[d.COERCE],!0),f("COERCERTLFULL",l[d.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",f("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",f("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ut,Ut.exports);var Bt=Ut.exports;Object.freeze({loose:!0}),Object.freeze({});const Ht=/^[0-9]+$/,Yt=(t,e)=>{const n=Ht.test(t),i=Ht.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:tYt(e,t)};const{MAX_LENGTH:Kt,MAX_SAFE_INTEGER:Zt}=Xt,{safeRe:zt,t:Wt}=Bt,{compareIdentifiers:Jt}=qt;s.m}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,t=[],s.O=(e,n,i,r)=>{if(!n){var o=1/0;for(u=0;u=r)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,r0&&t[u-1][2]>r;u--)t[u]=t[u-1];t[u]=[n,i,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{5706:"3153330af47fc26a725a",6127:"40fbb3532bb7846b7035"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,i,r,o)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(f);var r=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),n)return n(i)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=2573,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={2573:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var i,r,o=n[0],a=n[1],l=n[2],d=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var u=l(s)}for(e&&e(n);ds(93806)));o=s.O(o)})(); //# sourceMappingURL=files_trashbin-init.js.map?v=072a0fb320dea9b97383