Congratulations, github.com/nextcloud/text is REUSE compliant! This project adopts the recommendations to make software licensing easy for humans and machines alike.
To add the badge to your project's README.md
file,
use the following snippet:
[](https://api.reuse.software/info/github.com/nextcloud/text)
The API provides machine-readable artifacts for automatic analysis.
reuse spdx
command.
Commit 8c0aabb08032243579dbeb9441f493e767954874
was checked on 04 Aug 2025 02:44:23 UTC
with the following result:
reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { registerDavProperty, registerFileListHeaders } from '@nextcloud/files'\nimport { loadState } from '@nextcloud/initial-state'\nimport { addMenuRichWorkspace, FilesWorkspaceHeader } from './helpers/files.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\n\nregisterDavProperty('nc:rich-workspace', { nc: 'http://nextcloud.org/ns' })\nregisterDavProperty('nc:rich-workspace-file', { nc: 'http://nextcloud.org/ns' })\n\nif (workspaceAvailable) {\n\taddMenuRichWorkspace()\n\tregisterFileListHeaders(FilesWorkspaceHeader)\n}\n"],"names":["workspaceAvailable","loadState","registerDavProperty","addMenuRichWorkspace","registerFileListHeaders","FilesWorkspaceHeader"],"mappings":"sgBAWA,MAAMA,EAAqBC,EAAU,OAAQ,qBAAqB,EAElEC,EAAoB,oBAAqB,CAAE,GAAI,yBAA2B,CAAA,EAC1EA,EAAoB,yBAA0B,CAAE,GAAI,yBAA2B,CAAA,EAE3EF,IACHG,EAAoB,EACpBC,EAAwBC,CAAoB"' reuse.extract - ERROR - 'js/text-init.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Get instance of Editor component\n * Using singleton approach here to avoid duplicate yjs import error\n * @return {Promise<*>}\n */\nexport default async function getEditorInstance() {\n\tif (!window._nc_text_editor_instance) {\n\t\tif (window._nc_text_editor_importing) {\n\t\t\treturn await new Promise((resolve) => {\n\t\t\t\tconst intervalId = setInterval(() => {\n\t\t\t\t\tif (!window._nc_text_editor_instance) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tresolve(window._nc_text_editor_instance)\n\t\t\t\t\tclearInterval(intervalId)\n\t\t\t\t}, 200)\n\t\t\t})\n\t\t} else {\n\t\t\twindow._nc_text_editor_importing = true\n\t\t}\n\t\tconst Editor = await import(/* webpackChunkName: \"editor\" */ './Editor.vue')\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst EditorConstructor = Vue.extend(Editor.default)\n\t\twindow._nc_text_editor_instance = EditorConstructor\n\t}\n\treturn window._nc_text_editor_instance\n}\n"],"file":"js/Editor.singleton-LCXsMxMn.chunk.mjs"' reuse.extract - ERROR - 'js/Editor.singleton-LCXsMxMn.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcPopover class=\"session-list\" placement=\"bottom\">\n\t\t<template #trigger=\"{ attrs }\">\n\t\t\t<div>\n\t\t\t\t<NcButton\n\t\t\t\t\t:title=\"label\"\n\t\t\t\t\t:aria-label=\"label\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tclass=\"avatar-list\"\n\t\t\t\t\tv-bind=\"attrs\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AccountMultipleOutlineIcon :size=\"20\" />\n\t\t\t\t\t\t<AvatarWrapper\n\t\t\t\t\t\t\tv-for=\"session in sessionsVisible\"\n\t\t\t\t\t\t\t:key=\"session.id\"\n\t\t\t\t\t\t\t:session=\"session\"\n\t\t\t\t\t\t\t:size=\"28\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</template>\n\t\t<template #default>\n\t\t\t<div class=\"session-menu\">\n\t\t\t\t<slot name=\"lastSaved\" />\n\t\t\t\t<ul>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<li\n\t\t\t\t\t\tv-for=\"session in participantsPopover\"\n\t\t\t\t\t\t:key=\"session.id\"\n\t\t\t\t\t\t:style=\"avatarStyle(session)\">\n\t\t\t\t\t\t<AvatarWrapper :session=\"session\" :size=\"36\" />\n\t\t\t\t\t\t<span class=\"session-label\">\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tsession.userId\n\t\t\t\t\t\t\t\t\t? session.displayName\n\t\t\t\t\t\t\t\t\t: session.guestName\n\t\t\t\t\t\t\t\t\t\t? session.guestName\n\t\t\t\t\t\t\t\t\t\t: t('text', 'Guest')\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-if=\"session.userId === null\" class=\"guest-label\"\n\t\t\t\t\t\t\t>({{ t('text', 'guest') }})</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\t:checked=\"isFullWidth\"\n\t\t\t\t\t\t\t@update:checked=\"onWidthToggle\">\n\t\t\t\t\t\t\t{{ t('text', 'Full width editor') }}\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'\nimport NcPopover from '@nextcloud/vue/components/NcPopover'\nimport AccountMultipleOutlineIcon from 'vue-material-design-icons/AccountMultipleOutline.vue'\nimport {\n\tCOLLABORATOR_DISCONNECT_TIME,\n\tCOLLABORATOR_IDLE_TIME,\n} from '../../services/SyncService.ts'\nimport AvatarWrapper from './AvatarWrapper.vue'\n\nexport default {\n\tname: 'SessionList',\n\tcomponents: {\n\t\tAccountMultipleOutlineIcon,\n\t\tAvatarWrapper,\n\t\tNcButton,\n\t\tNcPopover,\n\t\tNcCheckboxRadioSwit' reuse.extract - ERROR - 'js/SessionList-gp35kWjj.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<form\n\t\t:title=\"t('text', 'Enter your name so other people can see who is editing')\"\n\t\tclass=\"guest-name-dialog\"\n\t\t@submit.prevent=\"setGuestName()\">\n\t\t<label><AvatarWrapper :session=\"session\" :size=\"32\" /></label>\n\t\t<input\n\t\t\tv-model=\"guestName\"\n\t\t\ttype=\"text\"\n\t\t\t:aria-label=\"t('text', 'Edit guest name')\"\n\t\t\t:placeholder=\"t('text', 'Guest')\" />\n\t\t<input\n\t\t\ttype=\"submit\"\n\t\t\tclass=\"icon-confirm\"\n\t\t\t:aria-label=\"t('text', 'Save guest name')\"\n\t\t\tvalue=\"\" />\n\t</form>\n</template>\n\n<script>\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { useSyncService } from '../../composables/useSyncService.ts'\nimport AvatarWrapper from './AvatarWrapper.vue'\n\nexport default {\n\tname: 'GuestNameDialog',\n\tcomponents: {\n\t\tAvatarWrapper,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst { syncService } = useSyncService()\n\t\treturn { syncService }\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tguestName: '',\n\t\t\tguestNameBuffered: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tconst size = 32\n\t\t\tconst avatarUrl = generateUrl('/avatar/guest/{user}/{size}', {\n\t\t\t\tuser: this.guestNameBuffered,\n\t\t\t\tsize,\n\t\t\t})\n\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.guestName = this.syncService.guestName\n\t\tthis.updateBufferedGuestName()\n\t},\n\tmethods: {\n\t\tsetGuestName() {\n\t\t\tconst previousGuestName = this.syncService.guestName\n\t\t\tthis.syncService\n\t\t\t\t.updateSession(this.guestName)\n\t\t\t\t.then(() => {\n\t\t\t\t\tlocalStorage.setItem('nick', this.guestName)\n\t\t\t\t\tthis.updateBufferedGuestName()\n\t\t\t\t})\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tthis.guestName = previousGuestName\n\t\t\t\t})\n\t\t},\n\t\tupdateBufferedGuestName() {\n\t\t\tthis.guestNameBuffered = this.guestName\n\t\t},\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\nform.guest-name-dialog {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: 6px;\n\n\t&:deep(img) {\n\t\tmargin: 0 !important;\n\t}\n\n\tinput[type='text'] {\n\t\tflex-grow: 1;\n\t}\n\tlabel {\n\t\tpadding-right: 3px;\n\t\theight: 32px;\n\t}\n}\n</style>\n"],"names":["_sfc_main","AvatarWrapper","syncService","useSyncService","avatarUrl","generateUrl","previousGuestName","e","t"],"mappings":"snBA8BA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CACA,cAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EACA,OAAA,CACA,KAAA,CAAA,YAAAC,CAAA,EAAAC,EAAA,EACA,MAAA,CAAA,YAAAD,CAAA,CACA,EACA,MAAA,CACA,MAAA,CACA,UAAA,GACA,kBAAA,EACA,CACA,EACA,SAAA,CACA,WAAA,CAEA,MAAAE,EAAAC,EAAA,8BAAA,CACA,KAAA,KAAA,kBACA,KACA,EAAA,CAAA,EACA,OAAA,OAAA,SAAA,SAAA,KAAA,OAAA,SAAA,KAAAD,CACA,CACA,EACA,aAAA,CACA,KAAA,UAAA,KAAA,YAAA,UACA,KAAA,wBAAA,CACA,EACA,QAAA,CACA,cAAA,CACA,MAAAE,EAAA,KAAA,YAAA,UACA,KAAA,YACA,cAAA,KAAA,SAAA,EACA,KAAA,IAAA,CACA,aAAA,QAAA,OAAA,KAAA,SAAA,EACA,KAAA,wBAAA,CACA,CAAA,EACA,MAAAC,GAAA,CACA,KAAA,UAAAD,CACA,CAAA,CACA,EACA,yBAAA,CACA,KAAA,kBAAA,KAAA,SACA,EACA,EAAAE,CACA,CACA"' reuse.extract - ERROR - 'js/GuestNameDialog-BgxNZ7LR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n<template>\n\t<div id=\"files-setting-richworkspace\">\n\t\t<NcCheckboxRadioSwitch\n\t\t\t:checked.sync=\"showWorkspace\"\n\t\t\t@update:checked=\"toggle\">\n\t\t\t{{ t('text', 'Show folder description') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'\n\nexport default {\n\tname: 'FilesSettings',\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tshowWorkspace: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggle() {\n\t\t\t// FIXME: save to app config\n\t\t\tif (this.showWorkspace) {\n\t\t\t\temit('Text::showRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '1',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\temit('Text::hideRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '0',\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tt,\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcCheckboxRadioSwitch","emit","axios","generateUrl","t"],"mappings":"4XAqBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,sBAAAC,CACA,EACA,MAAA,CACA,MAAA,CACA,cAAA,IAAA,KAAA,oBACA,CACA,EACA,QAAA,CACA,QAAA,CAEA,KAAA,eACAC,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,IAEAF,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,EAEA,EACA,EAAAC,CACA,CACA"' reuse.extract - ERROR - 'js/FilesSettings-DBTBQ9z-.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nconst openMimetypesMarkdown = ['text/markdown', 'text/x-web-markdown']\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/asciidoc',\n\t'text/css',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-nfo',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nif (!OC.appswebroots?.richdocuments && !OC.appswebroots?.onlyoffice) {\n\topenMimetypesPlainText.push('text/csv')\n}\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport { openMimetypes, openMimetypesMarkdown, openMimetypesPlainText }\n"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes"],"mappings":"MAKMA,EAAwB,CAAC,gBAAiB,qBAAqB,EAE/DC,EAAyB,CAC9B,aACA,kBACA,sBACA,8BACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,gBACA,WACA,YACA,WACA,WACA,gBACA,WACA,qBACA,cACA,aACA,gBACA,oBACD,EAEI,CAAC,GAAG,cAAc,eAAiB,CAAC,GAAG,cAAc,YACxDA,EAAuB,KAAK,UAAU,EAGlC,MAACC,EAAgB,CAAC,GAAGF,EAAuB,GAAGC,CAAsB"' reuse.extract - ERROR - 'js/mime-DDg3sTIz.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nimport { logger } from './helpers/logger.js'\nimport { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'\n\n/**\n * Wrapper for async registration of ViewerComponent.\n * Note: it should be named function - the name is used for component registration.\n *\n * @return {Promise<import('./components/ViewerComponent.vue')>} ViewerComponent\n */\nfunction AsyncTextViewerComponent() {\n\treturn import('./components/ViewerComponent.vue')\n}\n\nif (typeof OCA.Viewer === 'undefined') {\n\tlogger.error('Viewer app is not installed')\n} else {\n\tOCA.Viewer.registerHandler({\n\t\tid: 'text',\n\t\tmimes: [...openMimetypesMarkdown, ...openMimetypesPlainText],\n\t\tcomponent: AsyncTextViewerComponent,\n\t\tgroup: null,\n\t\ttheme: 'default',\n\t\tcanCompare: true,\n\t})\n}\n"],"file":"js/text-viewer.mjs"' reuse.extract - ERROR - 'js/text-viewer.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateUrl } from '@nextcloud/router'\n\nconst domHref = function (node, relativePath) {\n\tconst ref = node.attrs.href\n\tif (!ref) {\n\t\treturn ref\n\t}\n\tif (!window.OCA?.Viewer) {\n\t\treturn ref\n\t}\n\tif (ref.match(/^[a-zA-Z]*:/)) {\n\t\treturn ref\n\t}\n\tif (ref.startsWith('#')) {\n\t\treturn ref\n\t}\n\t// Don't rewrite links in collectives app context\n\tif (loadState('core', 'active-app', '') === 'collectives') {\n\t\treturn ref\n\t}\n\t// Don't rewrite links to the collectives app\n\tif (ref.includes('/apps/collectives/')) {\n\t\treturn ref\n\t}\n\n\t// Rewrite links with old format from file picker to `/f/<fileId>`\n\tconst match = ref.match(/^([^?]*)\\?fileId=(\\d+)/)\n\tif (match) {\n\t\tconst [, , id] = match\n\t\treturn new URL(generateUrl(`/f/${id}`), window.origin).href\n\t}\n\treturn ref\n}\n\nconst parseHref = function (dom) {\n\tconst ref = dom.getAttribute('href')\n\tif (!ref) {\n\t\treturn ref\n\t}\n\tconst match = ref.match(/\\?dir=([^&]*)&openfile=([^&]*)#relPath=([^&]*)/)\n\tif (match) {\n\t\tconst [, , id] = match\n\t\treturn new URL(generateUrl(`/f/${id}`), window.origin).href\n\t}\n\treturn ref\n}\n\nconst isLinkToSelfWithHash = function (href) {\n\tconst locationNoHash =\n\t\twindow.location.origin + window.location.pathname + window.location.search\n\treturn href?.startsWith('#') || href?.startsWith(locationNoHash + '#')\n}\n\n/**\n * Open links, to be used as custom click handler\n *\n * @param {string} href the link href\n */\nconst openLink = function (href) {\n\tconst linkUrl = new URL(href, window.location.href)\n\t// Consider rerouting links to Collectives if already inside Collectives app\n\tconst collectivesUrlBase = '/apps/collectives'\n\tif (\n\t\twindow.OCA.Collectives?.vueRouter\n\t\t&& linkUrl.pathname.toString().startsWith(generateUrl(collectivesUrlBase))\n\t) {\n\t\tconst collectivesUrl = linkUrl.href.substring(\n\t\t\tlinkUrl.href.indexOf(collectivesUrlBase) + collectivesUrlBase.length,\n\t\t)\n\t\twindow.OCA.Collectives.vueRouter.push(collectivesUrl)\n\t\treturn\n\t}\n\twindow.open(linkUrl, '_blank')\n}\n\nexport { domHref, isLinkToSelfWithHash, openLink, parseHref }\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { openLink } from '../helpers/links.js'\nimport { logger } from '../helpers/logger.js'\n\nexport const FILE = Symbol('editor:file')\nexport const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')\nexport const IS_MOBILE = Symbol('editor:is-mobile')\nexport const EDITOR_UPLOAD = Symbol('editor:upload')\nexport const HOOK_MENTION_SEARCH = Symbol('hook:mention-search')\nexport const HOOK_MENTION_INSERT = Symbol('hook:mention-insert')\nexport const OPEN_LINK_HANDLER = Symbol('editor:open-link-handler')\n\nexport const useIsMobileMixin = {\n\tinject: {\n\t\t$isMobile: { from: IS_MOBILE, default: false },\n\t},\n}\n\nexport const useFileMixin = {\n\tinject: {\n\t\t$file: {\n\t\t\tfrom: FILE,\n\t\t\tdefault: () => ({\n\t\t\t\tfileId: 0,\n\t\t\t\trelativePath: null,\n\t\t\t\tdocument: null,\n\t\t\t}),\n\t\t},\n\t},\n}\n\nexport const useAttachmentResolver = {\n\tinject: {\n\t\t$attachmentResolver: {\n\t\t\tfrom: ATTACHMENT_RESOLVER,\n\t\t\tdefault: {\n\t\t\t\tresolve(src: string) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t'No attachment resolver provided. Some attachment sources cannot be resolved.',\n\t\t\t\t\t)\n\t\t\t\t\treturn [src]\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n}\nexport const useEditorUpload = {\n\tinject: {\n\t\t$editorUpload: {\n\t\t\tfrom: EDITOR_UPLOAD,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\nexport const useMentionHook = {\n\tinject: {\n\t\t$mentionHookIns' reuse.extract - ERROR - 'js/MediaHandler.provider-BkVIW0cW.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<Editor\n\t\tv-if=\"!useSourceView\"\n\t\t:file-id=\"fileid\"\n\t\t:relative-path=\"filename\"\n\t\t:active=\"active || isEmbedded\"\n\t\t:autofocus=\"autofocus\"\n\t\t:share-token=\"shareToken\"\n\t\t:class=\"{ 'text-editor--embedding': isEmbedded }\"\n\t\t:mime=\"mime\"\n\t\t:show-outline-outside=\"showOutlineOutside\" />\n\t<div\n\t\tv-else\n\t\tid=\"editor-container\"\n\t\tdata-text-el=\"editor-container\"\n\t\tclass=\"text-editor source-viewer\">\n\t\t<Component\n\t\t\t:is=\"readerComponent\"\n\t\t\t:content=\"content\"\n\t\t\t:file-id=\"fileid\"\n\t\t\t:read-only=\"true\"\n\t\t\t:show-menu-bar=\"false\" />\n\t\t<NcButton v-if=\"isEmbedded\" class=\"toggle-interactive\" @click=\"toggleEdit\">\n\t\t\t{{ t('text', 'Edit') }}\n\t\t\t<template #icon>\n\t\t\t\t<PencilOutlineIcon />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { getClient, getRootPath } from '@nextcloud/files/dav'\nimport { t } from '@nextcloud/l10n'\nimport { getSharingToken } from '@nextcloud/sharing/public'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport Vue from 'vue'\nimport PencilOutlineIcon from 'vue-material-design-icons/PencilOutline.vue'\nimport MarkdownContentEditor from './Editor/MarkdownContentEditor.vue'\nimport PlainTextReader from './PlainTextReader.vue'\n\nimport getEditorInstance from './Editor.singleton.js'\n\nexport default {\n\tname: 'ViewerComponent',\n\tcomponents: {\n\t\tNcButton: Vue.extend(NcButton),\n\t\tPencilOutlineIcon: Vue.extend(PencilOutlineIcon),\n\t\tPlainTextReader: Vue.extend(PlainTextReader),\n\t\tMarkdownContentEditor: Vue.extend(MarkdownContentEditor),\n\t\tEditor: getEditorInstance,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\tisEmbedded: this.isEmbedded,\n\t\t}\n\t},\n\tprops: {\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tautofocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: () => getSharingToken(),\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tshowOutlineOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpermissions: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\tisEmbedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcontent: '',\n\t\t\thasToggledInteractiveEmbedding: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\t/** @return {boolean} */\n\t\tuseSourceView() {\n\t\t\treturn (\n\t\t\t\tthis.source\n\t\t\t\t&& (this.fileVersion\n\t\t\t\t\t|| !this.fileid\n\t\t\t\t\t|| this.isEmbedded\n\t\t\t\t\t|| this.isEncrypted)\n\t\t\t\t&& !this.hasToggledInteractiveEmbedding\n\t\t\t)\n\t\t},\n\n\t\tisEncrypted() {\n\t\t\treturn this.$attrs.e2EeIsEncrypted || false\n\t\t},\n\n\t\tisMarkdown() {\n\t\t\treturn (\n\t\t\t\tthis.mime === 'text/markdown' || this.mime === 'text/x-web-markdown'\n\t\t\t)\n\t\t},\n\n\t\t/** @return {boolean} */\n\t\treaderComponent() {\n\t\t\treturn this.isMarkdown ? MarkdownContentEditor : PlainTextReader\n\t\t},\n\t},\n\n\twatch: {\n\t\tsource() {\n\t\t\tthis.loadFileContent()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadFileContent()\n\t},\n\n\tmethods: {\n\t\tasync loadFileContent() {\n\t\t\tif (this.useSourceView) {\n\t\t\t\tif (this.isEncrypted) {\n\t\t\t\t\tthis.content = await this.fetchDecryptedContent()\n\t\t\t\t\tthis.contentLoaded = true\n\t\t\t\t} else {\n\t\t\t\t\tconst response = await axios.get(this.source)\n\t\t\t\t\tthis.content = response.data\n\t\t\t\t\tthis.contentLoaded = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.$emit('upd' reuse.extract - ERROR - 'js/ViewerComponent-BF09hFsw.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader\n\t\t:content=\"content\"\n\t\t@click-link=\"(e, a) => $emit('click-link', e, a)\" />\n</template>\n\n<script>\nimport { RichText } from './../extensions/index.js'\nimport markdownit from './../markdownit/index.js'\nimport BaseReader from './BaseReader.vue'\n\nexport default {\n\tname: 'RichTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn markdownit.render(content)\n\t\t},\n\t\textensions() {\n\t\t\treturn [\n\t\t\t\tRichText.configure({\n\t\t\t\t\tediting: false,\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import './../css/prosemirror';\n@import './../css/print';\n</style>\n"],"names":["_sfc_main","BaseReader","content","markdownit","RichText"],"mappings":"mLAgBA,MAAAA,EAAA,CACA,KAAA,iBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,OAAAC,EAAA,OAAAD,CAAA,CACA,EACA,YAAA,CACA,MAAA,CACAE,EAAA,UAAA,CACA,QAAA,EACA,CAAA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/RichTextReader-iVzxp__I.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'GPL-3.0-or-later\n */\n/**\n * @param app app ID, e.g. \"mail\"\n * @param key name of the property\n * @param fallback optional parameter to use as default value\n * @throws if the key can't be found\n */\nexport function loadState(app, key, fallback) {\n const selector = `#initial-state-${app}-${key}`;\n if (window._nc_initial_state?.has(selector)) {\n return window._nc_initial_state.get(selector);\n }\n else if (!window._nc_initial_state) {\n window._nc_initial_state = new Map();\n }\n const elem = document.querySelector(selector);\n if (elem === null) {\n if (fallback !== undefined) {\n return fallback;\n }\n throw new Error(`Could not find initial state ${key} of ${app}`);\n }\n try {\n const parsedValue = JSON.parse(atob(elem.value));\n window._nc_initial_state.set(selector, parsedValue);\n return parsedValue;\n }\n catch (error) {\n console.error('[@nextcloud/initial-state] Could not parse initial state', { key, app, error });\n if (fallback !== undefined) {\n return fallback;\n }\n throw new Error(`Could not parse initial state ${key} of ${app}`, { cause: error });\n }\n}\n"],"names":["loadState","app","key","fallback","selector","elem","parsedValue","error"],"mappings":"AAUO,SAASA,EAAUC,EAAKC,EAAKC,EAAU,CAC1C,MAAMC,EAAW,kBAAkBH,CAAG,IAAIC,CAAG,GAC7C,GAAI,OAAO,mBAAmB,IAAIE,CAAQ,EACtC,OAAO,OAAO,kBAAkB,IAAIA,CAAQ,EAEtC,OAAO,oBACb,OAAO,kBAAoB,IAAI,KAEnC,MAAMC,EAAO,SAAS,cAAcD,CAAQ,EAC5C,GAAIC,IAAS,KAAM,CACf,GAAIF,IAAa,OACb,OAAOA,EAEX,MAAM,IAAI,MAAM,gCAAgCD,CAAG,OAAOD,CAAG,EAAE,CACvE,CACI,GAAI,CACA,MAAMK,EAAc,KAAK,MAAM,KAAKD,EAAK,KAAK,CAAC,EAC/C,cAAO,kBAAkB,IAAID,EAAUE,CAAW,EAC3CA,CACf,OACWC,EAAO,CAEV,GADA,QAAQ,MAAM,2DAA4D,CAAE,IAAAL,EAAK,IAAAD,EAAK,MAAAM,EAAO,EACzFJ,IAAa,OACb,OAAOA,EAEX,MAAM,IAAI,MAAM,iCAAiCD,CAAG,OAAOD,CAAG,GAAI,CAAE,MAAOM,EAAO,CAC1F,CACA","x_google_ignoreList":[0]' reuse.extract - ERROR - 'js/index-B8nYQ_zQ.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'GPL-3.0-or-later\n */\nfunction isPublicShare() {\n return loadState(\"files_sharing\", \"isPublic\", null) ?? document.querySelector('input#isPublic[type=\"hidden\"][name=\"isPublic\"][value=\"1\"]') !== null;\n}\nfunction getSharingToken() {\n return loadState(\"files_sharing\", \"sharingToken\", null) ?? document.querySelector('input#sharingToken[type=\"hidden\"]')?.value ?? null;\n}\nexport {\n getSharingToken,\n isPublicShare\n};\n//# sourceMappingURL=public.mjs.map\n","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw ne' reuse.extract - ERROR - 'js/NcNoteCard-C6xb7vi0-Ccg9J-_X.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { emit } from '@nextcloud/event-bus'\nimport {\n\taddNewFileMenuEntry,\n\tFile,\n\tHeader,\n\tNewMenuEntryC' reuse.extract - ERROR - 'js/files-BDGi6cq2.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" />\n</template>\n\n<script>\nimport escapeHtml from 'escape-html'\nimport { PlainText } from './../extensions/index.js'\nimport BaseReader from './BaseReader.vue'\n\nexport default {\n\tname: 'PlainTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn '<pre>' + escapeHtml(content) + '</pre>'\n\t\t},\n\t\textensions: () => [PlainText],\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","BaseReader","content","escapeHtml","PlainText"],"mappings":"mOAcA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,MAAA,QAAAC,EAAAD,CAAA,EAAA,QACA,EACA,WAAA,IAAA,CAAAE,CAAA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/PlainTextReader-a4wPKNQh.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nOCA.Text = {\n\tRichWorkspaceEnabled: loadState('text', 'workspace_available'),\n\tOpenReadOnlyEnabled: loadState('text', 'open_read_only_enabled'),\n}\n"],"names":["loadState"],"mappings":"+CAOA,IAAI,KAAO,CACV,qBAAsBA,EAAU,OAAQ,qBAAqB,EAC7D,oBAAqBA,EAAU,OAAQ,wBAAwB,CAChE"' reuse.extract - ERROR - 'js/text-public.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<RichTextReader v-if=\"isRichEditor\" :content=\"content\" />\n\t<PlainTextReader v-else :content=\"content\" />\n</template>\n\n<script>\nimport PlainTextReader from './PlainTextReader.vue'\nimport RichTextReader from './RichTextReader.vue'\n\nexport default {\n\tname: 'Reader',\n\tcomponents: { PlainTextReader, RichTextReader },\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n#read-only-editor {\n\toverflow: scroll;\n}\n\n.thumbnailContainer #read-only-editor {\n\twidth: 100%;\n\n\t.ProseMirror {\n\t\theight: auto;\n\t\tmargin: 0 0 0 0;\n\t\tpadding: 0;\n\t}\n}\n</style>\n"],"names":["_sfc_main","PlainTextReader","RichTextReader"],"mappings":"orBAcA,MAAAA,EAAA,CACA,KAAA,SACA,WAAA,CAAA,gBAAAC,EAAA,eAAAC,CAAA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/Reader-BdwF-7BZ.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcModal v-if=\"active\" :name=\"fileName\" @close=\"close\">\n\t\t<Editor\n\t\t\t:file-id=\"fileId\"\n\t\t\t:relative-path=\"relativePath\"\n\t\t\t:active=\"active\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"mimeType\" />\n\t</NcModal>\n</template>\n\n<script>\nimport NcModal from '@nextcloud/vue/components/NcModal'\n\nexport default {\n\tname: 'PublicFilesEditor',\n\tcomponents: {\n\t\tNcModal,\n\t\tEditor: () => import(/* webpackChunkName: \"editor\" */ './Editor.vue'),\n\t},\n\tprops: {\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\trelativePath: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tmimeType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\tfileName() {\n\t\t\treturn this.relativePath.substring(\n\t\t\t\tthis.relativePath.lastIndexOf('/') + 1,\n\t\t\t)\n\t\t},\n\t},\n\tmethods: {\n\t\tclose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n"],"file":"js/PublicFilesEditor-CF2nm1d0.chunk.mjs"' reuse.extract - ERROR - 'js/PublicFilesEditor-CF2nm1d0.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"avatar-wrapper\" :style=\"sessionAvatarStyle\">\n\t\t<NcAvatar\n\t\t\tv-if=\"session.userId\"\n\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t:disable-menu=\"true\"\n\t\t\thide-status\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:size=\"size\" />\n\t\t<div v-else class=\"avatar\" :style=\"sessionBackgroundStyle\">\n\t\t\t{{ guestInitial }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nexport default {\n\tname: 'AvatarWrapper',\n\tcomponents: {\n\t\tNcAvatar,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: () => 32,\n\t\t},\n\t},\n\tcomputed: {\n\t\tsessionAvatarStyle() {\n\t\t\treturn {\n\t\t\t\t...this.sessionBackgroundStyle,\n\t\t\t\t'border-color': this.session.color,\n\t\t\t\t'border-width': '2px',\n\t\t\t\t'border-style': 'solid',\n\t\t\t\t'--size': this.size + 'px',\n\t\t\t\t'--font-size': this.size / 2 + 'px',\n\t\t\t}\n\t\t},\n\t\tsessionBackgroundStyle() {\n\t\t\treturn {\n\t\t\t\t'background-color': this.session.userId\n\t\t\t\t\t? this.session.color + ' !important'\n\t\t\t\t\t: '#b9b9b9',\n\t\t\t}\n\t\t},\n\t\tguestInitial() {\n\t\t\treturn this.session.guestName === ''\n\t\t\t\t? '?'\n\t\t\t\t: this.session.guestName.slice(0, 1).toUpperCase()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.avatar,\n.avatar-wrapper {\n\tborder-radius: 50%;\n\twidth: var(--size);\n\theight: var(--size);\n\ttext-align: center;\n\tcolor: #ffffff;\n\tline-height: var(--size);\n\tfont-size: var(--font-size);\n\tfont-weight: normal;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n</style>\n"],"names":["_sfc_main","NcAvatar"],"mappings":"wHAuBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,SAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,KAAA,CACA,KAAA,OACA,QAAA,IAAA,EACA,CACA,EACA,SAAA,CACA,oBAAA,CACA,MAAA,CACA,GAAA,KAAA,uBACA,eAAA,KAAA,QAAA,MACA,eAAA,MACA,eAAA,QACA,SAAA,KAAA,KAAA,KACA,cAAA,KAAA,KAAA,EAAA,IACA,CACA,EACA,wBAAA,CACA,MAAA,CACA,mBAAA,KAAA,QAAA,OACA,KAAA,QAAA,MAAA,cACA,SACA,CACA,EACA,cAAA,CACA,OAAA,KAAA,QAAA,YAAA,GACA,IACA,KAAA,QAAA,UAAA,MAAA,EAAA,CAAA,EAAA,YAAA,CACA,CACA,CACA"' reuse.extract - ERROR - 'js/AvatarWrapper-DubHPYg-.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tdata-text-el=\"editor-content-wrapper\"\n\t\tclass=\"content-wrapper text-editor__content-wrapper\"\n\t\t:class=\"{\n\t\t\t'--show-outline': showOutline,\n\t\t}\">\n\t\t<div v-if=\"showOutline\" class=\"text-editor__content-wrapper__left\">\n\t\t\t<EditorOutline />\n\t\t</div>\n\t\t<EditorContent\n\t\t\tid=\"read-only-editor\"\n\t\t\tclass=\"editor__content text-editor__content\"\n\t\t\t:editor=\"editor\" />\n\t\t<div class=\"text-editor__content-wrapper__right\" />\n\t</div>\n</template>\n\n<script>\nimport { Editor } from '@tiptap/core'\nimport { EditorContent } from '@tiptap/vue-2'\nimport { inject, watch } from 'vue'\nimport { provideEditor } from '../composables/useEditor.ts'\nimport { useEditorMethods } from '../composables/useEditorMethods.ts'\nimport EditorOutline from './Editor/EditorOutline.vue'\nimport {\n\tuseOutlineActions,\n\tuseOutlineStateMixin,\n} from './Editor/Wrapper.provider.js'\n\nexport default {\n\tname: 'BaseReader',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t},\n\n\tmixins: [useOutlineStateMixin, useOutlineActions],\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\t// extensions is a factory building a list of extensions for the editor\n\t\tconst extensions = inject('extensions')\n\t\tconst renderHtml = inject('renderHtml')\n\t\tconst editor = new Editor({\n\t\t\tcontent: renderHtml(props.content),\n\t\t\textensions: extensions(),\n\t\t})\n\t\tprovideEditor(editor)\n\t\twatch(\n\t\t\t() => props.content,\n\t\t\t(content) => {\n\t\t\t\tconsole.warn({ content })\n\t\t\t\teditor.commands.setContent(renderHtml(content), true)\n\t\t\t},\n\t\t)\n\t\tconst { setEditable } = useEditorMethods(editor)\n\t\tsetEditable(false)\n\t\treturn { editor }\n\t},\n\n\tcomputed: {\n\t\tshowOutline() {\n\t\t\treturn this.$outlineState.visible\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.editor?.destroy()\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.editor__content {\n\tmax-width: var(--text-editor-max-width);\n\tmargin: auto;\n\tposition: relative;\n\twidth: 100%;\n}\n\n.text-editor__content-wrapper {\n\t--side-width: calc((100% - var(--text-editor-max-width)) / 2);\n\tdisplay: grid;\n\tgrid-template-columns: 1fr auto;\n\t&.--show-outline {\n\t\tgrid-template-columns: var(--side-width) auto var(--side-width);\n\t}\n\t.text-editor__content-wrapper__left,\n\t.text-editor__content-wrapper__right {\n\t\theight: 100%;\n\t\tposition: relative;\n\t}\n}\n</style>\n"],"names":["_sfc_main","EditorContent","EditorOutline","useOutlineStateMixin","useOutlineActions","props","extensions","inject","renderHtml","editor","Editor","provideEditor","watch","content","setEditable","useEditorMethods"],"mappings":"kOAmCA,MAAAA,EAAA,CACA,KAAA,aACA,WAAA,CACA,cAAAC,EACA,cAAAC,CACA,EAEA,OAAA,CAAAC,EAAAC,CAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAAC,EAAA,CAEA,MAAAC,EAAAC,EAAA,YAAA,EACAC,EAAAD,EAAA,YAAA,EACAE,EAAA,IAAAC,EAAA,CACA,QAAAF,EAAAH,EAAA,OAAA,EACA,WAAAC,EAAA,CACA,CAAA,EACAK,EAAAF,CAAA,EACAG,EACA,IAAAP,EAAA,QACAQ,GAAA,CACA,QAAA,KAAA,CAAA,QAAAA,CAAA,CAAA,EACAJ,EAAA,SAAA,WAAAD,EAAAK,CAAA,EAAA,EAAA,CACA,CACA,EACA,KAAA,CAAA,YAAAC,GAAAC,EAAAN,CAAA,EACA,OAAAK,EAAA,EAAA,EACA,CAAA,OAAAL,CAAA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,OACA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,QAAA,CACA,CACA"' reuse.extract - ERROR - 'js/BaseReader-DxwpFJS0.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div id=\"direct-editor\" :class=\"{ 'icon-loading': saving }\">\n\t\t<Editor\n\t\t\tref=\"editor\"\n\t\t\t:initial-session=\"initialSession\"\n\t\t\t:file-id=\"initial.fileId\"\n\t\t\t:active=\"true\"\n\t\t\t:mime=\"initial.mimetype\"\n\t\t\t:is-direct-editing=\"true\"\n\t\t\t@ready=\"loaded\">\n\t\t\t<template v-if=\"isMobile\" #header>\n\t\t\t\t<button class=\"icon-share\" @click=\"share\" />\n\t\t\t\t<button class=\"icon-close\" @click=\"close\" />\n\t\t\t</template>\n\t\t</Editor>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport Editor from '../components/Editor.vue'\n\nimport { logger } from '../helpers/logger.js'\n\nconst log = Vue.observable({\n\tmessages: [],\n\tmtime: 0,\n})\n\nconst callMobileMessage = (messageName, attributes) => {\n\tlogger.debug(`callMobileMessage ${messageName}`, { attributes })\n\tlet message = messageName\n\tif (typeof attributes !== 'undefined') {\n\t\tmessage = {\n\t\t\tMessageName: messageName,\n\t\t\tValues: attributes,\n\t\t}\n\t}\n\tlet attributesString = null\n\ttry {\n\t\tattributesString = JSON.stringify(attributes)\n\t} catch (e) {\n\t\tattributesString = null\n\t}\n\n\t// Forward to mobile handler\n\tif (\n\t\twindow.DirectEditingMobileInterface\n\t\t&& typeof window.DirectEditingMobileInterface[messageName] === 'function'\n\t) {\n\t\tif (attributesString === null || typeof attributesString === 'undefined') {\n\t\t\twindow.DirectEditingMobileInterface[messageName]()\n\t\t} else {\n\t\t\twindow.DirectEditingMobileInterface[messageName](attributesString)\n\t\t}\n\t}\n\n\t// iOS webkit fallback\n\tif (\n\t\twindow.webkit\n\t\t&& window.webkit.messageHandlers\n\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface\n\t) {\n\t\twindow.webkit.messageHandlers.DirectEditingMobileInterface.postMessage(\n\t\t\tmessage,\n\t\t)\n\t}\n\n\twindow.postMessage(message)\n}\n\nwindow.addEventListener('message', function (message) {\n\tlog.messages.push(message.data)\n\tlogger.debug('postMessage', { message })\n})\n\nexport default {\n\tname: 'DirectEditing',\n\tcomponents: { Editor },\n\tdata() {\n\t\treturn {\n\t\t\tinitial: OCP.InitialState.loadState('text', 'file'),\n\t\t\tmessages: log.messages,\n\t\t\tlog,\n\t\t\tsaving: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tinitialSession() {\n\t\t\treturn JSON.parse(this.initial.session) || null\n\t\t},\n\t\tisMobile() {\n\t\t\treturn (\n\t\t\t\twindow.DirectEditingMobileInterface\n\t\t\t\t|| (window.webkit\n\t\t\t\t\t&& window.webkit.messageHandlers\n\t\t\t\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface)\n\t\t\t)\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tcallMobileMessage('loading')\n\t},\n\tmounted() {\n\t\tdocument\n\t\t\t.querySelector('meta[name=\"viewport\"]')\n\t\t\t.setAttribute(\n\t\t\t\t'content',\n\t\t\t\t'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0',\n\t\t\t)\n\n\t\tthis.$refs.editor.$on('push:forbidden', () => {\n\t\t\tlogger.warn('push was forbidden due to invalidated session')\n\t\t\tthis.reload()\n\t\t})\n\t},\n\tmethods: {\n\t\tasync close() {\n\t\t\tthis.saving = true\n\t\t\tsetTimeout(async () => {\n\t\t\t\tawait this.$refs.editor.$destroy()\n\t\t\t\tcallMobileMessage('close')\n\t\t\t}, 0)\n\t\t},\n\t\tshare() {\n\t\t\tcallMobileMessage('share')\n\t\t},\n\t\tloaded() {\n\t\t\tcallMobileMessage('loaded')\n\t\t},\n\t\treload() {\n\t\t\tcallMobileMessage('reload')\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\tposition: fixed;\n\tbackground-color: var(--color-main-background);\n}\n\n#content[class='app-public'] {\n\tmargin: 0;\n\tmargin-top: 0;\n}\n</style>\n\n<style scoped lang=\"scss\">\n#direct-editor {\n\twidth: 100%;\n\theight: 100%;\n\tposition: fixed;\n\toverflow: auto;\n\n\t&:deep(.text-editor) {\n\t\theight: 100%;\n\t\ttop: 0;\n\t}\n\t&:deep(.text-editor__wrapper div.ProseMirror' reuse.extract - ERROR - 'js/text-text.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tv-if=\"shouldRender\"\n\t\tid=\"rich-workspace\"\n\t\t:class=\"{ focus: focus, dark: darkTheme }\">\n\t\t<RichTextReader\n\t\t\tv-if=\"!loaded || !ready\"\n\t\t\t:content=\"content\"\n\t\t\tclass=\"rich-workspace--preview\" />\n\t\t<Editor\n\t\t\tv-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t:hide-menu=\"hideMenu\"\n\t\t\tactive\n\t\t\trich-workspace\n\t\t\t@ready=\"ready = true\"\n\t\t\t@focus=\"onFocus\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getSharingToken, isPublicShare } from '@nextcloud/sharing/public'\n\nimport getEditorInstance from '../components/Editor.singleton.js'\nimport RichTextReader from '../components/RichTextReader.vue'\n\nconst IS_PUBLIC = isPublicShare()\nconst WORKSPACE_URL = generateOcsUrl(\n\t'apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace',\n\t2,\n)\nconst descriptionFile =\n\tt('text', 'Readme') + '.' + loadState('text', 'default_file_extension')\nconst SUPPORTED_STATIC_FILENAMES = [\n\tdescriptionFile,\n\t'Readme.md',\n\t'README.md',\n\t'readme.md',\n]\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tRichTextReader,\n\t\tEditor: getEditorInstance,\n\t},\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\thasRichWorkspace: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\t// Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme)\n\t\t\tlocalHasRichWorkspace: false,\n\t\t\tfocus: false,\n\t\t\tfolder: null,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tshouldAutofocus: false,\n\t\t\thideMenu: true,\n\t\t\tdarkTheme: window?.OCA?.Accessibility?.theme === 'dark',\n\t\t\tenabled: window?.OCA?.Text?.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn getSharingToken()\n\t\t},\n\t\tshouldRender() {\n\t\t\treturn this.enabled && this.localHasRichWorkspace\n\t\t},\n\t},\n\twatch: {\n\t\tpath() {\n\t\t\tthis.reset()\n\t\t},\n\t\tready() {\n\t\t\tthis.shouldAutofocus = false\n\t\t},\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector('#rich-workspace .text-editor__main')\n\t\t\t\t\t.scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t\tshouldRender(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.getFileInfo()\n\t\t\t}\n\t\t},\n\t\thasRichWorkspace(value) {\n\t\t\tthis.localHasRichWorkspace = value\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.localHasRichWorkspace = this.hasRichWorkspace\n\t\tsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tsubscribe('files:node:created', this.onFileCreated)\n\t\tsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.listenKeydownEvents()\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tunsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tunsubscribe('files:node:created', this.onFileCreated)\n\t\tunsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tunsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.unlistenKeydownEvents()\n\t},\n\tmet' reuse.extract - ERROR - 'js/RichWorkspace-D4iEdjor.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder().setApp('text').detectUser().build()\n\nexport { logger }\n"],"names":["logger","getLoggerBuilder"],"mappings":"+CAOK,MAACA,EAASC,EAAgB,EAAG,OAAO,MAAM,EAAE,WAAU,EAAG,MAAK"' reuse.extract - ERROR - 'js/logger-C5ZHccIX.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\nimport { loadState } from '@nextcloud/initial-state'\n\nimport { logger } from './helpers/logger.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\nconst workspaceEnabled = loadState('text', 'workspace_enabled')\nconst openReadOnlyEnabled = loadState('text', 'open_read_only_enabled')\n\ndocument.addEventListener('DOMContentLoaded', async () => {\n\tif (typeof OCA.Viewer === 'undefined') {\n\t\tconst { registerFileActionFallback } = await import('./helpers/files.js')\n\t\tlogger.error('Viewer app is not installed')\n\t\tregisterFileActionFallback()\n\t}\n\n\tif (workspaceAvailable && OCA && OCA?.Files?.Settings) {\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst { default: FilesSettings } = await import('./views/FilesSettings.vue')\n\n\t\tconst vm = new Vue({\n\t\t\trender: (h) => h(FilesSettings, {}),\n\t\t})\n\t\tconst el = vm.$mount().$el\n\t\tOCA.Files.Settings.register(\n\t\t\tnew OCA.Files.Settings.Setting('text', {\n\t\t\t\tel: () => {\n\t\t\t\t\treturn el\n\t\t\t\t},\n\t\t\t}),\n\t\t)\n\t}\n})\n\nOCA.Text = {\n\tRichWorkspaceEnabled: workspaceEnabled,\n\tOpenReadOnlyEnabled: openReadOnlyEnabled,\n}\n"],"file":"js/text-files.mjs"' reuse.extract - ERROR - 'js/text-files.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { registerDavProperty, registerFileListHeaders } from '@nextcloud/files'\nimport { loadState } from '@nextcloud/initial-state'\nimport { addMenuRichWorkspace, FilesWorkspaceHeader } from './helpers/files.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\n\nregisterDavProperty('nc:rich-workspace', { nc: 'http://nextcloud.org/ns' })\nregisterDavProperty('nc:rich-workspace-file', { nc: 'http://nextcloud.org/ns' })\n\nif (workspaceAvailable) {\n\taddMenuRichWorkspace()\n\tregisterFileListHeaders(FilesWorkspaceHeader)\n}\n"],"names":["workspaceAvailable","loadState","registerDavProperty","addMenuRichWorkspace","registerFileListHeaders","FilesWorkspaceHeader"],"mappings":"sgBAWA,MAAMA,EAAqBC,EAAU,OAAQ,qBAAqB,EAElEC,EAAoB,oBAAqB,CAAE,GAAI,yBAA2B,CAAA,EAC1EA,EAAoB,yBAA0B,CAAE,GAAI,yBAA2B,CAAA,EAE3EF,IACHG,EAAoB,EACpBC,EAAwBC,CAAoB"' reuse.extract - ERROR - 'js/text-init.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Get instance of Editor component\n * Using singleton approach here to avoid duplicate yjs import error\n * @return {Promise<*>}\n */\nexport default async function getEditorInstance() {\n\tif (!window._nc_text_editor_instance) {\n\t\tif (window._nc_text_editor_importing) {\n\t\t\treturn await new Promise((resolve) => {\n\t\t\t\tconst intervalId = setInterval(() => {\n\t\t\t\t\tif (!window._nc_text_editor_instance) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tresolve(window._nc_text_editor_instance)\n\t\t\t\t\tclearInterval(intervalId)\n\t\t\t\t}, 200)\n\t\t\t})\n\t\t} else {\n\t\t\twindow._nc_text_editor_importing = true\n\t\t}\n\t\tconst Editor = await import(/* webpackChunkName: \"editor\" */ './Editor.vue')\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst EditorConstructor = Vue.extend(Editor.default)\n\t\twindow._nc_text_editor_instance = EditorConstructor\n\t}\n\treturn window._nc_text_editor_instance\n}\n"],"file":"js/Editor.singleton-LCXsMxMn.chunk.mjs"' reuse.extract - ERROR - 'js/Editor.singleton-LCXsMxMn.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcPopover class=\"session-list\" placement=\"bottom\">\n\t\t<template #trigger=\"{ attrs }\">\n\t\t\t<div>\n\t\t\t\t<NcButton\n\t\t\t\t\t:title=\"label\"\n\t\t\t\t\t:aria-label=\"label\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tclass=\"avatar-list\"\n\t\t\t\t\tv-bind=\"attrs\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AccountMultipleOutlineIcon :size=\"20\" />\n\t\t\t\t\t\t<AvatarWrapper\n\t\t\t\t\t\t\tv-for=\"session in sessionsVisible\"\n\t\t\t\t\t\t\t:key=\"session.id\"\n\t\t\t\t\t\t\t:session=\"session\"\n\t\t\t\t\t\t\t:size=\"28\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</template>\n\t\t<template #default>\n\t\t\t<div class=\"session-menu\">\n\t\t\t\t<slot name=\"lastSaved\" />\n\t\t\t\t<ul>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<li\n\t\t\t\t\t\tv-for=\"session in participantsPopover\"\n\t\t\t\t\t\t:key=\"session.id\"\n\t\t\t\t\t\t:style=\"avatarStyle(session)\">\n\t\t\t\t\t\t<AvatarWrapper :session=\"session\" :size=\"36\" />\n\t\t\t\t\t\t<span class=\"session-label\">\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tsession.userId\n\t\t\t\t\t\t\t\t\t? session.displayName\n\t\t\t\t\t\t\t\t\t: session.guestName\n\t\t\t\t\t\t\t\t\t\t? session.guestName\n\t\t\t\t\t\t\t\t\t\t: t('text', 'Guest')\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-if=\"session.userId === null\" class=\"guest-label\"\n\t\t\t\t\t\t\t>({{ t('text', 'guest') }})</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\t:checked=\"isFullWidth\"\n\t\t\t\t\t\t\t@update:checked=\"onWidthToggle\">\n\t\t\t\t\t\t\t{{ t('text', 'Full width editor') }}\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'\nimport NcPopover from '@nextcloud/vue/components/NcPopover'\nimport AccountMultipleOutlineIcon from 'vue-material-design-icons/AccountMultipleOutline.vue'\nimport {\n\tCOLLABORATOR_DISCONNECT_TIME,\n\tCOLLABORATOR_IDLE_TIME,\n} from '../../services/SyncService.ts'\nimport AvatarWrapper from './AvatarWrapper.vue'\n\nexport default {\n\tname: 'SessionList',\n\tcomponents: {\n\t\tAccountMultipleOutlineIcon,\n\t\tAvatarWrapper,\n\t\tNcButton,\n\t\tNcPopover,\n\t\tNcCheckboxRadioSwit' reuse.extract - ERROR - 'js/SessionList-gp35kWjj.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<form\n\t\t:title=\"t('text', 'Enter your name so other people can see who is editing')\"\n\t\tclass=\"guest-name-dialog\"\n\t\t@submit.prevent=\"setGuestName()\">\n\t\t<label><AvatarWrapper :session=\"session\" :size=\"32\" /></label>\n\t\t<input\n\t\t\tv-model=\"guestName\"\n\t\t\ttype=\"text\"\n\t\t\t:aria-label=\"t('text', 'Edit guest name')\"\n\t\t\t:placeholder=\"t('text', 'Guest')\" />\n\t\t<input\n\t\t\ttype=\"submit\"\n\t\t\tclass=\"icon-confirm\"\n\t\t\t:aria-label=\"t('text', 'Save guest name')\"\n\t\t\tvalue=\"\" />\n\t</form>\n</template>\n\n<script>\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { useSyncService } from '../../composables/useSyncService.ts'\nimport AvatarWrapper from './AvatarWrapper.vue'\n\nexport default {\n\tname: 'GuestNameDialog',\n\tcomponents: {\n\t\tAvatarWrapper,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst { syncService } = useSyncService()\n\t\treturn { syncService }\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tguestName: '',\n\t\t\tguestNameBuffered: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tconst size = 32\n\t\t\tconst avatarUrl = generateUrl('/avatar/guest/{user}/{size}', {\n\t\t\t\tuser: this.guestNameBuffered,\n\t\t\t\tsize,\n\t\t\t})\n\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.guestName = this.syncService.guestName\n\t\tthis.updateBufferedGuestName()\n\t},\n\tmethods: {\n\t\tsetGuestName() {\n\t\t\tconst previousGuestName = this.syncService.guestName\n\t\t\tthis.syncService\n\t\t\t\t.updateSession(this.guestName)\n\t\t\t\t.then(() => {\n\t\t\t\t\tlocalStorage.setItem('nick', this.guestName)\n\t\t\t\t\tthis.updateBufferedGuestName()\n\t\t\t\t})\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tthis.guestName = previousGuestName\n\t\t\t\t})\n\t\t},\n\t\tupdateBufferedGuestName() {\n\t\t\tthis.guestNameBuffered = this.guestName\n\t\t},\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\nform.guest-name-dialog {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: 6px;\n\n\t&:deep(img) {\n\t\tmargin: 0 !important;\n\t}\n\n\tinput[type='text'] {\n\t\tflex-grow: 1;\n\t}\n\tlabel {\n\t\tpadding-right: 3px;\n\t\theight: 32px;\n\t}\n}\n</style>\n"],"names":["_sfc_main","AvatarWrapper","syncService","useSyncService","avatarUrl","generateUrl","previousGuestName","e","t"],"mappings":"snBA8BA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CACA,cAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EACA,OAAA,CACA,KAAA,CAAA,YAAAC,CAAA,EAAAC,EAAA,EACA,MAAA,CAAA,YAAAD,CAAA,CACA,EACA,MAAA,CACA,MAAA,CACA,UAAA,GACA,kBAAA,EACA,CACA,EACA,SAAA,CACA,WAAA,CAEA,MAAAE,EAAAC,EAAA,8BAAA,CACA,KAAA,KAAA,kBACA,KACA,EAAA,CAAA,EACA,OAAA,OAAA,SAAA,SAAA,KAAA,OAAA,SAAA,KAAAD,CACA,CACA,EACA,aAAA,CACA,KAAA,UAAA,KAAA,YAAA,UACA,KAAA,wBAAA,CACA,EACA,QAAA,CACA,cAAA,CACA,MAAAE,EAAA,KAAA,YAAA,UACA,KAAA,YACA,cAAA,KAAA,SAAA,EACA,KAAA,IAAA,CACA,aAAA,QAAA,OAAA,KAAA,SAAA,EACA,KAAA,wBAAA,CACA,CAAA,EACA,MAAAC,GAAA,CACA,KAAA,UAAAD,CACA,CAAA,CACA,EACA,yBAAA,CACA,KAAA,kBAAA,KAAA,SACA,EACA,EAAAE,CACA,CACA"' reuse.extract - ERROR - 'js/GuestNameDialog-BgxNZ7LR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n<template>\n\t<div id=\"files-setting-richworkspace\">\n\t\t<NcCheckboxRadioSwitch\n\t\t\t:checked.sync=\"showWorkspace\"\n\t\t\t@update:checked=\"toggle\">\n\t\t\t{{ t('text', 'Show folder description') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'\n\nexport default {\n\tname: 'FilesSettings',\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tshowWorkspace: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggle() {\n\t\t\t// FIXME: save to app config\n\t\t\tif (this.showWorkspace) {\n\t\t\t\temit('Text::showRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '1',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\temit('Text::hideRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '0',\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tt,\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcCheckboxRadioSwitch","emit","axios","generateUrl","t"],"mappings":"4XAqBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,sBAAAC,CACA,EACA,MAAA,CACA,MAAA,CACA,cAAA,IAAA,KAAA,oBACA,CACA,EACA,QAAA,CACA,QAAA,CAEA,KAAA,eACAC,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,IAEAF,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,EAEA,EACA,EAAAC,CACA,CACA"' reuse.extract - ERROR - 'js/FilesSettings-DBTBQ9z-.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nimport { logger } from './helpers/logger.js'\nimport { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'\n\n/**\n * Wrapper for async registration of ViewerComponent.\n * Note: it should be named function - the name is used for component registration.\n *\n * @return {Promise<import('./components/ViewerComponent.vue')>} ViewerComponent\n */\nfunction AsyncTextViewerComponent() {\n\treturn import('./components/ViewerComponent.vue')\n}\n\nif (typeof OCA.Viewer === 'undefined') {\n\tlogger.error('Viewer app is not installed')\n} else {\n\tOCA.Viewer.registerHandler({\n\t\tid: 'text',\n\t\tmimes: [...openMimetypesMarkdown, ...openMimetypesPlainText],\n\t\tcomponent: AsyncTextViewerComponent,\n\t\tgroup: null,\n\t\ttheme: 'default',\n\t\tcanCompare: true,\n\t})\n}\n"],"file":"js/text-viewer.mjs"' reuse.extract - ERROR - 'js/text-viewer.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nconst openMimetypesMarkdown = ['text/markdown', 'text/x-web-markdown']\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/asciidoc',\n\t'text/css',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-nfo',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nif (!OC.appswebroots?.richdocuments && !OC.appswebroots?.onlyoffice) {\n\topenMimetypesPlainText.push('text/csv')\n}\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport { openMimetypes, openMimetypesMarkdown, openMimetypesPlainText }\n"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes"],"mappings":"MAKMA,EAAwB,CAAC,gBAAiB,qBAAqB,EAE/DC,EAAyB,CAC9B,aACA,kBACA,sBACA,8BACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,gBACA,WACA,YACA,WACA,WACA,gBACA,WACA,qBACA,cACA,aACA,gBACA,oBACD,EAEI,CAAC,GAAG,cAAc,eAAiB,CAAC,GAAG,cAAc,YACxDA,EAAuB,KAAK,UAAU,EAGlC,MAACC,EAAgB,CAAC,GAAGF,EAAuB,GAAGC,CAAsB"' reuse.extract - ERROR - 'js/mime-DDg3sTIz.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateUrl } from '@nextcloud/router'\n\nconst domHref = function (node, relativePath) {\n\tconst ref = node.attrs.href\n\tif (!ref) {\n\t\treturn ref\n\t}\n\tif (!window.OCA?.Viewer) {\n\t\treturn ref\n\t}\n\tif (ref.match(/^[a-zA-Z]*:/)) {\n\t\treturn ref\n\t}\n\tif (ref.startsWith('#')) {\n\t\treturn ref\n\t}\n\t// Don't rewrite links in collectives app context\n\tif (loadState('core', 'active-app', '') === 'collectives') {\n\t\treturn ref\n\t}\n\t// Don't rewrite links to the collectives app\n\tif (ref.includes('/apps/collectives/')) {\n\t\treturn ref\n\t}\n\n\t// Rewrite links with old format from file picker to `/f/<fileId>`\n\tconst match = ref.match(/^([^?]*)\\?fileId=(\\d+)/)\n\tif (match) {\n\t\tconst [, , id] = match\n\t\treturn new URL(generateUrl(`/f/${id}`), window.origin).href\n\t}\n\treturn ref\n}\n\nconst parseHref = function (dom) {\n\tconst ref = dom.getAttribute('href')\n\tif (!ref) {\n\t\treturn ref\n\t}\n\tconst match = ref.match(/\\?dir=([^&]*)&openfile=([^&]*)#relPath=([^&]*)/)\n\tif (match) {\n\t\tconst [, , id] = match\n\t\treturn new URL(generateUrl(`/f/${id}`), window.origin).href\n\t}\n\treturn ref\n}\n\nconst isLinkToSelfWithHash = function (href) {\n\tconst locationNoHash =\n\t\twindow.location.origin + window.location.pathname + window.location.search\n\treturn href?.startsWith('#') || href?.startsWith(locationNoHash + '#')\n}\n\n/**\n * Open links, to be used as custom click handler\n *\n * @param {string} href the link href\n */\nconst openLink = function (href) {\n\tconst linkUrl = new URL(href, window.location.href)\n\t// Consider rerouting links to Collectives if already inside Collectives app\n\tconst collectivesUrlBase = '/apps/collectives'\n\tif (\n\t\twindow.OCA.Collectives?.vueRouter\n\t\t&& linkUrl.pathname.toString().startsWith(generateUrl(collectivesUrlBase))\n\t) {\n\t\tconst collectivesUrl = linkUrl.href.substring(\n\t\t\tlinkUrl.href.indexOf(collectivesUrlBase) + collectivesUrlBase.length,\n\t\t)\n\t\twindow.OCA.Collectives.vueRouter.push(collectivesUrl)\n\t\treturn\n\t}\n\twindow.open(linkUrl, '_blank')\n}\n\nexport { domHref, isLinkToSelfWithHash, openLink, parseHref }\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { openLink } from '../helpers/links.js'\nimport { logger } from '../helpers/logger.js'\n\nexport const FILE = Symbol('editor:file')\nexport const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')\nexport const IS_MOBILE = Symbol('editor:is-mobile')\nexport const EDITOR_UPLOAD = Symbol('editor:upload')\nexport const HOOK_MENTION_SEARCH = Symbol('hook:mention-search')\nexport const HOOK_MENTION_INSERT = Symbol('hook:mention-insert')\nexport const OPEN_LINK_HANDLER = Symbol('editor:open-link-handler')\n\nexport const useIsMobileMixin = {\n\tinject: {\n\t\t$isMobile: { from: IS_MOBILE, default: false },\n\t},\n}\n\nexport const useFileMixin = {\n\tinject: {\n\t\t$file: {\n\t\t\tfrom: FILE,\n\t\t\tdefault: () => ({\n\t\t\t\tfileId: 0,\n\t\t\t\trelativePath: null,\n\t\t\t\tdocument: null,\n\t\t\t}),\n\t\t},\n\t},\n}\n\nexport const useAttachmentResolver = {\n\tinject: {\n\t\t$attachmentResolver: {\n\t\t\tfrom: ATTACHMENT_RESOLVER,\n\t\t\tdefault: {\n\t\t\t\tresolve(src: string) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t'No attachment resolver provided. Some attachment sources cannot be resolved.',\n\t\t\t\t\t)\n\t\t\t\t\treturn [src]\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n}\nexport const useEditorUpload = {\n\tinject: {\n\t\t$editorUpload: {\n\t\t\tfrom: EDITOR_UPLOAD,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\nexport const useMentionHook = {\n\tinject: {\n\t\t$mentionHookIns' reuse.extract - ERROR - 'js/MediaHandler.provider-BkVIW0cW.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<Editor\n\t\tv-if=\"!useSourceView\"\n\t\t:file-id=\"fileid\"\n\t\t:relative-path=\"filename\"\n\t\t:active=\"active || isEmbedded\"\n\t\t:autofocus=\"autofocus\"\n\t\t:share-token=\"shareToken\"\n\t\t:class=\"{ 'text-editor--embedding': isEmbedded }\"\n\t\t:mime=\"mime\"\n\t\t:show-outline-outside=\"showOutlineOutside\" />\n\t<div\n\t\tv-else\n\t\tid=\"editor-container\"\n\t\tdata-text-el=\"editor-container\"\n\t\tclass=\"text-editor source-viewer\">\n\t\t<Component\n\t\t\t:is=\"readerComponent\"\n\t\t\t:content=\"content\"\n\t\t\t:file-id=\"fileid\"\n\t\t\t:read-only=\"true\"\n\t\t\t:show-menu-bar=\"false\" />\n\t\t<NcButton v-if=\"isEmbedded\" class=\"toggle-interactive\" @click=\"toggleEdit\">\n\t\t\t{{ t('text', 'Edit') }}\n\t\t\t<template #icon>\n\t\t\t\t<PencilOutlineIcon />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { getClient, getRootPath } from '@nextcloud/files/dav'\nimport { t } from '@nextcloud/l10n'\nimport { getSharingToken } from '@nextcloud/sharing/public'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport Vue from 'vue'\nimport PencilOutlineIcon from 'vue-material-design-icons/PencilOutline.vue'\nimport MarkdownContentEditor from './Editor/MarkdownContentEditor.vue'\nimport PlainTextReader from './PlainTextReader.vue'\n\nimport getEditorInstance from './Editor.singleton.js'\n\nexport default {\n\tname: 'ViewerComponent',\n\tcomponents: {\n\t\tNcButton: Vue.extend(NcButton),\n\t\tPencilOutlineIcon: Vue.extend(PencilOutlineIcon),\n\t\tPlainTextReader: Vue.extend(PlainTextReader),\n\t\tMarkdownContentEditor: Vue.extend(MarkdownContentEditor),\n\t\tEditor: getEditorInstance,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\tisEmbedded: this.isEmbedded,\n\t\t}\n\t},\n\tprops: {\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tautofocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: () => getSharingToken(),\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tshowOutlineOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpermissions: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\tisEmbedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcontent: '',\n\t\t\thasToggledInteractiveEmbedding: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\t/** @return {boolean} */\n\t\tuseSourceView() {\n\t\t\treturn (\n\t\t\t\tthis.source\n\t\t\t\t&& (this.fileVersion\n\t\t\t\t\t|| !this.fileid\n\t\t\t\t\t|| this.isEmbedded\n\t\t\t\t\t|| this.isEncrypted)\n\t\t\t\t&& !this.hasToggledInteractiveEmbedding\n\t\t\t)\n\t\t},\n\n\t\tisEncrypted() {\n\t\t\treturn this.$attrs.e2EeIsEncrypted || false\n\t\t},\n\n\t\tisMarkdown() {\n\t\t\treturn (\n\t\t\t\tthis.mime === 'text/markdown' || this.mime === 'text/x-web-markdown'\n\t\t\t)\n\t\t},\n\n\t\t/** @return {boolean} */\n\t\treaderComponent() {\n\t\t\treturn this.isMarkdown ? MarkdownContentEditor : PlainTextReader\n\t\t},\n\t},\n\n\twatch: {\n\t\tsource() {\n\t\t\tthis.loadFileContent()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadFileContent()\n\t},\n\n\tmethods: {\n\t\tasync loadFileContent() {\n\t\t\tif (this.useSourceView) {\n\t\t\t\tif (this.isEncrypted) {\n\t\t\t\t\tthis.content = await this.fetchDecryptedContent()\n\t\t\t\t\tthis.contentLoaded = true\n\t\t\t\t} else {\n\t\t\t\t\tconst response = await axios.get(this.source)\n\t\t\t\t\tthis.content = response.data\n\t\t\t\t\tthis.contentLoaded = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.$emit('upd' reuse.extract - ERROR - 'js/ViewerComponent-BF09hFsw.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader\n\t\t:content=\"content\"\n\t\t@click-link=\"(e, a) => $emit('click-link', e, a)\" />\n</template>\n\n<script>\nimport { RichText } from './../extensions/index.js'\nimport markdownit from './../markdownit/index.js'\nimport BaseReader from './BaseReader.vue'\n\nexport default {\n\tname: 'RichTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn markdownit.render(content)\n\t\t},\n\t\textensions() {\n\t\t\treturn [\n\t\t\t\tRichText.configure({\n\t\t\t\t\tediting: false,\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import './../css/prosemirror';\n@import './../css/print';\n</style>\n"],"names":["_sfc_main","BaseReader","content","markdownit","RichText"],"mappings":"mLAgBA,MAAAA,EAAA,CACA,KAAA,iBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,OAAAC,EAAA,OAAAD,CAAA,CACA,EACA,YAAA,CACA,MAAA,CACAE,EAAA,UAAA,CACA,QAAA,EACA,CAAA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/RichTextReader-iVzxp__I.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'GPL-3.0-or-later\n */\n/**\n * @param app app ID, e.g. \"mail\"\n * @param key name of the property\n * @param fallback optional parameter to use as default value\n * @throws if the key can't be found\n */\nexport function loadState(app, key, fallback) {\n const selector = `#initial-state-${app}-${key}`;\n if (window._nc_initial_state?.has(selector)) {\n return window._nc_initial_state.get(selector);\n }\n else if (!window._nc_initial_state) {\n window._nc_initial_state = new Map();\n }\n const elem = document.querySelector(selector);\n if (elem === null) {\n if (fallback !== undefined) {\n return fallback;\n }\n throw new Error(`Could not find initial state ${key} of ${app}`);\n }\n try {\n const parsedValue = JSON.parse(atob(elem.value));\n window._nc_initial_state.set(selector, parsedValue);\n return parsedValue;\n }\n catch (error) {\n console.error('[@nextcloud/initial-state] Could not parse initial state', { key, app, error });\n if (fallback !== undefined) {\n return fallback;\n }\n throw new Error(`Could not parse initial state ${key} of ${app}`, { cause: error });\n }\n}\n"],"names":["loadState","app","key","fallback","selector","elem","parsedValue","error"],"mappings":"AAUO,SAASA,EAAUC,EAAKC,EAAKC,EAAU,CAC1C,MAAMC,EAAW,kBAAkBH,CAAG,IAAIC,CAAG,GAC7C,GAAI,OAAO,mBAAmB,IAAIE,CAAQ,EACtC,OAAO,OAAO,kBAAkB,IAAIA,CAAQ,EAEtC,OAAO,oBACb,OAAO,kBAAoB,IAAI,KAEnC,MAAMC,EAAO,SAAS,cAAcD,CAAQ,EAC5C,GAAIC,IAAS,KAAM,CACf,GAAIF,IAAa,OACb,OAAOA,EAEX,MAAM,IAAI,MAAM,gCAAgCD,CAAG,OAAOD,CAAG,EAAE,CACvE,CACI,GAAI,CACA,MAAMK,EAAc,KAAK,MAAM,KAAKD,EAAK,KAAK,CAAC,EAC/C,cAAO,kBAAkB,IAAID,EAAUE,CAAW,EAC3CA,CACf,OACWC,EAAO,CAEV,GADA,QAAQ,MAAM,2DAA4D,CAAE,IAAAL,EAAK,IAAAD,EAAK,MAAAM,EAAO,EACzFJ,IAAa,OACb,OAAOA,EAEX,MAAM,IAAI,MAAM,iCAAiCD,CAAG,OAAOD,CAAG,GAAI,CAAE,MAAOM,EAAO,CAC1F,CACA","x_google_ignoreList":[0]' reuse.extract - ERROR - 'js/index-B8nYQ_zQ.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { emit } from '@nextcloud/event-bus'\nimport {\n\taddNewFileMenuEntry,\n\tFile,\n\tHeader,\n\tNewMenuEntryC' reuse.extract - ERROR - 'js/files-BDGi6cq2.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'GPL-3.0-or-later\n */\nfunction isPublicShare() {\n return loadState(\"files_sharing\", \"isPublic\", null) ?? document.querySelector('input#isPublic[type=\"hidden\"][name=\"isPublic\"][value=\"1\"]') !== null;\n}\nfunction getSharingToken() {\n return loadState(\"files_sharing\", \"sharingToken\", null) ?? document.querySelector('input#sharingToken[type=\"hidden\"]')?.value ?? null;\n}\nexport {\n getSharingToken,\n isPublicShare\n};\n//# sourceMappingURL=public.mjs.map\n","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw ne' reuse.extract - ERROR - 'js/NcNoteCard-C6xb7vi0-Ccg9J-_X.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" />\n</template>\n\n<script>\nimport escapeHtml from 'escape-html'\nimport { PlainText } from './../extensions/index.js'\nimport BaseReader from './BaseReader.vue'\n\nexport default {\n\tname: 'PlainTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn '<pre>' + escapeHtml(content) + '</pre>'\n\t\t},\n\t\textensions: () => [PlainText],\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","BaseReader","content","escapeHtml","PlainText"],"mappings":"mOAcA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,MAAA,QAAAC,EAAAD,CAAA,EAAA,QACA,EACA,WAAA,IAAA,CAAAE,CAAA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/PlainTextReader-a4wPKNQh.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nOCA.Text = {\n\tRichWorkspaceEnabled: loadState('text', 'workspace_available'),\n\tOpenReadOnlyEnabled: loadState('text', 'open_read_only_enabled'),\n}\n"],"names":["loadState"],"mappings":"+CAOA,IAAI,KAAO,CACV,qBAAsBA,EAAU,OAAQ,qBAAqB,EAC7D,oBAAqBA,EAAU,OAAQ,wBAAwB,CAChE"' reuse.extract - ERROR - 'js/text-public.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcModal v-if=\"active\" :name=\"fileName\" @close=\"close\">\n\t\t<Editor\n\t\t\t:file-id=\"fileId\"\n\t\t\t:relative-path=\"relativePath\"\n\t\t\t:active=\"active\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"mimeType\" />\n\t</NcModal>\n</template>\n\n<script>\nimport NcModal from '@nextcloud/vue/components/NcModal'\n\nexport default {\n\tname: 'PublicFilesEditor',\n\tcomponents: {\n\t\tNcModal,\n\t\tEditor: () => import(/* webpackChunkName: \"editor\" */ './Editor.vue'),\n\t},\n\tprops: {\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\trelativePath: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tmimeType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\tfileName() {\n\t\t\treturn this.relativePath.substring(\n\t\t\t\tthis.relativePath.lastIndexOf('/') + 1,\n\t\t\t)\n\t\t},\n\t},\n\tmethods: {\n\t\tclose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n"],"file":"js/PublicFilesEditor-CF2nm1d0.chunk.mjs"' reuse.extract - ERROR - 'js/PublicFilesEditor-CF2nm1d0.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"avatar-wrapper\" :style=\"sessionAvatarStyle\">\n\t\t<NcAvatar\n\t\t\tv-if=\"session.userId\"\n\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t:disable-menu=\"true\"\n\t\t\thide-status\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:size=\"size\" />\n\t\t<div v-else class=\"avatar\" :style=\"sessionBackgroundStyle\">\n\t\t\t{{ guestInitial }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nexport default {\n\tname: 'AvatarWrapper',\n\tcomponents: {\n\t\tNcAvatar,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: () => 32,\n\t\t},\n\t},\n\tcomputed: {\n\t\tsessionAvatarStyle() {\n\t\t\treturn {\n\t\t\t\t...this.sessionBackgroundStyle,\n\t\t\t\t'border-color': this.session.color,\n\t\t\t\t'border-width': '2px',\n\t\t\t\t'border-style': 'solid',\n\t\t\t\t'--size': this.size + 'px',\n\t\t\t\t'--font-size': this.size / 2 + 'px',\n\t\t\t}\n\t\t},\n\t\tsessionBackgroundStyle() {\n\t\t\treturn {\n\t\t\t\t'background-color': this.session.userId\n\t\t\t\t\t? this.session.color + ' !important'\n\t\t\t\t\t: '#b9b9b9',\n\t\t\t}\n\t\t},\n\t\tguestInitial() {\n\t\t\treturn this.session.guestName === ''\n\t\t\t\t? '?'\n\t\t\t\t: this.session.guestName.slice(0, 1).toUpperCase()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.avatar,\n.avatar-wrapper {\n\tborder-radius: 50%;\n\twidth: var(--size);\n\theight: var(--size);\n\ttext-align: center;\n\tcolor: #ffffff;\n\tline-height: var(--size);\n\tfont-size: var(--font-size);\n\tfont-weight: normal;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n</style>\n"],"names":["_sfc_main","NcAvatar"],"mappings":"wHAuBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,SAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,KAAA,CACA,KAAA,OACA,QAAA,IAAA,EACA,CACA,EACA,SAAA,CACA,oBAAA,CACA,MAAA,CACA,GAAA,KAAA,uBACA,eAAA,KAAA,QAAA,MACA,eAAA,MACA,eAAA,QACA,SAAA,KAAA,KAAA,KACA,cAAA,KAAA,KAAA,EAAA,IACA,CACA,EACA,wBAAA,CACA,MAAA,CACA,mBAAA,KAAA,QAAA,OACA,KAAA,QAAA,MAAA,cACA,SACA,CACA,EACA,cAAA,CACA,OAAA,KAAA,QAAA,YAAA,GACA,IACA,KAAA,QAAA,UAAA,MAAA,EAAA,CAAA,EAAA,YAAA,CACA,CACA,CACA"' reuse.extract - ERROR - 'js/AvatarWrapper-DubHPYg-.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<RichTextReader v-if=\"isRichEditor\" :content=\"content\" />\n\t<PlainTextReader v-else :content=\"content\" />\n</template>\n\n<script>\nimport PlainTextReader from './PlainTextReader.vue'\nimport RichTextReader from './RichTextReader.vue'\n\nexport default {\n\tname: 'Reader',\n\tcomponents: { PlainTextReader, RichTextReader },\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n#read-only-editor {\n\toverflow: scroll;\n}\n\n.thumbnailContainer #read-only-editor {\n\twidth: 100%;\n\n\t.ProseMirror {\n\t\theight: auto;\n\t\tmargin: 0 0 0 0;\n\t\tpadding: 0;\n\t}\n}\n</style>\n"],"names":["_sfc_main","PlainTextReader","RichTextReader"],"mappings":"orBAcA,MAAAA,EAAA,CACA,KAAA,SACA,WAAA,CAAA,gBAAAC,EAAA,eAAAC,CAAA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,CACA"' reuse.extract - ERROR - 'js/Reader-BdwF-7BZ.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div id=\"direct-editor\" :class=\"{ 'icon-loading': saving }\">\n\t\t<Editor\n\t\t\tref=\"editor\"\n\t\t\t:initial-session=\"initialSession\"\n\t\t\t:file-id=\"initial.fileId\"\n\t\t\t:active=\"true\"\n\t\t\t:mime=\"initial.mimetype\"\n\t\t\t:is-direct-editing=\"true\"\n\t\t\t@ready=\"loaded\">\n\t\t\t<template v-if=\"isMobile\" #header>\n\t\t\t\t<button class=\"icon-share\" @click=\"share\" />\n\t\t\t\t<button class=\"icon-close\" @click=\"close\" />\n\t\t\t</template>\n\t\t</Editor>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport Editor from '../components/Editor.vue'\n\nimport { logger } from '../helpers/logger.js'\n\nconst log = Vue.observable({\n\tmessages: [],\n\tmtime: 0,\n})\n\nconst callMobileMessage = (messageName, attributes) => {\n\tlogger.debug(`callMobileMessage ${messageName}`, { attributes })\n\tlet message = messageName\n\tif (typeof attributes !== 'undefined') {\n\t\tmessage = {\n\t\t\tMessageName: messageName,\n\t\t\tValues: attributes,\n\t\t}\n\t}\n\tlet attributesString = null\n\ttry {\n\t\tattributesString = JSON.stringify(attributes)\n\t} catch (e) {\n\t\tattributesString = null\n\t}\n\n\t// Forward to mobile handler\n\tif (\n\t\twindow.DirectEditingMobileInterface\n\t\t&& typeof window.DirectEditingMobileInterface[messageName] === 'function'\n\t) {\n\t\tif (attributesString === null || typeof attributesString === 'undefined') {\n\t\t\twindow.DirectEditingMobileInterface[messageName]()\n\t\t} else {\n\t\t\twindow.DirectEditingMobileInterface[messageName](attributesString)\n\t\t}\n\t}\n\n\t// iOS webkit fallback\n\tif (\n\t\twindow.webkit\n\t\t&& window.webkit.messageHandlers\n\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface\n\t) {\n\t\twindow.webkit.messageHandlers.DirectEditingMobileInterface.postMessage(\n\t\t\tmessage,\n\t\t)\n\t}\n\n\twindow.postMessage(message)\n}\n\nwindow.addEventListener('message', function (message) {\n\tlog.messages.push(message.data)\n\tlogger.debug('postMessage', { message })\n})\n\nexport default {\n\tname: 'DirectEditing',\n\tcomponents: { Editor },\n\tdata() {\n\t\treturn {\n\t\t\tinitial: OCP.InitialState.loadState('text', 'file'),\n\t\t\tmessages: log.messages,\n\t\t\tlog,\n\t\t\tsaving: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tinitialSession() {\n\t\t\treturn JSON.parse(this.initial.session) || null\n\t\t},\n\t\tisMobile() {\n\t\t\treturn (\n\t\t\t\twindow.DirectEditingMobileInterface\n\t\t\t\t|| (window.webkit\n\t\t\t\t\t&& window.webkit.messageHandlers\n\t\t\t\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface)\n\t\t\t)\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tcallMobileMessage('loading')\n\t},\n\tmounted() {\n\t\tdocument\n\t\t\t.querySelector('meta[name=\"viewport\"]')\n\t\t\t.setAttribute(\n\t\t\t\t'content',\n\t\t\t\t'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0',\n\t\t\t)\n\n\t\tthis.$refs.editor.$on('push:forbidden', () => {\n\t\t\tlogger.warn('push was forbidden due to invalidated session')\n\t\t\tthis.reload()\n\t\t})\n\t},\n\tmethods: {\n\t\tasync close() {\n\t\t\tthis.saving = true\n\t\t\tsetTimeout(async () => {\n\t\t\t\tawait this.$refs.editor.$destroy()\n\t\t\t\tcallMobileMessage('close')\n\t\t\t}, 0)\n\t\t},\n\t\tshare() {\n\t\t\tcallMobileMessage('share')\n\t\t},\n\t\tloaded() {\n\t\t\tcallMobileMessage('loaded')\n\t\t},\n\t\treload() {\n\t\t\tcallMobileMessage('reload')\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\tposition: fixed;\n\tbackground-color: var(--color-main-background);\n}\n\n#content[class='app-public'] {\n\tmargin: 0;\n\tmargin-top: 0;\n}\n</style>\n\n<style scoped lang=\"scss\">\n#direct-editor {\n\twidth: 100%;\n\theight: 100%;\n\tposition: fixed;\n\toverflow: auto;\n\n\t&:deep(.text-editor) {\n\t\theight: 100%;\n\t\ttop: 0;\n\t}\n\t&:deep(.text-editor__wrapper div.ProseMirror' reuse.extract - ERROR - 'js/text-text.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tdata-text-el=\"editor-content-wrapper\"\n\t\tclass=\"content-wrapper text-editor__content-wrapper\"\n\t\t:class=\"{\n\t\t\t'--show-outline': showOutline,\n\t\t}\">\n\t\t<div v-if=\"showOutline\" class=\"text-editor__content-wrapper__left\">\n\t\t\t<EditorOutline />\n\t\t</div>\n\t\t<EditorContent\n\t\t\tid=\"read-only-editor\"\n\t\t\tclass=\"editor__content text-editor__content\"\n\t\t\t:editor=\"editor\" />\n\t\t<div class=\"text-editor__content-wrapper__right\" />\n\t</div>\n</template>\n\n<script>\nimport { Editor } from '@tiptap/core'\nimport { EditorContent } from '@tiptap/vue-2'\nimport { inject, watch } from 'vue'\nimport { provideEditor } from '../composables/useEditor.ts'\nimport { useEditorMethods } from '../composables/useEditorMethods.ts'\nimport EditorOutline from './Editor/EditorOutline.vue'\nimport {\n\tuseOutlineActions,\n\tuseOutlineStateMixin,\n} from './Editor/Wrapper.provider.js'\n\nexport default {\n\tname: 'BaseReader',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t},\n\n\tmixins: [useOutlineStateMixin, useOutlineActions],\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\t// extensions is a factory building a list of extensions for the editor\n\t\tconst extensions = inject('extensions')\n\t\tconst renderHtml = inject('renderHtml')\n\t\tconst editor = new Editor({\n\t\t\tcontent: renderHtml(props.content),\n\t\t\textensions: extensions(),\n\t\t})\n\t\tprovideEditor(editor)\n\t\twatch(\n\t\t\t() => props.content,\n\t\t\t(content) => {\n\t\t\t\tconsole.warn({ content })\n\t\t\t\teditor.commands.setContent(renderHtml(content), true)\n\t\t\t},\n\t\t)\n\t\tconst { setEditable } = useEditorMethods(editor)\n\t\tsetEditable(false)\n\t\treturn { editor }\n\t},\n\n\tcomputed: {\n\t\tshowOutline() {\n\t\t\treturn this.$outlineState.visible\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.editor?.destroy()\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.editor__content {\n\tmax-width: var(--text-editor-max-width);\n\tmargin: auto;\n\tposition: relative;\n\twidth: 100%;\n}\n\n.text-editor__content-wrapper {\n\t--side-width: calc((100% - var(--text-editor-max-width)) / 2);\n\tdisplay: grid;\n\tgrid-template-columns: 1fr auto;\n\t&.--show-outline {\n\t\tgrid-template-columns: var(--side-width) auto var(--side-width);\n\t}\n\t.text-editor__content-wrapper__left,\n\t.text-editor__content-wrapper__right {\n\t\theight: 100%;\n\t\tposition: relative;\n\t}\n}\n</style>\n"],"names":["_sfc_main","EditorContent","EditorOutline","useOutlineStateMixin","useOutlineActions","props","extensions","inject","renderHtml","editor","Editor","provideEditor","watch","content","setEditable","useEditorMethods"],"mappings":"kOAmCA,MAAAA,EAAA,CACA,KAAA,aACA,WAAA,CACA,cAAAC,EACA,cAAAC,CACA,EAEA,OAAA,CAAAC,EAAAC,CAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAAC,EAAA,CAEA,MAAAC,EAAAC,EAAA,YAAA,EACAC,EAAAD,EAAA,YAAA,EACAE,EAAA,IAAAC,EAAA,CACA,QAAAF,EAAAH,EAAA,OAAA,EACA,WAAAC,EAAA,CACA,CAAA,EACAK,EAAAF,CAAA,EACAG,EACA,IAAAP,EAAA,QACAQ,GAAA,CACA,QAAA,KAAA,CAAA,QAAAA,CAAA,CAAA,EACAJ,EAAA,SAAA,WAAAD,EAAAK,CAAA,EAAA,EAAA,CACA,CACA,EACA,KAAA,CAAA,YAAAC,GAAAC,EAAAN,CAAA,EACA,OAAAK,EAAA,EAAA,EACA,CAAA,OAAAL,CAAA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,OACA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,QAAA,CACA,CACA"' reuse.extract - ERROR - 'js/BaseReader-DxwpFJS0.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tv-if=\"shouldRender\"\n\t\tid=\"rich-workspace\"\n\t\t:class=\"{ focus: focus, dark: darkTheme }\">\n\t\t<RichTextReader\n\t\t\tv-if=\"!loaded || !ready\"\n\t\t\t:content=\"content\"\n\t\t\tclass=\"rich-workspace--preview\" />\n\t\t<Editor\n\t\t\tv-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t:hide-menu=\"hideMenu\"\n\t\t\tactive\n\t\t\trich-workspace\n\t\t\t@ready=\"ready = true\"\n\t\t\t@focus=\"onFocus\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getSharingToken, isPublicShare } from '@nextcloud/sharing/public'\n\nimport getEditorInstance from '../components/Editor.singleton.js'\nimport RichTextReader from '../components/RichTextReader.vue'\n\nconst IS_PUBLIC = isPublicShare()\nconst WORKSPACE_URL = generateOcsUrl(\n\t'apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace',\n\t2,\n)\nconst descriptionFile =\n\tt('text', 'Readme') + '.' + loadState('text', 'default_file_extension')\nconst SUPPORTED_STATIC_FILENAMES = [\n\tdescriptionFile,\n\t'Readme.md',\n\t'README.md',\n\t'readme.md',\n]\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tRichTextReader,\n\t\tEditor: getEditorInstance,\n\t},\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\thasRichWorkspace: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\t// Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme)\n\t\t\tlocalHasRichWorkspace: false,\n\t\t\tfocus: false,\n\t\t\tfolder: null,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tshouldAutofocus: false,\n\t\t\thideMenu: true,\n\t\t\tdarkTheme: window?.OCA?.Accessibility?.theme === 'dark',\n\t\t\tenabled: window?.OCA?.Text?.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn getSharingToken()\n\t\t},\n\t\tshouldRender() {\n\t\t\treturn this.enabled && this.localHasRichWorkspace\n\t\t},\n\t},\n\twatch: {\n\t\tpath() {\n\t\t\tthis.reset()\n\t\t},\n\t\tready() {\n\t\t\tthis.shouldAutofocus = false\n\t\t},\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector('#rich-workspace .text-editor__main')\n\t\t\t\t\t.scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t\tshouldRender(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.getFileInfo()\n\t\t\t}\n\t\t},\n\t\thasRichWorkspace(value) {\n\t\t\tthis.localHasRichWorkspace = value\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.localHasRichWorkspace = this.hasRichWorkspace\n\t\tsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tsubscribe('files:node:created', this.onFileCreated)\n\t\tsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.listenKeydownEvents()\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tunsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tunsubscribe('files:node:created', this.onFileCreated)\n\t\tunsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tunsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.unlistenKeydownEvents()\n\t},\n\tmet' reuse.extract - ERROR - 'js/RichWorkspace-D4iEdjor.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder().setApp('text').detectUser().build()\n\nexport { logger }\n"],"names":["logger","getLoggerBuilder"],"mappings":"+CAOK,MAACA,EAASC,EAAgB,EAAG,OAAO,MAAM,EAAE,WAAU,EAAG,MAAK"' reuse.extract - ERROR - 'js/logger-C5ZHccIX.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse.extract - ERROR - Could not parse 'AGPL-3.0-or-later\n */\nimport { loadState } from '@nextcloud/initial-state'\n\nimport { logger } from './helpers/logger.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\nconst workspaceEnabled = loadState('text', 'workspace_enabled')\nconst openReadOnlyEnabled = loadState('text', 'open_read_only_enabled')\n\ndocument.addEventListener('DOMContentLoaded', async () => {\n\tif (typeof OCA.Viewer === 'undefined') {\n\t\tconst { registerFileActionFallback } = await import('./helpers/files.js')\n\t\tlogger.error('Viewer app is not installed')\n\t\tregisterFileActionFallback()\n\t}\n\n\tif (workspaceAvailable && OCA && OCA?.Files?.Settings) {\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst { default: FilesSettings } = await import('./views/FilesSettings.vue')\n\n\t\tconst vm = new Vue({\n\t\t\trender: (h) => h(FilesSettings, {}),\n\t\t})\n\t\tconst el = vm.$mount().$el\n\t\tOCA.Files.Settings.register(\n\t\t\tnew OCA.Files.Settings.Setting('text', {\n\t\t\t\tel: () => {\n\t\t\t\t\treturn el\n\t\t\t\t},\n\t\t\t}),\n\t\t)\n\t}\n})\n\nOCA.Text = {\n\tRichWorkspaceEnabled: workspaceEnabled,\n\tOpenReadOnlyEnabled: openReadOnlyEnabled,\n}\n"],"file":"js/text-files.mjs"' reuse.extract - ERROR - 'js/text-files.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file # SUMMARY * Bad licenses: 0 * Deprecated licenses: 0 * Licenses without file extension: 0 * Missing licenses: 0 * Unused licenses: 0 * Used licenses: BSD-2-Clause, GPL-3.0-or-later, CC0-1.0, AGPL-3.0-or-later, ISC, BSD-3-Clause, MPL-2.0, MIT, Apache-2.0 * Read errors: 0 * Files with copyright information: 2050 / 2050 * Files with license information: 2050 / 2050 Congratulations! Your project is compliant with version 3.3 of the REUSE Specification :-)