diff options
-rw-r--r-- | apps/files/src/actions/downloadAction.ts | 20 | ||||
-rw-r--r-- | dist/files-init.js | 4 | ||||
-rw-r--r-- | dist/files-init.js.map | 2 |
3 files changed, 20 insertions, 6 deletions
diff --git a/apps/files/src/actions/downloadAction.ts b/apps/files/src/actions/downloadAction.ts index 0b1c88fa985..0d8bfb7dfc2 100644 --- a/apps/files/src/actions/downloadAction.ts +++ b/apps/files/src/actions/downloadAction.ts @@ -41,6 +41,22 @@ const downloadNodes = function(dir: string, nodes: Node[]) { triggerDownload(url) } +const isDownloadable = function(node: Node) { + if ((node.permissions & Permission.READ) === 0) { + return false + } + + // If the mount type is a share, ensure it got download permissions. + if (node.attributes['mount-type'] === 'shared') { + const downloadAttribute = JSON.parse(node.attributes['share-attributes']).find((attribute: { scope: string; key: string }) => attribute.scope === 'permissions' && attribute.key === 'download') + if (downloadAttribute !== undefined && downloadAttribute.enabled === false) { + return false + } + } + + return true +} + export const action = new FileAction({ id: 'download', displayName: () => t('files', 'Download'), @@ -59,9 +75,7 @@ export const action = new FileAction({ return false } - return nodes - .map(node => node.permissions) - .every(permission => (permission & Permission.READ) !== 0) + return nodes.every(isDownloadable) }, async exec(node: Node, view: View, dir: string) { diff --git a/dist/files-init.js b/dist/files-init.js index 1f081719a21..decbe188c9a 100644 --- a/dist/files-init.js +++ b/dist/files-init.js @@ -1,3 +1,3 @@ /*! For license information please see files-init.js.LICENSE.txt */ -(()=>{var e,n,r,i={34507:(e,n,r)=>{"use strict";var i=r(5656),o=r(69183),a=r(31352),s=r(93664),l=r(17499);const d=(0,l.IY)().setApp("files").detectUser().build(),c=new i.p$({id:"delete",displayName:(e,t)=>"trashbin"===t.id?(0,a.Iu)("files","Delete permanently"):(0,a.Iu)("files","Delete"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-trash-can" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z" /></svg>',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&i.y3.DELETE))),async exec(e){try{return await s.Z.delete(e.encodedSource),(0,o.j8)("files:node:deleted",e),!0}catch(t){return d.error("Error while deleting a file",{error:t,source:e.source,node:e}),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:100});var u=r(79753);const f=function(e){const t=document.createElement("a");t.download="",t.href=e,t.click()},p=function(e,t){const n=Math.random().toString(36).substring(2),r=(0,u.generateUrl)("/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}",{dir:e,secret:n,files:JSON.stringify(t.map((e=>e.basename)))});f(r)},h=new i.p$({id:"download",displayName:()=>(0,a.Iu)("files","Download"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-down" viewBox="0 0 24 24"><path d="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z" /></svg>',enabled:e=>0!==e.length&&(!e.some((e=>e.type===i.Tv.Folder))||!e.some((e=>!e.root?.startsWith("/files"))))&&e.map((e=>e.permissions)).every((e=>0!=(e&i.y3.READ))),exec:async(e,t,n)=>e.type===i.Tv.Folder?(p(n,[e]),null):(f(e.source),null),async execBatch(e,t,n){return 1===e.length?(this.exec(e[0],t,n),[null]):(p(n,e),new Array(e.length).fill(null))},order:30});var g=r(65358),m=r(77958),A=r(64024);const v=new i.p$({id:"edit-locally",displayName:()=>(0,a.Iu)("files","Edit locally"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-laptop" viewBox="0 0 24 24"><path d="M4,6H20V16H4M20,18A2,2 0 0,0 22,16V6C22,4.89 21.1,4 20,4H4C2.89,4 2,4.89 2,6V16A2,2 0 0,0 4,18H0V20H24V18H20Z" /></svg>',enabled:e=>1===e.length&&0!=(e[0].permissions&i.y3.UPDATE),exec:async e=>(async function(e){const t=(0,u.generateOcsUrl)("apps/files/api/v1")+"/openlocaleditor?format=json";try{const n=await s.Z.post(t,{path:e}),r=(0,m.ts)()?.uid;let i=`nc://open/${r}@`+window.location.host+(0,g.Ec)(e);i+="?token="+n.data.ocs.data.token,window.location.href=i}catch(e){(0,A.x2)((0,a.Iu)("files","Failed to redirect to client"))}}(e.path),null),order:25});var b=r(20144);const w='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star" viewBox="0 0 24 24"><path d="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" /></svg>',y=e=>e.some((e=>1!==e.attributes.favorite)),_=async(e,t,n)=>{try{const r=(0,u.generateUrl)("/apps/files/api/v1/files")+(0,g.Ec)(e.path);return await s.Z.post(r,{tags:n?[window.OC.TAG_FAVORITE]:[]}),"favorites"!==t.id||n||"/"!==e.dirname||(0,o.j8)("files:node:deleted",e),b.default.set(e.attributes,"favorite",n?1:0),n?(0,o.j8)("files:favorites:added",e):(0,o.j8)("files:favorites:removed",e),!0}catch(t){const r=n?"adding a file to favourites":"removing a file from favourites";return d.error("Error while "+r,{error:t,source:e.source,node:e}),!1}},C=new i.p$({id:"favorite",displayName:e=>y(e)?(0,a.Iu)("files","Add to favorites"):(0,a.Iu)("files","Remove from favorites"),iconSvgInline:e=>y(e)?'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star-outline" viewBox="0 0 24 24"><path d="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z" /></svg>':w,enabled:e=>!e.some((e=>!e.root?.startsWith?.("/files")))&&e.every((e=>e.permissions!==i.y3.NONE)),async exec(e,t){const n=y([e]);return await _(e,t,n)},async execBatch(e,t){const n=y(e);return Promise.all(e.map((async e=>await _(e,t,n))))},order:-50});var E=r(93379),x=r.n(E),k=r(7795),T=r.n(k),S=r(90569),B=r.n(S),N=r(3565),O=r.n(N),R=r(19216),I=r.n(R),P=r(44589),L=r.n(P),M=r(51473),j={};j.styleTagTransform=L(),j.setAttributes=O(),j.insert=B().bind(null,"head"),j.domAPI=T(),j.insertStyleElement=I(),x()(M.Z,j),M.Z&&M.Z.locals&&M.Z.locals;var D=r(51120);const{Axios:F,AxiosError:$,CanceledError:U,isCancel:H,CancelToken:q,VERSION:V,all:W,Cancel:z,isAxiosError:Y,spread:Z,toFormData:G,AxiosHeaders:X,HttpStatusCode:K,formToJSON:J,getAdapter:Q,mergeConfig:ee}=D.default;var te=r(62520),ne=r(59546),re=r(96384),ie=r(59440);let oe;const ae=()=>(oe||(oe=new ie.Z({concurrency:3})),oe);var se;!function(e){e.MOVE="Move",e.COPY="Copy",e.MOVE_OR_COPY="move-or-copy"}(se||(se={}));const le=e=>0!=(e.reduce(((e,t)=>Math.min(e,t.permissions)),i.y3.ALL)&i.y3.UPDATE),de=e=>(e=>e.every((e=>!JSON.parse(e.attributes?.["share-attributes"]??"[]").some((e=>"permissions"===e.scope&&!1===e.enabled&&"download"===e.key)))))(e);var ce=r(25108);const ue=e=>le(e)?de(e)?se.MOVE_OR_COPY:se.MOVE:se.COPY,fe=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t)return;if(t.type!==i.Tv.Folder)throw new Error((0,a.Iu)("files","Destination is not a folder"));if(e.dirname===t.path)throw new Error((0,a.Iu)("files","This file/folder is already in that directory"));if(e.path.startsWith(t.path))throw new Error((0,a.Iu)("files","You cannot move a file/folder onto itself or into a subfolder of itself"));const l=(0,te.join)(t.path,e.basename),c=(0,u.generateRemoteUrl)(`dav/files/${(0,m.ts)()?.uid}${l}`);d.debug(`${n} ${e.basename} to ${c}`),b.default.set(e,"status",i.e4.LOADING);const f=ae();return await f.add((async()=>{try{await(0,s.Z)({method:n===se.COPY?"COPY":"MOVE",url:e.encodedSource,headers:{Destination:encodeURI(c),Overwrite:r?void 0:"F"}}),n===se.MOVE&&(0,o.j8)("files:node:deleted",e)}catch(e){if(e instanceof $){if(412===e?.response?.status)throw new Error((0,a.Iu)("files","A file or folder with that name already exists in this folder"));if(423===e?.response?.status)throw new Error((0,a.Iu)("files","The files is locked"));if(404===e?.response?.status)throw new Error((0,a.Iu)("files","The file does not exist anymore"));if(e.message)throw new Error(e.message)}throw new Error}finally{b.default.set(e,"status",void 0)}}))},pe=new i.p$({id:"move-copy",displayName(e){switch(ue(e)){case se.MOVE:return(0,a.Iu)("files","Move");case se.COPY:return(0,a.Iu)("files","Copy");case se.MOVE_OR_COPY:return(0,a.Iu)("files","Move or copy")}},iconSvgInline:()=>re,enabled:e=>!!e.every((e=>e.root?.startsWith("/files/")))&&e.length>0&&(le(e)||de(e)),async exec(e,t,n){const r=ue([e]);try{return await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const r=(0,A.fn)((0,a.Iu)("files","Chose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&i.y3.CREATE)&&n.fileid!==e.fileid)).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,i)=>{r.setButtonFactory(((r,o)=>{const s=[],l=(0,te.basename)(o);return n.dirname===o||n.path===o||(e!==se.COPY&&e!==se.MOVE_OR_COPY||s.push({label:l?(0,a.Iu)("files","Copy to {target}",{target:l}):(0,a.Iu)("files","Copy"),type:"primary",icon:ne,async callback(e){try{await fe(n,e[0],se.COPY),t(!0)}catch(e){i(e)}}}),e!==se.MOVE&&e!==se.MOVE_OR_COPY||s.push({label:l?(0,a.Iu)("files","Move to {target}",{target:l}):(0,a.Iu)("files","Move"),type:e===se.MOVE?"primary":"secondary",icon:re,async callback(e){try{await fe(n,e[0],se.MOVE),t(!0)}catch(e){ce.warn("got error",e),i(e)}}})),s})),r.build().pick().catch((()=>{i(new Error((0,a.Iu)("files","Cancelled move or copy operation")))}))}))}(r,n,e),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,A.x2)(e.message),null)}},order:15}),he='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path 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" /></svg>',ge=new i.p$({id:"open-folder",displayName(e){const t=e[0].attributes.displayName||e[0].basename;return(0,a.Iu)("files","Open folder {displayName}",{displayName:t})},iconSvgInline:()=>he,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.type===i.Tv.Folder&&0!=(t.permissions&i.y3.READ)},exec:async(e,t,n)=>!(!e||e.type!==i.Tv.Folder)&&(window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:(0,te.join)(n,e.basename)}),null),default:i.DT.HIDDEN,order:-100}),me=new i.p$({id:"open-in-files-recent",displayName:()=>(0,a.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>"recent"===t.id,async exec(e){let t=e.dirname;return e.type===i.Tv.Folder&&(t=t+"/"+e.basename),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:t}),null},order:-1e3,default:i.DT.HIDDEN}),Ae=new i.p$({id:"rename",displayName:()=>(0,a.Iu)("files","Rename"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-pencil" viewBox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /></svg>',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&i.y3.UPDATE))),exec:async e=>((0,o.j8)("files:node:rename",e),null),order:10});var ve=r(48250);const be=new i.p$({id:"details",displayName:()=>(0,a.Iu)("files","Open details"),iconSvgInline:()=>ve,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==i.y3.NONE)??!1),async exec(e,t,n){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:n},!0),null}catch(e){return d.error("Error while opening sidebar",{error:e}),!1}},order:-50}),we=new i.p$({id:"view-in-folder",displayName:()=>(0,a.Iu)("files","View in folder"),iconSvgInline:()=>re,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.permissions!==i.y3.NONE&&t.type===i.Tv.File},exec:async(e,t,n)=>!(!e||e.type!==i.Tv.File)&&(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:80}),ye=(e,t)=>{let n=e,r=1;for(;t.includes(n);){const t=(0,te.extname)(e);n=`${(0,te.basename)(e,t)} (${r++})${t}`}return n},_e={id:"newFolder",displayName:(0,a.Iu)("files","New folder"),enabled:e=>0!=(e.permissions&i.y3.CREATE),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-plus" viewBox="0 0 24 24"><path d="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.12 13.3 20.1 13 19 13C15.69 13 13 15.69 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z" /></svg>',order:0,async handler(e,t){const n=t.map((e=>e.basename)),r=ye((0,a.Iu)("files","New folder"),n),{fileid:l,source:c}=await(async(e,t)=>{const n=e.source+"/"+t,r=e.encodedSource+"/"+encodeURIComponent(t),i=await(0,s.Z)({method:"MKCOL",url:r,headers:{Overwrite:"F"}});return{fileid:parseInt(i.headers["oc-fileid"]),source:n}})(e,r),u=new i.gt({source:c,id:l,mtime:new Date,owner:(0,m.ts)()?.uid||null,permissions:i.y3.ALL,root:e?.root||"/files/"+(0,m.ts)()?.uid});(0,A.s$)((0,a.Iu)("files",'Created new folder "{name}"',{name:(0,te.basename)(c)})),d.debug("Created new folder",{folder:u,source:c}),(0,o.j8)("files:node:created",u),(0,o.j8)("files:node:rename",u)}};var Ce=r(43554),Ee=r(14596),xe=r(8501),ke=r(79267);const Te="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Se=Te.fetch.bind(Te);Te.Headers,Te.Request,Te.Response;const Be="@@HOTPATCHER",Ne=()=>{};function Oe(e){return{original:e,methods:[e],final:!1}}class Re{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Be}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==Be)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||Ne)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const r=this;for(;e.length>0;)n=[e.shift().apply(r,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Oe(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Oe(t),{original:n})}else this.configuration.registry[e]=Oe(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Ie=null;var Pe=r(62639),Le=r(2568);const Me="abcdef0123456789";function je(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a=`00000000${t.nc}`.slice(-8),s=function(e,t,n,r,i,o,a){const s=a||Le(`${t}:${n}:${r}`);return e&&"md5-sess"===e.toLowerCase()?Le(`${s}:${i}:${o}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=Le(`${i}:${r}`),d=Le(o?`${s}:${t.nonce}:${a}:${t.cnonce}:${o}:${l}`:`${s}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:d,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?u.push(`${e}=${c[e]}`):u.push(`${e}="${c[e]}"`));return`Digest ${u.join(", ")}`}function De(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Fe(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?$e(t,e):De(e)}return t}function $e(e,t){const n=De(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?$e(n[e],t[e]):De(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Ue(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((r=>{const i=r.toLowerCase();t.hasOwnProperty(i)?e[t[i]]=n[r]:(t[i]=r,e[r]=n[r])})),e)),{})}var He=r(42830);const qe="function"==typeof ArrayBuffer,{toString:Ve}=Object.prototype;function We(e){const t=(Ie||(Ie=new Re),Ie);return t.patchInline("request",(e=>t.patchInline("fetch",Se,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Ue(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if(!(0,Pe.$)()&&e instanceof He.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return qe&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Ve.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=Ue(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,Pe.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new xe.Agent:e.httpsAgent||new ke.Agent),n.headers=t,n}(e))),e)}const ze=`/files/${(0,m.ts)()?.uid}`,Ye=(0,u.generateRemoteUrl)("dav"+ze),Ze=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye;const t=(0,Ee.eI)(e,{headers:{requesttoken:(0,m.IH)()||""}});return(0,Ee.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return We(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=Fe(e,{headers:{Authorization:je(e,t)}}));const n=await We(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=r.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${Me[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=Fe(e,{headers:{Authorization:je(e,t)}});const n=await We(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};var Ge=r(3443);const Xe=function(e){return e.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0)},Ke=Ze(),Je=function(e){const t=e.props,n=(0,i.zu)(t?.permissions),r=(0,m.ts)()?.uid,o=(0,u.generateRemoteUrl)("dav"+ze+e.filename),a={id:t?.fileid<0?Xe(o):t?.fileid||0,source:o,mtime:new Date(e.lastmod),mime:e.mime,size:t?.size||0,permissions:n,owner:r,root:ze,attributes:{...e,...t,hasPreview:t?.["has-preview"],failed:t?.fileid<0}};return delete a.attributes.props,"file"===e.type?new i.$B(a):new i.gt(a)},Qe=Ze(),et=`<?xml version="1.0"?>\n<oc:filter-files ${(0,i.w4)()}>\n\t<d:prop>\n\t\t${(0,i.m0)()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:favorite>1</oc:favorite>\n\t</oc:filter-rules>\n</oc:filter-files>`,tt=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(0,i.h7)();let n;"/"===e&&(n=await Qe.stat(e,{details:!0,data:t}));const r=await Qe.getDirectoryContents(e,{details:!0,data:"/"===e?et:t,headers:{method:"/"===e?"REPORT":"PROPFIND"},includeSelf:!0}),o=n?.data||r.data[0],a=r.data.filter((t=>t.filename!==e));return{folder:Je(o),contents:a.map(Je)}},nt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new i.G7({id:rt(e),name:(0,te.basename)(e),icon:he,order:t,params:{dir:e,view:"favorites"},parent:"favorites",columns:[],getContents:tt})},rt=function(e){return`favorite-${Xe(e)}`},it=Ze((0,u.generateRemoteUrl)("dav")),ot=Math.round(Date.now()/1e3-1209600),at=`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${(0,i.w4)()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${(0,i.m0)()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,m.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${ot}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;var st=r(22175),lt=r(25475);const dt={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return`template-picker-${this.fileid}`},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,m.ts)()?(0,u.generateUrl)(`/core/preview?fileId=${this.fileid}&x=256&y=256&a=1`):(0,u.generateUrl)(`/apps/files_sharing/publicpreview/${document.getElementById("sharingToken")&&document.getElementById("sharingToken").value}?fileId=${this.fileid}&file=${function(e){const t=(e.startsWith("/")?e:`/${e}`).split("/");let n="";return t.forEach((e=>{""!==e&&(n+="/"+encodeURIComponent(e))})),n}(this.filename)}&x=256&y=256&a=1`)},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}};var ct=r(92246),ut={};ut.styleTagTransform=L(),ut.setAttributes=O(),ut.insert=B().bind(null,"head"),ut.domAPI=T(),ut.insertStyleElement=I(),x()(ct.Z,ut),ct.Z&&ct.Z.locals&&ct.Z.locals;var ft=r(51900);const pt=(0,ft.Z)(dt,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"0859a92c",null).exports,ht=b.default.extend({name:"TemplatePicker",components:{NcEmptyContent:st.Z,NcModal:lt.Z,TemplatePreview:pt},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{extension(){return(0,te.extname)(this.name)},nameWithoutExt(){return this.extension?this.name.slice(0,0-this.extension.length):this.name},emptyTemplate(){return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:this.provider?.mimetypes[0]||this.provider?.mimetypes}},selectedTemplate(){return this.provider?this.provider.templates.find((e=>e.fileid===this.checked)):null},style(){if(!this.provider)return{};const e=(this.provider.ratio?this.provider.ratio:1.77)>1?240:160;return{"--margin":"8px","--width":e+"px","--border":"2px","--fullwidth":e+16+4+"px","--height":this.provider.ratio?Math.round(e/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await s.Z.get((0,u.generateOcsUrl)("apps/files/api/v1/templates"))).data.ocs.data}()).find((e=>e.app===t.app&&e.label===t.label));if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){this.loading=!0;const e=new URL(window.location.href).searchParams.get("dir")||"/";this.nameWithoutExt===this.name&&(this.logger.warn("Fixed invalid filename",{name:this.name,extension:this.provider?.extension}),this.name=this.name+this.provider?.extension);try{const t=await async function(e,t,n){return(await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:t,templateType:n})).data.ocs.data}((0,te.normalize)(`${e}/${this.name}`),this.selectedTemplate?.filename,this.selectedTemplate?.templateType);this.logger.debug("Created new file",t);const n=(0,m.ts)()?.uid||null,r=new i.$B({id:t.fileid,source:(0,u.generateRemoteUrl)((0,te.join)("dav/files",n,t.filename)),root:`/files/${n}`,mime:t.mime,mtime:new Date(1e3*t.lastmod),owner:n,size:t.size,permissions:t.permissions,attributes:{...t,"has-preview":t.hasPreview}});(0,o.j8)("files:node:created",r),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:r.fileid},{dir:r.dirname,openfile:!0}),this.close()}catch(e){this.logger.error("Error while creating the new file from template",{error:e}),(0,A.x2)(this.t("files","Unable to create new file from template"))}finally{this.loading=!1}}}});var gt=r(24142),mt={};mt.styleTagTransform=L(),mt.setAttributes=O(),mt.insert=B().bind(null,"head"),mt.domAPI=T(),mt.insertStyleElement=I(),x()(gt.Z,mt),gt.Z&>.Z.locals&>.Z.locals;const At=(0,ft.Z)(ht,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"48121b39",null).exports,vt=(0,l.IY)().setApp("files").detectUser().build();b.default.mixin({methods:{t:a.Iu,n:a.uN}});const bt=document.createElement("div");bt.id="template-picker",document.body.appendChild(bt);let wt=(0,Ce.j)("files","templates",[]),yt=(0,Ce.j)("files","templates_path",!1);vt.debug("Templates providers",wt),vt.debug("Templates folder",{templatesPath:yt});const _t=new(b.default.extend(At))({name:"TemplatePicker",propsData:{logger:vt}});_t.$mount("#template-picker"),yt||(vt.debug("Templates folder not initialized"),(0,i.cd)({id:"template-picker",displayName:(0,a.Iu)("files","Create new templates folder"),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-plus" viewBox="0 0 24 24"><path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg>',order:10,enabled:e=>e.owner===(0,m.ts)()?.uid&&0!=(e.permissions&i.y3.CREATE),handler(e,t){const n=t.map((e=>e.basename)),r=ye((0,a.Iu)("files","Templates"),n);Ct(e,r),(0,i.oE)("template-picker")}})),wt.forEach(((e,t)=>{(0,i.cd)({id:`template-new-${e.app}-${t}`,displayName:e.label,iconClass:e.iconClass||"icon-file",enabled:e=>0!=(e.permissions&i.y3.CREATE),order:11,handler(t,n){const r=n.map((e=>e.basename)),i=ye(e.label+e.extension,r);_t.open(i,e)}})}));const Ct=async function(e,t){const n=(0,te.join)(e.path,t);try{vt.debug("Initializing the templates directory",{templatePath:n});const e=await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:void 0},{dir:n}),wt=e.data.ocs.data.templates,yt=e.data.ocs.data.template_path}catch(e){vt.error("Unable to initialize the templates directory"),(0,A.x2)((0,a.Iu)("files","Unable to initialize the templates directory"))}};(0,i.p4)(c),(0,i.p4)(h),(0,i.p4)(v),(0,i.p4)(C),(0,i.p4)(pe),(0,i.p4)(ge),(0,i.p4)(me),(0,i.p4)(Ae),(0,i.p4)(be),(0,i.p4)(we),(0,i.cd)(_e),(()=>{const e=(0,Ce.j)("files","favoriteFolders",[]),t=e.map(((e,t)=>nt(e,t))),n=(0,i.Ti)();n.register(new i.G7({id:"favorites",name:(0,a.Iu)("files","Favorites"),caption:(0,a.Iu)("files","List of favorites files and folders."),emptyTitle:(0,a.Iu)("files","No favorites yet"),emptyCaption:(0,a.Iu)("files","Files and folders you mark as favorite will show up here"),icon:w,order:5,columns:[],getContents:tt})),t.forEach((e=>n.register(e))),(0,o.Ld)("files:favorites:added",(e=>{e.type===i.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?s(e.path):d.error("Favorite folder is not within user files root",{node:e}))})),(0,o.Ld)("files:favorites:removed",(e=>{e.type===i.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?l(e.path):d.error("Favorite folder is not within user files root",{node:e}))}));const r=function(){e.sort(((e,t)=>e.localeCompare(t,(0,a.G3)(),{ignorePunctuation:!0}))),e.forEach(((e,n)=>{const r=t.find((t=>t.id===rt(e)));r&&(r.order=n)}))},s=function(i){const o=nt(i);e.find((e=>e===i))||(e.push(i),t.push(o),r(),n.register(o))},l=function(i){const o=rt(i),a=e.findIndex((e=>e===i));-1!==a&&(e.splice(a,1),t.splice(a,1),n.remove(o),r())}})(),(0,i.Ti)().register(new i.G7({id:"files",name:(0,a.Iu)("files","All files"),caption:(0,a.Iu)("files","List of your files and folders."),icon:he,order:0,getContents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=new AbortController,n=(0,i.h7)();return new Ge.CancelablePromise((async(r,i,o)=>{o((()=>t.abort()));try{const i=await Ke.getDirectoryContents(e,{details:!0,data:n,includeSelf:!0,signal:t.signal}),o=i.data[0],a=i.data.slice(1);if(o.filename!==e)throw new Error("Root node does not match requested path");r({folder:Je(o),contents:a.map((e=>{try{return Je(e)}catch(t){return d.error(`Invalid node detected '${e.basename}'`,{error:t}),null}})).filter(Boolean)})}catch(e){i(e)}}))}})),(0,i.Ti)().register(new i.G7({id:"recent",name:(0,a.Iu)("files","Recent"),caption:(0,a.Iu)("files","List of recently modified files and folders."),emptyTitle:(0,a.Iu)("files","No recently modified files"),emptyCaption:(0,a.Iu)("files","Files and folders you recently modified will show up here."),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-history" viewBox="0 0 24 24"><path d="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" /></svg>',order:2,defaultSortKey:"mtime",getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await it.getDirectoryContents(e,{details:!0,data:at,headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0})).data;return{folder:new i.gt({id:0,source:(0,u.generateRemoteUrl)("dav"+ze),root:ze,owner:(0,m.ts)()?.uid||null,permissions:i.y3.READ}),contents:t.map(Je)}}})),"serviceWorker"in navigator?window.addEventListener("load",(async()=>{try{const e=(0,u.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t=await navigator.serviceWorker.register(e,{scope:"/"});d.debug("SW registered: ",{registration:t})}catch(e){d.error("SW registration failed: ",{error:e})}})):d.debug("Service Worker is not enabled on this browser."),(0,i.qq)("nc:hidden",{nc:"http://nextcloud.org/ns"}),(0,i.qq)("nc:metadata-files-live-photo",{nc:"http://nextcloud.org/ns"})},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var r,i,o=n(25108);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,g(e,t,"get"))}function h(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,g(e,t,"set"),n),n}function g(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CancelablePromise=void 0,e.cancelable=_,e.default=void 0,e.isCancelablePromise=C;var m="undefined"!=typeof Symbol?Symbol.toStringTag:"@@toStringTag",A=new WeakMap,v=new WeakMap,b=function(){function e(t){var n=t.executor,r=void 0===n?function(){}:n,i=t.internals,o=void 0===i?{isCanceled:!1,onCancelList:[]}:i,a=t.promise,s=void 0===a?new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})):a;l(this,e),f(this,A,{writable:!0,value:void 0}),f(this,v,{writable:!0,value:void 0}),u(this,m,"CancelablePromise"),this.cancel=this.cancel.bind(this),h(this,A,o),h(this,v,s||new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})))}return c(e,[{key:"then",value:function(e,t){return x(p(this,v).then(E(e,p(this,A)),E(t,p(this,A))),p(this,A))}},{key:"catch",value:function(e){return x(p(this,v).catch(E(e,p(this,A))),p(this,A))}},{key:"finally",value:function(e,t){var n=this;return t&&p(this,A).onCancelList.push(e),x(p(this,v).finally(E((function(){if(e)return t&&(p(n,A).onCancelList=p(n,A).onCancelList.filter((function(t){return t!==e}))),e()}),p(this,A))),p(this,A))}},{key:"cancel",value:function(){p(this,A).isCanceled=!0;var e=p(this,A).onCancelList;p(this,A).onCancelList=[];var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("function"==typeof r)try{r()}catch(e){o.error(e)}}}catch(e){n.e(e)}finally{n.f()}}},{key:"isCanceled",value:function(){return!0===p(this,A).isCanceled}}]),e}(),w=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t(e,n)}(i,e);var r=n(i);function i(e){return l(this,i),r.call(this,{executor:e})}return c(i)}(b);e.CancelablePromise=w,u(w,"all",(function(e){return k(e,Promise.all(e))})),u(w,"allSettled",(function(e){return k(e,Promise.allSettled(e))})),u(w,"any",(function(e){return k(e,Promise.any(e))})),u(w,"race",(function(e){return k(e,Promise.race(e))})),u(w,"resolve",(function(e){return _(Promise.resolve(e))})),u(w,"reject",(function(e){return _(Promise.reject(e))})),u(w,"isCancelable",C);var y=w;function _(e){return x(e,{isCanceled:!1,onCancelList:[]})}function C(e){return e instanceof w||e instanceof b}function E(e,t){if(e)return function(n){if(!t.isCanceled){var r=e(n);return C(r)&&t.onCancelList.push(r.cancel),r}return n}}function x(e,t){return new b({internals:t,promise:e})}function k(e,t){var n={isCanceled:!1,onCancelList:[]};return n.onCancelList.push((function(){var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;C(r)&&r.cancel()}}catch(e){n.e(e)}finally{n.f()}})),new b({internals:n,promise:t})}e.default=y},void 0===(i=r.apply(t,[t]))||(e.exports=i)},51473:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o),s=n(61667),l=n.n(s),d=new URL(n(81490),n.b),c=new URL(n(90888),n.b),u=a()(i()),f=l()(d),p=l()(c);u.push([e.id,`@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${f});\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${p});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`,"",{version:3,sources:["webpack://./node_modules/@nextcloud/dialogs/dist/style.css"],names:[],mappings:"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAAiR;EACjR,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAiU;AACnU;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,wBAAwB;EACxB,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,mBAAmB;AACrB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,wBAAwB;AAC1B;AACA;EACE;IACE,yDAAyD;EAC3D;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB",sourcesContent:['@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=);\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n'],sourceRoot:""}]);const h=u},92246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o)()(i());a.push([e.id,".template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},24142:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o)()(i());a.push([e.id,".templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: end;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},17187:(e,t,n)=>{"use strict";var r,i=n(25108),o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}e.exports=l,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var d=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var o,a,s,l;if(c(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,i&&i.warn&&i.warn(l)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):A(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function A(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");d=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var d=l.length,c=A(l,d);for(n=0;n<d;++n)a(c[n],this,t)}return!0},l.prototype.addListener=function(e,t){return f(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return f(this,e,t,!0)},l.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},l.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},l.prototype.listenerCount=m,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},79267:(e,t,n)=>{var r=n(8501),i=n(8575),o=e.exports;for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),r.request.call(this,e,t)},o.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},94281:e=>{"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,s,l;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var d=("number"!=typeof l&&(l=0),l+1>(s=e).length||-1===s.indexOf(".",l)?"argument":"property");a='The "'.concat(e,'" ').concat(d," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},56753:(e,t,n)=>{"use strict";var r=n(34155),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var o=n(79481),a=n(64229);n(35717)(c,o);for(var s=i(a.prototype),l=0;l<s.length;l++){var d=s[l];c.prototype[d]||(c.prototype[d]=a.prototype[d])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},82725:(e,t,n)=>{"use strict";e.exports=i;var r=n(74605);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(35717)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},79481:(e,t,n)=>{"use strict";var r,i=n(34155);e.exports=x,x.ReadableState=E,n(17187).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=n(22503),l=n(48764).Buffer,d=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(94616);o=c&&c.debuglog?c.debuglog("stream"):function(){};var u,f,p,h=n(57327),g=n(61195),m=n(82457).getHighWaterMark,A=n(94281).q,v=A.ERR_INVALID_ARG_TYPE,b=A.ERR_STREAM_PUSH_AFTER_EOF,w=A.ERR_METHOD_NOT_IMPLEMENTED,y=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(35717)(x,s);var _=g.errorOrDestroy,C=["error","close","destroy","pause","resume"];function E(e,t,i){r=r||n(56753),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(32553).s),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function x(e){if(r=r||n(56753),!(this instanceof x))return new x(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function k(e,t,n,r,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,s);else if(i||(a=function(e,t){var n,r;return r=t,l.isBuffer(r)||r instanceof d||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t)),n}(s,t)),a)_(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)s.endEmitted?_(e,new y):T(e,s,t,!0);else if(s.ended)_(e,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):R(e,s)):T(e,s,t,!1)}else r||(s.reading=!1,R(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&N(e)),R(e,t)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=g.destroy,x.prototype._undestroy=g.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),k(this,e,t,!1,n)},x.prototype.unshift=function(e){return k(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(e){u||(u=n(32553).s);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function B(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(O,e))}function O(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(o("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){o("readable nexttick read 0"),e.read(0)}function M(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick($,t,e))}function $(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}x.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):N(this),null;if(0===(e=B(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=B(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){_(this,new w("_read()"))},x.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?g:l;function l(){o("onend"),e.end()}r.endEmitted?i.nextTick(s):n.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",d),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",u),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}));var d=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",d);var c=!1;function u(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==U(r.pipes,e))&&!c&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){o("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&_(e,t)}function p(){e.removeListener("finish",h),g()}function h(){o("onfinish"),e.removeListener("close",p),g()}function g(){o("unpipe"),n.unpipe(e)}return n.on("data",u),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",h),e.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},x.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?N(this):r.reading||i.nextTick(L,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(P,this),n},x.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(P,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(M,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<C.length;a++)e.on(C[a],this.emit.bind(this,C[a]));return this._read=function(t){o("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(45850)),f(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=D,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(e,t){return void 0===p&&(p=n(15167)),p(x,e,t)})},74605:(e,t,n)=>{"use strict";e.exports=c;var r=n(94281).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(56753);function d(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,n){f(e,t,n)}))}function f(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}n(35717)(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},64229:(e,t,n)=>{"use strict";var r,i=n(34155);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=x,x.WritableState=E;var a,s={deprecate:n(94927)},l=n(22503),d=n(48764).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=n(61195),f=n(82457).getHighWaterMark,p=n(94281).q,h=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_MULTIPLE_CALLBACK,A=p.ERR_STREAM_CANNOT_PIPE,v=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,y=p.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;function C(){}function E(e,t,a){r=r||n(56753),e=e||{},"boolean"!=typeof a&&(a=t instanceof r),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,r)):(o(r),e._writableState.errorEmitted=!0,_(e,r),O(e,t))}(e,n,r,t,o);else{var a=B(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),r?i.nextTick(T,e,n,a,o):T(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function x(e){var t=this instanceof(r=r||n(56753));if(!t&&!a.call(x,this))return new x(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function k(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,k(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var d=n.chunk,c=n.encoding,u=n.callback;if(k(e,t,!1,t.objectMode?1:d.length,d,c,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function N(e,t){e._final((function(n){t.pendingcb--,n&&_(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=B(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(N,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(35717)(x,l),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&e&&e._writableState instanceof E}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){_(this,new A)},x.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,d.isBuffer(r)||r instanceof c);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=C),o.ending?function(e,t){var n=new w;_(e,n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o;return null===n?o=new b:"string"==typeof n||t.objectMode||(o=new h("chunk",["string","Buffer"],n)),!o||(_(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,r,i,o);return l}(this,o,s,e,t,n)),a},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||S(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new g("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=u.destroy,x.prototype._undestroy=u.undestroy,x.prototype._destroy=function(e,t){t(e)}},45850:(e,t,n)=>{"use strict";var r,i=n(34155);function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(8610),s=Symbol("lastResolve"),l=Symbol("lastReject"),d=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var n=e[p].read();null!==n&&(e[u]=null,e[s]=null,e[l]=null,t(h(n,!1)))}}function m(e){i.nextTick(g,e)}var A=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((o(r={get stream(){return this[p]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise((function(t,n){i.nextTick((function(){e[d]?n(e[d]):t(h(void 0,!0))}))}));var n,r=this[u];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(h(void 0,!0)):t[f](n,r)}),r)}}(r,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(h(o,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[p].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),r),A);e.exports=function(e){var t,n=Object.create(v,(o(t={},p,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,f,{value:function(e,t){var r=n[p].read();r?(n[u]=null,n[s]=null,n[l]=null,e(h(r,!1))):(n[s]=e,n[l]=t)},writable:!0}),t));return n[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[u]=null,n[s]=null,n[l]=null,t(e)),void(n[d]=e)}var r=n[s];null!==r&&(n[u]=null,n[s]=null,n[l]=null,r(h(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}},57327:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.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:String(t)}var l=n(48764).Buffer,d=n(52361).inspect,c=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,i=l.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,l.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return d(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},61195:(e,t,n)=>{"use strict";var r=n(34155);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,e)):r.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t?(r.nextTick(o,n),t(e)):r.nextTick(o,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,n)=>{"use strict";var r=n(94281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||c()},d=t._writableState&&t._writableState.finished,c=function(){s=!1,d=!0,a||o.call(t)},u=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,u=!0,s||o.call(t)},p=function(e){o.call(t,e)},h=function(){var e;return a&&!u?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!d?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},g=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",h),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",f),t.on("finish",c),!1!==n.error&&t.on("error",p),t.on("close",h),function(){t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",g),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",f),t.removeListener("error",p),t.removeListener("close",h)}}},15167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},59946:(e,t,n)=>{"use strict";var r,i=n(94281).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function d(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var c,u=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var f=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(8610)),r(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,(function(e){c||(c=e),e&&f.forEach(l),o||(f.forEach(l),u(c))}))}));return t.reduce(d)}},82457:(e,t,n)=>{"use strict";var r=n(94281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},22503:(e,t,n)=>{e.exports=n(17187).EventEmitter},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},89509:(e,t,n)=>{var r=n(48764),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},42830:(e,t,n)=>{e.exports=i;var r=n(17187).EventEmitter;function i(){r.call(this)}n(35717)(i,r),i.Readable=n(79481),i.Writable=n(64229),i.Duplex=n(56753),i.Transform=n(74605),i.PassThrough=n(82725),i.finished=n(8610),i.pipeline=n(59946),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function d(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",d),e.removeListener("error",d),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",d),e.on("error",d),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},8501:(e,t,n)=>{var r=n(11989),i=n(55676),o=n(47529),a=n(50584),s=n(8575),l=t;l.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,l=e.hostname||e.host,d=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(d?":"+d:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new r(e);return t&&u.on("response",t),u},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(n.g.fetch)&&a(n.g.ReadableStream),t.writableStream=a(n.g.WritableStream),t.abortController=a(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),r=null},11989:(e,t,n)=>{var r=n(48764).Buffer,i=n(34155),o=n(8725),a=n(35717),s=n(55676),l=n(88473),d=s.IncomingMessage,c=s.readyStates,u=e.exports=function(e){var t,n=this;l.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};a(u,l.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var d=new AbortController;l=d.signal,e._fetchAbortController=d,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.g.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),l.Writable.prototype.end.call(this,e,t,n)},u.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var r=n(34155),i=n(48764).Buffer,o=n(8725),a=n(35717),s=n(88473),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=t.IncomingMessage=function(e,t,n,a){var l=this;if(s.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){r.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=t,l.url=t.url,l.statusCode=t.status,l.statusMessage=t.statusText,t.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),o.writableStream){var d=new WritableStream({write:function(e){return a(!1),new Promise((function(t,n){l._destroyed?n():l.push(i.from(e))?t():l._resumeFetch=t}))},close:function(){a(!0),l._destroyed||l.push(null)},abort:function(e){a(!0),l._destroyed||l.emit("error",e)}});try{return void t.body.pipeTo(d).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){l._destroyed||(a(t.done),t.done?l.push(null):(l.push(i.from(t.value)),e()))})).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}()}else if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var u=l.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(l._charset=f[1].toLowerCase())}l._charset||(l._charset="utf-8")}};a(d,s.Readable),d.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},d.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,o=null;switch(t._mode){case"text":if((o=r.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),d=0;d<a.length;d++)s[d]=255&a.charCodeAt(d);t.push(s)}else t.push(a,t._charset);t._pos=o.length}break;case"arraybuffer":if(r.readyState!==l.DONE||!r.response)break;o=r.response,t.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=r.response,r.readyState!==l.LOADING||!o)break;t.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=r.response,r.readyState!==l.LOADING)break;var c=new n.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},32553:(e,t,n)=>{"use strict";var r=n(89509).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=d,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=u,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},94927:(e,t,n)=>{var r=n(25108);function i(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?r.trace(t):r.warn(t),n=!0}return e.apply(this,arguments)}}},47529:e=>{e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},81490:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="},24654:()=>{},52361:()=>{},94616:()=>{},5656:(e,t,n)=>{"use strict";n.d(t,{$B:()=>P,DT:()=>A,G7:()=>st,RL:()=>$,Ti:()=>H,Tv:()=>B,_o:()=>M,cd:()=>dt,e4:()=>R,gt:()=>L,h7:()=>k,m0:()=>E,oE:()=>ct,p$:()=>v,p4:()=>b,pC:()=>F,qq:()=>C,rp:()=>D,sS:()=>m,tB:()=>T,w4:()=>x,y3:()=>w,zu:()=>S});var r=n(77958),i=n(17499),o=n(31352),a=n(62520),s=n(65358),l=n(79753),d=n(14596);const c=null===(u=(0,r.ts)())?(0,i.IY)().setApp("files").build():(0,i.IY)().setApp("files").setUid(u.uid).build();var u;class f{_entries=[];registerEntry(e){this.validateEntry(e),this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):c.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}const p=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new f,c.debug("NewFileMenu initialized")),window._nc_newfilemenu},h=["B","KB","MB","GB","TB","PB"],g=["B","KiB","MiB","GiB","TiB","PiB"];function m(e,t=!1,n=!1,r=!1){n=n&&!r,"string"==typeof e&&(e=Number(e));let i=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;i=Math.min((n?g.length:h.length)-1,i);const a=n?g[i]:h[i];let s=(e/Math.pow(r?1e3:1024,i)).toFixed(1);return!0===t&&0===i?("0.0"!==s?"< 1 ":"0 ")+(n?g[1]:h[1]):(s=i<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,o.aj)()),s+" "+a)}var A=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(A||{});class v{_action;constructor(e){this.validateAction(e),this._action=e}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 inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(A).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}const b=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var w=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(w||{});const y=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],_={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},C=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...y],window._nc_dav_namespaces={..._});const n={...window._nc_dav_namespaces,...t};return window._nc_dav_properties.find((t=>t===e))?(c.error(`${e} already registered`,{prop:e}),!1):e.startsWith("<")||2!==e.split(":").length?(c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(c.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},E=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...y]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")},x=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={..._}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")},k=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${x()}>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},T=function(e){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${x()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,r.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`},S=function(e=""){let t=w.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=w.CREATE),e.includes("G")&&(t|=w.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=w.UPDATE),e.includes("D")&&(t|=w.DELETE),e.includes("R")&&(t|=w.SHARE)),t};var B=(e=>(e.Folder="folder",e.File="file",e))(B||{});const N=function(e,t){return null!==e.match(t)},O=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=w.NONE&&e.permissions<=w.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&N(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,a.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(R).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var R=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(R||{});class I{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){O(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,s.Ec)(this.source.slice(e.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){const e=this.source.indexOf(this.root);return(0,a.dirname)(this.source.slice(e+this.root.length)||"/")}const e=new URL(this.source);return(0,a.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:w.NONE:w.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return N(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const e=this.source.indexOf(this.root);return this.source.slice(e+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){O({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class P extends I{get type(){return B.File}}class L extends I{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return B.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const M=`/files/${(0,r.ts)()?.uid}`,j=(0,l.generateRemoteUrl)("dav"),D=function(e=j){const t=(0,d.eI)(e);function n(e){t.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,r._S)(n),n((0,r.IH)()),(0,d.lD)().patch("fetch",((e,t)=>{const n=t.headers;return n?.method&&(t.method=n.method,delete n.method),fetch(e,t)})),t},F=async(e,t="/",n=M)=>(await e.getDirectoryContents(`${n}${t}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${x()}>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((e=>e.filename!==t)).map((e=>$(e,n))),$=function(e,t=M,n=j){const i=e.props,o=S(i?.permissions),a=(0,r.ts)()?.uid,s={id:i?.fileid||0,source:`${n}${e.filename}`,mtime:new Date(Date.parse(e.lastmod)),mime:e.mime,size:i?.size||Number.parseInt(i.getcontentlength||"0"),permissions:o,owner:a,root:t,attributes:{...e,...i,hasPreview:i?.["has-preview"]}};return delete s.attributes?.props,"file"===e.type?new P(s):new L(s)};class U{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}const H=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new U,c.debug("Navigation service initialized")),window._nc_navigation};class q{_column;constructor(e){V(e),this._column=e}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(e){if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var W={},z={};!function(e){const t=":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="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=r.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},e.nameRegexp=n}(z);const Y=z,Z={allowBooleanAttributes:!1,unpairedTags:[]};function G(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function X(e,t){const n=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const r=e.substr(n,t-n);if(t>5&&"xml"===r)return ie("InvalidXml","XML declaration allowed only at the start of the document.",se(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function K(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}W.validate=function(e,t){t=Object.assign({},Z,t);const n=[];let r=!1,i=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=X(e,o),o.err)return o}else{if("<"!==e[o]){if(G(e[o]))continue;return ie("InvalidChar","char '"+e[o]+"' is not expected.",se(e,o))}{let a=o;if(o++,"!"===e[o]){o=K(e,o);continue}{let s=!1;"/"===e[o]&&(s=!0,o++);let l="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)l+=e[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!ae(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",ie("InvalidTag",t,se(e,o))}const d=ee(e,o);if(!1===d)return ie("InvalidAttr","Attributes for '"+l+"' have open quote.",se(e,o));let c=d.value;if(o=d.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const i=ne(c,t);if(!0!==i)return ie(i.err.code,i.err.msg,se(e,n+i.err.line));r=!0}else if(s){if(!d.tagClosed)return ie("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",se(e,o));if(c.trim().length>0)return ie("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",se(e,a));{const t=n.pop();if(l!==t.tagName){let n=se(e,t.tagStartPos);return ie("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",se(e,a))}0==n.length&&(i=!0)}}else{const s=ne(c,t);if(!0!==s)return ie(s.err.code,s.err.msg,se(e,o-c.length+s.err.line));if(!0===i)return ie("InvalidXml","Multiple possible root nodes found.",se(e,o));-1!==t.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:a}),r=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=K(e,o);continue}if("?"!==e[o+1])break;if(o=X(e,++o),o.err)return o}else if("&"===e[o]){const t=re(e,o);if(-1==t)return ie("InvalidChar","char '&' is not expected.",se(e,o));o=t}else if(!0===i&&!G(e[o]))return ie("InvalidXml","Extra text at the end",se(e,o));"<"===e[o]&&o--}}}return r?1==n.length?ie("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",se(e,n[0].tagStartPos)):!(n.length>0)||ie("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ie("InvalidXml","Start tag expected.",1)};const J='"',Q="'";function ee(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===J||e[t]===Q)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const te=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ne(e,t){const n=Y.getAllMatches(e,te),r={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return ie("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",le(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return ie("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",le(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return ie("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",le(n[e]));const i=n[e][2];if(!oe(i))return ie("InvalidAttr","Attribute '"+i+"' is an invalid name.",le(n[e]));if(r.hasOwnProperty(i))return ie("InvalidAttr","Attribute '"+i+"' is repeated.",le(n[e]));r[i]=1}return!0}function re(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function ie(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function oe(e){return Y.isName(e)}function ae(e){return Y.isName(e)}function se(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function le(e){return e.startIndex+e[1].length}var de={};const ce={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};de.buildOptions=function(e){return Object.assign({},ce,e)},de.defaultOptions=ce;const ue=z;function fe(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function pe(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function he(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function ge(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function me(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function Ae(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function ve(e){if(ue.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const be=/^[-+]?0x[a-fA-F0-9]+$/,we=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const ye={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const _e=z,Ce=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Ee=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,i=!1,o=!1,a="";for(;t<e.length;t++)if("<"!==e[t]||o)if(">"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,r--):r--,0===r)break}else"["===e[t]?i=!0:a+=e[t];else{if(i&&he(e,t))t+=7,[entityName,val,t]=fe(e,t+1),-1===val.indexOf("&")&&(n[ve(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&ge(e,t))t+=8;else if(i&&me(e,t))t+=8;else if(i&&Ae(e,t))t+=9;else{if(!pe)throw new Error("Invalid DOCTYPE");o=!0}r++,a=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},xe=function(e,t={}){if(t=Object.assign({},ye,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&be.test(n))return Number.parseInt(n,16);{const r=we.exec(n);if(r){const i=r[1],o=r[2];let a=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(r[3]);const s=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),l=""+r;return-1!==l.search(/[eE]/)||s?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===l&&""===a||l===a||i&&l==="-"+a?r:e:o?a===l||i+a===l?r:e:n===l||n===i+l?r:e}}return e}};function ke(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function Te(e,t,n,r,i,o,a){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?Fe(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Se(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,_e.nameRegexp);const Be=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Ne(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=_e.getAllMatches(e,Be),r=n.length,i={};for(let e=0;e<r;e++){const r=this.resolveNameSpace(n[e][1]);let o=n[e][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(r,o,t);i[a]=null==e?o:typeof e!=typeof o||e!==o?e:Fe(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[a]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const Oe=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Ce("!xml");let n=t,r="",i="";for(let o=0;o<e.length;o++)if("<"===e[o])if("/"===e[o+1]){const t=Me(e,">",o,"Closing Tag is not closed.");let a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(r=this.saveTextToParentTag(r,n,i));const s=i.substring(i.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw new Error(`Unpaired tag can not be used as closing tag: </${a}>`);let l=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=je(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new Ce(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,i,t.tagName)),this.addChild(n,e,i)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=Me(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const a=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if("!D"===e.substr(o+1,2)){const t=Ee(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=Me(e,"]]>",o,"CDATA is not closed.")-2,a=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,i),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]);else{let e=this.parseTextData(a,n.tagname,i,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let a=je(e,o,this.options.removeNSPrefix),s=a.tagName;const l=a.rawTagName;let d=a.tagExp,c=a.attrExpPresent,u=a.closeIndex;this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),s!==t.tagname&&(i+=i?"."+s:s),this.isItStopNode(this.options.stopNodes,i,s)){let t="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))o=a.closeIndex;else{const n=this.readStopNodeData(e,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,t=n.tagContent}const r=new Ce(s);s!==d&&c&&(r[":@"]=this.buildAttributesMap(d,i,s)),t&&(t=this.parseTextData(t,s,i,!0,c,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,i)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),d=s):d=d.substr(0,d.length-1),this.options.transformTagName&&(s=this.options.transformTagName(s));const e=new Ce(s);s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,i,s)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new Ce(s);this.tagsNodeStack.push(n),s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,i,s)),this.addChild(n,e,i),n=e}r="",o=u}}else r+=e[o];return t.child};function Re(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}const Ie=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Pe(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Le(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function Me(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function je(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:o};if(e[o+1]===n[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let o=i.data;const a=i.index,s=o.search(/\s/);let l=o,d=!0;-1!==s&&(l=o.substr(0,s).replace(/\s\s*$/,""),o=o.substr(s+1));const c=l;if(n){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),d=l!==i.data.substr(e+1))}return{tagName:l,tagExp:o,closeIndex:a,attrExpPresent:d,rawTagName:c}}function De(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=Me(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=Me(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=Me(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=Me(e,"]]>",n,"StopNode is not closed.")-2;else{const r=je(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function Fe(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&xe(e,n)}return _e.isExist(e)?e:""}var $e={};function Ue(e,t,n){let r;const i={};for(let o=0;o<e.length;o++){const a=e[o],s=He(a);let l="";if(l=void 0===n?s:n+"."+s,s===t.textNodeName)void 0===r?r=a[s]:r+=""+a[s];else{if(void 0===s)continue;if(a[s]){let e=Ue(a[s],t,l);const n=Ve(e,t);a[":@"]?qe(e,a[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==i[s]&&i.hasOwnProperty(s)?(Array.isArray(i[s])||(i[s]=[i[s]]),i[s].push(e)):t.isArray(s,l,n)?i[s]=[e]:i[s]=e}}}return"string"==typeof r?r.length>0&&(i[t.textNodeName]=r):void 0!==r&&(i[t.textNodeName]=r),i}function He(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function qe(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let a=0;a<o;a++){const o=i[a];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function Ve(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return!(0!==r&&(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n]))}$e.prettify=function(e,t){return Ue(e,t)};const{buildOptions:We}=de,ze=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},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:"₹"}},this.addExternalEntities=ke,this.parseXml=Oe,this.parseTextData=Te,this.resolveNameSpace=Se,this.buildAttributesMap=Ne,this.isItStopNode=Le,this.replaceEntitiesValue=Ie,this.readStopNodeData=De,this.saveTextToParentTag=Pe,this.addChild=Re}},{prettify:Ye}=$e,Ze=W;function Ge(e,t,n,r){let i="",o=!1;for(let a=0;a<e.length;a++){const s=e[a],l=Xe(s);if(void 0===l)continue;let d="";if(d=0===n.length?l:`${n}.${l}`,l===t.textNodeName){let e=s[l];Je(d,t)||(e=t.tagValueProcessor(l,e),e=Qe(e,t)),o&&(i+=r),i+=e,o=!1;continue}if(l===t.cdataPropName){o&&(i+=r),i+=`<![CDATA[${s[l][0][t.textNodeName]}]]>`,o=!1;continue}if(l===t.commentPropName){i+=r+`\x3c!--${s[l][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const e=Ke(s[":@"],t),n="?xml"===l?"":r;let a=s[l][0][t.textNodeName];a=0!==a.length?" "+a:"",i+=n+`<${l}${a}${e}?>`,o=!0;continue}let c=r;""!==c&&(c+=t.indentBy);const u=r+`<${l}${Ke(s[":@"],t)}`,f=Ge(s[l],t,d,c);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?i+=u+">":i+=u+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=u+`>${f}${r}</${l}>`:(i+=u+">",f&&""!==r&&(f.includes("/>")||f.includes("</"))?i+=r+t.indentBy+f+r:i+=f,i+=`</${l}>`):i+=u+"/>",o=!0}return i}function Xe(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function Ke(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=Qe(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function Je(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function Qe(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}const et=function(e,t){let n="";return t.format&&t.indentBy.length>0&&(n="\n"),Ge(e,t,"",n)},tt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},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 nt(e){this.options=Object.assign({},tt,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ot),this.processTextOrObjNode=rt,this.options.format?(this.indentate=it,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function rt(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function it(e){return this.options.indentBy.repeat(e)}function ot(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}nt.prototype.build=function(e){return this.options.preserveOrder?et(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},nt.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(typeof e[i]>"u")this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let a=0;a<n;a++){const n=e[i][a];typeof n>"u"||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[i][t[o]])}else r+=this.processTextOrObjNode(e[i],i,t);return{attrStr:n,val:r}},nt.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},nt.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+o+">"+e+i}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},nt.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};var at={XMLParser:class{constructor(e){this.externalEntities={},this.options=We(e)}parse(e,t){if("string"!=typeof e){if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=Ze.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new ze(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:Ye(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}},XMLValidator:W,XMLBuilder:nt};class st{_view;constructor(e){lt(e),this._view=e}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}}const lt=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==at.XMLValidator.validate(e))return!1;let t;const n=new at.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof q))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},dt=function(e){return p().registerEntry(e)},ct=function(e){return p().unregisterEntry(e)}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=i,e=[],a.O=(t,n,r,i)=>{if(!n){var o=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],i=e[c][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||o>=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,i<o&&(o=i));if(s){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,r,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{2048:"78a82614529a3cefcde7",4180:"fe82f3a2dac70d6b82bc"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="nextcloud:",a.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==i)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var u=d[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+i){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=e),n[e]=[t];var f=(t,r)=>{s.onerror=s.onload=null,clearTimeout(p);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9837,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9837:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,o=n[0],s=n[1],l=n[2],d=0;if(o.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var c=l(a)}for(t&&t(n);d<o.length;d++)i=o[d],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var s=a.O(void 0,[7874],(()=>a(34507)));s=a.O(s)})(); -//# sourceMappingURL=files-init.js.map?v=d8fde50dac8492b740b0
\ No newline at end of file +(()=>{var e,n,r,i={34507:(e,n,r)=>{"use strict";var i=r(5656),o=r(69183),a=r(31352),s=r(93664),l=r(17499);const d=(0,l.IY)().setApp("files").detectUser().build(),c=new i.p$({id:"delete",displayName:(e,t)=>"trashbin"===t.id?(0,a.Iu)("files","Delete permanently"):(0,a.Iu)("files","Delete"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-trash-can" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z" /></svg>',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&i.y3.DELETE))),async exec(e){try{return await s.Z.delete(e.encodedSource),(0,o.j8)("files:node:deleted",e),!0}catch(t){return d.error("Error while deleting a file",{error:t,source:e.source,node:e}),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:100});var u=r(79753);const f=function(e){const t=document.createElement("a");t.download="",t.href=e,t.click()},p=function(e,t){const n=Math.random().toString(36).substring(2),r=(0,u.generateUrl)("/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}",{dir:e,secret:n,files:JSON.stringify(t.map((e=>e.basename)))});f(r)},h=function(e){if(0==(e.permissions&i.y3.READ))return!1;if("shared"===e.attributes["mount-type"]){const t=JSON.parse(e.attributes["share-attributes"]).find((e=>"permissions"===e.scope&&"download"===e.key));if(void 0!==t&&!1===t.enabled)return!1}return!0},g=new i.p$({id:"download",displayName:()=>(0,a.Iu)("files","Download"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-down" viewBox="0 0 24 24"><path d="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z" /></svg>',enabled:e=>0!==e.length&&(!e.some((e=>e.type===i.Tv.Folder))||!e.some((e=>!e.root?.startsWith("/files"))))&&e.every(h),exec:async(e,t,n)=>e.type===i.Tv.Folder?(p(n,[e]),null):(f(e.source),null),async execBatch(e,t,n){return 1===e.length?(this.exec(e[0],t,n),[null]):(p(n,e),new Array(e.length).fill(null))},order:30});var m=r(65358),A=r(77958),v=r(64024);const b=new i.p$({id:"edit-locally",displayName:()=>(0,a.Iu)("files","Edit locally"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-laptop" viewBox="0 0 24 24"><path d="M4,6H20V16H4M20,18A2,2 0 0,0 22,16V6C22,4.89 21.1,4 20,4H4C2.89,4 2,4.89 2,6V16A2,2 0 0,0 4,18H0V20H24V18H20Z" /></svg>',enabled:e=>1===e.length&&0!=(e[0].permissions&i.y3.UPDATE),exec:async e=>(async function(e){const t=(0,u.generateOcsUrl)("apps/files/api/v1")+"/openlocaleditor?format=json";try{const n=await s.Z.post(t,{path:e}),r=(0,A.ts)()?.uid;let i=`nc://open/${r}@`+window.location.host+(0,m.Ec)(e);i+="?token="+n.data.ocs.data.token,window.location.href=i}catch(e){(0,v.x2)((0,a.Iu)("files","Failed to redirect to client"))}}(e.path),null),order:25});var w=r(20144);const y='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star" viewBox="0 0 24 24"><path d="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" /></svg>',_=e=>e.some((e=>1!==e.attributes.favorite)),C=async(e,t,n)=>{try{const r=(0,u.generateUrl)("/apps/files/api/v1/files")+(0,m.Ec)(e.path);return await s.Z.post(r,{tags:n?[window.OC.TAG_FAVORITE]:[]}),"favorites"!==t.id||n||"/"!==e.dirname||(0,o.j8)("files:node:deleted",e),w.default.set(e.attributes,"favorite",n?1:0),n?(0,o.j8)("files:favorites:added",e):(0,o.j8)("files:favorites:removed",e),!0}catch(t){const r=n?"adding a file to favourites":"removing a file from favourites";return d.error("Error while "+r,{error:t,source:e.source,node:e}),!1}},E=new i.p$({id:"favorite",displayName:e=>_(e)?(0,a.Iu)("files","Add to favorites"):(0,a.Iu)("files","Remove from favorites"),iconSvgInline:e=>_(e)?'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star-outline" viewBox="0 0 24 24"><path d="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z" /></svg>':y,enabled:e=>!e.some((e=>!e.root?.startsWith?.("/files")))&&e.every((e=>e.permissions!==i.y3.NONE)),async exec(e,t){const n=_([e]);return await C(e,t,n)},async execBatch(e,t){const n=_(e);return Promise.all(e.map((async e=>await C(e,t,n))))},order:-50});var x=r(93379),k=r.n(x),T=r(7795),S=r.n(T),B=r(90569),N=r.n(B),O=r(3565),R=r.n(O),I=r(19216),P=r.n(I),L=r(44589),M=r.n(L),j=r(51473),D={};D.styleTagTransform=M(),D.setAttributes=R(),D.insert=N().bind(null,"head"),D.domAPI=S(),D.insertStyleElement=P(),k()(j.Z,D),j.Z&&j.Z.locals&&j.Z.locals;var F=r(51120);const{Axios:$,AxiosError:U,CanceledError:H,isCancel:q,CancelToken:V,VERSION:W,all:z,Cancel:Y,isAxiosError:Z,spread:G,toFormData:X,AxiosHeaders:K,HttpStatusCode:J,formToJSON:Q,getAdapter:ee,mergeConfig:te}=F.default;var ne=r(62520),re=r(59546),ie=r(96384),oe=r(59440);let ae;const se=()=>(ae||(ae=new oe.Z({concurrency:3})),ae);var le;!function(e){e.MOVE="Move",e.COPY="Copy",e.MOVE_OR_COPY="move-or-copy"}(le||(le={}));const de=e=>0!=(e.reduce(((e,t)=>Math.min(e,t.permissions)),i.y3.ALL)&i.y3.UPDATE),ce=e=>(e=>e.every((e=>!JSON.parse(e.attributes?.["share-attributes"]??"[]").some((e=>"permissions"===e.scope&&!1===e.enabled&&"download"===e.key)))))(e);var ue=r(25108);const fe=e=>de(e)?ce(e)?le.MOVE_OR_COPY:le.MOVE:le.COPY,pe=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t)return;if(t.type!==i.Tv.Folder)throw new Error((0,a.Iu)("files","Destination is not a folder"));if(e.dirname===t.path)throw new Error((0,a.Iu)("files","This file/folder is already in that directory"));if(e.path.startsWith(t.path))throw new Error((0,a.Iu)("files","You cannot move a file/folder onto itself or into a subfolder of itself"));const l=(0,ne.join)(t.path,e.basename),c=(0,u.generateRemoteUrl)(`dav/files/${(0,A.ts)()?.uid}${l}`);d.debug(`${n} ${e.basename} to ${c}`),w.default.set(e,"status",i.e4.LOADING);const f=se();return await f.add((async()=>{try{await(0,s.Z)({method:n===le.COPY?"COPY":"MOVE",url:e.encodedSource,headers:{Destination:encodeURI(c),Overwrite:r?void 0:"F"}}),n===le.MOVE&&(0,o.j8)("files:node:deleted",e)}catch(e){if(e instanceof U){if(412===e?.response?.status)throw new Error((0,a.Iu)("files","A file or folder with that name already exists in this folder"));if(423===e?.response?.status)throw new Error((0,a.Iu)("files","The files is locked"));if(404===e?.response?.status)throw new Error((0,a.Iu)("files","The file does not exist anymore"));if(e.message)throw new Error(e.message)}throw new Error}finally{w.default.set(e,"status",void 0)}}))},he=new i.p$({id:"move-copy",displayName(e){switch(fe(e)){case le.MOVE:return(0,a.Iu)("files","Move");case le.COPY:return(0,a.Iu)("files","Copy");case le.MOVE_OR_COPY:return(0,a.Iu)("files","Move or copy")}},iconSvgInline:()=>ie,enabled:e=>!!e.every((e=>e.root?.startsWith("/files/")))&&e.length>0&&(de(e)||ce(e)),async exec(e,t,n){const r=fe([e]);try{return await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const r=(0,v.fn)((0,a.Iu)("files","Chose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&i.y3.CREATE)&&n.fileid!==e.fileid)).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,i)=>{r.setButtonFactory(((r,o)=>{const s=[],l=(0,ne.basename)(o);return n.dirname===o||n.path===o||(e!==le.COPY&&e!==le.MOVE_OR_COPY||s.push({label:l?(0,a.Iu)("files","Copy to {target}",{target:l}):(0,a.Iu)("files","Copy"),type:"primary",icon:re,async callback(e){try{await pe(n,e[0],le.COPY),t(!0)}catch(e){i(e)}}}),e!==le.MOVE&&e!==le.MOVE_OR_COPY||s.push({label:l?(0,a.Iu)("files","Move to {target}",{target:l}):(0,a.Iu)("files","Move"),type:e===le.MOVE?"primary":"secondary",icon:ie,async callback(e){try{await pe(n,e[0],le.MOVE),t(!0)}catch(e){ue.warn("got error",e),i(e)}}})),s})),r.build().pick().catch((()=>{i(new Error((0,a.Iu)("files","Cancelled move or copy operation")))}))}))}(r,n,e),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,v.x2)(e.message),null)}},order:15}),ge='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path 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" /></svg>',me=new i.p$({id:"open-folder",displayName(e){const t=e[0].attributes.displayName||e[0].basename;return(0,a.Iu)("files","Open folder {displayName}",{displayName:t})},iconSvgInline:()=>ge,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.type===i.Tv.Folder&&0!=(t.permissions&i.y3.READ)},exec:async(e,t,n)=>!(!e||e.type!==i.Tv.Folder)&&(window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:(0,ne.join)(n,e.basename)}),null),default:i.DT.HIDDEN,order:-100}),Ae=new i.p$({id:"open-in-files-recent",displayName:()=>(0,a.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>"recent"===t.id,async exec(e){let t=e.dirname;return e.type===i.Tv.Folder&&(t=t+"/"+e.basename),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:t}),null},order:-1e3,default:i.DT.HIDDEN}),ve=new i.p$({id:"rename",displayName:()=>(0,a.Iu)("files","Rename"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-pencil" viewBox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /></svg>',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&i.y3.UPDATE))),exec:async e=>((0,o.j8)("files:node:rename",e),null),order:10});var be=r(48250);const we=new i.p$({id:"details",displayName:()=>(0,a.Iu)("files","Open details"),iconSvgInline:()=>be,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==i.y3.NONE)??!1),async exec(e,t,n){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:n},!0),null}catch(e){return d.error("Error while opening sidebar",{error:e}),!1}},order:-50}),ye=new i.p$({id:"view-in-folder",displayName:()=>(0,a.Iu)("files","View in folder"),iconSvgInline:()=>ie,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.permissions!==i.y3.NONE&&t.type===i.Tv.File},exec:async(e,t,n)=>!(!e||e.type!==i.Tv.File)&&(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:80}),_e=(e,t)=>{let n=e,r=1;for(;t.includes(n);){const t=(0,ne.extname)(e);n=`${(0,ne.basename)(e,t)} (${r++})${t}`}return n},Ce={id:"newFolder",displayName:(0,a.Iu)("files","New folder"),enabled:e=>0!=(e.permissions&i.y3.CREATE),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-plus" viewBox="0 0 24 24"><path d="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.12 13.3 20.1 13 19 13C15.69 13 13 15.69 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z" /></svg>',order:0,async handler(e,t){const n=t.map((e=>e.basename)),r=_e((0,a.Iu)("files","New folder"),n),{fileid:l,source:c}=await(async(e,t)=>{const n=e.source+"/"+t,r=e.encodedSource+"/"+encodeURIComponent(t),i=await(0,s.Z)({method:"MKCOL",url:r,headers:{Overwrite:"F"}});return{fileid:parseInt(i.headers["oc-fileid"]),source:n}})(e,r),u=new i.gt({source:c,id:l,mtime:new Date,owner:(0,A.ts)()?.uid||null,permissions:i.y3.ALL,root:e?.root||"/files/"+(0,A.ts)()?.uid});(0,v.s$)((0,a.Iu)("files",'Created new folder "{name}"',{name:(0,ne.basename)(c)})),d.debug("Created new folder",{folder:u,source:c}),(0,o.j8)("files:node:created",u),(0,o.j8)("files:node:rename",u)}};var Ee=r(43554),xe=r(14596),ke=r(8501),Te=r(79267);const Se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Be=Se.fetch.bind(Se);Se.Headers,Se.Request,Se.Response;const Ne="@@HOTPATCHER",Oe=()=>{};function Re(e){return{original:e,methods:[e],final:!1}}class Ie{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Ne}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==Ne)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||Oe)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const r=this;for(;e.length>0;)n=[e.shift().apply(r,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Re(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Re(t),{original:n})}else this.configuration.registry[e]=Re(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Pe=null;var Le=r(62639),Me=r(2568);const je="abcdef0123456789";function De(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a=`00000000${t.nc}`.slice(-8),s=function(e,t,n,r,i,o,a){const s=a||Me(`${t}:${n}:${r}`);return e&&"md5-sess"===e.toLowerCase()?Me(`${s}:${i}:${o}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=Me(`${i}:${r}`),d=Me(o?`${s}:${t.nonce}:${a}:${t.cnonce}:${o}:${l}`:`${s}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:d,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?u.push(`${e}=${c[e]}`):u.push(`${e}="${c[e]}"`));return`Digest ${u.join(", ")}`}function Fe(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function $e(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?Ue(t,e):Fe(e)}return t}function Ue(e,t){const n=Fe(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?Ue(n[e],t[e]):Fe(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function He(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((r=>{const i=r.toLowerCase();t.hasOwnProperty(i)?e[t[i]]=n[r]:(t[i]=r,e[r]=n[r])})),e)),{})}var qe=r(42830);const Ve="function"==typeof ArrayBuffer,{toString:We}=Object.prototype;function ze(e){const t=(Pe||(Pe=new Ie),Pe);return t.patchInline("request",(e=>t.patchInline("fetch",Be,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=He(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if(!(0,Le.$)()&&e instanceof qe.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return Ve&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===We.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=He(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,Le.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ke.Agent:e.httpsAgent||new Te.Agent),n.headers=t,n}(e))),e)}const Ye=`/files/${(0,A.ts)()?.uid}`,Ze=(0,u.generateRemoteUrl)("dav"+Ye),Ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze;const t=(0,xe.eI)(e,{headers:{requesttoken:(0,A.IH)()||""}});return(0,xe.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return ze(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=$e(e,{headers:{Authorization:De(e,t)}}));const n=await ze(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=r.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${je[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=$e(e,{headers:{Authorization:De(e,t)}});const n=await ze(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};var Xe=r(3443);const Ke=function(e){return e.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0)},Je=Ge(),Qe=function(e){const t=e.props,n=(0,i.zu)(t?.permissions),r=(0,A.ts)()?.uid,o=(0,u.generateRemoteUrl)("dav"+Ye+e.filename),a={id:t?.fileid<0?Ke(o):t?.fileid||0,source:o,mtime:new Date(e.lastmod),mime:e.mime,size:t?.size||0,permissions:n,owner:r,root:Ye,attributes:{...e,...t,hasPreview:t?.["has-preview"],failed:t?.fileid<0}};return delete a.attributes.props,"file"===e.type?new i.$B(a):new i.gt(a)},et=Ge(),tt=`<?xml version="1.0"?>\n<oc:filter-files ${(0,i.w4)()}>\n\t<d:prop>\n\t\t${(0,i.m0)()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:favorite>1</oc:favorite>\n\t</oc:filter-rules>\n</oc:filter-files>`,nt=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(0,i.h7)();let n;"/"===e&&(n=await et.stat(e,{details:!0,data:t}));const r=await et.getDirectoryContents(e,{details:!0,data:"/"===e?tt:t,headers:{method:"/"===e?"REPORT":"PROPFIND"},includeSelf:!0}),o=n?.data||r.data[0],a=r.data.filter((t=>t.filename!==e));return{folder:Qe(o),contents:a.map(Qe)}},rt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new i.G7({id:it(e),name:(0,ne.basename)(e),icon:ge,order:t,params:{dir:e,view:"favorites"},parent:"favorites",columns:[],getContents:nt})},it=function(e){return`favorite-${Ke(e)}`},ot=Ge((0,u.generateRemoteUrl)("dav")),at=Math.round(Date.now()/1e3-1209600),st=`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${(0,i.w4)()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${(0,i.m0)()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,A.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${at}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;var lt=r(22175),dt=r(25475);const ct={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return`template-picker-${this.fileid}`},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,A.ts)()?(0,u.generateUrl)(`/core/preview?fileId=${this.fileid}&x=256&y=256&a=1`):(0,u.generateUrl)(`/apps/files_sharing/publicpreview/${document.getElementById("sharingToken")&&document.getElementById("sharingToken").value}?fileId=${this.fileid}&file=${function(e){const t=(e.startsWith("/")?e:`/${e}`).split("/");let n="";return t.forEach((e=>{""!==e&&(n+="/"+encodeURIComponent(e))})),n}(this.filename)}&x=256&y=256&a=1`)},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}};var ut=r(92246),ft={};ft.styleTagTransform=M(),ft.setAttributes=R(),ft.insert=N().bind(null,"head"),ft.domAPI=S(),ft.insertStyleElement=P(),k()(ut.Z,ft),ut.Z&&ut.Z.locals&&ut.Z.locals;var pt=r(51900);const ht=(0,pt.Z)(ct,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"0859a92c",null).exports,gt=w.default.extend({name:"TemplatePicker",components:{NcEmptyContent:lt.Z,NcModal:dt.Z,TemplatePreview:ht},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{extension(){return(0,ne.extname)(this.name)},nameWithoutExt(){return this.extension?this.name.slice(0,0-this.extension.length):this.name},emptyTemplate(){return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:this.provider?.mimetypes[0]||this.provider?.mimetypes}},selectedTemplate(){return this.provider?this.provider.templates.find((e=>e.fileid===this.checked)):null},style(){if(!this.provider)return{};const e=(this.provider.ratio?this.provider.ratio:1.77)>1?240:160;return{"--margin":"8px","--width":e+"px","--border":"2px","--fullwidth":e+16+4+"px","--height":this.provider.ratio?Math.round(e/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await s.Z.get((0,u.generateOcsUrl)("apps/files/api/v1/templates"))).data.ocs.data}()).find((e=>e.app===t.app&&e.label===t.label));if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){this.loading=!0;const e=new URL(window.location.href).searchParams.get("dir")||"/";this.nameWithoutExt===this.name&&(this.logger.warn("Fixed invalid filename",{name:this.name,extension:this.provider?.extension}),this.name=this.name+this.provider?.extension);try{const t=await async function(e,t,n){return(await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:t,templateType:n})).data.ocs.data}((0,ne.normalize)(`${e}/${this.name}`),this.selectedTemplate?.filename,this.selectedTemplate?.templateType);this.logger.debug("Created new file",t);const n=(0,A.ts)()?.uid||null,r=new i.$B({id:t.fileid,source:(0,u.generateRemoteUrl)((0,ne.join)("dav/files",n,t.filename)),root:`/files/${n}`,mime:t.mime,mtime:new Date(1e3*t.lastmod),owner:n,size:t.size,permissions:t.permissions,attributes:{...t,"has-preview":t.hasPreview}});(0,o.j8)("files:node:created",r),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:r.fileid},{dir:r.dirname,openfile:!0}),this.close()}catch(e){this.logger.error("Error while creating the new file from template",{error:e}),(0,v.x2)(this.t("files","Unable to create new file from template"))}finally{this.loading=!1}}}});var mt=r(24142),At={};At.styleTagTransform=M(),At.setAttributes=R(),At.insert=N().bind(null,"head"),At.domAPI=S(),At.insertStyleElement=P(),k()(mt.Z,At),mt.Z&&mt.Z.locals&&mt.Z.locals;const vt=(0,pt.Z)(gt,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"48121b39",null).exports,bt=(0,l.IY)().setApp("files").detectUser().build();w.default.mixin({methods:{t:a.Iu,n:a.uN}});const wt=document.createElement("div");wt.id="template-picker",document.body.appendChild(wt);let yt=(0,Ee.j)("files","templates",[]),_t=(0,Ee.j)("files","templates_path",!1);bt.debug("Templates providers",yt),bt.debug("Templates folder",{templatesPath:_t});const Ct=new(w.default.extend(vt))({name:"TemplatePicker",propsData:{logger:bt}});Ct.$mount("#template-picker"),_t||(bt.debug("Templates folder not initialized"),(0,i.cd)({id:"template-picker",displayName:(0,a.Iu)("files","Create new templates folder"),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-plus" viewBox="0 0 24 24"><path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg>',order:10,enabled:e=>e.owner===(0,A.ts)()?.uid&&0!=(e.permissions&i.y3.CREATE),handler(e,t){const n=t.map((e=>e.basename)),r=_e((0,a.Iu)("files","Templates"),n);Et(e,r),(0,i.oE)("template-picker")}})),yt.forEach(((e,t)=>{(0,i.cd)({id:`template-new-${e.app}-${t}`,displayName:e.label,iconClass:e.iconClass||"icon-file",enabled:e=>0!=(e.permissions&i.y3.CREATE),order:11,handler(t,n){const r=n.map((e=>e.basename)),i=_e(e.label+e.extension,r);Ct.open(i,e)}})}));const Et=async function(e,t){const n=(0,ne.join)(e.path,t);try{bt.debug("Initializing the templates directory",{templatePath:n});const e=await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:void 0},{dir:n}),yt=e.data.ocs.data.templates,_t=e.data.ocs.data.template_path}catch(e){bt.error("Unable to initialize the templates directory"),(0,v.x2)((0,a.Iu)("files","Unable to initialize the templates directory"))}};(0,i.p4)(c),(0,i.p4)(g),(0,i.p4)(b),(0,i.p4)(E),(0,i.p4)(he),(0,i.p4)(me),(0,i.p4)(Ae),(0,i.p4)(ve),(0,i.p4)(we),(0,i.p4)(ye),(0,i.cd)(Ce),(()=>{const e=(0,Ee.j)("files","favoriteFolders",[]),t=e.map(((e,t)=>rt(e,t))),n=(0,i.Ti)();n.register(new i.G7({id:"favorites",name:(0,a.Iu)("files","Favorites"),caption:(0,a.Iu)("files","List of favorites files and folders."),emptyTitle:(0,a.Iu)("files","No favorites yet"),emptyCaption:(0,a.Iu)("files","Files and folders you mark as favorite will show up here"),icon:y,order:5,columns:[],getContents:nt})),t.forEach((e=>n.register(e))),(0,o.Ld)("files:favorites:added",(e=>{e.type===i.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?s(e.path):d.error("Favorite folder is not within user files root",{node:e}))})),(0,o.Ld)("files:favorites:removed",(e=>{e.type===i.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?l(e.path):d.error("Favorite folder is not within user files root",{node:e}))}));const r=function(){e.sort(((e,t)=>e.localeCompare(t,(0,a.G3)(),{ignorePunctuation:!0}))),e.forEach(((e,n)=>{const r=t.find((t=>t.id===it(e)));r&&(r.order=n)}))},s=function(i){const o=rt(i);e.find((e=>e===i))||(e.push(i),t.push(o),r(),n.register(o))},l=function(i){const o=it(i),a=e.findIndex((e=>e===i));-1!==a&&(e.splice(a,1),t.splice(a,1),n.remove(o),r())}})(),(0,i.Ti)().register(new i.G7({id:"files",name:(0,a.Iu)("files","All files"),caption:(0,a.Iu)("files","List of your files and folders."),icon:ge,order:0,getContents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=new AbortController,n=(0,i.h7)();return new Xe.CancelablePromise((async(r,i,o)=>{o((()=>t.abort()));try{const i=await Je.getDirectoryContents(e,{details:!0,data:n,includeSelf:!0,signal:t.signal}),o=i.data[0],a=i.data.slice(1);if(o.filename!==e)throw new Error("Root node does not match requested path");r({folder:Qe(o),contents:a.map((e=>{try{return Qe(e)}catch(t){return d.error(`Invalid node detected '${e.basename}'`,{error:t}),null}})).filter(Boolean)})}catch(e){i(e)}}))}})),(0,i.Ti)().register(new i.G7({id:"recent",name:(0,a.Iu)("files","Recent"),caption:(0,a.Iu)("files","List of recently modified files and folders."),emptyTitle:(0,a.Iu)("files","No recently modified files"),emptyCaption:(0,a.Iu)("files","Files and folders you recently modified will show up here."),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-history" viewBox="0 0 24 24"><path d="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" /></svg>',order:2,defaultSortKey:"mtime",getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await ot.getDirectoryContents(e,{details:!0,data:st,headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0})).data;return{folder:new i.gt({id:0,source:(0,u.generateRemoteUrl)("dav"+Ye),root:Ye,owner:(0,A.ts)()?.uid||null,permissions:i.y3.READ}),contents:t.map(Qe)}}})),"serviceWorker"in navigator?window.addEventListener("load",(async()=>{try{const e=(0,u.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t=await navigator.serviceWorker.register(e,{scope:"/"});d.debug("SW registered: ",{registration:t})}catch(e){d.error("SW registration failed: ",{error:e})}})):d.debug("Service Worker is not enabled on this browser."),(0,i.qq)("nc:hidden",{nc:"http://nextcloud.org/ns"}),(0,i.qq)("nc:metadata-files-live-photo",{nc:"http://nextcloud.org/ns"})},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var r,i,o=n(25108);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,g(e,t,"get"))}function h(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,g(e,t,"set"),n),n}function g(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CancelablePromise=void 0,e.cancelable=_,e.default=void 0,e.isCancelablePromise=C;var m="undefined"!=typeof Symbol?Symbol.toStringTag:"@@toStringTag",A=new WeakMap,v=new WeakMap,b=function(){function e(t){var n=t.executor,r=void 0===n?function(){}:n,i=t.internals,o=void 0===i?{isCanceled:!1,onCancelList:[]}:i,a=t.promise,s=void 0===a?new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})):a;l(this,e),f(this,A,{writable:!0,value:void 0}),f(this,v,{writable:!0,value:void 0}),u(this,m,"CancelablePromise"),this.cancel=this.cancel.bind(this),h(this,A,o),h(this,v,s||new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})))}return c(e,[{key:"then",value:function(e,t){return x(p(this,v).then(E(e,p(this,A)),E(t,p(this,A))),p(this,A))}},{key:"catch",value:function(e){return x(p(this,v).catch(E(e,p(this,A))),p(this,A))}},{key:"finally",value:function(e,t){var n=this;return t&&p(this,A).onCancelList.push(e),x(p(this,v).finally(E((function(){if(e)return t&&(p(n,A).onCancelList=p(n,A).onCancelList.filter((function(t){return t!==e}))),e()}),p(this,A))),p(this,A))}},{key:"cancel",value:function(){p(this,A).isCanceled=!0;var e=p(this,A).onCancelList;p(this,A).onCancelList=[];var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("function"==typeof r)try{r()}catch(e){o.error(e)}}}catch(e){n.e(e)}finally{n.f()}}},{key:"isCanceled",value:function(){return!0===p(this,A).isCanceled}}]),e}(),w=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t(e,n)}(i,e);var r=n(i);function i(e){return l(this,i),r.call(this,{executor:e})}return c(i)}(b);e.CancelablePromise=w,u(w,"all",(function(e){return k(e,Promise.all(e))})),u(w,"allSettled",(function(e){return k(e,Promise.allSettled(e))})),u(w,"any",(function(e){return k(e,Promise.any(e))})),u(w,"race",(function(e){return k(e,Promise.race(e))})),u(w,"resolve",(function(e){return _(Promise.resolve(e))})),u(w,"reject",(function(e){return _(Promise.reject(e))})),u(w,"isCancelable",C);var y=w;function _(e){return x(e,{isCanceled:!1,onCancelList:[]})}function C(e){return e instanceof w||e instanceof b}function E(e,t){if(e)return function(n){if(!t.isCanceled){var r=e(n);return C(r)&&t.onCancelList.push(r.cancel),r}return n}}function x(e,t){return new b({internals:t,promise:e})}function k(e,t){var n={isCanceled:!1,onCancelList:[]};return n.onCancelList.push((function(){var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;C(r)&&r.cancel()}}catch(e){n.e(e)}finally{n.f()}})),new b({internals:n,promise:t})}e.default=y},void 0===(i=r.apply(t,[t]))||(e.exports=i)},51473:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o),s=n(61667),l=n.n(s),d=new URL(n(81490),n.b),c=new URL(n(90888),n.b),u=a()(i()),f=l()(d),p=l()(c);u.push([e.id,`@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${f});\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${p});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`,"",{version:3,sources:["webpack://./node_modules/@nextcloud/dialogs/dist/style.css"],names:[],mappings:"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;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oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,wBAAwB;EACxB,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,mBAAmB;AACrB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,wBAAwB;AAC1B;AACA;EACE;IACE,yDAAyD;EAC3D;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB",sourcesContent:['@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=);\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n'],sourceRoot:""}]);const h=u},92246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o)()(i());a.push([e.id,".template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},24142:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(87537),i=n.n(r),o=n(23645),a=n.n(o)()(i());a.push([e.id,".templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: end;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},17187:(e,t,n)=>{"use strict";var r,i=n(25108),o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}e.exports=l,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var d=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var o,a,s,l;if(c(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,i&&i.warn&&i.warn(l)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):A(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function A(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");d=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var d=l.length,c=A(l,d);for(n=0;n<d;++n)a(c[n],this,t)}return!0},l.prototype.addListener=function(e,t){return f(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return f(this,e,t,!0)},l.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},l.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},l.prototype.listenerCount=m,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},79267:(e,t,n)=>{var r=n(8501),i=n(8575),o=e.exports;for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),r.request.call(this,e,t)},o.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},94281:e=>{"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,s,l;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var d=("number"!=typeof l&&(l=0),l+1>(s=e).length||-1===s.indexOf(".",l)?"argument":"property");a='The "'.concat(e,'" ').concat(d," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},56753:(e,t,n)=>{"use strict";var r=n(34155),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var o=n(79481),a=n(64229);n(35717)(c,o);for(var s=i(a.prototype),l=0;l<s.length;l++){var d=s[l];c.prototype[d]||(c.prototype[d]=a.prototype[d])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},82725:(e,t,n)=>{"use strict";e.exports=i;var r=n(74605);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(35717)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},79481:(e,t,n)=>{"use strict";var r,i=n(34155);e.exports=x,x.ReadableState=E,n(17187).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=n(22503),l=n(48764).Buffer,d=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(94616);o=c&&c.debuglog?c.debuglog("stream"):function(){};var u,f,p,h=n(57327),g=n(61195),m=n(82457).getHighWaterMark,A=n(94281).q,v=A.ERR_INVALID_ARG_TYPE,b=A.ERR_STREAM_PUSH_AFTER_EOF,w=A.ERR_METHOD_NOT_IMPLEMENTED,y=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(35717)(x,s);var _=g.errorOrDestroy,C=["error","close","destroy","pause","resume"];function E(e,t,i){r=r||n(56753),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(32553).s),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function x(e){if(r=r||n(56753),!(this instanceof x))return new x(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function k(e,t,n,r,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,s);else if(i||(a=function(e,t){var n,r;return r=t,l.isBuffer(r)||r instanceof d||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t)),n}(s,t)),a)_(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)s.endEmitted?_(e,new y):T(e,s,t,!0);else if(s.ended)_(e,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):R(e,s)):T(e,s,t,!1)}else r||(s.reading=!1,R(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&N(e)),R(e,t)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=g.destroy,x.prototype._undestroy=g.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),k(this,e,t,!1,n)},x.prototype.unshift=function(e){return k(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(e){u||(u=n(32553).s);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function B(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(O,e))}function O(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(o("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){o("readable nexttick read 0"),e.read(0)}function M(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick($,t,e))}function $(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}x.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):N(this),null;if(0===(e=B(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=B(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){_(this,new w("_read()"))},x.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?g:l;function l(){o("onend"),e.end()}r.endEmitted?i.nextTick(s):n.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",d),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",u),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}));var d=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",d);var c=!1;function u(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==U(r.pipes,e))&&!c&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){o("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&_(e,t)}function p(){e.removeListener("finish",h),g()}function h(){o("onfinish"),e.removeListener("close",p),g()}function g(){o("unpipe"),n.unpipe(e)}return n.on("data",u),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",h),e.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},x.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?N(this):r.reading||i.nextTick(L,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(P,this),n},x.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(P,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(M,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<C.length;a++)e.on(C[a],this.emit.bind(this,C[a]));return this._read=function(t){o("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(45850)),f(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=D,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(e,t){return void 0===p&&(p=n(15167)),p(x,e,t)})},74605:(e,t,n)=>{"use strict";e.exports=c;var r=n(94281).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(56753);function d(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,n){f(e,t,n)}))}function f(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}n(35717)(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},64229:(e,t,n)=>{"use strict";var r,i=n(34155);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=x,x.WritableState=E;var a,s={deprecate:n(94927)},l=n(22503),d=n(48764).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=n(61195),f=n(82457).getHighWaterMark,p=n(94281).q,h=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_MULTIPLE_CALLBACK,A=p.ERR_STREAM_CANNOT_PIPE,v=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,y=p.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;function C(){}function E(e,t,a){r=r||n(56753),e=e||{},"boolean"!=typeof a&&(a=t instanceof r),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,r)):(o(r),e._writableState.errorEmitted=!0,_(e,r),O(e,t))}(e,n,r,t,o);else{var a=B(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),r?i.nextTick(T,e,n,a,o):T(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function x(e){var t=this instanceof(r=r||n(56753));if(!t&&!a.call(x,this))return new x(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function k(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,k(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var d=n.chunk,c=n.encoding,u=n.callback;if(k(e,t,!1,t.objectMode?1:d.length,d,c,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function N(e,t){e._final((function(n){t.pendingcb--,n&&_(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=B(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(N,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(35717)(x,l),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&e&&e._writableState instanceof E}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){_(this,new A)},x.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,d.isBuffer(r)||r instanceof c);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=C),o.ending?function(e,t){var n=new w;_(e,n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o;return null===n?o=new b:"string"==typeof n||t.objectMode||(o=new h("chunk",["string","Buffer"],n)),!o||(_(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,r,i,o);return l}(this,o,s,e,t,n)),a},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||S(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new g("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=u.destroy,x.prototype._undestroy=u.undestroy,x.prototype._destroy=function(e,t){t(e)}},45850:(e,t,n)=>{"use strict";var r,i=n(34155);function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(8610),s=Symbol("lastResolve"),l=Symbol("lastReject"),d=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var n=e[p].read();null!==n&&(e[u]=null,e[s]=null,e[l]=null,t(h(n,!1)))}}function m(e){i.nextTick(g,e)}var A=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((o(r={get stream(){return this[p]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise((function(t,n){i.nextTick((function(){e[d]?n(e[d]):t(h(void 0,!0))}))}));var n,r=this[u];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(h(void 0,!0)):t[f](n,r)}),r)}}(r,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(h(o,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[p].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),r),A);e.exports=function(e){var t,n=Object.create(v,(o(t={},p,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,f,{value:function(e,t){var r=n[p].read();r?(n[u]=null,n[s]=null,n[l]=null,e(h(r,!1))):(n[s]=e,n[l]=t)},writable:!0}),t));return n[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[u]=null,n[s]=null,n[l]=null,t(e)),void(n[d]=e)}var r=n[s];null!==r&&(n[u]=null,n[s]=null,n[l]=null,r(h(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}},57327:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.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:String(t)}var l=n(48764).Buffer,d=n(52361).inspect,c=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,i=l.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,l.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return d(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},61195:(e,t,n)=>{"use strict";var r=n(34155);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,e)):r.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t?(r.nextTick(o,n),t(e)):r.nextTick(o,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,n)=>{"use strict";var r=n(94281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||c()},d=t._writableState&&t._writableState.finished,c=function(){s=!1,d=!0,a||o.call(t)},u=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,u=!0,s||o.call(t)},p=function(e){o.call(t,e)},h=function(){var e;return a&&!u?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!d?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},g=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",h),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",f),t.on("finish",c),!1!==n.error&&t.on("error",p),t.on("close",h),function(){t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",g),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",f),t.removeListener("error",p),t.removeListener("close",h)}}},15167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},59946:(e,t,n)=>{"use strict";var r,i=n(94281).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function d(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var c,u=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var f=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(8610)),r(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,(function(e){c||(c=e),e&&f.forEach(l),o||(f.forEach(l),u(c))}))}));return t.reduce(d)}},82457:(e,t,n)=>{"use strict";var r=n(94281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},22503:(e,t,n)=>{e.exports=n(17187).EventEmitter},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},89509:(e,t,n)=>{var r=n(48764),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},42830:(e,t,n)=>{e.exports=i;var r=n(17187).EventEmitter;function i(){r.call(this)}n(35717)(i,r),i.Readable=n(79481),i.Writable=n(64229),i.Duplex=n(56753),i.Transform=n(74605),i.PassThrough=n(82725),i.finished=n(8610),i.pipeline=n(59946),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function d(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",d),e.removeListener("error",d),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",d),e.on("error",d),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},8501:(e,t,n)=>{var r=n(11989),i=n(55676),o=n(47529),a=n(50584),s=n(8575),l=t;l.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,l=e.hostname||e.host,d=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(d?":"+d:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new r(e);return t&&u.on("response",t),u},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(n.g.fetch)&&a(n.g.ReadableStream),t.writableStream=a(n.g.WritableStream),t.abortController=a(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),r=null},11989:(e,t,n)=>{var r=n(48764).Buffer,i=n(34155),o=n(8725),a=n(35717),s=n(55676),l=n(88473),d=s.IncomingMessage,c=s.readyStates,u=e.exports=function(e){var t,n=this;l.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};a(u,l.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var d=new AbortController;l=d.signal,e._fetchAbortController=d,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.g.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),l.Writable.prototype.end.call(this,e,t,n)},u.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var r=n(34155),i=n(48764).Buffer,o=n(8725),a=n(35717),s=n(88473),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=t.IncomingMessage=function(e,t,n,a){var l=this;if(s.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){r.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=t,l.url=t.url,l.statusCode=t.status,l.statusMessage=t.statusText,t.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),o.writableStream){var d=new WritableStream({write:function(e){return a(!1),new Promise((function(t,n){l._destroyed?n():l.push(i.from(e))?t():l._resumeFetch=t}))},close:function(){a(!0),l._destroyed||l.push(null)},abort:function(e){a(!0),l._destroyed||l.emit("error",e)}});try{return void t.body.pipeTo(d).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){l._destroyed||(a(t.done),t.done?l.push(null):(l.push(i.from(t.value)),e()))})).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}()}else if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var u=l.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(l._charset=f[1].toLowerCase())}l._charset||(l._charset="utf-8")}};a(d,s.Readable),d.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},d.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,o=null;switch(t._mode){case"text":if((o=r.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),d=0;d<a.length;d++)s[d]=255&a.charCodeAt(d);t.push(s)}else t.push(a,t._charset);t._pos=o.length}break;case"arraybuffer":if(r.readyState!==l.DONE||!r.response)break;o=r.response,t.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=r.response,r.readyState!==l.LOADING||!o)break;t.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=r.response,r.readyState!==l.LOADING)break;var c=new n.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},32553:(e,t,n)=>{"use strict";var r=n(89509).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=d,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=u,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},94927:(e,t,n)=>{var r=n(25108);function i(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?r.trace(t):r.warn(t),n=!0}return e.apply(this,arguments)}}},47529:e=>{e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},81490:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="},24654:()=>{},52361:()=>{},94616:()=>{},5656:(e,t,n)=>{"use strict";n.d(t,{$B:()=>P,DT:()=>A,G7:()=>st,RL:()=>$,Ti:()=>H,Tv:()=>B,_o:()=>M,cd:()=>dt,e4:()=>R,gt:()=>L,h7:()=>k,m0:()=>E,oE:()=>ct,p$:()=>v,p4:()=>b,pC:()=>F,qq:()=>C,rp:()=>D,sS:()=>m,tB:()=>T,w4:()=>x,y3:()=>w,zu:()=>S});var r=n(77958),i=n(17499),o=n(31352),a=n(62520),s=n(65358),l=n(79753),d=n(14596);const c=null===(u=(0,r.ts)())?(0,i.IY)().setApp("files").build():(0,i.IY)().setApp("files").setUid(u.uid).build();var u;class f{_entries=[];registerEntry(e){this.validateEntry(e),this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):c.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}const p=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new f,c.debug("NewFileMenu initialized")),window._nc_newfilemenu},h=["B","KB","MB","GB","TB","PB"],g=["B","KiB","MiB","GiB","TiB","PiB"];function m(e,t=!1,n=!1,r=!1){n=n&&!r,"string"==typeof e&&(e=Number(e));let i=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;i=Math.min((n?g.length:h.length)-1,i);const a=n?g[i]:h[i];let s=(e/Math.pow(r?1e3:1024,i)).toFixed(1);return!0===t&&0===i?("0.0"!==s?"< 1 ":"0 ")+(n?g[1]:h[1]):(s=i<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,o.aj)()),s+" "+a)}var A=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(A||{});class v{_action;constructor(e){this.validateAction(e),this._action=e}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 inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(A).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}const b=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var w=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(w||{});const y=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],_={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},C=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...y],window._nc_dav_namespaces={..._});const n={...window._nc_dav_namespaces,...t};return window._nc_dav_properties.find((t=>t===e))?(c.error(`${e} already registered`,{prop:e}),!1):e.startsWith("<")||2!==e.split(":").length?(c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(c.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},E=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...y]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")},x=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={..._}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")},k=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${x()}>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},T=function(e){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${x()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,r.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`},S=function(e=""){let t=w.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=w.CREATE),e.includes("G")&&(t|=w.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=w.UPDATE),e.includes("D")&&(t|=w.DELETE),e.includes("R")&&(t|=w.SHARE)),t};var B=(e=>(e.Folder="folder",e.File="file",e))(B||{});const N=function(e,t){return null!==e.match(t)},O=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=w.NONE&&e.permissions<=w.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&N(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,a.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(R).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var R=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(R||{});class I{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){O(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,s.Ec)(this.source.slice(e.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){const e=this.source.indexOf(this.root);return(0,a.dirname)(this.source.slice(e+this.root.length)||"/")}const e=new URL(this.source);return(0,a.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:w.NONE:w.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return N(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const e=this.source.indexOf(this.root);return this.source.slice(e+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){O({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class P extends I{get type(){return B.File}}class L extends I{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return B.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const M=`/files/${(0,r.ts)()?.uid}`,j=(0,l.generateRemoteUrl)("dav"),D=function(e=j){const t=(0,d.eI)(e);function n(e){t.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,r._S)(n),n((0,r.IH)()),(0,d.lD)().patch("fetch",((e,t)=>{const n=t.headers;return n?.method&&(t.method=n.method,delete n.method),fetch(e,t)})),t},F=async(e,t="/",n=M)=>(await e.getDirectoryContents(`${n}${t}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${x()}>\n\t\t\t<d:prop>\n\t\t\t\t${E()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((e=>e.filename!==t)).map((e=>$(e,n))),$=function(e,t=M,n=j){const i=e.props,o=S(i?.permissions),a=(0,r.ts)()?.uid,s={id:i?.fileid||0,source:`${n}${e.filename}`,mtime:new Date(Date.parse(e.lastmod)),mime:e.mime,size:i?.size||Number.parseInt(i.getcontentlength||"0"),permissions:o,owner:a,root:t,attributes:{...e,...i,hasPreview:i?.["has-preview"]}};return delete s.attributes?.props,"file"===e.type?new P(s):new L(s)};class U{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}const H=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new U,c.debug("Navigation service initialized")),window._nc_navigation};class q{_column;constructor(e){V(e),this._column=e}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(e){if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var W={},z={};!function(e){const t=":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="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=r.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},e.nameRegexp=n}(z);const Y=z,Z={allowBooleanAttributes:!1,unpairedTags:[]};function G(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function X(e,t){const n=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const r=e.substr(n,t-n);if(t>5&&"xml"===r)return ie("InvalidXml","XML declaration allowed only at the start of the document.",se(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function K(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}W.validate=function(e,t){t=Object.assign({},Z,t);const n=[];let r=!1,i=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=X(e,o),o.err)return o}else{if("<"!==e[o]){if(G(e[o]))continue;return ie("InvalidChar","char '"+e[o]+"' is not expected.",se(e,o))}{let a=o;if(o++,"!"===e[o]){o=K(e,o);continue}{let s=!1;"/"===e[o]&&(s=!0,o++);let l="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)l+=e[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!ae(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",ie("InvalidTag",t,se(e,o))}const d=ee(e,o);if(!1===d)return ie("InvalidAttr","Attributes for '"+l+"' have open quote.",se(e,o));let c=d.value;if(o=d.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const i=ne(c,t);if(!0!==i)return ie(i.err.code,i.err.msg,se(e,n+i.err.line));r=!0}else if(s){if(!d.tagClosed)return ie("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",se(e,o));if(c.trim().length>0)return ie("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",se(e,a));{const t=n.pop();if(l!==t.tagName){let n=se(e,t.tagStartPos);return ie("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",se(e,a))}0==n.length&&(i=!0)}}else{const s=ne(c,t);if(!0!==s)return ie(s.err.code,s.err.msg,se(e,o-c.length+s.err.line));if(!0===i)return ie("InvalidXml","Multiple possible root nodes found.",se(e,o));-1!==t.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:a}),r=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=K(e,o);continue}if("?"!==e[o+1])break;if(o=X(e,++o),o.err)return o}else if("&"===e[o]){const t=re(e,o);if(-1==t)return ie("InvalidChar","char '&' is not expected.",se(e,o));o=t}else if(!0===i&&!G(e[o]))return ie("InvalidXml","Extra text at the end",se(e,o));"<"===e[o]&&o--}}}return r?1==n.length?ie("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",se(e,n[0].tagStartPos)):!(n.length>0)||ie("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ie("InvalidXml","Start tag expected.",1)};const J='"',Q="'";function ee(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===J||e[t]===Q)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const te=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ne(e,t){const n=Y.getAllMatches(e,te),r={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return ie("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",le(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return ie("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",le(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return ie("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",le(n[e]));const i=n[e][2];if(!oe(i))return ie("InvalidAttr","Attribute '"+i+"' is an invalid name.",le(n[e]));if(r.hasOwnProperty(i))return ie("InvalidAttr","Attribute '"+i+"' is repeated.",le(n[e]));r[i]=1}return!0}function re(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function ie(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function oe(e){return Y.isName(e)}function ae(e){return Y.isName(e)}function se(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function le(e){return e.startIndex+e[1].length}var de={};const ce={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};de.buildOptions=function(e){return Object.assign({},ce,e)},de.defaultOptions=ce;const ue=z;function fe(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function pe(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function he(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function ge(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function me(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function Ae(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function ve(e){if(ue.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const be=/^[-+]?0x[a-fA-F0-9]+$/,we=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const ye={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const _e=z,Ce=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Ee=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,i=!1,o=!1,a="";for(;t<e.length;t++)if("<"!==e[t]||o)if(">"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,r--):r--,0===r)break}else"["===e[t]?i=!0:a+=e[t];else{if(i&&he(e,t))t+=7,[entityName,val,t]=fe(e,t+1),-1===val.indexOf("&")&&(n[ve(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&ge(e,t))t+=8;else if(i&&me(e,t))t+=8;else if(i&&Ae(e,t))t+=9;else{if(!pe)throw new Error("Invalid DOCTYPE");o=!0}r++,a=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},xe=function(e,t={}){if(t=Object.assign({},ye,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&be.test(n))return Number.parseInt(n,16);{const r=we.exec(n);if(r){const i=r[1],o=r[2];let a=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(r[3]);const s=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),l=""+r;return-1!==l.search(/[eE]/)||s?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===l&&""===a||l===a||i&&l==="-"+a?r:e:o?a===l||i+a===l?r:e:n===l||n===i+l?r:e}}return e}};function ke(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function Te(e,t,n,r,i,o,a){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?Fe(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Se(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,_e.nameRegexp);const Be=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Ne(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=_e.getAllMatches(e,Be),r=n.length,i={};for(let e=0;e<r;e++){const r=this.resolveNameSpace(n[e][1]);let o=n[e][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(r,o,t);i[a]=null==e?o:typeof e!=typeof o||e!==o?e:Fe(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[a]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const Oe=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Ce("!xml");let n=t,r="",i="";for(let o=0;o<e.length;o++)if("<"===e[o])if("/"===e[o+1]){const t=Me(e,">",o,"Closing Tag is not closed.");let a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(r=this.saveTextToParentTag(r,n,i));const s=i.substring(i.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw new Error(`Unpaired tag can not be used as closing tag: </${a}>`);let l=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=je(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new Ce(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,i,t.tagName)),this.addChild(n,e,i)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=Me(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const a=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if("!D"===e.substr(o+1,2)){const t=Ee(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=Me(e,"]]>",o,"CDATA is not closed.")-2,a=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,i),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]);else{let e=this.parseTextData(a,n.tagname,i,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let a=je(e,o,this.options.removeNSPrefix),s=a.tagName;const l=a.rawTagName;let d=a.tagExp,c=a.attrExpPresent,u=a.closeIndex;this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),s!==t.tagname&&(i+=i?"."+s:s),this.isItStopNode(this.options.stopNodes,i,s)){let t="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))o=a.closeIndex;else{const n=this.readStopNodeData(e,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,t=n.tagContent}const r=new Ce(s);s!==d&&c&&(r[":@"]=this.buildAttributesMap(d,i,s)),t&&(t=this.parseTextData(t,s,i,!0,c,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,i)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),d=s):d=d.substr(0,d.length-1),this.options.transformTagName&&(s=this.options.transformTagName(s));const e=new Ce(s);s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,i,s)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new Ce(s);this.tagsNodeStack.push(n),s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,i,s)),this.addChild(n,e,i),n=e}r="",o=u}}else r+=e[o];return t.child};function Re(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}const Ie=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Pe(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Le(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function Me(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function je(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:o};if(e[o+1]===n[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let o=i.data;const a=i.index,s=o.search(/\s/);let l=o,d=!0;-1!==s&&(l=o.substr(0,s).replace(/\s\s*$/,""),o=o.substr(s+1));const c=l;if(n){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),d=l!==i.data.substr(e+1))}return{tagName:l,tagExp:o,closeIndex:a,attrExpPresent:d,rawTagName:c}}function De(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=Me(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=Me(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=Me(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=Me(e,"]]>",n,"StopNode is not closed.")-2;else{const r=je(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function Fe(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&xe(e,n)}return _e.isExist(e)?e:""}var $e={};function Ue(e,t,n){let r;const i={};for(let o=0;o<e.length;o++){const a=e[o],s=He(a);let l="";if(l=void 0===n?s:n+"."+s,s===t.textNodeName)void 0===r?r=a[s]:r+=""+a[s];else{if(void 0===s)continue;if(a[s]){let e=Ue(a[s],t,l);const n=Ve(e,t);a[":@"]?qe(e,a[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==i[s]&&i.hasOwnProperty(s)?(Array.isArray(i[s])||(i[s]=[i[s]]),i[s].push(e)):t.isArray(s,l,n)?i[s]=[e]:i[s]=e}}}return"string"==typeof r?r.length>0&&(i[t.textNodeName]=r):void 0!==r&&(i[t.textNodeName]=r),i}function He(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function qe(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let a=0;a<o;a++){const o=i[a];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function Ve(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return!(0!==r&&(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n]))}$e.prettify=function(e,t){return Ue(e,t)};const{buildOptions:We}=de,ze=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},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:"₹"}},this.addExternalEntities=ke,this.parseXml=Oe,this.parseTextData=Te,this.resolveNameSpace=Se,this.buildAttributesMap=Ne,this.isItStopNode=Le,this.replaceEntitiesValue=Ie,this.readStopNodeData=De,this.saveTextToParentTag=Pe,this.addChild=Re}},{prettify:Ye}=$e,Ze=W;function Ge(e,t,n,r){let i="",o=!1;for(let a=0;a<e.length;a++){const s=e[a],l=Xe(s);if(void 0===l)continue;let d="";if(d=0===n.length?l:`${n}.${l}`,l===t.textNodeName){let e=s[l];Je(d,t)||(e=t.tagValueProcessor(l,e),e=Qe(e,t)),o&&(i+=r),i+=e,o=!1;continue}if(l===t.cdataPropName){o&&(i+=r),i+=`<![CDATA[${s[l][0][t.textNodeName]}]]>`,o=!1;continue}if(l===t.commentPropName){i+=r+`\x3c!--${s[l][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const e=Ke(s[":@"],t),n="?xml"===l?"":r;let a=s[l][0][t.textNodeName];a=0!==a.length?" "+a:"",i+=n+`<${l}${a}${e}?>`,o=!0;continue}let c=r;""!==c&&(c+=t.indentBy);const u=r+`<${l}${Ke(s[":@"],t)}`,f=Ge(s[l],t,d,c);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?i+=u+">":i+=u+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=u+`>${f}${r}</${l}>`:(i+=u+">",f&&""!==r&&(f.includes("/>")||f.includes("</"))?i+=r+t.indentBy+f+r:i+=f,i+=`</${l}>`):i+=u+"/>",o=!0}return i}function Xe(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function Ke(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=Qe(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function Je(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function Qe(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}const et=function(e,t){let n="";return t.format&&t.indentBy.length>0&&(n="\n"),Ge(e,t,"",n)},tt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},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 nt(e){this.options=Object.assign({},tt,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ot),this.processTextOrObjNode=rt,this.options.format?(this.indentate=it,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function rt(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function it(e){return this.options.indentBy.repeat(e)}function ot(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}nt.prototype.build=function(e){return this.options.preserveOrder?et(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},nt.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(typeof e[i]>"u")this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let a=0;a<n;a++){const n=e[i][a];typeof n>"u"||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[i][t[o]])}else r+=this.processTextOrObjNode(e[i],i,t);return{attrStr:n,val:r}},nt.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},nt.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+o+">"+e+i}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},nt.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};var at={XMLParser:class{constructor(e){this.externalEntities={},this.options=We(e)}parse(e,t){if("string"!=typeof e){if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=Ze.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new ze(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:Ye(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}},XMLValidator:W,XMLBuilder:nt};class st{_view;constructor(e){lt(e),this._view=e}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}}const lt=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==at.XMLValidator.validate(e))return!1;let t;const n=new at.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof q))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},dt=function(e){return p().registerEntry(e)},ct=function(e){return p().unregisterEntry(e)}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=i,e=[],a.O=(t,n,r,i)=>{if(!n){var o=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],i=e[c][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||o>=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,i<o&&(o=i));if(s){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,r,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{2048:"78a82614529a3cefcde7",4180:"fe82f3a2dac70d6b82bc"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="nextcloud:",a.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==i)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var u=d[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+i){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=e),n[e]=[t];var f=(t,r)=>{s.onerror=s.onload=null,clearTimeout(p);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9837,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9837:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,o=n[0],s=n[1],l=n[2],d=0;if(o.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var c=l(a)}for(t&&t(n);d<o.length;d++)i=o[d],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var s=a.O(void 0,[7874],(()=>a(34507)));s=a.O(s)})(); +//# sourceMappingURL=files-init.js.map?v=54a5590ac7fe5931491e
\ No newline at end of file diff --git a/dist/files-init.js.map b/dist/files-init.js.map index e1f71ef616a..cf5e4c9573c 100644 --- a/dist/files-init.js.map +++ b/dist/files-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files-init.js?v=d8fde50dac8492b740b0","mappings":";UAAIA,ECAAC,EACAC,4FCsBJ,SAAeC,EAAAA,EAAAA,MACbC,OAAO,SACPC,aACAC,QCCWC,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,SACJC,YAAWA,CAACC,EAAOC,IACI,aAAZA,EAAKH,IACNI,EAAAA,EAAAA,IAAE,QAAS,uBACXA,EAAAA,EAAAA,IAAE,QAAS,UAErBC,cAAeA,uMACfC,QAAQJ,GACGA,EAAMK,OAAS,GAAKL,EACtBM,KAAIC,GAAQA,EAAKC,cACjBC,OAAMC,GAAmD,IAApCA,EAAaC,EAAAA,GAAWC,UAEtD,UAAMC,CAAKN,GACP,IAMI,aALMO,EAAAA,EAAMC,OAAOR,EAAKS,gBAIxBC,EAAAA,EAAAA,IAAK,qBAAsBV,IACpB,CACX,CACA,MAAOW,GAEH,OADAC,EAAOD,MAAM,8BAA+B,CAAEA,QAAOE,OAAQb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8vC,EAAmB/yC,KAAO2yC,EAAqB1vC,KAAK,KAAM8vC,EAAmB/yC,KAAKiD,KAAK8vC,QCvFvF1C,EAAoB9pC,QAAKxI,ECGzB,IAAIi1C,EAAsB3C,EAAoB7L,OAAEzmC,EAAW,CAAC,OAAO,IAAOsyC,EAAoB,SAC9F2C,EAAsB3C,EAAoB7L,EAAEwO","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/deleteAction.ts","webpack:///nextcloud/apps/files/src/actions/downloadAction.ts","webpack:///nextcloud/apps/files/src/actions/editLocallyAction.ts","webpack:///nextcloud/apps/files/src/actions/favoriteAction.ts","webpack://nextcloud/./node_modules/@nextcloud/dialogs/dist/style.css?d87c","webpack:///nextcloud/node_modules/axios/index.js","webpack:///nextcloud/apps/files/src/actions/moveOrCopyActionUtils.ts","webpack:///nextcloud/apps/files/src/actions/moveOrCopyAction.ts","webpack:///nextcloud/apps/files/src/actions/openFolderAction.ts","webpack:///nextcloud/apps/files/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files/src/actions/renameAction.ts","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack:///nextcloud/apps/files/src/actions/viewInFolderAction.ts","webpack:///nextcloud/apps/files/src/newMenu/newFolder.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/services/Favorites.ts","webpack:///nextcloud/apps/files/src/views/favorites.ts","webpack:///nextcloud/apps/files/src/services/Recent.ts","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/utils/fileUtils.ts","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?af18","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=ts","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?0681","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack:///nextcloud/apps/files/src/init-templates.ts","webpack:///nextcloud/apps/files/src/init.ts","webpack:///nextcloud/apps/files/src/views/files.ts","webpack:///nextcloud/apps/files/src/views/recent.ts","webpack:///nextcloud/apps/files/src/services/ServiceWorker.js","webpack:///nextcloud/apps/files/src/services/LivePhotos.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/style.css","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/events/events.js","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/errors-browser.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_duplex.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_passthrough.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_readable.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_transform.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_writable.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/async_iterator.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/from-browser.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/state.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/safe-buffer/index.js","webpack:///nextcloud/node_modules/stream-browserify/index.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/string_decoder/lib/string_decoder.js","webpack:///nextcloud/node_modules/util-deprecate/browser.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, Node, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport TrashCanSvg from '@mdi/svg/svg/trash-can.svg?raw';\nimport logger from '../logger.js';\nexport const action = new FileAction({\n id: 'delete',\n displayName(nodes, view) {\n return view.id === 'trashbin'\n ? t('files', 'Delete permanently')\n : t('files', 'Delete');\n },\n iconSvgInline: () => TrashCanSvg,\n enabled(nodes) {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.DELETE) !== 0);\n },\n async exec(node) {\n try {\n await axios.delete(node.encodedSource);\n // Let's delete even if it's moved to the trashbin\n // since it has been removed from the current view\n // and changing the view will trigger a reload anyway.\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error('Error while deleting a file', { error, source: node.source, node });\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { generateUrl } from '@nextcloud/router';\nimport { FileAction, Permission, Node, FileType, View } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport ArrowDownSvg from '@mdi/svg/svg/arrow-down.svg?raw';\nconst triggerDownload = function (url) {\n const hiddenElement = document.createElement('a');\n hiddenElement.download = '';\n hiddenElement.href = url;\n hiddenElement.click();\n};\nconst downloadNodes = function (dir, nodes) {\n const secret = Math.random().toString(36).substring(2);\n const url = generateUrl('/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}', {\n dir,\n secret,\n files: JSON.stringify(nodes.map(node => node.basename)),\n });\n triggerDownload(url);\n};\nexport const action = new FileAction({\n id: 'download',\n displayName: () => t('files', 'Download'),\n iconSvgInline: () => ArrowDownSvg,\n enabled(nodes) {\n if (nodes.length === 0) {\n return false;\n }\n // We can download direct dav files. But if we have\n // some folders, we need to use the /apps/files/ajax/download.php\n // endpoint, which only supports user root folder.\n if (nodes.some(node => node.type === FileType.Folder)\n && nodes.some(node => !node.root?.startsWith('/files'))) {\n return false;\n }\n return nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.READ) !== 0);\n },\n async exec(node, view, dir) {\n if (node.type === FileType.Folder) {\n downloadNodes(dir, [node]);\n return null;\n }\n triggerDownload(node.source);\n return null;\n },\n async execBatch(nodes, view, dir) {\n if (nodes.length === 1) {\n this.exec(nodes[0], view, dir);\n return [null];\n }\n downloadNodes(dir, nodes);\n return new Array(nodes.length).fill(null);\n },\n order: 30,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { encodePath } from '@nextcloud/paths';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { FileAction, Permission } from '@nextcloud/files';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LaptopSvg from '@mdi/svg/svg/laptop.svg?raw';\nconst openLocalClient = async function (path) {\n const link = generateOcsUrl('apps/files/api/v1') + '/openlocaleditor?format=json';\n try {\n const result = await axios.post(link, { path });\n const uid = getCurrentUser()?.uid;\n let url = `nc://open/${uid}@` + window.location.host + encodePath(path);\n url += '?token=' + result.data.ocs.data.token;\n window.location.href = url;\n }\n catch (error) {\n showError(t('files', 'Failed to redirect to client'));\n }\n};\nexport const action = new FileAction({\n id: 'edit-locally',\n displayName: () => t('files', 'Edit locally'),\n iconSvgInline: () => LaptopSvg,\n // Only works on single files\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n return (nodes[0].permissions & Permission.UPDATE) !== 0;\n },\n async exec(node) {\n openLocalClient(node.path);\n return null;\n },\n order: 25,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateUrl } from '@nextcloud/router';\nimport { Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport StarOutlineSvg from '@mdi/svg/svg/star-outline.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport logger from '../logger.js';\nimport { encodePath } from '@nextcloud/paths';\n// If any of the nodes is not favorited, we display the favorite action.\nconst shouldFavorite = (nodes) => {\n return nodes.some(node => node.attributes.favorite !== 1);\n};\nexport const favoriteNode = async (node, view, willFavorite) => {\n try {\n // TODO: migrate to webdav tags plugin\n const url = generateUrl('/apps/files/api/v1/files') + encodePath(node.path);\n await axios.post(url, {\n tags: willFavorite\n ? [window.OC.TAG_FAVORITE]\n : [],\n });\n // Let's delete if we are in the favourites view\n // AND if it is removed from the user favorites\n // AND it's in the root of the favorites view\n if (view.id === 'favorites' && !willFavorite && node.dirname === '/') {\n emit('files:node:deleted', node);\n }\n // Update the node webdav attribute\n Vue.set(node.attributes, 'favorite', willFavorite ? 1 : 0);\n // Dispatch event to whoever is interested\n if (willFavorite) {\n emit('files:favorites:added', node);\n }\n else {\n emit('files:favorites:removed', node);\n }\n return true;\n }\n catch (error) {\n const action = willFavorite ? 'adding a file to favourites' : 'removing a file from favourites';\n logger.error('Error while ' + action, { error, source: node.source, node });\n return false;\n }\n};\nexport const action = new FileAction({\n id: 'favorite',\n displayName(nodes) {\n return shouldFavorite(nodes)\n ? t('files', 'Add to favorites')\n : t('files', 'Remove from favorites');\n },\n iconSvgInline: (nodes) => {\n return shouldFavorite(nodes)\n ? StarOutlineSvg\n : StarSvg;\n },\n enabled(nodes) {\n // We can only favorite nodes within files and with permissions\n return !nodes.some(node => !node.root?.startsWith?.('/files'))\n && nodes.every(node => node.permissions !== Permission.NONE);\n },\n async exec(node, view) {\n const willFavorite = shouldFavorite([node]);\n return await favoriteNode(node, view, willFavorite);\n },\n async execBatch(nodes, view) {\n const willFavorite = shouldFavorite(nodes);\n return Promise.all(nodes.map(async (node) => await favoriteNode(node, view, willFavorite)));\n },\n order: -50,\n});\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport '@nextcloud/dialogs/style.css';\nimport { Permission } from '@nextcloud/files';\nimport PQueue from 'p-queue';\n// This is the processing queue. We only want to allow 3 concurrent requests\nlet queue;\n/**\n * Get the processing queue\n */\nexport const getQueue = () => {\n if (!queue) {\n queue = new PQueue({ concurrency: 3 });\n }\n return queue;\n};\nexport var MoveCopyAction;\n(function (MoveCopyAction) {\n MoveCopyAction[\"MOVE\"] = \"Move\";\n MoveCopyAction[\"COPY\"] = \"Copy\";\n MoveCopyAction[\"MOVE_OR_COPY\"] = \"move-or-copy\";\n})(MoveCopyAction || (MoveCopyAction = {}));\nexport const canMove = (nodes) => {\n const minPermission = nodes.reduce((min, node) => Math.min(min, node.permissions), Permission.ALL);\n return (minPermission & Permission.UPDATE) !== 0;\n};\nexport const canDownload = (nodes) => {\n return nodes.every(node => {\n const shareAttributes = JSON.parse(node.attributes?.['share-attributes'] ?? '[]');\n return !shareAttributes.some(attribute => attribute.scope === 'permissions' && attribute.enabled === false && attribute.key === 'download');\n });\n};\nexport const canCopy = (nodes) => {\n // For now the only restriction is that a shared file\n // cannot be copied if the download is disabled\n return canDownload(nodes);\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport '@nextcloud/dialogs/style.css';\n// eslint-disable-next-line n/no-extraneous-import\nimport { AxiosError } from 'axios';\nimport { basename, join } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getFilePickerBuilder, showError } from '@nextcloud/dialogs';\nimport { Permission, FileAction, FileType, NodeStatus } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport CopyIconSvg from '@mdi/svg/svg/folder-multiple.svg?raw';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nimport { MoveCopyAction, canCopy, canMove, getQueue } from './moveOrCopyActionUtils';\nimport logger from '../logger';\n/**\n * Return the action that is possible for the given nodes\n * @param {Node[]} nodes The nodes to check against\n * @return {MoveCopyAction} The action that is possible for the given nodes\n */\nconst getActionForNodes = (nodes) => {\n if (canMove(nodes)) {\n if (canCopy(nodes)) {\n return MoveCopyAction.MOVE_OR_COPY;\n }\n return MoveCopyAction.MOVE;\n }\n // Assuming we can copy as the enabled checks for copy permissions\n return MoveCopyAction.COPY;\n};\n/**\n * Handle the copy/move of a node to a destination\n * This can be imported and used by other scripts/components on server\n * @param {Node} node The node to copy/move\n * @param {Folder} destination The destination to copy/move the node to\n * @param {MoveCopyAction} method The method to use for the copy/move\n * @param {boolean} overwrite Whether to overwrite the destination if it exists\n * @return {Promise<void>} A promise that resolves when the copy/move is done\n */\nexport const handleCopyMoveNodeTo = async (node, destination, method, overwrite = false) => {\n if (!destination) {\n return;\n }\n if (destination.type !== FileType.Folder) {\n throw new Error(t('files', 'Destination is not a folder'));\n }\n if (node.dirname === destination.path) {\n throw new Error(t('files', 'This file/folder is already in that directory'));\n }\n if (node.path.startsWith(destination.path)) {\n throw new Error(t('files', 'You cannot move a file/folder onto itself or into a subfolder of itself'));\n }\n const relativePath = join(destination.path, node.basename);\n const destinationUrl = generateRemoteUrl(`dav/files/${getCurrentUser()?.uid}${relativePath}`);\n logger.debug(`${method} ${node.basename} to ${destinationUrl}`);\n // Set loading state\n Vue.set(node, 'status', NodeStatus.LOADING);\n const queue = getQueue();\n return await queue.add(async () => {\n try {\n await axios({\n method: method === MoveCopyAction.COPY ? 'COPY' : 'MOVE',\n url: node.encodedSource,\n headers: {\n Destination: encodeURI(destinationUrl),\n Overwrite: overwrite ? undefined : 'F',\n },\n });\n // If we're moving, update the node\n // if we're copying, we don't need to update the node\n // the view will refresh itself\n if (method === MoveCopyAction.MOVE) {\n // Delete the node as it will be fetched again\n // when navigating to the destination folder\n emit('files:node:deleted', node);\n }\n }\n catch (error) {\n if (error instanceof AxiosError) {\n if (error?.response?.status === 412) {\n throw new Error(t('files', 'A file or folder with that name already exists in this folder'));\n }\n else if (error?.response?.status === 423) {\n throw new Error(t('files', 'The files is locked'));\n }\n else if (error?.response?.status === 404) {\n throw new Error(t('files', 'The file does not exist anymore'));\n }\n else if (error.message) {\n throw new Error(error.message);\n }\n }\n throw new Error();\n }\n finally {\n Vue.set(node, 'status', undefined);\n }\n });\n};\n/**\n * Open a file picker for the given action\n * @param {MoveCopyAction} action The action to open the file picker for\n * @param {string} dir The directory to start the file picker in\n * @param {Node} node The node to move/copy\n * @return {Promise<boolean>} A promise that resolves to true if the action was successful\n */\nconst openFilePickerForAction = async (action, dir = '/', node) => {\n const filePicker = getFilePickerBuilder(t('files', 'Chose destination'))\n .allowDirectories(true)\n .setFilter((n) => {\n // We only want to show folders that we can create nodes in\n return (n.permissions & Permission.CREATE) !== 0\n // We don't want to show the current node in the file picker\n && node.fileid !== n.fileid;\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((nodes, path) => {\n const buttons = [];\n const target = basename(path);\n if (node.dirname === path) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (node.path === path) {\n // You cannot move a file/folder onto itself\n return buttons;\n }\n if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Copy to {target}', { target }) : t('files', 'Copy'),\n type: 'primary',\n icon: CopyIconSvg,\n async callback(destination) {\n try {\n await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.COPY);\n resolve(true);\n }\n catch (error) {\n reject(error);\n }\n },\n });\n }\n if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Move to {target}', { target }) : t('files', 'Move'),\n type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',\n icon: FolderMoveSvg,\n async callback(destination) {\n try {\n await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.MOVE);\n resolve(true);\n }\n catch (error) {\n console.warn('got error', error);\n reject(error);\n }\n },\n });\n }\n return buttons;\n });\n const picker = filePicker.build();\n picker.pick().catch(() => {\n reject(new Error(t('files', 'Cancelled move or copy operation')));\n });\n });\n};\nexport const action = new FileAction({\n id: 'move-copy',\n displayName(nodes) {\n switch (getActionForNodes(nodes)) {\n case MoveCopyAction.MOVE:\n return t('files', 'Move');\n case MoveCopyAction.COPY:\n return t('files', 'Copy');\n case MoveCopyAction.MOVE_OR_COPY:\n return t('files', 'Move or copy');\n }\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // We only support moving/copying files within the user folder\n if (!nodes.every(node => node.root?.startsWith('/files/'))) {\n return false;\n }\n return nodes.length > 0 && (canMove(nodes) || canCopy(nodes));\n },\n async exec(node, view, dir) {\n const action = getActionForNodes([node]);\n try {\n await openFilePickerForAction(action, dir, node);\n return true;\n }\n catch (error) {\n if (error instanceof Error && !!error.message) {\n showError(error.message);\n // Silent action as we handle the toast\n return null;\n }\n return false;\n }\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { join } from 'path';\nimport { Permission, Node, FileType, View, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nexport const action = new FileAction({\n id: 'open-folder',\n displayName(files) {\n // Only works on single node\n const displayName = files[0].attributes.displayName || files[0].basename;\n return t('files', 'Open folder {displayName}', { displayName });\n },\n iconSvgInline: () => FolderSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n return node.type === FileType.Folder\n && (node.permissions & Permission.READ) !== 0;\n },\n async exec(node, view, dir) {\n if (!node || node.type !== FileType.Folder) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir: join(dir, node.basename) });\n return null;\n },\n // Main action if enabled, meaning folders only\n default: DefaultType.HIDDEN,\n order: -100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\n/**\n * TODO: Move away from a redirect and handle\n * navigation straight out of the recent view\n */\nexport const action = new FileAction({\n id: 'open-in-files-recent',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => view.id === 'recent',\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = dir + '/' + node.basename;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport PencilSvg from '@mdi/svg/svg/pencil.svg?raw';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: 'rename',\n displayName: () => t('files', 'Rename'),\n iconSvgInline: () => PencilSvg,\n enabled: (nodes) => {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.UPDATE) !== 0);\n },\n async exec(node) {\n // Renaming is a built-in feature of the files app\n emit('files:node:rename', node);\n return null;\n },\n order: 10,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, FileType, Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nexport const action = new FileAction({\n id: 'view-in-folder',\n displayName() {\n return t('files', 'View in folder');\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n if (node.permissions === Permission.NONE) {\n return false;\n }\n return node.type === FileType.File;\n },\n async exec(node, view, dir) {\n if (!node || node.type !== FileType.File) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n order: 80,\n});\n","import { basename, extname } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Folder } from '@nextcloud/files';\nimport { showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport FolderPlusSvg from '@mdi/svg/svg/folder-plus.svg?raw';\nimport logger from '../logger';\nconst createNewFolder = async (root, name) => {\n const source = root.source + '/' + name;\n const encodedSource = root.encodedSource + '/' + encodeURIComponent(name);\n const response = await axios({\n method: 'MKCOL',\n url: encodedSource,\n headers: {\n Overwrite: 'F',\n },\n });\n return {\n fileid: parseInt(response.headers['oc-fileid']),\n source,\n };\n};\n// TODO: move to @nextcloud/files\nexport const getUniqueName = (name, names) => {\n let newName = name;\n let i = 1;\n while (names.includes(newName)) {\n const ext = extname(name);\n newName = `${basename(name, ext)} (${i++})${ext}`;\n }\n return newName;\n};\nexport const entry = {\n id: 'newFolder',\n displayName: t('files', 'New folder'),\n enabled: (context) => (context.permissions & Permission.CREATE) !== 0,\n iconSvgInline: FolderPlusSvg,\n order: 0,\n async handler(context, content) {\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'New folder'), contentNames);\n const { fileid, source } = await createNewFolder(context, name);\n // Create the folder in the store\n const folder = new Folder({\n source,\n id: fileid,\n mtime: new Date(),\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.ALL,\n root: context?.root || '/files/' + getCurrentUser()?.uid,\n });\n showSuccess(t('files', 'Created new folder \"{name}\"', { name: basename(source) }));\n logger.debug('Created new folder', { folder, source });\n emit('files:node:created', folder);\n emit('files:node:rename', folder);\n },\n};\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = getCurrentUser()?.uid;\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime,\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","import { Folder, getDavNameSpaces, getDavProperties, davGetDefaultPropfind } from '@nextcloud/files';\nimport { getClient } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient();\nconst reportPayload = `<?xml version=\"1.0\"?>\n<oc:filter-files ${getDavNameSpaces()}>\n\t<d:prop>\n\t\t${getDavProperties()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:favorite>1</oc:favorite>\n\t</oc:filter-rules>\n</oc:filter-files>`;\nexport const getContents = async (path = '/') => {\n const propfindPayload = davGetDefaultPropfind();\n // Get root folder\n let rootResponse;\n if (path === '/') {\n rootResponse = await client.stat(path, {\n details: true,\n data: propfindPayload,\n });\n }\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n // Only filter favorites if we're at the root\n data: path === '/' ? reportPayload : propfindPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: path === '/' ? 'REPORT' : 'PROPFIND',\n },\n includeSelf: true,\n });\n const root = rootResponse?.data || contentsResponse.data[0];\n const contents = contentsResponse.data.filter(node => node.filename !== path);\n return {\n folder: resultToNode(root),\n contents: contents.map(resultToNode),\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { basename } from 'path';\nimport { getLanguage, translate as t } from '@nextcloud/l10n';\nimport { loadState } from '@nextcloud/initial-state';\nimport { Node, FileType, View, getNavigation } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport { getContents } from '../services/Favorites';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nexport const generateFolderView = function (folder, index = 0) {\n return new View({\n id: generateIdFromPath(folder),\n name: basename(folder),\n icon: FolderSvg,\n order: index,\n params: {\n dir: folder,\n view: 'favorites',\n },\n parent: 'favorites',\n columns: [],\n getContents,\n });\n};\nexport const generateIdFromPath = function (path) {\n return `favorite-${hashCode(path)}`;\n};\nexport default () => {\n // Load state in function for mock testing purposes\n const favoriteFolders = loadState('files', 'favoriteFolders', []);\n const favoriteFoldersViews = favoriteFolders.map((folder, index) => generateFolderView(folder, index));\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'favorites',\n name: t('files', 'Favorites'),\n caption: t('files', 'List of favorites files and folders.'),\n emptyTitle: t('files', 'No favorites yet'),\n emptyCaption: t('files', 'Files and folders you mark as favorite will show up here'),\n icon: StarSvg,\n order: 5,\n columns: [],\n getContents,\n }));\n favoriteFoldersViews.forEach(view => Navigation.register(view));\n /**\n * Update favourites navigation when a new folder is added\n */\n subscribe('files:favorites:added', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n addPathToFavorites(node.path);\n });\n /**\n * Remove favourites navigation when a folder is removed\n */\n subscribe('files:favorites:removed', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n removePathFromFavorites(node.path);\n });\n /**\n * Sort the favorites paths array and\n * update the order property of the existing views\n */\n const updateAndSortViews = function () {\n favoriteFolders.sort((a, b) => a.localeCompare(b, getLanguage(), { ignorePunctuation: true }));\n favoriteFolders.forEach((folder, index) => {\n const view = favoriteFoldersViews.find(view => view.id === generateIdFromPath(folder));\n if (view) {\n view.order = index;\n }\n });\n };\n // Add a folder to the favorites paths array and update the views\n const addPathToFavorites = function (path) {\n const view = generateFolderView(path);\n // Skip if already exists\n if (favoriteFolders.find(folder => folder === path)) {\n return;\n }\n // Update arrays\n favoriteFolders.push(path);\n favoriteFoldersViews.push(view);\n // Update and sort views\n updateAndSortViews();\n Navigation.register(view);\n };\n // Remove a folder from the favorites paths array and update the views\n const removePathFromFavorites = function (path) {\n const id = generateIdFromPath(path);\n const index = favoriteFolders.findIndex(folder => folder === path);\n // Skip if not exists\n if (index === -1) {\n return;\n }\n // Update arrays\n favoriteFolders.splice(index, 1);\n favoriteFoldersViews.splice(index, 1);\n // Update and sort views\n Navigation.remove(id);\n updateAndSortViews();\n };\n};\n","import { Folder, Permission, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient(generateRemoteUrl('dav'));\nconst lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14));\nconst searchPayload = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${getDavNameSpaces()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${getCurrentUser()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${lastTwoWeeksTimestamp}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\nexport const getContents = async (path = '/') => {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: searchPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: 'SEARCH',\n // Somehow it's needed to get the correct response\n 'Content-Type': 'application/xml; charset=utf-8',\n },\n deep: true,\n });\n const contents = contentsResponse.data;\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n root: rootPath,\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.READ,\n }),\n contents: contents.map(resultToNode),\n };\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"large\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { FileType } from '@nextcloud/files';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nexport const encodeFilePath = function (path) {\n const pathSections = (path.startsWith('/') ? path : `/${path}`).split('/');\n let relativePath = '';\n pathSections.forEach((section) => {\n if (section !== '') {\n relativePath += '/' + encodeURIComponent(section);\n }\n });\n return relativePath;\n};\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nexport const extractFilePaths = function (path) {\n const pathSections = path.split('/');\n const fileName = pathSections[pathSections.length - 1];\n const dirPath = pathSections.slice(0, pathSections.length - 1).join('/');\n return [dirPath, fileName];\n};\n/**\n * Generate a translated summary of an array of nodes\n * @param {Node[]} nodes the nodes to summarize\n * @return {string}\n */\nexport const getSummaryFor = (nodes) => {\n const fileCount = nodes.filter(node => node.type === FileType.File).length;\n const folderCount = nodes.filter(node => node.type === FileType.Folder).length;\n if (fileCount === 0) {\n return n('files', '{folderCount} folder', '{folderCount} folders', folderCount, { folderCount });\n }\n else if (folderCount === 0) {\n return n('files', '{fileCount} file', '{fileCount} files', fileCount, { fileCount });\n }\n if (fileCount === 1) {\n return n('files', '1 file and {folderCount} folder', '1 file and {folderCount} folders', folderCount, { folderCount });\n }\n if (folderCount === 1) {\n return n('files', '{fileCount} file and 1 folder', '{fileCount} files and 1 folder', fileCount, { fileCount });\n }\n return t('files', '{fileCount} files and {folderCount} folders', { fileCount, folderCount });\n};\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"template-picker__item\">\n\t\t<input :id=\"id\"\n\t\t\t:checked=\"checked\"\n\t\t\ttype=\"radio\"\n\t\t\tclass=\"radio\"\n\t\t\tname=\"template-picker\"\n\t\t\t@change=\"onCheck\">\n\n\t\t<label :for=\"id\" class=\"template-picker__label\">\n\t\t\t<div class=\"template-picker__preview\"\n\t\t\t\t:class=\"failedPreview ? 'template-picker__preview--failed' : ''\">\n\t\t\t\t<img class=\"template-picker__image\"\n\t\t\t\t\t:src=\"realPreviewUrl\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tdraggable=\"false\"\n\t\t\t\t\t@error=\"onFailure\">\n\t\t\t</div>\n\n\t\t\t<span class=\"template-picker__title\">\n\t\t\t\t{{ nameWithoutExt }}\n\t\t\t</span>\n\t\t</label>\n\t</li>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport { encodeFilePath } from '../utils/fileUtils.ts'\nimport { getToken, isPublic } from '../utils/davUtils.js'\n\n// preview width generation\nconst previewWidth = 256\n\nexport default {\n\tname: 'TemplatePreview',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tbasename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tchecked: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpreviewUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\thasPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tratio: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tfailedPreview: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename\n\t\t},\n\n\t\tid() {\n\t\t\treturn `template-picker-${this.fileid}`\n\t\t},\n\n\t\trealPreviewUrl() {\n\t\t\t// If original preview failed, fallback to mime icon\n\t\t\tif (this.failedPreview && this.mimeIcon) {\n\t\t\t\treturn this.mimeIcon\n\t\t\t}\n\n\t\t\tif (this.previewUrl) {\n\t\t\t\treturn this.previewUrl\n\t\t\t}\n\t\t\t// TODO: find a nicer standard way of doing this?\n\t\t\tif (isPublic()) {\n\t\t\t\treturn generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodeFilePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t\t}\n\t\t\treturn generateUrl(`/core/preview?fileId=${this.fileid}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t},\n\n\t\tmimeIcon() {\n\t\t\treturn OC.MimeType.getIconUrl(this.mime)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonCheck() {\n\t\t\tthis.$emit('check', this.fileid)\n\t\t},\n\t\tonFailure() {\n\t\t\tthis.failedPreview = true\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n</style>\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=0859a92c&scoped=true\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0859a92c\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"","/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=48121b39&scoped=true\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"48121b39\",\n null\n \n)\n\nexport default component.exports","import { Folder, Node, Permission, addNewFileMenuEntry, removeNewFileMenuEntry } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getLoggerBuilder } from '@nextcloud/logger';\nimport { join } from 'path';\nimport { loadState } from '@nextcloud/initial-state';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport PlusSvg from '@mdi/svg/svg/plus.svg?raw';\nimport TemplatePickerView from './views/TemplatePicker.vue';\nimport { getUniqueName } from './newMenu/newFolder';\nimport { getCurrentUser } from '@nextcloud/auth';\n// Set up logger\nconst logger = getLoggerBuilder()\n .setApp('files')\n .detectUser()\n .build();\n// Add translates functions\nVue.mixin({\n methods: {\n t,\n n,\n },\n});\n// Create document root\nconst TemplatePickerRoot = document.createElement('div');\nTemplatePickerRoot.id = 'template-picker';\ndocument.body.appendChild(TemplatePickerRoot);\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', []);\nlet templatesPath = loadState('files', 'templates_path', false);\nlogger.debug('Templates providers', templates);\nlogger.debug('Templates folder', { templatesPath });\n// Init vue app\nconst View = Vue.extend(TemplatePickerView);\nconst TemplatePicker = new View({\n name: 'TemplatePicker',\n propsData: {\n logger,\n },\n});\nTemplatePicker.$mount('#template-picker');\nif (!templatesPath) {\n logger.debug('Templates folder not initialized');\n addNewFileMenuEntry({\n id: 'template-picker',\n displayName: t('files', 'Create new templates folder'),\n iconSvgInline: PlusSvg,\n order: 10,\n enabled(context) {\n // Allow creation on your own folders only\n if (context.owner !== getCurrentUser()?.uid) {\n return false;\n }\n return (context.permissions & Permission.CREATE) !== 0;\n },\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'Templates'), contentNames);\n // Create the template folder\n initTemplatesFolder(context, name);\n // Remove the menu entry\n removeNewFileMenuEntry('template-picker');\n },\n });\n}\n// Init template files menu\ntemplates.forEach((provider, index) => {\n addNewFileMenuEntry({\n id: `template-new-${provider.app}-${index}`,\n displayName: provider.label,\n // TODO: migrate to inline svg\n iconClass: provider.iconClass || 'icon-file',\n enabled(context) {\n return (context.permissions & Permission.CREATE) !== 0;\n },\n order: 11,\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(provider.label + provider.extension, contentNames);\n // Create the file\n TemplatePicker.open(name, provider);\n },\n });\n});\n// Init template folder\nconst initTemplatesFolder = async function (directory, name) {\n const templatePath = join(directory.path, name);\n try {\n logger.debug('Initializing the templates directory', { templatePath });\n const response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n templatePath,\n copySystemTemplates: true,\n });\n // Go to template directory\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: undefined }, { dir: templatePath });\n templates = response.data.ocs.data.templates;\n templatesPath = response.data.ocs.data.template_path;\n }\n catch (error) {\n logger.error('Unable to initialize the templates directory');\n showError(t('files', 'Unable to initialize the templates directory'));\n }\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport MenuIcon from '@mdi/svg/svg/sun-compass.svg?raw';\nimport { FileAction, addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as deleteAction } from './actions/deleteAction';\nimport { action as downloadAction } from './actions/downloadAction';\nimport { action as editLocallyAction } from './actions/editLocallyAction';\nimport { action as favoriteAction } from './actions/favoriteAction';\nimport { action as moveOrCopyAction } from './actions/moveOrCopyAction';\nimport { action as openFolderAction } from './actions/openFolderAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { action as renameAction } from './actions/renameAction';\nimport { action as sidebarAction } from './actions/sidebarAction';\nimport { action as viewInFolderAction } from './actions/viewInFolderAction';\nimport { entry as newFolderEntry } from './newMenu/newFolder';\nimport registerFavoritesView from './views/favorites';\nimport registerRecentView from './views/recent';\nimport registerFilesView from './views/files';\nimport registerPreviewServiceWorker from './services/ServiceWorker.js';\nimport './init-templates';\nimport { initLivePhotos } from './services/LivePhotos';\n// Register file actions\nregisterFileAction(deleteAction);\nregisterFileAction(downloadAction);\nregisterFileAction(editLocallyAction);\nregisterFileAction(favoriteAction);\nregisterFileAction(moveOrCopyAction);\nregisterFileAction(openFolderAction);\nregisterFileAction(openInFilesAction);\nregisterFileAction(renameAction);\nregisterFileAction(sidebarAction);\nregisterFileAction(viewInFolderAction);\n// Register new menu entry\naddNewFileMenuEntry(newFolderEntry);\n// Register files views\nregisterFavoritesView();\nregisterFilesView();\nregisterRecentView();\n// Register preview service worker\nregisterPreviewServiceWorker();\nregisterDavProperty('nc:hidden', { nc: 'http://nextcloud.org/ns' });\ninitLivePhotos();\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport { getContents } from '../services/Files';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'files',\n name: t('files', 'All files'),\n caption: t('files', 'List of your files and folders.'),\n icon: FolderSvg,\n order: 0,\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport HistorySvg from '@mdi/svg/svg/history.svg?raw';\nimport { getContents } from '../services/Recent';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'recent',\n name: t('files', 'Recent'),\n caption: t('files', 'List of recently modified files and folders.'),\n emptyTitle: t('files', 'No recently modified files'),\n emptyCaption: t('files', 'Files and folders you recently modified will show up here.'),\n icon: HistorySvg,\n order: 2,\n defaultSortKey: 'mtime',\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { generateUrl } from '@nextcloud/router'\nimport logger from '../logger.js'\n\nexport default () => {\n\tif ('serviceWorker' in navigator) {\n\t\t// Use the window load event to keep the page load performant\n\t\twindow.addEventListener('load', async () => {\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/files/preview-service-worker.js', {}, { noRewrite: true })\n\t\t\t\tconst registration = await navigator.serviceWorker.register(url, { scope: '/' })\n\t\t\t\tlogger.debug('SW registered: ', { registration })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('SW registration failed: ', { error })\n\t\t\t}\n\t\t})\n\t} else {\n\t\tlogger.debug('Service Worker is not enabled on this browser.')\n\t}\n}\n","/**\n * @copyright Copyright (c) 2023 Louis Chmn <louis@chmn.me>\n *\n * @author Louis Chmn <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, registerDavProperty } from '@nextcloud/files';\nexport function initLivePhotos() {\n registerDavProperty('nc:metadata-files-live-photo', { nc: 'http://nextcloud.org/ns' });\n}\n/**\n * @param {Node} node - The node\n */\nexport function isLivePhoto(node) {\n return node.attributes['metadata-files-live-photo'] !== undefined;\n}\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@nextcloud/dialogs/dist/style.css\"],\"names\":[],\"mappings\":\"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAAiR;EACjR,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAiU;AACnU;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,wBAAwB;EACxB,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,mBAAmB;AACrB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,wBAAwB;AAC1B;AACA;EACE;IACE,yDAAyD;EAC3D;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB\",\"sourcesContent\":[\"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\\n *\\n * @author Julius Härtl <jus@bitgrid.net>\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n */\\n.toastify.dialogs {\\n min-width: 200px;\\n background: none;\\n background-color: var(--color-main-background);\\n color: var(--color-main-text);\\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\\n padding: 0 12px;\\n margin-top: 45px;\\n position: fixed;\\n z-index: 10100;\\n border-radius: var(--border-radius);\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-container {\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-button,\\n.toastify.dialogs .toast-close {\\n position: static;\\n overflow: hidden;\\n box-sizing: border-box;\\n min-width: 44px;\\n height: 100%;\\n padding: 12px;\\n white-space: nowrap;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-color: transparent;\\n min-height: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close,\\n.toastify.dialogs .toast-close.toast-close {\\n text-indent: 0;\\n opacity: .4;\\n border: none;\\n min-height: 44px;\\n margin-left: 10px;\\n font-size: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close:before,\\n.toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);\\n content: \\\" \\\";\\n filter: var(--background-invert-if-dark);\\n display: inline-block;\\n width: 16px;\\n height: 16px;\\n}\\n.toastify.dialogs .toast-undo-button.toast-undo-button,\\n.toastify.dialogs .toast-close.toast-undo-button {\\n height: calc(100% - 6px);\\n margin: 3px 3px 3px 12px;\\n}\\n.toastify.dialogs .toast-undo-button:hover,\\n.toastify.dialogs .toast-undo-button:focus,\\n.toastify.dialogs .toast-undo-button:active,\\n.toastify.dialogs .toast-close:hover,\\n.toastify.dialogs .toast-close:focus,\\n.toastify.dialogs .toast-close:active {\\n cursor: pointer;\\n opacity: 1;\\n}\\n.toastify.dialogs.toastify-top {\\n right: 10px;\\n}\\n.toastify.dialogs.toast-with-click {\\n cursor: pointer;\\n}\\n.toastify.dialogs.toast-error {\\n border-left: 3px solid var(--color-error);\\n}\\n.toastify.dialogs.toast-info {\\n border-left: 3px solid var(--color-primary);\\n}\\n.toastify.dialogs.toast-warning {\\n border-left: 3px solid var(--color-warning);\\n}\\n.toastify.dialogs.toast-success,\\n.toastify.dialogs.toast-undo {\\n border-left: 3px solid var(--color-success);\\n}\\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=);\\n}\\n._file-picker__file-icon_1vgv4_5 {\\n width: 32px;\\n height: 32px;\\n min-width: 32px;\\n min-height: 32px;\\n background-repeat: no-repeat;\\n background-size: contain;\\n display: flex;\\n justify-content: center;\\n}\\ntr.file-picker__row[data-v-6aded0d9] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-6aded0d9] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\\n padding-inline: 2px 0;\\n}\\n@keyframes gradient-6aded0d9 {\\n 0% {\\n background-position: 0% 50%;\\n }\\n 50% {\\n background-position: 100% 50%;\\n }\\n to {\\n background-position: 0% 50%;\\n }\\n}\\n.loading-row .row-checkbox[data-v-6aded0d9] {\\n text-align: center !important;\\n}\\n.loading-row span[data-v-6aded0d9] {\\n display: inline-block;\\n height: 24px;\\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\\n background-size: 600px 100%;\\n border-radius: var(--border-radius);\\n animation: gradient-6aded0d9 12s ease infinite;\\n}\\n.loading-row .row-wrapper[data-v-6aded0d9] {\\n display: inline-flex;\\n align-items: center;\\n}\\n.loading-row .row-checkbox span[data-v-6aded0d9] {\\n width: 24px;\\n}\\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\\n margin-inline-start: 6px;\\n width: 130px;\\n}\\n.loading-row .row-size span[data-v-6aded0d9] {\\n width: 80px;\\n}\\n.loading-row .row-modified span[data-v-6aded0d9] {\\n width: 90px;\\n}\\ntr.file-picker__row[data-v-24eb3c55] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-24eb3c55] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-24eb3c55] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-24eb3c55]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-24eb3c55] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-24eb3c55] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-24eb3c55] {\\n color: var(--color-text-maxcontrast);\\n min-width: fit-content;\\n}\\n.file-picker__header-preview[data-v-4297db37] {\\n width: 22px;\\n height: 32px;\\n flex: 0 0 auto;\\n}\\n.file-picker__files[data-v-4297db37] {\\n margin: 2px;\\n margin-inline-start: 12px;\\n overflow: scroll auto;\\n}\\n.file-picker__files table[data-v-4297db37] {\\n width: 100%;\\n max-height: 100%;\\n table-layout: fixed;\\n}\\n.file-picker__files th[data-v-4297db37] {\\n position: -webkit-sticky;\\n position: sticky;\\n z-index: 1;\\n top: 0;\\n background-color: var(--color-main-background);\\n padding: 2px;\\n}\\n.file-picker__files th .header-wrapper[data-v-4297db37] {\\n display: flex;\\n}\\n.file-picker__files th.row-checkbox[data-v-4297db37] {\\n width: 44px;\\n}\\n.file-picker__files th.row-name[data-v-4297db37] {\\n width: 230px;\\n}\\n.file-picker__files th.row-size[data-v-4297db37] {\\n width: 100px;\\n}\\n.file-picker__files th.row-modified[data-v-4297db37] {\\n width: 120px;\\n}\\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\\n justify-content: start;\\n flex-direction: row-reverse;\\n}\\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\\n padding-inline: 16px 4px;\\n}\\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\\n justify-content: end;\\n}\\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\\n color: var(--color-text-maxcontrast);\\n}\\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\\n font-weight: 400;\\n}\\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\\n flex-grow: 0 !important;\\n}\\n.file-picker__side[data-v-fcfd0f23] {\\n display: flex;\\n flex-direction: column;\\n align-items: start;\\n gap: .5rem;\\n min-width: 200px;\\n padding-block: 2px;\\n overflow: auto;\\n}\\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\\n justify-content: start;\\n}\\n.file-picker__filter-input[data-v-fcfd0f23] {\\n margin-block: 7px;\\n max-width: 260px;\\n}\\n@media (max-width: 736px) {\\n .file-picker__side[data-v-fcfd0f23] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__side[data-v-fcfd0f23] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n .file-picker__filter-input[data-v-fcfd0f23] {\\n max-width: unset;\\n }\\n}\\n.file-picker__navigation {\\n padding-inline: 2px;\\n}\\n.file-picker__navigation,\\n.file-picker__navigation * {\\n box-sizing: border-box;\\n}\\n.file-picker__navigation .v-select.select {\\n min-width: 220px;\\n}\\n@media (min-width: 513px) and (max-width: 736px) {\\n .file-picker__navigation {\\n gap: 11px;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__navigation {\\n flex-direction: column-reverse !important;\\n }\\n}\\n.file-picker__view[data-v-b63d952f] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-b63d952f] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-b63d952f] {\\n box-sizing: border-box;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n min-height: 0;\\n flex: 1;\\n padding-inline: 2px;\\n}\\n.file-picker__main *[data-v-b63d952f] {\\n box-sizing: border-box;\\n}\\n[data-v-b63d952f] .file-picker {\\n height: min(80vh, 800px);\\n}\\n@media (max-width: 512px) {\\n [data-v-b63d952f] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area));\\n }\\n}\\n[data-v-b63d952f] .file-picker__content {\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TemplatePreview.vue\"],\"names\":[],\"mappings\":\"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA\",\"sourcesContent\":[\"\\n\\n.template-picker {\\n\\t&__item {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__label {\\n\\t\\tdisplay: flex;\\n\\t\\t// Align in the middle of the grid\\n\\t\\talign-items: center;\\n\\t\\tflex: 1 1;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&, * {\\n\\t\\t\\tcursor: pointer;\\n\\t\\t\\tuser-select: none;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tdisplay: none !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__preview {\\n\\t\\tdisplay: block;\\n\\t\\toverflow: hidden;\\n\\t\\t// Stretch so all entries are the same width\\n\\t\\tflex: 1 1;\\n\\t\\twidth: var(--width);\\n\\t\\tmin-height: var(--height);\\n\\t\\tmax-height: var(--height);\\n\\t\\tpadding: 0;\\n\\t\\tborder: var(--border) solid var(--color-border);\\n\\t\\tborder-radius: var(--border-radius-large);\\n\\n\\t\\tinput:checked + label > & {\\n\\t\\t\\tborder-color: var(--color-primary-element);\\n\\t\\t}\\n\\n\\t\\t&--failed {\\n\\t\\t\\t// Make sure to properly center fallback icon\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t}\\n\\n\\t&__image {\\n\\t\\tmax-width: 100%;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\n\\t\\tobject-fit: cover;\\n\\t}\\n\\n\\t// Failed preview, fallback to mime icon\\n\\t&__preview--failed &__image {\\n\\t\\twidth: calc(var(--margin) * 8);\\n\\t\\t// Center mime icon\\n\\t\\tmargin: auto;\\n\\t\\tbackground-color: transparent !important;\\n\\n\\t\\tobject-fit: initial;\\n\\t}\\n\\n\\t&__title {\\n\\t\\toverflow: hidden;\\n\\t\\t// also count preview border\\n\\t\\tmax-width: calc(var(--width) + 2*2px);\\n\\t\\tpadding: var(--margin);\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/TemplatePicker.vue\"],\"names\":[],\"mappings\":\"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA\",\"sourcesContent\":[\"\\n.templates-picker {\\n\\t&__form {\\n\\t\\tpadding: calc(var(--margin) * 2);\\n\\t\\t// Will be handled by the buttons\\n\\t\\tpadding-bottom: 0;\\n\\n\\t\\th2 {\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tmargin: var(--margin) 0 calc(var(--margin) * 2);\\n\\t\\t}\\n\\t}\\n\\n\\t&__list {\\n\\t\\tdisplay: grid;\\n\\t\\tgrid-gap: calc(var(--margin) * 2);\\n\\t\\tgrid-auto-columns: 1fr;\\n\\t\\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\\n\\t\\tmax-width: calc(var(--fullwidth) * 6);\\n\\t\\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\\n\\t\\t// Make sure all rows are the same height\\n\\t\\tgrid-auto-rows: 1fr;\\n\\t\\t// Center the columns set\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&__buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: end;\\n\\t\\tpadding: calc(var(--margin) * 2) var(--margin);\\n\\t\\tposition: sticky;\\n\\t\\tbottom: 0;\\n\\t\\tbackground-image: linear-gradient(0, var(--gradient-main-background));\\n\\n\\t\\tbutton, input[type='submit'] {\\n\\t\\t\\theight: 44px;\\n\\t\\t}\\n\\t}\\n\\n\\t// Make sure we're relative for the loading emptycontent on top\\n\\t::v-deep .modal-container {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__loading {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tjustify-content: center;\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t\\tmargin: 0;\\n\\t\\tbackground-color: var(--color-main-background-translucent);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","module.exports = require('events').EventEmitter;\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/lib/_stream_readable.js');\nStream.Writable = require('readable-stream/lib/_stream_writable.js');\nStream.Duplex = require('readable-stream/lib/_stream_duplex.js');\nStream.Transform = require('readable-stream/lib/_stream_transform.js');\nStream.PassThrough = require('readable-stream/lib/_stream_passthrough.js');\nStream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js')\nStream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js')\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n const r = this.source.indexOf(this.root);\n return I(this.source.slice(r + this.root.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n const t = this.source.indexOf(this.root);\n return this.source.slice(t + this.root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n const t = ge(e);\n function r(n) {\n t.setHeaders({\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: n ?? \"\"\n });\n }\n return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n const d = i.headers;\n return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n }), t;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":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\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar B = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nB.buildOptions = Se;\nB.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar Be = Me;\nconst ke = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (ke.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = k.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return k.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = B, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '
'\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"</\" + t + this.tagEndChar, i = \"\";\n return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `<!--${e}-->` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n if (e && e.length > 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst Bt = S, kt = At, qt = Mt;\nvar W = {\n XMLParser: kt,\n XMLValidator: Bt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"2048\":\"78a82614529a3cefcde7\",\"4180\":\"fe82f3a2dac70d6b82bc\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9837;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9837: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(34507)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","action","FileAction","id","displayName","nodes","view","t","iconSvgInline","enabled","length","map","node","permissions","every","permission","Permission","DELETE","exec","axios","delete","encodedSource","emit","error","logger","source","execBatch","dir","Promise","all","this","order","triggerDownload","url","hiddenElement","document","createElement","download","href","click","downloadNodes","secret","Math","random","toString","substring","generateUrl","files","JSON","stringify","basename","some","type","FileType","Folder","root","startsWith","READ","async","Array","fill","UPDATE","path","link","generateOcsUrl","result","post","uid","getCurrentUser","window","location","host","encodePath","data","ocs","token","showError","openLocalClient","shouldFavorite","attributes","favorite","favoriteNode","willFavorite","tags","OC","TAG_FAVORITE","dirname","Vue","StarSvg","NONE","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","queue","getQueue","PQueue","concurrency","MoveCopyAction","canMove","reduce","min","ALL","canCopy","parse","attribute","scope","key","canDownload","getActionForNodes","MOVE_OR_COPY","MOVE","COPY","handleCopyMoveNodeTo","destination","method","overwrite","arguments","undefined","Error","relativePath","join","destinationUrl","generateRemoteUrl","debug","NodeStatus","LOADING","add","headers","Destination","encodeURI","Overwrite","response","status","message","FolderMoveSvg","filePicker","getFilePickerBuilder","allowDirectories","setFilter","n","CREATE","fileid","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","buttons","target","push","label","icon","CopyIconSvg","callback","console","warn","pick","catch","openFilePickerForAction","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","getUniqueName","name","names","newName","i","includes","ext","extname","entry","context","handler","content","contentNames","encodeURIComponent","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","original","methods","final","HotPatcher","constructor","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","allowTargetOverrides","Object","keys","forEach","foreignKey","hasOwnProperty","assign","execute","args","get","item","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","replace","uri","indexOf","slice","toUpperCase","qop","test","ncString","nc","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","opaque","authHeader","k","obj","prototype","call","getPrototypeOf","proto","isPlainObject","setPrototypeOf","merge","output","items","nextItem","mergeObjects","obj1","obj2","isArray","headerPayloads","headerKeys","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","value","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","defaultRootUrl","getClient","rootUrl","client","createClient","requesttoken","getRequestToken","getPatcher","_digest","hasDigestAuth","Authorization","split","re","match","floor","makeNonce","parseDigestAuth","response2","request","hashCode","str","a","b","charCodeAt","resultToNode","props","davParsePermissions","filename","nodeData","lastmod","mime","size","hasPreview","failed","reportPayload","getDavNameSpaces","getDavProperties","getContents","propfindPayload","davGetDefaultPropfind","rootResponse","stat","details","contentsResponse","getDirectoryContents","includeSelf","contents","filter","generateFolderView","index","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","searchPayload","inheritAttrs","String","required","checked","Boolean","Number","previewUrl","ratio","failedPreview","computed","nameWithoutExt","realPreviewUrl","mimeIcon","getElementById","pathSections","section","encodeFilePath","MimeType","getIconUrl","onCheck","$emit","onFailure","_vm","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","extend","components","NcEmptyContent","NcModal","TemplatePreview","loading","opened","provider","extension","emptyTemplate","mimetypes","selectedTemplate","templates","find","template","style","width","margin","border","fetchedProvider","getTemplates","app","onSubmit","close","currentDirectory","URL","searchParams","fileInfo","filePath","templatePath","templateType","createFromTemplate","normalize","openfile","_setupProxy","$event","preventDefault","stopPropagation","_b","_l","_e","mixin","TemplatePickerRoot","appendChild","loadState","templatesPath","TemplatePicker","TemplatePickerView","propsData","$mount","addNewFileMenuEntry","initTemplatesFolder","removeNewFileMenuEntry","iconClass","directory","copySystemTemplates","template_path","registerFileAction","deleteAction","downloadAction","editLocallyAction","favoriteAction","moveOrCopyAction","openFolderAction","openInFilesAction","renameAction","sidebarAction","viewInFolderAction","newFolderEntry","favoriteFolders","favoriteFoldersViews","Navigation","getNavigation","register","caption","emptyTitle","emptyCaption","subscribe","addPathToFavorites","removePathFromFavorites","updateAndSortViews","sort","localeCompare","getLanguage","ignorePunctuation","findIndex","splice","remove","registerFavoritesView","controller","AbortController","CancelablePromise","onCancel","abort","defaultSortKey","deep","navigator","addEventListener","noRewrite","registration","serviceWorker","registerDavProperty","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","o","p","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","valueOf","e","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","it","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","s","done","f","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","set","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","onfinally","runWhenCanceled","finally","callbacks","_step","_iterator","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_URL_IMPORT_0___","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","ReflectOwnKeys","R","ReflectApply","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","concat","NumberIsNaN","isNaN","EventEmitter","init","once","emitter","errorListener","removeListener","resolver","eventTargetAgnosticAddListener","flags","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","m","events","existing","warning","newListener","unshift","warned","w","count","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","ret","unwrapListeners","arrayClone","listenerCount","copy","wrapListener","removeEventListener","RangeError","setMaxListeners","getMaxListeners","doError","er","listeners","addListener","prependListener","prependOnceListener","list","position","originalListener","pop","spliceOne","off","removeAllListeners","rawListeners","eventNames","http","https","validateParams","cb","codes","createErrorType","code","Base","NodeError","_Base","arg1","arg2","arg3","getMessage","oneOf","expected","thing","actual","determiner","search","msg","start","substr","this_len","endsWith","objectKeys","Duplex","Readable","Writable","v","allowHalfOpen","readable","onend","_writableState","ended","process","nextTick","onEndNT","end","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","chunk","encoding","ReadableState","EElistenerCount","Stream","Buffer","OurUint8Array","g","Uint8Array","debugUtil","debuglog","StringDecoder","createReadableStreamAsyncIterator","BufferList","destroyImpl","getHighWaterMark","_require$codes","ERR_INVALID_ARG_TYPE","ERR_STREAM_PUSH_AFTER_EOF","ERR_METHOD_NOT_IMPLEMENTED","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","errorOrDestroy","kProxyEvents","stream","isDuplex","objectMode","readableObjectMode","buffer","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","decoder","read","_read","destroy","_destroy","readableAddChunk","addToFront","skipChunkCheck","emitReadable","emitReadable_","onEofChunk","chunkInvalid","_uint8ArrayToBuffer","addChunk","write","maybeReadMore","_undestroy","undestroy","isPaused","setEncoding","enc","head","clear","MAX_HWM","howMuchToRead","computeNewHighWaterMark","flow","maybeReadMore_","updateReadableListening","resume","nReadingNextTick","resume_","fromList","first","consume","endReadable","endReadableNT","wState","finished","xs","x","l","nOrig","doRead","pipe","dest","pipeOpts","src","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","onerror","ondata","cleanedUp","needDrain","pipeOnDrain","pause","event","fn","dests","ev","res","wrap","asyncIterator","_fromList","ERR_MULTIPLE_CALLBACK","ERR_TRANSFORM_ALREADY_TRANSFORMING","ERR_TRANSFORM_WITH_LENGTH_0","afterTransform","ts","_transformState","transforming","writecb","writechunk","rs","needTransform","writeencoding","transform","flush","_flush","prefinish","_write","err2","CorkedRequest","finish","corkReq","pendingcb","onCorkedFinish","corkedRequestsFree","WritableState","realHasInstance","internalUtil","deprecate","ERR_STREAM_CANNOT_PIPE","ERR_STREAM_DESTROYED","ERR_STREAM_NULL_VALUES","ERR_STREAM_WRITE_AFTER_END","ERR_UNKNOWN_ENCODING","nop","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","writev","_writev","_final","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","rState","current","out","_","hasInstance","object","writeAfterEnd","validChunk","newChunk","decodeChunk","last","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_Object$setPrototypeO","input","hint","prim","toPrimitive","_toPrimitive","_toPropertyKey","kLastResolve","kLastReject","kError","kEnded","kLastPromise","kHandlePromise","kStream","createIterResult","readAndResolve","iter","onReadable","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","lastPromise","wrapForNext","_this2","_Object$create","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","_objectSpread","getOwnPropertyDescriptors","defineProperties","inspect","custom","tail","alloc","offset","allocUnsafe","hasStrings","_getString","_getBuffer","c","nb","buf","depth","customInspect","emitErrorAndCloseNT","emitErrorNT","emitCloseNT","readableDestroyed","writableDestroyed","ERR_STREAM_PREMATURE_CLOSE","noop","eos","called","_len","_key","onlegacyfinish","writableEnded","readableEnded","onrequest","req","setHeader","isRequest","ERR_MISSING_ARGS","to","streams","popCallback","destroys","closed","destroyer","ERR_INVALID_OPT_VALUE","duplexKey","hwm","highWaterMarkFrom","isFinite","pipeline","copyProps","dst","SafeBuffer","encodingOrOffset","allocUnsafeSlow","SlowBuffer","EE","inherits","_isStdio","didOnEnd","cleanup","ClientRequest","statusCodes","defaultProtocol","hostname","port","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","_fetchAbortController","requestTimeout","_fetchResponse","_resetTimers","_connect","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","send","statusValid","clearTimeout","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","_resumeFetch","pipeTo","reader","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","responseText","newData","MSStreamReader","byteLength","onload","readAsArrayBuffer","isEncoding","nenc","retried","_normalizeEncoding","normalizeEncoding","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","r","utf8CheckExtraBytes","total","j","utf8CheckIncomplete","config","localStorage","val","trace","setUid","Ne","_entries","registerEntry","validateEntry","unregisterEntry","getEntryIndex","entries","getEntries","_nc_newfilemenu","C","P","Yt","log","d","pow","toFixed","parseFloat","toLocaleString","Z","DEFAULT","Qt","_action","validateAction","title","inline","renderInline","values","Dt","_nc_fileactions","N","SHARE","Y","oc","ir","_nc_dav_properties","_nc_dav_namespaces","prop","namespaces","V","L","sr","or","be","J","X","crtime","Q","NEW","FAILED","LOCKED","D","_data","_attributes","_knownDavService","updateMtime","deleteProperty","origin","pathname","move","rename","ye","super","ee","te","ur","setHeaders","dr","ve","getcontentlength","Te","_views","_currentView","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","render","summary","S","O","RegExp","isExist","u","isEmptyObject","getValue","isName","getAllMatches","startIndex","lastIndex","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","z","validate","trim","Re","xe","H","line","tagClosed","tagName","tagStartPos","col","Ve","Ce","Pe","$e","Le","Fe","B","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","T","tagname","child","addChild","tt","entityName","regx","entities","rt","skipLike","De","lastEntities","regex","st","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","lt","ft","ampEntity","ct","ht","pt","gt","ne","ie","Nt","bt","Et","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","arrayNodeName","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","emptyView","sticky","expanded","Xt","hr","pr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","definition","chunkId","promises","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","onScriptComplete","prev","doneFns","parentNode","removeChild","nmd","paths","children","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"files-init.js?v=54a5590ac7fe5931491e","mappings":";UAAIA,ECAAC,EACAC,4FCsBJ,SAAeC,EAAAA,EAAAA,MACbC,OAAO,SACPC,aACAC,QCCWC,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,SACJC,YAAWA,CAACC,EAAOC,IACI,aAAZA,EAAKH,IACNI,EAAAA,EAAAA,IAAE,QAAS,uBACXA,EAAAA,EAAAA,IAAE,QAAS,UAErBC,cAAeA,uMACfC,QAAQJ,GACGA,EAAMK,OAAS,GAAKL,EACtBM,KAAIC,GAAQA,EAAKC,cACjBC,OAAMC,GAAmD,IAApCA,EAAaC,EAAAA,GAAWC,UAEtD,UAAMC,CAAKN,GACP,IAMI,aALMO,EAAAA,EAAMC,OAAOR,EAAKS,gBAIxBC,EAAAA,EAAAA,IAAK,qBAAsBV,IACpB,CACX,CACA,MAAOW,GAEH,OADAC,EAAOD,MAAM,8BAA+B,CAAEA,QAAOE,OAAQb,EAAKa,OAAQb,UACnE,CACX,CACJ,EACA,eAAMc,CAAUrB,EAAOC,EAAMqB,GACzB,OAAOC,QAAQC,IAAIxB,EAAMM,KAAIC,GAAQkB,KAAKZ,KAAKN,EAAMN,EAAMqB,KAC/D,EACAI,MAAO,2BChCLC,EAAkB,SAAUC,GAC9B,MAAMC,EAAgBC,SAASC,cAAc,KAC7CF,EAAcG,SAAW,GACzBH,EAAcI,KAAOL,EACrBC,EAAcK,OACl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GjCg5C,EAAqBhwC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FgwC,EAAmBvuC,QAAQmuC,EAAqBzvC,KAAK,KAAM,IAC3D6vC,EAAmB9yC,KAAO0yC,EAAqBzvC,KAAK,KAAM6vC,EAAmB9yC,KAAKiD,KAAK6vC,QCvFvF1C,EAAoB7pC,QAAKvN,ECGzB,IAAI+5C,EAAsB3C,EAAoB7L,OAAEvrC,EAAW,CAAC,OAAO,IAAOo3C,EAAoB,SAC9F2C,EAAsB3C,EAAoB7L,EAAEwO","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/deleteAction.ts","webpack:///nextcloud/apps/files/src/actions/downloadAction.ts","webpack:///nextcloud/apps/files/src/actions/editLocallyAction.ts","webpack:///nextcloud/apps/files/src/actions/favoriteAction.ts","webpack://nextcloud/./node_modules/@nextcloud/dialogs/dist/style.css?d87c","webpack:///nextcloud/node_modules/axios/index.js","webpack:///nextcloud/apps/files/src/actions/moveOrCopyActionUtils.ts","webpack:///nextcloud/apps/files/src/actions/moveOrCopyAction.ts","webpack:///nextcloud/apps/files/src/actions/openFolderAction.ts","webpack:///nextcloud/apps/files/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files/src/actions/renameAction.ts","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack:///nextcloud/apps/files/src/actions/viewInFolderAction.ts","webpack:///nextcloud/apps/files/src/newMenu/newFolder.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/services/Favorites.ts","webpack:///nextcloud/apps/files/src/views/favorites.ts","webpack:///nextcloud/apps/files/src/services/Recent.ts","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/utils/fileUtils.ts","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?af18","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=ts","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?0681","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack:///nextcloud/apps/files/src/init-templates.ts","webpack:///nextcloud/apps/files/src/init.ts","webpack:///nextcloud/apps/files/src/views/files.ts","webpack:///nextcloud/apps/files/src/views/recent.ts","webpack:///nextcloud/apps/files/src/services/ServiceWorker.js","webpack:///nextcloud/apps/files/src/services/LivePhotos.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/style.css","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/events/events.js","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/errors-browser.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_duplex.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_passthrough.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_readable.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_transform.js","webpack:///nextcloud/node_modules/readable-stream/lib/_stream_writable.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/async_iterator.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/from-browser.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/state.js","webpack:///nextcloud/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/safe-buffer/index.js","webpack:///nextcloud/node_modules/stream-browserify/index.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/string_decoder/lib/string_decoder.js","webpack:///nextcloud/node_modules/util-deprecate/browser.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, Node, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport TrashCanSvg from '@mdi/svg/svg/trash-can.svg?raw';\nimport logger from '../logger.js';\nexport const action = new FileAction({\n id: 'delete',\n displayName(nodes, view) {\n return view.id === 'trashbin'\n ? t('files', 'Delete permanently')\n : t('files', 'Delete');\n },\n iconSvgInline: () => TrashCanSvg,\n enabled(nodes) {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.DELETE) !== 0);\n },\n async exec(node) {\n try {\n await axios.delete(node.encodedSource);\n // Let's delete even if it's moved to the trashbin\n // since it has been removed from the current view\n // and changing the view will trigger a reload anyway.\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error('Error while deleting a file', { error, source: node.source, node });\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { generateUrl } from '@nextcloud/router';\nimport { FileAction, Permission, Node, FileType, View } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport ArrowDownSvg from '@mdi/svg/svg/arrow-down.svg?raw';\nconst triggerDownload = function (url) {\n const hiddenElement = document.createElement('a');\n hiddenElement.download = '';\n hiddenElement.href = url;\n hiddenElement.click();\n};\nconst downloadNodes = function (dir, nodes) {\n const secret = Math.random().toString(36).substring(2);\n const url = generateUrl('/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}', {\n dir,\n secret,\n files: JSON.stringify(nodes.map(node => node.basename)),\n });\n triggerDownload(url);\n};\nconst isDownloadable = function (node) {\n if ((node.permissions & Permission.READ) === 0) {\n return false;\n }\n // If the mount type is a share, ensure it got download permissions.\n if (node.attributes['mount-type'] === 'shared') {\n const downloadAttribute = JSON.parse(node.attributes['share-attributes']).find((attribute) => attribute.scope === 'permissions' && attribute.key === 'download');\n if (downloadAttribute !== undefined && downloadAttribute.enabled === false) {\n return false;\n }\n }\n return true;\n};\nexport const action = new FileAction({\n id: 'download',\n displayName: () => t('files', 'Download'),\n iconSvgInline: () => ArrowDownSvg,\n enabled(nodes) {\n if (nodes.length === 0) {\n return false;\n }\n // We can download direct dav files. But if we have\n // some folders, we need to use the /apps/files/ajax/download.php\n // endpoint, which only supports user root folder.\n if (nodes.some(node => node.type === FileType.Folder)\n && nodes.some(node => !node.root?.startsWith('/files'))) {\n return false;\n }\n return nodes.every(isDownloadable);\n },\n async exec(node, view, dir) {\n if (node.type === FileType.Folder) {\n downloadNodes(dir, [node]);\n return null;\n }\n triggerDownload(node.source);\n return null;\n },\n async execBatch(nodes, view, dir) {\n if (nodes.length === 1) {\n this.exec(nodes[0], view, dir);\n return [null];\n }\n downloadNodes(dir, nodes);\n return new Array(nodes.length).fill(null);\n },\n order: 30,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { encodePath } from '@nextcloud/paths';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { FileAction, Permission } from '@nextcloud/files';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LaptopSvg from '@mdi/svg/svg/laptop.svg?raw';\nconst openLocalClient = async function (path) {\n const link = generateOcsUrl('apps/files/api/v1') + '/openlocaleditor?format=json';\n try {\n const result = await axios.post(link, { path });\n const uid = getCurrentUser()?.uid;\n let url = `nc://open/${uid}@` + window.location.host + encodePath(path);\n url += '?token=' + result.data.ocs.data.token;\n window.location.href = url;\n }\n catch (error) {\n showError(t('files', 'Failed to redirect to client'));\n }\n};\nexport const action = new FileAction({\n id: 'edit-locally',\n displayName: () => t('files', 'Edit locally'),\n iconSvgInline: () => LaptopSvg,\n // Only works on single files\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n return (nodes[0].permissions & Permission.UPDATE) !== 0;\n },\n async exec(node) {\n openLocalClient(node.path);\n return null;\n },\n order: 25,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateUrl } from '@nextcloud/router';\nimport { Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport StarOutlineSvg from '@mdi/svg/svg/star-outline.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport logger from '../logger.js';\nimport { encodePath } from '@nextcloud/paths';\n// If any of the nodes is not favorited, we display the favorite action.\nconst shouldFavorite = (nodes) => {\n return nodes.some(node => node.attributes.favorite !== 1);\n};\nexport const favoriteNode = async (node, view, willFavorite) => {\n try {\n // TODO: migrate to webdav tags plugin\n const url = generateUrl('/apps/files/api/v1/files') + encodePath(node.path);\n await axios.post(url, {\n tags: willFavorite\n ? [window.OC.TAG_FAVORITE]\n : [],\n });\n // Let's delete if we are in the favourites view\n // AND if it is removed from the user favorites\n // AND it's in the root of the favorites view\n if (view.id === 'favorites' && !willFavorite && node.dirname === '/') {\n emit('files:node:deleted', node);\n }\n // Update the node webdav attribute\n Vue.set(node.attributes, 'favorite', willFavorite ? 1 : 0);\n // Dispatch event to whoever is interested\n if (willFavorite) {\n emit('files:favorites:added', node);\n }\n else {\n emit('files:favorites:removed', node);\n }\n return true;\n }\n catch (error) {\n const action = willFavorite ? 'adding a file to favourites' : 'removing a file from favourites';\n logger.error('Error while ' + action, { error, source: node.source, node });\n return false;\n }\n};\nexport const action = new FileAction({\n id: 'favorite',\n displayName(nodes) {\n return shouldFavorite(nodes)\n ? t('files', 'Add to favorites')\n : t('files', 'Remove from favorites');\n },\n iconSvgInline: (nodes) => {\n return shouldFavorite(nodes)\n ? StarOutlineSvg\n : StarSvg;\n },\n enabled(nodes) {\n // We can only favorite nodes within files and with permissions\n return !nodes.some(node => !node.root?.startsWith?.('/files'))\n && nodes.every(node => node.permissions !== Permission.NONE);\n },\n async exec(node, view) {\n const willFavorite = shouldFavorite([node]);\n return await favoriteNode(node, view, willFavorite);\n },\n async execBatch(nodes, view) {\n const willFavorite = shouldFavorite(nodes);\n return Promise.all(nodes.map(async (node) => await favoriteNode(node, view, willFavorite)));\n },\n order: -50,\n});\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport '@nextcloud/dialogs/style.css';\nimport { Permission } from '@nextcloud/files';\nimport PQueue from 'p-queue';\n// This is the processing queue. We only want to allow 3 concurrent requests\nlet queue;\n/**\n * Get the processing queue\n */\nexport const getQueue = () => {\n if (!queue) {\n queue = new PQueue({ concurrency: 3 });\n }\n return queue;\n};\nexport var MoveCopyAction;\n(function (MoveCopyAction) {\n MoveCopyAction[\"MOVE\"] = \"Move\";\n MoveCopyAction[\"COPY\"] = \"Copy\";\n MoveCopyAction[\"MOVE_OR_COPY\"] = \"move-or-copy\";\n})(MoveCopyAction || (MoveCopyAction = {}));\nexport const canMove = (nodes) => {\n const minPermission = nodes.reduce((min, node) => Math.min(min, node.permissions), Permission.ALL);\n return (minPermission & Permission.UPDATE) !== 0;\n};\nexport const canDownload = (nodes) => {\n return nodes.every(node => {\n const shareAttributes = JSON.parse(node.attributes?.['share-attributes'] ?? '[]');\n return !shareAttributes.some(attribute => attribute.scope === 'permissions' && attribute.enabled === false && attribute.key === 'download');\n });\n};\nexport const canCopy = (nodes) => {\n // For now the only restriction is that a shared file\n // cannot be copied if the download is disabled\n return canDownload(nodes);\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport '@nextcloud/dialogs/style.css';\n// eslint-disable-next-line n/no-extraneous-import\nimport { AxiosError } from 'axios';\nimport { basename, join } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getFilePickerBuilder, showError } from '@nextcloud/dialogs';\nimport { Permission, FileAction, FileType, NodeStatus } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport CopyIconSvg from '@mdi/svg/svg/folder-multiple.svg?raw';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nimport { MoveCopyAction, canCopy, canMove, getQueue } from './moveOrCopyActionUtils';\nimport logger from '../logger';\n/**\n * Return the action that is possible for the given nodes\n * @param {Node[]} nodes The nodes to check against\n * @return {MoveCopyAction} The action that is possible for the given nodes\n */\nconst getActionForNodes = (nodes) => {\n if (canMove(nodes)) {\n if (canCopy(nodes)) {\n return MoveCopyAction.MOVE_OR_COPY;\n }\n return MoveCopyAction.MOVE;\n }\n // Assuming we can copy as the enabled checks for copy permissions\n return MoveCopyAction.COPY;\n};\n/**\n * Handle the copy/move of a node to a destination\n * This can be imported and used by other scripts/components on server\n * @param {Node} node The node to copy/move\n * @param {Folder} destination The destination to copy/move the node to\n * @param {MoveCopyAction} method The method to use for the copy/move\n * @param {boolean} overwrite Whether to overwrite the destination if it exists\n * @return {Promise<void>} A promise that resolves when the copy/move is done\n */\nexport const handleCopyMoveNodeTo = async (node, destination, method, overwrite = false) => {\n if (!destination) {\n return;\n }\n if (destination.type !== FileType.Folder) {\n throw new Error(t('files', 'Destination is not a folder'));\n }\n if (node.dirname === destination.path) {\n throw new Error(t('files', 'This file/folder is already in that directory'));\n }\n if (node.path.startsWith(destination.path)) {\n throw new Error(t('files', 'You cannot move a file/folder onto itself or into a subfolder of itself'));\n }\n const relativePath = join(destination.path, node.basename);\n const destinationUrl = generateRemoteUrl(`dav/files/${getCurrentUser()?.uid}${relativePath}`);\n logger.debug(`${method} ${node.basename} to ${destinationUrl}`);\n // Set loading state\n Vue.set(node, 'status', NodeStatus.LOADING);\n const queue = getQueue();\n return await queue.add(async () => {\n try {\n await axios({\n method: method === MoveCopyAction.COPY ? 'COPY' : 'MOVE',\n url: node.encodedSource,\n headers: {\n Destination: encodeURI(destinationUrl),\n Overwrite: overwrite ? undefined : 'F',\n },\n });\n // If we're moving, update the node\n // if we're copying, we don't need to update the node\n // the view will refresh itself\n if (method === MoveCopyAction.MOVE) {\n // Delete the node as it will be fetched again\n // when navigating to the destination folder\n emit('files:node:deleted', node);\n }\n }\n catch (error) {\n if (error instanceof AxiosError) {\n if (error?.response?.status === 412) {\n throw new Error(t('files', 'A file or folder with that name already exists in this folder'));\n }\n else if (error?.response?.status === 423) {\n throw new Error(t('files', 'The files is locked'));\n }\n else if (error?.response?.status === 404) {\n throw new Error(t('files', 'The file does not exist anymore'));\n }\n else if (error.message) {\n throw new Error(error.message);\n }\n }\n throw new Error();\n }\n finally {\n Vue.set(node, 'status', undefined);\n }\n });\n};\n/**\n * Open a file picker for the given action\n * @param {MoveCopyAction} action The action to open the file picker for\n * @param {string} dir The directory to start the file picker in\n * @param {Node} node The node to move/copy\n * @return {Promise<boolean>} A promise that resolves to true if the action was successful\n */\nconst openFilePickerForAction = async (action, dir = '/', node) => {\n const filePicker = getFilePickerBuilder(t('files', 'Chose destination'))\n .allowDirectories(true)\n .setFilter((n) => {\n // We only want to show folders that we can create nodes in\n return (n.permissions & Permission.CREATE) !== 0\n // We don't want to show the current node in the file picker\n && node.fileid !== n.fileid;\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((nodes, path) => {\n const buttons = [];\n const target = basename(path);\n if (node.dirname === path) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (node.path === path) {\n // You cannot move a file/folder onto itself\n return buttons;\n }\n if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Copy to {target}', { target }) : t('files', 'Copy'),\n type: 'primary',\n icon: CopyIconSvg,\n async callback(destination) {\n try {\n await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.COPY);\n resolve(true);\n }\n catch (error) {\n reject(error);\n }\n },\n });\n }\n if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Move to {target}', { target }) : t('files', 'Move'),\n type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',\n icon: FolderMoveSvg,\n async callback(destination) {\n try {\n await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.MOVE);\n resolve(true);\n }\n catch (error) {\n console.warn('got error', error);\n reject(error);\n }\n },\n });\n }\n return buttons;\n });\n const picker = filePicker.build();\n picker.pick().catch(() => {\n reject(new Error(t('files', 'Cancelled move or copy operation')));\n });\n });\n};\nexport const action = new FileAction({\n id: 'move-copy',\n displayName(nodes) {\n switch (getActionForNodes(nodes)) {\n case MoveCopyAction.MOVE:\n return t('files', 'Move');\n case MoveCopyAction.COPY:\n return t('files', 'Copy');\n case MoveCopyAction.MOVE_OR_COPY:\n return t('files', 'Move or copy');\n }\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // We only support moving/copying files within the user folder\n if (!nodes.every(node => node.root?.startsWith('/files/'))) {\n return false;\n }\n return nodes.length > 0 && (canMove(nodes) || canCopy(nodes));\n },\n async exec(node, view, dir) {\n const action = getActionForNodes([node]);\n try {\n await openFilePickerForAction(action, dir, node);\n return true;\n }\n catch (error) {\n if (error instanceof Error && !!error.message) {\n showError(error.message);\n // Silent action as we handle the toast\n return null;\n }\n return false;\n }\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { join } from 'path';\nimport { Permission, Node, FileType, View, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nexport const action = new FileAction({\n id: 'open-folder',\n displayName(files) {\n // Only works on single node\n const displayName = files[0].attributes.displayName || files[0].basename;\n return t('files', 'Open folder {displayName}', { displayName });\n },\n iconSvgInline: () => FolderSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n return node.type === FileType.Folder\n && (node.permissions & Permission.READ) !== 0;\n },\n async exec(node, view, dir) {\n if (!node || node.type !== FileType.Folder) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir: join(dir, node.basename) });\n return null;\n },\n // Main action if enabled, meaning folders only\n default: DefaultType.HIDDEN,\n order: -100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\n/**\n * TODO: Move away from a redirect and handle\n * navigation straight out of the recent view\n */\nexport const action = new FileAction({\n id: 'open-in-files-recent',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => view.id === 'recent',\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = dir + '/' + node.basename;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport PencilSvg from '@mdi/svg/svg/pencil.svg?raw';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: 'rename',\n displayName: () => t('files', 'Rename'),\n iconSvgInline: () => PencilSvg,\n enabled: (nodes) => {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.UPDATE) !== 0);\n },\n async exec(node) {\n // Renaming is a built-in feature of the files app\n emit('files:node:rename', node);\n return null;\n },\n order: 10,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, FileType, Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nexport const action = new FileAction({\n id: 'view-in-folder',\n displayName() {\n return t('files', 'View in folder');\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n if (node.permissions === Permission.NONE) {\n return false;\n }\n return node.type === FileType.File;\n },\n async exec(node, view, dir) {\n if (!node || node.type !== FileType.File) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n order: 80,\n});\n","import { basename, extname } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Folder } from '@nextcloud/files';\nimport { showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport FolderPlusSvg from '@mdi/svg/svg/folder-plus.svg?raw';\nimport logger from '../logger';\nconst createNewFolder = async (root, name) => {\n const source = root.source + '/' + name;\n const encodedSource = root.encodedSource + '/' + encodeURIComponent(name);\n const response = await axios({\n method: 'MKCOL',\n url: encodedSource,\n headers: {\n Overwrite: 'F',\n },\n });\n return {\n fileid: parseInt(response.headers['oc-fileid']),\n source,\n };\n};\n// TODO: move to @nextcloud/files\nexport const getUniqueName = (name, names) => {\n let newName = name;\n let i = 1;\n while (names.includes(newName)) {\n const ext = extname(name);\n newName = `${basename(name, ext)} (${i++})${ext}`;\n }\n return newName;\n};\nexport const entry = {\n id: 'newFolder',\n displayName: t('files', 'New folder'),\n enabled: (context) => (context.permissions & Permission.CREATE) !== 0,\n iconSvgInline: FolderPlusSvg,\n order: 0,\n async handler(context, content) {\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'New folder'), contentNames);\n const { fileid, source } = await createNewFolder(context, name);\n // Create the folder in the store\n const folder = new Folder({\n source,\n id: fileid,\n mtime: new Date(),\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.ALL,\n root: context?.root || '/files/' + getCurrentUser()?.uid,\n });\n showSuccess(t('files', 'Created new folder \"{name}\"', { name: basename(source) }));\n logger.debug('Created new folder', { folder, source });\n emit('files:node:created', folder);\n emit('files:node:rename', folder);\n },\n};\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = getCurrentUser()?.uid;\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime,\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","import { Folder, getDavNameSpaces, getDavProperties, davGetDefaultPropfind } from '@nextcloud/files';\nimport { getClient } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient();\nconst reportPayload = `<?xml version=\"1.0\"?>\n<oc:filter-files ${getDavNameSpaces()}>\n\t<d:prop>\n\t\t${getDavProperties()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:favorite>1</oc:favorite>\n\t</oc:filter-rules>\n</oc:filter-files>`;\nexport const getContents = async (path = '/') => {\n const propfindPayload = davGetDefaultPropfind();\n // Get root folder\n let rootResponse;\n if (path === '/') {\n rootResponse = await client.stat(path, {\n details: true,\n data: propfindPayload,\n });\n }\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n // Only filter favorites if we're at the root\n data: path === '/' ? reportPayload : propfindPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: path === '/' ? 'REPORT' : 'PROPFIND',\n },\n includeSelf: true,\n });\n const root = rootResponse?.data || contentsResponse.data[0];\n const contents = contentsResponse.data.filter(node => node.filename !== path);\n return {\n folder: resultToNode(root),\n contents: contents.map(resultToNode),\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { basename } from 'path';\nimport { getLanguage, translate as t } from '@nextcloud/l10n';\nimport { loadState } from '@nextcloud/initial-state';\nimport { Node, FileType, View, getNavigation } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport { getContents } from '../services/Favorites';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nexport const generateFolderView = function (folder, index = 0) {\n return new View({\n id: generateIdFromPath(folder),\n name: basename(folder),\n icon: FolderSvg,\n order: index,\n params: {\n dir: folder,\n view: 'favorites',\n },\n parent: 'favorites',\n columns: [],\n getContents,\n });\n};\nexport const generateIdFromPath = function (path) {\n return `favorite-${hashCode(path)}`;\n};\nexport default () => {\n // Load state in function for mock testing purposes\n const favoriteFolders = loadState('files', 'favoriteFolders', []);\n const favoriteFoldersViews = favoriteFolders.map((folder, index) => generateFolderView(folder, index));\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'favorites',\n name: t('files', 'Favorites'),\n caption: t('files', 'List of favorites files and folders.'),\n emptyTitle: t('files', 'No favorites yet'),\n emptyCaption: t('files', 'Files and folders you mark as favorite will show up here'),\n icon: StarSvg,\n order: 5,\n columns: [],\n getContents,\n }));\n favoriteFoldersViews.forEach(view => Navigation.register(view));\n /**\n * Update favourites navigation when a new folder is added\n */\n subscribe('files:favorites:added', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n addPathToFavorites(node.path);\n });\n /**\n * Remove favourites navigation when a folder is removed\n */\n subscribe('files:favorites:removed', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n removePathFromFavorites(node.path);\n });\n /**\n * Sort the favorites paths array and\n * update the order property of the existing views\n */\n const updateAndSortViews = function () {\n favoriteFolders.sort((a, b) => a.localeCompare(b, getLanguage(), { ignorePunctuation: true }));\n favoriteFolders.forEach((folder, index) => {\n const view = favoriteFoldersViews.find(view => view.id === generateIdFromPath(folder));\n if (view) {\n view.order = index;\n }\n });\n };\n // Add a folder to the favorites paths array and update the views\n const addPathToFavorites = function (path) {\n const view = generateFolderView(path);\n // Skip if already exists\n if (favoriteFolders.find(folder => folder === path)) {\n return;\n }\n // Update arrays\n favoriteFolders.push(path);\n favoriteFoldersViews.push(view);\n // Update and sort views\n updateAndSortViews();\n Navigation.register(view);\n };\n // Remove a folder from the favorites paths array and update the views\n const removePathFromFavorites = function (path) {\n const id = generateIdFromPath(path);\n const index = favoriteFolders.findIndex(folder => folder === path);\n // Skip if not exists\n if (index === -1) {\n return;\n }\n // Update arrays\n favoriteFolders.splice(index, 1);\n favoriteFoldersViews.splice(index, 1);\n // Update and sort views\n Navigation.remove(id);\n updateAndSortViews();\n };\n};\n","import { Folder, Permission, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient(generateRemoteUrl('dav'));\nconst lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14));\nconst searchPayload = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${getDavNameSpaces()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${getCurrentUser()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${lastTwoWeeksTimestamp}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\nexport const getContents = async (path = '/') => {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: searchPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: 'SEARCH',\n // Somehow it's needed to get the correct response\n 'Content-Type': 'application/xml; charset=utf-8',\n },\n deep: true,\n });\n const contents = contentsResponse.data;\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n root: rootPath,\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.READ,\n }),\n contents: contents.map(resultToNode),\n };\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"large\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { FileType } from '@nextcloud/files';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nexport const encodeFilePath = function (path) {\n const pathSections = (path.startsWith('/') ? path : `/${path}`).split('/');\n let relativePath = '';\n pathSections.forEach((section) => {\n if (section !== '') {\n relativePath += '/' + encodeURIComponent(section);\n }\n });\n return relativePath;\n};\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nexport const extractFilePaths = function (path) {\n const pathSections = path.split('/');\n const fileName = pathSections[pathSections.length - 1];\n const dirPath = pathSections.slice(0, pathSections.length - 1).join('/');\n return [dirPath, fileName];\n};\n/**\n * Generate a translated summary of an array of nodes\n * @param {Node[]} nodes the nodes to summarize\n * @return {string}\n */\nexport const getSummaryFor = (nodes) => {\n const fileCount = nodes.filter(node => node.type === FileType.File).length;\n const folderCount = nodes.filter(node => node.type === FileType.Folder).length;\n if (fileCount === 0) {\n return n('files', '{folderCount} folder', '{folderCount} folders', folderCount, { folderCount });\n }\n else if (folderCount === 0) {\n return n('files', '{fileCount} file', '{fileCount} files', fileCount, { fileCount });\n }\n if (fileCount === 1) {\n return n('files', '1 file and {folderCount} folder', '1 file and {folderCount} folders', folderCount, { folderCount });\n }\n if (folderCount === 1) {\n return n('files', '{fileCount} file and 1 folder', '{fileCount} files and 1 folder', fileCount, { fileCount });\n }\n return t('files', '{fileCount} files and {folderCount} folders', { fileCount, folderCount });\n};\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"template-picker__item\">\n\t\t<input :id=\"id\"\n\t\t\t:checked=\"checked\"\n\t\t\ttype=\"radio\"\n\t\t\tclass=\"radio\"\n\t\t\tname=\"template-picker\"\n\t\t\t@change=\"onCheck\">\n\n\t\t<label :for=\"id\" class=\"template-picker__label\">\n\t\t\t<div class=\"template-picker__preview\"\n\t\t\t\t:class=\"failedPreview ? 'template-picker__preview--failed' : ''\">\n\t\t\t\t<img class=\"template-picker__image\"\n\t\t\t\t\t:src=\"realPreviewUrl\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tdraggable=\"false\"\n\t\t\t\t\t@error=\"onFailure\">\n\t\t\t</div>\n\n\t\t\t<span class=\"template-picker__title\">\n\t\t\t\t{{ nameWithoutExt }}\n\t\t\t</span>\n\t\t</label>\n\t</li>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport { encodeFilePath } from '../utils/fileUtils.ts'\nimport { getToken, isPublic } from '../utils/davUtils.js'\n\n// preview width generation\nconst previewWidth = 256\n\nexport default {\n\tname: 'TemplatePreview',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tbasename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tchecked: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpreviewUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\thasPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tratio: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tfailedPreview: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename\n\t\t},\n\n\t\tid() {\n\t\t\treturn `template-picker-${this.fileid}`\n\t\t},\n\n\t\trealPreviewUrl() {\n\t\t\t// If original preview failed, fallback to mime icon\n\t\t\tif (this.failedPreview && this.mimeIcon) {\n\t\t\t\treturn this.mimeIcon\n\t\t\t}\n\n\t\t\tif (this.previewUrl) {\n\t\t\t\treturn this.previewUrl\n\t\t\t}\n\t\t\t// TODO: find a nicer standard way of doing this?\n\t\t\tif (isPublic()) {\n\t\t\t\treturn generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodeFilePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t\t}\n\t\t\treturn generateUrl(`/core/preview?fileId=${this.fileid}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t},\n\n\t\tmimeIcon() {\n\t\t\treturn OC.MimeType.getIconUrl(this.mime)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonCheck() {\n\t\t\tthis.$emit('check', this.fileid)\n\t\t},\n\t\tonFailure() {\n\t\t\tthis.failedPreview = true\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n</style>\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=0859a92c&scoped=true\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0859a92c\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"","/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=48121b39&scoped=true\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"48121b39\",\n null\n \n)\n\nexport default component.exports","import { Folder, Node, Permission, addNewFileMenuEntry, removeNewFileMenuEntry } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getLoggerBuilder } from '@nextcloud/logger';\nimport { join } from 'path';\nimport { loadState } from '@nextcloud/initial-state';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport PlusSvg from '@mdi/svg/svg/plus.svg?raw';\nimport TemplatePickerView from './views/TemplatePicker.vue';\nimport { getUniqueName } from './newMenu/newFolder';\nimport { getCurrentUser } from '@nextcloud/auth';\n// Set up logger\nconst logger = getLoggerBuilder()\n .setApp('files')\n .detectUser()\n .build();\n// Add translates functions\nVue.mixin({\n methods: {\n t,\n n,\n },\n});\n// Create document root\nconst TemplatePickerRoot = document.createElement('div');\nTemplatePickerRoot.id = 'template-picker';\ndocument.body.appendChild(TemplatePickerRoot);\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', []);\nlet templatesPath = loadState('files', 'templates_path', false);\nlogger.debug('Templates providers', templates);\nlogger.debug('Templates folder', { templatesPath });\n// Init vue app\nconst View = Vue.extend(TemplatePickerView);\nconst TemplatePicker = new View({\n name: 'TemplatePicker',\n propsData: {\n logger,\n },\n});\nTemplatePicker.$mount('#template-picker');\nif (!templatesPath) {\n logger.debug('Templates folder not initialized');\n addNewFileMenuEntry({\n id: 'template-picker',\n displayName: t('files', 'Create new templates folder'),\n iconSvgInline: PlusSvg,\n order: 10,\n enabled(context) {\n // Allow creation on your own folders only\n if (context.owner !== getCurrentUser()?.uid) {\n return false;\n }\n return (context.permissions & Permission.CREATE) !== 0;\n },\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'Templates'), contentNames);\n // Create the template folder\n initTemplatesFolder(context, name);\n // Remove the menu entry\n removeNewFileMenuEntry('template-picker');\n },\n });\n}\n// Init template files menu\ntemplates.forEach((provider, index) => {\n addNewFileMenuEntry({\n id: `template-new-${provider.app}-${index}`,\n displayName: provider.label,\n // TODO: migrate to inline svg\n iconClass: provider.iconClass || 'icon-file',\n enabled(context) {\n return (context.permissions & Permission.CREATE) !== 0;\n },\n order: 11,\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(provider.label + provider.extension, contentNames);\n // Create the file\n TemplatePicker.open(name, provider);\n },\n });\n});\n// Init template folder\nconst initTemplatesFolder = async function (directory, name) {\n const templatePath = join(directory.path, name);\n try {\n logger.debug('Initializing the templates directory', { templatePath });\n const response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n templatePath,\n copySystemTemplates: true,\n });\n // Go to template directory\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: undefined }, { dir: templatePath });\n templates = response.data.ocs.data.templates;\n templatesPath = response.data.ocs.data.template_path;\n }\n catch (error) {\n logger.error('Unable to initialize the templates directory');\n showError(t('files', 'Unable to initialize the templates directory'));\n }\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport MenuIcon from '@mdi/svg/svg/sun-compass.svg?raw';\nimport { FileAction, addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as deleteAction } from './actions/deleteAction';\nimport { action as downloadAction } from './actions/downloadAction';\nimport { action as editLocallyAction } from './actions/editLocallyAction';\nimport { action as favoriteAction } from './actions/favoriteAction';\nimport { action as moveOrCopyAction } from './actions/moveOrCopyAction';\nimport { action as openFolderAction } from './actions/openFolderAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { action as renameAction } from './actions/renameAction';\nimport { action as sidebarAction } from './actions/sidebarAction';\nimport { action as viewInFolderAction } from './actions/viewInFolderAction';\nimport { entry as newFolderEntry } from './newMenu/newFolder';\nimport registerFavoritesView from './views/favorites';\nimport registerRecentView from './views/recent';\nimport registerFilesView from './views/files';\nimport registerPreviewServiceWorker from './services/ServiceWorker.js';\nimport './init-templates';\nimport { initLivePhotos } from './services/LivePhotos';\n// Register file actions\nregisterFileAction(deleteAction);\nregisterFileAction(downloadAction);\nregisterFileAction(editLocallyAction);\nregisterFileAction(favoriteAction);\nregisterFileAction(moveOrCopyAction);\nregisterFileAction(openFolderAction);\nregisterFileAction(openInFilesAction);\nregisterFileAction(renameAction);\nregisterFileAction(sidebarAction);\nregisterFileAction(viewInFolderAction);\n// Register new menu entry\naddNewFileMenuEntry(newFolderEntry);\n// Register files views\nregisterFavoritesView();\nregisterFilesView();\nregisterRecentView();\n// Register preview service worker\nregisterPreviewServiceWorker();\nregisterDavProperty('nc:hidden', { nc: 'http://nextcloud.org/ns' });\ninitLivePhotos();\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport { getContents } from '../services/Files';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'files',\n name: t('files', 'All files'),\n caption: t('files', 'List of your files and folders.'),\n icon: FolderSvg,\n order: 0,\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport HistorySvg from '@mdi/svg/svg/history.svg?raw';\nimport { getContents } from '../services/Recent';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'recent',\n name: t('files', 'Recent'),\n caption: t('files', 'List of recently modified files and folders.'),\n emptyTitle: t('files', 'No recently modified files'),\n emptyCaption: t('files', 'Files and folders you recently modified will show up here.'),\n icon: HistorySvg,\n order: 2,\n defaultSortKey: 'mtime',\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { generateUrl } from '@nextcloud/router'\nimport logger from '../logger.js'\n\nexport default () => {\n\tif ('serviceWorker' in navigator) {\n\t\t// Use the window load event to keep the page load performant\n\t\twindow.addEventListener('load', async () => {\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/files/preview-service-worker.js', {}, { noRewrite: true })\n\t\t\t\tconst registration = await navigator.serviceWorker.register(url, { scope: '/' })\n\t\t\t\tlogger.debug('SW registered: ', { registration })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('SW registration failed: ', { error })\n\t\t\t}\n\t\t})\n\t} else {\n\t\tlogger.debug('Service Worker is not enabled on this browser.')\n\t}\n}\n","/**\n * @copyright Copyright (c) 2023 Louis Chmn <louis@chmn.me>\n *\n * @author Louis Chmn <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, registerDavProperty } from '@nextcloud/files';\nexport function initLivePhotos() {\n registerDavProperty('nc:metadata-files-live-photo', { nc: 'http://nextcloud.org/ns' });\n}\n/**\n * @param {Node} node - The node\n */\nexport function isLivePhoto(node) {\n return node.attributes['metadata-files-live-photo'] !== undefined;\n}\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-24eb3c55] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-24eb3c55] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-24eb3c55] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-24eb3c55]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-24eb3c55] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-24eb3c55] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-24eb3c55] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-4297db37] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-4297db37] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-4297db37] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-4297db37] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-4297db37] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-4297db37] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-4297db37] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-4297db37] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-4297db37] {\n width: 120px;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-fcfd0f23] {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: .5rem;\n min-width: 200px;\n padding-block: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-fcfd0f23] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-fcfd0f23] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-fcfd0f23] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-b63d952f] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-b63d952f] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-b63d952f] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-b63d952f] {\n box-sizing: border-box;\n}\n[data-v-b63d952f] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-b63d952f] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-b63d952f] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@nextcloud/dialogs/dist/style.css\"],\"names\":[],\"mappings\":\"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAAiR;EACjR,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAiU;AACnU;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,wBAAwB;EACxB,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,mBAAmB;AACrB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,wBAAwB;AAC1B;AACA;EACE;IACE,yDAAyD;EAC3D;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB\",\"sourcesContent\":[\"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\\n *\\n * @author Julius Härtl <jus@bitgrid.net>\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n */\\n.toastify.dialogs {\\n min-width: 200px;\\n background: none;\\n background-color: var(--color-main-background);\\n color: var(--color-main-text);\\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\\n padding: 0 12px;\\n margin-top: 45px;\\n position: fixed;\\n z-index: 10100;\\n border-radius: var(--border-radius);\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-container {\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-button,\\n.toastify.dialogs .toast-close {\\n position: static;\\n overflow: hidden;\\n box-sizing: border-box;\\n min-width: 44px;\\n height: 100%;\\n padding: 12px;\\n white-space: nowrap;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-color: transparent;\\n min-height: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close,\\n.toastify.dialogs .toast-close.toast-close {\\n text-indent: 0;\\n opacity: .4;\\n border: none;\\n min-height: 44px;\\n margin-left: 10px;\\n font-size: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close:before,\\n.toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);\\n content: \\\" \\\";\\n filter: var(--background-invert-if-dark);\\n display: inline-block;\\n width: 16px;\\n height: 16px;\\n}\\n.toastify.dialogs .toast-undo-button.toast-undo-button,\\n.toastify.dialogs .toast-close.toast-undo-button {\\n height: calc(100% - 6px);\\n margin: 3px 3px 3px 12px;\\n}\\n.toastify.dialogs .toast-undo-button:hover,\\n.toastify.dialogs .toast-undo-button:focus,\\n.toastify.dialogs .toast-undo-button:active,\\n.toastify.dialogs .toast-close:hover,\\n.toastify.dialogs .toast-close:focus,\\n.toastify.dialogs .toast-close:active {\\n cursor: pointer;\\n opacity: 1;\\n}\\n.toastify.dialogs.toastify-top {\\n right: 10px;\\n}\\n.toastify.dialogs.toast-with-click {\\n cursor: pointer;\\n}\\n.toastify.dialogs.toast-error {\\n border-left: 3px solid var(--color-error);\\n}\\n.toastify.dialogs.toast-info {\\n border-left: 3px solid var(--color-primary);\\n}\\n.toastify.dialogs.toast-warning {\\n border-left: 3px solid var(--color-warning);\\n}\\n.toastify.dialogs.toast-success,\\n.toastify.dialogs.toast-undo {\\n border-left: 3px solid var(--color-success);\\n}\\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=);\\n}\\n._file-picker__file-icon_1vgv4_5 {\\n width: 32px;\\n height: 32px;\\n min-width: 32px;\\n min-height: 32px;\\n background-repeat: no-repeat;\\n background-size: contain;\\n display: flex;\\n justify-content: center;\\n}\\ntr.file-picker__row[data-v-6aded0d9] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-6aded0d9] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\\n padding-inline: 2px 0;\\n}\\n@keyframes gradient-6aded0d9 {\\n 0% {\\n background-position: 0% 50%;\\n }\\n 50% {\\n background-position: 100% 50%;\\n }\\n to {\\n background-position: 0% 50%;\\n }\\n}\\n.loading-row .row-checkbox[data-v-6aded0d9] {\\n text-align: center !important;\\n}\\n.loading-row span[data-v-6aded0d9] {\\n display: inline-block;\\n height: 24px;\\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\\n background-size: 600px 100%;\\n border-radius: var(--border-radius);\\n animation: gradient-6aded0d9 12s ease infinite;\\n}\\n.loading-row .row-wrapper[data-v-6aded0d9] {\\n display: inline-flex;\\n align-items: center;\\n}\\n.loading-row .row-checkbox span[data-v-6aded0d9] {\\n width: 24px;\\n}\\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\\n margin-inline-start: 6px;\\n width: 130px;\\n}\\n.loading-row .row-size span[data-v-6aded0d9] {\\n width: 80px;\\n}\\n.loading-row .row-modified span[data-v-6aded0d9] {\\n width: 90px;\\n}\\ntr.file-picker__row[data-v-24eb3c55] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-24eb3c55] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-24eb3c55]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-24eb3c55] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-24eb3c55] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-24eb3c55] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-24eb3c55]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-24eb3c55] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-24eb3c55] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-24eb3c55] {\\n color: var(--color-text-maxcontrast);\\n min-width: fit-content;\\n}\\n.file-picker__header-preview[data-v-4297db37] {\\n width: 22px;\\n height: 32px;\\n flex: 0 0 auto;\\n}\\n.file-picker__files[data-v-4297db37] {\\n margin: 2px;\\n margin-inline-start: 12px;\\n overflow: scroll auto;\\n}\\n.file-picker__files table[data-v-4297db37] {\\n width: 100%;\\n max-height: 100%;\\n table-layout: fixed;\\n}\\n.file-picker__files th[data-v-4297db37] {\\n position: -webkit-sticky;\\n position: sticky;\\n z-index: 1;\\n top: 0;\\n background-color: var(--color-main-background);\\n padding: 2px;\\n}\\n.file-picker__files th .header-wrapper[data-v-4297db37] {\\n display: flex;\\n}\\n.file-picker__files th.row-checkbox[data-v-4297db37] {\\n width: 44px;\\n}\\n.file-picker__files th.row-name[data-v-4297db37] {\\n width: 230px;\\n}\\n.file-picker__files th.row-size[data-v-4297db37] {\\n width: 100px;\\n}\\n.file-picker__files th.row-modified[data-v-4297db37] {\\n width: 120px;\\n}\\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue__wrapper {\\n justify-content: start;\\n flex-direction: row-reverse;\\n}\\n.file-picker__files th[data-v-4297db37]:not(.row-size) .button-vue {\\n padding-inline: 16px 4px;\\n}\\n.file-picker__files th.row-size[data-v-4297db37] .button-vue__wrapper {\\n justify-content: end;\\n}\\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper {\\n color: var(--color-text-maxcontrast);\\n}\\n.file-picker__files th[data-v-4297db37] .button-vue__wrapper .button-vue__text {\\n font-weight: 400;\\n}\\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\\n flex-grow: 0 !important;\\n}\\n.file-picker__side[data-v-fcfd0f23] {\\n display: flex;\\n flex-direction: column;\\n align-items: start;\\n gap: .5rem;\\n min-width: 200px;\\n padding-block: 2px;\\n overflow: auto;\\n}\\n.file-picker__side[data-v-fcfd0f23] .button-vue__wrapper {\\n justify-content: start;\\n}\\n.file-picker__filter-input[data-v-fcfd0f23] {\\n margin-block: 7px;\\n max-width: 260px;\\n}\\n@media (max-width: 736px) {\\n .file-picker__side[data-v-fcfd0f23] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__side[data-v-fcfd0f23] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n .file-picker__filter-input[data-v-fcfd0f23] {\\n max-width: unset;\\n }\\n}\\n.file-picker__navigation {\\n padding-inline: 2px;\\n}\\n.file-picker__navigation,\\n.file-picker__navigation * {\\n box-sizing: border-box;\\n}\\n.file-picker__navigation .v-select.select {\\n min-width: 220px;\\n}\\n@media (min-width: 513px) and (max-width: 736px) {\\n .file-picker__navigation {\\n gap: 11px;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__navigation {\\n flex-direction: column-reverse !important;\\n }\\n}\\n.file-picker__view[data-v-b63d952f] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-b63d952f] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-b63d952f] {\\n box-sizing: border-box;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n min-height: 0;\\n flex: 1;\\n padding-inline: 2px;\\n}\\n.file-picker__main *[data-v-b63d952f] {\\n box-sizing: border-box;\\n}\\n[data-v-b63d952f] .file-picker {\\n height: min(80vh, 800px);\\n}\\n@media (max-width: 512px) {\\n [data-v-b63d952f] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area));\\n }\\n}\\n[data-v-b63d952f] .file-picker__content {\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TemplatePreview.vue\"],\"names\":[],\"mappings\":\"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA\",\"sourcesContent\":[\"\\n\\n.template-picker {\\n\\t&__item {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__label {\\n\\t\\tdisplay: flex;\\n\\t\\t// Align in the middle of the grid\\n\\t\\talign-items: center;\\n\\t\\tflex: 1 1;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&, * {\\n\\t\\t\\tcursor: pointer;\\n\\t\\t\\tuser-select: none;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tdisplay: none !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__preview {\\n\\t\\tdisplay: block;\\n\\t\\toverflow: hidden;\\n\\t\\t// Stretch so all entries are the same width\\n\\t\\tflex: 1 1;\\n\\t\\twidth: var(--width);\\n\\t\\tmin-height: var(--height);\\n\\t\\tmax-height: var(--height);\\n\\t\\tpadding: 0;\\n\\t\\tborder: var(--border) solid var(--color-border);\\n\\t\\tborder-radius: var(--border-radius-large);\\n\\n\\t\\tinput:checked + label > & {\\n\\t\\t\\tborder-color: var(--color-primary-element);\\n\\t\\t}\\n\\n\\t\\t&--failed {\\n\\t\\t\\t// Make sure to properly center fallback icon\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t}\\n\\n\\t&__image {\\n\\t\\tmax-width: 100%;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\n\\t\\tobject-fit: cover;\\n\\t}\\n\\n\\t// Failed preview, fallback to mime icon\\n\\t&__preview--failed &__image {\\n\\t\\twidth: calc(var(--margin) * 8);\\n\\t\\t// Center mime icon\\n\\t\\tmargin: auto;\\n\\t\\tbackground-color: transparent !important;\\n\\n\\t\\tobject-fit: initial;\\n\\t}\\n\\n\\t&__title {\\n\\t\\toverflow: hidden;\\n\\t\\t// also count preview border\\n\\t\\tmax-width: calc(var(--width) + 2*2px);\\n\\t\\tpadding: var(--margin);\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/TemplatePicker.vue\"],\"names\":[],\"mappings\":\"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA\",\"sourcesContent\":[\"\\n.templates-picker {\\n\\t&__form {\\n\\t\\tpadding: calc(var(--margin) * 2);\\n\\t\\t// Will be handled by the buttons\\n\\t\\tpadding-bottom: 0;\\n\\n\\t\\th2 {\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tmargin: var(--margin) 0 calc(var(--margin) * 2);\\n\\t\\t}\\n\\t}\\n\\n\\t&__list {\\n\\t\\tdisplay: grid;\\n\\t\\tgrid-gap: calc(var(--margin) * 2);\\n\\t\\tgrid-auto-columns: 1fr;\\n\\t\\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\\n\\t\\tmax-width: calc(var(--fullwidth) * 6);\\n\\t\\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\\n\\t\\t// Make sure all rows are the same height\\n\\t\\tgrid-auto-rows: 1fr;\\n\\t\\t// Center the columns set\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&__buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: end;\\n\\t\\tpadding: calc(var(--margin) * 2) var(--margin);\\n\\t\\tposition: sticky;\\n\\t\\tbottom: 0;\\n\\t\\tbackground-image: linear-gradient(0, var(--gradient-main-background));\\n\\n\\t\\tbutton, input[type='submit'] {\\n\\t\\t\\theight: 44px;\\n\\t\\t}\\n\\t}\\n\\n\\t// Make sure we're relative for the loading emptycontent on top\\n\\t::v-deep .modal-container {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__loading {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tjustify-content: center;\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t\\tmargin: 0;\\n\\t\\tbackground-color: var(--color-main-background-translucent);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","module.exports = require('events').EventEmitter;\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/lib/_stream_readable.js');\nStream.Writable = require('readable-stream/lib/_stream_writable.js');\nStream.Duplex = require('readable-stream/lib/_stream_duplex.js');\nStream.Transform = require('readable-stream/lib/_stream_transform.js');\nStream.PassThrough = require('readable-stream/lib/_stream_passthrough.js');\nStream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js')\nStream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js')\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n const r = this.source.indexOf(this.root);\n return I(this.source.slice(r + this.root.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n const t = this.source.indexOf(this.root);\n return this.source.slice(t + this.root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n const t = ge(e);\n function r(n) {\n t.setHeaders({\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: n ?? \"\"\n });\n }\n return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n const d = i.headers;\n return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n }), t;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":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\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar B = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nB.buildOptions = Se;\nB.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar Be = Me;\nconst ke = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (ke.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = k.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return k.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = B, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '
'\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"</\" + t + this.tagEndChar, i = \"\";\n return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `<!--${e}-->` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n if (e && e.length > 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst Bt = S, kt = At, qt = Mt;\nvar W = {\n XMLParser: kt,\n XMLValidator: Bt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"2048\":\"78a82614529a3cefcde7\",\"4180\":\"fe82f3a2dac70d6b82bc\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9837;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9837: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(34507)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","action","FileAction","id","displayName","nodes","view","t","iconSvgInline","enabled","length","map","node","permissions","every","permission","Permission","DELETE","exec","axios","delete","encodedSource","emit","error","logger","source","execBatch","dir","Promise","all","this","order","triggerDownload","url","hiddenElement","document","createElement","download","href","click","downloadNodes","secret","Math","random","toString","substring","generateUrl","files","JSON","stringify","basename","isDownloadable","READ","attributes","downloadAttribute","parse","find","attribute","scope","key","undefined","some","type","FileType","Folder","root","startsWith","async","Array","fill","UPDATE","path","link","generateOcsUrl","result","post","uid","getCurrentUser","window","location","host","encodePath","data","ocs","token","showError","openLocalClient","shouldFavorite","favorite","favoriteNode","willFavorite","tags","OC","TAG_FAVORITE","dirname","Vue","StarSvg","NONE","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","queue","getQueue","PQueue","concurrency","MoveCopyAction","canMove","reduce","min","ALL","canCopy","canDownload","getActionForNodes","MOVE_OR_COPY","MOVE","COPY","handleCopyMoveNodeTo","destination","method","overwrite","arguments","Error","relativePath","join","destinationUrl","generateRemoteUrl","debug","NodeStatus","LOADING","add","headers","Destination","encodeURI","Overwrite","response","status","message","FolderMoveSvg","filePicker","getFilePickerBuilder","allowDirectories","setFilter","n","CREATE","fileid","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","buttons","target","push","label","icon","CopyIconSvg","callback","console","warn","pick","catch","openFilePickerForAction","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","getUniqueName","name","names","newName","i","includes","ext","extname","entry","context","handler","content","contentNames","encodeURIComponent","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","original","methods","final","HotPatcher","constructor","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","allowTargetOverrides","Object","keys","forEach","foreignKey","hasOwnProperty","assign","execute","args","get","item","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","replace","uri","indexOf","slice","toUpperCase","qop","test","ncString","nc","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","opaque","authHeader","k","obj","prototype","call","getPrototypeOf","proto","isPlainObject","setPrototypeOf","merge","output","items","nextItem","mergeObjects","obj1","obj2","isArray","headerPayloads","headerKeys","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","value","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","defaultRootUrl","getClient","rootUrl","client","createClient","requesttoken","getRequestToken","getPatcher","_digest","hasDigestAuth","Authorization","split","re","match","floor","makeNonce","parseDigestAuth","response2","request","hashCode","str","a","b","charCodeAt","resultToNode","props","davParsePermissions","filename","nodeData","lastmod","mime","size","hasPreview","failed","reportPayload","getDavNameSpaces","getDavProperties","getContents","propfindPayload","davGetDefaultPropfind","rootResponse","stat","details","contentsResponse","getDirectoryContents","includeSelf","contents","filter","generateFolderView","index","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","searchPayload","inheritAttrs","String","required","checked","Boolean","Number","previewUrl","ratio","failedPreview","computed","nameWithoutExt","realPreviewUrl","mimeIcon","getElementById","pathSections","section","encodeFilePath","MimeType","getIconUrl","onCheck","$emit","onFailure","_vm","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","extend","components","NcEmptyContent","NcModal","TemplatePreview","loading","opened","provider","extension","emptyTemplate","mimetypes","selectedTemplate","templates","template","style","width","margin","border","fetchedProvider","getTemplates","app","onSubmit","close","currentDirectory","URL","searchParams","fileInfo","filePath","templatePath","templateType","createFromTemplate","normalize","openfile","_setupProxy","$event","preventDefault","stopPropagation","_b","_l","_e","mixin","TemplatePickerRoot","appendChild","loadState","templatesPath","TemplatePicker","TemplatePickerView","propsData","$mount","addNewFileMenuEntry","initTemplatesFolder","removeNewFileMenuEntry","iconClass","directory","copySystemTemplates","template_path","registerFileAction","deleteAction","downloadAction","editLocallyAction","favoriteAction","moveOrCopyAction","openFolderAction","openInFilesAction","renameAction","sidebarAction","viewInFolderAction","newFolderEntry","favoriteFolders","favoriteFoldersViews","Navigation","getNavigation","register","caption","emptyTitle","emptyCaption","subscribe","addPathToFavorites","removePathFromFavorites","updateAndSortViews","sort","localeCompare","getLanguage","ignorePunctuation","findIndex","splice","remove","registerFavoritesView","controller","AbortController","CancelablePromise","onCancel","abort","defaultSortKey","deep","navigator","addEventListener","noRewrite","registration","serviceWorker","registerDavProperty","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","o","p","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","valueOf","e","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","it","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","s","done","f","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","set","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","onfinally","runWhenCanceled","finally","callbacks","_step","_iterator","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_URL_IMPORT_0___","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","ReflectOwnKeys","R","ReflectApply","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","concat","NumberIsNaN","isNaN","EventEmitter","init","once","emitter","errorListener","removeListener","resolver","eventTargetAgnosticAddListener","flags","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","m","events","existing","warning","newListener","unshift","warned","w","count","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","ret","unwrapListeners","arrayClone","listenerCount","copy","wrapListener","removeEventListener","RangeError","setMaxListeners","getMaxListeners","doError","er","listeners","addListener","prependListener","prependOnceListener","list","position","originalListener","pop","spliceOne","off","removeAllListeners","rawListeners","eventNames","http","https","validateParams","cb","codes","createErrorType","code","Base","NodeError","_Base","arg1","arg2","arg3","getMessage","oneOf","expected","thing","actual","determiner","search","msg","start","substr","this_len","endsWith","objectKeys","Duplex","Readable","Writable","v","allowHalfOpen","readable","onend","_writableState","ended","process","nextTick","onEndNT","end","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","chunk","encoding","ReadableState","EElistenerCount","Stream","Buffer","OurUint8Array","g","Uint8Array","debugUtil","debuglog","StringDecoder","createReadableStreamAsyncIterator","BufferList","destroyImpl","getHighWaterMark","_require$codes","ERR_INVALID_ARG_TYPE","ERR_STREAM_PUSH_AFTER_EOF","ERR_METHOD_NOT_IMPLEMENTED","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","errorOrDestroy","kProxyEvents","stream","isDuplex","objectMode","readableObjectMode","buffer","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","decoder","read","_read","destroy","_destroy","readableAddChunk","addToFront","skipChunkCheck","emitReadable","emitReadable_","onEofChunk","chunkInvalid","_uint8ArrayToBuffer","addChunk","write","maybeReadMore","_undestroy","undestroy","isPaused","setEncoding","enc","head","clear","MAX_HWM","howMuchToRead","computeNewHighWaterMark","flow","maybeReadMore_","updateReadableListening","resume","nReadingNextTick","resume_","fromList","first","consume","endReadable","endReadableNT","wState","finished","xs","x","l","nOrig","doRead","pipe","dest","pipeOpts","src","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","onerror","ondata","cleanedUp","needDrain","pipeOnDrain","pause","event","fn","dests","ev","res","wrap","asyncIterator","_fromList","ERR_MULTIPLE_CALLBACK","ERR_TRANSFORM_ALREADY_TRANSFORMING","ERR_TRANSFORM_WITH_LENGTH_0","afterTransform","ts","_transformState","transforming","writecb","writechunk","rs","needTransform","writeencoding","transform","flush","_flush","prefinish","_write","err2","CorkedRequest","finish","corkReq","pendingcb","onCorkedFinish","corkedRequestsFree","WritableState","realHasInstance","internalUtil","deprecate","ERR_STREAM_CANNOT_PIPE","ERR_STREAM_DESTROYED","ERR_STREAM_NULL_VALUES","ERR_STREAM_WRITE_AFTER_END","ERR_UNKNOWN_ENCODING","nop","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","writev","_writev","_final","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","rState","current","out","_","hasInstance","object","writeAfterEnd","validChunk","newChunk","decodeChunk","last","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_Object$setPrototypeO","input","hint","prim","toPrimitive","_toPrimitive","_toPropertyKey","kLastResolve","kLastReject","kError","kEnded","kLastPromise","kHandlePromise","kStream","createIterResult","readAndResolve","iter","onReadable","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","lastPromise","wrapForNext","_this2","_Object$create","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","_objectSpread","getOwnPropertyDescriptors","defineProperties","inspect","custom","tail","alloc","offset","allocUnsafe","hasStrings","_getString","_getBuffer","c","nb","buf","depth","customInspect","emitErrorAndCloseNT","emitErrorNT","emitCloseNT","readableDestroyed","writableDestroyed","ERR_STREAM_PREMATURE_CLOSE","noop","eos","called","_len","_key","onlegacyfinish","writableEnded","readableEnded","onrequest","req","setHeader","isRequest","ERR_MISSING_ARGS","to","streams","popCallback","destroys","closed","destroyer","ERR_INVALID_OPT_VALUE","duplexKey","hwm","highWaterMarkFrom","isFinite","pipeline","copyProps","dst","SafeBuffer","encodingOrOffset","allocUnsafeSlow","SlowBuffer","EE","inherits","_isStdio","didOnEnd","cleanup","ClientRequest","statusCodes","defaultProtocol","hostname","port","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","_fetchAbortController","requestTimeout","_fetchResponse","_resetTimers","_connect","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","send","statusValid","clearTimeout","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","_resumeFetch","pipeTo","reader","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","responseText","newData","MSStreamReader","byteLength","onload","readAsArrayBuffer","isEncoding","nenc","retried","_normalizeEncoding","normalizeEncoding","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","r","utf8CheckExtraBytes","total","j","utf8CheckIncomplete","config","localStorage","val","trace","setUid","Ne","_entries","registerEntry","validateEntry","unregisterEntry","getEntryIndex","entries","getEntries","_nc_newfilemenu","C","P","Yt","log","d","pow","toFixed","parseFloat","toLocaleString","Z","DEFAULT","Qt","_action","validateAction","title","inline","renderInline","values","Dt","_nc_fileactions","N","SHARE","Y","oc","ir","_nc_dav_properties","_nc_dav_namespaces","prop","namespaces","V","L","sr","or","be","J","X","crtime","Q","NEW","FAILED","LOCKED","D","_data","_attributes","_knownDavService","updateMtime","deleteProperty","origin","pathname","move","rename","ye","super","ee","te","ur","setHeaders","dr","ve","getcontentlength","Te","_views","_currentView","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","render","summary","S","O","RegExp","isExist","u","isEmptyObject","getValue","isName","getAllMatches","startIndex","lastIndex","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","z","validate","trim","Re","xe","H","line","tagClosed","tagName","tagStartPos","col","Ve","Ce","Pe","$e","Le","Fe","B","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","T","tagname","child","addChild","tt","entityName","regx","entities","rt","skipLike","De","lastEntities","regex","st","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","lt","ft","ampEntity","ct","ht","pt","gt","ne","ie","Nt","bt","Et","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","arrayNodeName","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","emptyView","sticky","expanded","Xt","hr","pr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","definition","chunkId","promises","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","onScriptComplete","prev","doneFns","parentNode","removeChild","nmd","paths","children","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file |