From fe631fad083e1d8ec79f67ab551c49c716ad2882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 14 Dec 2023 15:35:52 +0100 Subject: [PATCH] fix(files): fix download file encoded source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ Signed-off-by: nextcloud-command --- apps/files/src/actions/downloadAction.ts | 2 +- dist/files-init.js | 4 ++-- dist/files-init.js.map | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files/src/actions/downloadAction.ts b/apps/files/src/actions/downloadAction.ts index 0d8bfb7dfc242..5afec375e9951 100644 --- a/apps/files/src/actions/downloadAction.ts +++ b/apps/files/src/actions/downloadAction.ts @@ -84,7 +84,7 @@ export const action = new FileAction({ return null } - triggerDownload(node.source) + triggerDownload(node.encodedSource) return null }, diff --git a/dist/files-init.js b/dist/files-init.js index 3d34f1f03dc6d..a61832b09af5f 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:()=>'',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:()=>'',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:()=>'',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='',_=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)?'':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),ue=e=>de(e)?ce(e)?le.MOVE_OR_COPY:le.MOVE:le.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(t.path.startsWith(e.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),d=(0,u.generateRemoteUrl)(`dav/files/${(0,A.ts)()?.uid}${l}`);w.default.set(e,"status",i.e4.LOADING);const c=se();return await c.add((async()=>{try{await(0,s.Z)({method:n===le.COPY?"COPY":"MOVE",url:e.encodedSource,headers:{Destination:encodeURI(d),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)}}))},pe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const r=n.map((e=>e.fileid)).filter(Boolean),o=(0,v.fn)((0,a.Iu)("files","Chose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&i.y3.CREATE)&&!r.includes(e.fileid))).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,r)=>{o.setButtonFactory(((r,i)=>{const o=[],s=(0,ne.basename)(i),l=n.map((e=>e.dirname)),d=n.map((e=>e.path));return l.includes(i)||d.includes(i)||(e!==le.COPY&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Copy to {target}",{target:s}):(0,a.Iu)("files","Copy"),type:"primary",icon:re,async callback(e){t({destination:e[0],action:le.COPY})}}),e!==le.MOVE&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Move to {target}",{target:s}):(0,a.Iu)("files","Move"),type:e===le.MOVE?"primary":"secondary",icon:ie,async callback(e){t({destination:e[0],action:le.MOVE})}})),o})),o.build().pick().catch((()=>{r(new Error((0,a.Iu)("files","Cancelled move or copy operation")))}))}))},he=new i.p$({id:"move-copy",displayName(e){switch(ue(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=ue([e]),i=await pe(r,n,[e]);try{return await fe(e,i.destination,i.action),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,v.x2)(e.message),null)}},async execBatch(e,t,n){const r=ue(e),i=await pe(r,n,e),o=e.map((async e=>{try{return await fe(e,i.destination,i.action),!0}catch(t){return d.error(`Failed to ${i.action} node`,{node:e,error:t}),!1}}));return await Promise.all(o)},order:15}),ge='',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:()=>'',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:'',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=`\n\n\t\n\t\t${(0,i.m0)()}\n\t\n\t\n\t\t1\n\t\n`,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=`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${(0,i.m0)()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,A.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${at}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;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",{templates: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:'',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:'',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{"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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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;n0&&(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=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=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{"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.lengtht.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.length0,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=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-e0?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;o0,!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{"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{"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-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;t0?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 ei.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{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;i0,(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;dt._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=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--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{"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`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t`},T=function(e){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,r.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},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:`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,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"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;e5&&"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[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[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[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[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++;o0)||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[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!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(;t0?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[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;n0)){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",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: `);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",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;o0&&(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"},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`,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}`:(i+=u+">",f&&""!==r&&(f.includes("/>")||f.includes("`):i+=u+"/>",o=!0}return i}function Xe(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(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"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"+e+i}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+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+"0&&this.options.processEntities)for(let t=0;t0&&(!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=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,i0&&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="+{923:"2686613ba9d88601b889",8321:"1e9a8023ef8296a459a5"}[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{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);da(34507)));s=a.O(s)})(); -//# sourceMappingURL=files-init.js.map?v=27aee90ccfaa32769ce7 \ 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:()=>'',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:()=>'',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.encodedSource),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:()=>'',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='',_=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)?'':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),ue=e=>de(e)?ce(e)?le.MOVE_OR_COPY:le.MOVE:le.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(t.path.startsWith(e.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),d=(0,u.generateRemoteUrl)(`dav/files/${(0,A.ts)()?.uid}${l}`);w.default.set(e,"status",i.e4.LOADING);const c=se();return await c.add((async()=>{try{await(0,s.Z)({method:n===le.COPY?"COPY":"MOVE",url:e.encodedSource,headers:{Destination:encodeURI(d),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)}}))},pe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const r=n.map((e=>e.fileid)).filter(Boolean),o=(0,v.fn)((0,a.Iu)("files","Chose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&i.y3.CREATE)&&!r.includes(e.fileid))).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,r)=>{o.setButtonFactory(((r,i)=>{const o=[],s=(0,ne.basename)(i),l=n.map((e=>e.dirname)),d=n.map((e=>e.path));return l.includes(i)||d.includes(i)||(e!==le.COPY&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Copy to {target}",{target:s}):(0,a.Iu)("files","Copy"),type:"primary",icon:re,async callback(e){t({destination:e[0],action:le.COPY})}}),e!==le.MOVE&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Move to {target}",{target:s}):(0,a.Iu)("files","Move"),type:e===le.MOVE?"primary":"secondary",icon:ie,async callback(e){t({destination:e[0],action:le.MOVE})}})),o})),o.build().pick().catch((()=>{r(new Error((0,a.Iu)("files","Cancelled move or copy operation")))}))}))},he=new i.p$({id:"move-copy",displayName(e){switch(ue(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=ue([e]),i=await pe(r,n,[e]);try{return await fe(e,i.destination,i.action),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,v.x2)(e.message),null)}},async execBatch(e,t,n){const r=ue(e),i=await pe(r,n,e),o=e.map((async e=>{try{return await fe(e,i.destination,i.action),!0}catch(t){return d.error(`Failed to ${i.action} node`,{node:e,error:t}),!1}}));return await Promise.all(o)},order:15}),ge='',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:()=>'',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:'',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=`\n\n\t\n\t\t${(0,i.m0)()}\n\t\n\t\n\t\t1\n\t\n`,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=`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${(0,i.m0)()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,A.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${at}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;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",{templates: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:'',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:'',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{"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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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;n0&&(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=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=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{"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.lengtht.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.length0,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=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-e0?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;o0,!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{"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{"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-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;t0?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 ei.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{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;i0,(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;dt._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=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--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{"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`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t`},T=function(e){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,r.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},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:`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,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"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;e5&&"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[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[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[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[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++;o0)||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[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!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(;t0?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[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;n0)){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",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: `);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",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;o0&&(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"},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`,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}`:(i+=u+">",f&&""!==r&&(f.includes("/>")||f.includes("`):i+=u+"/>",o=!0}return i}function Xe(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(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"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"+e+i}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+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+"0&&this.options.processEntities)for(let t=0;t0&&(!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=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,i0&&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="+{923:"2686613ba9d88601b889",8321:"1e9a8023ef8296a459a5"}[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{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);da(34507)));s=a.O(s)})(); +//# sourceMappingURL=files-init.js.map?v=7aca9abe2eb964615969 \ No newline at end of file diff --git a/dist/files-init.js.map b/dist/files-init.js.map index a44b7c390e157..1febc879a4f3e 100644 --- a/dist/files-init.js.map +++ b/dist/files-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files-init.js?v=27aee90ccfaa32769ce7","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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9C,KAAa,CACtD,IAAIm7C,KAAYqC,EACZtC,EAAoB15B,EAAEg8B,EAAarC,KACrCD,EAAoBtwB,EAAEuwB,GAAYqC,EAAYrC,IAGhD,GAAGsC,EAAS,IAAIl5C,EAASk5C,EAAQvC,EAClC,CAEA,IADGqC,GAA4BA,EAA2Bx4C,GACrD2H,EAAI6uC,EAASh7C,OAAQmM,IACzBqvC,EAAUR,EAAS7uC,GAChBwuC,EAAoB15B,EAAE07B,EAAiBnB,IAAYmB,EAAgBnB,IACrEmB,EAAgBnB,GAAS,KAE1BmB,EAAgBnB,GAAW,EAE5B,OAAOb,EAAoB7L,EAAE9qC,EAAO,EAGjCm5C,EAAqB9vC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1F8vC,EAAmBruC,QAAQiuC,EAAqBvvC,KAAK,KAAM,IAC3D2vC,EAAmB3yC,KAAOuyC,EAAqBvvC,KAAK,KAAM2vC,EAAmB3yC,KAAKgD,KAAK2vC,QCvFvFxC,EAAoB7pC,QAAK5N,ECGzB,IAAIk6C,EAAsBzC,EAAoB7L,OAAE5rC,EAAW,CAAC,OAAO,IAAOy3C,EAAoB,SAC9FyC,EAAsBzC,EAAoB7L,EAAEsO","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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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} 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 /**\n * Example:\n * node: /foo/bar/file.txt -> path = /foo/bar\n * destination: /foo\n * Allow move of /foo does not start with /foo/bar so allow\n */\n if (destination.path.startsWith(node.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 // 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[]} nodes The nodes to move/copy\n * @return {Promise} The picked destination\n */\nconst openFilePickerForAction = async (action, dir = '/', nodes) => {\n const fileIDs = nodes.map(node => node.fileid).filter(Boolean);\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 nodes in the file picker\n && !fileIDs.includes(n.fileid);\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((_selection, path) => {\n const buttons = [];\n const target = basename(path);\n const dirnames = nodes.map(node => node.dirname);\n const paths = nodes.map(node => node.path);\n if (dirnames.includes(path)) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (paths.includes(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 resolve({\n destination: destination[0],\n action: MoveCopyAction.COPY,\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 resolve({\n destination: destination[0],\n action: MoveCopyAction.MOVE,\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 const result = await openFilePickerForAction(action, dir, [node]);\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\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 async execBatch(nodes, view, dir) {\n const action = getActionForNodes(nodes);\n const result = await openFilePickerForAction(action, dir, nodes);\n const promises = nodes.map(async (node) => {\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n logger.error(`Failed to ${result.action} node`, { node, error });\n return false;\n }\n });\n // We need to keep the selection on error!\n // So we do not return null, and for batch action\n // we let the front handle the error.\n return await Promise.all(promises);\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 = `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t1\n\t\n`;\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æ \n *\n * @author John Molakvoæ \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 .\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 = `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastTwoWeeksTimestamp}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\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æ \n *\n * @author John Molakvoæ \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 .\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\n\n\n\n\n\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Louis Chmn \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 .\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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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 \\n *\\n * @author Julius Härtl \\n * @author John Molakvoæ \\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 .\\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-ee6f34b5] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-ee6f34b5] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-ee6f34b5] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-ee6f34b5]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-ee6f34b5] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-ee6f34b5] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-ee6f34b5] {\\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-86a13079] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-86a13079] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-86a13079] {\\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-86a13079] {\\n box-sizing: border-box;\\n}\\n[data-v-86a13079] .file-picker {\\n height: min(80vh, 800px);\\n}\\n@media (max-width: 512px) {\\n [data-v-86a13079] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area));\\n }\\n}\\n[data-v-86a13079] .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/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\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/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\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/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\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/* */\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/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\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 */\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/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\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 \n *\n * @author Christoph Wurst \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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 `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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æ \n *\n * @author John Molakvoæ \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 .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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: `);\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 += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, 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}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), 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 = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + 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 = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + 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 + \" 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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \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 .\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=\" + {\"923\":\"2686613ba9d88601b889\",\"8321\":\"1e9a8023ef8296a459a5\"}[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","NodeStatus","LOADING","add","headers","Destination","encodeURI","Overwrite","response","status","message","openFilePickerForAction","fileIDs","fileid","filter","Boolean","filePicker","getFilePickerBuilder","allowDirectories","setFilter","n","CREATE","includes","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","_selection","buttons","target","dirnames","paths","push","label","icon","CopyIconSvg","callback","FolderMoveSvg","pick","catch","promises","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","getUniqueName","name","names","newName","i","ext","extname","entry","context","handler","content","contentNames","encodeURIComponent","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","debug","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","generateFolderView","index","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","searchPayload","inheritAttrs","String","required","checked","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","warn","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","console","_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","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","onScriptComplete","prev","doneFns","parentNode","removeChild","nmd","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=7aca9abe2eb964615969","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,I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,EAAmB,GAAG/7C,EACvB,CACD,GAEwC,SAAW26C,EAASA,EAE/D,CACD,EAWFb,EAAoB7L,EAAE1F,EAAKoS,GAA0C,IAA7BmB,EAAgBnB,GAGxD,IAAIuB,EAAuB,CAACC,EAA4Bx4C,KACvD,IAKIo2C,EAAUY,EALVR,EAAWx2C,EAAK,GAChBy4C,EAAcz4C,EAAK,GACnB04C,EAAU14C,EAAK,GAGI2H,EAAI,EAC3B,GAAG6uC,EAAS73C,MAAM1D,GAAgC,IAAxBk9C,EAAgBl9C,KAAa,CACtD,IAAIm7C,KAAYqC,EACZtC,EAAoB15B,EAAEg8B,EAAarC,KACrCD,EAAoBtwB,EAAEuwB,GAAYqC,EAAYrC,IAGhD,GAAGsC,EAAS,IAAIl5C,EAASk5C,EAAQvC,EAClC,CAEA,IADGqC,GAA4BA,EAA2Bx4C,GACrD2H,EAAI6uC,EAASh7C,OAAQmM,IACzBqvC,EAAUR,EAAS7uC,GAChBwuC,EAAoB15B,EAAE07B,EAAiBnB,IAAYmB,EAAgBnB,IACrEmB,EAAgBnB,GAAS,KAE1BmB,EAAgBnB,GAAW,EAE5B,OAAOb,EAAoB7L,EAAE9qC,EAAO,EAGjCm5C,EAAqB9vC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1F8vC,EAAmBruC,QAAQiuC,EAAqBvvC,KAAK,KAAM,IAC3D2vC,EAAmB3yC,KAAOuyC,EAAqBvvC,KAAK,KAAM2vC,EAAmB3yC,KAAKgD,KAAK2vC,QCvFvFxC,EAAoB7pC,QAAK5N,ECGzB,IAAIk6C,EAAsBzC,EAAoB7L,OAAE5rC,EAAW,CAAC,OAAO,IAAOy3C,EAAoB,SAC9FyC,EAAsBzC,EAAoB7L,EAAEsO","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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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.encodedSource);\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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} 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 /**\n * Example:\n * node: /foo/bar/file.txt -> path = /foo/bar\n * destination: /foo\n * Allow move of /foo does not start with /foo/bar so allow\n */\n if (destination.path.startsWith(node.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 // 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[]} nodes The nodes to move/copy\n * @return {Promise} The picked destination\n */\nconst openFilePickerForAction = async (action, dir = '/', nodes) => {\n const fileIDs = nodes.map(node => node.fileid).filter(Boolean);\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 nodes in the file picker\n && !fileIDs.includes(n.fileid);\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((_selection, path) => {\n const buttons = [];\n const target = basename(path);\n const dirnames = nodes.map(node => node.dirname);\n const paths = nodes.map(node => node.path);\n if (dirnames.includes(path)) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (paths.includes(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 resolve({\n destination: destination[0],\n action: MoveCopyAction.COPY,\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 resolve({\n destination: destination[0],\n action: MoveCopyAction.MOVE,\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 const result = await openFilePickerForAction(action, dir, [node]);\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\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 async execBatch(nodes, view, dir) {\n const action = getActionForNodes(nodes);\n const result = await openFilePickerForAction(action, dir, nodes);\n const promises = nodes.map(async (node) => {\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n logger.error(`Failed to ${result.action} node`, { node, error });\n return false;\n }\n });\n // We need to keep the selection on error!\n // So we do not return null, and for batch action\n // we let the front handle the error.\n return await Promise.all(promises);\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 = `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t1\n\t\n`;\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æ \n *\n * @author John Molakvoæ \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 .\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 = `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastTwoWeeksTimestamp}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\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æ \n *\n * @author John Molakvoæ \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 .\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\n\n\n\n\n\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Louis Chmn \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 .\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 \n *\n * @author Julius Härtl \n * @author John Molakvoæ \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 .\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-ee6f34b5] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-ee6f34b5] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-ee6f34b5] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-ee6f34b5]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-ee6f34b5] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-ee6f34b5] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-ee6f34b5] {\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-86a13079] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-86a13079] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-86a13079] {\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-86a13079] {\n box-sizing: border-box;\n}\n[data-v-86a13079] .file-picker {\n height: min(80vh, 800px);\n}\n@media (max-width: 512px) {\n [data-v-86a13079] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area));\n }\n}\n[data-v-86a13079] .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 \\n *\\n * @author Julius Härtl \\n * @author John Molakvoæ \\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 .\\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-ee6f34b5] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-ee6f34b5] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td[data-v-ee6f34b5]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-ee6f34b5] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-ee6f34b5] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-ee6f34b5] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-ee6f34b5]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-ee6f34b5] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-ee6f34b5] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-ee6f34b5] {\\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-86a13079] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-86a13079] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-86a13079] {\\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-86a13079] {\\n box-sizing: border-box;\\n}\\n[data-v-86a13079] .file-picker {\\n height: min(80vh, 800px);\\n}\\n@media (max-width: 512px) {\\n [data-v-86a13079] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area));\\n }\\n}\\n[data-v-86a13079] .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/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\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/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\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/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\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/* */\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/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\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 */\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/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\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 \n *\n * @author Christoph Wurst \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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 `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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æ \n *\n * @author John Molakvoæ \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 .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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æ \n *\n * @author John Molakvoæ \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 .\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: `);\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 += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, 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}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), 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 = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + 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 = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + 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 + \" 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æ \n *\n * @author John Molakvoæ \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 .\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 \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \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 .\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=\" + {\"923\":\"2686613ba9d88601b889\",\"8321\":\"1e9a8023ef8296a459a5\"}[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","NodeStatus","LOADING","add","headers","Destination","encodeURI","Overwrite","response","status","message","openFilePickerForAction","fileIDs","fileid","filter","Boolean","filePicker","getFilePickerBuilder","allowDirectories","setFilter","n","CREATE","includes","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","_selection","buttons","target","dirnames","paths","push","label","icon","CopyIconSvg","callback","FolderMoveSvg","pick","catch","promises","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","getUniqueName","name","names","newName","i","ext","extname","entry","context","handler","content","contentNames","encodeURIComponent","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","debug","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","generateFolderView","index","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","searchPayload","inheritAttrs","String","required","checked","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","warn","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","console","_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","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","onScriptComplete","prev","doneFns","parentNode","removeChild","nmd","children","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file