Files
mnote/kmind-plugin/app/app.js
T

615 lines
240 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "app": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "js/" + ({}[chunkId]||chunkId) + ".js"
/******/ }
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // add entry module to deferred list
/******/ deferredModules.push([0,"chunk-vendors"]);
/******/ // run deferred modules when ready
/******/ return checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ({
/***/ "../simple-mind-map/example/exampleData.js":
/*!*************************************************!*\
!*** ../simple-mind-map/example/exampleData.js ***!
\*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nconst createFullData = () => {\n return {\n \"image\": \"/enJFNMHnedQTYTESGfDkctCp2.jpeg\",\n \"imageTitle\": \"图片名称\",\n \"imageSize\": {\n \"width\": 1000,\n \"height\": 563\n },\n \"icon\": ['priority_1'],\n \"tag\": [\"标签1\", \"标签2\"],\n \"hyperlink\": \"http://lxqnsys.com/\",\n \"hyperlinkTitle\": \"理想青年实验室\",\n \"note\": \"理想青年实验室\\n一个有意思的角落\"\n // 自定义位置\n // \"customLeft\": 1318,\n // \"customTop\": 374.5\n };\n};\n\n/** \n * @Author: 王林 \n * @Date: 2021-04-15 22:23:24 \n * @Desc: 节点较多示例数据 \n */\nconst data1 = {\n \"root\": {\n \"data\": {\n \"text\": \"根节点\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"二级节点1\",\n \"expand\": true\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\",\n ...createFullData()\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\",\n ...createFullData()\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"二级节点2\",\n \"expand\": true\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"二级节点3\",\n \"expand\": true\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"二级节点4\",\n \"expand\": true\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n }\n }]\n }]\n }]\n }]\n }]\n }\n};\n\n/** \n * javascript comment \n * @Author: 王林25 \n * @Date: 2021-07-12 13:49:43 \n * @Desc: 真实场景数据 \n */\nconst data2 = {\n \"root\": {\n \"data\": {\n \"text\": \"一周安排\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"生活\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"锻炼\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"晨跑\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"7:00-8:00\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"夜跑\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"20:00-21:00\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"饮食\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"早餐\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"8:30\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"午餐\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"11:30\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"晚餐\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"19:00\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"休息\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"午休\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"12:30-13:00\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"晚休\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"23:00-6:30\"\n },\n \"children\": []\n }]\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"工作日\\n周一至周五\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"日常工作\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"9:00-18:00\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"工作总结\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"21:00-22:00\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"学习\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"工作日\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"早间新闻\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"8:00-8:30\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"阅读\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"21:00-23:00\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"休息日\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"财务管理\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"9:00-10:30\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"职场技能\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"14:00-15:30\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"其他书籍\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"16:00-18:00\"\n },\n \"children\": []\n }]\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"休闲娱乐\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"看电影\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"1~2部\"\n },\n \"children\": []\n }]\n }, {\n \"data\": {\n \"text\": \"逛街\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"1~2次\"\n },\n \"children\": []\n }]\n }]\n }]\n }\n};\n\n/** \n * javascript comment \n * @Author: 王林25 \n * @Date: 2021-07-12 14:29:10 \n * @Desc: 极简数据 \n */\nconst data3 = {\n \"root\": {\n \"data\": {\n \"text\": \"根节点\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"二级节点\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": []\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": []\n }]\n }]\n }\n};\nconst data4 = {\n \"root\": {\n \"data\": {\n \"text\": \"根节点\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"二级节点1\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"子节点1-1\"\n },\n \"children\": []\n }, {\n \"data\": {\n \"text\": \"子节点1-2\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"子节点1-2-1\"\n },\n \"children\": []\n }, {\n \"data\": {\n \"text\": \"子节点1-2-2\"\n },\n \"children\": []\n }, {\n \"data\": {\n \"text\": \"子节点1-2-3\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"二级节点2\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"子节点2-1\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"子节点2-1-1\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"子节点2-1-1-1\"\n },\n \"children\": []\n }]\n }]\n }, {\n \"data\": {\n \"text\": \"子节点2-2\"\n },\n \"children\": []\n }]\n }]\n }\n};\n\n// 带概要\nconst data5 = {\n \"root\": {\n \"data\": {\n \"text\": \"根节点\"\n },\n \"children\": [{\n \"data\": {\n \"text\": \"二级节点\",\n \"generalization\": {\n \"text\": \"概要\"\n }\n },\n \"children\": [{\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": []\n }, {\n \"data\": {\n \"text\": \"分支主题\"\n },\n \"children\": []\n }]\n }]\n }\n};\n\n// 富文本数据v0.4.0+,需要使用RichText插件才支持富文本编辑\nconst richTextData = {\n \"root\": {\n \"data\": {\n \"text\": \"<a href='http://lxqnsys.com/' target='_blank'>理想去年实验室</a>\",\n \"richText\": true\n },\n \"children\": []\n }\n};\nconst rootData = {\n \"root\": {\n \"data\": {\n \"text\": \"根节点\"\n },\n \"children\": []\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n // ...data1,\n // ...data2,\n // ...data3,\n // ...data4,\n ...data5,\n // ...rootData,\n \"theme\": {\n \"template\": \"classic4\",\n \"config\": {\n // 自定义配置...\n }\n },\n \"layout\": \"logicalStructure\",\n // \"layout\": \"mindMap\",\n // \"layout\": \"catalogOrganization\"\n // \"layout\": \"organizationStructure\",\n \"config\": {}\n});\n\n//# sourceURL=webpack:///../simple-mind-map/example/exampleData.js?");
/***/ }),
/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js":
/*!************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js ***!
\************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'App',\n components: {},\n data() {\n return {\n currentChunk: '',\n controller: new AbortController(),\n content: ''\n };\n },\n created() {\n this.getData();\n },\n methods: {\n async getData() {\n return;\n const res = await this.postMsg();\n return;\n const decoder = new TextDecoder();\n while (1) {\n const {\n done,\n value\n } = await res.read();\n if (done) {\n return;\n }\n // 拿到当前切片的数据\n const text = decoder.decode(value);\n // 处理切片数据\n let chunk = this.handleChunkData(text);\n // 判断是否有不完整切片,如果有,合并下一次处理,没有则获取数据\n if (this.currentChunk) continue;\n const list = chunk.split('\\n').filter(item => {\n return !!item;\n }).map(item => {\n return JSON.parse(item.replace(/^data:/, ''));\n });\n list.forEach(item => {\n this.content += item.choices.map(item2 => {\n return item2.delta.content;\n }).join('');\n console.log(this.content);\n });\n }\n },\n async postMsg() {\n const res = await fetch('http://localhost:3000/ai/chat', {\n signal: this.controller.signal,\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n a: '227d32b1-08aa-413d-9c12-6832c34bc59b',\n b: 'ep-20250214110611-hhf9z',\n messages: [{\n role: 'user',\n content: '帮我写一个【2025年前端学习计划】,需要以Markdown格式返回,因为我要导入思维导图软件进行使用,只需返回内容即可。'\n }]\n })\n });\n if (res.status && res.status !== 200) {\n return false;\n }\n return res.body.getReader();\n },\n handleChunkData(chunk) {\n chunk = chunk.trim();\n // 如果存在上一个切片\n if (this.currentChunk) {\n chunk = this.currentChunk + chunk;\n this.currentChunk = '';\n }\n\n // 如果存在done,认为是完整切片且是最后一个切片\n if (chunk.includes('[DONE]')) {\n return chunk;\n }\n\n // 最后一个字符串不为},则默认切片不完整,保存与下次拼接使用(这种方法不严谨,但已经能解决大部分场景的问题)\n if (chunk[chunk.length - 1] !== '}') {\n this.currentChunk = chunk;\n }\n return chunk;\n },\n stop() {\n this.controller.abort();\n this.controller = new AbortController();\n }\n }\n});\n\n//# sourceURL=webpack:///./src/App.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"551ac3d2-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=template&id=7ba5bd90":
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"551ac3d2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=template&id=7ba5bd90 ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n attrs: {\n id: \"app\"\n }\n }, [_c(\"router-view\")], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack:///./src/App.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%22551ac3d2-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./src/assets/icon-font/iconfont.css":
/*!*******************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/postcss-loader/src??ref--7-oneOf-3-2!./src/assets/icon-font/iconfont.css ***!
\*******************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_GET_URL_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ \"./node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL_IMPORT_0___ = __webpack_require__(/*! ./iconfont.woff2?t=1739152990179 */ \"./src/assets/icon-font/iconfont.woff2?t=1739152990179\");\nvar ___CSS_LOADER_URL_IMPORT_1___ = __webpack_require__(/*! ./iconfont.woff?t=1739152990179 */ \"./src/assets/icon-font/iconfont.woff?t=1739152990179\");\nvar ___CSS_LOADER_URL_IMPORT_2___ = __webpack_require__(/*! ./iconfont.ttf?t=1739152990179 */ \"./src/assets/icon-font/iconfont.ttf?t=1739152990179\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\n// Module\nexports.push([module.i, \"@font-face {\\n font-family: \\\"iconfont\\\"; /* Project id 2479351 */\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format('woff2'),\\n url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \") format('woff'),\\n url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \") format('truetype');\\n}\\n\\n.iconfont {\\n font-family: \\\"iconfont\\\" !important;\\n font-size: 16px;\\n font-style: normal;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.iconprinting:before {\\n content: \\\"\\\\ea28\\\";\\n}\\n\\n.iconwenjianjia:before {\\n content: \\\"\\\\e614\\\";\\n}\\n\\n.iconcontentleft:before {\\n content: \\\"\\\\e8c9\\\";\\n}\\n\\n.iconjuzhongduiqi:before {\\n content: \\\"\\\\ec80\\\";\\n}\\n\\n.iconfile-excel:before {\\n content: \\\"\\\\e7b7\\\";\\n}\\n\\n.iconfreemind:before {\\n content: \\\"\\\\e97d\\\";\\n}\\n\\n.iconwaikuang:before {\\n content: \\\"\\\\e640\\\";\\n}\\n\\n.iconhighlight:before {\\n content: \\\"\\\\e6b8\\\";\\n}\\n\\n.iconyanshibofang:before {\\n content: \\\"\\\\e648\\\";\\n}\\n\\n.iconfujian:before {\\n content: \\\"\\\\e88a\\\";\\n}\\n\\n.icongeshihua:before {\\n content: \\\"\\\\e7a3\\\";\\n}\\n\\n.iconyuanma:before {\\n content: \\\"\\\\e658\\\";\\n}\\n\\n.icongundongtiao:before {\\n content: \\\"\\\\e670\\\";\\n}\\n\\n.iconxietongwendang:before {\\n content: \\\"\\\\e60d\\\";\\n}\\n\\n.iconTXT:before {\\n content: \\\"\\\\e6e1\\\";\\n}\\n\\n.iconwenjian1:before {\\n content: \\\"\\\\e69f\\\";\\n}\\n\\n.icondodeparent:before {\\n content: \\\"\\\\e70f\\\";\\n}\\n\\n.icongongshi:before {\\n content: \\\"\\\\e617\\\";\\n}\\n\\n.icontouming:before {\\n content: \\\"\\\\e60c\\\";\\n}\\n\\n.iconlieri:before {\\n content: \\\"\\\\e60b\\\";\\n}\\n\\n.iconmoon_line:before {\\n content: \\\"\\\\e745\\\";\\n}\\n\\n.iconsousuo:before {\\n content: \\\"\\\\e693\\\";\\n}\\n\\n.iconjiantouyou:before {\\n content: \\\"\\\\e62d\\\";\\n}\\n\\n.iconbianji1:before {\\n content: \\\"\\\\e60a\\\";\\n}\\n\\n.icondaohang1:before {\\n content: \\\"\\\\e632\\\";\\n}\\n\\n.iconyanjing:before {\\n content: \\\"\\\\e8bf\\\";\\n}\\n\\n.iconwangzhan:before {\\n content: \\\"\\\\e628\\\";\\n}\\n\\n.iconcsdn:before {\\n content: \\\"\\\\e608\\\";\\n}\\n\\n.iconshejiaotubiao-10:before {\\n content: \\\"\\\\e644\\\";\\n}\\n\\n.iconstar:before {\\n content: \\\"\\\\e7df\\\";\\n}\\n\\n.iconfork:before {\\n content: \\\"\\\\e641\\\";\\n}\\n\\n.iconxiazai:before {\\n content: \\\"\\\\e613\\\";\\n}\\n\\n.iconteamwork:before {\\n content: \\\"\\\\e870\\\";\\n}\\n\\n.iconshuiyin:before {\\n content: \\\"\\\\e67a\\\";\\n}\\n\\n.iconxmind:before {\\n content: \\\"\\\\ea57\\\";\\n}\\n\\n.iconmouseR:before {\\n content: \\\"\\\\e6bd\\\";\\n}\\n\\n.iconmouseL:before {\\n content: \\\"\\\\e6c0\\\";\\n}\\n\\n.iconwenjian:before {\\n content: \\\"\\\\e607\\\";\\n}\\n\\n.iconpdf:before {\\n content: \\\"\\\\e740\\\";\\n}\\n\\n.iconPNG:before {\\n content: \\\"\\\\ec18\\\";\\n}\\n\\n.iconSVG:before {\\n content: \\\"\\\\e621\\\";\\n}\\n\\n.iconmarkdown:before {\\n content: \\\"\\\\ec04\\\";\\n}\\n\\n.iconjson:before {\\n content: \\\"\\\\ea42\\\";\\n}\\n\\n.iconlianjiexian:before {\\n content: \\\"\\\\e75b\\\";\\n}\\n\\n.iconbangzhu:before {\\n content: \\\"\\\\e620\\\";\\n}\\n\\n.iconshezhi:before {\\n content: \\\"\\\\e8b7\\\";\\n}\\n\\n.iconwushuju:before {\\n content: \\\"\\\\e643\\\";\\n}\\n\\n.iconzuijinliulan:before {\\n content: \\\"\\\\e62f\\\";\\n}\\n\\n.icon3zuidahua-3:before {\\n content: \\\"\\\\e692\\\";\\n}\\n\\n.iconzuixiaohua:before {\\n content: \\\"\\\\e650\\\";\\n}\\n\\n.iconzuidahua:before {\\n content: \\\"\\\\e651\\\";\\n}\\n\\n.iconguanbi:before {\\n content: \\\"\\\\e652\\\";\\n}\\n\\n.icondiannao:before {\\n content: \\\"\\\\eac0\\\";\\n}\\n\\n.iconzhuye:before {\\n content: \\\"\\\\e65c\\\";\\n}\\n\\n.iconbendi1x:before {\\n content: \\\"\\\\e606\\\";\\n}\\n\\n.iconbeijingyanse:before {\\n content: \\\"\\\\e6f8\\\";\\n}\\n\\n.iconqingchu:before {\\n content: \\\"\\\\e605\\\";\\n}\\n\\n.iconcase:before {\\n content: \\\"\\\\e6c6\\\";\\n}\\n\\n.iconxingzhuang-wenzi:before {\\n content: \\\"\\\\eb99\\\";\\n}\\n\\n.iconzitijiacu:before {\\n content: \\\"\\\\ec83\\\";\\n}\\n\\n.iconzitixiahuaxian:before {\\n content: \\\"\\\\ec85\\\";\\n}\\n\\n.iconzitixieti:before {\\n content: \\\"\\\\ec86\\\";\\n}\\n\\n.iconshanchuxian:before {\\n content: \\\"\\\\e612\\\";\\n}\\n\\n.iconzitiyanse:before {\\n content: \\\"\\\\e854\\\";\\n}\\n\\n.icongithub:before {\\n content: \\\"\\\\e64f\\\";\\n}\\n\\n.iconchoose1:before {\\n content: \\\"\\\\e6c5\\\";\\n}\\n\\n.iconzhuti:before {\\n content: \\\"\\\\e7aa\\\";\\n}\\n\\n.icondaochu1:before {\\n content: \\\"\\\\e63e\\\";\\n}\\n\\n.iconlingcunwei:before {\\n content: \\\"\\\\e657\\\";\\n}\\n\\n.iconexport:before {\\n content: \\\"\\\\e642\\\";\\n}\\n\\n.icondakai:before {\\n content: \\\"\\\\ebdf\\\";\\n}\\n\\n.iconxinjian:before {\\n content: \\\"\\\\e64e\\\";\\n}\\n\\n.iconjianqie:before {\\n content: \\\"\\\\e601\\\";\\n}\\n\\n.iconzhengli:before {\\n content: \\\"\\\\e83b\\\";\\n}\\n\\n.iconfuzhi:before {\\n content: \\\"\\\\e604\\\";\\n}\\n\\n.iconniantie:before {\\n content: \\\"\\\\e63f\\\";\\n}\\n\\n.iconshangyi:before {\\n content: \\\"\\\\e6be\\\";\\n}\\n\\n.iconxiayi:before {\\n content: \\\"\\\\e6bf\\\";\\n}\\n\\n.icongaikuozonglan:before {\\n content: \\\"\\\\e609\\\";\\n}\\n\\n.iconquanxuan:before {\\n content: \\\"\\\\f199\\\";\\n}\\n\\n.icondaoru:before {\\n content: \\\"\\\\e6a3\\\";\\n}\\n\\n.iconhoutui-shi:before {\\n content: \\\"\\\\e656\\\";\\n}\\n\\n.iconqianjin1:before {\\n content: \\\"\\\\e654\\\";\\n}\\n\\n.iconwithdraw:before {\\n content: \\\"\\\\e603\\\";\\n}\\n\\n.iconqianjin:before {\\n content: \\\"\\\\e600\\\";\\n}\\n\\n.iconhuifumoren:before {\\n content: \\\"\\\\e60e\\\";\\n}\\n\\n.iconhuanhang:before {\\n content: \\\"\\\\e61e\\\";\\n}\\n\\n.iconsuoxiao:before {\\n content: \\\"\\\\ec13\\\";\\n}\\n\\n.iconbianji:before {\\n content: \\\"\\\\e626\\\";\\n}\\n\\n.iconfangda:before {\\n content: \\\"\\\\e663\\\";\\n}\\n\\n.iconquanping1:before {\\n content: \\\"\\\\e664\\\";\\n}\\n\\n.icondingwei:before {\\n content: \\\"\\\\e616\\\";\\n}\\n\\n.icondaohang:before {\\n content: \\\"\\\\e611\\\";\\n}\\n\\n.iconjianpan:before {\\n content: \\\"\\\\e64d\\\";\\n}\\n\\n.iconquanping:before {\\n content: \\\"\\\\e602\\\";\\n}\\n\\n.icondaochu:before {\\n content: \\\"\\\\e63d\\\";\\n}\\n\\n.iconbiaoqian:before {\\n content: \\\"\\\\e63c\\\";\\n}\\n\\n.iconflow-Mark:before {\\n content: \\\"\\\\e65b\\\";\\n}\\n\\n.iconchaolianjie:before {\\n content: \\\"\\\\e6f4\\\";\\n}\\n\\n.iconjingzi:before {\\n content: \\\"\\\\e610\\\";\\n}\\n\\n.iconxiaolian:before {\\n content: \\\"\\\\e60f\\\";\\n}\\n\\n.iconimage:before {\\n content: \\\"\\\\e629\\\";\\n}\\n\\n.iconjiegou:before {\\n content: \\\"\\\\e61d\\\";\\n}\\n\\n.iconyangshi:before {\\n content: \\\"\\\\e631\\\";\\n}\\n\\n.iconfuhao-dagangshu:before {\\n content: \\\"\\\\e71f\\\";\\n}\\n\\n.icontianjiazijiedian:before {\\n content: \\\"\\\\e622\\\";\\n}\\n\\n.iconjiedian:before {\\n content: \\\"\\\\e655\\\";\\n}\\n\\n.iconshanchu:before {\\n content: \\\"\\\\e696\\\";\\n}\\n\\n.iconzhankai:before {\\n content: \\\"\\\\e64c\\\";\\n}\\n\\n.iconzhankai1:before {\\n content: \\\"\\\\e673\\\";\\n}\\n\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./src/assets/icon-font/iconfont.css?./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/postcss-loader/src??ref--7-oneOf-3-2");
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \"\\n* {\\n margin: 0;\\n padding: 0;\\n box-sizing: border-box;\\n}\\n#app {\\n font-family: Avenir, Helvetica, Arial, sans-serif;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n color: #2c3e50;\\n}\\n.el-dialog {\\n border-radius: 5px !important;\\n}\\n.customScrollbar {\\n&::-webkit-scrollbar {\\n width: 7px;\\n height: 7px;\\n}\\n&::-webkit-scrollbar-thumb {\\n border-radius: 7px;\\n background-color: rgba(0, 0, 0, 0.3);\\n cursor: pointer;\\n}\\n&::-webkit-scrollbar-track {\\n box-shadow: none;\\n background: transparent;\\n display: none;\\n}\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./src/App.vue?./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-style-loader??ref--7-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src??ref--7-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"7d06c284\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/App.vue?./node_modules/vue-style-loader??ref--7-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./src/App.vue":
/*!*********************!*\
!*** ./src/App.vue ***!
\*********************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./App.vue?vue&type=template&id=7ba5bd90 */ \"./src/App.vue?vue&type=template&id=7ba5bd90\");\n/* harmony import */ var _App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./App.vue?vue&type=script&lang=js */ \"./src/App.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport *//* harmony import */ var _App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css */ \"./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n _App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/App.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/App.vue?");
/***/ }),
/***/ "./src/App.vue?vue&type=script&lang=js":
/*!*********************************************!*\
!*** ./src/App.vue?vue&type=script&lang=js ***!
\*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/babel-loader/lib!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=script&lang=js */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/App.vue?");
/***/ }),
/***/ "./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css":
/*!*****************************************************************!*\
!*** ./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../node_modules/vue-style-loader??ref--7-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src??ref--7-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css */ \"./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_0__) if([\"default\"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_id_7ba5bd90_lang_css__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n\n\n//# sourceURL=webpack:///./src/App.vue?");
/***/ }),
/***/ "./src/App.vue?vue&type=template&id=7ba5bd90":
/*!***************************************************!*\
!*** ./src/App.vue?vue&type=template&id=7ba5bd90 ***!
\***************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_551ac3d2_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"551ac3d2-vue-loader-template\"}!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/babel-loader/lib!../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=template&id=7ba5bd90 */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"551ac3d2-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=template&id=7ba5bd90\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_551ac3d2_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_551ac3d2_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_7ba5bd90__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/App.vue?");
/***/ }),
/***/ "./src/api/index.js":
/*!**************************!*\
!*** ./src/api/index.js ***!
\**************************/
/*! exports provided: getData, storeData, storeConfig, storeLang, getLang, storeLocalConfig, getLocalConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getData\", function() { return getData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"storeData\", function() { return storeData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"storeConfig\", function() { return storeConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"storeLang\", function() { return storeLang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getLang\", function() { return getLang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"storeLocalConfig\", function() { return storeLocalConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getLocalConfig\", function() { return getLocalConfig; });\n/* harmony import */ var simple_mind_map_example_exampleData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! simple-mind-map/example/exampleData */ \"../simple-mind-map/example/exampleData.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var _hooks_useData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks/useData */ \"./src/hooks/useData.tsx\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../store */ \"./src/store.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! element-ui */ \"./node_modules/element-ui/lib/element-ui.common.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/storeManager */ \"./src/utils/storeManager.ts\");\n\n\n\n\n\n\n\n\nconst SIMPLE_MIND_MAP_DATA = 'SIMPLE_MIND_MAP_DATA';\nconst SIMPLE_MIND_MAP_LANG = 'SIMPLE_MIND_MAP_LANG';\nconst SIMPLE_MIND_MAP_LOCAL_CONFIG = 'SIMPLE_MIND_MAP_LOCAL_CONFIG';\nlet mindMapData = null;\n\n/**\n * @Author: 王林\n * @Date: 2021-08-01 10:10:49\n * @Desc: 获取缓存的思维导图数据\n */\nconst {\n getDataFromSY\n} = Object(_hooks_useData__WEBPACK_IMPORTED_MODULE_2__[\"useData\"])();\nconst getData = (source = 'localstorage', params = {}) => {\n if (source === 'localstorage') {\n // 原项目的默认获取数据的方法\n if (window.takeOverApp) {\n mindMapData = window.takeOverAppMethods.getMindMapData();\n return mindMapData;\n }\n // 天坑预警:switch的case中没有作用域,所以这里的store会和导入的store互相影响,具体表现为,debugger控制台中的store是null\n // 而打印出的store是store.js中的store\n if (_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"].state.isHandleLocalFile) {\n return vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype.getCurrentData();\n }\n const store = localStorage.getItem(SIMPLE_MIND_MAP_DATA);\n // console.log(store)\n // console.log(exampleData)\n // console.log(cloneDeep(exampleData))\n if (store === null) {\n // return simpleDeepClone(exampleData)\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"cloneDeep\"])(simple_mind_map_example_exampleData__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n } else {\n try {\n return JSON.parse(store);\n } catch (error) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"cloneDeep\"])(simple_mind_map_example_exampleData__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n }\n }\n } else if (source === 'app') {\n // 从当前app instance中获取最新数据,params.app = this.mindMap\n return params.app.getData(true);\n } else if (source === 'sy-plugin') {\n // 从sy-plugin中获取数据\n return getDataFromSY(params);\n } else if (source === 'sy-plugin-doc2kmind') {\n return getDataFromSY(params);\n } else if (source === 'sy-widget') {\n return getDataFromSY(params);\n } else if (source === 'sy-widget-mirror') {\n return getDataFromSY(params);\n } else if (source === 'sy-doctree-doc' || source === 'sy-doctree-doc-dom' || source === 'sy-doctree-moc-dom') {\n return getDataFromSY(params);\n }\n};\n\n/**\n * @Author: 王林\n * @Date: 2021-08-01 10:14:28\n * @Desc: 存储思维导图数据\n */\nconst {\n saveDataToPlugin,\n saveDataToWidget,\n saveDataToDoctreeDoc\n} = Object(_hooks_useData__WEBPACK_IMPORTED_MODULE_2__[\"useData\"])();\nconst storeData = (data, injectConfig) => {\n // 获取当前实例的 store,如果没有则使用默认 store\n const currentStore = _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].get(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name) || _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n return saveDataToDoctreeDoc(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-doctree-moc-dom':\n // moc无需存储\n return;\n case 'sy-widget-mirror':\n // 镜像无需存储\n return;\n case 'sy-widget':\n return saveDataToWidget(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-plugin':\n return saveDataToPlugin(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n default:\n try {\n let originData = null;\n if (window.takeOverApp) {\n originData = mindMapData;\n } else {\n originData = getData();\n }\n console.log('存储data', data);\n originData.root = data;\n console.log('存储originData', originData);\n if (window.takeOverApp) {\n mindMapData = originData;\n window.takeOverAppMethods.saveMindMapData(originData);\n return;\n }\n vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype.$bus.$emit('write_local_file', originData);\n if (_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"].state.isHandleLocalFile) {\n return;\n }\n let dataStr = JSON.stringify(originData);\n localStorage.setItem(SIMPLE_MIND_MAP_DATA, dataStr);\n } catch (error) {\n console.log(error);\n }\n }\n};\n\n/**\n * @Author: 王林\n * @Date: 2021-08-01 10:24:56\n * @Desc: 存储思维导图配置数据\n */\nconst storeConfig = ({\n config,\n layout,\n theme,\n view\n}, injectConfig) => {\n // 获取当前实例的 store,如果没有则使用默认 store\n const currentStore = _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].get(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name) || _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n // currentStore.commit('setKmindConfig', { smmConfig: config })\n currentStore.commit('setConfig', config);\n // 当外部传入这些的时候\n currentStore.commit('mergeMindMapDataJson', {\n layout,\n theme,\n view\n });\n return saveDataToDoctreeDoc(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-doctree-moc-dom':\n case 'sy-widget-mirror':\n // 镜像无需存储\n return;\n case 'sy-widget':\n // currentStore.commit('setKmindConfig', { smmConfig: config })\n currentStore.commit('setConfig', config);\n // 当外部传入这些的时候\n currentStore.commit('mergeMindMapDataJson', {\n layout,\n theme,\n view\n });\n return saveDataToWidget(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-plugin':\n // 更新一下仓库的state.kmind.config字段\n // storeConfig主要在BaseStyle中使用,只需要保存到config字段即可\n // currentStore.commit('setKmindConfig', { smmConfig: config })\n currentStore.commit('setConfig', config);\n // 当外部传入这些的时候\n currentStore.commit('mergeMindMapDataJson', {\n layout,\n theme,\n view\n });\n return saveDataToPlugin(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n default:\n try {\n let originData = null;\n if (window.takeOverApp) {\n originData = mindMapData;\n } else {\n originData = getData();\n }\n originData = {\n ...originData,\n ...config\n };\n if (window.takeOverApp) {\n mindMapData = originData;\n window.takeOverAppMethods.saveMindMapData(originData);\n return;\n }\n vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype.$bus.$emit('write_local_file', originData);\n if (_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"].state.isHandleLocalFile) {\n return;\n }\n let dataStr = JSON.stringify(originData);\n localStorage.setItem(SIMPLE_MIND_MAP_DATA, dataStr);\n } catch (error) {\n console.log(error);\n }\n }\n};\n\n/**\n * javascript comment\n * @Author: 王林\n * @Date: 2022-11-05 14:36:50\n * @Desc: 存储语言\n */\nconst storeLang = (lang, injectConfig) => {\n // 获取当前实例的 store,如果没有则使用默认 store\n const currentStore = _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].get(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name) || _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n return saveDataToDoctreeDoc(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-doctree-moc-dom':\n case 'sy-widget-mirror':\n // 镜像无需存储\n return;\n case 'sy-widget':\n // currentStore.commit('setKmindConfig', { lang })\n return saveDataToWidget(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-plugin':\n return saveDataToPlugin(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n default:\n if (window.takeOverApp) {\n window.takeOverAppMethods.saveLanguage(lang);\n return;\n }\n localStorage.setItem(SIMPLE_MIND_MAP_LANG, lang);\n }\n};\n\n/**\n * Normalize various locale codes to our i18n keys.\n * Accepts: zh/zh-CN/zh_CN → zh; en/en-US/en_US → en; zh-TW/zh_TW → zhtw\n */\nconst normalizeLang = lang => {\n if (!lang) return 'zh';\n const v = String(lang).toLowerCase().replace('-', '_');\n if (v === 'zh_cn' || v === 'zh') return 'zh';\n if (v === 'en_us' || v === 'en') return 'en';\n if (v === 'zh_tw' || v === 'zhtw' || v === 'zh_hant') return 'zhtw';\n return lang;\n};\n\n/**\n * javascript comment\n * @Author: 王林\n * @Date: 2022-11-05 14:37:36\n * @Desc: 获取存储的语言\n */\nconst getLang = injectConfig => {\n // 获取当前实例的 store,如果没有则使用默认 store\n const currentStore = _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].get(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name) || _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n\n // 一个稳健的取语言方法:优先从 store 里读取(兼容新旧字段),否则读取 localStorage,最后默认 zh\n const resolveLangFromStore = () => {\n var _currentStore$state, _currentStore$state2;\n // 兼容旧结构(kmind.localConfig.lang)和新结构(kmind.lang\n const langFromKmindLocalConfig = currentStore === null || currentStore === void 0 || (_currentStore$state = currentStore.state) === null || _currentStore$state === void 0 || (_currentStore$state = _currentStore$state.kmind) === null || _currentStore$state === void 0 || (_currentStore$state = _currentStore$state.localConfig) === null || _currentStore$state === void 0 ? void 0 : _currentStore$state.lang;\n const langFromKmind = currentStore === null || currentStore === void 0 || (_currentStore$state2 = currentStore.state) === null || _currentStore$state2 === void 0 || (_currentStore$state2 = _currentStore$state2.kmind) === null || _currentStore$state2 === void 0 ? void 0 : _currentStore$state2.lang;\n return normalizeLang(langFromKmindLocalConfig) || normalizeLang(langFromKmind) || null;\n };\n const resolveLangFromStorage = () => {\n const lang = localStorage.getItem(SIMPLE_MIND_MAP_LANG);\n return lang ? normalizeLang(lang) : null;\n };\n const resolveLang = () => resolveLangFromStore() || resolveLangFromStorage() || (window.takeOverApp ? normalizeLang(window.takeOverAppMethods.getLanguage()) || 'zh' : 'zh');\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-doctree-moc-dom':\n case 'sy-widget-mirror':\n // 镜像/文档树 MOC 模式虽然不写入存储,但也需要一个有效的语言值\n return resolveLang();\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n case 'sy-plugin':\n case 'sy-widget':\n return resolveLang();\n default:\n return resolveLang();\n }\n};\n\n/**\n * javascript comment\n * @Author: 王林25\n * @Date: 2022-11-14 18:57:31\n * @Desc: 存储本地配置\n */\nconst storeLocalConfig = (config, injectConfig) => {\n var _currentStore$getters, _currentStore$getters2;\n // 获取当前实例的 store,如果没有则使用默认 store\n const currentStore = _utils_storeManager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].get(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name) || _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n if (!(currentStore !== null && currentStore !== void 0 && (_currentStore$getters = currentStore.getters) !== null && _currentStore$getters !== void 0 && (_currentStore$getters = _currentStore$getters.mindMapFullDataWithConfig) !== null && _currentStore$getters !== void 0 && _currentStore$getters.root)) {\n return;\n }\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n // currentStore.commit('setKmindConfig', { localConfig: config })\n currentStore.commit('setLocalConfig', config);\n // console.log(\n // 'sy-doctree-doccurrentStore.getters.mindMapFullDataWithConfig:',\n // currentStore.getters.mindMapFullDataWithConfig\n // )\n return saveDataToDoctreeDoc(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-doctree-moc-dom':\n case 'sy-widget-mirror':\n // 镜像无需存储\n return;\n case 'sy-widget':\n // currentStore.commit('setKmindConfig', { localConfig: config })\n currentStore.commit('setLocalConfig', config);\n // console.log(\n // 'sy-widgetcurrentStore.getters.mindMapFullDataWithConfig:',\n // currentStore.getters.mindMapFullDataWithConfig\n // )\n\n // 打开导图的时候,会调用一次storeLocalConfig,但是此时mindMapFullDataWithConfig还没有数据,所以这里拦截一下\n // 这可能也是挂件掉数据的原因,但是只有挂件触发了,之后排查一下为什么其它的没有触发\n // 只有挂件触发的原因是在index.vue中手动为挂件调用了\n // this.setLocalConfig({\n // isZenMode: true\n // })\n // 排查了一下,果然是这个原因,触发条件:刚加载挂件,立马切到其他页面,然后切回来,就会掉数据\n // 具体原因是,kmind挂件加载会经历两次保存,第一次保存是调用上面方法的原因进行保存,没有root节点的数据,第二次保存是data_change事件触发,有root节点的数据\n // 通常情况下,第二次保存会覆盖第一次保存,但是极端情况下,第二次保存没有来得及触发,就被用户切开页面了,这个时候数据就会掉了\n if (!(currentStore !== null && currentStore !== void 0 && (_currentStore$getters2 = currentStore.getters) !== null && _currentStore$getters2 !== void 0 && (_currentStore$getters2 = _currentStore$getters2.mindMapFullDataWithConfig) !== null && _currentStore$getters2 !== void 0 && _currentStore$getters2.root)) {\n return;\n }\n return saveDataToWidget(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n case 'sy-plugin':\n // debugger\n // currentStore.commit('setKmindConfig', { localConfig: config })\n currentStore.commit('setLocalConfig', config);\n // console.log(\n // 'currentStore.getters.mindMapFullDataWithConfig:',\n // currentStore.getters.mindMapFullDataWithConfig\n // )\n return saveDataToPlugin(currentStore.getters.mindMapFullDataWithConfig, injectConfig);\n default:\n if (window.takeOverApp) {\n return window.takeOverAppMethods.saveLocalConfig(config);\n }\n localStorage.setItem(SIMPLE_MIND_MAP_LOCAL_CONFIG, JSON.stringify(config));\n }\n};\n\n/**\n * javascript comment\n * @Author: 王林25\n * @Date: 2022-11-14 18:57:37\n * @Desc: 获取本地配置\n */\nconst getLocalConfig = injectConfig => {\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-widget':\n case 'sy-plugin':\n case 'sy-widget-mirror':\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n case 'sy-doctree-moc-dom':\n return getDataFromSY(injectConfig).then(res => {\n var _res$mindMapData;\n // console.log('res:', res)\n return (_res$mindMapData = res.mindMapData) !== null && _res$mindMapData !== void 0 ? _res$mindMapData : {};\n }).catch(e => {\n console.log(e);\n element_ui__WEBPACK_IMPORTED_MODULE_4__[\"Message\"].error('kmind:获取配置失败');\n });\n default:\n if (window.takeOverApp) {\n return window.takeOverAppMethods.getLocalConfig();\n }\n let config = localStorage.getItem(SIMPLE_MIND_MAP_LOCAL_CONFIG);\n if (config) {\n return JSON.parse(config);\n }\n return null;\n }\n};\n\n//# sourceURL=webpack:///./src/api/index.js?");
/***/ }),
/***/ "./src/api/siyuan.tsx":
/*!****************************!*\
!*** ./src/api/siyuan.tsx ***!
\****************************/
/*! exports provided: 向思源请求数据, deleteBlock, insertBlock, updateBlock, sql, uploadAsset, putFile, putFileDirect, putKmindFile, putKmindTempConfigFile, listFile, deleteFile, renameFile, getFile, getKmindTempConfigFile, getDocInfo, getBlockInfo, listFileForPlugin, getFileForPlugin, putFileForPlugin, deleteFileForPlugin, putFileDirectForPlugin, forwardProxyForPlugin, getKmindUserInfoFile, putKmindUserInfoFile, setBlockAttrs, getBlockAttrs, createDoc, listDocTree, listDocsByPath, changeSort, renameDoc, renameDocByID, removeDoc, removeDocByID, moveDocsByID */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"向思源请求数据\", function() { return 向思源请求数据; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteBlock\", function() { return deleteBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertBlock\", function() { return insertBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateBlock\", function() { return updateBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sql\", function() { return sql; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"uploadAsset\", function() { return uploadAsset; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putFile\", function() { return putFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putFileDirect\", function() { return putFileDirect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putKmindFile\", function() { return putKmindFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putKmindTempConfigFile\", function() { return putKmindTempConfigFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listFile\", function() { return listFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteFile\", function() { return deleteFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renameFile\", function() { return renameFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFile\", function() { return getFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getKmindTempConfigFile\", function() { return getKmindTempConfigFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDocInfo\", function() { return getDocInfo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockInfo\", function() { return getBlockInfo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listFileForPlugin\", function() { return listFileForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFileForPlugin\", function() { return getFileForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putFileForPlugin\", function() { return putFileForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteFileForPlugin\", function() { return deleteFileForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putFileDirectForPlugin\", function() { return putFileDirectForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forwardProxyForPlugin\", function() { return forwardProxyForPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getKmindUserInfoFile\", function() { return getKmindUserInfoFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putKmindUserInfoFile\", function() { return putKmindUserInfoFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBlockAttrs\", function() { return setBlockAttrs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockAttrs\", function() { return getBlockAttrs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createDoc\", function() { return createDoc; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listDocTree\", function() { return listDocTree; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listDocsByPath\", function() { return listDocsByPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"changeSort\", function() { return changeSort; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renameDoc\", function() { return renameDoc; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renameDocByID\", function() { return renameDocByID; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeDoc\", function() { return removeDoc; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeDocByID\", function() { return removeDocByID; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"moveDocsByID\", function() { return moveDocsByID; });\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array-buffer.detached.js */ \"./node_modules/core-js/modules/es.array-buffer.detached.js\");\n/* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array-buffer.transfer.js */ \"./node_modules/core-js/modules/es.array-buffer.transfer.js\");\n/* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array-buffer.transfer-to-fixed-length.js */ \"./node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js\");\n/* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.typed-array.at.js */ \"./node_modules/core-js/modules/es.typed-array.at.js\");\n/* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.typed-array.find-last.js */ \"./node_modules/core-js/modules/es.typed-array.find-last.js\");\n/* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.typed-array.find-last-index.js */ \"./node_modules/core-js/modules/es.typed-array.find-last-index.js\");\n/* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.typed-array.set.js */ \"./node_modules/core-js/modules/es.typed-array.set.js\");\n/* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.typed-array.to-reversed.js */ \"./node_modules/core-js/modules/es.typed-array.to-reversed.js\");\n/* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.typed-array.to-sorted.js */ \"./node_modules/core-js/modules/es.typed-array.to-sorted.js\");\n/* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.typed-array.with.js */ \"./node_modules/core-js/modules/es.typed-array.with.js\");\n/* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n\nasync function 向思源请求数据(url, data, {\n headers\n} = {\n headers: undefined\n}) {\n let resData = null;\n await fetch(url, {\n body: headers ? data : JSON.stringify(data),\n method: 'POST'\n // headers: Object.assign({}, headers),\n // {\n // // Authorization: `Token ${config.token}`,\n // },\n // 多工作空间开发的时候,需要鉴权\n // headers:\n // process.env.NODE_ENV === 'development'\n // ? {\n // Authorization: 'Token vynpj02enbofr6u1'\n // }\n // : undefined\n }).then(function (response) {\n if (response.ok) {\n // @ts-ignore\n resData = response.json();\n // return resData = response.json()\n // return response.json()\n return resData;\n }\n const error_msg = `API错误:(${url})${response.status} ${response.statusText}`;\n console.error(error_msg);\n });\n return resData;\n}\n\n// https://github.com/siyuan-note/siyuan/blob/master/API_zh_CN.md\nvar Api = /*#__PURE__*/function (Api) {\n Api[\"PutFile\"] = \"/api/file/putFile\";\n Api[\"GetFile\"] = \"/api/file/getFile\";\n Api[\"ListFile\"] = \"/api/file/readDir\";\n Api[\"DeleteFile\"] = \"/api/file/removeFile\";\n Api[\"UploadAsset\"] = \"/api/asset/upload\";\n Api[\"renameFile\"] = \"/api/file/renameFile\";\n Api[\"GetDocInfo\"] = \"/api/block/getDocInfo\";\n Api[\"GetDoc\"] = \"/api/block/getDoc\";\n Api[\"GetBlockInfo\"] = \"/api/block/getBlockInfo\";\n Api[\"GetBlockAttrs\"] = \"/api/attr/getBlockAttrs\";\n Api[\"SetBlockAttrs\"] = \"/api/attr/setBlockAttrs\";\n Api[\"SQL\"] = \"/api/query/sql\";\n Api[\"\\u66F4\\u65B0\\u5757\"] = \"/api/block/updateBlock\";\n Api[\"\\u63D2\\u5165\\u5757\"] = \"/api/block/insertBlock\";\n Api[\"\\u5220\\u9664\\u5757\"] = \"/api/block/deleteBlock\";\n Api[\"CreateDoc\"] = \"/api/filetree/createDoc\";\n Api[\"ListDocTree\"] = \"/api/filetree/listDocTree\";\n Api[\"ListDocsByPath\"] = \"/api/filetree/listDocsByPath\";\n Api[\"ChangeSort\"] = \"/api/filetree/changeSort\";\n Api[\"RenameDoc\"] = \"/api/filetree/renameDoc\";\n Api[\"RenameDocByID\"] = \"/api/filetree/renameDocByID\";\n Api[\"RemoveDoc\"] = \"/api/filetree/removeDoc\";\n Api[\"RemoveDocByID\"] = \"/api/filetree/removeDocByID\";\n Api[\"MoveDocs\"] = \"/api/filetree/moveDocs\";\n Api[\"MoveDocsByID\"] = \"/api/filetree/moveDocsByID\";\n return Api;\n}(Api || {});\n/**\n * 删除块\n */\nconst deleteBlock = id => {\n return 向思源请求数据(Api.删除块, {\n id\n });\n};\n\n/**\n * 插入块\n * nextID、previousID、parentID 三个参数必须至少存在一个有值,优先级为 nextID > previousID > parentID\n */\n\nconst insertBlock = params => {\n return 向思源请求数据(Api.插入块, params);\n};\n\n/**\n * 更新块\n */\n\nconst updateBlock = params => {\n return 向思源请求数据(Api.更新块, params);\n};\n\n/**\n * 执行SQL查询\n * */\nconst sql = sql => {\n return 向思源请求数据(Api.SQL, {\n stmt: sql\n });\n};\n\n/**\n * 上传资源\n * @link https://github.com/siyuan-note/siyuan/blob/master/API_zh_CN.md?utm_source=ld246.com#%E4%B8%8A%E4%BC%A0%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6\n */\nconst uploadAsset = ({\n path = '/data/storage/petal/kmind/',\n file\n}) => {\n const formData = new FormData();\n formData.append('assetsDirPath', path);\n formData.append('file[]', file);\n return 向思源请求数据(Api.UploadAsset, formData, {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n });\n // return http.post(Api.UploadAsset, formData, {\n // headers: { 'Content-Type': 'multipart/form-data' },\n // });\n};\n\n/**\n * 写入文件\n */\nconst putFile = ({\n file = '',\n path = '/data/storage/petal/kmind/',\n isDir = false,\n modeTime = Date.now()\n}) => {\n const formData = new FormData();\n formData.append('file', file);\n formData.append('path', path);\n // @ts-ignore\n formData.append('isDir', isDir);\n // @ts-ignore\n formData.append('modeTime', modeTime);\n return 向思源请求数据(Api.PutFile, formData, {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n });\n};\n\n/**\n * 写入文件,直接将指定对象+名称写入\n */\nconst putFileDirect = ({\n target = {},\n fileName = 'kmind',\n suffix = 'kmind',\n path = '/data/storage/petal/kmind/',\n isDir = false,\n modeTime = Date.now()\n}) => {\n const json = JSON.stringify(target);\n const blob = new Blob([json], {\n type: 'application/json'\n });\n const file = new File([blob], `${fileName}.${suffix}`, {\n type: 'application/json',\n lastModified: modeTime\n });\n const formData = new FormData();\n formData.append('file', file);\n formData.append('path', path);\n // @ts-ignore\n formData.append('isDir', isDir);\n // @ts-ignore\n formData.append('modeTime', modeTime);\n return 向思源请求数据(Api.PutFile, formData, {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n });\n};\n\n/**\n * 写入插件版kmind文件\n */\nconst putKmindFile = ({\n target = {},\n fileName = 'kmind'\n}) => {\n return putFileDirect({\n target,\n fileName,\n suffix: 'kmind',\n path: '/data/storage/petal/kmind/'\n });\n};\n\n/**\n * 写入插件版kmind temp配置文件\n * 注意,思源的这个putFile接口,path要写全路径,包括文件名+后缀,不然会报错\n */\nconst putKmindTempConfigFile = (target = {}) => {\n return putFileDirect({\n target,\n fileName: 'temp',\n suffix: 'kmindconf',\n path: '/data/storage/petal/kmind/config/temp.kmindconf'\n });\n};\n\n/**\n * 列出文件\n */\nconst listFile = ({\n path = '/assets/'\n}) => {\n return 向思源请求数据(Api.ListFile, {\n path\n });\n};\n\n/**\n * 删除文件\n */\nconst deleteFile = ({\n path\n}) => {\n return 向思源请求数据(Api.DeleteFile, {\n path\n });\n};\n\n/**\n * 重命名文件\n */\nconst renameFile = ({\n path,\n newPath\n}) => {\n return 向思源请求数据(Api.renameFile, {\n path,\n newPath\n });\n};\n\n/**\n * 获取文件\n */\nconst getFile = ({\n path\n}) => {\n return 向思源请求数据(Api.GetFile, {\n path\n });\n};\n\n/**\n * 获取temp配置文件\n */\nconst getKmindTempConfigFile = () => {\n return getFile({\n path: '/data/storage/petal/kmind/config/temp.kmindconf'\n });\n};\n\n/**\n * 获取doc info\n */\nconst getDocInfo = id => {\n return 向思源请求数据(Api.GetDocInfo, {\n id\n });\n};\n\n/**\n * 获取block info\n */\nconst getBlockInfo = id => {\n return 向思源请求数据(Api.GetBlockInfo, {\n id\n });\n};\n\n/**\n * 列出文件(插件专用版本)\n */\nconst listFileForPlugin = async ({\n path\n}) => {\n try {\n const res = await 向思源请求数据('/api/file/readDir', {\n path\n });\n if (res.code !== 0) {\n throw new Error(`Failed to list files: ${res.msg || 'Unknown error'}`);\n }\n return res.data || [];\n } catch (error) {\n console.error('Error listing files:', error);\n throw error;\n }\n};\n\n/**\n * 获取文件(插件专用版本)\n */\nconst getFileForPlugin = async ({\n path\n}) => {\n try {\n var _path$split$pop;\n const res = await fetch(`/api/file/getFile`, {\n method: 'POST',\n body: JSON.stringify({\n path\n })\n });\n if (!res.ok) {\n throw new Error(`Failed to get file: ${res.statusText}`);\n }\n\n // 判断文件类型\n const fileExt = (_path$split$pop = path.split('.').pop()) === null || _path$split$pop === void 0 ? void 0 : _path$split$pop.toLowerCase();\n const binaryExtensions = ['webp', 'png', 'jpg', 'jpeg', 'gif', 'bmp', 'ico', 'pdf', 'zip', 'rar', '7z'];\n if (fileExt && binaryExtensions.includes(fileExt)) {\n // 二进制文件,返回 ArrayBuffer\n const arrayBuffer = await res.arrayBuffer();\n return new Uint8Array(arrayBuffer);\n } else {\n // 文本文件\n const text = await res.text();\n\n // 尝试解析为 JSON\n try {\n return JSON.parse(text);\n } catch {\n // 如果不是 JSON,直接返回文本\n return text;\n }\n }\n } catch (error) {\n console.error('Error getting file:', error);\n throw error;\n }\n};\n\n/**\n * 创建或更新文件(插件专用版本)\n */\nconst putFileForPlugin = async ({\n path,\n isDir = false,\n target\n}) => {\n try {\n if (isDir) {\n // 创建目录\n const formData = new FormData();\n const blob = new Blob([''], {\n type: 'text/plain'\n });\n formData.append('path', path);\n formData.append('file', blob, 'dummy');\n formData.append('isDir', 'true');\n const res = await fetch('/api/file/putFile', {\n method: 'POST',\n body: formData\n });\n const data = await res.json();\n return data;\n } else {\n // 创建或更新文件\n const formData = new FormData();\n let blob;\n if (target instanceof Uint8Array) {\n // 二进制数据(如WebP图片)\n blob = new Blob([target], {\n type: 'application/octet-stream'\n });\n } else if (typeof target === 'string') {\n // 字符串数据\n blob = new Blob([target], {\n type: 'text/plain'\n });\n } else {\n // 其他数据类型,转为JSON\n blob = new Blob([JSON.stringify(target)], {\n type: 'application/json'\n });\n }\n formData.append('path', path);\n formData.append('file', blob);\n const res = await fetch('/api/file/putFile', {\n method: 'POST',\n body: formData\n });\n const data = await res.json();\n return data;\n }\n } catch (error) {\n console.error('Error putting file:', error);\n throw error;\n }\n};\n\n/**\n * 删除文件(插件专用版本)\n */\nconst deleteFileForPlugin = async ({\n path\n}) => {\n try {\n const res = await 向思源请求数据('/api/file/removeFile', {\n path\n });\n if (res.code !== 0) {\n throw new Error(`Failed to delete file: ${res.msg || 'Unknown error'}`);\n }\n return res;\n } catch (error) {\n console.error('Error deleting file:', error);\n throw error;\n }\n};\n\n/**\n * 直接写入文件内容到插件目录(用于插件)\n */\nconst putFileDirectForPlugin = async ({\n target,\n path\n}) => {\n try {\n const res = await 向思源请求数据('/api/file/putFile', {\n path,\n file: typeof target === 'string' ? target : JSON.stringify(target, null, 2),\n isDir: false\n });\n if (res.code !== 0) {\n throw new Error(`Failed to put file: ${res.msg || 'Unknown error'}`);\n }\n return res;\n } catch (error) {\n console.error('Error putting file:', error);\n throw error;\n }\n};\n\n/**\n * 正向代理请求(用于访问外部API\n */\nconst forwardProxyForPlugin = async ({\n url,\n method = 'GET',\n headers = [],\n payload\n}) => {\n try {\n // 构建请求头\n const headersMap = {};\n if (headers && Array.isArray(headers)) {\n headers.forEach(header => {\n Object.keys(header).forEach(key => {\n headersMap[key] = header[key];\n });\n });\n }\n const res = await 向思源请求数据('/api/network/forwardProxy', {\n url,\n method,\n headers: [headersMap],\n payload: typeof payload === 'string' ? payload : JSON.stringify(payload),\n timeout: 30000\n });\n return res;\n } catch (error) {\n console.error('Forward proxy request failed:', error);\n throw error;\n }\n};\n\n/**\n * 获取kmind user配置文件\n */\nconst getKmindUserInfoFile = () => {\n return getFile({\n path: '/data/storage/petal/kmind/config/user.kmindconf'\n });\n};\n\n/**\n * 写入插件版kmind user配置文件\n * */\nconst putKmindUserInfoFile = (target = {}) => {\n return putFileDirect({\n target,\n fileName: 'user',\n suffix: 'kmindconf',\n path: '/data/storage/petal/kmind/config/user.kmindconf'\n });\n};\n\n/**\n * 设置块属性\n */\nconst setBlockAttrs = params => {\n // @ts-ignore\n return 向思源请求数据(Api.SetBlockAttrs, params, {\n headers: undefined\n });\n};\n\n/**\n * 获取块属性\n */\nconst getBlockAttrs = id => {\n return 向思源请求数据(Api.GetBlockAttrs, {\n id\n });\n};\n\n/**\n * 创建文档\n */\n\nconst createDoc = params => {\n const {\n notebook,\n path,\n title,\n listDocTree = true,\n md = '',\n sorts = []\n } = params;\n const data = {\n notebook,\n path,\n title,\n listDocTree,\n md,\n sorts\n };\n return 向思源请求数据(Api.CreateDoc, data);\n};\n\n/**\n * 列出文档树(用于 MOC 模式)\n * @param notebook 笔记本ID\n * @param path 文档路径(需要去掉 .sy 后缀)\n * @returns 文档树结构\n */\nconst listDocTree = (notebook, path) => {\n // 去掉 .sy 后缀\n const cleanPath = path.endsWith('.sy') ? path.slice(0, -3) : path;\n return 向思源请求数据(Api.ListDocTree, {\n notebook,\n path: cleanPath\n });\n};\n\n/**\n * 按路径列出文档(用于 MOC 模式,保持文档顺序)\n * @param notebook 笔记本ID\n * @param path 文档路径(保留 .sy 后缀)\n * @returns 文档列表\n */\nconst listDocsByPath = (notebook, path) => {\n return 向思源请求数据(Api.ListDocsByPath, {\n notebook,\n path\n });\n};\n\n/**\n * 更改文档排序\n * @param notebook 笔记本ID\n * @param paths 文档路径数组(按目标顺序排列)\n * @returns 请求结果\n */\n\nconst changeSort = params => {\n return 向思源请求数据(Api.ChangeSort, params);\n};\n\n/**\n * 重命名文档(通过路径)\n * @param notebook 笔记本ID\n * @param path 文档路径\n * @param title 新标题\n * @returns 请求结果\n */\n\nconst renameDoc = params => {\n return 向思源请求数据(Api.RenameDoc, params);\n};\n\n/**\n * 重命名文档(通过ID\n * @param id 文档ID\n * @param title 新标题\n * @returns 请求结果\n */\n\nconst renameDocByID = params => {\n return 向思源请求数据(Api.RenameDocByID, params);\n};\n\n/**\n * 删除文档(通过路径)\n * @param notebook 笔记本ID\n * @param path 文档路径\n * @returns 请求结果\n */\n\nconst removeDoc = params => {\n return 向思源请求数据(Api.RemoveDoc, params);\n};\n\n/**\n * 删除文档(通过ID\n * @param id 文档ID\n * @returns 请求结果\n */\n\nconst removeDocByID = params => {\n return 向思源请求数据(Api.RemoveDocByID, params);\n};\n\n/**\n * 移动文档(通过ID\n * @param fromIDs 源文档ID列表\n * @param toID 目标父文档ID或笔记本ID\n * @returns 请求结果\n */\n\nconst moveDocsByID = params => {\n return 向思源请求数据(Api.MoveDocsByID, params);\n};\n\n//# sourceURL=webpack:///./src/api/siyuan.tsx?");
/***/ }),
/***/ "./src/assets/icon-font/iconfont.css":
/*!*******************************************!*\
!*** ./src/assets/icon-font/iconfont.css ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-3-1!../../../node_modules/postcss-loader/src??ref--7-oneOf-3-2!./iconfont.css */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./src/assets/icon-font/iconfont.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"b6fb1f8a\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/assets/icon-font/iconfont.css?");
/***/ }),
/***/ "./src/assets/icon-font/iconfont.ttf?t=1739152990179":
/*!***********************************************************!*\
!*** ./src/assets/icon-font/iconfont.ttf?t=1739152990179 ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__.p + \"fonts/iconfont.ttf\";\n\n//# sourceURL=webpack:///./src/assets/icon-font/iconfont.ttf?");
/***/ }),
/***/ "./src/assets/icon-font/iconfont.woff2?t=1739152990179":
/*!*************************************************************!*\
!*** ./src/assets/icon-font/iconfont.woff2?t=1739152990179 ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__.p + \"fonts/iconfont.woff2\";\n\n//# sourceURL=webpack:///./src/assets/icon-font/iconfont.woff2?");
/***/ }),
/***/ "./src/assets/icon-font/iconfont.woff?t=1739152990179":
/*!************************************************************!*\
!*** ./src/assets/icon-font/iconfont.woff?t=1739152990179 ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__.p + \"fonts/iconfont.woff\";\n\n//# sourceURL=webpack:///./src/assets/icon-font/iconfont.woff?");
/***/ }),
/***/ "./src/hooks/useData.tsx":
/*!*******************************!*\
!*** ./src/hooks/useData.tsx ***!
\*******************************/
/*! exports provided: useData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useData\", function() { return useData; });\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _useKMindMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useKMindMessage */ \"./src/hooks/useKMindMessage.tsx\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var _api_siyuan__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/api/siyuan */ \"./src/api/siyuan.tsx\");\n/* harmony import */ var _useFrameContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useFrameContext */ \"./src/hooks/useFrameContext.js\");\n\n// 提供从挂件获取数据,从插件获取数据的方法\n// 提供保存数据到挂件,保存数据到插件的方法\n// 尽量纯函数\n\n\n\n\nconst wordsCount = Object(vue__WEBPACK_IMPORTED_MODULE_2__[\"ref\"])(0);\nconst nodeCount = Object(vue__WEBPACK_IMPORTED_MODULE_2__[\"ref\"])(0);\n\n// 安全的 JSON 序列化,处理循环引用\nconst safeStringify = obj => {\n const seen = new WeakSet();\n return JSON.stringify(obj, (key, value) => {\n // 忽略函数和 undefined\n if (typeof value === 'function' || value === undefined) {\n return undefined;\n }\n // 处理循环引用\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular Reference]';\n }\n seen.add(value);\n }\n return value;\n });\n};\nconst useData = () => {\n // 获取镜像块类型\n const getMirrorType = mirrorPath => {\n const typeMap = mirrorPath.split('/')[0];\n switch (typeMap) {\n case 'assets':\n // 文档树导图的mirrorPath是assets/kmind-doctree-doc-${this.injectConfig.name}.kmind\n return 'sy-doctree-doc';\n case 'data':\n // dock栏导图的mirrorPath是data/storage/petal/kmind/${this.injectConfig.name}.kmind\n return 'sy-plugin';\n }\n };\n\n // 获取数据\n const getDataFromSY = injectConfig => {\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-plugin':\n return getDataFromPlugin(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name);\n case 'sy-widget':\n return getDataFromWidget();\n case 'sy-plugin-doc2kmind':\n return getSYSourceFile(injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.name);\n case 'sy-widget-mirror':\n // 文档树导图的mirrorPath是assets/kmind-doctree-doc-${this.injectConfig.name}.kmind\n // dock栏导图的mirrorPath是data/storage/petal/kmind/${this.injectConfig.name}.kmind\n\n const typeMap = injectConfig.mirrorPath.split('/')[0];\n switch (typeMap) {\n case 'assets':\n // 手动拼接上data/,才能正确获取到数据\n return getFileDataFromSY({\n path: `data/${injectConfig.mirrorPath}`,\n tip: 'mirrorPath'\n });\n case 'data':\n return getFileDataFromSY({\n path: injectConfig.mirrorPath,\n tip: 'mirrorPath'\n });\n }\n case 'sy-doctree-doc-dom':\n case 'sy-doctree-doc':\n // debugger\n return getDataFromDoctreeDoc(injectConfig);\n case 'sy-doctree-moc-dom':\n // MOC 模式:获取文档树结构并转换为导图\n return getMocDataFromSY(injectConfig.name);\n }\n };\n // 保存数据\n const saveDataToSY = (kmindData, injectConfig) => {\n switch (injectConfig === null || injectConfig === void 0 ? void 0 : injectConfig.type) {\n case 'sy-plugin':\n return saveDataToPlugin(kmindData, injectConfig);\n case 'sy-widget':\n return saveDataToWidget(kmindData, injectConfig);\n case 'sy-doctree-doc':\n case 'sy-doctree-doc-dom':\n return saveDataToDoctreeDoc(kmindData, injectConfig);\n case 'sy-doctree-moc-dom':\n // moc模式暂时不用保存任何东西\n return Promise.resolve();\n }\n };\n const getWidgetBlockInfo = injectConfig => {\n const {\n getBlockNode,\n getIframeNode\n } = Object(_useFrameContext__WEBPACK_IMPORTED_MODULE_4__[\"useFrameContext\"])(injectConfig);\n const blockNode = getBlockNode();\n const blockType = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('data-type')) || '';\n const isWidget = blockType === 'NodeWidget';\n if (blockType !== 'NodeWidget') {\n return {\n id: '',\n mindMapData: '',\n debuggerMode: '',\n filePath: '',\n dataAssets: '',\n blockNode,\n isWidget,\n iframeNode: getIframeNode()\n };\n }\n let injectConfigType = 'sy-widget';\n const iframeNode = getIframeNode();\n const id = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('data-node-id')) || '20230302162223-3rxpzda';\n const mindMapData = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-mind-map-data')) || '';\n // 根据挂件属性开启debugger模式\n const debuggerMode = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-debugger')) || '';\n const filePath = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-file-path')) || '';\n const mirrorPath = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-kmind-widget-mirror')) || '';\n const mirrorTargetNodeId = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-kmind-widget-mirror-target-node-id')) || '';\n let isMirror = false;\n if (mirrorPath) {\n isMirror = true;\n injectConfigType = 'sy-widget-mirror';\n }\n let dataAssets;\n if (false) {} else {\n dataAssets = (blockNode === null || blockNode === void 0 ? void 0 : blockNode.getAttribute('custom-data-assets')) || '';\n }\n return {\n id,\n mindMapData,\n debuggerMode,\n filePath,\n dataAssets,\n blockNode,\n iframeNode,\n isWidget,\n isMirror,\n injectConfigType,\n mirrorPath,\n mirrorTargetNodeId\n };\n };\n const getDataFromWidget = () => {\n const {\n id,\n mindMapData,\n debuggerMode,\n filePath,\n dataAssets\n } = getWidgetBlockInfo();\n return getFileDataFromSY({\n path: `/data/${dataAssets}`\n });\n };\n const saveDataToWidget = async (kmindData, injectConfig) => {\n let {\n id,\n mindMapData,\n debuggerMode,\n filePath,\n dataAssets\n } = getWidgetBlockInfo();\n\n // 如果dataAssets不存在的话,那么就使用kmind-${id}.kmind\n dataAssets = dataAssets || `assets/kmind-${id}.kmind`;\n const path = `/data/${dataAssets}`;\n await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"setBlockAttrs\"])({\n id,\n attrs: {\n // 制空老数据源\n 'custom-mind-map-data': '',\n 'custom-file-path': '',\n 'custom-data-assets': dataAssets\n }\n }).catch(e => {\n console.log(e);\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('保存数据失败,请检查此挂件的自定义属性的data-assets是否正确!', 'error');\n });\n interceptEmptyData(kmindData, injectConfig);\n const json = JSON.stringify(kmindData);\n const blob = new Blob([json], {\n type: 'application/json'\n });\n const file = new File([blob], `kmind-${id}.kmind`, {\n type: 'application/json',\n lastModified: Date.now()\n });\n await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"putFile\"])({\n file,\n path\n }).then(res => {\n // console.log(res)\n // saveTimeAgo.value = formatTimeAgo(date);\n }).catch(e => {\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('保存导图数据失败,请检查此挂件的自定义属性的data-assets是否正确!', 'error');\n console.log(e);\n });\n };\n const getDataFromPlugin = fileName => {\n return getFileDataFromSY({\n path: `/data/storage/petal/kmind/${fileName}.kmind`\n });\n };\n const getDataFromDoctreeDoc = injectConfig => {\n // fixme doc级别的data-assets似乎不生效,可能要考虑将文件存到插件的文件夹中\n const {\n doctreeDocPath\n } = injectConfig;\n const path = `/data/${doctreeDocPath}`;\n return getFileDataFromSY({\n path\n });\n };\n const saveDataToDoctreeDoc = async (kmindData, injectConfig) => {\n var _window, _window2;\n // console.log('saveDataToDoctreeDoc--kmindData:', kmindData)\n // console.log('saveDataToDoctreeDoc--injectConfig:', injectConfig)\n\n // 先拦截掉移动端保存数据,移动端只支持查看,因为保存的时候会使用setBlockAttrs更新文档属性,此时就会造成多端生成冲突文档\n if ((_window = window) !== null && _window !== void 0 && (_window = _window.parent) !== null && _window !== void 0 && (_window = _window.kmindApi) !== null && _window !== void 0 && (_window = _window.plugin) !== null && _window !== void 0 && _window.isMobile && ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.parent) === null || _window2 === void 0 || (_window2 = _window2.kmindApi) === null || _window2 === void 0 || (_window2 = _window2.globalConfig) === null || _window2 === void 0 ? void 0 : _window2.mobileDocTreeKmindEdit) === false) {\n // km('移动端不支持保存数据', 'error')\n return;\n }\n const {\n doctreeDocPath,\n syDocId\n } = injectConfig;\n const dataAssets = doctreeDocPath || `assets/kmind-doctree-doc-${syDocId}.kmind`;\n const path = `/data/${dataAssets}`;\n // fixme 可以先加一个判断,如果custom-data-assets-kmind-doctree-doc不存在的话,再来setBlockAttrs\n // 这里相当于每次保存都设置文档属性,好处是强绑定,坏处是多端同步易冲突\n const {\n data\n } = await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"getBlockAttrs\"])(syDocId);\n if (!data['custom-data-assets-kmind-doctree-doc']) {\n console.log('custom-data-assets-kmind-doctree-doc不存在,设置文档属性');\n await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"setBlockAttrs\"])({\n id: syDocId,\n attrs: {\n 'custom-data-assets-kmind-doctree-doc': dataAssets\n }\n }).catch(e => {\n console.log(e);\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('保存数据失败,请检查此文档的自定义属性的custom-data-assets-kmind-doctree-doc是否正确!', 'error');\n });\n }\n // console.log('custom-data-assets-kmind-doctree-doc存在,不设置文档属性')\n\n interceptEmptyData(kmindData, injectConfig);\n const json = JSON.stringify(kmindData);\n const blob = new Blob([json], {\n type: 'application/json'\n });\n const file = new File([blob], `${path}`, {\n type: 'application/json',\n lastModified: Date.now()\n });\n await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"putFile\"])({\n file,\n path\n }).then(res => {\n // console.log(res)\n // saveTimeAgo.value = formatTimeAgo(date);\n }).catch(e => {\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('保存导图数据失败,请检查此文档的自定义属性的custom-data-assets-kmind-doctree-doc是否正确!', 'error');\n console.log(e);\n });\n };\n const saveDataToPlugin = async (kmindData, injectConfig) => {\n console.log('要保存的数据:', kmindData);\n interceptEmptyData(kmindData, injectConfig);\n const json = safeStringify(kmindData);\n const blob = new Blob([json], {\n type: 'application/json'\n });\n const file = new File([blob], `${injectConfig.name}.kmind`, {\n type: 'application/json',\n lastModified: Date.now()\n });\n await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"putFile\"])({\n file,\n path: `/data/storage/petal/kmind/${injectConfig.name}.kmind`\n }).then(res => {\n // console.log(res)\n // saveTimeAgo.value = formatTimeAgo(date);\n }).catch(e => {\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('保存导图数据失败,请检查此挂件的自定义属性的data-assets是否正确!', 'error');\n console.log(e);\n });\n };\n const getFileDataFromSY = async ({\n path,\n tip = 'data-assets'\n }) => {\n return Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"getFile\"])({\n path\n }).then(res => {\n var _res$kmind, _res$config;\n const mindMapData = res || {};\n // 如果localeConfig字段存在的话,那么就把res.kmind.localeConfig合并到localConfig里\n const localConfig = (res === null || res === void 0 || (_res$kmind = res.kmind) === null || _res$kmind === void 0 ? void 0 : _res$kmind.localConfig) || {};\n const rainbowLinesConfig = (res === null || res === void 0 || (_res$config = res.config) === null || _res$config === void 0 ? void 0 : _res$config.rainbowLinesConfig) || {};\n return {\n mindMapData,\n localConfig,\n rainbowLinesConfig\n };\n }).catch(e => {\n console.log(e);\n // TODO 使用思源原生的错误提示\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])(`从本地读取导图数据失败,请检查此挂件的自定义属性的${tip}是否正确!`, 'error');\n });\n };\n\n /**\n * 递归获取完整文档树(使用 listDocsByPath API\n * @param notebook 笔记本ID\n * @param path 文档路径\n * @param listDocsByPath API 函数\n * @returns 文档树结构\n */\n const buildDocumentTree = async (notebook, path, listDocsByPath) => {\n var _response$data;\n const response = await listDocsByPath(notebook, path);\n if (!response || response.code !== 0 || !((_response$data = response.data) !== null && _response$data !== void 0 && _response$data.files)) {\n return [];\n }\n const files = response.data.files;\n const tree = [];\n\n // 并行获取所有子文档的子树\n const promises = files.map(async file => {\n // 去掉 .sy 后缀作为标题\n const title = file.name.endsWith('.sy') ? file.name.slice(0, -3) : file.name;\n const node = {\n uid: file.id,\n title: title,\n children: []\n };\n\n // 如果有子文档,递归获取\n if (file.subFileCount > 0) {\n node.children = await buildDocumentTree(notebook, file.path, listDocsByPath);\n }\n return node;\n });\n const nodes = await Promise.all(promises);\n return nodes;\n };\n\n /**\n * 将文档树结构转换为 KMind 导图数据(新版本)\n * @param tree 文档树结构(包含 title 字段)\n * @param rootId 根节点ID\n * @param rootTitle 根节点标题\n * @returns KMind 导图数据\n */\n const convertDocTreeToKmindData = (tree, rootId, rootTitle) => {\n // 递归转换节点\n const convertNode = node => {\n const kmindNode = {\n data: {\n text: node.title || '未命名',\n uid: node.uid,\n // 保存原始文档 ID,方便后续操作\n docId: node.uid\n },\n children: []\n };\n\n // 递归处理子节点(保持原始顺序)\n if (node.children && node.children.length > 0) {\n kmindNode.children = node.children.map(child => convertNode(child));\n }\n return kmindNode;\n };\n\n // MOC 模式:始终以当前文档作为根节点\n const rootNode = {\n data: {\n text: rootTitle,\n uid: rootId,\n docId: rootId\n },\n children: []\n };\n\n // 如果树为空,返回只有根节点的导图\n if (!tree || tree.length === 0) {\n return {\n root: rootNode\n };\n }\n\n // 将树中的节点作为根节点的子节点(保持原始顺序)\n rootNode.children = tree.map(node => convertNode(node));\n return {\n root: rootNode\n };\n };\n\n /**\n * 获取 MOC 模式的导图数据\n * @param docId 文档ID\n * @returns KMind 导图数据\n */\n const getMocDataFromSY = async docId => {\n try {\n const {\n getBlockInfo,\n listDocsByPath\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! @/api/siyuan */ \"./src/api/siyuan.tsx\"));\n\n // 1. 获取文档信息\n const blockInfo = await getBlockInfo(docId);\n if (!blockInfo || blockInfo.code !== 0) {\n throw new Error('获取文档信息失败');\n }\n const {\n box: notebook,\n path,\n rootTitle\n } = blockInfo.data;\n\n // 2. 使用新的 API 递归获取完整文档树(保持顺序)\n const tree = await buildDocumentTree(notebook, path, listDocsByPath);\n\n // 3. 转换为 KMind 导图数据(新版本不需要额外查询标题)\n const kmindData = convertDocTreeToKmindData(tree, docId, rootTitle || '未命名');\n return {\n mindMapData: kmindData,\n localConfig: {},\n rainbowLinesConfig: {}\n };\n } catch (error) {\n console.error('获取 MOC 数据失败:', error);\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])('获取 MOC 数据失败', 'error');\n // 返回默认导图数据\n return {\n mindMapData: {\n root: {\n data: {\n text: '加载失败'\n },\n children: []\n }\n },\n localConfig: {},\n rainbowLinesConfig: {}\n };\n }\n };\n\n // 获取思源源文件,入参是文档块的id\n const getSYSourceFile = async blockId => {\n const {\n data\n } = await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"getBlockInfo\"])(blockId);\n const path = `/data/${data.box}${data.path}`;\n return await Object(_api_siyuan__WEBPACK_IMPORTED_MODULE_3__[\"getFile\"])({\n path\n });\n };\n\n // 拦截空数据保存\n const interceptEmptyData = (kmindData, injectConfig) => {\n if (Object.keys(kmindData).length === 0) {\n var _globalThis$parent;\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])(`KMind: 已经为您拦截可能的数据丢失,请手动导出数据备份,并联系作者提供相关信息,感谢! ${safeStringify(injectConfig)}`, 'error');\n (_globalThis$parent = globalThis.parent) === null || _globalThis$parent === void 0 || (_globalThis$parent = _globalThis$parent.kmindApi) === null || _globalThis$parent === void 0 || _globalThis$parent.kmindNotify(`KMind: 已经为您拦截可能的数据丢失,请联系作者提供相关信息,感谢! ${safeStringify(injectConfig)}`, 'error');\n console.log('KMind: 数据为空,拦截保存!', injectConfig, kmindData);\n throw new Error(`KMind:数据为空,拦截保存! ${safeStringify(injectConfig)}`);\n }\n if (!kmindData.root) {\n var _globalThis$parent2;\n Object(_useKMindMessage__WEBPACK_IMPORTED_MODULE_1__[\"km\"])(`KMind: 已经为您拦截可能的数据丢失,请手动导出数据备份,并联系作者提供相关信息,感谢! ${safeStringify(injectConfig)}`, 'error');\n (_globalThis$parent2 = globalThis.parent) === null || _globalThis$parent2 === void 0 || (_globalThis$parent2 = _globalThis$parent2.kmindApi) === null || _globalThis$parent2 === void 0 || _globalThis$parent2.kmindNotify(`KMind: 已经为您拦截可能的数据丢失,请联系作者提供相关信息,感谢! ${safeStringify(injectConfig)}`, 'error');\n console.log('KMind: 数据为空,拦截保存!', injectConfig, kmindData);\n throw new Error(`KMind: 数据为空,拦截保存! ${safeStringify(injectConfig)}`);\n }\n return true;\n };\n\n // 兼容处理smm0.13.0之前的数据,如果data.smmVersion不存在,则设置为0.13.0\n const compatibleSmmVersion = kmindData => {\n var _kmindData$root;\n // console.log(\"兼容处理smm0.13.0设置前的数据:\", kmindData);\n if (!(kmindData !== null && kmindData !== void 0 && (_kmindData$root = kmindData.root) !== null && _kmindData$root !== void 0 && _kmindData$root.smmVersion)) {\n kmindData.root.smmVersion = '0.13.0';\n }\n // console.log(\"兼容处理smm0.13.0设置后的数据:\", kmindData);\n return kmindData;\n };\n return {\n getDataFromWidget,\n saveDataToWidget,\n getDataFromPlugin,\n saveDataToPlugin,\n getDataFromSY,\n saveDataToSY,\n getWidgetBlockInfo,\n saveDataToDoctreeDoc,\n wordsCount,\n nodeCount,\n getMirrorType,\n compatibleSmmVersion,\n getMocDataFromSY,\n convertDocTreeToKmindData,\n buildDocumentTree\n };\n};\n\n//# sourceURL=webpack:///./src/hooks/useData.tsx?");
/***/ }),
/***/ "./src/hooks/useFrameContext.js":
/*!**************************************!*\
!*** ./src/hooks/useFrameContext.js ***!
\**************************************/
/*! exports provided: useFrameContext */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useFrameContext\", function() { return useFrameContext; });\n/**\n * 统一的框架上下文管理\n * 用于处理 iframe 和 DOM 模式下的上下文差异\n * @param {Object} injectConfig - 注入的配置对象\n */\nfunction useFrameContext(injectConfig) {\n // 如果没有传入,使用空对象\n if (!injectConfig) {\n injectConfig = {};\n }\n\n // 获取 frame element(仅在 iframe 模式下有效)\n const getFrameElement = () => {\n // DOM模式下没有frameElement\n if (injectConfig.type === 'sy-doctree-doc-dom' || injectConfig.type === 'sy-doctree-moc-dom') {\n return null;\n }\n return window.frameElement;\n };\n\n // 获取 block 节点\n const getBlockNode = () => {\n const frame = getFrameElement();\n if (frame) {\n var _frame$parentElement;\n // iframe 模式:通过 frameElement 查找\n return (_frame$parentElement = frame.parentElement) === null || _frame$parentElement === void 0 ? void 0 : _frame$parentElement.parentElement;\n }\n // DOM 模式:直接查找挂载的容器\n const docId = injectConfig.name || injectConfig.docId;\n const type = injectConfig.type;\n if (docId) {\n // 根据类型使用不同的前缀\n const prefix = type === 'sy-doctree-moc-dom' ? 'kmind-doctree-moc-root' : 'kmind-doctree-doc-root';\n return document.getElementById(`${prefix}-${docId}`);\n }\n return null;\n };\n\n // 获取 iframe 节点(供 useData 使用)\n const getIframeNode = () => {\n return getFrameElement();\n };\n\n // 检查是否在 iframe 中\n const isInIframe = () => {\n return window.frameElement !== null && window.parent !== window;\n };\n\n // 获取父窗口\n const getParentWindow = () => {\n if (isInIframe()) {\n return window.parent;\n }\n return window;\n };\n\n // 获取容器元素的属性\n const getContainerAttributes = () => {\n const blockNode = getBlockNode();\n if (blockNode) {\n const attrs = {};\n // 复制所有自定义属性\n Array.from(blockNode.attributes).forEach(attr => {\n if (attr.name.startsWith('custom-')) {\n attrs[attr.name] = attr.value;\n }\n });\n return attrs;\n }\n return {};\n };\n return {\n getFrameElement,\n getBlockNode,\n getIframeNode,\n isInIframe,\n getParentWindow,\n getContainerAttributes\n };\n}\n\n//# sourceURL=webpack:///./src/hooks/useFrameContext.js?");
/***/ }),
/***/ "./src/hooks/useKMindMessage.tsx":
/*!***************************************!*\
!*** ./src/hooks/useKMindMessage.tsx ***!
\***************************************/
/*! exports provided: km */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"km\", function() { return km; });\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! element-ui */ \"./node_modules/element-ui/lib/element-ui.common.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_0__);\n\nconst km = (message, type = 'info') => {\n Object(element_ui__WEBPACK_IMPORTED_MODULE_0__[\"Message\"])({\n type,\n message: `KMind: ${message}`\n });\n};\n\n//# sourceURL=webpack:///./src/hooks/useKMindMessage.tsx?");
/***/ }),
/***/ "./src/i18n.js":
/*!*********************!*\
!*** ./src/i18n.js ***!
\*********************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vue_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-i18n */ \"./node_modules/vue-i18n/dist/vue-i18n.esm.js\");\n/* harmony import */ var _lang__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lang */ \"./src/lang/index.js\");\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_i18n__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nconst i18n = new vue_i18n__WEBPACK_IMPORTED_MODULE_1__[\"default\"]({\n messages: _lang__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (i18n);\n\n//# sourceURL=webpack:///./src/i18n.js?");
/***/ }),
/***/ "./src/lang/en_us.js":
/*!***************************!*\
!*** ./src/lang/en_us.js ***!
\***************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n kmind: {\n jumpToEditSourceDoc: 'Jump to edit source doc',\n kmindInitLoadingText: 'If it takes more than 5 seconds to load, it means that KMindApp has failed to load. Please turn it on and off again on the page.'\n },\n kmindFloatToolbar: {\n editNode: 'Edit Node',\n deleteNode: 'Delete Node',\n addNote: 'Add Note',\n addLink: 'Add Link',\n addTag: 'Add Tag',\n addImage: 'Add Image',\n addIcon: 'Add Icon',\n addAssociativeLine: 'Add Associative Line',\n addSummary: 'Add Summary',\n addFormula: 'Add Formula',\n addOuterFrame: 'Add Outer Frame',\n undo: 'Undo',\n redo: 'Redo',\n formatPainter: 'Format Painter',\n dragToAddNode: 'Press and drag to add node'\n },\n baseStyle: {\n title: 'BaseStyle',\n kmindTitle: 'MapStyle',\n background: 'Background',\n color: 'Color',\n image: 'Image',\n imageRepeat: 'Image repeat',\n imagePosition: 'Image position',\n imageSize: 'Image size',\n line: 'Line',\n width: 'Width',\n style: 'Style',\n lineRadius: 'Radius',\n lineOfOutline: 'Line of outline',\n showArrow: 'Is show arrow',\n nodePadding: 'Node padding',\n nodeMargin: 'Node margin',\n horizontal: 'Horizontal',\n vertical: 'Vertical',\n maximumWidth: 'Max width',\n maximumHeight: 'Max height',\n icon: 'Icon',\n size: 'Size',\n level2Node: 'Level2 node',\n belowLevel2Node: 'Below level2 node',\n nodeBorderType: 'Node border style',\n nodeUseLineStyle: 'Use only has bottom border style',\n otherConfig: 'Other config',\n associativeLine: 'Associative line',\n associativeLineWidth: 'Width',\n associativeLineColor: 'Color',\n associativeLineActiveWidth: 'Active width',\n associativeLineActiveColor: 'Active color',\n rootStyle: 'Root Node',\n associativeLineText: 'Associative line text',\n fontFamily: 'Font family',\n fontSize: 'Font size',\n rootLineStartPos: 'Root line start pos',\n center: 'Center',\n edge: 'Edge',\n rainbowLines: 'Rainbow lines',\n notUseRainbowLines: 'Not use rainbow lines',\n outerFramePadding: 'Outer frame padding'\n },\n setting: {\n title: 'Setting',\n openPerformance: 'Enable performance mode',\n enableFreeDrag: 'Enable node free drag(Beta)',\n isEnableNodeRichText: 'Enable node rich text editing',\n mousewheelAction: 'Mouse wheel behavior',\n zoomView: 'Zoom view',\n moveViewUpDown: 'Move view up and down',\n mousewheelZoomActionReverse: 'Mouse Wheel Zoom',\n mousewheelZoomActionReverse1: 'Zoom out forward and zoom in back',\n mousewheelZoomActionReverse2: 'Zoom in forward and zoom out back',\n createNewNodeBehavior: 'Behavior of creating new node',\n default: 'Active new node and editing',\n notActive: 'Not active new node',\n activeOnly: 'Only active new node but not editing',\n openRealtimeRenderOnNodeTextEdit: 'Enable real-time rendering effect for text editing',\n isShowScrollbar: 'Is show scrollbar',\n isUseHandDrawnLikeStyle: 'Is use hand drawn like style',\n isUseMomentum: 'Is open drag momentum',\n watermark: 'Watermark',\n showWatermark: 'Is show watermark',\n onlyExport: 'Only export',\n watermarkDefaultText: 'Watermark text',\n watermarkText: 'Watermark text',\n watermarkTextColor: 'Text color',\n watermarkLineSpacing: 'Line spacing',\n watermarkTextSpacing: 'Text spacing',\n watermarkAngle: 'Angle',\n watermarkTextOpacity: 'Text opacity',\n watermarkTextFontSize: 'Font size',\n belowNode: 'Display below nodes',\n tagPositionRight: 'Text right',\n tagPositionBottom: 'Text bottom',\n alwaysShowExpandBtn: 'Always show expand btn',\n enableAutoEnterTextEditWhenKeydown: 'Auto enter text edit when keydown',\n confirm: 'Confirm',\n cancel: 'Cancel',\n changeRichTextTip: 'This operation will clear all historical modification records and modify the mind map data. Do you want to continue?',\n changeRichTextTip2: 'Do you want to switch to rich text mode?',\n changeRichTextTip3: 'Do you want to switch to non rich text mode?',\n enableDragImport: 'Is it allowed to directly drag and drop files to the page for import',\n imgTextMargin: 'Node image and text margin',\n textContentMargin: 'Node contents margin',\n enableInheritAncestorLineStyle: 'Node connection style inherits the style of ancestor nodes'\n },\n color: {\n moreColor: 'More color'\n },\n contextmenu: {\n export: 'Export',\n insertSiblingNode: 'Insert sibling node',\n insertChildNode: 'Insert child node',\n insertParentNode: 'Insert parent node',\n insertSummary: 'Insert summary',\n addSiyuanPage: 'Siyuan subpage',\n moveUpNode: 'Move up node',\n moveDownNode: 'Move down node',\n deleteNode: 'Delete node',\n deleteCurrentNode: 'Only del cur node',\n copyNode: 'Copy node',\n copyNodeHyperlink: 'Copy node hyperlink',\n copyNodeHyperlinkDesc: 'Get locate link',\n cutNode: 'Cut node',\n pasteNode: 'Paste node',\n backCenter: 'Back root node',\n expandAll: 'Expand all',\n unExpandAll: 'Un expand all',\n expandTo: 'Expand to',\n arrangeLayout: 'Arrange layout',\n level1: 'Level1',\n level2: 'Level2',\n level3: 'Level3',\n level4: 'Level4',\n level5: 'Level5',\n level6: 'Level6',\n zenMode: 'Zen mode',\n fitCanvas: 'Fit canvas',\n removeImage: 'Remove image',\n removeHyperlink: 'Remove hyperlink',\n removeSiyuanHyperlink: 'Remove Siyuan document association',\n removeSiyuanPDFHyperlink: 'Remove Siyuan PDF association',\n removeNote: 'Remove note',\n removeCustomStyles: 'Remove custom styles',\n removeAllNodeCustomStyles: 'Remove all node custom styles',\n copyKmindNodeHyperlink: 'Copy node hyperlink',\n exportNodeToPng: 'Export node to png',\n kmindCopyNodeToPng: 'Copy node to png',\n copyNodeMirrorBlock: 'Copy node mirror block',\n kmindCopySuccessAnywhere: 'Copy success, please paste directly in Siyuan',\n copyToClipboard: 'Copy to clipboard',\n copyToSmm: 'SMM',\n copyToKMind: 'KMind',\n copyToJson: 'JSON',\n copyToMarkdown: 'Markdown',\n copyToTxt: 'Txt',\n copyToPng: 'Png',\n copySuccess: 'Copy success',\n copyFail: 'Copy fail',\n number: 'Number child nodes',\n expandNodeChild: 'Expand all sub nodes',\n unExpandNodeChild: 'Un expand all sub nodes',\n addToDo: 'Add toDo',\n removeToDo: 'Remove toDo'\n },\n count: {\n words: 'Words',\n nodes: 'Nodes'\n },\n dialog: {\n cancel: 'Cancel',\n confirm: 'Confirm'\n },\n export: {\n title: 'Export',\n filename: 'Filename',\n include: 'Is include config like theme and structure',\n dedicatedFile: 'Dedicated file',\n jsonFile: 'json file',\n imageFile: 'Image file',\n svgFile: 'svg file',\n pdfFile: 'pdf file',\n markdownFile: 'markdown file',\n isTransparent: 'Background is transparent',\n transformingDomToImages: 'Converting nodes: ',\n notifyTitle: 'Info',\n notifyMessage: 'If the download is not triggered, check whether it is blocked by the browser',\n paddingX: 'Padding x',\n paddingY: 'Padding y',\n useMultiPageExport: 'Export multi page',\n defaultFileName: 'Mind map',\n addFooterTextPlaceholder: 'For example: From KMind',\n addFooterText: 'Add text at the footer',\n desc: 'Desc',\n options: 'Options'\n },\n fullscreen: {\n fullscreenShow: 'Full screen show',\n fullscreenEdit: 'Full screen edit'\n },\n demonstrate: {\n demonstrate: 'Enter demonstration mode'\n },\n import: {\n title: 'Import',\n selectFile: 'Select file',\n support: 'Support',\n file: 'file',\n pleaseSelect: 'Please select',\n maxFileNum: 'At most one file can be selected',\n notSelectTip: 'Please select the file to import',\n fileContentError: 'The file content is incorrect',\n importSuccess: 'Import success',\n fileParsingFailed: 'File parsing failed',\n xmindCanvasSelectDialogTitle: 'Select the canvas to import'\n },\n kmindHistory: {\n title: 'History',\n createHistoryVersion: 'Create a history version',\n refreshHistoryList: 'Refresh',\n autoSave: 'Auto save',\n preview: 'Preview',\n delete: 'Delete',\n apply: 'Apply',\n pin: 'Pin'\n },\n navigatorToolbar: {\n openMiniMap: 'Open mini map',\n closeMiniMap: 'Close mini map',\n readonly: 'Change to Readonly',\n edit: 'Change to edit',\n backToRoot: 'Back to root node',\n toggleZenMode: 'Toggle zen mode',\n changeSourceCodeEdit: 'Switch to source code editing mode'\n },\n nodeHyperlink: {\n title: 'Link',\n link: 'Href',\n name: 'Name'\n },\n nodeIcon: {\n title: 'Icon'\n },\n nodeImage: {\n title: 'Image',\n imgTitle: 'Title',\n copyImage: 'Copy image to clipboard',\n copyImageLink: 'Copy image link'\n },\n nodeNote: {\n title: 'Note'\n },\n nodeTag: {\n title: 'Tag',\n addTip: 'Press Enter to add'\n },\n richEditor: {\n nodeEditorTitle: 'Node editor',\n nodeNoteEditorTitle: 'Note editor'\n },\n outline: {\n title: 'Outline',\n nodeDefaultText: 'Branch node',\n print: 'Print',\n fullscreen: 'Fullscreen'\n },\n scale: {\n zoomIn: 'Zoom in',\n zoomOut: 'Zoom out'\n },\n shortcutKey: {\n title: 'Shortcut key'\n },\n strusture: {\n title: 'Strusture'\n },\n style: {\n title: 'Node style',\n normal: 'Normal',\n active: 'Active',\n text: 'Text',\n fontFamily: 'Font family',\n fontSize: 'Font size',\n color: 'color',\n addFontWeight: 'add font weight',\n italic: 'Italic',\n textDecoration: 'Text decoration',\n underline: 'Underline',\n none: 'None',\n lineThrough: 'Line through',\n overline: 'Overline',\n border: 'Border',\n style: 'Style',\n width: 'Width',\n borderRadius: 'Border radius',\n background: 'Background',\n shape: 'Shape',\n line: 'Line',\n nodePadding: 'Node padding',\n horizontal: 'Horizontal',\n vertical: 'Vertical',\n gradientStyle: 'Gradient',\n startColor: 'Start',\n endColor: 'End',\n arrowDir: 'Arrow dir',\n arrowDirStart: 'Start',\n arrowDirEnd: 'End',\n direction: 'Direction',\n pleaseSelectNode: 'Please select a node',\n selectNodeTip: 'Please select a node',\n openLineFlow: 'Open line flow',\n lineFlowDuration: 'Line flow duration',\n forward: 'Forward',\n reverse: 'Reverse',\n img: 'Image',\n placement: 'Placement',\n top: 'Top',\n bottom: 'Bottom',\n left: 'Left',\n right: 'Right',\n tag: 'Tag'\n },\n theme: {\n title: 'Theme',\n classics: 'Classics',\n dark: 'Darkness',\n simple: 'Simple',\n myThemes: 'My Themes',\n coverTip: 'You have currently customized the basic style, do you want to overwrite it?',\n tip: 'Tip',\n cover: 'Cover',\n reserve: 'Reserve',\n // Theme names\n theme_default: 'Default',\n theme_classic: 'Classic',\n theme_blackHumour: 'Black Humour',\n theme_lateNightOffice: 'Late Night Office',\n theme_blackGold: 'Black Gold',\n theme_orangeJuice: 'Orange Juice',\n theme_neonLamp: 'Neon Lamp',\n theme_darkNightLceBlade: 'Dark Night Ice Blade',\n theme_dark: 'Dark',\n theme_dark2: 'Dark 2',\n theme_dark3: 'Dark 3',\n theme_dark4: 'Dark 4',\n theme_dark5: 'Dark 5',\n theme_dark6: 'Dark 6',\n theme_dark7: 'Dark 7',\n theme_skyGreen: 'Sky Green',\n theme_classicGreen: 'Classic Green',\n theme_classicBlue: 'Classic Blue',\n theme_blueSky: 'Blue Sky',\n theme_brainImpairedPink: 'Brain Impaired Pink',\n theme_earthYellow: 'Earth Yellow',\n theme_freshGreen: 'Fresh Green',\n theme_freshRed: 'Fresh Red',\n theme_romanticPurple: 'Romantic Purple',\n theme_pinkGrape: 'Pink Grape',\n theme_mint: 'Mint',\n theme_gold: 'Gold VIP',\n theme_vitalityOrange: 'Vitality Orange',\n theme_greenLeaf: 'Green Leaf',\n theme_minions: 'Minions',\n theme_simpleBlack: 'Simple Black',\n theme_courseGreen: 'Course Green',\n theme_coffee: 'Coffee',\n theme_redSpirit: 'Red Spirit',\n theme_avocado: 'Avocado',\n theme_autumn: 'Autumn',\n theme_oreo: 'Oreo',\n theme_shallowSea: 'Shallow Sea',\n theme_lemonBubbles: 'Lemon Bubbles',\n theme_rose: 'Rose',\n theme_seaBlueLine: 'Sea Blue Line',\n theme_morandi: 'Morandi',\n theme_cactus: 'Cactus',\n theme_classic2: 'Classic 2',\n theme_classic3: 'Classic 3',\n theme_classic4: 'Classic 4',\n theme_classic5: 'Classic 5',\n theme_classic6: 'Classic 6',\n theme_classic7: 'Classic 7',\n theme_classic8: 'Classic 8',\n theme_classic9: 'Classic 9',\n theme_classic10: 'Classic 10',\n theme_classic11: 'Classic 11',\n theme_classic12: 'Classic 12',\n theme_classic13: 'Classic 13',\n theme_classic14: 'Classic 14',\n theme_classic15: 'Classic 15'\n },\n toolbar: {\n undo: 'Undo',\n redo: 'Redo',\n insertSiblingNode: 'Sibling node',\n insertChildNode: 'Child node',\n deleteNode: 'Delete node',\n image: 'Image',\n icon: 'Icon',\n link: 'Link',\n note: 'Note',\n tag: 'Tag',\n summary: 'Summary',\n displayOutline: 'Display outline',\n baseStyle: 'Base style',\n theme: 'Theme',\n strusture: 'Strusture',\n newFile: 'New file',\n openFile: 'Open file',\n saveAs: 'Save as',\n import: 'Import',\n export: 'Export',\n history: 'History',\n shortcutKey: 'Shortcut key',\n associativeLine: 'Associative line',\n painter: 'Painter',\n formula: 'Formula',\n attachment: 'Attachment',\n outerFrame: 'Outer frame',\n editNode: 'Edit node',\n more: 'More',\n selectFileTip: 'Please select a file',\n notSupportTip: 'Your browser does not support this feature, or the current page is not using the HTTPS protocol',\n tip: 'Tip',\n editingLocalFileTipFront: 'Currently editing your local【',\n editingLocalFileTipEnd: '】file',\n fileContentError: 'File content error',\n fileOpenFailed: 'File open failed',\n defaultFileName: 'Mind map',\n creatingTip: 'Creating file',\n directory: 'Directory',\n newFileTip: 'Please export the currently edited file before creating a new one, Beware of content loss',\n openFileTip: 'Please export the currently edited file before opening it, Beware of content loss'\n },\n edit: {\n newFeatureNoticeTitle: 'New feature reminder',\n newFeatureNoticeMessage: 'This update supports node rich text editing, But there are some defects, The most important impact is that the time to export the image is proportional to the number of nodes, Therefore, if you are more dependent on export requirements, you can use【Base style】-【Other config】-【Enable node rich text editing】Set to turn off rich text editing mode.',\n root: 'Root node',\n splitByWrap: 'Is automatically split nodes based on line breaks?',\n tip: 'Tip',\n yes: 'Yes',\n no: 'No',\n exportError: 'Export failed',\n dragTip: 'Release here to import the file',\n deleteNodeImgTip: 'Are you sure to delete the node image?',\n autoOpenNodeRichTextTip: 'Detected imported rich text content, automatically enabled rich text mode'\n },\n mouseAction: {\n tip1: 'Current: Left click to drag the canvas, right click to box select nodes',\n tip2: 'Current: Left click to box select nodes, right click to drag the canvas'\n },\n search: {\n searchPlaceholder: 'Please enter the search content',\n replacePlaceholder: 'Please enter replacement content',\n replace: 'Replace',\n replaceAll: 'Replace all',\n cancel: 'Cancel',\n noResult: 'No result'\n },\n nodeIconSidebar: {\n title: 'Icon/Sticker',\n icon: 'Icon',\n sticker: 'Sticker'\n },\n formulaSidebar: {\n title: 'Formula',\n placeholder: 'Please enter LaTeX syntax',\n confirm: 'Confirm',\n common: 'Common formulas',\n tip: 'Inserting formulas is not supported in non rich text mode'\n },\n richTextToolbar: {\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strike: 'Strike',\n fontFamily: 'Font family',\n fontSize: 'Font size',\n color: 'Color',\n backgroundColor: 'Background color',\n removeFormat: 'Clear Style',\n textAlign: 'Text align'\n },\n other: {\n loading: 'Loading, please wait...'\n },\n sourceCodeEdit: {\n sourceCodeTip: 'It is not recommended to modify the style in rich text mode because it requires synchronous modification of data and HTML structure.',\n format: 'Format',\n copy: 'Copy',\n confirm: 'Complete',\n close: 'Close',\n formatErrorTip: 'The JSON format is incorrect. Please check and try again',\n copyTip: 'Copied to clipboard',\n formatTip: 'Format complete'\n },\n attachment: {\n deleteAttachment: 'Delete attachment',\n tip: 'The attachment function is only available on the client side'\n },\n annotation: {\n mark: 'Mark',\n show: 'Show mark',\n type: 'Type',\n color: 'Color',\n lineWidth: 'Line width',\n padding: 'Padding',\n animate: 'Animate'\n },\n nodeOuterFrame: {\n outerFrameSetting: 'Setting',\n deleteOuterFrame: 'Delete outer frame',\n boxStyle: 'Box style',\n boxColor: 'Box color',\n fillColor: 'Fill color'\n },\n nodeTagStyle: {\n placeholder: 'Please enter the tag content',\n delete: 'Delete this tag'\n },\n openSiyuanFloat: {\n open: 'Open document',\n openLeft: 'Open left',\n openRight: 'Open in tab right',\n openBottom: 'Open in tab bottom'\n },\n kmindDefaultText: {\n defaultInsertSecondLevelNodeText: 'Subtopic',\n defaultInsertBelowSecondLevelNodeText: 'Add Content',\n defaultGeneralizationText: 'Summary',\n defaultAssociativeLineText: 'Associative Line'\n },\n moc: {\n operationNotSupported: 'MOC mode does not support this operation',\n insertParentNotSupported: 'MOC mode does not support: Insert parent node',\n insertMultiNotSupported: 'MOC mode does not support: Insert multiple sibling nodes',\n pasteNotSupported: 'MOC mode does not support: Paste node (node tree)',\n undoNotSupported: 'MOC mode does not support: Undo (Ctrl+Z)',\n redoNotSupported: 'MOC mode does not support: Redo (Ctrl+Y)',\n refreshMocData: 'Refresh MOC Mind Map Data',\n cannotGetDocId: 'Cannot get current document ID',\n refreshing: 'Refreshing MOC mind map data...',\n refreshSuccess: 'Refresh completed',\n refreshFailedNoData: 'Refresh failed: No valid data received',\n refreshFailed: 'Refresh failed',\n // Delete node related\n deleteNodeConfirmSingle: 'Deleting this node will also delete the corresponding SiYuan document. Continue?',\n deleteNodeConfirmMultiple: 'Deleting {count} nodes will also delete the corresponding SiYuan documents. Continue?',\n deleteConfirmTitle: 'Warning',\n confirmButton: 'Confirm',\n cancelButton: 'Cancel',\n deleteSuccess: '{count} document(s) deleted',\n deletePartialFailed: 'Delete failed: {failed}/{total} document(s) failed to delete',\n deleteFailed: 'Failed to delete node',\n noNodesToDelete: 'No nodes to delete',\n noDocIdToDelete: 'Node has no associated document ID',\n // Create node related\n createDocFailed: 'Failed to create document',\n createNodeFailed: 'Failed to create node',\n // Update node related\n renameDocFailed: 'Failed to rename document',\n titleCannotBeEmpty: 'Title cannot be empty',\n // Move node related\n moveDocFailed: 'Failed to move document',\n moveNodeFailed: 'Failed to move node',\n moveSuccess: '{count} document(s) moved',\n noNodesToMove: 'No nodes to move',\n noTargetNode: 'No target node',\n targetNodeNoDocId: 'Target node has no associated document ID',\n nodeNoDocId: 'Node to move has no associated document ID'\n }\n});\n\n//# sourceURL=webpack:///./src/lang/en_us.js?");
/***/ }),
/***/ "./src/lang/index.js":
/*!***************************!*\
!*** ./src/lang/index.js ***!
\***************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _en_us__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./en_us */ \"./src/lang/en_us.js\");\n/* harmony import */ var _zh_cn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./zh_cn */ \"./src/lang/zh_cn.js\");\n/* harmony import */ var _zh_tw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./zh_tw */ \"./src/lang/zh_tw.js\");\n\n\n\n\n// Provide common locale aliases so external callers can use\n// zh/zh-CN/zh_CN, en/en-US/en_US, zh-TW/zh_TW interchangeably.\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n // canonical keys\n zh: _zh_cn__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n en: _en_us__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n zhtw: _zh_tw__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n // aliases\n 'zh-CN': _zh_cn__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n zh_CN: _zh_cn__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n zh_cn: _zh_cn__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n 'en-US': _en_us__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n en_US: _en_us__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n en_us: _en_us__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n 'zh-TW': _zh_tw__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n zh_TW: _zh_tw__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n zh_tw: _zh_tw__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n\n//# sourceURL=webpack:///./src/lang/index.js?");
/***/ }),
/***/ "./src/lang/zh_cn.js":
/*!***************************!*\
!*** ./src/lang/zh_cn.js ***!
\***************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n kmind: {\n jumpToEditSourceDoc: '跳转编辑源文档',\n kmindInitLoadingText: '如果超过5秒还没有加载完成,说明KMindApp加载失败了,请重新开关一下该页面即可'\n },\n kmindFloatToolbar: {\n editNode: '编辑节点',\n deleteNode: '删除节点',\n addNote: '添加备注',\n addLink: '添加链接',\n addTag: '添加标签',\n addImage: '添加图片',\n addIcon: '添加图标',\n addAssociativeLine: '添加关联线',\n addSummary: '添加概要',\n addFormula: '添加公式',\n addOuterFrame: '添加外框',\n undo: '撤销',\n redo: '重做',\n formatPainter: '格式刷',\n dragToAddNode: '按住拖动添加节点'\n },\n baseStyle: {\n title: '基础样式',\n kmindTitle: '导图样式',\n background: '背景',\n color: '颜色',\n image: '图片',\n imageRepeat: '图片重复',\n imagePosition: '图片位置',\n imageSize: '图片大小',\n line: '连线',\n width: '粗细',\n style: '风格',\n lineRadius: '圆角大小',\n lineOfOutline: '概要的连线',\n showArrow: '是否显示箭头',\n nodePadding: '节点内边距',\n nodeMargin: '节点外边距',\n horizontal: '水平',\n vertical: '垂直',\n maximumWidth: '显示的最大宽度',\n maximumHeight: '显示的最大高度',\n icon: '图标',\n size: '大小',\n level2Node: '二级节点',\n belowLevel2Node: '三级及以下节点',\n nodeBorderType: '节点边框风格',\n nodeUseLineStyle: '是否使用只有底边框的风格',\n associativeLine: '关联线',\n associativeLineWidth: '粗细',\n associativeLineColor: '颜色',\n associativeLineActiveWidth: '激活粗细',\n associativeLineActiveColor: '激活颜色',\n rootStyle: '根节点',\n associativeLineText: '关联线文字',\n fontFamily: '字体',\n fontSize: '字号',\n rootLineStartPos: '根节点连线起始位置',\n center: '中心',\n edge: '边缘',\n rainbowLines: '彩虹线条',\n notUseRainbowLines: '不使用彩虹线条',\n outerFramePadding: '外框内边距'\n },\n setting: {\n title: '设置',\n openPerformance: '开启性能模式(Beta)',\n enableFreeDrag: '是否开启节点自由拖拽',\n isEnableNodeRichText: '是否开启节点富文本编辑',\n mousewheelAction: '鼠标滚轮行为',\n zoomView: '缩放视图',\n moveViewUpDown: '上下移动视图',\n mousewheelZoomActionReverse: '鼠标滚轮缩放',\n mousewheelZoomActionReverse1: '向前缩小向后放大',\n mousewheelZoomActionReverse2: '向前放大向后缩小',\n createNewNodeBehavior: '创建新节点的行为',\n default: '激活新节点及进入编辑',\n notActive: '不激活新节点',\n activeOnly: '只激活新节点,不进入编辑',\n openRealtimeRenderOnNodeTextEdit: '开启文本编辑实时渲染效果',\n isShowScrollbar: '是否显示滚动条',\n isUseHandDrawnLikeStyle: '是否开启手绘风格',\n isUseMomentum: '是否开启拖动画布的动量效果',\n watermark: '水印',\n showWatermark: '是否显示水印',\n watermarkDefaultText: '水印文字',\n onlyExport: '是否仅在导出时显示',\n watermarkText: '水印文字',\n watermarkTextColor: '文字颜色',\n watermarkLineSpacing: '水印行间距',\n watermarkTextSpacing: '水印文字间距',\n watermarkAngle: '旋转角度',\n watermarkTextOpacity: '文字透明度',\n watermarkTextFontSize: '文字字号',\n belowNode: '显示在节点下方',\n tagPositionRight: '文本右侧',\n tagPositionBottom: '文本下面',\n alwaysShowExpandBtn: '是否一直显示展开收起按钮',\n enableAutoEnterTextEditWhenKeydown: '键盘输入时自动进入文本编辑',\n enableInheritAncestorLineStyle: '节点连线样式继承祖先节点的样式',\n confirm: '确定',\n cancel: '取消',\n changeRichTextTip: '该操作会清空所有历史修改记录,并且修改思维导图数据,是否继续?',\n changeRichTextTip2: '是否切换为富文本模式?',\n changeRichTextTip3: '是否切换为非富文本模式?',\n enableDragImport: '是否允许直接拖拽文件到页面进行导入',\n imgTextMargin: '节点图片和文本间隔',\n textContentMargin: '节点各种内容间隔'\n },\n color: {\n moreColor: '更多颜色'\n },\n contextmenu: {\n export: '导出',\n insertSiblingNode: '插入同级节点',\n insertChildNode: '插入子级节点',\n insertParentNode: '插入父节点',\n insertSummary: '插入概要',\n addSiyuanPage: '节点子文档',\n moveUpNode: '上移节点',\n moveDownNode: '下移节点',\n deleteNode: '删除节点',\n deleteCurrentNode: '仅删除当前节点',\n copyNode: '复制节点',\n copyNodeHyperlink: '复制节点超链接',\n copyNodeHyperlinkDesc: '获取定位链接',\n cutNode: '剪切节点',\n pasteNode: '粘贴节点',\n backCenter: '回到根节点',\n expandAll: '展开所有',\n unExpandAll: '收起所有',\n expandTo: '展开到',\n arrangeLayout: '一键整理布局',\n level1: '一级主题',\n level2: '二级主题',\n level3: '三级主题',\n level4: '四级主题',\n level5: '五级主题',\n level6: '六级主题',\n zenMode: '禅模式',\n fitCanvas: '适应画布',\n removeImage: '移除图片',\n removeHyperlink: '移除超链接',\n removeSiyuanHyperlink: '移除思源子文档关联',\n removeSiyuanPDFHyperlink: '移除思源PDF关联',\n removeNote: '移除备注',\n removeCustomStyles: '一键去除自定义样式',\n removeAllNodeCustomStyles: '一键去除所有节点自定义样式',\n copyKmindNodeHyperlink: '复制节点超链接',\n exportNodeToPng: '导出该节点为图片',\n kmindCopyNodeToPng: '复制该节点为图片',\n copyNodeMirrorBlock: '复制节点镜像块',\n kmindCopySuccessAnywhere: '复制成功,请在思源中的任意位置直接粘贴即可',\n copyToClipboard: '复制到剪贴板',\n copyToSmm: 'SMM',\n copyToKMind: 'KMind',\n copyToJson: 'JSON',\n copyToMarkdown: 'Markdown',\n copyToTxt: 'Txt',\n copyToPng: '图片',\n copySuccess: '复制成功',\n copyFail: '复制失败',\n number: '编号其子节点',\n expandNodeChild: '展开所有下级节点',\n unExpandNodeChild: '收起所有下级节点',\n addToDo: '添加待办',\n removeToDo: '删除待办'\n },\n count: {\n words: '字数',\n nodes: '节点'\n },\n dialog: {\n cancel: '取 消',\n confirm: '确 定'\n },\n export: {\n title: '导出',\n filename: '导出文件名称',\n include: '是否包含主题、结构等配置数据',\n dedicatedFile: '专有文件',\n jsonFile: 'json文件',\n imageFile: '图片文件',\n svgFile: 'svg文件',\n pdfFile: 'pdf文件',\n markdownFile: 'markdown文件',\n isTransparent: '背景是否透明',\n transformingDomToImages: '正在转换节点:',\n notifyTitle: '消息',\n notifyMessage: '如果没有触发下载,请检查是否被浏览器拦截了',\n paddingX: '水平内边距',\n paddingY: '垂直内边距',\n useMultiPageExport: '是否多页导出',\n defaultFileName: '思维导图',\n addFooterText: '底部添加文字',\n addFooterTextPlaceholder: '比如:来自KMind',\n desc: '说明',\n options: '选项'\n },\n fullscreen: {\n fullscreenShow: '全屏查看',\n fullscreenEdit: '全屏编辑'\n },\n demonstrate: {\n demonstrate: '进入演示模式'\n },\n import: {\n title: '导入',\n selectFile: '选取文件',\n support: '支持',\n file: '文件',\n pleaseSelect: '请选择',\n maxFileNum: '最多只能选择一个文件',\n notSelectTip: '请选择要导入的文件',\n fileContentError: '文件内容有误',\n importSuccess: '导入成功',\n fileParsingFailed: '文件解析失败',\n xmindCanvasSelectDialogTitle: '选择要导入的画布'\n },\n kmindHistory: {\n title: '历史记录',\n createHistoryVersion: '创建一个历史版本',\n refreshHistoryList: '刷新',\n autoSave: '自动保存',\n preview: '预览',\n delete: '删除',\n apply: '应用',\n pin: '标记'\n },\n navigatorToolbar: {\n openMiniMap: '开启小地图',\n closeMiniMap: '关闭小地图',\n readonly: '切换为只读模式',\n edit: '切换为编辑模式',\n backToRoot: '回到根节点',\n toggleZenMode: '切换为禅模式',\n changeSourceCodeEdit: '切换为源码编辑模式'\n },\n nodeHyperlink: {\n title: '超链接',\n link: '链接',\n name: '名称'\n },\n nodeIcon: {\n title: '图标'\n },\n nodeImage: {\n title: '图片',\n imgTitle: '图片标题',\n copyImage: '复制图片到剪贴板',\n copyImageLink: '复制图片链接'\n },\n nodeNote: {\n title: '备注'\n },\n nodeTag: {\n title: '标签',\n addTip: '请按回车键添加'\n },\n richEditor: {\n nodeEditorTitle: '节点编辑',\n nodeNoteEditorTitle: '备注编辑'\n },\n outline: {\n title: '大纲',\n nodeDefaultText: '分支节点',\n print: '打印',\n fullscreen: '全屏'\n },\n scale: {\n zoomIn: '放大',\n zoomOut: '缩小'\n },\n shortcutKey: {\n title: '快捷键'\n },\n strusture: {\n title: '结构'\n },\n style: {\n title: '节点样式',\n normal: '常态',\n active: '选中状态',\n text: '文字',\n fontFamily: '字体',\n fontSize: '字号',\n color: '颜色',\n addFontWeight: '加粗',\n italic: '斜体',\n textDecoration: '划线',\n none: '无',\n underline: '下划线',\n lineThrough: '中划线',\n overline: '上划线',\n border: '边框',\n style: '样式',\n width: '宽度',\n borderRadius: '圆角',\n background: '背景',\n shape: '形状',\n line: '线条',\n nodePadding: '节点内边距',\n horizontal: '水平',\n vertical: '垂直',\n gradientStyle: '渐变',\n startColor: '起始',\n endColor: '结束',\n arrowDir: '箭头位置',\n arrowDirStart: '头部',\n arrowDirEnd: '尾部',\n direction: '方向',\n pleaseSelectNode: '请选择一个节点',\n selectNodeTip: '请选择一个节点',\n openLineFlow: '开启流动效果',\n lineFlowDuration: '一个流动周期的时间',\n forward: '正向',\n reverse: '反向',\n img: '图片',\n placement: '布局',\n top: '上',\n bottom: '下',\n left: '左',\n right: '右',\n tag: '标签'\n },\n theme: {\n title: '主题',\n classics: '经典',\n dark: '深色',\n simple: '朴素',\n myThemes: '我的主题',\n coverTip: '你当前自定义过基础样式,是否覆盖?',\n tip: '提示',\n cover: '覆盖',\n reserve: '保留',\n // 主题名称\n theme_default: '默认',\n theme_classic: '脑图经典',\n theme_blackHumour: '黑色幽默',\n theme_lateNightOffice: '深夜办公室',\n theme_blackGold: '黑金',\n theme_orangeJuice: '橙汁',\n theme_neonLamp: '霓虹灯',\n theme_darkNightLceBlade: '暗夜冰刃',\n theme_dark: '暗色',\n theme_dark2: '暗色2',\n theme_dark3: '暗色3',\n theme_dark4: '暗色4',\n theme_dark5: '暗色5',\n theme_dark6: '暗色6',\n theme_dark7: '暗色7',\n theme_skyGreen: '天清绿',\n theme_classicGreen: '经典绿',\n theme_classicBlue: '经典蓝',\n theme_blueSky: '天空蓝',\n theme_brainImpairedPink: '脑残粉',\n theme_earthYellow: '泥土黄',\n theme_freshGreen: '清新绿',\n theme_freshRed: '清新红',\n theme_romanticPurple: '浪漫紫',\n theme_pinkGrape: '粉红葡萄',\n theme_mint: '薄荷',\n theme_gold: '金色vip',\n theme_vitalityOrange: '活力橙',\n theme_greenLeaf: '绿叶',\n theme_minions: '小黄人',\n theme_simpleBlack: '简约黑',\n theme_courseGreen: '课程绿',\n theme_coffee: '咖啡',\n theme_redSpirit: '红色精神',\n theme_avocado: '牛油果',\n theme_autumn: '秋天',\n theme_oreo: '奥利奥',\n theme_shallowSea: '浅海',\n theme_lemonBubbles: '柠檬气泡',\n theme_rose: '玫瑰',\n theme_seaBlueLine: '海蓝线',\n theme_morandi: '莫兰迪',\n theme_cactus: '仙人掌',\n theme_classic2: '脑图经典2',\n theme_classic3: '脑图经典3',\n theme_classic4: '脑图经典4',\n theme_classic5: '脑图经典5',\n theme_classic6: '脑图经典6',\n theme_classic7: '脑图经典7',\n theme_classic8: '脑图经典8',\n theme_classic9: '脑图经典9',\n theme_classic10: '脑图经典10',\n theme_classic11: '脑图经典11',\n theme_classic12: '脑图经典12',\n theme_classic13: '脑图经典13',\n theme_classic14: '脑图经典14',\n theme_classic15: '脑图经典15'\n },\n toolbar: {\n undo: '回退',\n redo: '前进',\n insertSiblingNode: '同级节点',\n insertChildNode: '子节点',\n deleteNode: '删除节点',\n image: '图片',\n icon: '图标',\n link: '超链接',\n note: '备注',\n tag: '标签',\n summary: '概要',\n displayOutline: '显示大纲',\n baseStyle: '基础样式',\n theme: '主题',\n strusture: '结构',\n newFile: '新建',\n openFile: '打开',\n saveAs: '另存为',\n import: '导入',\n export: '导出',\n history: '历史记录',\n shortcutKey: '快捷键',\n associativeLine: '关联线',\n painter: '格式刷',\n formula: '公式',\n attachment: '附件',\n outerFrame: '外框',\n editNode: '编辑节点',\n more: '更多',\n selectFileTip: '请选择文件',\n notSupportTip: '你的浏览器不支持该功能,或者当前页面非https协议',\n tip: '提示',\n editingLocalFileTipFront: '当前正在编辑你本机的【',\n editingLocalFileTipEnd: '】文件',\n fileContentError: '文件内容有误',\n fileOpenFailed: '文件打开失败',\n defaultFileName: '思维导图',\n creatingTip: '正在创建文件',\n directory: '目录',\n newFileTip: '新建文件前请先导出当前编辑的文件,谨防内容丢失',\n openFileTip: '打开文件前请先导出当前编辑的文件,谨防内容丢失'\n },\n edit: {\n newFeatureNoticeTitle: '新特性提醒',\n newFeatureNoticeMessage: '本次更新支持了节点富文本编辑,但是存在一定缺陷,最主要的影响是导出为图片的时间和节点数量成正比,所以对导出需求比较依赖的话可以通过【基础样式】-【其他配置】-【是否开启节点富文本编辑】设置关掉富文本编辑模式。',\n root: '根节点',\n splitByWrap: '是否按换行自动分割节点?',\n tip: '提示',\n yes: '是',\n no: '否',\n exportError: '导出失败',\n dragTip: '在此释放以导入该文件',\n deleteNodeImgTip: '是否确认删除该节点图片?',\n autoOpenNodeRichTextTip: '检测到导入了富文本内容,已自动开启富文本模式'\n },\n mouseAction: {\n tip1: '当前:左键拖动画布,右键框选节点',\n tip2: '当前:左键框选节点,右键拖动画布'\n },\n search: {\n searchPlaceholder: '请输入查找内容',\n replacePlaceholder: '请输入替换内容',\n replace: '替换',\n replaceAll: '全部替换',\n cancel: '取消',\n noResult: '暂无结果'\n },\n nodeIconSidebar: {\n title: '图标/贴纸',\n icon: '图标',\n sticker: '贴纸'\n },\n formulaSidebar: {\n title: '公式',\n placeholder: '请输入 LaTeX 语法',\n confirm: '完成',\n common: '常用公式',\n tip: '非富文本模式下不支持插入公式'\n },\n richTextToolbar: {\n bold: '加粗',\n italic: '斜体',\n underline: '下划线',\n strike: '删除线',\n fontFamily: '字体',\n fontSize: '字号',\n color: '字体颜色',\n backgroundColor: '背景颜色',\n removeFormat: '清除样式',\n textAlign: '对齐方式'\n },\n other: {\n loading: '正在加载,请稍后...'\n },\n sourceCodeEdit: {\n sourceCodeTip: '富文本模式下不建议修改样式,因为需要同步修改数据及html结构。',\n format: '格式化',\n copy: '复制',\n confirm: '完成',\n close: '关闭',\n formatErrorTip: 'JSON格式有误,请检查后再试',\n copyTip: '已复制到剪贴板',\n formatTip: '格式化完成'\n },\n attachment: {\n deleteAttachment: '删除附件',\n tip: '附件功能仅在客户端可用'\n },\n annotation: {\n mark: '标记',\n show: '显示标记',\n type: '类型',\n color: '颜色',\n lineWidth: '线宽',\n padding: '内边距',\n animate: '开启动画'\n },\n nodeOuterFrame: {\n outerFrameSetting: '外框设置',\n deleteOuterFrame: '删除外框',\n boxStyle: '边框样式',\n boxColor: '边框颜色',\n fillColor: '填充颜色'\n },\n nodeTagStyle: {\n placeholder: '请输入标签内容',\n delete: '删除此标签'\n },\n openSiyuanFloat: {\n open: '打开文档',\n openLeft: '打开左侧',\n openRight: '在页签右侧打开',\n openBottom: '在页签底部打开'\n },\n kmindDefaultText: {\n defaultInsertSecondLevelNodeText: '二级节点',\n defaultInsertBelowSecondLevelNodeText: '分支主题',\n defaultGeneralizationText: '概要',\n defaultAssociativeLineText: '关联线'\n },\n moc: {\n operationNotSupported: 'MOC 模式暂不支持该操作',\n insertParentNotSupported: 'MOC 模式暂不支持:插入父节点',\n insertMultiNotSupported: 'MOC 模式暂不支持:插入多个同级节点',\n pasteNotSupported: 'MOC 模式暂不支持:粘贴节点(节点树)',\n undoNotSupported: 'MOC 模式暂不支持:撤销(Ctrl+Z',\n redoNotSupported: 'MOC 模式暂不支持:前进(Ctrl+Y',\n refreshMocData: '刷新 MOC 导图数据',\n cannotGetDocId: '无法获取当前文档 ID',\n refreshing: '正在刷新 MOC 导图数据...',\n refreshSuccess: '刷新完成',\n refreshFailedNoData: '刷新失败:未获取到有效数据',\n refreshFailed: '刷新失败',\n // 删除节点相关\n deleteNodeConfirmSingle: '删除节点将同时删除对应的思源文档,是否继续?',\n deleteNodeConfirmMultiple: '删除 {count} 个节点将同时删除对应的思源文档,是否继续?',\n deleteConfirmTitle: '警告',\n confirmButton: '确定',\n cancelButton: '取消',\n deleteSuccess: '已删除 {count} 个文档',\n deletePartialFailed: '删除失败: {failed}/{total} 个文档删除失败',\n deleteFailed: '删除节点失败',\n noNodesToDelete: '没有要删除的节点',\n noDocIdToDelete: '节点没有关联的文档 ID',\n // 创建节点相关\n createDocFailed: '创建文档失败',\n createNodeFailed: '创建节点失败',\n // 更新节点相关\n renameDocFailed: '重命名文档失败',\n titleCannotBeEmpty: '标题不能为空',\n // 移动节点相关\n moveDocFailed: '移动文档失败',\n moveNodeFailed: '移动节点失败',\n moveSuccess: '已移动 {count} 个文档',\n noNodesToMove: '没有待移动的节点',\n noTargetNode: '没有目标节点',\n targetNodeNoDocId: '目标节点没有关联的文档 ID',\n nodeNoDocId: '待移动节点没有关联的文档 ID'\n }\n});\n\n//# sourceURL=webpack:///./src/lang/zh_cn.js?");
/***/ }),
/***/ "./src/lang/zh_tw.js":
/*!***************************!*\
!*** ./src/lang/zh_tw.js ***!
\***************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n kmind: {\n jumpToEditSourceDoc: '跳轉編輯源文檔',\n kmindInitLoadingText: '如果超過5秒還沒有加載完成,說明KMindApp加載失敗了,請重新開關一下該頁面即可'\n },\n kmindFloatToolbar: {\n editNode: '編輯節點',\n deleteNode: '刪除節點',\n addNote: '添加備註',\n addLink: '添加鏈接',\n addTag: '添加標籤',\n addImage: '添加圖片',\n addIcon: '添加圖標',\n addAssociativeLine: '添加關聯線',\n addSummary: '添加概要',\n addFormula: '添加公式',\n addOuterFrame: '添加外框',\n undo: '撤銷',\n redo: '重做',\n formatPainter: '格式刷',\n dragToAddNode: '按住拖動添加節點'\n },\n baseStyle: {\n title: '基本樣式',\n background: '背景',\n color: '顏色',\n image: '圖片',\n imageRepeat: '圖片重複',\n imagePosition: '圖片位置',\n imageSize: '圖片大小',\n line: '連線',\n width: '寬度',\n style: '樣式',\n lineRadius: '圓角半徑',\n lineOfOutline: '概要連線',\n showArrow: '顯示箭頭',\n nodePadding: '節點內距',\n nodeMargin: '節點外距',\n horizontal: '水平',\n vertical: '垂直',\n maximumWidth: '最大寬度',\n maximumHeight: '最大高度',\n icon: '圖示',\n size: '大小',\n level2Node: '第二層節點',\n belowLevel2Node: '第三層及以下節點',\n nodeBorderType: '節點邊框樣式',\n nodeUseLineStyle: '僅使用底邊框樣式',\n otherConfig: '其他設定',\n associativeLine: '關聯線',\n associativeLineWidth: '寬度',\n associativeLineColor: '顏色',\n associativeLineActiveWidth: '啟用時寬度',\n associativeLineActiveColor: '啟用時顏色',\n rootStyle: '根節點',\n associativeLineText: '關聯線文字',\n fontFamily: '字型',\n fontSize: '字型大小',\n rootLineStartPos: '根節點連線起始位置',\n center: '中心',\n edge: '邊緣',\n rainbowLines: '彩虹線條',\n notUseRainbowLines: '不使用彩虹線條',\n outerFramePadding: '外框內距',\n tagPositionRight: '文本右側',\n tagPositionBottom: '文本下面'\n },\n setting: {\n title: '設置',\n openPerformance: '啟用效能模式',\n enableFreeDrag: '啟用節點自由拖曳 (Beta)',\n isEnableNodeRichText: '啟用節點豐富文字編輯',\n mousewheelAction: '滑鼠滾輪行為',\n zoomView: '縮放檢視',\n moveViewUpDown: '上下移動檢視',\n mousewheelZoomActionReverse: '滑鼠滾輪縮放',\n mousewheelZoomActionReverse1: '向前縮小,向後放大',\n mousewheelZoomActionReverse2: '向前放大,向後縮小',\n createNewNodeBehavior: '建立新節點行為',\n default: '啟用新節點並進入編輯',\n notActive: '不啟用新節點',\n activeOnly: '僅啟用新節點,不進入編輯',\n openRealtimeRenderOnNodeTextEdit: '開啟文本編輯實時渲染效果',\n isShowScrollbar: '顯示捲軸',\n isUseHandDrawnLikeStyle: '使用手繪風格',\n isUseMomentum: '是否開啓拖動畫布的動量效果',\n watermark: '浮水印',\n showWatermark: '顯示浮水印',\n onlyExport: '僅在匯出時顯示',\n watermarkDefaultText: '浮水印文字',\n watermarkText: '浮水印文字',\n watermarkTextColor: '文字顏色',\n watermarkLineSpacing: '行距',\n watermarkTextSpacing: '文字間距',\n watermarkAngle: '旋轉角度',\n watermarkTextOpacity: '文字透明度',\n watermarkTextFontSize: '字型大小',\n belowNode: '顯示在節點下方',\n confirm: '確定',\n cancel: '取消',\n changeRichTextTip: '該操作會清空所有曆史修改記錄,並且修改思維導圖數據,是否繼續?',\n changeRichTextTip2: '是否切換爲富文本模式?',\n changeRichTextTip3: '是否切換爲非富文本模式?',\n enableDragImport: '是否允許直接拖拽文件到頁面進行導入',\n imgTextMargin: '節點圖片和文本間隔',\n textContentMargin: '節點各種內容間隔',\n enableAutoEnterTextEditWhenKeydown: '鍵盤輸入時自動進入文本編輯',\n enableInheritAncestorLineStyle: '節點連線樣式繼承祖先節點的樣式',\n alwaysShowExpandBtn: '是否壹直顯示展開收起按鈕'\n },\n color: {\n moreColor: '更多顏色'\n },\n contextmenu: {\n insertSiblingNode: '插入同層節點',\n insertChildNode: '插入子節點',\n insertParentNode: '插入父節點',\n insertSummary: '插入概要',\n addSiyuanPage: '節點子文檔',\n moveUpNode: '上移節點',\n moveDownNode: '下移節點',\n deleteNode: '刪除節點',\n deleteCurrentNode: '僅刪除目前節點',\n copyNode: '複製節點',\n copyNodeHyperlink: '複製節點超連結',\n copyNodeHyperlinkDesc: '取得定位連結',\n cutNode: '剪下節點',\n pasteNode: '貼上節點',\n backCenter: '回到根節點',\n expandAll: '展開全部',\n unExpandAll: '收合全部',\n expandTo: '展開至',\n arrangeLayout: '一鍵整理版面',\n level1: '第一層主題',\n level2: '第二層主題',\n level3: '第三層主題',\n level4: '第四層主題',\n level5: '第五層主題',\n level6: '第六層主題',\n zenMode: '禪模式',\n fitCanvas: '適應畫布',\n removeImage: '移除圖片',\n removeHyperlink: '移除超連結',\n removeSiyuanHyperlink: '移除思源子文檔關聯',\n removeSiyuanPDFHyperlink: '移除思源PDF關聯',\n removeNote: '移除備註',\n removeCustomStyles: '一鍵移除自訂樣式',\n removeAllNodeCustomStyles: '一鍵移除所有節點自訂樣式',\n copyKmindNodeHyperlink: '複製節點超連結',\n exportNodeToPng: '匯出此節點為圖片',\n kmindCopyNodeToPng: '複製此節點為圖片',\n copyNodeMirrorBlock: '複製節點鏡像塊',\n kmindCopySuccessAnywhere: '複製成功,請在思源中的任意位置直接粘貼即可',\n copyToClipboard: '複製到剪貼簿',\n copyToSmm: 'SMM',\n copyToJson: 'JSON',\n copyToMarkdown: 'Markdown',\n copyToTxt: 'Txt',\n copyToPng: '圖片',\n copySuccess: '複製成功',\n copyFail: '複製失敗',\n number: '將其子節點編號',\n expandNodeChild: '展開所有下級節點',\n unExpandNodeChild: '收起所有下級節點',\n addToDo: '添加待辦',\n removeToDo: '刪除待辦'\n },\n count: {\n words: '字數',\n nodes: '節點數'\n },\n dialog: {\n cancel: '取消',\n confirm: '確定'\n },\n export: {\n title: '匯出',\n filename: '檔案名稱',\n include: '包含主題、結構等設定資料',\n dedicatedFile: '專用檔案',\n jsonFile: 'JSON 檔案',\n imageFile: '圖片檔案',\n svgFile: 'SVG 檔案',\n pdfFile: 'PDF 檔案',\n markdownFile: 'Markdown 檔案',\n isTransparent: '背景透明',\n transformingDomToImages: '正在轉換節點:',\n notifyTitle: '訊息',\n notifyMessage: '如果沒有觸發下載,請檢查是否被瀏覽器封鎖',\n paddingX: '水平內距',\n paddingY: '垂直內距',\n useMultiPageExport: '多頁匯出',\n defaultFileName: '心智圖',\n addFooterText: '在底部新增文字',\n addFooterTextPlaceholder: '例如:來自 simple-mind-map',\n desc: '說明',\n options: '選項'\n },\n fullscreen: {\n fullscreenShow: '全螢幕檢視',\n fullscreenEdit: '全螢幕編輯'\n },\n demonstrate: {\n demonstrate: '進入展示模式'\n },\n import: {\n title: '匯入',\n selectFile: '選擇檔案',\n support: '支援',\n file: '檔案',\n pleaseSelect: '請選擇',\n maxFileNum: '最多只能選擇一個檔案',\n notSelectTip: '請選擇要匯入的檔案',\n fileContentError: '檔案內容有誤',\n importSuccess: '匯入成功',\n fileParsingFailed: '檔案解析失敗',\n xmindCanvasSelectDialogTitle: '選擇要匯入的畫布'\n },\n kmindHistory: {\n title: '歷史記錄',\n createHistoryVersion: '創建一個歷史版本',\n refreshHistoryList: '刷新',\n autoSave: '自動保存',\n preview: '預覽',\n delete: '刪除',\n apply: '應用',\n pin: '標記'\n },\n navigatorToolbar: {\n openMiniMap: '開啟小地圖',\n closeMiniMap: '關閉小地圖',\n readonly: '切換為唯讀模式',\n edit: '切換為編輯模式',\n backToRoot: '回到根節點',\n toggleZenMode: '切換為禪模式',\n changeSourceCodeEdit: '切換為原始碼編輯模式'\n },\n nodeHyperlink: {\n title: '超連結',\n link: '連結',\n name: '名稱'\n },\n nodeIcon: {\n title: '圖示'\n },\n nodeImage: {\n title: '圖片',\n imgTitle: '圖片標題',\n copyImage: '複製圖片到剪貼簿',\n copyImageLink: '複製圖片連結'\n },\n nodeNote: {\n title: '備註'\n },\n nodeTag: {\n title: '標籤',\n addTip: '請按 Enter 鍵新增'\n },\n outline: {\n title: '大綱',\n nodeDefaultText: '分支節點',\n print: '打印',\n fullscreen: '全屏'\n },\n scale: {\n zoomIn: '放大',\n zoomOut: '縮小'\n },\n shortcutKey: {\n title: '快速鍵'\n },\n strusture: {\n title: '結構'\n },\n style: {\n title: '節點樣式',\n normal: '常態',\n active: '選取狀態',\n text: '文字',\n fontFamily: '字型',\n fontSize: '字型大小',\n color: '顏色',\n addFontWeight: '粗體',\n italic: '斜體',\n textDecoration: '文字裝飾',\n none: '無',\n underline: '底線',\n lineThrough: '刪除線',\n overline: '上劃線',\n border: '邊框',\n style: '樣式',\n width: '寬度',\n borderRadius: '圓角',\n background: '背景',\n shape: '形狀',\n line: '線條',\n nodePadding: '節點內距',\n horizontal: '水平',\n vertical: '垂直',\n gradientStyle: '漸層',\n startColor: '起始',\n endColor: '結束',\n arrowDir: '箭頭位置',\n arrowDirStart: '頭部',\n arrowDirEnd: '尾部',\n direction: '方向',\n pleaseSelectNode: '請選擇一個節點',\n selectNodeTip: '請選擇壹個節點',\n openLineFlow: '開啓流動效果',\n lineFlowDuration: '一個流動周期的時間',\n forward: '正向',\n reverse: '反向',\n img: '圖片',\n placement: '布局',\n top: '上',\n bottom: '下',\n left: '左',\n right: '右',\n tag: '標簽'\n },\n theme: {\n title: '主題',\n classics: '經典',\n dark: '深色',\n simple: '簡約',\n coverTip: '您目前已自訂過基本樣式,是否要覆蓋?',\n tip: '提示',\n cover: '覆蓋',\n reserve: '保留'\n },\n toolbar: {\n undo: '復原',\n redo: '重做',\n insertSiblingNode: '同層節點',\n insertChildNode: '子節點',\n deleteNode: '刪除節點',\n image: '圖片',\n icon: '圖示',\n link: '超連結',\n note: '備註',\n tag: '標籤',\n summary: '摘要',\n displayOutline: '顯示大綱',\n baseStyle: '基本樣式',\n theme: '主題',\n strusture: '結構',\n newFile: '新增檔案',\n openFile: '開啟檔案',\n saveAs: '另存新檔',\n import: '匯入',\n export: '匯出',\n history: '歷史記錄',\n shortcutKey: '快速鍵',\n associativeLine: '關聯線',\n painter: '格式刷',\n formula: '公式',\n attachment: '附件',\n outerFrame: '外框',\n more: '更多',\n selectFileTip: '請選擇檔案',\n notSupportTip: '您的瀏覽器不支援此功能,或者目前頁面非 HTTPS 協定',\n tip: '提示',\n editingLocalFileTipFront: '目前正在編輯您電腦上的【',\n editingLocalFileTipEnd: '】檔案',\n fileContentError: '檔案內容有誤',\n fileOpenFailed: '檔案開啟失敗',\n defaultFileName: '心智圖',\n creatingTip: '正在建立檔案',\n directory: '目錄',\n newFileTip: '新增檔案前,請先匯出目前編輯的檔案,以免內容遺失',\n openFileTip: '開啟檔案前,請先匯出目前編輯的檔案,以免內容遺失'\n },\n edit: {\n newFeatureNoticeTitle: '新功能提醒',\n newFeatureNoticeMessage: '本次更新支援了節點豐富文字編輯,但存在一些缺陷,最主要的影響是匯出為圖片的時間與節點數量成正比,所以如果比較依賴匯出功能,可以透過【基本樣式】-【其他設定】-【是否啟用節點豐富文字編輯】設定關閉豐富文字編輯模式。',\n root: '根節點',\n splitByWrap: '是否根據換行自動分割節點?',\n tip: '提示',\n yes: '是',\n no: '否',\n exportError: '匯出失敗',\n dragTip: '在此釋放以匯入檔案',\n autoOpenNodeRichTextTip: '檢測到導入了富文本內容,已自動開啓富文本模式'\n },\n mouseAction: {\n tip1: '目前:左鍵拖曳畫布,右鍵框選節點',\n tip2: '目前:左鍵框選節點,右鍵拖曳畫布'\n },\n search: {\n searchPlaceholder: '請輸入搜尋內容',\n replacePlaceholder: '請輸入取代內容',\n replace: '取代',\n replaceAll: '全部取代',\n cancel: '取消',\n noResult: '查無結果'\n },\n nodeIconSidebar: {\n title: '圖示/貼圖',\n icon: '圖示',\n sticker: '貼圖'\n },\n formulaSidebar: {\n title: '公式',\n placeholder: '請輸入 LaTeX 語法',\n confirm: '完成',\n common: '常用公式',\n tip: '僅在豐富文字模式下支援插入公式'\n },\n richTextToolbar: {\n bold: '粗體',\n italic: '斜體',\n underline: '底線',\n strike: '刪除線',\n fontFamily: '字型',\n fontSize: '字型大小',\n color: '字型顏色',\n backgroundColor: '背景顏色',\n removeFormat: '清除樣式',\n textAlign: '對齊方式'\n },\n other: {\n loading: '載入中,請稍候...'\n },\n sourceCodeEdit: {\n sourceCodeTip: '不建議在豐富文字模式下修改樣式,因為需要同步修改資料和 HTML 結構。',\n format: '格式化',\n copy: '複製',\n confirm: '完成',\n close: '關閉',\n formatErrorTip: 'JSON 格式錯誤,請檢查後重試',\n copyTip: '已複製到剪貼簿',\n formatTip: '格式化完成'\n },\n attachment: {\n deleteAttachment: '刪除附件',\n tip: '附件功能僅在用戶端可用'\n },\n annotation: {\n mark: '標記',\n show: '顯示標記',\n type: '類型',\n color: '顏色',\n lineWidth: '線寬',\n padding: '內距',\n animate: '動畫'\n },\n nodeOuterFrame: {\n outerFrameSetting: '外框設定',\n deleteOuterFrame: '刪除外框',\n boxStyle: '邊框樣式',\n boxColor: '邊框顏色',\n fillColor: '填充顏色'\n },\n nodeTagStyle: {\n placeholder: '請輸入標籤內容',\n delete: '刪除此標籤'\n },\n openSiyuanFloat: {\n open: '打開文檔',\n openLeft: '打開左側',\n openRight: '在頁籤右側打開',\n openBottom: '在頁籤底部打開'\n },\n kmindDefaultText: {\n defaultInsertSecondLevelNodeText: '二級節點',\n defaultInsertBelowSecondLevelNodeText: '分支主題',\n defaultGeneralizationText: '概要',\n defaultAssociativeLineText: '關聯線'\n }\n});\n\n//# sourceURL=webpack:///./src/lang/zh_tw.js?");
/***/ }),
/***/ "./src/main.js":
/*!*********************!*\
!*** ./src/main.js ***!
\*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var _App_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./App.vue */ \"./src/App.vue\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./router */ \"./src/router.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./store */ \"./src/store.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! element-ui */ \"./node_modules/element-ui/lib/element-ui.common.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var element_ui_lib_theme_chalk_index_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! element-ui/lib/theme-chalk/index.css */ \"./node_modules/element-ui/lib/theme-chalk/index.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_index_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_index_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _assets_icon_font_iconfont_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/assets/icon-font/iconfont.css */ \"./src/assets/icon-font/iconfont.css\");\n/* harmony import */ var _assets_icon_font_iconfont_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_assets_icon_font_iconfont_css__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! viewerjs/dist/viewer.css */ \"./node_modules/viewerjs/dist/viewer.css\");\n/* harmony import */ var viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var v_viewer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! v-viewer */ \"./node_modules/v-viewer/dist/index.es.js\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./i18n */ \"./src/i18n.js\");\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/api */ \"./src/api/index.js\");\n/* harmony import */ var _utils_logger_vue_plugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/utils/logger/vue-plugin */ \"./src/utils/logger/vue-plugin.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n// import VConsole from 'vconsole'\n// const vConsole = new VConsole()\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].config.productionTip = false;\nconst bus = new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.$bus = bus;\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(element_ui__WEBPACK_IMPORTED_MODULE_4___default.a);\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(v_viewer__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(_utils_logger_vue_plugin__WEBPACK_IMPORTED_MODULE_11__[\"VueLoggerPlugin\"]);\nconst initApp = () => {\n _i18n__WEBPACK_IMPORTED_MODULE_9__[\"default\"].locale = Object(_api__WEBPACK_IMPORTED_MODULE_10__[\"getLang\"])();\n new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n render: h => h(_App_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n router: _router__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n store: _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n i18n: _i18n__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n }).$mount('#app');\n};\n\n// 是否处于接管应用模式\nif (window.takeOverApp) {\n window.initApp = initApp;\n window.$bus = bus;\n} else {\n initApp();\n}\n\n//# sourceURL=webpack:///./src/main.js?");
/***/ }),
/***/ "./src/router.js":
/*!***********************!*\
!*** ./src/router.js ***!
\***********************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vue_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-router */ \"./node_modules/vue-router/dist/vue-router.esm.js\");\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_router__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nconst routes = [{\n path: '/',\n name: 'Edit',\n component: () => Promise.all(/*! import() */[__webpack_require__.e(0), __webpack_require__.e(1)]).then(__webpack_require__.bind(null, /*! ./pages/Edit/Index.vue */ \"./src/pages/Edit/Index.vue\"))\n}, {\n path: '/index',\n redirect: '/'\n}, {\n path: '/doc/zh',\n component: () => __webpack_require__.e(/*! import() */ 3).then(__webpack_require__.bind(null, /*! ./pages/Doc.vue */ \"./src/pages/Doc.vue\"))\n}, {\n path: '/test',\n name: 'Test',\n component: () => Promise.all(/*! import() */[__webpack_require__.e(0), __webpack_require__.e(2)]).then(__webpack_require__.bind(null, /*! ./pages/test.vue */ \"./src/pages/test.vue\"))\n}];\nconst router = new vue_router__WEBPACK_IMPORTED_MODULE_1__[\"default\"]({\n routes\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (router);\n\n//# sourceURL=webpack:///./src/router.js?");
/***/ }),
/***/ "./src/store.js":
/*!**********************!*\
!*** ./src/store.js ***!
\**********************/
/*! exports provided: createStore, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _storeFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./storeFactory */ \"./src/storeFactory.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return _storeFactory__WEBPACK_IMPORTED_MODULE_0__[\"createStore\"]; });\n\n/* harmony import */ var _utils_storeManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/storeManager */ \"./src/utils/storeManager.ts\");\n\n\n\n// Create a default store instance for non-plugin mode\nconst store = Object(_storeFactory__WEBPACK_IMPORTED_MODULE_0__[\"createStore\"])();\n\n// Set as default store in StoreManager\n_utils_storeManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setDefault(store);\n\n// Also export the factory function for plugin mode\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (store);\n\n//# sourceURL=webpack:///./src/store.js?");
/***/ }),
/***/ "./src/storeFactory.js":
/*!*****************************!*\
!*** ./src/storeFactory.js ***!
\*****************************/
/*! exports provided: createStore */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return createStore; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var simple_mind_map_example_exampleData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! simple-mind-map/example/exampleData */ \"../simple-mind-map/example/exampleData.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n// Create a factory function that returns a new store instance\nfunction createStore() {\n return new vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Store({\n state: {\n mindMapData: null,\n // 思维导图数据\n // fixme: 天坑:mindMapDataJson\"{}\" 的时候,导致插件版本的思维导图数据丢失,因为setLocalConfig方法里调用的\n // store.getters.mindMapFullDataWithConfig不报错了,但是返回的是空对象,导致插件数据丢失(不知道为啥挂件的数据不会丢失)\n // 这里改为默认值 \"{}\"不丢失的原因是,我在初始化不使用setLocalConfig来更改黑暗模式,直接state.localConfig.isDark = true来更改,没有走setLocalConfig的逻辑\n mindMapDataJson: '{}',\n // data_change的时候,通过 mindMap.getData(true) 获取的数据JSON.stringify之后的数据,包含字段:layout,root,theme,view\n isHandleLocalFile: false,\n // 是否操作的是本地文件\n // 目前彩虹线条配置和外边框配置放在config中\n config: {\n rainbowLinesConfig: {\n open: false,\n colorsList: []\n }\n },\n localConfig: {\n // 本地配置\n isZenMode: false,\n // 是否是禅模式\n // 是否开启节点富文本\n openNodeRichText: true,\n // 鼠标行为\n useLeftKeySelectionRightKeyDrag: false,\n // 是否显示滚动条\n isShowScrollbar: false,\n // 是否开启手绘风格\n isUseHandDrawnLikeStyle: false,\n // 是否开启动量效果\n isUseMomentum: true,\n // 是否是暗黑模式\n isDark: false\n },\n injectConfig: {\n type: '',\n name: ''\n },\n // 思源外部注入的配置\n kmind: {\n /**保存格式*/\n saveType: '',\n filePath: '',\n version: '',\n /**localConfig:兼容老配置,不再使用,只从旧版本的数据中读取并展开到外部,保存的时候删除*/\n localConfig: {\n isZenMode: false,\n /**此项无需保存到文件中*/\n isFullScreen: false,\n miniMapVisible: false,\n readonlyMode: false\n },\n isZenMode: false,\n /**此项无需保存到文件中*/\n isFullScreen: false,\n miniMapVisible: false,\n readonlyMode: false,\n isDark: false,\n lang: 'zh',\n config: {\n rainbowLinesConfig: {\n open: false,\n colorsList: []\n }\n }\n },\n activeSidebar: '',\n // 当前显示的侧边栏\n isOutlineEdit: false,\n // 是否是大纲编辑模式\n isReadonly: false,\n // 是否只读\n isSourceCodeEdit: false,\n // 是否是源码编辑模式\n extraTextOnExport: '',\n // 导出时底部添加的文字\n supportHandDrawnLikeStyle: false,\n // 是否支持设置手绘风格\n supportMark: false,\n // 是否支持标记\n supportNumbers: false,\n // 是否支持编号\n supportFreemind: false,\n // 是否支持Freemind插件\n supportExcel: false,\n // 是否支持Excel插件\n supportCheckbox: false,\n // 是否支持Checkbox插件\n supportLineFlow: false,\n // 是否支持LineFlow插件\n supportMomentum: false,\n // 是否支持Momentum插件\n isDragOutlineTreeNode: false // 当前是否正在拖拽大纲树的节点\n },\n mutations: {\n mergeMindMapDataJson(state, data) {\n const mergeData = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(JSON.parse(state.mindMapDataJson), data);\n // console.log(mergeData)\n state.mindMapDataJson = JSON.stringify(mergeData);\n },\n setMindMapDataJson(state, data) {\n state.mindMapDataJson = data;\n },\n // 设置思维导图数据\n setMindMapData(state, data) {\n state.mindMapData = data;\n },\n // 设置操作本地文件标志位\n setIsHandleLocalFile(state, data) {\n state.isHandleLocalFile = data;\n },\n setConfig(state, data) {\n state.config = {\n ...state.config,\n ...data\n };\n },\n // 设置kmind配置\n setKmindConfig(state, {\n kmindConfig,\n smmConfig,\n localConfig\n }) {\n /**\n * 重构计划:\n * 1. 将smmConfig存到state.config,特指该张导图样式相关的config,目前有彩虹线条,外边框相关样式\n * 2. 将localConfig存到state.localConfig,由于历史设计问题,指非彩虹线条,外边框相关的样式,包含isZenModeisDark等\n * 3. 去掉kmind字段,记得并没有实际用上kmind字段,核实一下\n * 4. 要修改所有加载,保存config的逻辑\n */\n if (kmindConfig && Object.keys(kmindConfig).length) {\n // 将kmind下面的localConfig赋值state中的localConfig\n state.localConfig = {\n ...state.localConfig,\n ...kmindConfig.localConfig\n };\n\n // 将kmind特定的节点数据赋值给state\n state.isReadonly = kmindConfig.readonlyMode;\n }\n if (smmConfig && Object.keys(smmConfig).length) {\n // 将导图中的config对应到state.kmind.config上\n console.log('smmConfig.config', smmConfig);\n state.kmind.config = smmConfig;\n }\n if (localConfig && Object.keys(localConfig).length) {\n state.localConfig = {\n ...state.localConfig,\n ...localConfig\n };\n }\n // console.log('setKmindConfig,state', state)\n // console.log('setKmindConfig,{ kmindConfig, smmConfig }', {\n // kmindConfig,\n // smmConfig\n // })\n },\n // 设置本地配置\n setLocalConfig(state, data) {\n state.localConfig = {\n ...state.localConfig,\n ...data\n };\n // 保存配置到storage\n // storeLocalConfig(state.localConfig, state.injectConfig)\n },\n // 设置当前显示的侧边栏\n setActiveSidebar(state, data) {\n state.activeSidebar = data;\n },\n // 设置大纲编辑模式\n setIsOutlineEdit(state, data) {\n state.isOutlineEdit = data;\n },\n // 设置是否只读\n setIsReadonly(state, data) {\n state.isReadonly = data;\n },\n // 设置源码编辑模式\n setIsSourceCodeEdit(state, data) {\n state.isSourceCodeEdit = data;\n },\n // 设置导出时底部添加的文字\n setExtraTextOnExport(state, data) {\n state.extraTextOnExport = data;\n },\n // 设置是否支持手绘风格\n setSupportHandDrawnLikeStyle(state, data) {\n state.supportHandDrawnLikeStyle = data;\n },\n // 设置是否支持标记\n setSupportMark(state, data) {\n state.supportMark = data;\n },\n // 设置外部注入的配置\n setInjectConfig(state, data) {\n state.injectConfig = data;\n },\n // 设置是否支持编号\n setSupportNumbers(state, data) {\n state.supportNumbers = data;\n },\n // 设置是否支持Freemind插件\n setSupportFreemind(state, data) {\n state.supportFreemind = data;\n },\n // 设置是否支持Excel插件\n setSupportExcel(state, data) {\n state.supportExcel = data;\n },\n // 设置是否支持Checkbox插件\n setSupportCheckbox(state, data) {\n state.supportCheckbox = data;\n },\n // 设置是否支持Lineflow插件\n setSupportLineFlow(state, data) {\n state.supportLineFlow = data;\n },\n // 设置是否支持Momentum插件\n setSupportMomentum(state, data) {\n state.supportMomentum = data;\n },\n // 设置树节点拖拽\n setIsDragOutlineTreeNode(state, data) {\n state.isDragOutlineTreeNode = data;\n }\n },\n actions: {\n // 设置外部注入的配置\n setInjectConfig(ctx, data) {\n ctx.state.injectConfig = data;\n },\n // 设置初始思维导图数据\n getUserMindMapData(ctx) {\n try {\n let {\n data\n } = {\n data: {\n data: {\n mindMapData: simple_mind_map_example_exampleData__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n }\n }\n };\n ctx.commit('setMindMapData', data.data);\n } catch (error) {\n console.log(error);\n }\n }\n },\n getters: {\n /**导图数据+kmind配置*/\n mindMapFullDataWithConfig(state) {\n // region 升级到v2kmind配置文件,即展开kmind.localConfig到外部\n // 然后删除kmind.localConfig节点\n // const kmindConfig = cloneDeep(state.kmind)\n // delete kmindConfig.localConfig\n // 为了兼容现有的各个地方散落的state.localConfig,这里手动维护要保存的状态到kmind字段下\n // kmindConfig.isDark = state.localConfig.isDark\n // kmindConfig.isZenMode = state.localConfig.isZenMode\n // const kmindV2Config = kmindConfig\n // endregion\n // console.log('mindMapFullDataWithConfig--state.mindMapDataJson:', state.mindMapDataJson)\n // console.log('state.mindMapDataJson:', JSON.parse(state.mindMapDataJson))\n const _data = {\n ...JSON.parse(state.mindMapDataJson),\n // kmind: kmindV2Config,\n // kmind: kmindConfig,\n config: {\n ...state.config\n },\n localConfig: {\n ...state.localConfig\n }\n };\n // console.log('mindMapFullDataWithConfig--_data:', _data)\n return _data;\n }\n }\n });\n}\n\n//# sourceURL=webpack:///./src/storeFactory.js?");
/***/ }),
/***/ "./src/utils/logger/logger.ts":
/*!************************************!*\
!*** ./src/utils/logger/logger.ts ***!
\************************************/
/*! exports provided: KmindLogger */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KmindLogger\", function() { return KmindLogger; });\n/* harmony import */ var _var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ \"./src/utils/logger/types.ts\");\n\n\n\n/**\n * KMind 日志系统核心实现\n */\n\n\n\n/**\n * KMind 日志管理器\n * 单例模式,支持多环境使用\n */\nclass KmindLogger {\n /**\n * 获取日志管理器实例\n */\n static getInstance() {\n if (!this.instance) {\n this.instance = new KmindLogger();\n }\n return this.instance;\n }\n\n /**\n * 销毁实例(用于测试或清理)\n */\n static destroy() {\n if (this.instance) {\n this.instance.destroy();\n this.instance = null;\n }\n }\n constructor() {\n Object(_var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, \"logs\", []);\n Object(_var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, \"CONFIG_KEY\", 'kmind-logger-config');\n Object(_var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, \"LOGS_KEY\", 'kmind-logger-logs');\n Object(_var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, \"storageListener\", null);\n this.config = this.loadConfig();\n this.logs = this.loadLogs();\n this.setupStorageListener();\n }\n\n /**\n * 清理资源\n */\n destroy() {\n if (this.storageListener) {\n window.removeEventListener('storage', this.storageListener);\n this.storageListener = null;\n }\n }\n\n /**\n * 安全的 JSON 序列化,处理循环引用\n */\n safeStringify(obj) {\n const seen = new WeakSet();\n return JSON.stringify(obj, (key, value) => {\n // 忽略函数和 undefined\n if (typeof value === 'function' || value === undefined) {\n return undefined;\n }\n\n // 处理循环引用\n if (typeof value === 'object' && value !== null) {\n // 跳过已经序列化过的对象\n if (seen.has(value)) {\n return '[Circular Reference]';\n }\n seen.add(value);\n\n // 特殊处理:跳过 MindMapNode 的某些属性以避免循环\n if (value.constructor && value.constructor.name === 'MindMapNode') {\n return '[MindMapNode]';\n }\n\n // 跳过 _node 属性(导图节点引用)\n if (key === '_node') {\n return '[Node Reference]';\n }\n }\n return value;\n });\n }\n\n /**\n * 加载配置\n */\n loadConfig() {\n if (typeof localStorage === 'undefined') {\n return {\n ..._types__WEBPACK_IMPORTED_MODULE_3__[\"DEFAULT_CONFIG\"]\n };\n }\n try {\n const stored = localStorage.getItem(this.CONFIG_KEY);\n if (stored) {\n return {\n ..._types__WEBPACK_IMPORTED_MODULE_3__[\"DEFAULT_CONFIG\"],\n ...JSON.parse(stored)\n };\n }\n } catch (e) {\n console.warn('Failed to load logger config:', e);\n }\n return {\n ..._types__WEBPACK_IMPORTED_MODULE_3__[\"DEFAULT_CONFIG\"]\n };\n }\n\n /**\n * 加载历史日志\n */\n loadLogs() {\n if (!this.config.persist || typeof localStorage === 'undefined') {\n return [];\n }\n try {\n const stored = localStorage.getItem(this.LOGS_KEY);\n if (stored) {\n return JSON.parse(stored);\n }\n } catch (e) {\n console.warn('Failed to load logger logs:', e);\n }\n return [];\n }\n\n /**\n * 设置存储监听器\n */\n setupStorageListener() {\n if (typeof window === 'undefined' || typeof localStorage === 'undefined') {\n return;\n }\n this.storageListener = e => {\n if (e.key === this.CONFIG_KEY && e.newValue) {\n try {\n const newConfig = JSON.parse(e.newValue);\n this.config = {\n ..._types__WEBPACK_IMPORTED_MODULE_3__[\"DEFAULT_CONFIG\"],\n ...newConfig\n };\n } catch (err) {\n console.warn('Failed to parse logger config from storage:', err);\n }\n }\n };\n window.addEventListener('storage', this.storageListener);\n }\n\n /**\n * 检测是否在 Electron 环境中\n */\n isElectron() {\n return !!(typeof window !== 'undefined' && window.process && window.process.type);\n }\n\n /**\n * 检测日志来源\n */\n detectSource() {\n // 检查是否在 iframe 中\n if (typeof window !== 'undefined' && window.parent !== window) {\n return 'iframe-app';\n }\n\n // 检查是否有插件 API\n if (typeof globalThis !== 'undefined' && globalThis.kmindApi) {\n // 进一步检查是否是插件本身的代码\n const stack = new Error().stack || '';\n if (stack.includes('siyuan-plugin-src')) {\n return 'plugin';\n }\n // 否则是 DOM 模式的应用\n return 'dom-app';\n }\n\n // 独立 Web 应用\n return 'web-app';\n }\n\n /**\n * 修剪日志数组,防止内存溢出\n */\n trimLogs() {\n if (this.logs.length > this.config.maxLogs) {\n this.logs = this.logs.slice(-this.config.maxLogs);\n }\n }\n\n /**\n * 保存日志到存储\n */\n saveLogs() {\n if (!this.config.persist || typeof localStorage === 'undefined') {\n return;\n }\n try {\n localStorage.setItem(this.LOGS_KEY, this.safeStringify(this.logs));\n } catch (e) {\n // 存储空间不足或序列化失败时,清理旧日志\n this.logs = this.logs.slice(-Math.floor(this.config.maxLogs / 2));\n try {\n localStorage.setItem(this.LOGS_KEY, this.safeStringify(this.logs));\n } catch (err) {\n console.warn('Failed to save logs:', err);\n }\n }\n }\n\n /**\n * 输出日志\n */\n output(entry) {\n // 控制台输出\n if (this.config.console) {\n this.consoleOutput(entry);\n }\n\n // 自定义处理器\n if (this.config.handlers && this.config.handlers.length > 0) {\n this.config.handlers.forEach(handler => {\n try {\n handler.handle(entry);\n } catch (e) {\n console.error(`Logger handler \"${handler.name || 'unknown'}\" error:`, e);\n }\n });\n }\n }\n\n /**\n * 获取调用栈信息\n */\n getCallerInfo() {\n try {\n const error = new Error();\n const stack = error.stack;\n if (!stack) return null;\n const lines = stack.split('\\n');\n // 需要跳过的文件列表(日志系统的封装层)\n const skipFiles = ['logger.ts', 'logger.js', 'vue-plugin.ts', 'vue-plugin.js', 'useLogger',\n // useLogger hook\n 'createTypedLogger' // createTypedLogger 函数\n ];\n let callerLine = null;\n\n // 从第2行开始查找(跳过 Error 行),找到第一个不在跳过列表中的调用者\n for (let i = 2; i < lines.length; i++) {\n const line = lines[i];\n if (!line) continue;\n\n // 检查是否应该跳过这一行\n let shouldSkip = false;\n for (const skipFile of skipFiles) {\n if (line.includes(skipFile)) {\n shouldSkip = true;\n break;\n }\n }\n\n // 如果不需要跳过,并且包含文件路径信息,则使用这一行\n if (!shouldSkip && (line.includes('://') || line.includes('at '))) {\n callerLine = line;\n break;\n }\n }\n if (!callerLine) return null;\n\n // 直接提取括号中的完整路径\n // 格式: \"at functionName (webpack:///./src/pages/test.vue?1234:1120:7)\"\n // 或: \"at functionName (webpack://kmind-plugin/./src/pages/test.vue?1234:1120:7)\"\n // 或: \"at functionName (webpack://kmind-plugin/siyuan-plugin-src/src/index.ts?:293:14)\" (Electron)\n const pathMatch = callerLine.match(/\\((.*?)\\)/);\n if (pathMatch) {\n let fullPath = pathMatch[1];\n\n // 修复 webpack 路径格式\n // 如果路径包含 webpack:///./,移除多余的 ./\n if (fullPath.includes('webpack:///./')) {\n fullPath = fullPath.replace('webpack:///./', 'webpack:///');\n }\n // 如果路径包含 webpack://xxx/./,移除 ./\n else if (fullPath.includes('/./')) {\n fullPath = fullPath.replace('/./', '/');\n }\n\n // Electron 环境特殊处理:移除文件名后紧跟的 ? 号\n // 例如: webpack://kmind-plugin/src/index.ts?:293:14 -> webpack://kmind-plugin/src/index.ts:293:14\n if (this.isElectron()) {\n // 只移除 .ts 或 .js 文件后直接跟着的 ?:\n fullPath = fullPath.replace(/\\.(ts|js|tsx|jsx|vue)\\?:/g, '.$1:');\n }\n\n // 分离路径和行列号\n const lastColonIndex = fullPath.lastIndexOf(':');\n const secondLastColonIndex = fullPath.lastIndexOf(':', lastColonIndex - 1);\n if (secondLastColonIndex > -1) {\n const pathPart = fullPath.substring(0, secondLastColonIndex);\n const line = fullPath.substring(secondLastColonIndex + 1, lastColonIndex);\n const column = fullPath.substring(lastColonIndex + 1);\n\n // 提取文件名\n let fileName = pathPart;\n if (pathPart.includes('/')) {\n fileName = pathPart.split('/').pop() || pathPart;\n }\n if (fileName.includes('?')) {\n fileName = fileName.split('?')[0];\n }\n return {\n file: fileName,\n line,\n column,\n fullPath: fullPath // 保持完整路径,包括行列号\n };\n }\n }\n return null;\n } catch (e) {\n // 静默处理错误\n }\n return null;\n }\n\n /**\n * 控制台输出\n */\n consoleOutput(entry) {\n const {\n level,\n type,\n message,\n data,\n source,\n timestamp\n } = entry;\n const levelName = _types__WEBPACK_IMPORTED_MODULE_3__[\"LOG_LEVEL_NAMES\"][level];\n const color = _types__WEBPACK_IMPORTED_MODULE_3__[\"LOG_LEVEL_COLORS\"][level];\n const parts = [];\n const styles = [];\n\n // 时间戳\n if (this.config.showTimestamp) {\n const date = new Date(timestamp);\n const time = `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}.${date.getMilliseconds().toString().padStart(3, '0')}`;\n parts.push(`[${time}]`);\n }\n\n // 日志级别(带颜色)\n parts.push(`%c${levelName}%c`);\n styles.push(`color: ${color}; font-weight: bold`, 'color: inherit');\n\n // 来源\n if (this.config.showSource) {\n parts.push(`[${source}]`);\n }\n\n // 类型\n parts.push(`[${type}]`);\n\n // 消息\n parts.push(message);\n const format = parts.join(' ');\n const args = [format, ...styles];\n if (data !== undefined) {\n args.push('\\n', data);\n }\n\n // 根据配置决定是否添加调用位置信息(可点击的链接)\n if (this.config.showClickablePath) {\n const callerInfo = this.getCallerInfo();\n if (callerInfo) {\n args.push('\\n', ` at ${callerInfo.fullPath}`);\n }\n }\n switch (level) {\n case _types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].DEBUG:\n console.debug(...args);\n break;\n case _types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].INFO:\n console.info(...args);\n break;\n case _types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].WARN:\n console.warn(...args);\n break;\n case _types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].ERROR:\n console.error(...args);\n break;\n }\n }\n\n /**\n * 更新配置\n */\n updateConfig(config) {\n this.config = {\n ...this.config,\n ...config\n };\n if (this.config.persist && typeof localStorage !== 'undefined') {\n try {\n localStorage.setItem(this.CONFIG_KEY, this.safeStringify(this.config));\n } catch (e) {\n console.warn('Failed to save logger config:', e);\n }\n }\n }\n\n /**\n * 获取当前配置\n */\n getConfig() {\n return {\n ...this.config\n };\n }\n\n /**\n * 记录日志\n */\n log(level, type, message, data) {\n // 级别过滤\n if (level < this.config.level) return;\n\n // 类型过滤\n if (!this.config.enabledTypes.includes('*') && !this.config.enabledTypes.includes(type)) return;\n const entry = {\n timestamp: Date.now(),\n level,\n type,\n message,\n data,\n source: this.detectSource()\n };\n this.logs.push(entry);\n this.trimLogs();\n this.saveLogs();\n this.output(entry);\n }\n\n /**\n * Debug 级别日志\n */\n debug(type, message, data) {\n this.log(_types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].DEBUG, type, message, data);\n }\n\n /**\n * Info 级别日志\n */\n info(type, message, data) {\n this.log(_types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].INFO, type, message, data);\n }\n\n /**\n * Warn 级别日志\n */\n warn(type, message, data) {\n this.log(_types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].WARN, type, message, data);\n }\n\n /**\n * Error 级别日志\n */\n error(type, message, data) {\n this.log(_types__WEBPACK_IMPORTED_MODULE_3__[\"LogLevel\"].ERROR, type, message, data);\n }\n\n /**\n * 查询日志\n */\n query(options = {}) {\n let results = [...this.logs];\n\n // 类型过滤\n if (options.types && options.types.length > 0) {\n results = results.filter(log => options.types.includes(log.type));\n }\n\n // 级别过滤\n if (options.level !== undefined) {\n results = results.filter(log => log.level >= options.level);\n }\n\n // 时间过滤\n if (options.since !== undefined) {\n results = results.filter(log => log.timestamp >= options.since);\n }\n if (options.until !== undefined) {\n results = results.filter(log => log.timestamp <= options.until);\n }\n\n // 来源过滤\n if (options.sources && options.sources.length > 0) {\n results = results.filter(log => options.sources.includes(log.source));\n }\n\n // 数量限制\n if (options.limit !== undefined && options.limit > 0) {\n results = results.slice(-options.limit);\n }\n return results;\n }\n\n /**\n * 清空日志\n */\n clear() {\n this.logs = [];\n if (this.config.persist && typeof localStorage !== 'undefined') {\n localStorage.removeItem(this.LOGS_KEY);\n }\n }\n\n /**\n * 导出日志\n */\n export() {\n // 使用安全的序列化,并格式化输出\n const safeLogsStr = this.safeStringify(this.logs);\n try {\n // 尝试美化格式\n return JSON.stringify(JSON.parse(safeLogsStr), null, 2);\n } catch (e) {\n // 如果解析失败,直接返回\n return safeLogsStr;\n }\n }\n\n /**\n * 导入日志\n */\n import(data) {\n try {\n const logs = JSON.parse(data);\n if (Array.isArray(logs)) {\n this.logs = logs;\n this.trimLogs();\n this.saveLogs();\n }\n } catch (e) {\n this.error('logger', 'Failed to import logs', e);\n }\n }\n}\nObject(_var_jenkins_home_workspace_siyuan_kmind_plugin_widget_build_to_github_kmind_plugin_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(KmindLogger, \"instance\", null);\n\n//# sourceURL=webpack:///./src/utils/logger/logger.ts?");
/***/ }),
/***/ "./src/utils/logger/types.ts":
/*!***********************************!*\
!*** ./src/utils/logger/types.ts ***!
\***********************************/
/*! exports provided: LogLevel, DEFAULT_CONFIG, LOG_LEVEL_NAMES, LOG_LEVEL_COLORS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LogLevel\", function() { return LogLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_CONFIG\", function() { return DEFAULT_CONFIG; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LOG_LEVEL_NAMES\", function() { return LOG_LEVEL_NAMES; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LOG_LEVEL_COLORS\", function() { return LOG_LEVEL_COLORS; });\n/**\n * 日志系统类型定义\n */\n\n/**\n * 日志级别枚举\n */\nlet LogLevel = /*#__PURE__*/function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"INFO\"] = 1] = \"INFO\";\n LogLevel[LogLevel[\"WARN\"] = 2] = \"WARN\";\n LogLevel[LogLevel[\"ERROR\"] = 3] = \"ERROR\";\n LogLevel[LogLevel[\"NONE\"] = 99] = \"NONE\";\n return LogLevel;\n}({});\n\n/**\n * 日志来源类型\n */\n\n/**\n * 日志条目\n */\n\n/**\n * 日志处理器接口\n */\n\n/**\n * 日志查询条件\n */\n\n/**\n * 日志系统配置\n */\n\n/**\n * 默认配置\n */\nconst DEFAULT_CONFIG = {\n level: LogLevel.INFO,\n enabledTypes: ['*'],\n console: true,\n persist: false,\n maxLogs: 1000,\n showTimestamp: true,\n showSource: true,\n showClickablePath: true,\n handlers: []\n};\n\n/**\n * 日志级别名称映射\n */\nconst LOG_LEVEL_NAMES = {\n [LogLevel.DEBUG]: 'DEBUG',\n [LogLevel.INFO]: 'INFO',\n [LogLevel.WARN]: 'WARN',\n [LogLevel.ERROR]: 'ERROR',\n [LogLevel.NONE]: 'NONE'\n};\n\n/**\n * 日志级别颜色映射(用于控制台输出)\n */\nconst LOG_LEVEL_COLORS = {\n [LogLevel.DEBUG]: '#999999',\n [LogLevel.INFO]: '#2196F3',\n [LogLevel.WARN]: '#FF9800',\n [LogLevel.ERROR]: '#F44336',\n [LogLevel.NONE]: '#000000'\n};\n\n//# sourceURL=webpack:///./src/utils/logger/types.ts?");
/***/ }),
/***/ "./src/utils/logger/vue-plugin.ts":
/*!****************************************!*\
!*** ./src/utils/logger/vue-plugin.ts ***!
\****************************************/
/*! exports provided: VueLoggerPlugin, createTypedLogger, useLogger */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VueLoggerPlugin\", function() { return VueLoggerPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createTypedLogger\", function() { return createTypedLogger; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useLogger\", function() { return useLogger; });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger */ \"./src/utils/logger/logger.ts\");\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ \"./src/utils/logger/types.ts\");\n/**\n * Vue 插件 - 用于在 Vue 组件中方便地使用日志系统\n */\n\n\n\n/**\n * Vue Logger 插件\n */\nconst VueLoggerPlugin = {\n install(Vue, options) {\n // 使用提供的 logger 实例或获取单例\n const logger = (options === null || options === void 0 ? void 0 : options.logger) || _logger__WEBPACK_IMPORTED_MODULE_0__[\"KmindLogger\"].getInstance();\n\n // 添加实例属性\n Vue.prototype.$logger = logger;\n\n // 添加便捷方法\n Vue.prototype.$log = {\n debug: (type, message, data) => {\n logger.debug(type, message, data);\n },\n info: (type, message, data) => {\n logger.info(type, message, data);\n },\n warn: (type, message, data) => {\n logger.warn(type, message, data);\n },\n error: (type, message, data) => {\n logger.error(type, message, data);\n }\n };\n\n // 添加全局 mixin,用于自动记录组件生命周期(可选)\n if (options && options.trackLifecycle) {\n Vue.mixin({\n created() {\n const componentName = this.$options.name || 'Anonymous';\n logger.debug('vue-lifecycle', `Component created: ${componentName}`);\n },\n mounted() {\n const componentName = this.$options.name || 'Anonymous';\n logger.debug('vue-lifecycle', `Component mounted: ${componentName}`);\n },\n destroyed() {\n const componentName = this.$options.name || 'Anonymous';\n logger.debug('vue-lifecycle', `Component destroyed: ${componentName}`);\n }\n });\n }\n\n // 添加全局错误处理器\n Vue.config.errorHandler = (err, vm, info) => {\n var _vm$$options;\n const componentName = (vm === null || vm === void 0 || (_vm$$options = vm.$options) === null || _vm$$options === void 0 ? void 0 : _vm$$options.name) || 'Unknown';\n logger.error('vue-error', `Error in component ${componentName}: ${info}`, {\n error: err,\n component: componentName,\n info: info,\n stack: err.stack\n });\n };\n\n // 添加警告处理器(开发环境)\n if (true) {\n Vue.config.warnHandler = (msg, vm, trace) => {\n var _vm$$options2;\n const componentName = (vm === null || vm === void 0 || (_vm$$options2 = vm.$options) === null || _vm$$options2 === void 0 ? void 0 : _vm$$options2.name) || 'Unknown';\n logger.warn('vue-warning', `Warning in component ${componentName}: ${msg}`, {\n component: componentName,\n trace: trace\n });\n };\n }\n }\n};\n\n/**\n * 创建带有特定类型前缀的日志器\n */\nfunction createTypedLogger(type) {\n const logger = _logger__WEBPACK_IMPORTED_MODULE_0__[\"KmindLogger\"].getInstance();\n return {\n debug: (message, data) => logger.debug(type, message, data),\n info: (message, data) => logger.info(type, message, data),\n warn: (message, data) => logger.warn(type, message, data),\n error: (message, data) => logger.error(type, message, data)\n };\n}\n\n/**\n * Vue 组合式 API hook\n */\nfunction useLogger(defaultType) {\n const logger = _logger__WEBPACK_IMPORTED_MODULE_0__[\"KmindLogger\"].getInstance();\n\n // const env = 'dev'\n const env = 'pro';\n if (env === 'dev') {\n logger.updateConfig({\n level: _types__WEBPACK_IMPORTED_MODULE_1__[\"LogLevel\"].DEBUG,\n enabledTypes: ['*'],\n // 默认启用所有类型\n console: true,\n persist: true,\n maxLogs: 2000,\n showTimestamp: true,\n showSource: true,\n showClickablePath: true\n });\n } else {\n logger.updateConfig({\n level: _types__WEBPACK_IMPORTED_MODULE_1__[\"LogLevel\"].NONE,\n enabledTypes: ['*'],\n // 默认启用所有类型\n console: false,\n persist: false,\n maxLogs: 1,\n showTimestamp: false,\n showSource: false,\n showClickablePath: false\n });\n }\n\n // 如果提供了默认类型,返回带类型的日志方法\n if (defaultType) {\n return {\n logger,\n debug: (message, data) => logger.debug(defaultType, message, data),\n info: (message, data) => logger.info(defaultType, message, data),\n warn: (message, data) => logger.warn(defaultType, message, data),\n error: (message, data) => logger.error(defaultType, message, data),\n // 允许临时使用其他类型\n withType: type => ({\n debug: (message, data) => logger.debug(type, message, data),\n info: (message, data) => logger.info(type, message, data),\n warn: (message, data) => logger.warn(type, message, data),\n error: (message, data) => logger.error(type, message, data)\n })\n };\n }\n\n // 否则返回完整的日志方法\n return {\n logger,\n debug: logger.debug.bind(logger),\n info: logger.info.bind(logger),\n warn: logger.warn.bind(logger),\n error: logger.error.bind(logger)\n };\n}\n\n//# sourceURL=webpack:///./src/utils/logger/vue-plugin.ts?");
/***/ }),
/***/ "./src/utils/storeManager.ts":
/*!***********************************!*\
!*** ./src/utils/storeManager.ts ***!
\***********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * StoreManager - 管理多个 Vuex store 实例的单例类\n * \n * 该管理器通过为不同的上下文(例如不同的思维导图)维护独立的 store 实例,\n * 帮助避免在多导图场景中的单一 store 实例 bug。\n */\nclass StoreManager {\n constructor() {\n if (StoreManager.instance) {\n return StoreManager.instance;\n }\n\n // 使用 Map 存储多个具有唯一 ID 的 store 实例\n this.stores = new Map();\n\n // 默认 store ID\n this.defaultStoreId = 'default';\n StoreManager.instance = this;\n }\n\n /**\n * 注册一个新的 store 实例\n * @param id - store 的唯一标识符\n * @param store - Vuex store 实例\n * @returns 如果注册成功返回 true,如果 ID 已存在返回 false\n */\n register(id, store) {\n if (!id || !store) {\n console.error('[StoreManager] 无效的参数:id 和 store 是必需的');\n return false;\n }\n if (this.stores.has(id)) {\n console.warn(`[StoreManager] ID 为 \"${id}\" 的 store 已存在。请使用 update() 方法来替换它。`);\n return false;\n }\n this.stores.set(id, store);\n console.log(`[StoreManager] Store \"${id}\" 注册成功`);\n return true;\n }\n\n /**\n * 更新一个已存在的 store 实例\n * @param id - store 的唯一标识符\n * @param store - 新的 Vuex store 实例\n * @returns 如果更新成功返回 true\n */\n update(id, store) {\n if (!id || !store) {\n console.error('[StoreManager] 无效的参数:id 和 store 是必需的');\n return false;\n }\n const existed = this.stores.has(id);\n this.stores.set(id, store);\n console.log(`[StoreManager] Store \"${id}\" ${existed ? '更新' : '创建'}成功`);\n return true;\n }\n\n /**\n * 通过 ID 获取 store 实例\n * @param id - Store 标识符\n * @returns Store 实例,如果未找到则返回 null\n */\n get(id) {\n if (!id) {\n console.warn('[StoreManager] 未提供 store ID,返回默认 store');\n return this.getDefault();\n }\n const store = this.stores.get(id);\n if (!store) {\n console.warn(`[StoreManager] 未找到 Store \"${id}\",返回默认 store`);\n return this.getDefault();\n }\n return store;\n }\n\n /**\n * 获取默认 store 实例\n * @returns 默认 store 实例,如果未设置则返回 null\n */\n getDefault() {\n return this.stores.get(this.defaultStoreId) || null;\n }\n\n /**\n * 设置默认 store\n * @param store - 要设置为默认的 Vuex store 实例\n * @returns 如果设置成功返回 true\n */\n setDefault(store) {\n if (!store) {\n console.error('[StoreManager] 提供的 store 无效');\n return false;\n }\n this.stores.set(this.defaultStoreId, store);\n console.log('[StoreManager] 默认 store 设置成功');\n return true;\n }\n\n /**\n * 移除一个 store 实例\n * @param id - 要移除的 Store 标识符\n * @returns 如果移除成功返回 true\n */\n remove(id) {\n if (!id) {\n console.error('[StoreManager] Store ID 是必需的');\n return false;\n }\n if (id === this.defaultStoreId) {\n console.warn('[StoreManager] 无法移除默认 store。请使用 clear() 方法移除所有 store。');\n return false;\n }\n const result = this.stores.delete(id);\n if (result) {\n console.log(`[StoreManager] Store \"${id}\" 移除成功`);\n } else {\n console.warn(`[StoreManager] 未找到 Store \"${id}\"`);\n }\n return result;\n }\n\n /**\n * 检查 store 是否存在\n * @param id - Store 标识符\n * @returns 如果 store 存在返回 true\n */\n has(id) {\n return this.stores.has(id);\n }\n\n /**\n * 获取所有 store ID\n * @returns 所有 store ID 的数组\n */\n getStoreIds() {\n return Array.from(this.stores.keys());\n }\n\n /**\n * 获取已注册的 store 数量\n * @returns store 的数量\n */\n size() {\n return this.stores.size;\n }\n\n /**\n * 清除除默认 store 之外的所有 store\n */\n clearNonDefault() {\n const defaultStore = this.getDefault();\n this.stores.clear();\n if (defaultStore) {\n this.stores.set(this.defaultStoreId, defaultStore);\n }\n console.log('[StoreManager] 所有非默认 store 已清除');\n }\n\n /**\n * 清除包括默认 store 在内的所有 store\n */\n clear() {\n this.stores.clear();\n console.log('[StoreManager] 所有 store 已清除');\n }\n\n /**\n * 获取或创建具有给定 ID 的 store\n * @param id - Store 标识符\n * @param createStoreFn - 在需要时创建新 store 实例的函数\n * @returns Store 实例\n */\n getOrCreate(id, createStoreFn) {\n if (!id || typeof createStoreFn !== 'function') {\n console.error('[StoreManager] 无效的参数:id 和 createStoreFn 是必需的');\n return this.getDefault();\n }\n if (this.stores.has(id)) {\n return this.stores.get(id);\n }\n const newStore = createStoreFn();\n if (newStore) {\n this.stores.set(id, newStore);\n console.log(`[StoreManager] Store \"${id}\" 按需创建成功`);\n return newStore;\n }\n console.error(`[StoreManager] 创建 Store \"${id}\" 失败`);\n return this.getDefault();\n }\n}\n\n// 创建并导出单例实例\nconst storeManager = new StoreManager();\n\n// 冻结实例以防止修改\nObject.freeze(storeManager);\n/* harmony default export */ __webpack_exports__[\"default\"] = (storeManager);\n\n//# sourceURL=webpack:///./src/utils/storeManager.ts?");
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__(/*! ./src/main.js */\"./src/main.js\");\n\n\n//# sourceURL=webpack:///multi_./src/main.js?");
/***/ })
/******/ });