Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2019-11-04 21:59:26 +0300
committerJulius Härtl <jus@bitgrid.net>2019-11-15 09:54:22 +0300
commit5afba747aa8662a4ab0f54c6129afbdb1deaf8e4 (patch)
tree0ddc194020201f2e28a8458c290ef3de6783c573 /js/editor.js.map
parentb1746678fd7e142cd22b115908cce72ec397184b (diff)
Bump node-sass from 4.12.0 to 4.13.0
Bumps [node-sass](https://github.com/sass/node-sass) from 4.12.0 to 4.13.0. - [Release notes](https://github.com/sass/node-sass/releases) - [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/node-sass/compare/v4.12.0...v4.13.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'js/editor.js.map')
-rw-r--r--js/editor.js.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/editor.js.map b/js/editor.js.map
index 5637b7887..5c43ac51e 100644
--- a/js/editor.js.map
+++ b/js/editor.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./src/helpers/index.js","webpack:///./src/components/EditorWrapper.vue?efc3","webpack:///./src/services/PollingBackend.js","webpack:///./src/services/SyncService.js","webpack:///./src/helpers/mappings.js","webpack:///./src/extensions/Keymap.js","webpack:///./src/mixins/isMobile.js","webpack:///./src/components/EditorWrapper.vue?a7cb","webpack:///src/components/EditorWrapper.vue","webpack:///./src/components/EditorWrapper.vue","webpack:///./src/components/EditorWrapper.vue?6f11","webpack:///./src/components/EditorWrapper.vue?9e6d","webpack:///./src/components/CollisionResolveDialog.vue?c321","webpack:///./src/components/EditorWrapper.vue?5e5f","webpack:///./src/components/EditorWrapper.vue?3adf","webpack:///./src/components/EditorWrapper.vue?bcc9","webpack:///./src/components/EditorWrapper.vue?65ff","webpack:///./src/components/CollisionResolveDialog.vue?afa1","webpack:///./src/components/CollisionResolveDialog.vue?d109","webpack:///./src/components/CollisionResolveDialog.vue?3a26","webpack:///./src/components/CollisionResolveDialog.vue?9e50","webpack:///src/components/CollisionResolveDialog.vue","webpack:///./src/components/CollisionResolveDialog.vue"],"names":["documentReady","callback","document","attachEvent","readyState","setTimeout","addEventListener","_baseUrl","generateUrl","endpointUrl","endpoint","isPublic","randomGuestNames","getRandomGuestName","Math","floor","random","length","FETCH_INTERVAL","MIN_PUSH_RETRY","PollingBackend","authority","this","_authority","fetchInterval","retryTime","lock","fetchRetryCounter","fetcher","setInterval","_fetchSteps","bind","options","shareToken","_forcedSave","fetchSteps","_manualSave","autosaveContent","sendableSteps","state","_getVersion","lastSavedVersion","_getContent","axios","post","_isPublic","documentId","id","sessionId","session","sessionToken","token","version","force","manualSave","filePath","then","response","data","console","debug","emit","sessions","steps","filter","lastContact","Date","now","maximumRefetchTimer","increaseRefetchTimer","dirty","initialLoading","_receiveSteps","resetRefetchTimer","catch","e","code","status","currentVersion","error","ERROR_TYPE","SAVE_COLLISSION","outsideChange","CONNECTION_FAILED","_sendable","sendSteps","sendable","map","s","toJSON","carefulRetryReset","PUSH_FAILURE","OC","Notification","showTemporary","carefulRetry","clearInterval","min","newRetry","defaultOptions","forceRecreate","serialize","LOAD_ERROR","SOURCE_NOT_FOUND","SyncService","eventHandlers","opened","loaded","fetched","sync","stateChange","change","save","backend","Object","assign","stepClientIDs","fileId","_openDocument","_fetchDocument","documentSource","Promise","reject","connect","get","params","guestName","readOnly","transformResponse","slice","clientIDs","newSteps","i","singleSteps","Array","isArray","forEach","step","push","clientID","getVersion","doc","_getDocument","forceSave","closed","resolve","on","_close","disconnect","event","_this","additionalData","extensionHighlight","py","gyp","wsgi","htm","xhtml","erl","jsp","pl","rss","atom","xsl","plist","rb","builder","gemspec","podspec","thor","diff","hs","icl","php3","php4","php5","php6","sh","zsh","st","as","apacheconf","osacript","b","bf","clj","coffee","cson","iced","c","hh","jinja","bat","cmd","fs","hbs","mk","mak","md","mkdown","mkd","nginxconf","m","mm","ml","rs","sci","vb","vbs","Keymap","schema","Extension","isMobile","_isMobile","beforeMount","window","_onResize","beforeDestroy","removeEventListener","methods","documentElement","clientWidth","component","_vm","_h","$createElement","_c","_self","attrs","currentSession","active","staticClass","_v","_s","t","_e","reconnect","class","hasSyncCollission","isRichEditor","syncError","ref","tiptap","autohide","directives","name","rawName","value","expression","lastSavedStatusClass","lastSavedStatus","filteredSessions","syncService","resolveUseThisVersion","resolveUseServerVersion","content","module","locals","exports","add","default","$event","$emit"],"mappings":"oGAAA,kHA4BMA,EAAgB,SAASC,IAE1BC,SAASC,YAAsC,aAAxBD,SAASE,WAAoD,YAAxBF,SAASE,YADxDC,WAAWJ,EAAU,GAIrCC,SAASI,iBAAiB,mBAAoBL,IAI1CM,EAAWC,sBAAY,cACvBC,EAAc,SAACC,GAA+B,IAArBC,EAAqB,wDACnD,OAAIA,EACH,UAAUJ,EAAV,mBAA6BG,GAE9B,UAAUH,EAAV,YAAsBG,IAGjBE,EAAmB,CAAC,YAAa,UAAW,YAAa,UAAW,eAAgB,cAAe,OAAQ,OAAQ,iBAAkB,cAAe,eAAgB,eAAgB,WAAY,WAAY,kBAAmB,eAAgB,UAAW,WAAY,QAAS,SAAU,UAAW,cAAe,SAAU,cAAe,UAAW,UAAW,mBAAoB,OAAQ,YAAa,WAAY,mBAAoB,UAAW,oBAAqB,gBAAiB,UAAW,WAAY,kBAAmB,SAAU,QAAS,WAAY,SAAU,aAAc,WAAY,SAAU,SAAU,cAAe,aAAc,WAAY,QAAS,iBAAkB,aAAc,gBAAiB,kBAAmB,OAAQ,iBAAkB,gBAAiB,SAAU,UAAW,cAAe,eAAgB,iBAAkB,cAAe,sBAAuB,SAAU,OAAQ,QAAS,WAAY,aAAc,WAAY,QAAS,aAAc,UAAW,aAAc,UAAW,OAAQ,UAAW,aAA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,YACA,kBACA,mFACA,sFACA,mHACA,2HACA,2FACA,wFAEA,YACA,aAEA,QACA,GAEA,OACA,cACA,YACA,cAEA,QACA,YACA,cAEA,QACA,aACA,YAEA,WACA,aACA,YAEA,YACA,YACA,cAEA,MACA,YACA,cAEA,UACA,aACA,aAGA,KA/CA,WAgDA,OACA,YAEA,iBAEA,cACA,YACA,oBAEA,oBAEA,SACA,kBACA,mBACA,eACA,sBACA,YACA,iBAEA,yBAGA,UACA,gBADA,WAEA,sCAIA,OAHA,gBACA,yBAEA,GAEA,qBARA,WASA,6DAEA,oBAXA,WAYA,wDAEA,uBAdA,WAeA,uEAUA,OATA,yBACA,mGAEA,0BACA,uCAEA,yBACA,sCAEA,gCAEA,kBA3BA,WA4BA,gEAEA,mBA9BA,WA+BA,mBAEA,kBAjCA,WAkCA,mFAEA,WApCA,WAoCA,WACA,mBACA,uCAGA,sBAzCA,WA0CA,qCAEA,SA5CA,WA6CA,6FAEA,aA/CA,WAgDA,mCAEA,cAlDA,WAmDA,qFAGA,OACA,2BACA,yDAGA,QAjIA,WAkIA,yCACA,mBAEA,wCAEA,QAvIA,WAuIA,WACA,+CACA,4BACA,KACA,4DAEA,cA7IA,WA6IA,WACA,8DACA,sCACA,uCACA,0CACA,sBACA,sBACA,wBAKA,SACA,sBADA,WAEA,gBACA,uFAGA,YANA,WAMA,WACA,+BAIA,8EACA,wBACA,2BACA,2BACA,YACA,iCACA,sBACA,mBACA,8DAEA,OADA,kDACA,EAEA,4BAEA,OADA,8CACA,KAIA,sDACA,mBACA,aACA,sBACA,2DAEA,uDACA,iFAIA,4BACA,aAEA,iBACA,6CAPA,+BAUA,gDACA,wBACA,qFACA,sBACA,6DACA,iCACA,sBACA,2BAEA,mCACA,uBAEA,YACA,SAGA,kCACA,6BAEA,SA7NA,IA8NA,kCACA,eACA,6BAIA,OACA,oBAEA,OADA,sBACA,MAIA,iCACA,cAEA,yCAGA,kDACA,wBACA,IACA,kDACA,yBACA,UAEA,mCACA,0BACA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AAooM,M,iCCF7pM,oBAA4X,G,qBCAlX4H,EAAOE,QAAU,EAAQ,IAAR,EAA6D,IAEhFxH,KAAK,CAACsH,EAAO5H,EAAI,sPAAuP,M,wCCFhR,ICAsM,ECkCtM,CACA,+B,iBC3BI0F,EAAY,YACd,GHTW,WAAa,IAAIC,EAAIzM,KAAS0M,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACK,YAAY,2BAA2BH,MAAM,CAAC,GAAK,sBAAsB,CAACF,EAAG,SAAS,CAAChF,GAAG,CAAC,MAAQ,SAASmH,GAAQ,OAAOtC,EAAIuC,MAAM,4BAA4B,CAACvC,EAAIS,GAAG,SAAST,EAAIU,GAAGV,EAAIW,EAAE,OAAQ,wBAAwB,UAAUX,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAAChF,GAAG,CAAC,MAAQ,SAASmH,GAAQ,OAAOtC,EAAIuC,MAAM,8BAA8B,CAACvC,EAAIS,GAAG,SAAST,EAAIU,GAAGV,EAAIW,EAAE,OAAQ,0BAA0B,cACle,IGWpB,EACA,KACA,WACA,MAIa,UAAAZ,E","file":"editor.js?v=e8aa71678bdf811feec5","sourcesContent":["/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Callback that should be executed after the document is ready\n * @param callback\n */\nimport { generateUrl } from '@nextcloud/router'\n\nconst documentReady = function(callback) {\n\tconst fn = () => setTimeout(callback, 0)\n\tif (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {\n\t\tfn()\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', callback)\n\t}\n}\n\nconst _baseUrl = generateUrl('/apps/text')\nconst endpointUrl = (endpoint, isPublic = false) => {\n\tif (isPublic) {\n\t\treturn `${_baseUrl}/public/${endpoint}`\n\t}\n\treturn `${_baseUrl}/${endpoint}`\n}\n\nconst randomGuestNames = ['Artichoke', 'Arugula', 'Asparagus', 'Avocado', 'Bamboo Shoot', 'Bean Sprout', 'Bean', 'Beet', 'Belgian Endive', 'Bell Pepper', 'Bitter Melon', 'Bitter Gourd', 'Bok Choy', 'Broccoli', 'Brussels Sprout', 'Burdock Root', 'Cabbage', 'Calabash', 'Caper', 'Carrot', 'Cassava', 'Cauliflower', 'Celery', 'Celery Root', 'Celtuce', 'Chayote', 'Chinese Broccoli', 'Corn', 'Baby Corn', 'Cucumber', 'English Cucumber', 'Gherkin', 'Pickling Cucumber', 'Daikon Radish', 'Edamame', 'Eggplant', 'Elephant Garlic', 'Endive', 'Curly', 'Escarole', 'Fennel', 'Fiddlehead', 'Galangal', 'Garlic', 'Ginger', 'Grape Leave', 'Green Bean', 'Wax Bean', 'Green', 'Amaranth Leave', 'Beet Green', 'Collard Green', 'Dandelion Green', 'Kale', 'Kohlrabi Green', 'Mustard Green', 'Rapini', 'Spinach', 'Swiss Chard', 'Turnip Green', 'Hearts of Palm', 'Horseradish', 'Jerusalem Artichoke', 'Jícama', 'Kale', 'Curly', 'Lacinato', 'Ornamental', 'Kohlrabi', 'Leeks', 'Lemongrass', 'Lettuce', 'Butterhead', 'Iceberg', 'Leaf', 'Romaine', 'Lotus Root', 'Lotus Seed', 'Mushroom', 'Napa Cabbage', 'Nopales', 'Okra', 'Olive', 'Onion', 'Green Onion', 'Parsley', 'Parsley Root', 'Parsnip', 'Pepper', 'Plantain', 'Potato', 'Pumpkin', 'Purslane', 'Radicchio', 'Radish', 'Rutabaga', 'Shallots', 'Spinach', 'Squash', 'Sweet Potato', 'Swiss Chard', 'Taro', 'Tomatillo', 'Tomato', 'Turnip', 'Water Chestnut', 'Water Spinach', 'Watercress', 'Winter Melon', 'Yams', 'Zucchini']\nconst getRandomGuestName = () => {\n\treturn randomGuestNames[Math.floor(Math.random() * randomGuestNames.length)]\n}\n\nexport {\n\tdocumentReady,\n\tendpointUrl,\n\tgetRandomGuestName,\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"editor-container\"}},[(_vm.currentSession && _vm.active)?_c('div',[(_vm.hasSyncCollission)?_c('p',{staticClass:\"msg icon-error\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'The document has been changed outside of the editor. The changes cannot be applied.'))+\"\\n\\t\\t\")]):_vm._e(),_vm._v(\" \"),(_vm.hasConnectionIssue)?_c('p',{staticClass:\"msg icon-error\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Network connection error: Could not connect to the document'))+\" \"),_c('a',{staticClass:\"button primary\",on:{\"click\":_vm.reconnect}},[_vm._v(_vm._s(_vm.t('text', 'Retry')))])]):_vm._e()]):_vm._e(),_vm._v(\" \"),(_vm.currentSession && _vm.active)?_c('div',{class:{'has-conflicts': _vm.hasSyncCollission, 'icon-loading': !_vm.initialLoading, 'richEditor': _vm.isRichEditor},attrs:{\"id\":\"editor-wrapper\"}},[_c('div',{attrs:{\"id\":\"editor\"}},[(!_vm.syncError && !_vm.readOnly)?_c('MenuBar',{ref:\"menubar\",attrs:{\"editor\":_vm.tiptap,\"is-rich-editor\":_vm.isRichEditor,\"autohide\":_vm.autohide}},[(_vm.currentSession && _vm.active)?_c('div',{attrs:{\"id\":\"editor-session-list\"}},[_c('div',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.lastSavedStatusTooltip),expression:\"lastSavedStatusTooltip\"}],staticClass:\"save-status\",class:_vm.lastSavedStatusClass},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.lastSavedStatus)+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('SessionList',{attrs:{\"sessions\":_vm.filteredSessions}},[(_vm.isPublic && _vm.currentSession.guestName)?_c('GuestNameDialog',{attrs:{\"sync-service\":_vm.syncService}}):_vm._e()],1)],1):_vm._e()]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"editor__content\"},[(!_vm.readOnly && _vm.isRichEditor)?_c('MenuBubble',{attrs:{\"editor\":_vm.tiptap}}):_vm._e(),_vm._v(\" \"),_c('EditorContent',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.initialLoading),expression:\"initialLoading\"}],staticClass:\"editor__content\",attrs:{\"editor\":_vm.tiptap}})],1)],1),_vm._v(\" \"),(_vm.hasSyncCollission)?_c('ReadOnlyEditor',{attrs:{\"content\":_vm.syncError.data.outsideChange,\"is-rich-editor\":_vm.isRichEditor}}):_vm._e()],1):_vm._e(),_vm._v(\" \"),(_vm.hasSyncCollission && !_vm.readOnly)?_c('CollisionResolveDialog',{on:{\"resolveUseThisVersion\":_vm.resolveUseThisVersion,\"resolveUseServerVersion\":_vm.resolveUseServerVersion}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport axios from '@nextcloud/axios'\nimport { endpointUrl } from '../helpers'\nimport { ERROR_TYPE } from './SyncService'\nimport { sendableSteps } from 'prosemirror-collab'\n\n/**\n * Minimum inverval to refetch the document changes\n * @type {number}\n */\nconst FETCH_INTERVAL = 300\n\n/**\n * Maximum interval between refetches of document state if multiple users have joined\n * @type {number}\n */\nconst FETCH_INTERVAL_MAX = 5000\n\n/**\n * Interval to check for changes when there is only one user joined\n * @type {number}\n */\nconst FETCH_INTERVAL_SINGLE_EDITOR = 5000\n\nconst MIN_PUSH_RETRY = 500\nconst MAX_PUSH_RETRY = 10000\n\n/* Timeout after that a PUSH_FAILURE error is emitted */\nconst WARNING_PUSH_RETRY = 5000\n\n/* Maximum number of retries for fetching before emitting a connection error */\nconst MAX_RETRY_FETCH_COUNT = 5\n\n/* Timeout for sessions to be marked as disconnected */\nconst COLLABORATOR_DISCONNECT_TIME = 20\n\nclass PollingBackend {\n\n\tconstructor(authority) {\n\t\t/** @type SyncService */\n\t\tthis._authority = authority\n\t\tthis.fetchInterval = FETCH_INTERVAL\n\t\tthis.retryTime = MIN_PUSH_RETRY\n\t\tthis.lock = false\n\t\tthis.fetchRetryCounter = 0\n\t}\n\n\tconnect() {\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), 0)\n\t}\n\n\t_isPublic() {\n\t\treturn !!this._authority.options.shareToken\n\t}\n\n\tforceSave() {\n\t\tthis._forcedSave = true\n\t\tthis.fetchSteps()\n\t}\n\n\tsave() {\n\t\tthis._manualSave = true\n\t\tthis.fetchSteps()\n\t}\n\n\tfetchSteps() {\n\t\tthis._fetchSteps()\n\t}\n\n\t/**\n\t * This method is only called though the timer\n\t */\n\t_fetchSteps() {\n\t\tif (this.lock || !this.fetcher) {\n\t\t\treturn\n\t\t}\n\t\tthis.lock = true\n\t\tlet autosaveContent\n\t\tif (this._forcedSave || this._manualSave\n\t\t\t|| (!sendableSteps(this._authority.state)\n\t\t\t&& (this._authority._getVersion() !== this._authority.document.lastSavedVersion))\n\t\t) {\n\t\t\tautosaveContent = this._authority._getContent()\n\t\t}\n\t\taxios.post(endpointUrl('session/sync', this._isPublic()), {\n\t\t\tdocumentId: this._authority.document.id,\n\t\t\tsessionId: this._authority.session.id,\n\t\t\tsessionToken: this._authority.session.token,\n\t\t\tversion: this._authority._getVersion(),\n\t\t\tautosaveContent,\n\t\t\tforce: !!this._forcedSave,\n\t\t\tmanualSave: !!this._manualSave,\n\t\t\ttoken: this._authority.options.shareToken,\n\t\t\tfilePath: this._authority.options.filePath,\n\t\t}).then((response) => {\n\t\t\tthis.fetchRetryCounter = 0\n\n\t\t\tif (this._authority.document.lastSavedVersion < response.data.document.lastSavedVersion) {\n\t\t\t\tconsole.debug('Saved document', response.data.document)\n\t\t\t\tthis._authority.emit('save', { document: response.data.document, sessions: response.data.sessions })\n\t\t\t}\n\n\t\t\tthis._authority.emit('change', { document: response.data.document, sessions: response.data.sessions })\n\t\t\tthis._authority.document = response.data.document\n\t\t\tthis._authority.sessions = response.data.sessions\n\n\t\t\tif (response.data.steps.length === 0) {\n\t\t\t\tthis.lock = false\n\t\t\t\tif (response.data.sessions.filter((session) => session.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME).length < 2) {\n\t\t\t\t\tthis.maximumRefetchTimer()\n\t\t\t\t} else {\n\t\t\t\t\tthis.increaseRefetchTimer()\n\t\t\t\t}\n\t\t\t\tthis._authority.emit('stateChange', { dirty: false })\n\t\t\t\tthis._authority.emit('stateChange', { initialLoading: true })\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis._authority._receiveSteps(response.data)\n\t\t\tthis.lock = false\n\t\t\tthis._forcedSave = false\n\t\t\tthis.resetRefetchTimer()\n\t\t}).catch((e) => {\n\t\t\tthis.lock = false\n\t\t\tif (!e.response || e.code === 'ECONNABORTED') {\n\t\t\t\tif (this.fetchRetryCounter++ >= MAX_RETRY_FETCH_COUNT) {\n\t\t\t\t\tconsole.error('[PollingBackend:fetchSteps] Network error when fetching steps, emitting CONNECTION_FAILED')\n\t\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(`[PollingBackend:fetchSteps] Network error when fetching steps, retry ${this.fetchRetryCounter}`)\n\t\t\t\t}\n\t\t\t} else if (e.response.status === 409 && e.response.data.document.currentVersion === this._authority.document.currentVersion) {\n\t\t\t\t// Only emit conflict event if we have synced until the latest version\n\t\t\t\tconsole.error('Conflict during file save, please resolve')\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.SAVE_COLLISSION, {\n\t\t\t\t\toutsideChange: e.response.data.outsideChange,\n\t\t\t\t})\n\t\t\t} else if (e.response.status === 403) {\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch steps due to other reason', e)\n\t\t\t}\n\t\t})\n\t\tthis._manualSave = false\n\t\tthis._forcedSave = false\n\t}\n\n\tsendSteps(_sendable) {\n\t\tthis._authority.emit('stateChange', { dirty: true })\n\t\tif (this.lock) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis._authority.sendSteps()\n\t\t\t}, 100)\n\t\t\treturn\n\t\t}\n\t\tthis.lock = true\n\t\tconst sendable = (typeof _sendable === 'function') ? _sendable() : _sendable\n\t\tconst steps = sendable.steps\n\t\taxios.post(endpointUrl('session/push', !!this._authority.options.shareToken), {\n\t\t\tdocumentId: this._authority.document.id,\n\t\t\tsessionId: this._authority.session.id,\n\t\t\tsessionToken: this._authority.session.token,\n\t\t\tsteps: steps.map(s => s.toJSON ? s.toJSON() : s) || [],\n\t\t\tversion: sendable.version,\n\t\t\ttoken: this._authority.options.shareToken,\n\t\t\tfilePath: this._authority.options.filePath,\n\t\t}).then((response) => {\n\t\t\tthis.carefulRetryReset()\n\t\t\tthis.lock = false\n\t\t\tthis.fetchSteps()\n\t\t}).catch((e) => {\n\t\t\tconsole.error('failed to apply steps due to collission, retrying')\n\t\t\tthis.lock = false\n\t\t\tif (!e.response || e.code === 'ECONNABORTED') {\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t\treturn\n\t\t\t} else if (e.response.status === 403 && e.response.data.document.currentVersion === this._authority.document.currentVersion) {\n\t\t\t\t// Only emit conflict event if we have synced until the latest version\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.PUSH_FAILURE, {})\n\t\t\t\tOC.Notification.showTemporary('Changes could not be sent yet')\n\t\t\t}\n\n\t\t\tthis.fetchSteps()\n\t\t\tthis.carefulRetry()\n\t\t})\n\t}\n\n\tdisconnect() {\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = 0\n\t}\n\n\tresetRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = FETCH_INTERVAL\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\n\t}\n\n\tincreaseRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = Math.min(this.fetchInterval * 2, FETCH_INTERVAL_MAX)\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\t}\n\n\tmaximumRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = FETCH_INTERVAL_SINGLE_EDITOR\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\t}\n\n\tcarefulRetry() {\n\t\tconst newRetry = this.retryTime ? Math.min(this.retryTime * 2, MAX_PUSH_RETRY) : MIN_PUSH_RETRY\n\t\tif (newRetry > WARNING_PUSH_RETRY && this.retryTime < WARNING_PUSH_RETRY) {\n\t\t\tOC.Notification.showTemporary('Changes could not be sent yet')\n\t\t\tthis._authority.emit('error', ERROR_TYPE.PUSH_FAILURE, {})\n\t\t}\n\t\tthis.retryTime = newRetry\n\t}\n\n\tcarefulRetryReset() {\n\t\tthis.retryTime = MIN_PUSH_RETRY\n\t}\n\n}\n\nexport default PollingBackend\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport axios from '@nextcloud/axios'\n\nimport PollingBackend from './PollingBackend'\nimport { endpointUrl } from './../helpers'\nimport { getVersion, sendableSteps } from 'prosemirror-collab'\n\nconst defaultOptions = {\n\tshareToken: null,\n\tforceRecreate: false,\n\tserialize: (document) => document,\n}\n\nconst ERROR_TYPE = {\n\t/**\n\t * Failed to save collaborative document due to external change\n\t * collission needs to be resolved manually\n\t */\n\tSAVE_COLLISSION: 0,\n\t/**\n\t * Failed to push changes for MAX_REBASE_RETRY times\n\t */\n\tPUSH_FAILURE: 1,\n\n\tLOAD_ERROR: 2,\n\n\tCONNECTION_FAILED: 3,\n\n\tSOURCE_NOT_FOUND: 4,\n}\n\nclass SyncService {\n\n\tconstructor(options) {\n\t\tthis.eventHandlers = {\n\t\t\t/* Document state */\n\t\t\topened: [],\n\t\t\tloaded: [],\n\t\t\t/* All initial steps fetched */\n\t\t\tfetched: [],\n\t\t\t/* received new steps */\n\t\t\tsync: [],\n\t\t\t/* state changed (dirty) */\n\t\t\tstateChange: [],\n\t\t\t/* error */\n\t\t\terror: [],\n\t\t\t/* Events for session and document meta data */\n\t\t\tchange: [],\n\t\t\t/* Emitted after successful save */\n\t\t\tsave: [],\n\t\t}\n\n\t\tthis.backend = new PollingBackend(this)\n\n\t\tthis.options = Object.assign({}, defaultOptions, options)\n\n\t\tthis.document = null\n\t\tthis.session = null\n\t\tthis.sessions = []\n\n\t\tthis.steps = []\n\t\tthis.stepClientIDs = []\n\n\t\treturn this\n\t}\n\n\topen({ fileId, filePath }) {\n\t\treturn this._openDocument({ fileId, filePath }).then(() => {\n\t\t\tthis.emit('opened', {\n\t\t\t\tdocument: this.document,\n\t\t\t\tsession: this.session,\n\t\t\t})\n\t\t\treturn this._fetchDocument().then(({ data }) => {\n\n\t\t\t\tthis.emit('loaded', {\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tsession: this.session,\n\t\t\t\t\tdocumentSource: '' + data,\n\t\t\t\t})\n\t\t\t})\n\t\t}).catch((error) => {\n\t\t\tif (!error.response || error.code === 'ECONNABORTED') {\n\t\t\t\tthis.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t} else {\n\t\t\t\tthis.emit('error', ERROR_TYPE.LOAD_ERROR, error.response.status)\n\t\t\t}\n\n\t\t\treturn Promise.reject(error)\n\t\t})\n\t}\n\n\tstartSync() {\n\t\tthis.backend.connect()\n\t}\n\n\t_openDocument({ fileId, filePath }) {\n\t\treturn axios.get(endpointUrl('session/create', !!this.options.shareToken), {\n\t\t\tparams: {\n\t\t\t\tfileId: fileId,\n\t\t\t\tfilePath,\n\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\tguestName: this.options.guestName,\n\t\t\t\tforceRecreate: this.options.forceRecreate,\n\t\t\t},\n\t\t}).then((response) => {\n\t\t\tthis.document = response.data.document\n\t\t\tthis.document.readOnly = response.data.readOnly\n\t\t\tthis.session = response.data.session\n\t\t\treturn response.data\n\t\t})\n\t}\n\n\t_fetchDocument() {\n\t\treturn axios.get(\n\t\t\tendpointUrl('session/fetch', !!this.options.shareToken), {\n\t\t\t\ttransformResponse: [(data) => data],\n\t\t\t\tparams: {\n\t\t\t\t\tdocumentId: this.document.id,\n\t\t\t\t\tsessionId: this.session.id,\n\t\t\t\t\tsessionToken: this.session.token,\n\t\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\t},\n\t\t\t}\n\t\t)\n\t}\n\n\tupdateSession(guestName) {\n\t\tif (!this.isPublic()) {\n\t\t\treturn\n\t\t}\n\t\treturn axios.post(\n\t\t\tendpointUrl('session', !!this.options.shareToken), {\n\t\t\t\tdocumentId: this.document.id,\n\t\t\t\tsessionId: this.session.id,\n\t\t\t\tsessionToken: this.session.token,\n\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\tguestName,\n\t\t\t}\n\t\t).then(({ data }) => {\n\t\t\tthis.session = data\n\t\t\treturn data\n\t\t}).catch((error) => {\n\t\t\tconsole.error('Failed to update the session', error)\n\t\t\treturn Promise.reject(error)\n\t\t})\n\t}\n\n\tsendSteps(_sendable) {\n\t\tconst sendable = _sendable || sendableSteps(this.state)\n\t\tif (!sendable) {\n\t\t\treturn\n\t\t}\n\t\treturn this.backend.sendSteps(sendable)\n\t}\n\n\tstepsSince(version) {\n\t\treturn {\n\t\t\tsteps: this.steps.slice(version),\n\t\t\tclientIDs: this.stepClientIDs.slice(version),\n\t\t}\n\t}\n\n\t_receiveSteps({ steps, document }) {\n\t\tconst newSteps = []\n\t\tfor (let i = 0; i < steps.length; i++) {\n\t\t\tconst singleSteps = steps[i].data\n\t\t\tif (!Array.isArray(singleSteps)) {\n\t\t\t\tconsole.error('Invalid step data, skipping step', steps[i])\n\t\t\t\t// TODO: recover\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tsingleSteps.forEach(step => {\n\t\t\t\tthis.steps.push(step)\n\t\t\t\tnewSteps.push({\n\t\t\t\t\tstep,\n\t\t\t\t\tclientID: steps[i].sessionId,\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t\tthis.emit('sync', { steps: newSteps, document })\n\t\tconsole.debug('receivedSteps', 'newVersion', this._getVersion())\n\t}\n\n\t_getVersion() {\n\t\tif (this.state) {\n\t\t\treturn getVersion(this.state)\n\t\t}\n\t\treturn 0\n\t}\n\t_getDocument() {\n\t\tif (this.state) {\n\t\t\treturn this.state.doc\n\t\t}\n\t}\n\n\t_getContent() {\n\t\treturn this.options.serialize(this._getDocument())\n\t}\n\n\tsave() {\n\t\tif (this.backend.save) {\n\t\t\tthis.backend.save()\n\t\t}\n\t}\n\n\tforceSave() {\n\t\tif (this.backend.forceSave) {\n\t\t\tthis.backend.forceSave()\n\t\t}\n\t}\n\n\tclose() {\n\t\tlet closed = false\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.on('save', () => {\n\t\t\t\tthis._close().then(() => {\n\t\t\t\t\tclosed = true\n\t\t\t\t\tresolve()\n\t\t\t\t}).catch(() => resolve())\n\t\t\t})\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (!closed) {\n\t\t\t\t\tthis._close().then(() => {\n\t\t\t\t\t\tresolve()\n\t\t\t\t\t}).catch(() => resolve())\n\t\t\t\t}\n\t\t\t}, 2000)\n\t\t\tthis.save()\n\t\t})\n\t}\n\n\t_close() {\n\t\tif (this.document === null || this.session === null) {\n\t\t\treturn Promise.resolve()\n\t\t}\n\t\tthis.backend.disconnect()\n\t\treturn axios.get(\n\t\t\tendpointUrl('session/close', !!this.options.shareToken), {\n\t\t\t\tparams: {\n\t\t\t\t\tdocumentId: this.document.id,\n\t\t\t\t\tsessionId: this.session.id,\n\t\t\t\t\tsessionToken: this.session.token,\n\t\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\t},\n\t\t\t}\n\t\t)\n\t}\n\n\ton(event, callback, _this) {\n\t\tthis.eventHandlers[event].push(callback.bind(_this))\n\t\treturn this\n\t}\n\n\temit(event, data, additionalData) {\n\t\tif (typeof this.eventHandlers[event] !== 'undefined') {\n\t\t\tthis.eventHandlers[event].forEach(function(callback) {\n\t\t\t\tcallback(data, additionalData)\n\t\t\t})\n\t\t} else {\n\t\t\tconsole.error('Event not found', event)\n\t\t}\n\t}\n\n\tisPublic() {\n\t\treturn !!this.options.shareToken\n\t}\n\n}\n\nexport default SyncService\nexport { SyncService, ERROR_TYPE }\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst extensionHighlight = {\n\tpy: 'python',\n\tgyp: 'python',\n\twsgi: 'python',\n\thtm: 'html',\n\txhtml: 'html',\n\terl: 'erlang',\n\tjsp: 'java',\n\tpl: 'perl',\n\trss: 'xml',\n\tatom: 'xml',\n\txsl: 'xml',\n\tplist: 'xml',\n\trb: 'ruby',\n\tbuilder: 'ruby',\n\tgemspec: 'ruby',\n\tpodspec: 'ruby',\n\tthor: 'ruby',\n\tdiff: 'patch',\n\ths: 'haskell',\n\ticl: 'haskell',\n\tphp3: 'php',\n\tphp4: 'php',\n\tphp5: 'php',\n\tphp6: 'php',\n\tsh: 'bash',\n\tzsh: 'bash',\n\tst: 'smalltalk',\n\tas: 'actionscript',\n\tapacheconf: 'apache',\n\tosacript: 'applescript',\n\tb: 'brainfuck',\n\tbf: 'brainfuck',\n\tclj: 'clojure',\n\t'cmake.in': 'cmake',\n\tcoffee: 'coffeescript',\n\tcson: 'coffescript',\n\ticed: 'coffescript',\n\tc: 'cpp',\n\t'c++': 'cpp',\n\t'h++': 'cpp',\n\thh: 'cpp',\n\tjinja: 'django',\n\tbat: 'dos',\n\tcmd: 'dos',\n\tfs: 'fsharp',\n\thbs: 'handlebars',\n\t'html.hbs': 'handlebars',\n\t'html.handlebars': 'handlebars',\n\t'sublime_metrics': 'json',\n\t'sublime_session': 'json',\n\t'sublime-keymap': 'json',\n\t'sublime-mousemap': 'json',\n\t'sublime-project': 'json',\n\t'sublime-settings': 'json',\n\t'sublime-workspace': 'json',\n\tmk: 'makefile',\n\tmak: 'makefile',\n\tmd: 'markdown',\n\tmkdown: 'markdown',\n\tmkd: 'markdown',\n\tnginxconf: 'nginx',\n\tm: 'objectivec',\n\tmm: 'objectivec',\n\tml: 'ocaml',\n\trs: 'rust',\n\tsci: 'scilab',\n\tvb: 'vbnet',\n\tvbs: 'vbscript',\n}\n\nexport default extensionHighlight\nexport {\n\textensionHighlight,\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { Extension } from 'tiptap'\n\nexport default class Keymap extends Extension {\n\n\tget name() {\n\t\treturn 'save'\n\t}\n\n\tkeys({ schema }) {\n\t\treturn this.options\n\t}\n\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tisMobile: this._isMobile(),\n\t\t}\n\t},\n\tbeforeMount() {\n\t\twindow.addEventListener('resize', this._onResize)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this._onResize)\n\t},\n\tmethods: {\n\t\t_onResize() {\n\t\t\t// Update mobile mode\n\t\t\tthis.isMobile = this._isMobile()\n\t\t},\n\t\t_isMobile() {\n\t\t\t// check if content width is under 768px\n\t\t\treturn document.documentElement.clientWidth < 768\n\t\t},\n\t},\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div id=\"editor-container\">\n\t\t<div v-if=\"currentSession && active\">\n\t\t\t<p v-if=\"hasSyncCollission\" class=\"msg icon-error\">\n\t\t\t\t{{ t('text', 'The document has been changed outside of the editor. The changes cannot be applied.') }}\n\t\t\t</p>\n\t\t\t<p v-if=\"hasConnectionIssue\" class=\"msg icon-error\">\n\t\t\t\t{{ t('text', 'Network connection error: Could not connect to the document') }} <a class=\"button primary\" @click=\"reconnect\">{{ t('text', 'Retry') }}</a>\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-if=\"currentSession && active\" id=\"editor-wrapper\" :class=\"{'has-conflicts': hasSyncCollission, 'icon-loading': !initialLoading, 'richEditor': isRichEditor}\">\n\t\t\t<div id=\"editor\">\n\t\t\t\t<MenuBar v-if=\"!syncError && !readOnly\"\n\t\t\t\t\tref=\"menubar\"\n\t\t\t\t\t:editor=\"tiptap\"\n\t\t\t\t\t:is-rich-editor=\"isRichEditor\"\n\t\t\t\t\t:autohide=\"autohide\">\n\t\t\t\t\t<div v-if=\"currentSession && active\" id=\"editor-session-list\">\n\t\t\t\t\t\t<div v-tooltip=\"lastSavedStatusTooltip\" class=\"save-status\" :class=\"lastSavedStatusClass\">\n\t\t\t\t\t\t\t{{ lastSavedStatus }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<SessionList :sessions=\"filteredSessions\">\n\t\t\t\t\t\t\t<GuestNameDialog v-if=\"isPublic && currentSession.guestName\" :sync-service=\"syncService\" />\n\t\t\t\t\t\t</SessionList>\n\t\t\t\t\t</div>\n\t\t\t\t</MenuBar>\n\t\t\t\t<div class=\"editor__content\">\n\t\t\t\t\t<MenuBubble v-if=\"!readOnly && isRichEditor\" :editor=\"tiptap\" />\n\t\t\t\t\t<EditorContent v-show=\"initialLoading\"\n\t\t\t\t\t\tclass=\"editor__content\"\n\t\t\t\t\t\t:editor=\"tiptap\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<ReadOnlyEditor v-if=\"hasSyncCollission\"\n\t\t\t\t:content=\"syncError.data.outsideChange\"\n\t\t\t\t:is-rich-editor=\"isRichEditor\" />\n\t\t</div>\n\n\t\t<CollisionResolveDialog v-if=\"hasSyncCollission && !readOnly\" @resolveUseThisVersion=\"resolveUseThisVersion\" @resolveUseServerVersion=\"resolveUseServerVersion\" />\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport escapeHtml from 'escape-html'\n\nimport { SyncService, ERROR_TYPE } from './../services/SyncService'\nimport { endpointUrl, getRandomGuestName } from './../helpers'\nimport { extensionHighlight } from '../helpers/mappings'\nimport { createEditor, markdownit, createMarkdownSerializer, serializePlainText, loadSyntaxHighlight } from './../EditorFactory'\n\nimport { EditorContent } from 'tiptap'\nimport { Collaboration } from 'tiptap-extensions'\nimport { Keymap } from './../extensions'\nimport isMobile from './../mixins/isMobile'\n\nimport Tooltip from 'nextcloud-vue/dist/Directives/Tooltip'\n\nconst EDITOR_PUSH_DEBOUNCE = 200\n\nexport default {\n\tname: 'EditorWrapper',\n\tcomponents: {\n\t\tEditorContent,\n\t\tMenuBar: () => import(/* webpackChunkName: \"editor-rich\" */'./MenuBar'),\n\t\tMenuBubble: () => import(/* webpackChunkName: \"editor-rich\" */'./MenuBubble'),\n\t\tReadOnlyEditor: () => import(/* webpackChunkName: \"editor\" */'./ReadOnlyEditor'),\n\t\tCollisionResolveDialog: () => import(/* webpackChunkName: \"editor\" */'./CollisionResolveDialog'),\n\t\tGuestNameDialog: () => import(/* webpackChunkName: \"editor-guest\" */'./GuestNameDialog'),\n\t\tSessionList: () => import(/* webpackChunkName: \"editor-collab\" */'./SessionList'),\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t},\n\tmixins: [\n\t\tisMobile,\n\t],\n\tprops: {\n\t\trelativePath: {\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: null,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tautohide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttiptap: null,\n\t\t\t/** @type SyncService */\n\t\t\tsyncService: null,\n\n\t\t\tdocument: null,\n\t\t\tsessions: [],\n\t\t\tcurrentSession: null,\n\n\t\t\tfilteredSessions: {},\n\n\t\t\tdirty: false,\n\t\t\tinitialLoading: false,\n\t\t\tlastSavedString: '',\n\t\t\tsyncError: null,\n\t\t\thasConnectionIssue: false,\n\t\t\treadOnly: true,\n\t\t\tforceRecreate: false,\n\n\t\t\tsaveStatusPolling: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tlastSavedStatus() {\n\t\t\tlet status = (this.dirtyStateIndicator ? '*' : '')\n\t\t\tif (!this.isMobile) {\n\t\t\t\tstatus += this.lastSavedString\n\t\t\t}\n\t\t\treturn status\n\t\t},\n\t\tlastSavedStatusClass() {\n\t\t\treturn this.syncError && this.lastSavedString !== '' ? 'error' : ''\n\t\t},\n\t\tdirtyStateIndicator() {\n\t\t\treturn this.hasUnpushedChanges || this.hasUnsavedChanges\n\t\t},\n\t\tlastSavedStatusTooltip() {\n\t\t\tlet message = t('text', 'Last save {lastSave}', { lastSave: this.lastSavedString })\n\t\t\tif (this.hasSyncCollission) {\n\t\t\t\tmessage = t('text', 'The document has been changed outside of the editor. The changes cannot be applied.')\n\t\t\t}\n\t\t\tif (this.hasUnpushedChanges) {\n\t\t\t\tmessage += ' - ' + t('text', 'Unpushed changes')\n\t\t\t}\n\t\t\tif (this.hasUnsavedChanges) {\n\t\t\t\tmessage += ' - ' + t('text', 'Unsaved changes')\n\t\t\t}\n\t\t\treturn { content: message, placement: 'bottom' }\n\t\t},\n\t\thasSyncCollission() {\n\t\t\treturn this.syncError && this.syncError.type === ERROR_TYPE.SAVE_COLLISSION\n\t\t},\n\t\thasUnpushedChanges() {\n\t\t\treturn this.dirty\n\t\t},\n\t\thasUnsavedChanges() {\n\t\t\treturn this.document && this.document.lastSavedVersion < this.document.currentVersion\n\t\t},\n\t\tbackendUrl() {\n\t\t\treturn (endpoint) => {\n\t\t\t\treturn endpointUrl(endpoint, !!this.shareToken)\n\t\t\t}\n\t\t},\n\t\thasDocumentParameters() {\n\t\t\treturn this.fileId || this.shareToken\n\t\t},\n\t\tisPublic() {\n\t\t\treturn document.getElementById('isPublic') && document.getElementById('isPublic').value === '1'\n\t\t},\n\t\tisRichEditor() {\n\t\t\treturn this.mime === 'text/markdown'\n\t\t},\n\t\tfileExtension() {\n\t\t\treturn this.relativePath ? this.relativePath.split('/').pop().split('.').pop() : 'txt'\n\t\t},\n\t},\n\twatch: {\n\t\tlastSavedStatus: function() {\n\t\t\tthis.$refs.menubar && this.$refs.menubar.redrawMenuBar()\n\t\t},\n\t},\n\tmounted() {\n\t\tif (this.active && (this.hasDocumentParameters)) {\n\t\t\tthis.initSession()\n\t\t}\n\t\tthis.$parent.$emit('update:loaded', true)\n\t},\n\tcreated() {\n\t\tthis.saveStatusPolling = setInterval(() => {\n\t\t\tthis.updateLastSavedStatus()\n\t\t}, 2000)\n\t\tdocument.addEventListener('keydown', this._keyUpHandler, true)\n\t},\n\tbeforeDestroy() {\n\t\tdocument.removeEventListener('keydown', this._keyUpHandler, true)\n\t\tclearInterval(this.saveStatusPolling)\n\t\tif (this.currentSession && this.syncService) {\n\t\t\tthis.syncService.close().then(() => {\n\t\t\t\tthis.currentSession = null\n\t\t\t\tthis.syncService = null\n\t\t\t}).catch((e) => {\n\t\t\t\t// Ignore issues closing the session since those might happen due to network issues\n\t\t\t})\n\t\t}\n\t},\n\tmethods: {\n\t\tupdateLastSavedStatus() {\n\t\t\tif (this.document) {\n\t\t\t\tthis.lastSavedString = window.moment(this.document.lastSavedVersionTime * 1000).fromNow()\n\t\t\t}\n\t\t},\n\t\tinitSession() {\n\t\t\tif (!this.hasDocumentParameters) {\n\t\t\t\tthis.$parent.$emit('error', 'No valid file provided')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst guestName = localStorage.getItem('nick') ? localStorage.getItem('nick') : getRandomGuestName()\n\t\t\tthis.syncService = new SyncService({\n\t\t\t\tshareToken: this.shareToken,\n\t\t\t\tfilePath: this.relativePath,\n\t\t\t\tguestName,\n\t\t\t\tforceRecreate: this.forceRecreate,\n\t\t\t\tserialize: (document) => {\n\t\t\t\t\tif (this.isRichEditor) {\n\t\t\t\t\t\tconst markdown = (createMarkdownSerializer(this.tiptap.nodes, this.tiptap.marks)).serialize(document)\n\t\t\t\t\t\tconsole.debug('serialized document', { markdown })\n\t\t\t\t\t\treturn markdown\n\t\t\t\t\t}\n\t\t\t\t\tconst file = serializePlainText(this.tiptap)\n\t\t\t\t\tconsole.debug('serialized document', { file })\n\t\t\t\t\treturn file\n\n\t\t\t\t},\n\t\t\t})\n\t\t\t\t.on('opened', ({ document, session }) => {\n\t\t\t\t\tthis.currentSession = session\n\t\t\t\t\tthis.document = document\n\t\t\t\t\tthis.readOnly = document.readOnly\n\t\t\t\t\tlocalStorage.setItem('nick', this.currentSession.guestName)\n\t\t\t\t})\n\t\t\t\t.on('change', ({ document, sessions }) => {\n\t\t\t\t\tif (this.document.baseVersionEtag !== '' && document.baseVersionEtag !== this.document.baseVersionEtag) {\n\t\t\t\t\t\tthis.resolveUseServerVersion()\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthis.updateSessions.bind(this)(sessions)\n\t\t\t\t\tthis.document = document\n\n\t\t\t\t\tthis.syncError = null\n\t\t\t\t\tthis.tiptap.setOptions({ editable: !this.readOnly })\n\n\t\t\t\t})\n\t\t\t\t.on('loaded', ({ documentSource }) => {\n\t\t\t\t\tthis.hasConnectionIssue = false\n\t\t\t\t\tloadSyntaxHighlight(extensionHighlight[this.fileExtension] ? extensionHighlight[this.fileExtension] : this.fileExtension).then((languages) => {\n\t\t\t\t\t\tthis.tiptap = createEditor({\n\t\t\t\t\t\t\tcontent: this.isRichEditor ? markdownit.render(documentSource) : '<pre>' + escapeHtml(documentSource) + '</pre>',\n\t\t\t\t\t\t\tonInit: ({ state }) => {\n\t\t\t\t\t\t\t\tthis.syncService.state = state\n\t\t\t\t\t\t\t\tthis.syncService.startSync()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonUpdate: ({ state }) => {\n\t\t\t\t\t\t\t\tthis.syncService.state = state\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\textensions: [\n\t\t\t\t\t\t\t\tnew Collaboration({\n\t\t\t\t\t\t\t\t// the initial version we start with\n\t\t\t\t\t\t\t\t// version is an integer which is incremented with every change\n\t\t\t\t\t\t\t\t\tversion: this.document.initialVersion,\n\t\t\t\t\t\t\t\t\tclientID: this.currentSession.id,\n\t\t\t\t\t\t\t\t\t// debounce changes so we can save some bandwidth\n\t\t\t\t\t\t\t\t\tdebounce: EDITOR_PUSH_DEBOUNCE,\n\t\t\t\t\t\t\t\t\tonSendable: ({ sendable }) => {\n\t\t\t\t\t\t\t\t\t\tif (this.syncService) {\n\t\t\t\t\t\t\t\t\t\t\tthis.syncService.sendSteps()\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tnew Keymap({\n\t\t\t\t\t\t\t\t\t'Ctrl-s': () => {\n\t\t\t\t\t\t\t\t\t\tthis.syncService.save()\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tenableRichEditing: this.isRichEditor,\n\t\t\t\t\t\t\tlanguages,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.syncService.state = this.tiptap.state\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.on('sync', ({ steps, document }) => {\n\t\t\t\t\tthis.hasConnectionIssue = false\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.tiptap.extensions.options.collaboration.update({\n\t\t\t\t\t\t\tversion: document.currentVersion,\n\t\t\t\t\t\t\tsteps: steps,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.syncService.state = this.tiptap.state\n\t\t\t\t\t\tthis.updateLastSavedStatus()\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error('Failed to update steps in collaboration plugin', e)\n\t\t\t\t\t\t// TODO: we should recreate the editing session when this happens\n\t\t\t\t\t}\n\t\t\t\t\tthis.document = document\n\t\t\t\t})\n\t\t\t\t.on('error', (error, data) => {\n\t\t\t\t\tthis.tiptap.setOptions({ editable: false })\n\t\t\t\t\tif (error === ERROR_TYPE.SAVE_COLLISSION && (!this.syncError || this.syncError.type !== ERROR_TYPE.SAVE_COLLISSION)) {\n\t\t\t\t\t\tthis.initialLoading = true\n\t\t\t\t\t\tthis.syncError = {\n\t\t\t\t\t\t\ttype: error,\n\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (error === ERROR_TYPE.CONNECTION_FAILED && !this.hasConnectionIssue) {\n\t\t\t\t\t\tthis.hasConnectionIssue = true\n\t\t\t\t\t\t// FIXME: ideally we just try to reconnect in the service, so we don't loose steps\n\t\t\t\t\t\tOC.Notification.showTemporary('Connection failed, reconnecting')\n\t\t\t\t\t\tsetTimeout(this.reconnect.bind(this), 1000)\n\t\t\t\t\t}\n\t\t\t\t\tif (error === ERROR_TYPE.SOURCE_NOT_FOUND) {\n\t\t\t\t\t\tthis.initialLoading = false\n\t\t\t\t\t\tOC.Notification.showTemporary('Source not found')\n\t\t\t\t\t\tthis.$emit('close')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on('stateChange', (state) => {\n\t\t\t\t\tif (state.initialLoading && !this.initialLoading) {\n\t\t\t\t\t\tthis.initialLoading = true\n\t\t\t\t\t\tif (this.autofocus) {\n\t\t\t\t\t\t\tthis.tiptap.focus('start')\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$emit('ready')\n\t\t\t\t\t}\n\t\t\t\t\tif (state.hasOwnProperty('dirty')) {\n\t\t\t\t\t\tthis.dirty = state.dirty\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\tthis.syncService.open({\n\t\t\t\tfileId: this.fileId,\n\t\t\t\tfilePath: this.relativePath,\n\t\t\t}).catch((e) => {\n\t\t\t\tthis.hasConnectionIssue = true\n\t\t\t})\n\t\t\tthis.forceRecreate = false\n\t\t},\n\n\t\tresolveUseThisVersion() {\n\t\t\tthis.syncService.forceSave()\n\t\t\tthis.tiptap.setOptions({ editable: !this.readOnly })\n\t\t},\n\n\t\tresolveUseServerVersion() {\n\t\t\tthis.forceRecreate = true\n\t\t\tthis.reconnect()\n\t\t},\n\n\t\treconnect() {\n\t\t\tif (this.syncService) {\n\t\t\t\tthis.syncService.close().then(() => {\n\t\t\t\t\tthis.syncService = null\n\t\t\t\t\tthis.tiptap.destroy()\n\t\t\t\t\tthis.initSession()\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\t// Ignore issues closing the session since those might happen due to network issues\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.syncService = null\n\t\t\t\tthis.tiptap.destroy()\n\t\t\t\tthis.initSession()\n\t\t\t}\n\t\t},\n\n\t\tupdateSessions(sessions) {\n\t\t\tthis.sessions = sessions.sort((a, b) => b.lastContact - a.lastContact)\n\t\t\tconst currentSessionIds = this.sessions.map((session) => session.userId)\n\t\t\tconst currentGuestIds = this.sessions.map((session) => session.guestId)\n\n\t\t\tconst removedSessions = Object.keys(this.filteredSessions)\n\t\t\t\t.filter(sessionId => !currentSessionIds.includes(sessionId) && !currentGuestIds.includes(sessionId))\n\n\t\t\tfor (const index in removedSessions) {\n\t\t\t\tVue.delete(this.filteredSessions, removedSessions[index])\n\t\t\t}\n\t\t\tfor (const index in this.sessions) {\n\t\t\t\tconst session = this.sessions[index]\n\t\t\t\tconst sessionKey = session.displayName ? session.userId : session.id\n\t\t\t\tif (this.filteredSessions[sessionKey]) {\n\t\t\t\t\t// update timestamp if relevant\n\t\t\t\t\tif (this.filteredSessions[sessionKey].lastContact < session.lastContact) {\n\t\t\t\t\t\tVue.set(this.filteredSessions[sessionKey], 'lastContact', session.lastContact)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tVue.set(this.filteredSessions, sessionKey, session)\n\t\t\t\t}\n\t\t\t\tif (session.id === this.currentSession.id) {\n\t\t\t\t\tVue.set(this.filteredSessions[sessionKey], 'isCurrent', true)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_keyUpHandler(event) {\n\t\t\tconst key = event.key || event.keyCode\n\t\t\tif ((event.ctrlKey || event.metaKey) && !event.shiftKey && (key === 'f' || key === 70)) {\n\t\t\t\tevent.stopPropagation()\n\t\t\t\treturn true\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t#editor-container {\n\t\tdisplay: block;\n\t\twidth: 100vw;\n\t\tmax-width: 100%;\n\t\theight: calc(100% - 50px);\n\t\ttop: 50px;\n\t\tleft: 0;\n\t\tmargin: 0 auto;\n\t\tposition: relative;\n\t\tbackground-color: var(--color-main-background);\n\t}\n\n\t#editor-wrapper {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\t.ProseMirror {\n\t\t\tmargin-top: 0 !important;\n\t\t}\n\t\t&.icon-loading {\n\t\t\t#editor {\n\t\t\t\topacity: 0.3;\n\t\t\t}\n\t\t}\n\t}\n\n\t#editor, .editor {\n\t\tbackground: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: var(--border-radius);\n\t\tpadding: 0;\n\t\tposition: relative;\n\t\toverflow-y: auto;\n\t\toverflow-x: hidden;\n\t\twidth: 100%;\n\t}\n\n\t.msg.icon-error {\n\t\tpadding: 12px;\n\t\tborder-bottom:1px solid var(--color-error);\n\t\tpadding-left: 30px;\n\t\tbackground-position: 8px center;\n\t}\n\n\t.save-status {\n\t\tpadding: 9px;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-lighter);\n\n\t\t&.error {\n\t\t\tbackground-color: var(--color-error);\n\t\t\tcolor: var(--color-main-background);\n\t\t\tborder-radius: 3px;\n\t\t}\n\t}\n\n\t#editor-container #editor-wrapper.has-conflicts {\n\t\theight: calc(100% - 50px);\n\n\t\t#editor, #read-only-editor {\n\t\t\twidth: 50%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n\n\t#editor-session-list {\n\t\tpadding: 9px;\n\t\tpadding-right: 16px;\n\t\tdisplay: flex;\n\n\t\tinput, div {\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 3px;\n\t\t}\n\t}\n\n\t.editor__content {\n\t\tmax-width: 670px;\n\t\tmargin: auto;\n\t\tposition: relative;\n\t}\n\n\t#body-public {\n\t\theight: auto;\n\t}\n\n\t#files-public-content {\n\t\theight: auto;\n\t\t#editor-wrapper {\n\t\t\tposition: relative;\n\t\t}\n\t\t#editor-container {\n\t\t\ttop: 0;\n\t\t\twidth: 100%;\n\n\t\t\t#editor::v-deep .menubar {\n\t\t\t\t// sticky position is not working as body is our scroll container\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 50px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t#editor {\n\t\t\t\tpadding-top: 50px;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t.has-conflicts #editor {\n\t\t\t\tpadding-top: 0px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.ie {\n\t\t#editor::v-deep .menubar {\n\t\t\t// sticky position is not working as body is our scroll container\n\t\t\tposition: fixed;\n\t\t\ttop: 50px;\n\t\t\twidth: 100%;\n\t\t}\n\t\t.editor__content::v-deep .ProseMirror {\n\t\t\tpadding-top: 50px;\n\t\t}\n\t}\n\n</style>\n<style lang=\"scss\">\n\t@import './../../css/style';\n\n\t#editor-wrapper {\n\t\t@import './../../css/prosemirror';\n\n\t\t&:not(.richEditor) .ProseMirror {\n\t\t\tpre {\n\t\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t\t&::before {\n\t\t\t\t\tcontent: attr(data-language);\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\tfont-size: 0.6rem;\n\t\t\t\t}\n\t\t\t\tcode {\n\t\t\t\t\t.hljs-comment,\n\t\t\t\t\t.hljs-quote {\n\t\t\t\t\t\tcolor: #999999;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-variable,\n\t\t\t\t\t.hljs-template-variable,\n\t\t\t\t\t.hljs-attribute,\n\t\t\t\t\t.hljs-tag,\n\t\t\t\t\t.hljs-name,\n\t\t\t\t\t.hljs-regexp,\n\t\t\t\t\t.hljs-link,\n\t\t\t\t\t.hljs-selector-id,\n\t\t\t\t\t.hljs-selector-class {\n\t\t\t\t\t\tcolor: #f2777a;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-number,\n\t\t\t\t\t.hljs-meta,\n\t\t\t\t\t.hljs-built_in,\n\t\t\t\t\t.hljs-builtin-name,\n\t\t\t\t\t.hljs-literal,\n\t\t\t\t\t.hljs-type,\n\t\t\t\t\t.hljs-params {\n\t\t\t\t\t\tcolor: #f99157;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-string,\n\t\t\t\t\t.hljs-symbol,\n\t\t\t\t\t.hljs-bullet {\n\t\t\t\t\t\tcolor: #99cc99;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-title,\n\t\t\t\t\t.hljs-section {\n\t\t\t\t\t\tcolor: #ffcc66;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-keyword,\n\t\t\t\t\t.hljs-selector-tag {\n\t\t\t\t\t\tcolor: #6699cc;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-emphasis {\n\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-strong {\n\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./EditorWrapper.vue?vue&type=template&id=48781c22&scoped=true&\"\nimport script from \"./EditorWrapper.vue?vue&type=script&lang=js&\"\nexport * from \"./EditorWrapper.vue?vue&type=script&lang=js&\"\nimport style0 from \"./EditorWrapper.vue?vue&type=style&index=0&id=48781c22&scoped=true&lang=scss&\"\nimport style1 from \"./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"48781c22\",\n null\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=48781c22&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"635c033a\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"5039213c\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"a3c96434\", content, true, {});","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=48781c22&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=48781c22&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"#editor-container[data-v-48781c22]{display:block;width:100vw;max-width:100%;height:calc(100% - 50px);top:50px;left:0;margin:0 auto;position:relative;background-color:var(--color-main-background)}#editor-wrapper[data-v-48781c22]{display:flex;width:100%;height:100%;overflow:hidden;position:absolute}#editor-wrapper .ProseMirror[data-v-48781c22]{margin-top:0 !important}#editor-wrapper.icon-loading #editor[data-v-48781c22]{opacity:0.3}#editor[data-v-48781c22],.editor[data-v-48781c22]{background:var(--color-main-background);color:var(--color-main-text);background-clip:padding-box;border-radius:var(--border-radius);padding:0;position:relative;overflow-y:auto;overflow-x:hidden;width:100%}.msg.icon-error[data-v-48781c22]{padding:12px;border-bottom:1px solid var(--color-error);padding-left:30px;background-position:8px center}.save-status[data-v-48781c22]{padding:9px;text-overflow:ellipsis;color:var(--color-text-lighter)}.save-status.error[data-v-48781c22]{background-color:var(--color-error);color:var(--color-main-background);border-radius:3px}#editor-container #editor-wrapper.has-conflicts[data-v-48781c22]{height:calc(100% - 50px)}#editor-container #editor-wrapper.has-conflicts #editor[data-v-48781c22],#editor-container #editor-wrapper.has-conflicts #read-only-editor[data-v-48781c22]{width:50%;height:100%}#editor-session-list[data-v-48781c22]{padding:9px;padding-right:16px;display:flex}#editor-session-list input[data-v-48781c22],#editor-session-list div[data-v-48781c22]{vertical-align:middle;margin-left:3px}.editor__content[data-v-48781c22]{max-width:670px;margin:auto;position:relative}#body-public[data-v-48781c22]{height:auto}#files-public-content[data-v-48781c22]{height:auto}#files-public-content #editor-wrapper[data-v-48781c22]{position:relative}#files-public-content #editor-container[data-v-48781c22]{top:0;width:100%}#files-public-content #editor-container #editor[data-v-48781c22] .menubar{position:fixed;top:50px;width:100%}#files-public-content #editor-container #editor[data-v-48781c22]{padding-top:50px;overflow:auto}#files-public-content #editor-container .has-conflicts #editor[data-v-48781c22]{padding-top:0px}.ie #editor[data-v-48781c22] .menubar{position:fixed;top:50px;width:100%}.ie .editor__content[data-v-48781c22] .ProseMirror{padding-top:50px}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".modal-container #editor-container{position:absolute}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:\\\"\\\";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid #8cf;pointer-events:none}.has-conflicts .ProseMirror-menubar,#editor-wrapper.icon-loading .ProseMirror-menubar{display:none}.ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}.ProseMirror-gapcursor:after{content:\\\"\\\";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid var(--color-main-text);animation:ProseMirror-cursor-blink 1.1s steps(2, start) infinite}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}#editor-wrapper div.ProseMirror{margin-top:44px;height:100%;position:relative;word-wrap:break-word;white-space:pre-wrap;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;padding:4px 8px 200px 14px;line-height:150%;font-size:14px;outline:none}#editor-wrapper div.ProseMirror[contenteditable=true],#editor-wrapper div.ProseMirror[contenteditable=false]{border:none !important;width:100%;background-color:transparent;color:var(--color-main-text);opacity:1;-webkit-user-select:text;user-select:text;font-size:14px}#editor-wrapper div.ProseMirror p:first-child,#editor-wrapper div.ProseMirror h1:first-child,#editor-wrapper div.ProseMirror h2:first-child,#editor-wrapper div.ProseMirror h3:first-child,#editor-wrapper div.ProseMirror h4:first-child,#editor-wrapper div.ProseMirror h5:first-child,#editor-wrapper div.ProseMirror h6:first-child{margin-top:10px}#editor-wrapper div.ProseMirror a{color:var(--color-primary-element);text-decoration:underline;padding:.5em 0}#editor-wrapper div.ProseMirror p{margin-bottom:1em;line-height:150%}#editor-wrapper div.ProseMirror em{font-style:italic}#editor-wrapper div.ProseMirror h1,#editor-wrapper div.ProseMirror h2,#editor-wrapper div.ProseMirror h3,#editor-wrapper div.ProseMirror h4,#editor-wrapper div.ProseMirror h5,#editor-wrapper div.ProseMirror h6{font-weight:600;line-height:120%;margin-top:24px;margin-bottom:12px;color:var(--color-main-text)}#editor-wrapper div.ProseMirror h1{font-size:36px;margin-top:48px}#editor-wrapper div.ProseMirror h2{font-size:28px;margin-top:48px}#editor-wrapper div.ProseMirror h3{font-size:24px}#editor-wrapper div.ProseMirror h4{font-size:21px}#editor-wrapper div.ProseMirror h5{font-size:17px}#editor-wrapper div.ProseMirror h6{font-size:14px}#editor-wrapper div.ProseMirror img{cursor:default;max-width:100%}#editor-wrapper div.ProseMirror hr{padding:2px 0;border:none;margin:1em 0;width:100%}#editor-wrapper div.ProseMirror hr:after{content:\\\"\\\";display:block;height:1px;background-color:var(--color-border-dark);line-height:2px}#editor-wrapper div.ProseMirror pre{white-space:pre-wrap;background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:1em 1.3em;margin-bottom:1em}#editor-wrapper div.ProseMirror p code{background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:.1em .3em}#editor-wrapper div.ProseMirror li{position:relative}#editor-wrapper div.ProseMirror ul,#editor-wrapper div.ProseMirror ol{padding-left:14px}#editor-wrapper div.ProseMirror ul li{list-style-type:disc}#editor-wrapper div.ProseMirror ul>li>ul>li{list-style-type:circle}#editor-wrapper div.ProseMirror ul>li>ul>li ul li{list-style-type:square}#editor-wrapper div.ProseMirror blockquote{padding-left:1em;border-left:4px solid var(--color-primary-element);color:var(--color-text-maxcontrast);margin-left:0;margin-right:0}#editor-wrapper .ProseMirror-focused .ProseMirror-gapcursor{display:block}#editor-wrapper .editor__content p.is-empty:first-child::before{content:attr(data-empty-text);float:left;color:var(--color-text-maxcontrast);pointer-events:none;height:0}#editor-wrapper:not(.richEditor) .ProseMirror pre{background-color:var(--color-main-background)}#editor-wrapper:not(.richEditor) .ProseMirror pre::before{content:attr(data-language);text-transform:uppercase;display:block;text-align:right;font-weight:bold;font-size:0.6rem}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-comment,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-quote{color:#999999}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-variable,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-template-variable,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-attribute,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-tag,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-name,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-regexp,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-link,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-id,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-class{color:#f2777a}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-number,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-meta,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-built_in,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-builtin-name,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-literal,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-type,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-params{color:#f99157}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-string,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-symbol,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-bullet{color:#99cc99}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-title,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-section{color:#ffcc66}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-keyword,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-tag{color:#6699cc}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-emphasis{font-style:italic}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-strong{font-weight:700}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"#resolve-conflicts[data-v-7fd0186f]{display:flex;position:fixed;z-index:10000;bottom:0;max-width:900px;width:100vw;margin:auto;padding:20px 0}#resolve-conflicts button[data-v-7fd0186f]{margin:auto;box-shadow:0 0 10px var(--color-box-shadow)}\\n\", \"\"]);\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"collision-resolve-dialog\",attrs:{\"id\":\"resolve-conflicts\"}},[_c('button',{on:{\"click\":function($event){return _vm.$emit('resolveUseThisVersion')}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('text', 'Use current version'))+\"\\n\\t\")]),_vm._v(\" \"),_c('button',{on:{\"click\":function($event){return _vm.$emit('resolveUseServerVersion')}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('text', 'Use the saved version'))+\"\\n\\t\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div id=\"resolve-conflicts\" class=\"collision-resolve-dialog\">\n\t\t<button @click=\"$emit('resolveUseThisVersion')\">\n\t\t\t{{ t('text', 'Use current version') }}\n\t\t</button>\n\t\t<button @click=\"$emit('resolveUseServerVersion')\">\n\t\t\t{{ t('text', 'Use the saved version') }}\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'CollisionResolveDialog',\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t#resolve-conflicts {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tbottom: 0;\n\t\tmax-width: 900px;\n\t\twidth: 100vw;\n\t\tmargin: auto;\n\t\tpadding: 20px 0;\n\n\t\tbutton {\n\t\t\tmargin: auto;\n\t\t\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./CollisionResolveDialog.vue?vue&type=template&id=7fd0186f&scoped=true&\"\nimport script from \"./CollisionResolveDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./CollisionResolveDialog.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7fd0186f\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///./src/helpers/index.js","webpack:///./src/components/EditorWrapper.vue?f2e1","webpack:///./src/services/PollingBackend.js","webpack:///./src/services/SyncService.js","webpack:///./src/helpers/mappings.js","webpack:///./src/extensions/Keymap.js","webpack:///./src/mixins/isMobile.js","webpack:///./src/components/EditorWrapper.vue?a7cb","webpack:///src/components/EditorWrapper.vue","webpack:///./src/components/EditorWrapper.vue","webpack:///./src/components/EditorWrapper.vue?edd2","webpack:///./src/components/EditorWrapper.vue?9e6d","webpack:///./src/components/CollisionResolveDialog.vue?c321","webpack:///./src/components/EditorWrapper.vue?f93a","webpack:///./src/components/EditorWrapper.vue?3bcb","webpack:///./src/components/EditorWrapper.vue?bcc9","webpack:///./src/components/EditorWrapper.vue?65ff","webpack:///./src/components/CollisionResolveDialog.vue?afa1","webpack:///./src/components/CollisionResolveDialog.vue?d109","webpack:///./src/components/CollisionResolveDialog.vue?3a26","webpack:///./src/components/CollisionResolveDialog.vue?9e50","webpack:///src/components/CollisionResolveDialog.vue","webpack:///./src/components/CollisionResolveDialog.vue"],"names":["documentReady","callback","document","attachEvent","readyState","setTimeout","addEventListener","_baseUrl","generateUrl","endpointUrl","endpoint","isPublic","randomGuestNames","getRandomGuestName","Math","floor","random","length","FETCH_INTERVAL","MIN_PUSH_RETRY","PollingBackend","authority","this","_authority","fetchInterval","retryTime","lock","fetchRetryCounter","fetcher","setInterval","_fetchSteps","bind","options","shareToken","_forcedSave","fetchSteps","_manualSave","autosaveContent","sendableSteps","state","_getVersion","lastSavedVersion","_getContent","axios","post","_isPublic","documentId","id","sessionId","session","sessionToken","token","version","force","manualSave","filePath","then","response","data","console","debug","emit","sessions","steps","filter","lastContact","Date","now","maximumRefetchTimer","increaseRefetchTimer","dirty","initialLoading","_receiveSteps","resetRefetchTimer","catch","e","code","status","currentVersion","error","ERROR_TYPE","SAVE_COLLISSION","outsideChange","CONNECTION_FAILED","_sendable","sendSteps","sendable","map","s","toJSON","carefulRetryReset","PUSH_FAILURE","OC","Notification","showTemporary","carefulRetry","clearInterval","min","newRetry","defaultOptions","forceRecreate","serialize","LOAD_ERROR","SOURCE_NOT_FOUND","SyncService","eventHandlers","opened","loaded","fetched","sync","stateChange","change","save","backend","Object","assign","stepClientIDs","fileId","_openDocument","_fetchDocument","documentSource","Promise","reject","connect","get","params","guestName","readOnly","transformResponse","slice","clientIDs","newSteps","i","singleSteps","Array","isArray","forEach","step","push","clientID","getVersion","doc","_getDocument","forceSave","closed","resolve","on","_close","disconnect","event","_this","additionalData","extensionHighlight","py","gyp","wsgi","htm","xhtml","erl","jsp","pl","rss","atom","xsl","plist","rb","builder","gemspec","podspec","thor","diff","hs","icl","php3","php4","php5","php6","sh","zsh","st","as","apacheconf","osacript","b","bf","clj","coffee","cson","iced","c","hh","jinja","bat","cmd","fs","hbs","mk","mak","md","mkdown","mkd","nginxconf","m","mm","ml","rs","sci","vb","vbs","Keymap","schema","Extension","isMobile","_isMobile","beforeMount","window","_onResize","beforeDestroy","removeEventListener","methods","documentElement","clientWidth","component","_vm","_h","$createElement","_c","_self","attrs","currentSession","active","staticClass","_v","_s","t","_e","reconnect","class","hasSyncCollission","isRichEditor","syncError","ref","tiptap","autohide","directives","name","rawName","value","expression","lastSavedStatusClass","lastSavedStatus","filteredSessions","syncService","resolveUseThisVersion","resolveUseServerVersion","content","module","locals","exports","add","default","$event","$emit"],"mappings":"oGAAA,kHA4BMA,EAAgB,SAASC,IAE1BC,SAAS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,mBA9BA,WA+BA,mBAEA,kBAjCA,WAkCA,mFAEA,WApCA,WAoCA,WACA,mBACA,uCAGA,sBAzCA,WA0CA,qCAEA,SA5CA,WA6CA,6FAEA,aA/CA,WAgDA,mCAEA,cAlDA,WAmDA,qFAGA,OACA,2BACA,yDAGA,QAjIA,WAkIA,yCACA,mBAEA,wCAEA,QAvIA,WAuIA,WACA,+CACA,4BACA,KACA,4DAEA,cA7IA,WA6IA,WACA,8DACA,sCACA,uCACA,0CACA,sBACA,sBACA,wBAKA,SACA,sBADA,WAEA,gBACA,uFAGA,YANA,WAMA,WACA,+BAIA,8EACA,wBACA,2BACA,2BACA,YACA,iCACA,sBACA,mBACA,8DAEA,OADA,kDACA,EAEA,4BAEA,OADA,8CACA,KAIA,sDACA,mBACA,aACA,sBACA,2DAEA,uDACA,iFAIA,4BACA,aAEA,iBACA,6CAPA,+BAUA,gDACA,wBACA,qFACA,sBACA,6DACA,iCACA,sBACA,2BAEA,mCACA,uBAEA,YACA,SAGA,kCACA,6BAEA,SA7NA,IA8NA,kCACA,eACA,6BAIA,OACA,oBAEA,OADA,sBACA,MAIA,iCACA,cAEA,yCAGA,kDACA,wBACA,IACA,kDACA,yBACA,UAEA,mCACA,0BACA,SACA,kEAGA,gBAEA,0BACA,mCACA,2EACA,oBACA,aACA,OACA,SAGA,gDACA,wBAEA,iEACA,qCAEA,yBACA,oBACA,kDACA,qBAGA,8BACA,sCACA,oBACA,aACA,wBAEA,kBAEA,4BACA,oBAGA,uBACA,mBACA,6BACA,mBACA,2BAEA,2BApIA,sDAuIA,sBA/IA,WAgJA,6BACA,mDAGA,wBApJA,WAqJA,sBACA,kBAGA,UAzJA,WAyJA,WACA,iBACA,0CACA,mBACA,mBACA,mBACA,wBAIA,sBACA,sBACA,qBAIA,eAzKA,SAyKA,GACA,0EACA,wDACA,qDAEA,qCACA,4DAEA,eACA,6CAEA,4BACA,uBACA,8BACA,yBAEA,oDACA,oEAGA,yCAEA,+BACA,yDAIA,cApMA,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IW,EAAE,OAAQ,wBAAwB,UAAUX,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAAChF,GAAG,CAAC,MAAQ,SAASmH,GAAQ,OAAOtC,EAAIuC,MAAM,8BAA8B,CAACvC,EAAIS,GAAG,SAAST,EAAIU,GAAGV,EAAIW,EAAE,OAAQ,0BAA0B,cACle,IGWpB,EACA,KACA,WACA,MAIa,UAAAZ,E","file":"editor.js?v=5e27cab6f5e9888f87e3","sourcesContent":["/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Callback that should be executed after the document is ready\n * @param callback\n */\nimport { generateUrl } from '@nextcloud/router'\n\nconst documentReady = function(callback) {\n\tconst fn = () => setTimeout(callback, 0)\n\tif (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {\n\t\tfn()\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', callback)\n\t}\n}\n\nconst _baseUrl = generateUrl('/apps/text')\nconst endpointUrl = (endpoint, isPublic = false) => {\n\tif (isPublic) {\n\t\treturn `${_baseUrl}/public/${endpoint}`\n\t}\n\treturn `${_baseUrl}/${endpoint}`\n}\n\nconst randomGuestNames = ['Artichoke', 'Arugula', 'Asparagus', 'Avocado', 'Bamboo Shoot', 'Bean Sprout', 'Bean', 'Beet', 'Belgian Endive', 'Bell Pepper', 'Bitter Melon', 'Bitter Gourd', 'Bok Choy', 'Broccoli', 'Brussels Sprout', 'Burdock Root', 'Cabbage', 'Calabash', 'Caper', 'Carrot', 'Cassava', 'Cauliflower', 'Celery', 'Celery Root', 'Celtuce', 'Chayote', 'Chinese Broccoli', 'Corn', 'Baby Corn', 'Cucumber', 'English Cucumber', 'Gherkin', 'Pickling Cucumber', 'Daikon Radish', 'Edamame', 'Eggplant', 'Elephant Garlic', 'Endive', 'Curly', 'Escarole', 'Fennel', 'Fiddlehead', 'Galangal', 'Garlic', 'Ginger', 'Grape Leave', 'Green Bean', 'Wax Bean', 'Green', 'Amaranth Leave', 'Beet Green', 'Collard Green', 'Dandelion Green', 'Kale', 'Kohlrabi Green', 'Mustard Green', 'Rapini', 'Spinach', 'Swiss Chard', 'Turnip Green', 'Hearts of Palm', 'Horseradish', 'Jerusalem Artichoke', 'Jícama', 'Kale', 'Curly', 'Lacinato', 'Ornamental', 'Kohlrabi', 'Leeks', 'Lemongrass', 'Lettuce', 'Butterhead', 'Iceberg', 'Leaf', 'Romaine', 'Lotus Root', 'Lotus Seed', 'Mushroom', 'Napa Cabbage', 'Nopales', 'Okra', 'Olive', 'Onion', 'Green Onion', 'Parsley', 'Parsley Root', 'Parsnip', 'Pepper', 'Plantain', 'Potato', 'Pumpkin', 'Purslane', 'Radicchio', 'Radish', 'Rutabaga', 'Shallots', 'Spinach', 'Squash', 'Sweet Potato', 'Swiss Chard', 'Taro', 'Tomatillo', 'Tomato', 'Turnip', 'Water Chestnut', 'Water Spinach', 'Watercress', 'Winter Melon', 'Yams', 'Zucchini']\nconst getRandomGuestName = () => {\n\treturn randomGuestNames[Math.floor(Math.random() * randomGuestNames.length)]\n}\n\nexport {\n\tdocumentReady,\n\tendpointUrl,\n\tgetRandomGuestName,\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"editor-container\"}},[(_vm.currentSession && _vm.active)?_c('div',[(_vm.hasSyncCollission)?_c('p',{staticClass:\"msg icon-error\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'The document has been changed outside of the editor. The changes cannot be applied.'))+\"\\n\\t\\t\")]):_vm._e(),_vm._v(\" \"),(_vm.hasConnectionIssue)?_c('p',{staticClass:\"msg icon-error\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Network connection error: Could not connect to the document'))+\" \"),_c('a',{staticClass:\"button primary\",on:{\"click\":_vm.reconnect}},[_vm._v(_vm._s(_vm.t('text', 'Retry')))])]):_vm._e()]):_vm._e(),_vm._v(\" \"),(_vm.currentSession && _vm.active)?_c('div',{class:{'has-conflicts': _vm.hasSyncCollission, 'icon-loading': !_vm.initialLoading, 'richEditor': _vm.isRichEditor},attrs:{\"id\":\"editor-wrapper\"}},[_c('div',{attrs:{\"id\":\"editor\"}},[(!_vm.syncError && !_vm.readOnly)?_c('MenuBar',{ref:\"menubar\",attrs:{\"editor\":_vm.tiptap,\"is-rich-editor\":_vm.isRichEditor,\"autohide\":_vm.autohide}},[(_vm.currentSession && _vm.active)?_c('div',{attrs:{\"id\":\"editor-session-list\"}},[_c('div',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.lastSavedStatusTooltip),expression:\"lastSavedStatusTooltip\"}],staticClass:\"save-status\",class:_vm.lastSavedStatusClass},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.lastSavedStatus)+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('SessionList',{attrs:{\"sessions\":_vm.filteredSessions}},[(_vm.isPublic && _vm.currentSession.guestName)?_c('GuestNameDialog',{attrs:{\"sync-service\":_vm.syncService}}):_vm._e()],1)],1):_vm._e()]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"editor__content\"},[(!_vm.readOnly && _vm.isRichEditor)?_c('MenuBubble',{attrs:{\"editor\":_vm.tiptap}}):_vm._e(),_vm._v(\" \"),_c('EditorContent',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.initialLoading),expression:\"initialLoading\"}],staticClass:\"editor__content\",attrs:{\"editor\":_vm.tiptap}})],1)],1),_vm._v(\" \"),(_vm.hasSyncCollission)?_c('ReadOnlyEditor',{attrs:{\"content\":_vm.syncError.data.outsideChange,\"is-rich-editor\":_vm.isRichEditor}}):_vm._e()],1):_vm._e(),_vm._v(\" \"),(_vm.hasSyncCollission && !_vm.readOnly)?_c('CollisionResolveDialog',{on:{\"resolveUseThisVersion\":_vm.resolveUseThisVersion,\"resolveUseServerVersion\":_vm.resolveUseServerVersion}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport axios from '@nextcloud/axios'\nimport { endpointUrl } from '../helpers'\nimport { ERROR_TYPE } from './SyncService'\nimport { sendableSteps } from 'prosemirror-collab'\n\n/**\n * Minimum inverval to refetch the document changes\n * @type {number}\n */\nconst FETCH_INTERVAL = 300\n\n/**\n * Maximum interval between refetches of document state if multiple users have joined\n * @type {number}\n */\nconst FETCH_INTERVAL_MAX = 5000\n\n/**\n * Interval to check for changes when there is only one user joined\n * @type {number}\n */\nconst FETCH_INTERVAL_SINGLE_EDITOR = 5000\n\nconst MIN_PUSH_RETRY = 500\nconst MAX_PUSH_RETRY = 10000\n\n/* Timeout after that a PUSH_FAILURE error is emitted */\nconst WARNING_PUSH_RETRY = 5000\n\n/* Maximum number of retries for fetching before emitting a connection error */\nconst MAX_RETRY_FETCH_COUNT = 5\n\n/* Timeout for sessions to be marked as disconnected */\nconst COLLABORATOR_DISCONNECT_TIME = 20\n\nclass PollingBackend {\n\n\tconstructor(authority) {\n\t\t/** @type SyncService */\n\t\tthis._authority = authority\n\t\tthis.fetchInterval = FETCH_INTERVAL\n\t\tthis.retryTime = MIN_PUSH_RETRY\n\t\tthis.lock = false\n\t\tthis.fetchRetryCounter = 0\n\t}\n\n\tconnect() {\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), 0)\n\t}\n\n\t_isPublic() {\n\t\treturn !!this._authority.options.shareToken\n\t}\n\n\tforceSave() {\n\t\tthis._forcedSave = true\n\t\tthis.fetchSteps()\n\t}\n\n\tsave() {\n\t\tthis._manualSave = true\n\t\tthis.fetchSteps()\n\t}\n\n\tfetchSteps() {\n\t\tthis._fetchSteps()\n\t}\n\n\t/**\n\t * This method is only called though the timer\n\t */\n\t_fetchSteps() {\n\t\tif (this.lock || !this.fetcher) {\n\t\t\treturn\n\t\t}\n\t\tthis.lock = true\n\t\tlet autosaveContent\n\t\tif (this._forcedSave || this._manualSave\n\t\t\t|| (!sendableSteps(this._authority.state)\n\t\t\t&& (this._authority._getVersion() !== this._authority.document.lastSavedVersion))\n\t\t) {\n\t\t\tautosaveContent = this._authority._getContent()\n\t\t}\n\t\taxios.post(endpointUrl('session/sync', this._isPublic()), {\n\t\t\tdocumentId: this._authority.document.id,\n\t\t\tsessionId: this._authority.session.id,\n\t\t\tsessionToken: this._authority.session.token,\n\t\t\tversion: this._authority._getVersion(),\n\t\t\tautosaveContent,\n\t\t\tforce: !!this._forcedSave,\n\t\t\tmanualSave: !!this._manualSave,\n\t\t\ttoken: this._authority.options.shareToken,\n\t\t\tfilePath: this._authority.options.filePath,\n\t\t}).then((response) => {\n\t\t\tthis.fetchRetryCounter = 0\n\n\t\t\tif (this._authority.document.lastSavedVersion < response.data.document.lastSavedVersion) {\n\t\t\t\tconsole.debug('Saved document', response.data.document)\n\t\t\t\tthis._authority.emit('save', { document: response.data.document, sessions: response.data.sessions })\n\t\t\t}\n\n\t\t\tthis._authority.emit('change', { document: response.data.document, sessions: response.data.sessions })\n\t\t\tthis._authority.document = response.data.document\n\t\t\tthis._authority.sessions = response.data.sessions\n\n\t\t\tif (response.data.steps.length === 0) {\n\t\t\t\tthis.lock = false\n\t\t\t\tif (response.data.sessions.filter((session) => session.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME).length < 2) {\n\t\t\t\t\tthis.maximumRefetchTimer()\n\t\t\t\t} else {\n\t\t\t\t\tthis.increaseRefetchTimer()\n\t\t\t\t}\n\t\t\t\tthis._authority.emit('stateChange', { dirty: false })\n\t\t\t\tthis._authority.emit('stateChange', { initialLoading: true })\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis._authority._receiveSteps(response.data)\n\t\t\tthis.lock = false\n\t\t\tthis._forcedSave = false\n\t\t\tthis.resetRefetchTimer()\n\t\t}).catch((e) => {\n\t\t\tthis.lock = false\n\t\t\tif (!e.response || e.code === 'ECONNABORTED') {\n\t\t\t\tif (this.fetchRetryCounter++ >= MAX_RETRY_FETCH_COUNT) {\n\t\t\t\t\tconsole.error('[PollingBackend:fetchSteps] Network error when fetching steps, emitting CONNECTION_FAILED')\n\t\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(`[PollingBackend:fetchSteps] Network error when fetching steps, retry ${this.fetchRetryCounter}`)\n\t\t\t\t}\n\t\t\t} else if (e.response.status === 409 && e.response.data.document.currentVersion === this._authority.document.currentVersion) {\n\t\t\t\t// Only emit conflict event if we have synced until the latest version\n\t\t\t\tconsole.error('Conflict during file save, please resolve')\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.SAVE_COLLISSION, {\n\t\t\t\t\toutsideChange: e.response.data.outsideChange,\n\t\t\t\t})\n\t\t\t} else if (e.response.status === 403) {\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch steps due to other reason', e)\n\t\t\t}\n\t\t})\n\t\tthis._manualSave = false\n\t\tthis._forcedSave = false\n\t}\n\n\tsendSteps(_sendable) {\n\t\tthis._authority.emit('stateChange', { dirty: true })\n\t\tif (this.lock) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis._authority.sendSteps()\n\t\t\t}, 100)\n\t\t\treturn\n\t\t}\n\t\tthis.lock = true\n\t\tconst sendable = (typeof _sendable === 'function') ? _sendable() : _sendable\n\t\tconst steps = sendable.steps\n\t\taxios.post(endpointUrl('session/push', !!this._authority.options.shareToken), {\n\t\t\tdocumentId: this._authority.document.id,\n\t\t\tsessionId: this._authority.session.id,\n\t\t\tsessionToken: this._authority.session.token,\n\t\t\tsteps: steps.map(s => s.toJSON ? s.toJSON() : s) || [],\n\t\t\tversion: sendable.version,\n\t\t\ttoken: this._authority.options.shareToken,\n\t\t\tfilePath: this._authority.options.filePath,\n\t\t}).then((response) => {\n\t\t\tthis.carefulRetryReset()\n\t\t\tthis.lock = false\n\t\t\tthis.fetchSteps()\n\t\t}).catch((e) => {\n\t\t\tconsole.error('failed to apply steps due to collission, retrying')\n\t\t\tthis.lock = false\n\t\t\tif (!e.response || e.code === 'ECONNABORTED') {\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t\treturn\n\t\t\t} else if (e.response.status === 403 && e.response.data.document.currentVersion === this._authority.document.currentVersion) {\n\t\t\t\t// Only emit conflict event if we have synced until the latest version\n\t\t\t\tthis._authority.emit('error', ERROR_TYPE.PUSH_FAILURE, {})\n\t\t\t\tOC.Notification.showTemporary('Changes could not be sent yet')\n\t\t\t}\n\n\t\t\tthis.fetchSteps()\n\t\t\tthis.carefulRetry()\n\t\t})\n\t}\n\n\tdisconnect() {\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = 0\n\t}\n\n\tresetRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = FETCH_INTERVAL\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\n\t}\n\n\tincreaseRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = Math.min(this.fetchInterval * 2, FETCH_INTERVAL_MAX)\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\t}\n\n\tmaximumRefetchTimer() {\n\t\tif (this.fetcher === 0) {\n\t\t\treturn\n\t\t}\n\t\tthis.fetchInterval = FETCH_INTERVAL_SINGLE_EDITOR\n\t\tclearInterval(this.fetcher)\n\t\tthis.fetcher = setInterval(this._fetchSteps.bind(this), this.fetchInterval)\n\t}\n\n\tcarefulRetry() {\n\t\tconst newRetry = this.retryTime ? Math.min(this.retryTime * 2, MAX_PUSH_RETRY) : MIN_PUSH_RETRY\n\t\tif (newRetry > WARNING_PUSH_RETRY && this.retryTime < WARNING_PUSH_RETRY) {\n\t\t\tOC.Notification.showTemporary('Changes could not be sent yet')\n\t\t\tthis._authority.emit('error', ERROR_TYPE.PUSH_FAILURE, {})\n\t\t}\n\t\tthis.retryTime = newRetry\n\t}\n\n\tcarefulRetryReset() {\n\t\tthis.retryTime = MIN_PUSH_RETRY\n\t}\n\n}\n\nexport default PollingBackend\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport axios from '@nextcloud/axios'\n\nimport PollingBackend from './PollingBackend'\nimport { endpointUrl } from './../helpers'\nimport { getVersion, sendableSteps } from 'prosemirror-collab'\n\nconst defaultOptions = {\n\tshareToken: null,\n\tforceRecreate: false,\n\tserialize: (document) => document,\n}\n\nconst ERROR_TYPE = {\n\t/**\n\t * Failed to save collaborative document due to external change\n\t * collission needs to be resolved manually\n\t */\n\tSAVE_COLLISSION: 0,\n\t/**\n\t * Failed to push changes for MAX_REBASE_RETRY times\n\t */\n\tPUSH_FAILURE: 1,\n\n\tLOAD_ERROR: 2,\n\n\tCONNECTION_FAILED: 3,\n\n\tSOURCE_NOT_FOUND: 4,\n}\n\nclass SyncService {\n\n\tconstructor(options) {\n\t\tthis.eventHandlers = {\n\t\t\t/* Document state */\n\t\t\topened: [],\n\t\t\tloaded: [],\n\t\t\t/* All initial steps fetched */\n\t\t\tfetched: [],\n\t\t\t/* received new steps */\n\t\t\tsync: [],\n\t\t\t/* state changed (dirty) */\n\t\t\tstateChange: [],\n\t\t\t/* error */\n\t\t\terror: [],\n\t\t\t/* Events for session and document meta data */\n\t\t\tchange: [],\n\t\t\t/* Emitted after successful save */\n\t\t\tsave: [],\n\t\t}\n\n\t\tthis.backend = new PollingBackend(this)\n\n\t\tthis.options = Object.assign({}, defaultOptions, options)\n\n\t\tthis.document = null\n\t\tthis.session = null\n\t\tthis.sessions = []\n\n\t\tthis.steps = []\n\t\tthis.stepClientIDs = []\n\n\t\treturn this\n\t}\n\n\topen({ fileId, filePath }) {\n\t\treturn this._openDocument({ fileId, filePath }).then(() => {\n\t\t\tthis.emit('opened', {\n\t\t\t\tdocument: this.document,\n\t\t\t\tsession: this.session,\n\t\t\t})\n\t\t\treturn this._fetchDocument().then(({ data }) => {\n\n\t\t\t\tthis.emit('loaded', {\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tsession: this.session,\n\t\t\t\t\tdocumentSource: '' + data,\n\t\t\t\t})\n\t\t\t})\n\t\t}).catch((error) => {\n\t\t\tif (!error.response || error.code === 'ECONNABORTED') {\n\t\t\t\tthis.emit('error', ERROR_TYPE.CONNECTION_FAILED, {})\n\t\t\t} else {\n\t\t\t\tthis.emit('error', ERROR_TYPE.LOAD_ERROR, error.response.status)\n\t\t\t}\n\n\t\t\treturn Promise.reject(error)\n\t\t})\n\t}\n\n\tstartSync() {\n\t\tthis.backend.connect()\n\t}\n\n\t_openDocument({ fileId, filePath }) {\n\t\treturn axios.get(endpointUrl('session/create', !!this.options.shareToken), {\n\t\t\tparams: {\n\t\t\t\tfileId: fileId,\n\t\t\t\tfilePath,\n\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\tguestName: this.options.guestName,\n\t\t\t\tforceRecreate: this.options.forceRecreate,\n\t\t\t},\n\t\t}).then((response) => {\n\t\t\tthis.document = response.data.document\n\t\t\tthis.document.readOnly = response.data.readOnly\n\t\t\tthis.session = response.data.session\n\t\t\treturn response.data\n\t\t})\n\t}\n\n\t_fetchDocument() {\n\t\treturn axios.get(\n\t\t\tendpointUrl('session/fetch', !!this.options.shareToken), {\n\t\t\t\ttransformResponse: [(data) => data],\n\t\t\t\tparams: {\n\t\t\t\t\tdocumentId: this.document.id,\n\t\t\t\t\tsessionId: this.session.id,\n\t\t\t\t\tsessionToken: this.session.token,\n\t\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\t},\n\t\t\t}\n\t\t)\n\t}\n\n\tupdateSession(guestName) {\n\t\tif (!this.isPublic()) {\n\t\t\treturn\n\t\t}\n\t\treturn axios.post(\n\t\t\tendpointUrl('session', !!this.options.shareToken), {\n\t\t\t\tdocumentId: this.document.id,\n\t\t\t\tsessionId: this.session.id,\n\t\t\t\tsessionToken: this.session.token,\n\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\tguestName,\n\t\t\t}\n\t\t).then(({ data }) => {\n\t\t\tthis.session = data\n\t\t\treturn data\n\t\t}).catch((error) => {\n\t\t\tconsole.error('Failed to update the session', error)\n\t\t\treturn Promise.reject(error)\n\t\t})\n\t}\n\n\tsendSteps(_sendable) {\n\t\tconst sendable = _sendable || sendableSteps(this.state)\n\t\tif (!sendable) {\n\t\t\treturn\n\t\t}\n\t\treturn this.backend.sendSteps(sendable)\n\t}\n\n\tstepsSince(version) {\n\t\treturn {\n\t\t\tsteps: this.steps.slice(version),\n\t\t\tclientIDs: this.stepClientIDs.slice(version),\n\t\t}\n\t}\n\n\t_receiveSteps({ steps, document }) {\n\t\tconst newSteps = []\n\t\tfor (let i = 0; i < steps.length; i++) {\n\t\t\tconst singleSteps = steps[i].data\n\t\t\tif (!Array.isArray(singleSteps)) {\n\t\t\t\tconsole.error('Invalid step data, skipping step', steps[i])\n\t\t\t\t// TODO: recover\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tsingleSteps.forEach(step => {\n\t\t\t\tthis.steps.push(step)\n\t\t\t\tnewSteps.push({\n\t\t\t\t\tstep,\n\t\t\t\t\tclientID: steps[i].sessionId,\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t\tthis.emit('sync', { steps: newSteps, document })\n\t\tconsole.debug('receivedSteps', 'newVersion', this._getVersion())\n\t}\n\n\t_getVersion() {\n\t\tif (this.state) {\n\t\t\treturn getVersion(this.state)\n\t\t}\n\t\treturn 0\n\t}\n\t_getDocument() {\n\t\tif (this.state) {\n\t\t\treturn this.state.doc\n\t\t}\n\t}\n\n\t_getContent() {\n\t\treturn this.options.serialize(this._getDocument())\n\t}\n\n\tsave() {\n\t\tif (this.backend.save) {\n\t\t\tthis.backend.save()\n\t\t}\n\t}\n\n\tforceSave() {\n\t\tif (this.backend.forceSave) {\n\t\t\tthis.backend.forceSave()\n\t\t}\n\t}\n\n\tclose() {\n\t\tlet closed = false\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.on('save', () => {\n\t\t\t\tthis._close().then(() => {\n\t\t\t\t\tclosed = true\n\t\t\t\t\tresolve()\n\t\t\t\t}).catch(() => resolve())\n\t\t\t})\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (!closed) {\n\t\t\t\t\tthis._close().then(() => {\n\t\t\t\t\t\tresolve()\n\t\t\t\t\t}).catch(() => resolve())\n\t\t\t\t}\n\t\t\t}, 2000)\n\t\t\tthis.save()\n\t\t})\n\t}\n\n\t_close() {\n\t\tif (this.document === null || this.session === null) {\n\t\t\treturn Promise.resolve()\n\t\t}\n\t\tthis.backend.disconnect()\n\t\treturn axios.get(\n\t\t\tendpointUrl('session/close', !!this.options.shareToken), {\n\t\t\t\tparams: {\n\t\t\t\t\tdocumentId: this.document.id,\n\t\t\t\t\tsessionId: this.session.id,\n\t\t\t\t\tsessionToken: this.session.token,\n\t\t\t\t\ttoken: this.options.shareToken,\n\t\t\t\t},\n\t\t\t}\n\t\t)\n\t}\n\n\ton(event, callback, _this) {\n\t\tthis.eventHandlers[event].push(callback.bind(_this))\n\t\treturn this\n\t}\n\n\temit(event, data, additionalData) {\n\t\tif (typeof this.eventHandlers[event] !== 'undefined') {\n\t\t\tthis.eventHandlers[event].forEach(function(callback) {\n\t\t\t\tcallback(data, additionalData)\n\t\t\t})\n\t\t} else {\n\t\t\tconsole.error('Event not found', event)\n\t\t}\n\t}\n\n\tisPublic() {\n\t\treturn !!this.options.shareToken\n\t}\n\n}\n\nexport default SyncService\nexport { SyncService, ERROR_TYPE }\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst extensionHighlight = {\n\tpy: 'python',\n\tgyp: 'python',\n\twsgi: 'python',\n\thtm: 'html',\n\txhtml: 'html',\n\terl: 'erlang',\n\tjsp: 'java',\n\tpl: 'perl',\n\trss: 'xml',\n\tatom: 'xml',\n\txsl: 'xml',\n\tplist: 'xml',\n\trb: 'ruby',\n\tbuilder: 'ruby',\n\tgemspec: 'ruby',\n\tpodspec: 'ruby',\n\tthor: 'ruby',\n\tdiff: 'patch',\n\ths: 'haskell',\n\ticl: 'haskell',\n\tphp3: 'php',\n\tphp4: 'php',\n\tphp5: 'php',\n\tphp6: 'php',\n\tsh: 'bash',\n\tzsh: 'bash',\n\tst: 'smalltalk',\n\tas: 'actionscript',\n\tapacheconf: 'apache',\n\tosacript: 'applescript',\n\tb: 'brainfuck',\n\tbf: 'brainfuck',\n\tclj: 'clojure',\n\t'cmake.in': 'cmake',\n\tcoffee: 'coffeescript',\n\tcson: 'coffescript',\n\ticed: 'coffescript',\n\tc: 'cpp',\n\t'c++': 'cpp',\n\t'h++': 'cpp',\n\thh: 'cpp',\n\tjinja: 'django',\n\tbat: 'dos',\n\tcmd: 'dos',\n\tfs: 'fsharp',\n\thbs: 'handlebars',\n\t'html.hbs': 'handlebars',\n\t'html.handlebars': 'handlebars',\n\t'sublime_metrics': 'json',\n\t'sublime_session': 'json',\n\t'sublime-keymap': 'json',\n\t'sublime-mousemap': 'json',\n\t'sublime-project': 'json',\n\t'sublime-settings': 'json',\n\t'sublime-workspace': 'json',\n\tmk: 'makefile',\n\tmak: 'makefile',\n\tmd: 'markdown',\n\tmkdown: 'markdown',\n\tmkd: 'markdown',\n\tnginxconf: 'nginx',\n\tm: 'objectivec',\n\tmm: 'objectivec',\n\tml: 'ocaml',\n\trs: 'rust',\n\tsci: 'scilab',\n\tvb: 'vbnet',\n\tvbs: 'vbscript',\n}\n\nexport default extensionHighlight\nexport {\n\textensionHighlight,\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { Extension } from 'tiptap'\n\nexport default class Keymap extends Extension {\n\n\tget name() {\n\t\treturn 'save'\n\t}\n\n\tkeys({ schema }) {\n\t\treturn this.options\n\t}\n\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tisMobile: this._isMobile(),\n\t\t}\n\t},\n\tbeforeMount() {\n\t\twindow.addEventListener('resize', this._onResize)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this._onResize)\n\t},\n\tmethods: {\n\t\t_onResize() {\n\t\t\t// Update mobile mode\n\t\t\tthis.isMobile = this._isMobile()\n\t\t},\n\t\t_isMobile() {\n\t\t\t// check if content width is under 768px\n\t\t\treturn document.documentElement.clientWidth < 768\n\t\t},\n\t},\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div id=\"editor-container\">\n\t\t<div v-if=\"currentSession && active\">\n\t\t\t<p v-if=\"hasSyncCollission\" class=\"msg icon-error\">\n\t\t\t\t{{ t('text', 'The document has been changed outside of the editor. The changes cannot be applied.') }}\n\t\t\t</p>\n\t\t\t<p v-if=\"hasConnectionIssue\" class=\"msg icon-error\">\n\t\t\t\t{{ t('text', 'Network connection error: Could not connect to the document') }} <a class=\"button primary\" @click=\"reconnect\">{{ t('text', 'Retry') }}</a>\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-if=\"currentSession && active\" id=\"editor-wrapper\" :class=\"{'has-conflicts': hasSyncCollission, 'icon-loading': !initialLoading, 'richEditor': isRichEditor}\">\n\t\t\t<div id=\"editor\">\n\t\t\t\t<MenuBar v-if=\"!syncError && !readOnly\"\n\t\t\t\t\tref=\"menubar\"\n\t\t\t\t\t:editor=\"tiptap\"\n\t\t\t\t\t:is-rich-editor=\"isRichEditor\"\n\t\t\t\t\t:autohide=\"autohide\">\n\t\t\t\t\t<div v-if=\"currentSession && active\" id=\"editor-session-list\">\n\t\t\t\t\t\t<div v-tooltip=\"lastSavedStatusTooltip\" class=\"save-status\" :class=\"lastSavedStatusClass\">\n\t\t\t\t\t\t\t{{ lastSavedStatus }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<SessionList :sessions=\"filteredSessions\">\n\t\t\t\t\t\t\t<GuestNameDialog v-if=\"isPublic && currentSession.guestName\" :sync-service=\"syncService\" />\n\t\t\t\t\t\t</SessionList>\n\t\t\t\t\t</div>\n\t\t\t\t</MenuBar>\n\t\t\t\t<div class=\"editor__content\">\n\t\t\t\t\t<MenuBubble v-if=\"!readOnly && isRichEditor\" :editor=\"tiptap\" />\n\t\t\t\t\t<EditorContent v-show=\"initialLoading\"\n\t\t\t\t\t\tclass=\"editor__content\"\n\t\t\t\t\t\t:editor=\"tiptap\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<ReadOnlyEditor v-if=\"hasSyncCollission\"\n\t\t\t\t:content=\"syncError.data.outsideChange\"\n\t\t\t\t:is-rich-editor=\"isRichEditor\" />\n\t\t</div>\n\n\t\t<CollisionResolveDialog v-if=\"hasSyncCollission && !readOnly\" @resolveUseThisVersion=\"resolveUseThisVersion\" @resolveUseServerVersion=\"resolveUseServerVersion\" />\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport escapeHtml from 'escape-html'\n\nimport { SyncService, ERROR_TYPE } from './../services/SyncService'\nimport { endpointUrl, getRandomGuestName } from './../helpers'\nimport { extensionHighlight } from '../helpers/mappings'\nimport { createEditor, markdownit, createMarkdownSerializer, serializePlainText, loadSyntaxHighlight } from './../EditorFactory'\n\nimport { EditorContent } from 'tiptap'\nimport { Collaboration } from 'tiptap-extensions'\nimport { Keymap } from './../extensions'\nimport isMobile from './../mixins/isMobile'\n\nimport Tooltip from 'nextcloud-vue/dist/Directives/Tooltip'\n\nconst EDITOR_PUSH_DEBOUNCE = 200\n\nexport default {\n\tname: 'EditorWrapper',\n\tcomponents: {\n\t\tEditorContent,\n\t\tMenuBar: () => import(/* webpackChunkName: \"editor-rich\" */'./MenuBar'),\n\t\tMenuBubble: () => import(/* webpackChunkName: \"editor-rich\" */'./MenuBubble'),\n\t\tReadOnlyEditor: () => import(/* webpackChunkName: \"editor\" */'./ReadOnlyEditor'),\n\t\tCollisionResolveDialog: () => import(/* webpackChunkName: \"editor\" */'./CollisionResolveDialog'),\n\t\tGuestNameDialog: () => import(/* webpackChunkName: \"editor-guest\" */'./GuestNameDialog'),\n\t\tSessionList: () => import(/* webpackChunkName: \"editor-collab\" */'./SessionList'),\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t},\n\tmixins: [\n\t\tisMobile,\n\t],\n\tprops: {\n\t\trelativePath: {\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: null,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tautohide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttiptap: null,\n\t\t\t/** @type SyncService */\n\t\t\tsyncService: null,\n\n\t\t\tdocument: null,\n\t\t\tsessions: [],\n\t\t\tcurrentSession: null,\n\n\t\t\tfilteredSessions: {},\n\n\t\t\tdirty: false,\n\t\t\tinitialLoading: false,\n\t\t\tlastSavedString: '',\n\t\t\tsyncError: null,\n\t\t\thasConnectionIssue: false,\n\t\t\treadOnly: true,\n\t\t\tforceRecreate: false,\n\n\t\t\tsaveStatusPolling: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tlastSavedStatus() {\n\t\t\tlet status = (this.dirtyStateIndicator ? '*' : '')\n\t\t\tif (!this.isMobile) {\n\t\t\t\tstatus += this.lastSavedString\n\t\t\t}\n\t\t\treturn status\n\t\t},\n\t\tlastSavedStatusClass() {\n\t\t\treturn this.syncError && this.lastSavedString !== '' ? 'error' : ''\n\t\t},\n\t\tdirtyStateIndicator() {\n\t\t\treturn this.hasUnpushedChanges || this.hasUnsavedChanges\n\t\t},\n\t\tlastSavedStatusTooltip() {\n\t\t\tlet message = t('text', 'Last save {lastSave}', { lastSave: this.lastSavedString })\n\t\t\tif (this.hasSyncCollission) {\n\t\t\t\tmessage = t('text', 'The document has been changed outside of the editor. The changes cannot be applied.')\n\t\t\t}\n\t\t\tif (this.hasUnpushedChanges) {\n\t\t\t\tmessage += ' - ' + t('text', 'Unpushed changes')\n\t\t\t}\n\t\t\tif (this.hasUnsavedChanges) {\n\t\t\t\tmessage += ' - ' + t('text', 'Unsaved changes')\n\t\t\t}\n\t\t\treturn { content: message, placement: 'bottom' }\n\t\t},\n\t\thasSyncCollission() {\n\t\t\treturn this.syncError && this.syncError.type === ERROR_TYPE.SAVE_COLLISSION\n\t\t},\n\t\thasUnpushedChanges() {\n\t\t\treturn this.dirty\n\t\t},\n\t\thasUnsavedChanges() {\n\t\t\treturn this.document && this.document.lastSavedVersion < this.document.currentVersion\n\t\t},\n\t\tbackendUrl() {\n\t\t\treturn (endpoint) => {\n\t\t\t\treturn endpointUrl(endpoint, !!this.shareToken)\n\t\t\t}\n\t\t},\n\t\thasDocumentParameters() {\n\t\t\treturn this.fileId || this.shareToken\n\t\t},\n\t\tisPublic() {\n\t\t\treturn document.getElementById('isPublic') && document.getElementById('isPublic').value === '1'\n\t\t},\n\t\tisRichEditor() {\n\t\t\treturn this.mime === 'text/markdown'\n\t\t},\n\t\tfileExtension() {\n\t\t\treturn this.relativePath ? this.relativePath.split('/').pop().split('.').pop() : 'txt'\n\t\t},\n\t},\n\twatch: {\n\t\tlastSavedStatus: function() {\n\t\t\tthis.$refs.menubar && this.$refs.menubar.redrawMenuBar()\n\t\t},\n\t},\n\tmounted() {\n\t\tif (this.active && (this.hasDocumentParameters)) {\n\t\t\tthis.initSession()\n\t\t}\n\t\tthis.$parent.$emit('update:loaded', true)\n\t},\n\tcreated() {\n\t\tthis.saveStatusPolling = setInterval(() => {\n\t\t\tthis.updateLastSavedStatus()\n\t\t}, 2000)\n\t\tdocument.addEventListener('keydown', this._keyUpHandler, true)\n\t},\n\tbeforeDestroy() {\n\t\tdocument.removeEventListener('keydown', this._keyUpHandler, true)\n\t\tclearInterval(this.saveStatusPolling)\n\t\tif (this.currentSession && this.syncService) {\n\t\t\tthis.syncService.close().then(() => {\n\t\t\t\tthis.currentSession = null\n\t\t\t\tthis.syncService = null\n\t\t\t}).catch((e) => {\n\t\t\t\t// Ignore issues closing the session since those might happen due to network issues\n\t\t\t})\n\t\t}\n\t},\n\tmethods: {\n\t\tupdateLastSavedStatus() {\n\t\t\tif (this.document) {\n\t\t\t\tthis.lastSavedString = window.moment(this.document.lastSavedVersionTime * 1000).fromNow()\n\t\t\t}\n\t\t},\n\t\tinitSession() {\n\t\t\tif (!this.hasDocumentParameters) {\n\t\t\t\tthis.$parent.$emit('error', 'No valid file provided')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst guestName = localStorage.getItem('nick') ? localStorage.getItem('nick') : getRandomGuestName()\n\t\t\tthis.syncService = new SyncService({\n\t\t\t\tshareToken: this.shareToken,\n\t\t\t\tfilePath: this.relativePath,\n\t\t\t\tguestName,\n\t\t\t\tforceRecreate: this.forceRecreate,\n\t\t\t\tserialize: (document) => {\n\t\t\t\t\tif (this.isRichEditor) {\n\t\t\t\t\t\tconst markdown = (createMarkdownSerializer(this.tiptap.nodes, this.tiptap.marks)).serialize(document)\n\t\t\t\t\t\tconsole.debug('serialized document', { markdown })\n\t\t\t\t\t\treturn markdown\n\t\t\t\t\t}\n\t\t\t\t\tconst file = serializePlainText(this.tiptap)\n\t\t\t\t\tconsole.debug('serialized document', { file })\n\t\t\t\t\treturn file\n\n\t\t\t\t},\n\t\t\t})\n\t\t\t\t.on('opened', ({ document, session }) => {\n\t\t\t\t\tthis.currentSession = session\n\t\t\t\t\tthis.document = document\n\t\t\t\t\tthis.readOnly = document.readOnly\n\t\t\t\t\tlocalStorage.setItem('nick', this.currentSession.guestName)\n\t\t\t\t})\n\t\t\t\t.on('change', ({ document, sessions }) => {\n\t\t\t\t\tif (this.document.baseVersionEtag !== '' && document.baseVersionEtag !== this.document.baseVersionEtag) {\n\t\t\t\t\t\tthis.resolveUseServerVersion()\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthis.updateSessions.bind(this)(sessions)\n\t\t\t\t\tthis.document = document\n\n\t\t\t\t\tthis.syncError = null\n\t\t\t\t\tthis.tiptap.setOptions({ editable: !this.readOnly })\n\n\t\t\t\t})\n\t\t\t\t.on('loaded', ({ documentSource }) => {\n\t\t\t\t\tthis.hasConnectionIssue = false\n\t\t\t\t\tloadSyntaxHighlight(extensionHighlight[this.fileExtension] ? extensionHighlight[this.fileExtension] : this.fileExtension).then((languages) => {\n\t\t\t\t\t\tthis.tiptap = createEditor({\n\t\t\t\t\t\t\tcontent: this.isRichEditor ? markdownit.render(documentSource) : '<pre>' + escapeHtml(documentSource) + '</pre>',\n\t\t\t\t\t\t\tonInit: ({ state }) => {\n\t\t\t\t\t\t\t\tthis.syncService.state = state\n\t\t\t\t\t\t\t\tthis.syncService.startSync()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonUpdate: ({ state }) => {\n\t\t\t\t\t\t\t\tthis.syncService.state = state\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\textensions: [\n\t\t\t\t\t\t\t\tnew Collaboration({\n\t\t\t\t\t\t\t\t// the initial version we start with\n\t\t\t\t\t\t\t\t// version is an integer which is incremented with every change\n\t\t\t\t\t\t\t\t\tversion: this.document.initialVersion,\n\t\t\t\t\t\t\t\t\tclientID: this.currentSession.id,\n\t\t\t\t\t\t\t\t\t// debounce changes so we can save some bandwidth\n\t\t\t\t\t\t\t\t\tdebounce: EDITOR_PUSH_DEBOUNCE,\n\t\t\t\t\t\t\t\t\tonSendable: ({ sendable }) => {\n\t\t\t\t\t\t\t\t\t\tif (this.syncService) {\n\t\t\t\t\t\t\t\t\t\t\tthis.syncService.sendSteps()\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tnew Keymap({\n\t\t\t\t\t\t\t\t\t'Ctrl-s': () => {\n\t\t\t\t\t\t\t\t\t\tthis.syncService.save()\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tenableRichEditing: this.isRichEditor,\n\t\t\t\t\t\t\tlanguages,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.syncService.state = this.tiptap.state\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.on('sync', ({ steps, document }) => {\n\t\t\t\t\tthis.hasConnectionIssue = false\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.tiptap.extensions.options.collaboration.update({\n\t\t\t\t\t\t\tversion: document.currentVersion,\n\t\t\t\t\t\t\tsteps: steps,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.syncService.state = this.tiptap.state\n\t\t\t\t\t\tthis.updateLastSavedStatus()\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error('Failed to update steps in collaboration plugin', e)\n\t\t\t\t\t\t// TODO: we should recreate the editing session when this happens\n\t\t\t\t\t}\n\t\t\t\t\tthis.document = document\n\t\t\t\t})\n\t\t\t\t.on('error', (error, data) => {\n\t\t\t\t\tthis.tiptap.setOptions({ editable: false })\n\t\t\t\t\tif (error === ERROR_TYPE.SAVE_COLLISSION && (!this.syncError || this.syncError.type !== ERROR_TYPE.SAVE_COLLISSION)) {\n\t\t\t\t\t\tthis.initialLoading = true\n\t\t\t\t\t\tthis.syncError = {\n\t\t\t\t\t\t\ttype: error,\n\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (error === ERROR_TYPE.CONNECTION_FAILED && !this.hasConnectionIssue) {\n\t\t\t\t\t\tthis.hasConnectionIssue = true\n\t\t\t\t\t\t// FIXME: ideally we just try to reconnect in the service, so we don't loose steps\n\t\t\t\t\t\tOC.Notification.showTemporary('Connection failed, reconnecting')\n\t\t\t\t\t\tsetTimeout(this.reconnect.bind(this), 1000)\n\t\t\t\t\t}\n\t\t\t\t\tif (error === ERROR_TYPE.SOURCE_NOT_FOUND) {\n\t\t\t\t\t\tthis.initialLoading = false\n\t\t\t\t\t\tOC.Notification.showTemporary('Source not found')\n\t\t\t\t\t\tthis.$emit('close')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on('stateChange', (state) => {\n\t\t\t\t\tif (state.initialLoading && !this.initialLoading) {\n\t\t\t\t\t\tthis.initialLoading = true\n\t\t\t\t\t\tif (this.autofocus) {\n\t\t\t\t\t\t\tthis.tiptap.focus('start')\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$emit('ready')\n\t\t\t\t\t}\n\t\t\t\t\tif (state.hasOwnProperty('dirty')) {\n\t\t\t\t\t\tthis.dirty = state.dirty\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\tthis.syncService.open({\n\t\t\t\tfileId: this.fileId,\n\t\t\t\tfilePath: this.relativePath,\n\t\t\t}).catch((e) => {\n\t\t\t\tthis.hasConnectionIssue = true\n\t\t\t})\n\t\t\tthis.forceRecreate = false\n\t\t},\n\n\t\tresolveUseThisVersion() {\n\t\t\tthis.syncService.forceSave()\n\t\t\tthis.tiptap.setOptions({ editable: !this.readOnly })\n\t\t},\n\n\t\tresolveUseServerVersion() {\n\t\t\tthis.forceRecreate = true\n\t\t\tthis.reconnect()\n\t\t},\n\n\t\treconnect() {\n\t\t\tif (this.syncService) {\n\t\t\t\tthis.syncService.close().then(() => {\n\t\t\t\t\tthis.syncService = null\n\t\t\t\t\tthis.tiptap.destroy()\n\t\t\t\t\tthis.initSession()\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\t// Ignore issues closing the session since those might happen due to network issues\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.syncService = null\n\t\t\t\tthis.tiptap.destroy()\n\t\t\t\tthis.initSession()\n\t\t\t}\n\t\t},\n\n\t\tupdateSessions(sessions) {\n\t\t\tthis.sessions = sessions.sort((a, b) => b.lastContact - a.lastContact)\n\t\t\tconst currentSessionIds = this.sessions.map((session) => session.userId)\n\t\t\tconst currentGuestIds = this.sessions.map((session) => session.guestId)\n\n\t\t\tconst removedSessions = Object.keys(this.filteredSessions)\n\t\t\t\t.filter(sessionId => !currentSessionIds.includes(sessionId) && !currentGuestIds.includes(sessionId))\n\n\t\t\tfor (const index in removedSessions) {\n\t\t\t\tVue.delete(this.filteredSessions, removedSessions[index])\n\t\t\t}\n\t\t\tfor (const index in this.sessions) {\n\t\t\t\tconst session = this.sessions[index]\n\t\t\t\tconst sessionKey = session.displayName ? session.userId : session.id\n\t\t\t\tif (this.filteredSessions[sessionKey]) {\n\t\t\t\t\t// update timestamp if relevant\n\t\t\t\t\tif (this.filteredSessions[sessionKey].lastContact < session.lastContact) {\n\t\t\t\t\t\tVue.set(this.filteredSessions[sessionKey], 'lastContact', session.lastContact)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tVue.set(this.filteredSessions, sessionKey, session)\n\t\t\t\t}\n\t\t\t\tif (session.id === this.currentSession.id) {\n\t\t\t\t\tVue.set(this.filteredSessions[sessionKey], 'isCurrent', true)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_keyUpHandler(event) {\n\t\t\tconst key = event.key || event.keyCode\n\t\t\tif ((event.ctrlKey || event.metaKey) && !event.shiftKey && (key === 'f' || key === 70)) {\n\t\t\t\tevent.stopPropagation()\n\t\t\t\treturn true\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t#editor-container {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\theight: calc(100% - 50px);\n\t\ttop: 50px;\n\t\tleft: 0;\n\t\tmargin: 0 auto;\n\t\tposition: relative;\n\t\tbackground-color: var(--color-main-background);\n\t}\n\n\t#editor-wrapper {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\t.ProseMirror {\n\t\t\tmargin-top: 0 !important;\n\t\t}\n\t\t&.icon-loading {\n\t\t\t#editor {\n\t\t\t\topacity: 0.3;\n\t\t\t}\n\t\t}\n\t}\n\n\t#editor, .editor {\n\t\tbackground: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: var(--border-radius);\n\t\tpadding: 0;\n\t\tposition: relative;\n\t\toverflow-y: auto;\n\t\toverflow-x: hidden;\n\t\twidth: 100%;\n\t}\n\n\t.msg.icon-error {\n\t\tpadding: 12px;\n\t\tborder-bottom:1px solid var(--color-error);\n\t\tpadding-left: 30px;\n\t\tbackground-position: 8px center;\n\t}\n\n\t.save-status {\n\t\tpadding: 9px;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-lighter);\n\n\t\t&.error {\n\t\t\tbackground-color: var(--color-error);\n\t\t\tcolor: var(--color-main-background);\n\t\t\tborder-radius: 3px;\n\t\t}\n\t}\n\n\t#editor-container #editor-wrapper.has-conflicts {\n\t\theight: calc(100% - 50px);\n\n\t\t#editor, #read-only-editor {\n\t\t\twidth: 50%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n\n\t#editor-session-list {\n\t\tpadding: 9px;\n\t\tpadding-right: 16px;\n\t\tdisplay: flex;\n\n\t\tinput, div {\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 3px;\n\t\t}\n\t}\n\n\t.editor__content {\n\t\tmax-width: 670px;\n\t\tmargin: auto;\n\t\tposition: relative;\n\t}\n\n\t#body-public {\n\t\theight: auto;\n\t}\n\n\t#files-public-content {\n\t\theight: auto;\n\t\t#editor-wrapper {\n\t\t\tposition: relative;\n\t\t}\n\t\t#editor-container {\n\t\t\ttop: 0;\n\t\t\twidth: 100%;\n\n\t\t\t#editor::v-deep .menubar {\n\t\t\t\t// sticky position is not working as body is our scroll container\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 50px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t#editor {\n\t\t\t\tpadding-top: 50px;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t.has-conflicts #editor {\n\t\t\t\tpadding-top: 0px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.ie {\n\t\t#editor::v-deep .menubar {\n\t\t\t// sticky position is not working as body is our scroll container\n\t\t\tposition: fixed;\n\t\t\ttop: 50px;\n\t\t\twidth: 100%;\n\t\t}\n\t\t.editor__content::v-deep .ProseMirror {\n\t\t\tpadding-top: 50px;\n\t\t}\n\t}\n\n</style>\n<style lang=\"scss\">\n\t@import './../../css/style';\n\n\t#editor-wrapper {\n\t\t@import './../../css/prosemirror';\n\n\t\t&:not(.richEditor) .ProseMirror {\n\t\t\tpre {\n\t\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t\t&::before {\n\t\t\t\t\tcontent: attr(data-language);\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\tfont-size: 0.6rem;\n\t\t\t\t}\n\t\t\t\tcode {\n\t\t\t\t\t.hljs-comment,\n\t\t\t\t\t.hljs-quote {\n\t\t\t\t\t\tcolor: #999999;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-variable,\n\t\t\t\t\t.hljs-template-variable,\n\t\t\t\t\t.hljs-attribute,\n\t\t\t\t\t.hljs-tag,\n\t\t\t\t\t.hljs-name,\n\t\t\t\t\t.hljs-regexp,\n\t\t\t\t\t.hljs-link,\n\t\t\t\t\t.hljs-selector-id,\n\t\t\t\t\t.hljs-selector-class {\n\t\t\t\t\t\tcolor: #f2777a;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-number,\n\t\t\t\t\t.hljs-meta,\n\t\t\t\t\t.hljs-built_in,\n\t\t\t\t\t.hljs-builtin-name,\n\t\t\t\t\t.hljs-literal,\n\t\t\t\t\t.hljs-type,\n\t\t\t\t\t.hljs-params {\n\t\t\t\t\t\tcolor: #f99157;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-string,\n\t\t\t\t\t.hljs-symbol,\n\t\t\t\t\t.hljs-bullet {\n\t\t\t\t\t\tcolor: #99cc99;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-title,\n\t\t\t\t\t.hljs-section {\n\t\t\t\t\t\tcolor: #ffcc66;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-keyword,\n\t\t\t\t\t.hljs-selector-tag {\n\t\t\t\t\t\tcolor: #6699cc;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-emphasis {\n\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t}\n\t\t\t\t\t.hljs-strong {\n\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./EditorWrapper.vue?vue&type=template&id=5ff61acf&scoped=true&\"\nimport script from \"./EditorWrapper.vue?vue&type=script&lang=js&\"\nexport * from \"./EditorWrapper.vue?vue&type=script&lang=js&\"\nimport style0 from \"./EditorWrapper.vue?vue&type=style&index=0&id=5ff61acf&scoped=true&lang=scss&\"\nimport style1 from \"./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5ff61acf\",\n null\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=5ff61acf&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"72c23100\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"5039213c\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"a3c96434\", content, true, {});","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=5ff61acf&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=0&id=5ff61acf&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"#editor-container[data-v-5ff61acf]{display:block;width:100%;max-width:100%;height:calc(100% - 50px);top:50px;left:0;margin:0 auto;position:relative;background-color:var(--color-main-background)}#editor-wrapper[data-v-5ff61acf]{display:flex;width:100%;height:100%;overflow:hidden;position:absolute}#editor-wrapper .ProseMirror[data-v-5ff61acf]{margin-top:0 !important}#editor-wrapper.icon-loading #editor[data-v-5ff61acf]{opacity:0.3}#editor[data-v-5ff61acf],.editor[data-v-5ff61acf]{background:var(--color-main-background);color:var(--color-main-text);background-clip:padding-box;border-radius:var(--border-radius);padding:0;position:relative;overflow-y:auto;overflow-x:hidden;width:100%}.msg.icon-error[data-v-5ff61acf]{padding:12px;border-bottom:1px solid var(--color-error);padding-left:30px;background-position:8px center}.save-status[data-v-5ff61acf]{padding:9px;text-overflow:ellipsis;color:var(--color-text-lighter)}.save-status.error[data-v-5ff61acf]{background-color:var(--color-error);color:var(--color-main-background);border-radius:3px}#editor-container #editor-wrapper.has-conflicts[data-v-5ff61acf]{height:calc(100% - 50px)}#editor-container #editor-wrapper.has-conflicts #editor[data-v-5ff61acf],#editor-container #editor-wrapper.has-conflicts #read-only-editor[data-v-5ff61acf]{width:50%;height:100%}#editor-session-list[data-v-5ff61acf]{padding:9px;padding-right:16px;display:flex}#editor-session-list input[data-v-5ff61acf],#editor-session-list div[data-v-5ff61acf]{vertical-align:middle;margin-left:3px}.editor__content[data-v-5ff61acf]{max-width:670px;margin:auto;position:relative}#body-public[data-v-5ff61acf]{height:auto}#files-public-content[data-v-5ff61acf]{height:auto}#files-public-content #editor-wrapper[data-v-5ff61acf]{position:relative}#files-public-content #editor-container[data-v-5ff61acf]{top:0;width:100%}#files-public-content #editor-container #editor[data-v-5ff61acf] .menubar{position:fixed;top:50px;width:100%}#files-public-content #editor-container #editor[data-v-5ff61acf]{padding-top:50px;overflow:auto}#files-public-content #editor-container .has-conflicts #editor[data-v-5ff61acf]{padding-top:0px}.ie #editor[data-v-5ff61acf] .menubar{position:fixed;top:50px;width:100%}.ie .editor__content[data-v-5ff61acf] .ProseMirror{padding-top:50px}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorWrapper.vue?vue&type=style&index=1&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".modal-container #editor-container{position:absolute}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:\\\"\\\";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid #8cf;pointer-events:none}.has-conflicts .ProseMirror-menubar,#editor-wrapper.icon-loading .ProseMirror-menubar{display:none}.ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}.ProseMirror-gapcursor:after{content:\\\"\\\";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid var(--color-main-text);animation:ProseMirror-cursor-blink 1.1s steps(2, start) infinite}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}#editor-wrapper div.ProseMirror{margin-top:44px;height:100%;position:relative;word-wrap:break-word;white-space:pre-wrap;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;padding:4px 8px 200px 14px;line-height:150%;font-size:14px;outline:none}#editor-wrapper div.ProseMirror[contenteditable=true],#editor-wrapper div.ProseMirror[contenteditable=false]{border:none !important;width:100%;background-color:transparent;color:var(--color-main-text);opacity:1;-webkit-user-select:text;user-select:text;font-size:14px}#editor-wrapper div.ProseMirror p:first-child,#editor-wrapper div.ProseMirror h1:first-child,#editor-wrapper div.ProseMirror h2:first-child,#editor-wrapper div.ProseMirror h3:first-child,#editor-wrapper div.ProseMirror h4:first-child,#editor-wrapper div.ProseMirror h5:first-child,#editor-wrapper div.ProseMirror h6:first-child{margin-top:10px}#editor-wrapper div.ProseMirror a{color:var(--color-primary-element);text-decoration:underline;padding:.5em 0}#editor-wrapper div.ProseMirror p{margin-bottom:1em;line-height:150%}#editor-wrapper div.ProseMirror em{font-style:italic}#editor-wrapper div.ProseMirror h1,#editor-wrapper div.ProseMirror h2,#editor-wrapper div.ProseMirror h3,#editor-wrapper div.ProseMirror h4,#editor-wrapper div.ProseMirror h5,#editor-wrapper div.ProseMirror h6{font-weight:600;line-height:120%;margin-top:24px;margin-bottom:12px;color:var(--color-main-text)}#editor-wrapper div.ProseMirror h1{font-size:36px;margin-top:48px}#editor-wrapper div.ProseMirror h2{font-size:28px;margin-top:48px}#editor-wrapper div.ProseMirror h3{font-size:24px}#editor-wrapper div.ProseMirror h4{font-size:21px}#editor-wrapper div.ProseMirror h5{font-size:17px}#editor-wrapper div.ProseMirror h6{font-size:14px}#editor-wrapper div.ProseMirror img{cursor:default;max-width:100%}#editor-wrapper div.ProseMirror hr{padding:2px 0;border:none;margin:1em 0;width:100%}#editor-wrapper div.ProseMirror hr:after{content:\\\"\\\";display:block;height:1px;background-color:var(--color-border-dark);line-height:2px}#editor-wrapper div.ProseMirror pre{white-space:pre-wrap;background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:1em 1.3em;margin-bottom:1em}#editor-wrapper div.ProseMirror p code{background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:.1em .3em}#editor-wrapper div.ProseMirror li{position:relative}#editor-wrapper div.ProseMirror ul,#editor-wrapper div.ProseMirror ol{padding-left:14px}#editor-wrapper div.ProseMirror ul li{list-style-type:disc}#editor-wrapper div.ProseMirror ul>li>ul>li{list-style-type:circle}#editor-wrapper div.ProseMirror ul>li>ul>li ul li{list-style-type:square}#editor-wrapper div.ProseMirror blockquote{padding-left:1em;border-left:4px solid var(--color-primary-element);color:var(--color-text-maxcontrast);margin-left:0;margin-right:0}#editor-wrapper .ProseMirror-focused .ProseMirror-gapcursor{display:block}#editor-wrapper .editor__content p.is-empty:first-child::before{content:attr(data-empty-text);float:left;color:var(--color-text-maxcontrast);pointer-events:none;height:0}#editor-wrapper:not(.richEditor) .ProseMirror pre{background-color:var(--color-main-background)}#editor-wrapper:not(.richEditor) .ProseMirror pre::before{content:attr(data-language);text-transform:uppercase;display:block;text-align:right;font-weight:bold;font-size:0.6rem}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-comment,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-quote{color:#999999}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-variable,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-template-variable,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-attribute,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-tag,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-name,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-regexp,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-link,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-id,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-class{color:#f2777a}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-number,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-meta,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-built_in,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-builtin-name,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-literal,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-type,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-params{color:#f99157}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-string,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-symbol,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-bullet{color:#99cc99}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-title,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-section{color:#ffcc66}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-keyword,#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-selector-tag{color:#6699cc}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-emphasis{font-style:italic}#editor-wrapper:not(.richEditor) .ProseMirror pre code .hljs-strong{font-weight:700}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"#resolve-conflicts[data-v-7fd0186f]{display:flex;position:fixed;z-index:10000;bottom:0;max-width:900px;width:100vw;margin:auto;padding:20px 0}#resolve-conflicts button[data-v-7fd0186f]{margin:auto;box-shadow:0 0 10px var(--color-box-shadow)}\\n\", \"\"]);\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"collision-resolve-dialog\",attrs:{\"id\":\"resolve-conflicts\"}},[_c('button',{on:{\"click\":function($event){return _vm.$emit('resolveUseThisVersion')}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('text', 'Use current version'))+\"\\n\\t\")]),_vm._v(\" \"),_c('button',{on:{\"click\":function($event){return _vm.$emit('resolveUseServerVersion')}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('text', 'Use the saved version'))+\"\\n\\t\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollisionResolveDialog.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div id=\"resolve-conflicts\" class=\"collision-resolve-dialog\">\n\t\t<button @click=\"$emit('resolveUseThisVersion')\">\n\t\t\t{{ t('text', 'Use current version') }}\n\t\t</button>\n\t\t<button @click=\"$emit('resolveUseServerVersion')\">\n\t\t\t{{ t('text', 'Use the saved version') }}\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'CollisionResolveDialog',\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t#resolve-conflicts {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tbottom: 0;\n\t\tmax-width: 900px;\n\t\twidth: 100vw;\n\t\tmargin: auto;\n\t\tpadding: 20px 0;\n\n\t\tbutton {\n\t\t\tmargin: auto;\n\t\t\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./CollisionResolveDialog.vue?vue&type=template&id=7fd0186f&scoped=true&\"\nimport script from \"./CollisionResolveDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./CollisionResolveDialog.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollisionResolveDialog.vue?vue&type=style&index=0&id=7fd0186f&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7fd0186f\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file