(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define("json-editor", [], factory); else if(typeof exports === 'object') exports["json-editor"] = factory(); else root["json-editor"] = factory(); })(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // 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; /******/ } /******/ /******/ /******/ // 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, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // 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 = "/lib/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 31); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(26)('wks'); var uid = __webpack_require__(27); var Symbol = __webpack_require__(3).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(3); var core = __webpack_require__(0); var ctx = __webpack_require__(19); var hide = __webpack_require__(6); var has = __webpack_require__(9); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 3 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(7); var IE8_DOM_DEFINE = __webpack_require__(38); var toPrimitive = __webpack_require__(39); var dP = Object.defineProperty; exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(8)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var createDesc = __webpack_require__(12); module.exports = __webpack_require__(5) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 8 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 9 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(14); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 11 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 13 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 14 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 15 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(50); var enumBugKeys = __webpack_require__(28); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(26)('keys'); var uid = __webpack_require__(27); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 18 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys__ = __webpack_require__(62); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__ = __webpack_require__(66); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__parser__ = __webpack_require__(73); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__(30); var option = { native: true }; var components = { title: { component: 'h1', option: option }, description: { component: 'p', option: option }, error: { component: 'div', option: option }, form: { component: 'form', option: option }, file: { component: 'input', option: option }, label: { component: 'label', option: option }, input: { component: 'input', option: option }, radio: { component: 'input', option: option }, select: { component: 'select', option: option }, option: { component: 'option', option: option }, button: { component: 'button', option: __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, option, { type: 'submit', label: 'Submit' }) }, checkbox: { component: 'input', option: option }, textarea: { component: 'textarea', option: option }, radiogroup: { component: 'div', option: option }, checkboxgroup: { component: 'div', option: option } }; var defaultInput = { component: 'input', option: option }; var defaultGroup = { component: 'div', option: option }; /** * Edit JSON in UI form with JSON Schema and Vue.js `` component. * * @author Yourtion * @license MIT */ /* harmony default export */ __webpack_exports__["a"] = ({ name: 'JsonEditor', props: { /** * The JSON Schema object. Use the `v-if` directive to load asynchronous schema. */ schema: { type: Object, required: true }, /** * Use this directive to create two-way data bindings with the component. It automatically picks the correct way to update the element based on the input type. * @model * @default {} */ value: { type: Object, default: function _default() { return {}; } }, /** * This property indicates whether the value of the control can be automatically completed by the browser. Possible values are: `off` and `on`. */ autoComplete: { type: String }, /** * This Boolean attribute indicates that the form is not to be validated when submitted. */ noValidate: { type: Boolean }, /** * Define the inputs wrapping class. Leave `undefined` to disable input wrapping. */ inputWrappingClass: { type: String } }, data: function data() { return { default: {}, fields: {}, error: null, data: {} }; }, created: function created() { Object(__WEBPACK_IMPORTED_MODULE_4__parser__["a" /* loadFields */])(this, Object(__WEBPACK_IMPORTED_MODULE_5__utils__["deepClone"])(this.schema)); this.default = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["deepClone"])(this.value); this.data = this.value; }, render: function render(createElement) { var _this3 = this; var nodes = []; if (this.schema.title) { nodes.push(createElement(components.title.component, this.schema.title)); } if (this.schema.description) { nodes.push(createElement(components.description.component, this.schema.description)); } if (this.error) { var errorOptions = this.elementOptions(components.error); var errorNodes = []; if (components.error.option.native) { errorNodes.push(this.error); } nodes.push(createElement(components.error.component, errorOptions, errorNodes)); } var allFormNodes = []; var formNode = { root: {} }; function createForm(fields, sub) { var _this = this; var node = void 0; if (sub) { node = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["setVal"])(formNode, sub.pop(), {}); } else { node = formNode.root; } if (__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys___default()(fields).length) { __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys___default()(fields).forEach(function (key) { var formNodes = []; if (key.indexOf('$') === 0) return; var field = fields[key]; if (field.$sub) { return createForm.call(_this, field, sub ? [].concat(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default()(sub), [key]) : [key]); } var fieldName = field.name; var fieldValue = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["getChild"])(_this.value, fieldName.split('.')); if (!field.value) { field.value = fieldValue; } var customComponent = field.component ? { component: field.component, option: {} } : undefined; // eslint-disable-next-line var element = field.component ? customComponent : field.hasOwnProperty('items') && field.type !== 'select' ? components[field.type + 'group'] || defaultGroup : components[field.type] || defaultInput; var fieldOptions = _this.elementOptions(element, field, field); var children = []; var input = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({ ref: fieldName, domProps: { value: fieldValue }, on: { input: function input(event) { var value = event && event.target ? event.target.value : event; var ns = fieldName.split('.'); var n = ns.pop(); var ret = ns.length > 0 ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__["initChild"])(_this.data, ns) : _this.data; _this.$set(ret, n, value); /** * Fired synchronously when the value of an element is changed. */ _this.$emit('input', _this.data); }, change: _this.changed } }, fieldOptions); delete field.value; switch (field.type) { case 'textarea': if (element.option.native) { input.domProps.innerHTML = fieldValue; } break; case 'radio': case 'checkbox': if (field.hasOwnProperty('items')) { field.items.forEach(function (item) { var itemOptions = _this.elementOptions(components[field.type], item, item, item); children.push(createElement(components[field.type].component, itemOptions, item.label)); }); } break; case 'select': if (!field.required) { children.push(createElement(components.option.component)); } field.items.forEach(function (option) { var optionOptions = _this.elementOptions(components.option, { value: option.value }, field); children.push(createElement(components.option.component, __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({ domProps: { value: option.value } }, optionOptions), option.label)); }); break; } var inputElement = createElement(element.component, input, children); var formControlsNodes = []; if (field.label && !option.disableWrappingLabel) { var _labelOptions = _this.elementOptions(components.label, field, field); var labelNodes = []; if (components.label.option.native) { labelNodes.push(createElement('span', { attrs: { 'data-required-field': field.required ? 'true' : 'false' } }, field.label)); } labelNodes.push(inputElement); if (field.description) { labelNodes.push(createElement('br')); labelNodes.push(createElement('small', field.description)); } formControlsNodes.push(createElement(components.label.component, _labelOptions, labelNodes)); } else { formControlsNodes.push(inputElement); if (field.description) { formControlsNodes.push(createElement('br')); formControlsNodes.push(createElement('small', field.description)); } } if (_this.inputWrappingClass) { formNodes.push(createElement('div', { class: _this.inputWrappingClass }, formControlsNodes)); } else { formControlsNodes.forEach(function (node) { return formNodes.push(node); }); } node[key] = formNodes[0]; }); } } createForm.call(this, this.fields); function createNode(fields, sub) { var _this2 = this; var nodes = []; var subName = sub && sub.pop(); if (fields.$title) { nodes.push(createElement('div', { class: 'sub-title' }, fields.$title)); } __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_keys___default()(fields).forEach(function (key) { if (key.indexOf('$') === 0) return; var field = fields[key]; if (field.$sub) { var node = createNode.call(_this2, field, sub ? [].concat(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default()(sub), [key]) : [key]); nodes.push(createElement('div', { class: 'sub' }, node)); } else if (subName) { nodes.push(Object(__WEBPACK_IMPORTED_MODULE_5__utils__["getChild"])(formNode, subName.split('.'))[key]); } else { nodes.push(formNode.root[key]); } }); return nodes; } var formNodes = createNode.call(this, this.fields); allFormNodes.push(formNodes); var labelOptions = this.elementOptions(components.label); var button = this.$slots.hasOwnProperty('default') ? { component: this.$slots.default, option: option } : components.button; if (button.component instanceof Array) { allFormNodes.push(createElement(components.label.component, labelOptions, button.component)); } else { var buttonOptions = this.elementOptions(button); var buttonElement = createElement(button.component, buttonOptions, button.option.label); allFormNodes.push(createElement(components.label.component, labelOptions, [buttonElement])); } var formOptions = this.elementOptions(components.form, { autocomplete: this.autocomplete, novalidate: this.novalidate }); nodes.push(createElement(components.form.component, __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({ ref: '__form', on: { submit: function submit(event) { event.stopPropagation(); _this3.submit(event); }, invalid: this.invalid } }, formOptions), allFormNodes)); return createElement('div', nodes); }, mounted: function mounted() { this.reset(); }, setComponent: function setComponent(type, component) { var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; components[type] = { component: component, option: option }; }, methods: { /** * @private */ optionValue: function optionValue(field, target) { var item = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; return typeof target === 'function' ? target({ vm: this, field: field, item: item }) : target; }, /** * @private */ elementOptions: function elementOptions(element) { var extendingOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var field = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var item = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var attrName = element.option.native ? 'attrs' : 'props'; var elementProps = typeof element.option === 'function' ? element.option : __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, element.option, { native: undefined }); var options = this.optionValue(field, elementProps, item); return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, attrName, __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, extendingOptions, options)); }, /** * @private */ changed: function changed(e) { /** * Fired when a change to the element's value is committed by the user. */ this.$emit('change', e); }, /** * Get a form input reference */ input: function input(name) { if (!this.$refs[name]) { throw new Error('Undefined input reference \'' + name + '\''); } return this.$refs[name][0]; }, /** * Get the form reference */ form: function form() { return this.$refs.__form; }, /** * Checks whether the form has any constraints and whether it satisfies them. If the form fails its constraints, the browser fires a cancelable `invalid` event at the element, and then returns false. */ checkValidity: function checkValidity() { return this.$refs.__form.checkValidity(); }, /** * @private */ invalid: function invalid(e) { /** * Fired when a submittable element has been checked and doesn't satisfy its constraints. The validity of submittable elements is checked before submitting their owner form, or after the `checkValidity()` of the element or its owner form is called. */ this.$emit('invalid', e); }, /** * Reset the value of all elements of the parent form. */ reset: function reset() { for (var key in this.data) { var ns = key.split('.'); var n = ns.pop(); var ret = ns.length > 0 ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__["initChild"])(this.data, ns) : this.data; var value = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["getChild"])(this.default, key.split('.')); this.$set(ret, n, value); } }, /** * Send the content of the form to the server */ submit: function submit(event) { if (this.checkValidity()) { /** * Fired when a form is submitted */ this.$emit('submit', event); } }, /** * Set a message error. */ setErrorMessage: function setErrorMessage(message) { this.error = message; }, /** * clear the message error. */ clearErrorMessage: function clearErrorMessage() { this.error = null; } } }); /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(37); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11); var document = __webpack_require__(3).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 21 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(23); var defined = __webpack_require__(14); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(24); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 24 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(13); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(0); var global = __webpack_require__(3); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(21) ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 27 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 28 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(4).f; var has = __webpack_require__(9); var TAG = __webpack_require__(1)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 30 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["deepClone"] = deepClone; /* harmony export (immutable) */ __webpack_exports__["getExtendibleLeaf"] = getExtendibleLeaf; /* harmony export (immutable) */ __webpack_exports__["getChild"] = getChild; /* harmony export (immutable) */ __webpack_exports__["initChild"] = initChild; /* harmony export (immutable) */ __webpack_exports__["setVal"] = setVal; function deepClone(obj) { return JSON.parse(JSON.stringify(obj)); } function getExtendibleLeaf(obj, n, initIt) { const v = obj[n]; if (v && typeof v === 'object' && !Array.isArray(v)) { return v; } if (initIt && v === undefined) { return (obj[n] = {}); } } function getChild(data, ns) { if (ns.length === 1) { return data[ns[0]]; } let obj = data[ns[0]]; if (obj === undefined) return obj; let i = 1; const end = ns.length - 1; for (; i < end; i++) { obj = getExtendibleLeaf(obj, ns[i], false); if (obj === undefined) return obj; } return obj[ns[i]]; } function initChild(data, ns) { if (ns.length === 1) { const ret = getExtendibleLeaf(data, ns[0], true); if (ret === undefined) { throw new TypeError('fail to init because namespace ' + ns[0] + ' = ' + data[ns[0]]); } return ret; } let parent = data; let obj = data[ns[0]]; if (obj === undefined) obj = data[ns[0]] = {}; for (let i = 1; i < ns.length; i++) { const n = ns[i]; const ret = getExtendibleLeaf(obj, n, true); if (ret === undefined) { throw new TypeError('fail to init because namespace ' + ns.join('.') + ' = ' + obj + '(' + typeof obj + ')'); } parent = obj; obj = ret; if (parent[n] === undefined) { throw new TypeError('fail to init because namespace ' + ns.slice(0, i).join('.') + ' = ' + parent); } } return obj; } function setVal(data, n, v) { const ns = Array.isArray(n) ? n : n.split('.'); // eslint-disable-next-line n = ns.pop(); const ret = ns.length > 0 ? initChild(data, ns) : data; ret[n] = v; return v; } /***/ }), /* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_JsonEditor_vue__ = __webpack_require__(18); /* empty harmony namespace reexport */ var normalizeComponent = __webpack_require__(32) /* script */ /* template */ var __vue_template__ = null /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = null /* scopeId */ var __vue_scopeId__ = null /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_JsonEditor_vue__["a" /* default */], __vue_template__, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ __webpack_exports__["default"] = (Component.exports); /***/ }), /* 32 */ /***/ (function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file. // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, functionalTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(34); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(35), __esModule: true }; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(36); var $Object = __webpack_require__(0).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(2); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(5), 'Object', { defineProperty: __webpack_require__(4).f }); /***/ }), /* 37 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(5) && !__webpack_require__(8)(function () { return Object.defineProperty(__webpack_require__(20)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(11); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(41); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(42), __esModule: true }; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(43); __webpack_require__(55); module.exports = __webpack_require__(0).Array.from; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(44)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(45)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(13); var defined = __webpack_require__(14); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(21); var $export = __webpack_require__(2); var redefine = __webpack_require__(46); var hide = __webpack_require__(6); var Iterators = __webpack_require__(15); var $iterCreate = __webpack_require__(47); var setToStringTag = __webpack_require__(29); var getPrototypeOf = __webpack_require__(54); var ITERATOR = __webpack_require__(1)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(6); /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(48); var descriptor = __webpack_require__(12); var setToStringTag = __webpack_require__(29); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(6)(IteratorPrototype, __webpack_require__(1)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(7); var dPs = __webpack_require__(49); var enumBugKeys = __webpack_require__(28); var IE_PROTO = __webpack_require__(17)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(20)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(53).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var anObject = __webpack_require__(7); var getKeys = __webpack_require__(16); module.exports = __webpack_require__(5) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(9); var toIObject = __webpack_require__(22); var arrayIndexOf = __webpack_require__(51)(false); var IE_PROTO = __webpack_require__(17)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(22); var toLength = __webpack_require__(25); var toAbsoluteIndex = __webpack_require__(52); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(13); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(3).document; module.exports = document && document.documentElement; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(9); var toObject = __webpack_require__(10); var IE_PROTO = __webpack_require__(17)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__(19); var $export = __webpack_require__(2); var toObject = __webpack_require__(10); var call = __webpack_require__(56); var isArrayIter = __webpack_require__(57); var toLength = __webpack_require__(25); var createProperty = __webpack_require__(58); var getIterFn = __webpack_require__(59); $export($export.S + $export.F * !__webpack_require__(61)(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(7); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(15); var ITERATOR = __webpack_require__(1)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(4); var createDesc = __webpack_require__(12); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(60); var ITERATOR = __webpack_require__(1)('iterator'); var Iterators = __webpack_require__(15); module.exports = __webpack_require__(0).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(24); var TAG = __webpack_require__(1)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(1)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(63), __esModule: true }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(64); module.exports = __webpack_require__(0).Object.keys; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(10); var $keys = __webpack_require__(16); __webpack_require__(65)('keys', function () { return function keys(it) { return $keys(toObject(it)); }; }); /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(2); var core = __webpack_require__(0); var fails = __webpack_require__(8); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(67); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(68), __esModule: true }; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(69); module.exports = __webpack_require__(0).Object.assign; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(2); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(70) }); /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(16); var gOPS = __webpack_require__(71); var pIE = __webpack_require__(72); var toObject = __webpack_require__(10); var IObject = __webpack_require__(23); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(8)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } return T; } : $assign; /***/ }), /* 71 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 72 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 73 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export parseBoolean */ /* unused harmony export parseString */ /* unused harmony export parseItems */ /* unused harmony export parseArray */ /* harmony export (immutable) */ __webpack_exports__["a"] = loadFields; const { initChild, getChild } = __webpack_require__(30); const ARRAY_KEYWORDS = ['anyOf', 'oneOf', 'enum']; function setCommonFields(schema, field, schemaName) { // eslint-disable-next-line no-nested-ternary field.value = schema.hasOwnProperty('default') ? schema.default : field.hasOwnProperty('value') ? field.value : ''; field.component = schema.component; field.schemaType = schema.type; field.label = schema.title || ''; field.description = schema.description || ''; field.required = schema.required || false; field.disabled = schema.disabled || false; field.name = schemaName; } function setFormValue(vm, field) { const ns = field.name.split('.'); const vmValue = getChild(vm.value, ns); if (vm.value && !vmValue) { const n = ns.pop(); const ret = ns.length > 0 ? initChild(vm.value, ns) : vm.value; vm.$set(ret, n, field.value); } } function parseBoolean(vm, schema, schemaName) { const field = schema.attrs || {}; setCommonFields(schema, field, schemaName); if (!field.type) { field.type = 'checkbox'; } field.checked = schema.checked || false; if (schema.name) { field.name = schemaName; setFormValue(vm, field); } return field; } function parseString(vm, schema, schemaName) { const field = schema.attrs || {}; if (schema.format) { switch (schema.format) { case 'email': if (!field.type) { field.type = 'email'; } break; case 'uri': if (!field.type) { field.type = 'url'; } break; case 'regex': if (!field.type) { field.type = 'text'; } field.pattern = schema.pattern; break; } } if (!field.type) { switch (schema.type) { case 'number': case 'integer': field.type = 'number'; break; default: field.type = 'text'; } } setCommonFields(schema, field, schemaName); if (schema.name) { field.name = schemaName; setFormValue(vm, field); } if (schema.minLength) { field.minlength = schema.minLength; } if (schema.maxLength) { field.maxlength = schema.maxLength; } return field; } function parseItems(items) { return items.map(item => { if (typeof item !== 'object') { return { value: item, label: item }; } return item; }); } function parseArray(vm, schema, schemaName) { const field = schema.attrs || {}; setCommonFields(schema, field, schemaName); field.multiple = schema.minItems > 1; field.items = []; for (const keyword of ARRAY_KEYWORDS) { if (schema.hasOwnProperty(keyword)) { switch (keyword) { case 'enum': if (!field.type) { field.type = 'select'; } field.value = field.value || ''; field.items = parseItems(schema[keyword]); break; case 'oneOf': field.type = 'radio'; field.value = field.value || ''; field.items = parseItems(schema[keyword]); break; case 'anyOf': field.type = 'checkbox'; field.value = field.value || []; field.items = parseItems(schema[keyword]); break; } } } if (!field.type) { field.type = schema.type; field.value = field.value || []; field.items = []; } if (schema.name) { field.name = schemaName; setFormValue(vm, field); } return field; } function loadFields(vm, schema, fields = vm.fields, sub) { if (!schema || schema.visible === false) return; const schemaName = sub ? sub.join('.') : schema.name; switch (schema.type) { case 'object': for (const key in schema.properties) { schema.properties[key].name = key; if (schema.required) { for (const field of schema.required) { if (schema.properties[field]) { schema.properties[field].required = true; } } } if (schema.name && !fields[schemaName]) { fields[schemaName] = { $sub: true, $title: schema.title, $description: schema.description, }; } loadFields( vm, schema.properties[key], schema.name ? fields[schemaName] : undefined, sub ? [...sub, key] : [key] ); } break; case 'boolean': fields[schemaName] = parseBoolean(vm, schema, schemaName); break; case 'array': fields[schemaName] = parseArray(vm, schema, schemaName); break; case 'integer': case 'number': case 'string': for (const keyword of ARRAY_KEYWORDS) { if (schema.hasOwnProperty(keyword)) { schema.items = { type: schema.type, enum: schema[keyword], }; fields[schemaName] = parseArray(vm, schema, schemaName); return; } } fields[schemaName] = parseString(vm, schema, schemaName); break; default: fields[schemaName] = parseString(vm, schema, schemaName); } } /***/ }) /******/ ]); });