{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\xq-web-bpm\\src\\tripartite\\buildBigScreen\\src\\utils\\monaco-editor.js","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\tripartite\\buildBigScreen\\src\\utils\\monaco-editor.js","mtime":1675071992678},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.match\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _typeof from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/typeof\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/* eslint-disable */\nimport * as monaco from 'monaco-editor/esm/vs/editor/editor.api';\nimport 'monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution';\nimport 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution';\nvar escapable = /[\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n    keyable = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,\n    gap,\n    indent,\n    meta = {\n  // table of character substitutions\n  '\\b': '\\\\b',\n  '\\t': '\\\\t',\n  '\\n': '\\\\n',\n  '\\f': '\\\\f',\n  '\\r': '\\\\r',\n  '\"': '\\\\\"',\n  \"'\": \"\\\\'\",\n  '\\\\': '\\\\\\\\'\n},\n    rep;\n\nfunction beautifier(object) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var space = options.space || 2,\n      dropQuotesOnKeys = options.dropQuotesOnKeys == false ? false : true,\n      dropQuotesOnNumbers = options.dropQuotesOnNumbers || false,\n      inlineShortArrays = options.inlineShortArrays || false,\n      inlineShortArraysDepth = options.inlineShortArraysDepth || 1,\n      quoteType = options.quoteType || 'single',\n      minify = options.minify || false;\n  if (dropQuotesOnNumbers) walkObjectAndDropQuotesOnNumbers(object);\n  var result = stringify(object, null, minify ? undefined : space, dropQuotesOnKeys, quoteType);\n\n  if (inlineShortArrays && !minify) {\n    var newResult = inlineShortArraysInResult(result);\n\n    if (inlineShortArraysDepth > 1) {\n      for (var i = 1; i < inlineShortArraysDepth; i++) {\n        result = newResult;\n        newResult = inlineShortArraysInResult(result);\n        if (newResult == result) break;\n      }\n    }\n\n    result = newResult;\n  }\n\n  return result;\n}\n\nfunction walkObjectAndDropQuotesOnNumbers(object) {\n  if (!isObject(object)) return;\n  var keys = Object.keys(object);\n  if (!keys) return;\n  keys.forEach(function (key) {\n    var value = object[key];\n\n    if (typeof value == 'string') {\n      var number = value - 0;\n      object[key] = isNaN(number) ? value : number;\n    } else if (isObject(value) || Array.isArray(value)) {\n      walkObjectAndDropQuotesOnNumbers(value);\n    }\n  });\n}\n\nfunction isObject(o) {\n  return o && _typeof(o) == 'object';\n} // Collapses arrays inline when they fit inside the specified width \n// in characters (including indentation).\n\n\nfunction inlineShortArraysInResult(result, width) {\n  width || (width = 80);\n\n  if (typeof width != 'number' || width < 20) {\n    throw \"Invalid width '\" + width + \"'. Expecting number equal or larger than 20.\";\n  }\n\n  var list = result.split('\\n'),\n      i = 0,\n      start = null,\n      content = [];\n\n  while (i < list.length) {\n    var startMatch = !!list[i].match(/\\[/),\n        endMatch = !!list[i].match(/\\],?/);\n\n    if (startMatch && !endMatch) {\n      content = [list[i]];\n      start = i;\n    } else if (endMatch && !startMatch && start) {\n      content.push((list[i] || '').trim());\n      var inline = content.join(' ');\n\n      if (inline.length < width) {\n        list.splice(start, i - start + 1, inline);\n        i = start;\n      }\n\n      start = null;\n      content = [];\n    } else {\n      if (start) content.push((list[i] || '').trim());\n    }\n\n    i += 1;\n  }\n\n  return list.join('\\n');\n}\n\nfunction stringify(value, replacer, space, dropQuotesOnKeys, quoteType) {\n  // The stringify method takes a value and an optional replacer, and an optional\n  // space parameter, and returns a JSON text. The replacer can be a function\n  // that can replace values, or an array of strings that will select the keys.\n  // A default replacer method can be provided. Use of the space parameter can\n  // produce text that is more easily readable.\n  var i;\n  gap = '';\n  indent = ''; // If the space parameter is a number, make an indent string containing that\n  // many spaces.\n\n  if (typeof space === 'number') {\n    for (i = 0; i < space; i += 1) {\n      indent += ' ';\n    } // If the space parameter is a string, it will be used as the indent string.\n\n  } else if (typeof space === 'string') {\n    indent = space;\n  } // If there is a replacer, it must be a function or an array.\n  // Otherwise, throw an error.\n\n\n  rep = replacer;\n\n  if (replacer && typeof replacer !== 'function' && (_typeof(replacer) !== 'object' || typeof replacer.length !== 'number')) {\n    throw new Error('JSON.stringify');\n  } // Make a fake root object containing our value under the key of ''.\n  // Return the result of stringifying the value.\n\n\n  return str('', {\n    '': value\n  }, dropQuotesOnKeys, quoteType);\n}\n\nfunction str(key, holder, dropQuotesOnKeys, quoteType) {\n  // Produce a string from holder[key].\n  var i,\n      // The loop counter.\n  k,\n      // The member key.\n  v,\n      // The member value.\n  length,\n      mind = gap,\n      partial,\n      value = holder[key]; // If the value has a toJSON method, call it to obtain a replacement value.\n\n  if (value && _typeof(value) === 'object' && typeof value.toJSON === 'function') {\n    value = value.toJSON(key);\n  } // If we were called with a replacer function, then call the replacer to\n  // obtain a replacement value.\n\n\n  if (typeof rep === 'function') {\n    value = rep.call(holder, key, value);\n  } // What happens next depends on the value's type.\n\n\n  switch (_typeof(value)) {\n    case 'function':\n      return value;\n\n    case 'string':\n      return quote(value, quoteType);\n\n    case 'number':\n      // JSON numbers must be finite. Encode non-finite numbers as null.\n      return isFinite(value) ? String(value) : 'null';\n\n    case 'boolean':\n    case 'null':\n      // If the value is a boolean or null, convert it to a string. Note:\n      // typeof null does not produce 'null'. The case is included here in\n      // the remote chance that this gets fixed someday.\n      return String(value);\n    // If the type is 'object', we might be dealing with an object or an array or\n    // null.\n\n    case 'object':\n      // Due to a specification blunder in ECMAScript, typeof null is 'object',\n      // so watch out for that case.\n      if (!value) {\n        return 'null';\n      } // Make an array to hold the partial results of stringifying this object value.\n\n\n      gap += indent;\n      partial = []; // Is the value an array?\n\n      if (Object.prototype.toString.apply(value) === '[object Array]') {\n        // The value is an array. Stringify every element. Use null as a placeholder\n        // for non-JSON values.\n        length = value.length;\n\n        for (i = 0; i < length; i += 1) {\n          partial[i] = str(i, value, dropQuotesOnKeys, quoteType) || 'null';\n        } // Join all of the elements together, separated with commas, and wrap them in\n        // brackets.\n\n\n        v = partial.length === 0 ? '[]' : gap ? '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' : '[' + partial.join(',') + ']';\n        gap = mind;\n        return v;\n      } // If the replacer is an array, use it to select the members to be stringified.\n\n\n      if (rep && _typeof(rep) === 'object') {\n        length = rep.length;\n\n        for (i = 0; i < length; i += 1) {\n          if (typeof rep[i] === 'string') {\n            k = rep[i];\n            v = str(k, value, dropQuotesOnKeys, quoteType);\n\n            if (v) {\n              partial.push((dropQuotesOnKeys ? condQuoteKey(k, quoteType) : quote(k, quoteType)) + (gap ? ': ' : ':') + v);\n            }\n          }\n        }\n      } else {\n        // Otherwise, iterate through all of the keys in the object.\n        for (k in value) {\n          if (Object.prototype.hasOwnProperty.call(value, k)) {\n            v = str(k, value, dropQuotesOnKeys, quoteType);\n\n            if (v) {\n              partial.push((dropQuotesOnKeys ? condQuoteKey(k, quoteType) : quote(k, quoteType)) + (gap ? ': ' : ':') + v);\n            }\n          }\n        }\n      } // Join all of the member texts together, separated with commas,\n      // and wrap them in braces.\n\n\n      v = partial.length === 0 ? '{}' : gap ? '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' : '{' + partial.join(',') + '}';\n      gap = mind;\n      return v;\n  }\n}\n\nfunction quote(string, quoteType) {\n  // If the string contains no control characters, no quote characters, and no\n  // backslash characters, then we can safely slap some quotes around it.\n  // Otherwise we must also replace the offending characters with safe escape\n  // sequences.\n  escapable.lastIndex = 0;\n  var surroundingQuote = '\"';\n\n  if (quoteType === 'single') {\n    surroundingQuote = \"'\";\n  }\n\n  return escapable.test(string) ? surroundingQuote + string.replace(escapable, function (a) {\n    var c = meta[a];\n    return typeof c === 'string' ? c : \"\\\\u\" + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n  }) + surroundingQuote : surroundingQuote + string + surroundingQuote;\n}\n\nfunction condQuoteKey(string, quoteType) {\n  return keyable.test(string) ? string : quote(string, quoteType);\n}\n\nfunction noop() {}\n\nexport { monaco };\nexport default {\n  name: 'MonacoEditor',\n  props: {\n    diffEditor: {\n      type: Boolean,\n      default: false\n    },\n    //是否使用diff模式\n    width: {\n      type: [String, Number],\n      default: '100%'\n    },\n    height: {\n      type: [String, Number],\n      default: '100%'\n    },\n    original: String,\n    //只有在diff模式下有效\n    value: [String, Object],\n    language: {\n      type: String,\n      default: 'javascript'\n    },\n    theme: {\n      type: String,\n      default: 'vs-dark'\n    },\n    readOnly: {\n      type: Boolean,\n      default: false\n    },\n    options: {\n      type: Object,\n      default: function _default() {\n        return {};\n      }\n    },\n    editorMounted: {\n      type: Function,\n      default: noop\n    },\n    editorBeforeMount: {\n      type: Function,\n      default: noop\n    },\n    keyIndex: {\n      type: String\n    }\n  },\n  watch: {\n    options: {\n      deep: true,\n      handler: function handler(options) {\n        this.editor && this.editor.updateOptions(options);\n      }\n    },\n    value: function value() {\n      var data = this.value;\n\n      if (this.editor && data !== this._getValue()) {\n        this._setValue(data);\n      }\n    },\n    language: function language() {\n      if (!this.editor) return;\n\n      if (this.diffEditor) {\n        //diff模式下更新language\n        var _this$editor$getModel = this.editor.getModel(),\n            original = _this$editor$getModel.original,\n            modified = _this$editor$getModel.modified;\n\n        monaco.editor.setModelLanguage(original, this.language);\n        monaco.editor.setModelLanguage(modified, this.language);\n      } else monaco.editor.setModelLanguage(this.editor.getModel(), this.language);\n    },\n    theme: function theme() {\n      this.editor && monaco.editor.setTheme(this.theme);\n    },\n    style: function style() {\n      var _this = this;\n\n      this.editor && this.$nextTick(function () {\n        _this.editor.layout();\n      });\n    }\n  },\n  computed: {\n    style: function style() {\n      return {\n        width: !/^\\d+$/.test(this.width) ? this.width : \"\".concat(this.width, \"px\"),\n        height: !/^\\d+$/.test(this.height) ? this.height : \"\".concat(this.height, \"px\")\n      };\n    }\n  },\n  mounted: function mounted() {\n    this.initMonaco();\n  },\n  beforeDestroy: function beforeDestroy() {\n    this.editor && this.editor.dispose();\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": \"monaco_editor_container\",\n      \"style\": this.style\n    });\n  },\n  methods: {\n    initMonaco: function initMonaco() {\n      var value = this.value,\n          language = this.language,\n          theme = this.theme,\n          readOnly = this.readOnly,\n          options = this.options;\n      Object.assign(options, this._editorBeforeMount()); //编辑器初始化前\n\n      this.editor = monaco.editor[this.diffEditor ? 'createDiffEditor' : 'create'](this.$el, _objectSpread({\n        value: typeof value == 'string' ? value : beautifier(value),\n        language: language,\n        theme: theme,\n        readOnly: readOnly\n      }, options));\n      this.diffEditor && this._setModel(this.value, this.original);\n\n      this._editorMounted(this.editor); //编辑器初始化后\n\n    },\n    _getEditor: function _getEditor() {\n      if (!this.editor) return null;\n      return this.diffEditor ? this.editor.modifiedEditor : this.editor;\n    },\n    _setModel: function _setModel(value, original) {\n      //diff模式下设置model\n      var language = this.language;\n      var originalModel = monaco.editor.createModel(original, language);\n      var modifiedModel = monaco.editor.createModel(value, language);\n      this.editor.setModel({\n        original: originalModel,\n        modified: modifiedModel\n      });\n    },\n    _setValue: function _setValue(value) {\n      var editor = this._getEditor();\n\n      if (editor) return editor.setValue(value);\n    },\n    _getValue: function _getValue() {\n      var editor = this._getEditor();\n\n      if (!editor) return '';\n      return editor.getValue();\n    },\n    _editorBeforeMount: function _editorBeforeMount() {\n      var options = this.editorBeforeMount(monaco);\n      return options || {};\n    },\n    _editorMounted: function _editorMounted(editor) {\n      var _this2 = this;\n\n      this.editorMounted(editor, monaco);\n\n      if (this.diffEditor) {\n        editor.onDidUpdateDiff(function (event) {\n          var value = _this2._getValue();\n\n          _this2._emitChange(value, event);\n        });\n      } else {\n        editor.onDidChangeModelContent(function (event) {\n          var value = _this2._getValue();\n\n          _this2._emitChange(value, event);\n        });\n      }\n    },\n    _emitChange: function _emitChange(value, event) {\n      this.$emit('change', value, event);\n      this.$emit('input', value);\n    }\n  }\n};",null]}