diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-27 19:15:41 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-31 12:51:17 +0200 |
commit | bbd959cc998862c8e1b7e63a30de6b72281aa18e (patch) | |
tree | be1c760e27a7bc21a4e506439467fa2ba717f8ec /dist/files_sharing-init.js.map | |
parent | 622bf3003107d568e3c798547d4f1aa46e86f50a (diff) | |
download | nextcloud-server-bbd959cc998862c8e1b7e63a30de6b72281aa18e.tar.gz nextcloud-server-bbd959cc998862c8e1b7e63a30de6b72281aa18e.zip |
chore: Compile assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'dist/files_sharing-init.js.map')
-rw-r--r-- | dist/files_sharing-init.js.map | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/files_sharing-init.js.map b/dist/files_sharing-init.js.map index 302bf4e4575..0e4e389e469 100644 --- a/dist/files_sharing-init.js.map +++ b/dist/files_sharing-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files_sharing-init.js?v=bdfb694082d927b754e8","mappings":";uBAAIA,4GC6BJ,MAAwGC,EAAhF,QAAZC,GAAmG,YAAhF,UAAIC,OAAO,SAASC,SAAU,UAAID,OAAO,SAASE,OAAOH,EAAEI,KAAKF,QAApF,IAACF,EA0IRK,EAAoB,CAAEL,IAAOA,EAAEM,QAAU,UAAWN,EAAEO,OAAS,SAAUP,GAArD,CAAyDK,GAAK,CAAC,GACvF,MAAMG,EACJC,QACA,WAAAC,CAAYC,GACVC,KAAKC,eAAeF,GAAIC,KAAKH,QAAUE,CACzC,CACA,MAAIG,GACF,OAAOF,KAAKH,QAAQK,EACtB,CACA,eAAIC,GACF,OAAOH,KAAKH,QAAQM,WACtB,CACA,SAAIC,GACF,OAAOJ,KAAKH,QAAQO,KACtB,CACA,iBAAIC,GACF,OAAOL,KAAKH,QAAQQ,aACtB,CACA,WAAIC,GACF,OAAON,KAAKH,QAAQS,OACt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AAoB0B,IAAO5B,IAC1BA,EAAO6B,MAAQ,GACV7B,EAAO8B,WAAU9B,EAAO8B,SAAW,IACjC9B,GCHRE,EAAoB5d,EAAI,WCAxB4d,EAAoB7L,EAAI0N,SAASC,SAAWC,KAAKC,SAASC,KAK1D,IAAIC,EAAkB,CACrB,KAAM,GAaPlC,EAAoBM,EAAEle,EAAK+f,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BhR,KACvD,IAKI4O,EAAUkC,EALV3B,EAAWnP,EAAK,GAChBiR,EAAcjR,EAAK,GACnBkR,EAAUlR,EAAK,GAGIpM,EAAI,EAC3B,GAAGub,EAASjE,MAAMpc,GAAgC,IAAxB+hB,EAAgB/hB,KAAa,CACtD,IAAI8f,KAAYqC,EACZtC,EAAoB/X,EAAEqa,EAAarC,KACrCD,EAAoB5gB,EAAE6gB,GAAYqC,EAAYrC,IAGhD,GAAGsC,EAAS,IAAIhC,EAASgC,EAAQvC,EAClC,CAEA,IADGqC,GAA4BA,EAA2BhR,GACrDpM,EAAIub,EAAStd,OAAQ+B,IACzBkd,EAAU3B,EAASvb,GAChB+a,EAAoB/X,EAAEia,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOnC,EAAoBM,EAAEC,EAAO,EAGjCiC,EAAqBT,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FS,EAAmBxL,QAAQoL,EAAqBK,KAAK,KAAM,IAC3DD,EAAmB9gB,KAAO0gB,EAAqBK,KAAK,KAAMD,EAAmB9gB,KAAK+gB,KAAKD,QClDvFxC,EAAoB1d,QAAK+V,ECGzB,IAAIqK,EAAsB1C,EAAoBM,OAAEjI,EAAW,CAAC,OAAO,IAAO2H,EAAoB,QAC9F0C,EAAsB1C,EAAoBM,EAAEoC","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","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/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/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};","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as B } 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\";\nimport { CancelablePromise as me } from \"cancelable-promise\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst Ne = (e) => e === null ? B().setApp(\"files\").build() : B().setApp(\"files\").setUid(e.uid).build(), m = Ne(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ee {\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 Ee(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst O = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Qt(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 : O.length) - 1, n);\n const i = r ? P[n] : O[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] : O[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Dt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar W = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(W || {});\nclass er {\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(W).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 tr = 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}, rr = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass nr {\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 ir = 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}, sr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst Z = [\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 \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n], j = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, or = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...Z], window._nc_dav_namespaces = { ...j });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.warn(`${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 = [...Z]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, S = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...j }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, ur = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${S()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, be = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${S()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, dr = function(e) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${S()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ye = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar L = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(L || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst Y = function(e, t) {\n return e.match(t) !== null;\n}, q = (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 && Y(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(J).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar J = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(J || {});\nclass Q {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n q(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 let r = this.source;\n this.isDavRessource && (r = r.split(this._knownDavService).pop());\n const s = r.indexOf(this.root), n = this.root.replace(/\\/$/, \"\");\n return I(r.slice(s + n.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 Y(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 let t = this.source;\n this.isDavRessource && (t = t.split(this._knownDavService).pop());\n const r = t.indexOf(this.root), s = this.root.replace(/\\/$/, \"\");\n return t.slice(r + s.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 q({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends Q {\n get type() {\n return L.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ve extends Q {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return L.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst D = `/files/${A()?.uid}`, ee = pe(\"dav\"), ar = function(e = ee, t = {}) {\n const r = ge(e, { headers: t });\n function s(i) {\n r.setHeaders({\n ...t,\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: i ?? \"\"\n });\n }\n return ue(s), s(de()), we().patch(\"fetch\", (i, d) => {\n const u = d.headers;\n return u?.method && (d.method = u.method, delete u.method), fetch(i, d);\n }), r;\n}, lr = (e, t = \"/\", r = D) => {\n const s = new AbortController();\n return new me(async (n, i, d) => {\n d(() => s.abort());\n try {\n const o = (await e.getDirectoryContents(`${r}${t}`, {\n signal: s.signal,\n details: !0,\n data: be(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n })).data.filter((a) => a.filename !== t).map((a) => Te(a, r));\n n(o);\n } catch (u) {\n i(u);\n }\n });\n}, Te = function(e, t = D, r = ee) {\n const s = A()?.uid;\n if (!s)\n throw new Error(\"No user id found\");\n const n = e.props, i = ye(n?.permissions), d = (n?.[\"owner-id\"] || s).toString(), u = {\n id: n?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime || \"application/octet-stream\",\n size: n?.size || Number.parseInt(n.getcontentlength || \"0\"),\n permissions: i,\n owner: d,\n root: t,\n attributes: {\n ...e,\n ...n,\n hasPreview: n?.[\"has-preview\"]\n }\n };\n return delete u.attributes?.props, e.type === \"file\" ? new _e(u) : new ve(u);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n _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 fr = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Ie(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ae {\n _column;\n constructor(t) {\n Ce(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 Ce = 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 R = {}, C = {};\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})(C);\nconst M = C, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nR.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 = U(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = G(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 = $e(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 = z(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 = z(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 = G(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = U(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Se(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 && !X(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (X(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 X(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction U(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 G(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 Pe = '\"', xe = \"'\";\nfunction $e(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Pe || e[t] === xe)\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 Fe = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction z(e, t) {\n const r = M.getAllMatches(e, Fe), 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 Ve(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 Se(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Ve(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 k = {};\nconst te = {\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}, Me = function(e) {\n return Object.assign({}, te, e);\n};\nk.buildOptions = Me;\nk.defaultOptions = te;\nclass ke {\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 = ke;\nconst qe = C;\nfunction Xe(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 && ze(e, t))\n t += 7, [entityName, val, t] = Ue(e, t + 1), val.indexOf(\"&\") === -1 && (r[Ze(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 8;\n else if (n && We(e, t))\n t += 9;\n else if (Ge)\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 Ue(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 Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction ze(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 He(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 Ke(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 We(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 Ze(e) {\n if (qe.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar je = Xe;\nconst Ye = /^[-+]?0x[a-fA-F0-9]+$/, Je = /^([\\-\\+])?(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 Qe = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction De(e, t = {}) {\n if (t = Object.assign({}, Qe, 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 && Ye.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Je.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = et(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 et(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 tt = De;\nconst re = C, T = Be, rt = je, nt = tt;\nlet it = 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 num_dec: { regex: /&#([0-9]{1,7});/g, val: (r, s) => String.fromCharCode(Number.parseInt(s, 10)) },\n num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (r, s) => String.fromCharCode(Number.parseInt(s, 16)) }\n }, this.addExternalEntities = st, this.parseXml = lt, this.parseTextData = ot, this.resolveNameSpace = ut, this.buildAttributesMap = at, this.isItStopNode = pt, this.replaceEntitiesValue = ct, this.readStopNodeData = wt, this.saveTextToParentTag = ht, this.addChild = ft;\n }\n};\nfunction st(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 ot(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 ut(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 dt = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction at(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = re.getAllMatches(e, dt), 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 lt = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = rt(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 s = this.saveTextToParentTag(s, r, n);\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0, !0);\n a == null && (a = \"\"), this.options.cdataPropName ? r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]) : r.add(this.options.textNodeName, a), 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 ft(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 ct = 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 ht(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 pt(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 gt(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 = gt(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.substring(0, u), i = i.substring(u + 1).trimStart());\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 wt(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 : nt(e, r);\n } else\n return re.isExist(e) ? e : \"\";\n}\nvar mt = it, ne = {};\nfunction Nt(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 = Et(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 = yt(a, t);\n d[\":@\"] ? bt(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 Et(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 bt(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 yt(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 = Nt;\nconst { buildOptions: _t } = k, vt = mt, { prettify: Tt } = ne, It = R;\nlet At = class {\n constructor(t) {\n this.externalEntities = {}, this.options = _t(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 = It.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new vt(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : Tt(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 Ct = At;\nconst Ot = `\n`;\nfunction Pt(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 = xt(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 $t(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = H(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 = H(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n }\n return n;\n}\nfunction xt(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 H(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 $t(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 Ft = Pt;\nconst Vt = Ft, St = {\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({}, St, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Mt), 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 ? Vt(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"</\" + t + this.tagEndChar, i = \"\";\n return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `<!--${e}-->` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n if (e && e.length > 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction Mt(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar kt = b;\nconst Bt = R, qt = Ct, Xt = kt;\nvar K = {\n XMLParser: qt,\n XMLValidator: Bt,\n XMLBuilder: Xt\n};\nfunction Ut(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || K.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new K.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass pr {\n _view;\n constructor(t) {\n Gt(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 Gt = 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\" || !Ut(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 Ae))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst gr = function(e) {\n return F().registerEntry(e);\n}, wr = function(e) {\n return F().unregisterEntry(e);\n}, mr = 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 Ae as Column,\n W as DefaultType,\n _e as File,\n er as FileAction,\n L as FileType,\n ve as Folder,\n nr as Header,\n Ie as Navigation,\n Q as Node,\n J as NodeStatus,\n N as Permission,\n pr as View,\n gr as addNewFileMenuEntry,\n ar as davGetClient,\n ur as davGetDefaultPropfind,\n be as davGetFavoritesReport,\n dr as davGetRecentSearch,\n ye as davParsePermissions,\n ee as davRemoteURL,\n Te as davResultToNode,\n D as davRootPath,\n j as defaultDavNamespaces,\n Z as defaultDavProperties,\n Qt as formatFileSize,\n S as getDavNameSpaces,\n V as getDavProperties,\n lr as getFavoriteNodes,\n rr as getFileActions,\n sr as getFileListHeaders,\n fr as getNavigation,\n mr as getNewFileMenuEntries,\n Dt as parseFileSize,\n or as registerDavProperty,\n tr as registerFileAction,\n ir as registerFileListHeaders,\n wr as removeNewFileMenuEntry\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('files_sharing')\n .detectUser()\n .build();\n","import { Folder, File } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n 'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = function (ocsEntry) {\n try {\n const isFolder = ocsEntry?.item_type === 'folder';\n const hasPreview = ocsEntry?.has_preview === true;\n const Node = isFolder ? Folder : File;\n const fileid = ocsEntry.file_source;\n // Generate path and strip double slashes\n const path = ocsEntry?.path || ocsEntry.file_target;\n const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n // Prefer share time if more recent than item mtime\n let mtime = ocsEntry?.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n mtime = new Date((ocsEntry.stime) * 1000);\n }\n return new Node({\n id: fileid,\n source,\n owner: ocsEntry?.uid_owner,\n mime: ocsEntry?.mimetype,\n mtime,\n size: ocsEntry?.item_size,\n permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n root: rootPath,\n attributes: {\n ...ocsEntry,\n 'has-preview': hasPreview,\n // Also check the sharingStatusAction.ts code\n 'owner-id': ocsEntry?.uid_owner,\n 'owner-display-name': ocsEntry?.displayname_owner,\n 'share-types': ocsEntry?.share_type,\n favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n },\n });\n }\n catch (error) {\n logger.error('Error while parsing OCS entry', { error });\n return null;\n }\n};\nconst getShares = function (shared_with_me = false) {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n return axios.get(url, {\n headers,\n params: {\n shared_with_me,\n include_tags: true,\n },\n });\n};\nconst getSharedWithYou = function () {\n return getShares(true);\n};\nconst getSharedWithOthers = function () {\n return getShares();\n};\nconst getRemoteShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getPendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getRemotePendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getDeletedShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\n/**\n * Group an array of objects (here Nodes) by a key\n * and return an array of arrays of them.\n */\nconst groupBy = function (nodes, key) {\n return Object.values(nodes.reduce(function (acc, curr) {\n (acc[curr[key]] = acc[curr[key]] || []).push(curr);\n return acc;\n }, {}));\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n const promises = [];\n if (sharedWithYou) {\n promises.push(getSharedWithYou(), getRemoteShares());\n }\n if (sharedWithOthers) {\n promises.push(getSharedWithOthers());\n }\n if (pendingShares) {\n promises.push(getPendingShares(), getRemotePendingShares());\n }\n if (deletedshares) {\n promises.push(getDeletedShares());\n }\n const responses = await Promise.all(promises);\n const data = responses.map((response) => response.data.ocs.data).flat();\n let contents = data.map(ocsEntryToNode)\n .filter((node) => node !== null);\n if (filterTypes.length > 0) {\n contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n }\n // Merge duplicate shares and group their attributes\n // Also check the sharingStatusAction.ts code\n contents = groupBy(contents, 'source').map((nodes) => {\n const node = nodes[0];\n node.attributes['share-types'] = nodes.map(node => node.attributes['share-types']);\n return node;\n });\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n owner: getCurrentUser()?.uid || null,\n }),\n contents,\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: sharesViewId,\n name: t('files_sharing', 'Shares'),\n caption: t('files_sharing', 'Overview of shared files.'),\n emptyTitle: t('files_sharing', 'No shares'),\n emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n icon: AccountPlusSvg,\n order: 20,\n columns: [],\n getContents: () => getContents(),\n }));\n Navigation.register(new View({\n id: sharedWithYouViewId,\n name: t('files_sharing', 'Shared with you'),\n caption: t('files_sharing', 'List of files that are shared with you.'),\n emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n icon: AccountSvg,\n order: 1,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(true, false, false, false),\n }));\n Navigation.register(new View({\n id: sharedWithOthersViewId,\n name: t('files_sharing', 'Shared with others'),\n caption: t('files_sharing', 'List of files that you shared with others.'),\n emptyTitle: t('files_sharing', 'Nothing shared yet'),\n emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n icon: AccountGroupSvg,\n order: 2,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false),\n }));\n Navigation.register(new View({\n id: sharingByLinksViewId,\n name: t('files_sharing', 'Shared by link'),\n caption: t('files_sharing', 'List of files that are shared by link.'),\n emptyTitle: t('files_sharing', 'No shared links'),\n emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n icon: LinkSvg,\n order: 3,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n }));\n Navigation.register(new View({\n id: deletedSharesViewId,\n name: t('files_sharing', 'Deleted shares'),\n caption: t('files_sharing', 'List of shares you left.'),\n emptyTitle: t('files_sharing', 'No deleted shares'),\n emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n icon: DeleteSvg,\n order: 4,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, false, true),\n }));\n Navigation.register(new View({\n id: pendingSharesViewId,\n name: t('files_sharing', 'Pending shares'),\n caption: t('files_sharing', 'List of unapproved shares.'),\n emptyTitle: t('files_sharing', 'No pending shares'),\n emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n icon: AccountClockSvg,\n order: 5,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, true, false),\n }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'accept-share',\n displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n iconSvgInline: () => CheckSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'open-in-files',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => [\n sharesViewId,\n sharedWithYouViewId,\n sharedWithOthersViewId,\n sharingByLinksViewId,\n // Deleted and pending shares are not\n // accessible in the files app.\n ].includes(view.id),\n async exec(node) {\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'reject-share',\n displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n iconSvgInline: () => CloseSvg,\n enabled: (nodes, view) => {\n if (view.id !== pendingSharesViewId) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // disable rejecting group shares from the pending list because they anyway\n // land back into that same list after rejecting them\n if (nodes.some(node => node.attributes.remote_id\n && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n return false;\n }\n return true;\n },\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.delete(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 2,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'restore-share',\n displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n iconSvgInline: () => ArrowULeftTopSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n async exec(node) {\n try {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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 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/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\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/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst generateAvatarSvg = (userId) => {\n const avatarUrl = generateUrl('/avatar/{userId}/32', { userId });\n return `<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\"\n\t\txmlns=\"http://www.w3.org/2000/svg\" class=\"sharing-status__avatar\">\n\t\t<image href=\"${avatarUrl}\" height=\"32\" width=\"32\" />\n\t</svg>`;\n};\nexport const action = new FileAction({\n id: 'sharing-status',\n displayName(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n const ownerId = node?.attributes?.['owner-id'];\n if (shareTypes.length > 0\n || (ownerId && ownerId !== getCurrentUser()?.uid)) {\n return t('files_sharing', 'Shared');\n }\n return '';\n },\n title(nodes) {\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const ownerDisplayName = node?.attributes?.['owner-display-name'];\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types'])) {\n return t('files_sharing', 'Shared multiple times with different people');\n }\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n }\n return t('files_sharing', 'Show sharing options');\n },\n iconSvgInline(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types'])) {\n return AccountPlusSvg;\n }\n // Link shares\n if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n return LinkSvg;\n }\n // Group shares\n if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n return AccountGroupSvg;\n }\n // Circle shares\n if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n return CircleSvg;\n }\n const ownerId = node?.attributes?.['owner-id'];\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return generateAvatarSvg(ownerId);\n }\n return AccountPlusSvg;\n },\n enabled(nodes) {\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const isMixed = Array.isArray(node.attributes?.['share-types']);\n // If the node is shared multiple times with\n // different share types to the current user\n if (isMixed) {\n return true;\n }\n // If the node is shared by someone else\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return true;\n }\n return (node.permissions & Permission.SHARE) !== 0;\n },\n async exec(node, view, dir) {\n // You need read permissions to see the sidebar\n if ((node.permissions & Permission.READ) !== 0) {\n window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n return sidebarAction.exec(node, view, dir);\n }\n return null;\n },\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { registerDavProperty } from '@nextcloud/files';\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\nregisterDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' });\nregisterDavProperty('oc:share-types', { oc: 'http://owncloud.org/ns' });\nregisterDavProperty('ocs:share-permissions', { ocs: 'http://open-collaboration-services.org/ns' });\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, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tmax-height: 32px !important;\\n\\tmax-width: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__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 = 5928;","__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\t5928: 0\n};\n\n// no chunk on demand loading\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, [4208], () => (__webpack_require__(5924)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","e","setApp","build","setUid","uid","W","DEFAULT","HIDDEN","er","_action","constructor","t","this","validateAction","id","displayName","title","iconSvgInline","enabled","exec","execBatch","order","parent","default","inline","renderInline","Error","Object","values","includes","tr","window","_nc_fileactions","debug","find","error","action","push","N","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","Z","j","d","nc","oc","ocs","or","_nc_dav_properties","_nc_dav_namespaces","r","n","warn","prop","startsWith","split","length","namespaces","L","Folder","File","Y","match","q","source","URL","mtime","Date","crtime","mime","size","permissions","owner","attributes","root","status","J","NEW","FAILED","LOADING","LOCKED","Q","_data","_attributes","_knownDavService","s","set","i","updateMtime","Reflect","deleteProperty","Proxy","replace","encodedSource","origin","slice","basename","extension","dirname","isDavRessource","pop","indexOf","pathname","path","fileid","move","rename","_e","type","ve","super","Ie","_views","_currentView","register","remove","findIndex","splice","views","setActive","active","Ae","_column","Ce","render","sort","summary","R","C","RegExp","isExist","u","isEmptyObject","keys","merge","o","a","l","f","c","getValue","isName","getAllMatches","startIndex","lastIndex","g","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","X","U","substr","p","w","G","validate","assign","err","trim","substring","Re","$e","value","index","z","code","msg","line","tagClosed","tagName","tagStartPos","col","Se","JSON","stringify","map","Pe","xe","Fe","v","Le","hasOwnProperty","Ve","k","te","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","qe","Ue","Ge","ze","He","Ke","We","Ze","Ye","Je","Number","parseInt","parseFloat","Qe","decimalPoint","re","T","tagname","child","add","addChild","rt","entityName","val","regx","entities","nt","skipLike","test","et","search","st","lastEntities","regex","ot","options","replaceEntitiesValue","$","ut","charAt","dt","at","resolveNameSpace","lt","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","ft","ct","ampEntity","ht","pt","data","gt","trimStart","wt","ne","ie","Et","yt","bt","Array","prettify","_t","vt","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","num_dec","String","fromCharCode","num_hex","addExternalEntities","parseXml","Tt","It","se","xt","$t","oe","H","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Vt","format","St","oneListGroup","b","isAttribute","attrPrefixLen","Mt","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","prototype","arrayNodeName","call","buildAttrPairStr","closeTag","K","XMLParser","externalEntities","parse","toString","addEntity","XMLValidator","XMLBuilder","pr","_view","Gt","name","caption","emptyTitle","emptyCaption","getContents","icon","params","columns","emptyView","sticky","expanded","defaultSortKey","TypeError","Ut","forEach","getLoggerBuilder","detectUser","rootPath","concat","_getCurrentUser","getCurrentUser","headers","ocsEntryToNode","ocsEntry","_ocsEntry$tags","isFolder","item_type","hasPreview","has_preview","Node","file_source","file_target","generateRemoteUrl","replaceAll","item_mtime","undefined","stime","uid_owner","mimetype","item_size","item_permissions","displayname_owner","share_type","favorite","tags","OC","TAG_FAVORITE","logger","getShares","shared_with_me","arguments","url","generateOcsUrl","axios","get","include_tags","async","_getCurrentUser2","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","contents","Promise","all","response","flat","filter","node","nodes","key","_node$attributes","reduce","acc","curr","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","registerFileAction","FileAction","view","isRemote","remote","shareBase","post","emit","dir","OCP","Files","Router","goToRoute","DefaultType","some","remote_id","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","_window","_ref","_nodes$0$root","OCA","Sidebar","Permission","open","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","_node$attributes2","shareTypes","ownerId","_node$attributes3","_node$attributes4","_node$attributes5","ownerDisplayName","_node$attributes6","_node$attributes7","_node$attributes8","_getCurrentUser3","AccountPlusSvg","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","avatarUrl","generateUrl","generateAvatarSvg","_node$attributes9","_node$attributes10","_getCurrentUser4","_window$OCA","_window$OCA$setActive","setActiveTab","sidebarAction","Navigation","_nc_navigation","View","registerSharingViews","registerDavProperty","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","getter","__esModule","definition","defineProperty","enumerable","resolve","globalThis","Function","obj","Symbol","toStringTag","nmd","paths","children","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"files_sharing-init.js?v=ffbd67251ead8a11cd46","mappings":";uBAAIA,yGC6BJ,MAMMC,EALS,QADIC,GAMM,YAJd,UAAmBC,OAAO,SAASC,SAErC,UAAmBD,OAAO,SAASE,OAAOH,EAAKI,KAAKF,QAJ3C,IAACF,EAmHfK,EAA8B,CAAEC,IAClCA,EAAsB,QAAI,UAC1BA,EAAqB,OAAI,SAClBA,GAHyB,CAI/BD,GAAe,CAAC,GACnB,MAAME,EACJC,QACA,WAAAC,CAAYC,GACVC,KAAKC,eAAeF,GACpBC,KAAKH,QAAUE,CACjB,CACA,MAAIG,GACF,OAAOF,KAAKH,QAAQK,EACtB,CACA,eAAIC,GACF,OAAOH,KAAKH,QAAQM,WACtB,CACA,SAAIC,GACF,OAAOJ,KAAKH,QAAQO,KACtB,CACA,iBAAIC,GACF,OAAOL,KAAKH,QAAQQ,aACtB,CACA,WAAIC,GACF,OAAON,KAAKH,QAAQS,OACtB,CACA,QAAIC,GACF,OAAOP,KAAKH,QAAQU,IACtB,CACA,aAAIC,GACF,OAAOR,KAAKH,QAAQW,SACtB,CACA,SAAIC,GACF,OAAOT,KAAKH,QAAQY,KACtB,CACA,UAAIC,GACF,OAAOV,KAAKH,QAAQa,MACtB,CACA,WAAI,GACF,OAAOV,KAAKH,QAAQc,OACtB,CACA,UAAIC,GACF,OAAOZ,KAAKH,QAAQe,MACtB,CACA,gBAAIC,GACF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:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","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/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/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};","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst getLogger = (user) => {\n if (user === null) {\n return getLoggerBuilder().setApp(\"files\").build();\n }\n return getLoggerBuilder().setApp(\"files\").setUid(user.uid).build();\n};\nconst logger = getLogger(getCurrentUser());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 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(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\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(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\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(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst defaultDavProperties = [\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 \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n};\nconst davGetFavoritesReport = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${getDavNameSpaces()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${getCurrentUser()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${lastModified}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n this.updateMtime();\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n this.updateMtime();\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = { ...data, attributes: {} };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n this._data.mtime = data.mtime;\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\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 } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(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 * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n * There is no setter as the modification time is not meant to be changed manually.\n * It will be automatically updated when the attributes are changed.\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\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 * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\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(status) {\n this._data.status = status;\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(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n this._data.source = destination;\n 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(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst davRootPath = `/files/${getCurrentUser()?.uid}`;\nconst davRemoteURL = generateRemoteUrl(\"dav\");\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\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: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n const isPublic = document.querySelector(\"input#isPublic\")?.value;\n if (isPublic) {\n userId = userId ?? document.querySelector(\"input#sharingUserId\")?.value;\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const nodeData = {\n id: props?.fileid || 0,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nconst forbiddenCharacters = window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\nconst forbiddenFilenameRegex = window._oc_config?.blacklist_files_regex ? new RegExp(window._oc_config.blacklist_files_regex) : null;\nfunction isFilenameValid(filename) {\n if (forbiddenCharacters.some((character) => filename.includes(character))) {\n return false;\n }\n if (forbiddenFilenameRegex !== null && filename.match(forbiddenFilenameRegex)) {\n return false;\n }\n return true;\n}\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers, orders) {\n identifiers = identifiers ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const identifiers = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use displayName too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use displayName if available, fallback to name\n (v) => v.attributes?.displayName || v.basename,\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers, orders);\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Navigation {\n _views = [];\n _currentView = null;\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n }\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n }\n }\n get views() {\n return this._views;\n }\n setActive(view) {\n this._currentView = view;\n }\n get active() {\n return this._currentView;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\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 isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":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 const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err)\n return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1)\n ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err)\n return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i])\n ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\")\n key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\")\n node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i))\n i += 8;\n else if (hasBody && isAttlist(xmlData, i))\n i += 8;\n else if (hasBody && isNotation(xmlData, i))\n i += 9;\n else if (isComment)\n comment = true;\n else\n throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\")\n return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\")\n return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\")\n return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\")\n return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr))\n return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\")\n return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\")\n return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (eNotation) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\")\n return num;\n else if (numStr === numTrimmedByZeros)\n return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros)\n return num;\n else\n return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr)\n return num;\n else if (sign + numTrimmedByZeros === numStr)\n return num;\n else\n return str;\n }\n if (trimmedStr === numStr)\n return num;\n else if (trimmedStr === sign + numStr)\n return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\")\n numStr = \"0\";\n else if (numStr[0] === \".\")\n numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\")\n numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n 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 };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n 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 \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities)\n val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\")\n aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData)\n throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags)\n ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0)\n val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2)\n throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false)\n ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0)\n isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp)\n return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary)\n attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result)\n return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\")\n return true;\n else if (newval === \"false\")\n return false;\n else\n return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0)\n newJpath = property;\n else\n newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0)\n text = tagObj[property];\n else\n text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode)\n val2[options.textNodeName] = \"\";\n else\n val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0)\n compressedObj[options.textNodeName] = text;\n } else if (text !== void 0)\n compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\")\n return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\")\n ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true)\n validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0)\n return orderedResult;\n else\n return prettify(orderedResult, 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(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '
'\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0)\n continue;\n let newJPath = \"\";\n if (jPath.length === 0)\n newJPath = tagName;\n else\n newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode)\n xmlStr += tagStart + \">\";\n else\n xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n xmlStr += indentation + options.indentBy + tagValue + indentation;\n } else {\n xmlStr += tagValue;\n }\n xmlStr += `</${tagName}>`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key))\n continue;\n if (key !== \":@\")\n return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr))\n continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName)\n return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\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: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key))\n continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\")\n ;\n else if (item === null) {\n if (key[0] === \"?\")\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n listTagVal += this.j2x(item, level + 1).val;\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, \"\", level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else\n return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\")\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"</\" + key + this.tagEndChar;\n let piClosingChar = \"\";\n if (key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n if ((attrStr || attrStr === \"\") && val2.indexOf(\"<\") === -1) {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + \">\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val2}-->` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode)\n closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `></${key}`;\n }\n return closeTag;\n};\nBuilder.prototype.buildTextValNode = function(val2, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `<![CDATA[${val2}]]>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `<!--${val2}-->` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \"</\" + key + this.tagEndChar;\n }\n }\n};\nBuilder.prototype.replaceEntitiesValue = function(textValue) {\n if (textValue && textValue.length > 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\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(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\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(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (!(\"order\" in view) || typeof view.order !== \"number\") {\n throw new Error(\"View order is required and must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n return true;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('files_sharing')\n .detectUser()\n .build();\n","import { Folder, File } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n 'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = function (ocsEntry) {\n try {\n const isFolder = ocsEntry?.item_type === 'folder';\n const hasPreview = ocsEntry?.has_preview === true;\n const Node = isFolder ? Folder : File;\n const fileid = ocsEntry.file_source;\n // Generate path and strip double slashes\n const path = ocsEntry?.path || ocsEntry.file_target;\n const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n // Prefer share time if more recent than item mtime\n let mtime = ocsEntry?.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n mtime = new Date((ocsEntry.stime) * 1000);\n }\n return new Node({\n id: fileid,\n source,\n owner: ocsEntry?.uid_owner,\n mime: ocsEntry?.mimetype,\n mtime,\n size: ocsEntry?.item_size,\n permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n root: rootPath,\n attributes: {\n ...ocsEntry,\n 'has-preview': hasPreview,\n // Also check the sharingStatusAction.ts code\n 'owner-id': ocsEntry?.uid_owner,\n 'owner-display-name': ocsEntry?.displayname_owner,\n 'share-types': ocsEntry?.share_type,\n favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n },\n });\n }\n catch (error) {\n logger.error('Error while parsing OCS entry', { error });\n return null;\n }\n};\nconst getShares = function (shared_with_me = false) {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n return axios.get(url, {\n headers,\n params: {\n shared_with_me,\n include_tags: true,\n },\n });\n};\nconst getSharedWithYou = function () {\n return getShares(true);\n};\nconst getSharedWithOthers = function () {\n return getShares();\n};\nconst getRemoteShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getPendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getRemotePendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getDeletedShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\n/**\n * Group an array of objects (here Nodes) by a key\n * and return an array of arrays of them.\n */\nconst groupBy = function (nodes, key) {\n return Object.values(nodes.reduce(function (acc, curr) {\n (acc[curr[key]] = acc[curr[key]] || []).push(curr);\n return acc;\n }, {}));\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n const promises = [];\n if (sharedWithYou) {\n promises.push(getSharedWithYou(), getRemoteShares());\n }\n if (sharedWithOthers) {\n promises.push(getSharedWithOthers());\n }\n if (pendingShares) {\n promises.push(getPendingShares(), getRemotePendingShares());\n }\n if (deletedshares) {\n promises.push(getDeletedShares());\n }\n const responses = await Promise.all(promises);\n const data = responses.map((response) => response.data.ocs.data).flat();\n let contents = data.map(ocsEntryToNode)\n .filter((node) => node !== null);\n if (filterTypes.length > 0) {\n contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n }\n // Merge duplicate shares and group their attributes\n // Also check the sharingStatusAction.ts code\n contents = groupBy(contents, 'source').map((nodes) => {\n const node = nodes[0];\n node.attributes['share-types'] = nodes.map(node => node.attributes['share-types']);\n return node;\n });\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n owner: getCurrentUser()?.uid || null,\n }),\n contents,\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: sharesViewId,\n name: t('files_sharing', 'Shares'),\n caption: t('files_sharing', 'Overview of shared files.'),\n emptyTitle: t('files_sharing', 'No shares'),\n emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n icon: AccountPlusSvg,\n order: 20,\n columns: [],\n getContents: () => getContents(),\n }));\n Navigation.register(new View({\n id: sharedWithYouViewId,\n name: t('files_sharing', 'Shared with you'),\n caption: t('files_sharing', 'List of files that are shared with you.'),\n emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n icon: AccountSvg,\n order: 1,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(true, false, false, false),\n }));\n Navigation.register(new View({\n id: sharedWithOthersViewId,\n name: t('files_sharing', 'Shared with others'),\n caption: t('files_sharing', 'List of files that you shared with others.'),\n emptyTitle: t('files_sharing', 'Nothing shared yet'),\n emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n icon: AccountGroupSvg,\n order: 2,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false),\n }));\n Navigation.register(new View({\n id: sharingByLinksViewId,\n name: t('files_sharing', 'Shared by link'),\n caption: t('files_sharing', 'List of files that are shared by link.'),\n emptyTitle: t('files_sharing', 'No shared links'),\n emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n icon: LinkSvg,\n order: 3,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n }));\n Navigation.register(new View({\n id: deletedSharesViewId,\n name: t('files_sharing', 'Deleted shares'),\n caption: t('files_sharing', 'List of shares you left.'),\n emptyTitle: t('files_sharing', 'No deleted shares'),\n emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n icon: DeleteSvg,\n order: 4,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, false, true),\n }));\n Navigation.register(new View({\n id: pendingSharesViewId,\n name: t('files_sharing', 'Pending shares'),\n caption: t('files_sharing', 'List of unapproved shares.'),\n emptyTitle: t('files_sharing', 'No pending shares'),\n emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n icon: AccountClockSvg,\n order: 5,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, true, false),\n }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'accept-share',\n displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n iconSvgInline: () => CheckSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'open-in-files',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => [\n sharesViewId,\n sharedWithYouViewId,\n sharedWithOthersViewId,\n sharingByLinksViewId,\n // Deleted and pending shares are not\n // accessible in the files app.\n ].includes(view.id),\n async exec(node) {\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'reject-share',\n displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n iconSvgInline: () => CloseSvg,\n enabled: (nodes, view) => {\n if (view.id !== pendingSharesViewId) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // disable rejecting group shares from the pending list because they anyway\n // land back into that same list after rejecting them\n if (nodes.some(node => node.attributes.remote_id\n && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n return false;\n }\n return true;\n },\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.delete(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 2,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'restore-share',\n displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n iconSvgInline: () => ArrowULeftTopSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n async exec(node) {\n try {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\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: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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 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/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\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/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst generateAvatarSvg = (userId) => {\n const avatarUrl = generateUrl('/avatar/{userId}/32', { userId });\n return `<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\"\n\t\txmlns=\"http://www.w3.org/2000/svg\" class=\"sharing-status__avatar\">\n\t\t<image href=\"${avatarUrl}\" height=\"32\" width=\"32\" />\n\t</svg>`;\n};\nexport const action = new FileAction({\n id: 'sharing-status',\n displayName(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n const ownerId = node?.attributes?.['owner-id'];\n if (shareTypes.length > 0\n || (ownerId && ownerId !== getCurrentUser()?.uid)) {\n return t('files_sharing', 'Shared');\n }\n return '';\n },\n title(nodes) {\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const ownerDisplayName = node?.attributes?.['owner-display-name'];\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types'])) {\n return t('files_sharing', 'Shared multiple times with different people');\n }\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n }\n return t('files_sharing', 'Show sharing options');\n },\n iconSvgInline(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types'])) {\n return AccountPlusSvg;\n }\n // Link shares\n if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n return LinkSvg;\n }\n // Group shares\n if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n return AccountGroupSvg;\n }\n // Circle shares\n if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n return CircleSvg;\n }\n const ownerId = node?.attributes?.['owner-id'];\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return generateAvatarSvg(ownerId);\n }\n return AccountPlusSvg;\n },\n enabled(nodes) {\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const isMixed = Array.isArray(node.attributes?.['share-types']);\n // If the node is shared multiple times with\n // different share types to the current user\n if (isMixed) {\n return true;\n }\n // If the node is shared by someone else\n if (ownerId && ownerId !== getCurrentUser()?.uid) {\n return true;\n }\n return (node.permissions & Permission.SHARE) !== 0;\n },\n async exec(node, view, dir) {\n // You need read permissions to see the sidebar\n if ((node.permissions & Permission.READ) !== 0) {\n window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n return sidebarAction.exec(node, view, dir);\n }\n return null;\n },\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { registerDavProperty } from '@nextcloud/files';\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\nregisterDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' });\nregisterDavProperty('oc:share-types', { oc: 'http://owncloud.org/ns' });\nregisterDavProperty('ocs:share-permissions', { ocs: 'http://open-collaboration-services.org/ns' });\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, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tmax-height: 32px !important;\\n\\tmax-width: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__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 = 5928;","__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\t5928: 0\n};\n\n// no chunk on demand loading\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, [4208], () => (__webpack_require__(5924)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","logger","user","setApp","build","setUid","uid","DefaultType","DefaultType2","FileAction","_action","constructor","action","this","validateAction","id","displayName","title","iconSvgInline","enabled","exec","execBatch","order","parent","default","inline","renderInline","Error","Object","values","includes","registerFileAction","window","_nc_fileactions","debug","find","search","error","push","Permission","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","oc","ocs","registerDavProperty","prop","namespace","_nc_dav_properties","_nc_dav_namespaces","namespaces","warn","startsWith","split","length","FileType","FileType2","isDavRessource","source","davService","match","validateData","data","URL","e","mtime","Date","crtime","mime","size","permissions","NONE","ALL","owner","attributes","root","service","join","status","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","entries","getOwnPropertyDescriptors","prototype","filter","get","map","handler","set","target","value","updateMtime","Reflect","deleteProperty","receiver","Proxy","update","replace","encodedSource","origin","slice","basename","extension","extname","dirname","pop","firstMatch","indexOf","url","pathname","READ","path","fileid","move","destination","rename","basename2","name","TypeError","File","type","Folder","super","_oc_config","blacklist_files_regex","RegExp","Navigation","_views","_currentView","register","view","remove","index","findIndex","splice","views","setActive","active","getNavigation","_nc_navigation","Column","_column","column","isValidColumn","render","sort","summary","validator$2","util$3","exports","nameStartChar","nameRegexp","regexName","isExist","v","isEmptyObject","obj","keys","merge","a","arrayMode","len","i","getValue","isName","string","getAllMatches","regex","matches","allmatches","startIndex","lastIndex","util$2","defaultOptions$2","allowBooleanAttributes","unpairedTags","isWhiteSpace","char","readPI","xmlData","start","tagname","substr","getErrorObject","getLineNumberForPosition","readCommentAndCDATA","angleBracketsCount","validate","options","assign","tags","tagFound","reachedRoot","err","tagStartPos","closingTag","tagName","trim","substring","msg","result","readAttributeStr","attrStr","attrStrStart","isValid","validateAttributeString","code","line","tagClosed","otg","openPos","col","afterAmp","validateAmpersand","JSON","stringify","t","doubleQuote","singleQuote","startChar","validAttrStrRegxp","attrNames","getPositionFromMatch","attrName","validateAttrName","hasOwnProperty","re","validateNumberAmpersand","count","message","lineNumber","lines","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","val2","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","attrs","buildOptions","defaultOptions","util$1","readEntityExp","entityName2","isComment","isEntity","isElement","isAttlist","isNotation","validateEntityName","hexRegex","numRegex","Number","parseInt","parseFloat","consider","decimalPoint","util","xmlNode","child","add","key","addChild","node","readDocType","entities","hasBody","comment","exp","entityName","val","regx","toNumber","str","trimmedStr","skipLike","test","sign","numTrimmedByZeros","numStr","num","addExternalEntities","externalEntities","entKeys","ent","lastEntities","parseTextData","dontTrim","hasAttributes","isLeafNode","escapeEntities","replaceEntitiesValue","newval","parseValue","resolveNameSpace","prefix","charAt","attrsRegx","buildAttributesMap","oldVal","aName","newVal","attrCollection","parseXml","xmlObj","currentNode","textData","closeIndex","findClosingIndex","colonIndex","saveTextToParentTag","lastTagName","lastIndexOf","propIndex","tagsNodeStack","tagData","readTagExp","childNode","tagExp","attrExpPresent","endIndex","docTypeEntities","rawTagName","lastTag","isItStopNode","tagContent","result2","readStopNodeData","replaceEntitiesValue$1","entity","ampEntity","currentTagName","allNodesExp","stopNodePath","stopNodeExp","errMsg","closingIndex","closingChar","attrBoundary","ch","tagExpWithClosingIndex","separatorIndex","trimStart","openTagCount","shouldParse","node2json","compress","arr","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","Array","attrMap","jpath","atrrName","propCount","prettify","OrderedObjParser2","_","String","fromCharCode","validator$1","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attr","attrVal","suppressBooleanAttributes","textValue","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","repeat","jObj","arrayNodeName","call","buildAttrPairStr","arrLen","listTagVal","j","item","Ks","L","closeTag","tagEndExp","piClosingChar","fxp","XMLParser","parse","validationOption","toString","orderedObjParser","orderedResult","addEntity","XMLValidator","XMLBuilder","View","_view","isValidView","caption","emptyTitle","emptyCaption","getContents","icon","params","columns","emptyView","sticky","expanded","defaultSortKey","jsonObject","parser","some","x","toLowerCase","isSvg","forEach","getLoggerBuilder","detectUser","rootPath","concat","_getCurrentUser","getCurrentUser","headers","ocsEntryToNode","ocsEntry","_ocsEntry$tags","isFolder","item_type","hasPreview","has_preview","file_source","file_target","generateRemoteUrl","replaceAll","item_mtime","undefined","stime","uid_owner","mimetype","item_size","item_permissions","displayname_owner","share_type","favorite","OC","TAG_FAVORITE","getShares","shared_with_me","arguments","generateOcsUrl","axios","include_tags","async","_getCurrentUser2","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","contents","Promise","all","response","flat","nodes","_node$attributes","reduce","acc","curr","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","n","isRemote","remote","shareBase","post","emit","dir","OCP","Files","Router","goToRoute","HIDDEN","remote_id","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","_window","_ref","_nodes$0$root","OCA","Sidebar","open","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","_node$attributes2","shareTypes","ownerId","_node$attributes3","_node$attributes4","_node$attributes5","ownerDisplayName","_node$attributes6","_node$attributes7","_node$attributes8","_getCurrentUser3","AccountPlusSvg","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","avatarUrl","generateUrl","generateAvatarSvg","_node$attributes9","_node$attributes10","_getCurrentUser4","SHARE","_window$OCA","_window$OCA$setActive","setActiveTab","sidebarAction","registerSharingViews","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","r","getter","__esModule","definition","o","defineProperty","enumerable","resolve","g","globalThis","Function","Symbol","toStringTag","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file |