const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('text', '', 'js/Editor-DPacYKhU.chunk.mjs'),window.OC.filePath('text', '', 'js/modulepreload-polyfill-BbX-W30F.chunk.mjs'),window.OC.filePath('text', '', 'js/emoji-picker-DlAAdvrL.chunk.mjs'),window.OC.filePath('text', '', 'js/vue.runtime.esm-CF8vEa-4.chunk.mjs'),window.OC.filePath('text', '', 'js/index-DfiDB3im.chunk.mjs'),window.OC.filePath('text', '', 'js/index-usWvSWAY.chunk.mjs'),window.OC.filePath('text', '', 'js/public-BQSk-kMe.chunk.mjs'),window.OC.filePath('text', '', 'js/NcLoadingIcon-DNqaLvLX.chunk.mjs'),window.OC.filePath('text', '', 'css/NcLoadingIcon-Bs0OvbBQ.chunk.css'),window.OC.filePath('text', '', 'css/public-DvAuxGX_.chunk.css'),window.OC.filePath('text', '', 'js/index-mgFfDjoT.chunk.mjs'),window.OC.filePath('text', '', 'js/index-DyuGUWxl.chunk.mjs'),window.OC.filePath('text', '', 'js/RichText-r6JcIr8s.chunk.mjs'),window.OC.filePath('text', '', 'js/index-D85sbSYG.chunk.mjs'),window.OC.filePath('text', '', 'js/MediaHandler.provider-iCiOLi3t.chunk.mjs'),window.OC.filePath('text', '', 'js/logger-DvmA7f2u.chunk.mjs'),window.OC.filePath('text', '', 'js/_plugin-vue2_normalizer-wd1ZAbRr.chunk.mjs'),window.OC.filePath('text', '', 'js/NcCheckboxRadioSwitch-VeztTzpz-Di1Oh6HC.chunk.mjs'),window.OC.filePath('text', '', 'css/NcCheckboxRadioSwitch-VeztTzpz-CdJ-sA3l.chunk.css'),window.OC.filePath('text', '', 'css/RichText-Bva5Bgj1.chunk.css'),window.OC.filePath('text', '', 'js/Wrapper-CJ3NwcTO.chunk.mjs'),window.OC.filePath('text', '', 'js/index-CntyOPgG.chunk.mjs'),window.OC.filePath('text', '', 'css/Wrapper-DI5hIcCX.chunk.css'),window.OC.filePath('text', '', 'js/Tooltip-Jq-sbj3g.chunk.mjs'),window.OC.filePath('text', '', 'css/Tooltip-BWLHbU-V.chunk.css'),window.OC.filePath('text', '', 'js/_commonjs-dynamic-modules-Cdb4quZm.chunk.mjs'),window.OC.filePath('text', '', 'css/Editor-B4xxENl0.chunk.css')])))=>i.map(i=>d[i]);
import{_ as d,s as c,e as u}from"./modulepreload-polyfill-BbX-W30F.chunk.mjs";import{l as s}from"./index-DfiDB3im.chunk.mjs";import{registerFileActionFallback as f,registerFileCreate as h}from"./files-h8XLPAP5.chunk.mjs";import{l as g}from"./logger-DvmA7f2u.chunk.mjs";import{o as w}from"./mime-D0Qvdd6a.chunk.mjs";import{s as p}from"./index-D85sbSYG.chunk.mjs";import y from"./RichWorkspace-CpodeN4C.chunk.mjs";import"./emoji-picker-DlAAdvrL.chunk.mjs";import"./public-BQSk-kMe.chunk.mjs";import"./NcLoadingIcon-DNqaLvLX.chunk.mjs";import"./vue.runtime.esm-CF8vEa-4.chunk.mjs";import"./index-usWvSWAY.chunk.mjs";import"./index-mgFfDjoT.chunk.mjs";import"./index-DyuGUWxl.chunk.mjs";import"./token-DsHNcSTq.chunk.mjs";import"./Editor.singleton-deI7v-iV.chunk.mjs";import"./RichTextReader-aVTjXhiQ.chunk.mjs";import"./BaseReader-CGNR7F-l.chunk.mjs";import"./RichText-r6JcIr8s.chunk.mjs";import"./MediaHandler.provider-iCiOLi3t.chunk.mjs";import"./_plugin-vue2_normalizer-wd1ZAbRr.chunk.mjs";import"./NcCheckboxRadioSwitch-VeztTzpz-Di1Oh6HC.chunk.mjs";const _=function(e){const i=()=>setTimeout(e,0);(document.attachEvent?document.readyState==="complete":document.readyState!=="loading")?i():document.addEventListener("DOMContentLoaded",e)},E={attach(e){const i=e.fileList,r=t("text","Readme")+"."+s("text","default_file_extension");i.id!=="files"&&i.id!=="files.public"||e.addMenuEntry({id:"rich-workspace-init",displayName:t("text","Add folder description"),templateName:r,iconClass:"icon-add-folder-description",fileType:"file",useInput:!1,actionHandler(){return window.FileList.createFile(r,{scrollTo:!1,animate:!1}).then(()=>u("Text::showRichWorkspace",{autofocus:!0}))},shouldShow(){return!i.findFile(r)}})}},v={el:null,attach(e){e.id!=="files"&&e.id!=="files.public"||(this.el=document.createElement("div"),e.registerHeader({id:"workspace",el:this.el,render:this.render.bind(this),priority:10}))},render(e){e.id!=="files"&&e.id!=="files.public"||(OC.Plugins.register("OCA.Files.NewFileMenu",E),d(()=>import("./vue.runtime.esm-CF8vEa-4.chunk.mjs").then(i=>i.v),[],import.meta.url).then(i=>{const r=i.default;this.el.id="files-workspace-wrapper",r.prototype.t=window.t,r.prototype.n=window.n,r.prototype.OCA=window.OCA;const a=r.extend(y),n=new a({propsData:{path:e.getCurrentDirectory(),hasRichWorkspace:!0},store:p}).$mount(this.el);c("files:navigation:changed",()=>{n.active=OCA.Files.App.getCurrentFileList()===e}),e.$el.on("urlChanged",o=>{n.path=o.dir.toString()}),e.$el.on("changeDirectory",o=>{n.path=o.dir.toString()})}))}},C=({sharingToken:e,mimetype:i,fileId:r,$el:a})=>{const n=document.createElement("div");n.id="texteditor",document.getElementById("app-content").appendChild(n),Promise.all([d(()=>import("./vue.runtime.esm-CF8vEa-4.chunk.mjs").then(o=>o.v),[],import.meta.url),d(()=>import("./Editor-DPacYKhU.chunk.mjs").then(o=>o.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url)]).then(([o,l])=>({Vue:o.default,Editor:l.default})).then(({Vue:o,Editor:l})=>{o.prototype.t=window.t,o.prototype.OCA=window.OCA,new o({render:m=>m(l,{props:{active:!0,shareToken:e,mime:i,fileId:r}}),store:p}).$mount(a)}).catch(o=>g.error("Failed to attach editor",{error:o}))};_(()=>{const e=document.getElementById("sharingToken")?document.getElementById("sharingToken").value:null;if(!e)return;if(document.querySelector("#preview table.files-filestable")){OC.Plugins.register("OCA.Files.FileList",v),f(),h();return}const i=document.getElementById("mimetype")?.value;if(i&&w.indexOf(i)!==-1){const r=document.getElementById("preview"),a=s("text","file_id");C({mimetype:i,sharingToken:e,fileId:a,$el:r})}}),OCA.Text={RichWorkspaceEnabled:s("text","workspace_available")};
//# sourceMappingURL=text-public.mjs.map
