vue-frappe-formbuilder-health
Version:
Vue Form Builder PRO MAX built from top of Vue. Super dynamic and flexible including Drag and Drop feature.
45,760 lines • 1.64 MB
JavaScript
module.exports =
/******/ (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, { 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 = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "fae3");
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ "00ce":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var undefined;
var $SyntaxError = SyntaxError;
var $Function = Function;
var $TypeError = TypeError;
// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
try {
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
} catch (e) {}
};
var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
try {
$gOPD({}, '');
} catch (e) {
$gOPD = null; // this is IE 8, which has a broken gOPD
}
}
var throwTypeError = function () {
throw new $TypeError();
};
var ThrowTypeError = $gOPD
? (function () {
try {
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
arguments.callee; // IE 8 does not throw here
return throwTypeError;
} catch (calleeThrows) {
try {
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
return $gOPD(arguments, 'callee').get;
} catch (gOPDthrows) {
return throwTypeError;
}
}
}())
: throwTypeError;
var hasSymbols = __webpack_require__("5156")();
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
var needsEval = {};
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
var INTRINSICS = {
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
'%Array%': Array,
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
'%AsyncFromSyncIteratorPrototype%': undefined,
'%AsyncFunction%': needsEval,
'%AsyncGenerator%': needsEval,
'%AsyncGeneratorFunction%': needsEval,
'%AsyncIteratorPrototype%': needsEval,
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
'%Boolean%': Boolean,
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
'%Date%': Date,
'%decodeURI%': decodeURI,
'%decodeURIComponent%': decodeURIComponent,
'%encodeURI%': encodeURI,
'%encodeURIComponent%': encodeURIComponent,
'%Error%': Error,
'%eval%': eval, // eslint-disable-line no-eval
'%EvalError%': EvalError,
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
'%Function%': $Function,
'%GeneratorFunction%': needsEval,
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
'%isFinite%': isFinite,
'%isNaN%': isNaN,
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
'%Map%': typeof Map === 'undefined' ? undefined : Map,
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
'%Math%': Math,
'%Number%': Number,
'%Object%': Object,
'%parseFloat%': parseFloat,
'%parseInt%': parseInt,
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
'%RangeError%': RangeError,
'%ReferenceError%': ReferenceError,
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
'%RegExp%': RegExp,
'%Set%': typeof Set === 'undefined' ? undefined : Set,
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
'%String%': String,
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
'%Symbol%': hasSymbols ? Symbol : undefined,
'%SyntaxError%': $SyntaxError,
'%ThrowTypeError%': ThrowTypeError,
'%TypedArray%': TypedArray,
'%TypeError%': $TypeError,
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
'%URIError%': URIError,
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};
var doEval = function doEval(name) {
var value;
if (name === '%AsyncFunction%') {
value = getEvalledConstructor('async function () {}');
} else if (name === '%GeneratorFunction%') {
value = getEvalledConstructor('function* () {}');
} else if (name === '%AsyncGeneratorFunction%') {
value = getEvalledConstructor('async function* () {}');
} else if (name === '%AsyncGenerator%') {
var fn = doEval('%AsyncGeneratorFunction%');
if (fn) {
value = fn.prototype;
}
} else if (name === '%AsyncIteratorPrototype%') {
var gen = doEval('%AsyncGenerator%');
if (gen) {
value = getProto(gen.prototype);
}
}
INTRINSICS[name] = value;
return value;
};
var LEGACY_ALIASES = {
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
'%ArrayPrototype%': ['Array', 'prototype'],
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
'%BooleanPrototype%': ['Boolean', 'prototype'],
'%DataViewPrototype%': ['DataView', 'prototype'],
'%DatePrototype%': ['Date', 'prototype'],
'%ErrorPrototype%': ['Error', 'prototype'],
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
'%FunctionPrototype%': ['Function', 'prototype'],
'%Generator%': ['GeneratorFunction', 'prototype'],
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
'%JSONParse%': ['JSON', 'parse'],
'%JSONStringify%': ['JSON', 'stringify'],
'%MapPrototype%': ['Map', 'prototype'],
'%NumberPrototype%': ['Number', 'prototype'],
'%ObjectPrototype%': ['Object', 'prototype'],
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
'%PromisePrototype%': ['Promise', 'prototype'],
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
'%Promise_all%': ['Promise', 'all'],
'%Promise_reject%': ['Promise', 'reject'],
'%Promise_resolve%': ['Promise', 'resolve'],
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
'%RegExpPrototype%': ['RegExp', 'prototype'],
'%SetPrototype%': ['Set', 'prototype'],
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
'%StringPrototype%': ['String', 'prototype'],
'%SymbolPrototype%': ['Symbol', 'prototype'],
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
'%URIErrorPrototype%': ['URIError', 'prototype'],
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
'%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = __webpack_require__("0f7c");
var hasOwn = __webpack_require__("a0d3");
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);
var $strSlice = bind.call(Function.call, String.prototype.slice);
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
var first = $strSlice(string, 0, 1);
var last = $strSlice(string, -1);
if (first === '%' && last !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
} else if (last === '%' && first !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
}
var result = [];
$replace(string, rePropName, function (match, number, quote, subString) {
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
});
return result;
};
/* end adaptation */
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
var intrinsicName = name;
var alias;
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
alias = LEGACY_ALIASES[intrinsicName];
intrinsicName = '%' + alias[0] + '%';
}
if (hasOwn(INTRINSICS, intrinsicName)) {
var value = INTRINSICS[intrinsicName];
if (value === needsEval) {
value = doEval(intrinsicName);
}
if (typeof value === 'undefined' && !allowMissing) {
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
}
return {
alias: alias,
name: intrinsicName,
value: value
};
}
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
if (typeof name !== 'string' || name.length === 0) {
throw new $TypeError('intrinsic name must be a non-empty string');
}
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
throw new $TypeError('"allowMissing" argument must be a boolean');
}
var parts = stringToPath(name);
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
var intrinsicRealName = intrinsic.name;
var value = intrinsic.value;
var skipFurtherCaching = false;
var alias = intrinsic.alias;
if (alias) {
intrinsicBaseName = alias[0];
$spliceApply(parts, $concat([0, 1], alias));
}
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
var part = parts[i];
var first = $strSlice(part, 0, 1);
var last = $strSlice(part, -1);
if (
(
(first === '"' || first === "'" || first === '`')
|| (last === '"' || last === "'" || last === '`')
)
&& first !== last
) {
throw new $SyntaxError('property names with quotes must have matching quotes');
}
if (part === 'constructor' || !isOwn) {
skipFurtherCaching = true;
}
intrinsicBaseName += '.' + part;
intrinsicRealName = '%' + intrinsicBaseName + '%';
if (hasOwn(INTRINSICS, intrinsicRealName)) {
value = INTRINSICS[intrinsicRealName];
} else if (value != null) {
if (!(part in value)) {
if (!allowMissing) {
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
}
return void undefined;
}
if ($gOPD && (i + 1) >= parts.length) {
var desc = $gOPD(value, part);
isOwn = !!desc;
// By convention, when a data property is converted to an accessor
// property to emulate a data property that does not suffer from
// the override mistake, that accessor's getter is marked with
// an `originalValue` property. Here, when we detect this, we
// uphold the illusion by pretending to see that original data
// property, i.e., returning the value rather than the getter
// itself.
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
value = desc.get;
} else {
value = value[part];
}
} else {
isOwn = hasOwn(value, part);
value = value[part];
}
if (isOwn && !skipFurtherCaching) {
INTRINSICS[intrinsicRealName] = value;
}
}
}
return value;
};
/***/ }),
/***/ "014b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__("e53d");
var has = __webpack_require__("07e3");
var DESCRIPTORS = __webpack_require__("8e60");
var $export = __webpack_require__("63b6");
var redefine = __webpack_require__("9138");
var META = __webpack_require__("ebfd").KEY;
var $fails = __webpack_require__("294c");
var shared = __webpack_require__("dbdb");
var setToStringTag = __webpack_require__("45f2");
var uid = __webpack_require__("62a0");
var wks = __webpack_require__("5168");
var wksExt = __webpack_require__("ccb9");
var wksDefine = __webpack_require__("6718");
var enumKeys = __webpack_require__("47ee");
var isArray = __webpack_require__("9003");
var anObject = __webpack_require__("e4ae");
var isObject = __webpack_require__("f772");
var toObject = __webpack_require__("241e");
var toIObject = __webpack_require__("36c3");
var toPrimitive = __webpack_require__("1bc3");
var createDesc = __webpack_require__("aebd");
var _create = __webpack_require__("a159");
var gOPNExt = __webpack_require__("0395");
var $GOPD = __webpack_require__("bf0b");
var $GOPS = __webpack_require__("9aa9");
var $DP = __webpack_require__("d9f6");
var $keys = __webpack_require__("c3a1");
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__("6abf").f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__("355d").f = $propertyIsEnumerable;
$GOPS.f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__("b8e3")) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
return $GOPS.f(toObject(it));
}
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("35e8")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/***/ "01f9":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__("2d00");
var $export = __webpack_require__("5ca1");
var redefine = __webpack_require__("2aba");
var hide = __webpack_require__("32e9");
var Iterators = __webpack_require__("84f2");
var $iterCreate = __webpack_require__("41a0");
var setToStringTag = __webpack_require__("7f20");
var getPrototypeOf = __webpack_require__("38fd");
var ITERATOR = __webpack_require__("2b4c")('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;
};
/***/ }),
/***/ "02f4":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("4588");
var defined = __webpack_require__("be13");
// 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;
};
};
/***/ }),
/***/ "0390":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var at = __webpack_require__("02f4")(true);
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? at(S, index).length : 1);
};
/***/ }),
/***/ "0395":
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__("36c3");
var gOPN = __webpack_require__("6abf").f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};
/***/ }),
/***/ "07a4":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasSymbols = __webpack_require__("1696");
module.exports = function hasToStringTagShams() {
return hasSymbols() && !!Symbol.toStringTag;
};
/***/ }),
/***/ "07e3":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "099a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var numToStr = Number.prototype.toString;
var tryNumberObject = function tryNumberObject(value) {
try {
numToStr.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var numClass = '[object Number]';
var hasToStringTag = __webpack_require__("07a4")();
module.exports = function isNumberObject(value) {
if (typeof value === 'number') {
return true;
}
if (typeof value !== 'object') {
return false;
}
return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
};
/***/ }),
/***/ "09fa":
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/ecma262/#sec-toindex
var toInteger = __webpack_require__("4588");
var toLength = __webpack_require__("9def");
module.exports = function (it) {
if (it === undefined) return 0;
var number = toInteger(it);
var length = toLength(number);
if (number !== length) throw RangeError('Wrong length!');
return length;
};
/***/ }),
/***/ "0a49":
/***/ (function(module, exports, __webpack_require__) {
// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__("9b43");
var IObject = __webpack_require__("626a");
var toObject = __webpack_require__("4bf8");
var toLength = __webpack_require__("9def");
var asc = __webpack_require__("cd1c");
module.exports = function (TYPE, $create) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
var create = $create || asc;
return function ($this, callbackfn, that) {
var O = toObject($this);
var self = IObject(O);
var f = ctx(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var val, res;
for (;length > index; index++) if (NO_HOLES || index in self) {
val = self[index];
res = f(val, index, O);
if (TYPE) {
if (IS_MAP) result[index] = res; // map
else if (res) switch (TYPE) {
case 3: return true; // some
case 5: return val; // find
case 6: return index; // findIndex
case 2: result.push(val); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
};
};
/***/ }),
/***/ "0bfb":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("cb7c");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "0d58":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("ce10");
var enumBugKeys = __webpack_require__("e11e");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "0e65":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getDay = Date.prototype.getDay;
var tryDateObject = function tryDateGetDayCall(value) {
try {
getDay.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var dateClass = '[object Date]';
var hasToStringTag = __webpack_require__("07a4")();
module.exports = function isDateObject(value) {
if (typeof value !== 'object' || value === null) {
return false;
}
return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
};
/***/ }),
/***/ "0f7c":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__("688e");
module.exports = Function.prototype.bind || implementation;
/***/ }),
/***/ "0f88":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var hide = __webpack_require__("32e9");
var uid = __webpack_require__("ca5a");
var TYPED = uid('typed_array');
var VIEW = uid('view');
var ABV = !!(global.ArrayBuffer && global.DataView);
var CONSTR = ABV;
var i = 0;
var l = 9;
var Typed;
var TypedArrayConstructors = (
'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
).split(',');
while (i < l) {
if (Typed = global[TypedArrayConstructors[i++]]) {
hide(Typed.prototype, TYPED, true);
hide(Typed.prototype, VIEW, true);
} else CONSTR = false;
}
module.exports = {
ABV: ABV,
CONSTR: CONSTR,
TYPED: TYPED,
VIEW: VIEW
};
/***/ }),
/***/ "0fc9":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("3a38");
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);
};
/***/ }),
/***/ "1169":
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__("2d95");
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/***/ "11e9":
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__("52a7");
var createDesc = __webpack_require__("4630");
var toIObject = __webpack_require__("6821");
var toPrimitive = __webpack_require__("6a99");
var has = __webpack_require__("69a8");
var IE8_DOM_DEFINE = __webpack_require__("c69a");
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) { /* empty */ }
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
/***/ }),
/***/ "1495":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("86cc");
var anObject = __webpack_require__("cb7c");
var getKeys = __webpack_require__("0d58");
module.exports = __webpack_require__("9e1e") ? 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;
};
/***/ }),
/***/ "1654":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__("71c1")(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__("30f1")(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 };
});
/***/ }),
/***/ "1691":
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ "1696":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
if (typeof Symbol.iterator === 'symbol') { return true; }
var obj = {};
var sym = Symbol('test');
var symObj = Object(sym);
if (typeof sym === 'string') { return false; }
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
// temp disabled per https://github.com/ljharb/object.assign/issues/17
// if (sym instanceof Symbol) { return false; }
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
// if (!(symObj instanceof Symbol)) { return false; }
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
var symVal = 42;
obj[sym] = symVal;
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
var syms = Object.getOwnPropertySymbols(obj);
if (syms.length !== 1 || syms[0] !== sym) { return false; }
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
if (typeof Object.getOwnPropertyDescriptor === 'function') {
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
}
return true;
};
/***/ }),
/***/ "16e7":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// modified from https://github.com/es-shims/es6-shim
var keys = __webpack_require__("d6c7");
var canBeObject = function (obj) {
return typeof obj !== 'undefined' && obj !== null;
};
var hasSymbols = __webpack_require__("1696")();
var callBound = __webpack_require__("545e");
var toObject = Object;
var $push = callBound('Array.prototype.push');
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
var objTarget = toObject(target);
var s, source, i, props, syms, value, key;
for (s = 1; s < arguments.length; ++s) {
source = toObject(arguments[s]);
props = keys(source);
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
if (getSymbols) {
syms = getSymbols(source);
for (i = 0; i < syms.length; ++i) {
key = syms[i];
if ($propIsEnumerable(source, key)) {
$push(props, key);
}
}
}
for (i = 0; i < props.length; ++i) {
key = props[i];
value = source[key];
if ($propIsEnumerable(source, key)) {
objTarget[key] = value;
}
}
}
return objTarget;
};
/***/ }),
/***/ "198e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_ControlView_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ee8f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_ControlView_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_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_ControlView_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/***/ }),
/***/ "1991":
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__("9b43");
var invoke = __webpack_require__("31f4");
var html = __webpack_require__("fab2");
var cel = __webpack_require__("230e");
var global = __webpack_require__("7726");
var process = global.process;
var setTask = global.setImmediate;
var clearTask = global.clearImmediate;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function () {
var id = +this;
// eslint-disable-next-line no-prototype-builtins
if (queue.hasOwnProperty(id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var listener = function (event) {
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
setTask = function setImmediate(fn) {
var args = [];
var i = 1;
while (arguments.length > i) args.push(arguments[i++]);
queue[++counter] = function () {
// eslint-disable-next-line no-new-func
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
clearTask = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (__webpack_require__("2d95")(process) == 'process') {
defer = function (id) {
process.nextTick(ctx(run, id, 1));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(ctx(run, id, 1));
};
// Browsers with MessageChannel, includes WebWorkers
} else if (MessageChannel) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = listener;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
defer = function (id) {
global.postMessage(id + '', '*');
};
global.addEventListener('message', listener, false);
// IE8-
} else if (ONREADYSTATECHANGE in cel('script')) {
defer = function (id) {
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
set: setTask,
clear: clearTask
};
/***/ }),
/***/ "1af6":
/***/ (function(module, exports, __webpack_require__) {
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__("63b6");
$export($export.S, 'Array', { isArray: __webpack_require__("9003") });
/***/ }),
/***/ "1bc3":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("f772");
// 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");
};
/***/ }),
/***/ "1c4c":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__("9b43");
var $export = __webpack_require__("5ca1");
var toObject = __webpack_require__("4bf8");
var call = __webpack_require__("1fa8");
var isArrayIter = __webpack_require__("33a4");
var toLength = __webpack_require__("9def");
var createProperty = __webpack_require__("f1ae");
var getIterFn = __webpack_require__("27ee");
$export($export.S + $export.F * !__webpack_require__("5cc5")(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;
}
});
/***/ }),
/***/ "1c7e":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var supportsDescriptors = __webpack_require__("f367").supportsDescriptors;
var getPolyfill = __webpack_require__("57ec");
var gOPD = Object.getOwnPropertyDescriptor;
var defineProperty = Object.defineProperty;
var TypeErr = TypeError;
var getProto = Object.getPrototypeOf;
var regex = /a/;
module.exports = function shimFlags() {
if (!supportsDescriptors || !getProto) {
throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
}
var polyfill = getPolyfill();
var proto = getProto(regex);
var descriptor = gOPD(proto, 'flags');
if (!descriptor || descriptor.get !== polyfill) {
defineProperty(proto, 'flags', {
configurable: true,
enumerable: false,
get: polyfill
});
}
return polyfill;
};
/***/ }),
/***/ "1d2b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bind; });
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
};
}
/***/ }),
/***/ "1dd1":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__("00ce");
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
if ($gOPD) {
try {
$gOPD([], 'length');
} catch (e) {
// IE 8 has a broken gOPD
$gOPD = null;
}
}
module.exports = $gOPD;
/***/ }),
/***/ "1ec8":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SidebarRenderer; });
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b0b4");
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d225");
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bd86");
var SidebarRenderer = /*#__PURE__*/Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( // to recognize which components are triggering...
function SidebarRenderer(runnerId, component) {
var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, SidebarRenderer);
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "runnerId", '');
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "component", null);
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "data", {});
this.runnerId = runnerId;
this.component = component;
this.data = data;
});
/***/ }),
/***/ "1ec9":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("f772");
var document = __webpack_require__("e53d").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) : {};
};
/***/ }),
/***/ "1fa8":
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__("cb7c");
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;
}
};
/***/ }),
/***/ "1fb5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function getLens (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64.indexOf('=')
if (validLen === -1) validLen = len
var placeHoldersLen = validLen === len
? 0
: 4 - (validLen % 4)
return [validLen, placeHoldersLen]
}
// base64 is 4/3 + up to two characters of the original data
function byteLength (b64) {
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function _byteLength (b64, validLen, placeHoldersLen) {
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function toByteArray (b64) {
var tmp
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
var len = placeHoldersLen > 0
? validLen - 4
: validLen
var i
for (i = 0; i < len; i += 4) {
tmp =
(revLookup[b64.charCodeAt(i)] << 18) |
(revLookup[b64.charCodeAt(i + 1)] << 12) |
(revLookup[b64.charCodeAt(i + 2)] << 6) |
revLookup[b64.charCodeAt(i + 3)]
arr[curByte++] = (tmp >> 16) & 0xFF
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 2) {
tmp =
(revLookup[b64.charCodeAt(i)] << 2) |
(revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 1) {
tmp =
(revLookup[b64.charCodeAt(i)] << 10) |
(revLookup[b64.charCodeAt(i + 1)] << 4) |
(revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] +
lookup[num >> 12 & 0x3F] +
lookup[num >> 6 & 0x3F] +
lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp =
((uint8[i] << 16) & 0xFF0000) +
((uint8[i + 1] << 8) & 0xFF00) +
(uint8[i + 2] & 0xFF)
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
parts.push(
lookup[tmp >> 2] +
lookup[(tmp << 4) & 0x3F] +
'=='
)
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
parts.push(
lookup[tmp >> 10] +
lookup[(tmp >> 4) & 0x3F] +
lookup[(tmp << 2) & 0x3F] +
'='
)
}
return parts.join('')
}
/***/ }),
/***/ "20d6":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__("5ca1");
var $find = __webpack_require__("0a49")(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__("9c6c")(KEY);
/***/ }),
/***/ "20fd":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__("d9f6");
var createDesc = __webpack_require__("aebd");
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/***/ "214f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__("b0c5");
var redefine = __webpack_require__("2aba");
var hide = __webpack_require__("32e9");
var fails = __webpack_require__("79e5");
var defined = __webpack_require__("be13");
var wks = __webpack_require__("2b4c");
var regexpExec = __webpack_require__("520a");
var SPECIES = wks('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$<a>') !== '7';
});
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length === 2 && result[0] === 'a' && result[1] === 'b';
})();
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
re.exec = function () { execCalled = true; return null; };
if (KEY === 'split') {
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
}
re[SYMBOL]('');
return !execCalled;
}) : undefined;
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var fns = exec(
defined,
SYMBOL,
''[KEY],
function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}
);
var strfn = fns[0];
var rxfn = fns[1];
redefine(String.prototype, KEY, strfn);
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return rxfn.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return rxfn.call(string, this); }
);
}
};
/***/ }),
/***/ "22a0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FORM_DEFAULT_DATA; });
var FORM_DEFAULT_DATA = {
headline: "",
subHeadline: "",
isShowHeadline: false,
formula: [],
// <form></form> tag ??
renderFormTag: false,
formActionURL: "",
formMethod: "POST",
mappedDoctype: ""
};
/***/ }),
/***/ "230e":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("d3f4");
var document = __webpack_require__("7726").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) : {};
};
/***/ }),
/***/ "23c6":
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__("2d95");
var TAG = __webpack_require__("2b4c")('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;
};
/***/ }),
/***/ "241e":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__("25eb");
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/***/ "242e":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasBigInts = __webpack_require__("2834")();
if (hasBigInts) {
var bigIntValueOf = BigInt.prototype.valueOf;
var tryBigInt = function tryBigIntObject(value) {
try {
bigIntValueOf.call(value);
return true;
} catch (e) {
}
return false;
};
module.exports = function isBigInt(value) {
if (
value === null
|| typeof value === 'undefined'
|| typeof value === 'boolean'
|| typeof value === 'string'
|| typeof value === 'number'
|| typeof value === 'symbol'
|| typeof value === 'function'
) {
return false;
}
if (typeof value === 'bigint') {
return true;
}
return tryBigInt(value);
};
} else {
module.exports = function isBigInt(value) {
return false && false;
};
}
/***/ }),
/***/ "2560":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ installer_VueFormBuilderInstaller; });
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
var es6_regexp_replace = __webpack_require__("a481");
// CONCATENATED MODULE: ./src/libraries/icons/arrow-up.icon.js
var ARROW_UP_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <polygon points=\"9 3.828 2.929 9.899 1.515 8.485 10 0 10.707 .707 18.485 8.485 17.071 9.899 11 3.828 11 20 9 20 9 3.828\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/arrow-down.icon.js
var ARROW_DOWN_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <polygon points=\"9 16.172 2.929 10.101 1.515 11.515 10 20 10.707 19.293 18.485 11.515 17.071 10.101 11 16.172 11 0 9 0\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/edit-pencil.icon.js
var EDIT_PENCIL_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <path d=\"M12.3 3.7l4 4L4 20H0v-4L12.3 3.7zm1.4-1.4L16 0l4 4-2.3 2.3-4-4z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/cog.icon.js
var COG_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <path d=\"M3.94 6.5L2.22 3.64l1.42-1.42L6.5 3.94c.52-.3 1.1-.54 1.7-.7L9 0h2l.8 3.24c.6.16 1.18.4 1.7.7l2.86-1.72 1.42 1.42-1.72 2.86c.3.52.54 1.1.7 1.7L20 9v2l-3.24.8c-.16.6-.4 1.18-.7 1.7l1.72 2.86-1.42 1.42-2.86-1.72c-.52.3-1.1.54-1.7.7L11 20H9l-.8-3.24c-.6-.16-1.18-.4-1.7-.7l-2.86 1.72-1.42-1.42 1.72-2.86c-.3-.52-.54-1.1-.7-1.7L0 11V9l3.24-.8c.16-.6.4-1.18.7-1.7zM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/add-outline.icon.js
var ADD_OUTLINE_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n<path d=\"M11 9h4v2h-4v4H9v-4H5V9h4V5h2v4zm-1 11a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/close.icon.js
var CLOSE_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n<path d=\"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/trash.icon.js
var TRASH_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <path d=\"M6 2l2-2h4l2 2h4v2H2V2h4zM3 6h14l-1 14H4L3 6zm5 2v10h1V8H8zm3 0v10h1V8h-1z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/chevron-up.icon.js
var CHEVRON_UP_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n<path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/chevron-down.icon.js
var CHEVRON_DOWN_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n<path d=\"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/navigation-more.icon.js
var NAVIGATION_MORE_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n<path d=\"M4 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm6 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm6 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icons/information-outline.icon.js
var INFORMATION_OUTLINE_ICON = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" width=\"{0}\" height=\"{1}\" fill=\"{2}\">\n <path d=\"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z\"/>\n</svg>\n";
// CONCATENATED MODULE: ./src/libraries/icon-facade.js
/**
* Form-Icon-Facade is a lightweight library to help you retain ICON inside Form-Builder v2
* @author Phat Tran <phattranminh96@gmail.com>
* @license From Zondicons of Steve Schoger. Thanks very much for the beautiful/lightweight icons
* @iconHomePage https://www.zondicons.com/
*/
var ICONS = {
addOutline: ADD_OUTLINE_ICON,
arrowUp: ARROW_UP_ICON,
arrowDown: ARROW_DOWN_ICON,
editPencil: EDIT_PENCIL_ICON,
cog: COG_ICON,
close: CLOSE_ICON,
trash: TRASH_ICON,
chevronUp: CHEVRON_UP_ICON,
chevronDown: CHEVRON_DOWN_ICON,
navigationMore: NAVIGATION_MORE_ICON,
informationOutline: INFORMATION_OUTLINE_ICON
};
var FormIcon = {
/**
* Get SVG Icon for Form-Builder
* @param {String} iconName
* @param {String} width - Width with px (Eg: 16px)
* @param {String} height - Height with px (Eg: 16px)
* @param {String} fillColor - Hex Color String (Eg: #ffffff)
* @returns {string} of SVG HTML TAG
*/
getSVG: function getSVG(iconName) {
var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '16px';
var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '16px';
var fillColor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '#ffffff';
if (!ICONS[iconName]) {
throw new TypeError("Icon Name '".concat(iconName, "' doesn't exists in Vue-Form-Builder."));
}
var replacedIconWithData = ICONS[iconName].replace("{0}", width).replace("{1}", height).replace("{2}", fillColor);
return replacedIconWithData;
}
};
// EXTERNAL MODULE: ./src/components/FormBuilder.vue + 54 modules
var FormBuilder = __webpack_require__("6a29");
// EXTERNAL MODULE: ./src/components/FormRenderer.vue + 20 modules
var FormRenderer = __webpack_require__("fbdb");
// EXTERNAL MODULE: ./src/configs/controls.js + 162 modules
var controls = __webpack_require__("8dbe");
// EXTERNAL MODULE: ./src/configs/styles.js
var styles = __webpack_require__("d60e");
// EXTERNAL MODULE: ./src/configs/validation.js
var validation = __webpack_require__("a786");
// CONCATENATED MODULE: ./src/installer.js
var installer_VueFormBuilderInstaller = function VueFormBuilderInstaller(Vue) {
var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
globalInjection: true,
validationErrorShowAlert: true,
validationErrorAlertText: "Your form got error(s), please fix it and submit again"
};
if (VueFormBuilderInstaller.installed) {
return;
} // DI for Form-Builder
var formDI = {
getIcon: FormIcon.getSVG // a method to get icon from IconFacade
}; // control extend?
if (properties.hasOwnProperty('controls')) {
installer_extendingControls(properties.controls);
} // style override?
if (properties.hasOwnProperty('styles')) {
Object.assign(styles["a" /* STYLES */], properties.styles);
} // validation extend?
if (properties.hasOwnProperty('validations')) {
installer_extendingValidations(properties.validations);
} // validation closures
if (properties.hasOwnProperty('validationClosures')) {
formDI.validationClosures = properties.validationClosures;
} // show alert or not?
formDI.validationErrorShowAlert = properties.validationErrorShowAlert || true;
formDI.validationErrorAlertText = properties.validationErrorAlertText; // For Event-Bus purpose
Vue.prototype.$formEvent = new Vue();
Vue.prototype.$form = formDI; // Register Form-Components
if (!properties.hasOwnProperty('globalInjection') || properties.globalInjection) {
Vue.component('FormBuilder', FormBuilder["a" /* default */]);
Vue.component('FormRenderer', FormRenderer["a" /* default */]);
} // Mark as registered
VueFormBuilderInstaller.installed = true;
};
/**
* Extending Control from the users
* @param {Object} moreControlObject
*/
var installer_extendingControls = function extendingControls(moreControlObject) {
// validation if it does conflict or not
var allKeys = Object.keys(moreControlObject);
for (var iKey = 0; iKey < allKeys.length; iKey++) {
var key = allKeys[iKey]; // duplicated => error
if (controls["a" /* CONTROLS */].hasOwnProperty(key)) {
throw new TypeError("Extend-Control-Error: Your '".concat(key, "' control is duplicated with our build-in Controls. Please change to another key name instead."));
}
} // eligible to extend now
Object.assign(controls["a" /* CONTROLS */], moreControlObject);
};
/**
* Extending Validation
* @param {Object} validationObj
*/
var installer_extendingValidations = function extendingValidations(validationObj) {
// validation if it does conflict or not
var allKeys = Object.keys(validationObj);
for (var iKey = 0; iKey < allKeys.length; iKey++) {
var key = allKeys[iKey]; // duplicated => error
if (validation["a" /* VALIDATION_RULES */].hasOwnProperty(key)) {
throw new TypeError("Extend-Validation-Error: Your '".concat(key, "' validation is duplicated with our build-in Validation. Please change to another key name instead."));
}
} // eligible to extend now
Object.assign(validation["a" /* VALIDATION_RULES */], validationObj);
};
/***/ }),
/***/ "25eb":
/***/ (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;
};
/***/ }),
/***/ "2621":
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "2714":
/***/ (function(module, exports, __webpack_require__) {
var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var functionToString = Function.prototype.toString;
var $match = String.prototype.match;
var $slice = String.prototype.slice;
var $replace = String.prototype.replace;
var $toUpperCase = String.prototype.toUpperCase;
var $toLowerCase = String.prototype.toLowerCase;
var $test = RegExp.prototype.test;
var $concat = Array.prototype.concat;
var $join = Array.prototype.join;
var $arrSlice = Array.prototype.slice;
var $floor = Math.floor;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var gOPS = Object.getOwnPropertySymbols;
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
// ie, `has-tostringtag/shams
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
? Symbol.toStringTag
: null;
var isEnumerable = Object.prototype.propertyIsEnumerable;
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
[].__proto__ === Array.prototype // eslint-disable-line no-proto
? function (O) {
return O.__proto__; // eslint-disable-line no-proto
}
: null
);
function addNumericSeparator(num, str) {
if (
num === Infinity
|| num === -Infinity
|| num !== num
|| (num && num > -1000 && num < 1000)
|| $test.call(/e/, str)
) {
return str;
}
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
if (typeof num === 'number') {
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
if (int !== num) {
var intStr = String(int);
var dec = $slice.call(str, intStr.length + 1);
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
}
}
return $replace.call(str, sepRegex, '$&_');
}
var inspectCustom = __webpack_require__(0).custom;
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
module.exports = function inspect_(obj, options, depth, seen) {
var opts = options || {};
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
throw new TypeError('option "quoteStyle" must be "single" or "double"');
}
if (
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
: opts.maxStringLength !== null
)
) {
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
}
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
}
if (
has(opts, 'indent')
&& opts.indent !== null
&& opts.indent !== '\t'
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
) {
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
}
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
}
var numericSeparator = opts.numericSeparator;
if (typeof obj === 'undefined') {
return 'undefined';
}
if (obj === null) {
return 'null';
}
if (typeof obj === 'boolean') {
return obj ? 'true' : 'false';
}
if (typeof obj === 'string') {
return inspectString(obj, opts);
}
if (typeof obj === 'number') {
if (obj === 0) {
return Infinity / obj > 0 ? '0' : '-0';
}
var str = String(obj);
return numericSeparator ? addNumericSeparator(obj, str) : str;
}
if (typeof obj === 'bigint') {
var bigIntStr = String(obj) + 'n';
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
}
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
if (typeof depth === 'undefined') { depth = 0; }
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
return isArray(obj) ? '[Array]' : '[Object]';
}
var indent = getIndent(opts, depth);
if (typeof seen === 'undefined') {
seen = [];
} else if (indexOf(seen, obj) >= 0) {
return '[Circular]';
}
function inspect(value, from, noIndent) {
if (from) {
seen = $arrSlice.call(seen);
seen.push(from);
}
if (noIndent) {
var newOpts = {
depth: opts.depth
};
if (has(opts, 'quoteStyle')) {
newOpts.quoteStyle = opts.quoteStyle;
}
return inspect_(value, newOpts, depth + 1, seen);
}
return inspect_(value, opts, depth + 1, seen);
}
if (typeof obj === 'function') {
var name = nameOf(obj);
var keys = arrObjKeys(obj, inspect);
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
}
if (isSymbol(obj)) {
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
}
if (isElement(obj)) {
var s = '<' + $toLowerCase.call(String(obj.nodeName));
var attrs = obj.attributes || [];
for (var i = 0; i < attrs.length; i++) {
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
}
s += '>';
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
return s;
}
if (isArray(obj)) {
if (obj.length === 0) { return '[]'; }
var xs = arrObjKeys(obj, inspect);
if (indent && !singleLineValues(xs)) {
return '[' + indentedJoin(xs, indent) + ']';
}
return '[ ' + $join.call(xs, ', ') + ' ]';
}
if (isError(obj)) {
var parts = arrObjKeys(obj, inspect);
if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
}
if (parts.length === 0) { return '[' + String(obj) + ']'; }
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
}
if (typeof obj === 'object' && customInspect) {
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
return obj[inspectSymbol]();
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
return obj.inspect();
}
}
if (isMap(obj)) {
var mapParts = [];
mapForEach.call(obj, function (value, key) {
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
});
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
}
if (isSet(obj)) {
var setParts = [];
setForEach.call(obj, function (value) {
setParts.push(inspect(value, obj));
});
return collectionOf('Set', setSize.call(obj), setParts, indent);
}
if (isWeakMap(obj)) {
return weakCollectionOf('WeakMap');
}
if (isWeakSet(obj)) {
return weakCollectionOf('WeakSet');
}
if (isWeakRef(obj)) {
return weakCollectionOf('WeakRef');
}
if (isNumber(obj)) {
return markBoxed(inspect(Number(obj)));
}
if (isBigInt(obj)) {
return markBoxed(inspect(bigIntValueOf.call(obj)));
}
if (isBoolean(obj)) {
return markBoxed(booleanValueOf.call(obj));
}
if (isString(obj)) {
return markBoxed(inspect(String(obj)));
}
if (!isDate(obj) && !isRegExp(obj)) {
var ys = arrObjKeys(obj, inspect);
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
var protoTag = obj instanceof Object ? '' : 'null prototype';
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
if (ys.length === 0) { return tag + '{}'; }
if (indent) {
return tag + '{' + indentedJoin(ys, indent) + '}';
}
return tag + '{ ' + $join.call(ys, ', ') + ' }';
}
return String(obj);
};
function wrapQuotes(s, defaultStyle, opts) {
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
return quoteChar + s + quoteChar;
}
function quote(s) {
return $replace.call(String(s), /"/g, '"');
}
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
function isSymbol(obj) {
if (hasShammedSymbols) {
return obj && typeof obj === 'object' && obj instanceof Symbol;
}
if (typeof obj === 'symbol') {
return true;
}
if (!obj || typeof obj !== 'object' || !symToString) {
return false;
}
try {
symToString.call(obj);
return true;
} catch (e) {}
return false;
}
function isBigInt(obj) {
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
return false;
}
try {
bigIntValueOf.call(obj);
return true;
} catch (e) {}
return false;
}
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
function has(obj, key) {
return hasOwn.call(obj, key);
}
function toStr(obj) {
return objectToString.call(obj);
}
function nameOf(f) {
if (f.name) { return f.name; }
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
if (m) { return m[1]; }
return null;
}
function indexOf(xs, x) {
if (xs.indexOf) { return xs.indexOf(x); }
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) { return i; }
}
return -1;
}
function isMap(x) {
if (!mapSize || !x || typeof x !== 'object') {
return false;
}
try {
mapSize.call(x);
try {
setSize.call(x);
} catch (s) {
return true;
}
return x instanceof Map; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakMap(x) {
if (!weakMapHas || !x || typeof x !== 'object') {
return false;
}
try {
weakMapHas.call(x, weakMapHas);
try {
weakSetHas.call(x, weakSetHas);
} catch (s) {
return true;
}
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakRef(x) {
if (!weakRefDeref || !x || typeof x !== 'object') {
return false;
}
try {
weakRefDeref.call(x);
return true;
} catch (e) {}
return false;
}
function isSet(x) {
if (!setSize || !x || typeof x !== 'object') {
return false;
}
try {
setSize.call(x);
try {
mapSize.call(x);
} catch (m) {
return true;
}
return x instanceof Set; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakSet(x) {
if (!weakSetHas || !x || typeof x !== 'object') {
return false;
}
try {
weakSetHas.call(x, weakSetHas);
try {
weakMapHas.call(x, weakMapHas);
} catch (s) {
return true;
}
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isElement(x) {
if (!x || typeof x !== 'object') { return false; }
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
return true;
}
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
}
function inspectString(str, opts) {
if (str.length > opts.maxStringLength) {
var remaining = str.length - opts.maxStringLength;
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
}
// eslint-disable-next-line no-control-regex
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
return wrapQuotes(s, 'single', opts);
}
function lowbyte(c) {
var n = c.charCodeAt(0);
var x = {
8: 'b',
9: 't',
10: 'n',
12: 'f',
13: 'r'
}[n];
if (x) { return '\\' + x; }
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
}
function markBoxed(str) {
return 'Object(' + str + ')';
}
function weakCollectionOf(type) {
return type + ' { ? }';
}
function collectionOf(type, size, entries, indent) {
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
return type + ' (' + size + ') {' + joinedEntries + '}';
}
function singleLineValues(xs) {
for (var i = 0; i < xs.length; i++) {
if (indexOf(xs[i], '\n') >= 0) {
return false;
}
}
return true;
}
function getIndent(opts, depth) {
var baseIndent;
if (opts.indent === '\t') {
baseIndent = '\t';
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
baseIndent = $join.call(Array(opts.indent + 1), ' ');
} else {
return null;
}
return {
base: baseIndent,
prev: $join.call(Array(depth + 1), baseIndent)
};
}
function indentedJoin(xs, indent) {
if (xs.length === 0) { return ''; }
var lineJoiner = '\n' + indent.prev + indent.base;
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
}
function arrObjKeys(obj, inspect) {
var isArr = isArray(obj);
var xs = [];
if (isArr) {
xs.length = obj.length;
for (var i = 0; i < obj.length; i++) {
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
}
}
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
var symMap;
if (hasShammedSymbols) {
symMap = {};
for (var k = 0; k < syms.length; k++) {
symMap['$' + syms[k]] = syms[k];
}
}
for (var key in obj) { // eslint-disable-line no-restricted-syntax
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
continue; // eslint-disable-line no-restricted-syntax, no-continue
} else if ($test.call(/[^\w$]/, key)) {
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
} else {
xs.push(key + ': ' + inspect(obj[key], obj));
}
}
if (typeof gOPS === 'function') {
for (var j = 0; j < syms.length; j++) {
if (isEnumerable.call(obj, syms[j])) {
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
}
}
}
return xs;
}
/***/ }),
/***/ "27ee":
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__("23c6");
var ITERATOR = __webpack_require__("2b4c")('iterator');
var Iterators = __webpack_require__("84f2");
module.exports = __webpack_require__("8378").getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/***/ "2834":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var $BigInt = global.BigInt;
module.exports = function hasNativeBigInts() {
return typeof $BigInt === 'function'
&& typeof BigInt === 'function'
&& typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
&& typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "2877":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + 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 = shadowMode
? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functional component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ "28a5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isRegExp = __webpack_require__("aae3");
var anObject = __webpack_require__("cb7c");
var speciesConstructor = __webpack_require__("ebd6");
var advanceStringIndex = __webpack_require__("0390");
var toLength = __webpack_require__("9def");
var callRegExpExec = __webpack_require__("5f1b");
var regexpExec = __webpack_require__("520a");
var fails = __webpack_require__("79e5");
var $min = Math.min;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
var MAX_UINT32 = 0xffffffff;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
// @@split logic
__webpack_require__("214f")('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
var internalSplit;
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
''[$SPLIT](/.?/)[LENGTH]
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(this);
if (separator === undefined && limit === 0) return [];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) return $split.call(string, separator, limit);
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy[LAST_INDEX];
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
lastLength = match[0][LENGTH];
lastLastIndex = lastIndex;
if (output[LENGTH] >= splitLimit) break;
}
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
}
if (lastLastIndex === string[LENGTH]) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
};
// Chakra, V8
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
};
} else {
internalSplit = $split;
}
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = defined(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
});
/***/ }),
/***/ "28fe":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STYLE_INJECTION_MIXIN; });
/* harmony import */ var _configs_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d60e");
var STYLE_INJECTION_MIXIN = {
computed: {
styles: function styles() {
return _configs_styles__WEBPACK_IMPORTED_MODULE_0__[/* STYLES */ "a"];
}
}
};
/***/ }),
/***/ "294c":
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "2a8a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineProperties = __webpack_require__("f367");
var callBind = __webpack_require__("3eb1");
var implementation = __webpack_require__("16e7");
var getPolyfill = __webpack_require__("c8ba6");
var shim = __webpack_require__("f11f");
var polyfill = callBind.apply(getPolyfill());
// eslint-disable-next-line no-unused-vars
var bound = function assign(target, source1) {
return polyfill(Object, arguments);
};
defineProperties(bound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = bound;
/***/ }),
/***/ "2aba":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var hide = __webpack_require__("32e9");
var has = __webpack_require__("69a8");
var SRC = __webpack_require__("ca5a")('src');
var $toString = __webpack_require__("fa5b");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__("8378").inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/***/ "2aeb":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__("cb7c");
var dPs = __webpack_require__("1495");
var enumBugKeys = __webpack_require__("e11e");
var IE_PROTO = __webpack_require__("613b")('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__("230e")('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__("fab2").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);
};
/***/ }),
/***/ "2b4c":
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__("5537")('wks');
var uid = __webpack_require__("ca5a");
var Symbol = __webpack_require__("7726").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;
/***/ }),
/***/ "2d00":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "2d95":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "2f21":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__("79e5");
module.exports = function (method, arg) {
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call
arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
});
};
/***/ }),
/***/ "2fb9":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isString = __webpack_require__("55b2");
var isNumber = __webpack_require__("099a");
var isBoolean = __webpack_require__("353a");
var isSymbol = __webpack_require__("fec5");
var isBigInt = __webpack_require__("242e");
// eslint-disable-next-line consistent-return
module.exports = function whichBoxedPrimitive(value) {
// eslint-disable-next-line eqeqeq
if (value == null || (typeof value !== 'object' && typeof value !== 'function')) {
return null;
}
if (isString(value)) {
return 'String';
}
if (isNumber(value)) {
return 'Number';
}
if (isBoolean(value)) {
return 'Boolean';
}
if (isSymbol(value)) {
return 'Symbol';
}
if (isBigInt(value)) {
return 'BigInt';
}
};
/***/ }),
/***/ "2fdb":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__("5ca1");
var context = __webpack_require__("d2c8");
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__("5147")(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "30f1":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__("b8e3");
var $export = __webpack_require__("63b6");
var redefine = __webpack_require__("9138");
var hide = __webpack_require__("35e8");
var Iterators = __webpack_require__("481b");
var $iterCreate = __webpack_require__("8f60");
var setToStringTag = __webpack_require__("45f2");
var getPrototypeOf = __webpack_require__("53e2");
var ITERATOR = __webpack_require__("5168")('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;
};
/***/ }),
/***/ "31f4":
/***/ (function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function (fn, args, that) {
var un = that === undefined;
switch (args.length) {
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
: fn.call(that, args[0]);
case 2: return un ? fn(args[0], args[1])
: fn.call(that, args[0], args[1]);
case 3: return un ? fn(args[0], args[1], args[2])
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
/***/ }),
/***/ "32e9":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("86cc");
var createDesc = __webpack_require__("4630");
module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "32fc":
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__("e53d").document;
module.exports = document && document.documentElement;
/***/ }),
/***/ "335c":
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__("6b4c");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ "33a4":
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__("84f2");
var ITERATOR = __webpack_require__("2b4c")('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/***/ "34ef":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("ec30")('Uint8', 1, function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "353a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var callBound = __webpack_require__("545e");
var $boolToStr = callBound('Boolean.prototype.toString');
var $toString = callBound('Object.prototype.toString');
var tryBooleanObject = function booleanBrandCheck(value) {
try {
$boolToStr(value);
return true;
} catch (e) {
return false;
}
};
var boolClass = '[object Boolean]';
var hasToStringTag = __webpack_require__("07a4")();
module.exports = function isBoolean(value) {
if (typeof value === 'boolean') {
return true;
}
if (value === null || typeof value !== 'object') {
return false;
}
return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
};
/***/ }),
/***/ "355d":
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ "35e8":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("d9f6");
var createDesc = __webpack_require__("aebd");
module.exports = __webpack_require__("8e60") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "36bd":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var toObject = __webpack_require__("4bf8");
var toAbsoluteIndex = __webpack_require__("77f1");
var toLength = __webpack_require__("9def");
module.exports = function fill(value /* , start = 0, end = @length */) {
var O = toObject(this);
var length = toLength(O.length);
var aLen = arguments.length;
var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
var end = aLen > 2 ? arguments[2] : undefined;
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
while (endPos > index) O[index++] = value;
return O;
};
/***/ }),
/***/ "36c3":
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__("335c");
var defined = __webpack_require__("25eb");
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ "3702":
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__("481b");
var ITERATOR = __webpack_require__("5168")('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/***/ "37c8":
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__("2b4c");
/***/ }),
/***/ "3846":
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__("9e1e") && /./g.flags != 'g') __webpack_require__("86cc").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__("0bfb")
});
/***/ }),
/***/ "38fd":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__("69a8");
var toObject = __webpack_require__("4bf8");
var IE_PROTO = __webpack_require__("613b")('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;
};
/***/ }),
/***/ "3a38":
/***/ (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);
};
/***/ }),
/***/ "3a72":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var core = __webpack_require__("8378");
var LIBRARY = __webpack_require__("2d00");
var wksExt = __webpack_require__("37c8");
var defineProperty = __webpack_require__("86cc").f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
/***/ }),
/***/ "3eb1":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__("0f7c");
var GetIntrinsic = __webpack_require__("00ce");
var $apply = GetIntrinsic('%Function.prototype.apply%');
var $call = GetIntrinsic('%Function.prototype.call%');
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
var $max = GetIntrinsic('%Math.max%');
if ($defineProperty) {
try {
$defineProperty({}, 'a', { value: 1 });
} catch (e) {
// IE 8 has a broken defineProperty
$defineProperty = null;
}
}
module.exports = function callBind(originalFunction) {
var func = $reflectApply(bind, $call, arguments);
if ($gOPD && $defineProperty) {
var desc = $gOPD(func, 'length');
if (desc.configurable) {
// original length, plus the receiver, minus any additional arguments (after the receiver)
$defineProperty(
func,
'length',
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
);
}
}
return func;
};
var applyBind = function applyBind() {
return $reflectApply(bind, $apply, arguments);
};
if ($defineProperty) {
$defineProperty(module.exports, 'apply', { value: applyBind });
} else {
module.exports.apply = applyBind;
}
/***/ }),
/***/ "40c3":
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__("6b4c");
var TAG = __webpack_require__("5168")('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;
};
/***/ }),
/***/ "41a0":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__("2aeb");
var descriptor = __webpack_require__("4630");
var setToStringTag = __webpack_require__("7f20");
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/***/ "4362":
/***/ (function(module, exports, __webpack_require__) {
exports.nextTick = function nextTick(fn) {
var args = Array.prototype.slice.call(arguments);
args.shift();
setTimeout(function () {
fn.apply(null, args);
}, 0);
};
exports.platform = exports.arch =
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];
exports.binding = function (name) {
throw new Error('No such module. (Possibly not yet loaded)')
};
(function () {
var cwd = '/';
var path;
exports.cwd = function () { return cwd };
exports.chdir = function (dir) {
if (!path) path = __webpack_require__("df7c");
cwd = path.resolve(dir, cwd);
};
})();
exports.exit = exports.kill =
exports.umask = exports.dlopen =
exports.uptime = exports.memoryUsage =
exports.uvCounters = function() {};
exports.features = {};
/***/ }),
/***/ "43b3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HELPER; });
/* harmony import */ var core_js_modules_es6_array_find_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("20d6");
/* harmony import */ var core_js_modules_es6_array_find_index__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_find_index__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ac6a");
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("cadf");
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("456d");
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7514");
/* harmony import */ var core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("34ef");
/* harmony import */ var core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("6b54");
/* harmony import */ var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("a481");
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_7__);
var HELPER = {};
/**
* Deep-Clone an Object
* @param obj
* @returns {any}
*/
HELPER.cloneDeep = function (obj) {
return JSON.parse(JSON.stringify(obj));
};
/**
* Get UUIDv4
* @returns {String}
*/
HELPER.getUUIDv4 = function () {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function (c) {
return (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16);
});
};
/**
* Find inside object/array by a specific rule
* @param {Array|Object} collection
* @param {string} ruleKey
* @param {string} value
* @returns {any|undefined} first item that matched the rule or undefined
* @complexity O(n) for normal cases, best case will be O(1) or O(logn)
*/
HELPER.find = function (collection, ruleKey, value) {
// Only array has `length` property
if (collection.length) {
// array
return collection.find(function (item) {
return item[ruleKey] == value;
});
} // object traversal
var keys = Object.keys(collection);
for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
var objKey = _keys[_i];
var data = collection[objKey];
if (data && data[ruleKey] == value) {
return data;
}
}
return undefined;
};
/**
* Find array by a specific rule and return the index
* @param {Array} array
* @param {string} ruleKey - If it's undefined, we check the item only
* @param {string} value
* @returns {number} first item that matched the rule or -1
* @complexity O(n) for normal cases, best case will be O(1) or O(logn)
*/
HELPER.findIndex = function (array, ruleKey, value) {
return array.findIndex(function (item) {
if (!ruleKey) return item == value;
return item[ruleKey] == value;
});
};
/***/ }),
/***/ "454f":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("46a7");
var $Object = __webpack_require__("584a").Object;
module.exports = function defineProperty(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
/***/ }),
/***/ "456d":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__("4bf8");
var $keys = __webpack_require__("0d58");
__webpack_require__("5eda")('keys', function () {
return function keys(it) {
return $keys(toObject(it));
};
});
/***/ }),
/***/ "4581":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// eslint-disable-next-line strict
/* harmony default export */ __webpack_exports__["a"] = (null);
/***/ }),
/***/ "4588":
/***/ (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);
};
/***/ }),
/***/ "45f2":
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__("d9f6").f;
var has = __webpack_require__("07e3");
var TAG = __webpack_require__("5168")('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/***/ "45ff":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_Chart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f21c");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_Chart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_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_Chart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/***/ }),
/***/ "4630":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "46a7":
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__("63b6");
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__("8e60"), 'Object', { defineProperty: __webpack_require__("d9f6").f });
/***/ }),
/***/ "47ee":
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__("c3a1");
var gOPS = __webpack_require__("9aa9");
var pIE = __webpack_require__("355d");
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/***/ "481b":
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "4917":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__("cb7c");
var toLength = __webpack_require__("9def");
var advanceStringIndex = __webpack_require__("0390");
var regExpExec = __webpack_require__("5f1b");
// @@match logic
__webpack_require__("214f")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
return [
// `String.prototype.match` method
// https://tc39.github.io/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
},
// `RegExp.prototype[@@match]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
function (regexp) {
var res = maybeCallNative($match, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
if (!rx.global) return regExpExec(rx, S);
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
var A = [];
var n = 0;
var result;
while ((result = regExpExec(rx, S)) !== null) {
var matchStr = String(result[0]);
A[n] = matchStr;
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
n++;
}
return n === 0 ? null : A;
}
];
});
/***/ }),
/***/ "4a59":
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__("9b43");
var call = __webpack_require__("1fa8");
var isArrayIter = __webpack_require__("33a4");
var anObject = __webpack_require__("cb7c");
var toLength = __webpack_require__("9def");
var getIterFn = __webpack_require__("27ee");
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
var f = ctx(fn, that, entries ? 2 : 1);
var index = 0;
var length, step, iterator, result;
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
if (result === BREAK || result === RETURN) return result;
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
result = call(iterator, f, step.value, entries);
if (result === BREAK || result === RETURN) return result;
}
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;
/***/ }),
/***/ "4bf8":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__("be13");
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/***/ "4ee1":
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__("5168")('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;
};
/***/ }),
/***/ "504c":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("9e1e");
var getKeys = __webpack_require__("0d58");
var toIObject = __webpack_require__("6821");
var isEnum = __webpack_require__("52a7").f;
module.exports = function (isEntries) {
return function (it) {
var O = toIObject(it);
var keys = getKeys(O);
var length = keys.length;
var i = 0;
var result = [];
var key;
while (length > i) {
key = keys[i++];
if (!DESCRIPTORS || isEnum.call(O, key)) {
result.push(isEntries ? [key, O[key]] : O[key]);
}
}
return result;
};
};
/***/ }),
/***/ "50ed":
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/***/ "5147":
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__("2b4c")('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/***/ "5156":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
var hasSymbolSham = __webpack_require__("1696");
module.exports = function hasNativeSymbols() {
if (typeof origSymbol !== 'function') { return false; }
if (typeof Symbol !== 'function') { return false; }
if (typeof origSymbol('foo') !== 'symbol') { return false; }
if (typeof Symbol('bar') !== 'symbol') { return false; }
return hasSymbolSham();
};
/***/ }),
/***/ "5168":
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__("dbdb")('wks');
var uid = __webpack_require__("62a0");
var Symbol = __webpack_require__("e53d").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;
/***/ }),
/***/ "520a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__("0bfb");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var LAST_INDEX = 'lastIndex';
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/,
re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
})();
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
match = nativeExec.call(re, str);
if (UPDATES_LAST_INDEX_WRONG && match) {
re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
// eslint-disable-next-line no-loop-func
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "52a7":
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ "52d0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MODEL; });
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a481");
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4917");
/* harmony import */ var core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7f7f");
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6762");
/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2fdb");
/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("cadf");
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("456d");
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ac6a");
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("f751");
/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("7618");
/* harmony import */ var _configs_controls__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("8dbe");
/**
* V-Model of Form-Renderer
*/
var EMIT_EVENT = "change";
var MODEL = {
props: {
value: Object
},
model: {
event: EMIT_EVENT,
props: "value"
},
data: function data() {
return {
valueContainer: null
};
},
watch: {
value: {
deep: true,
handler: function handler(val) {
if (Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(val) !== "object") {
return;
}
var valx = this.executeAll(val);
this.men(valx);
this.controlDepends(valx); // set value for fields
Object.assign(this.valueContainer, valx);
}
},
valueContainer: {
deep: true,
handler: function handler(val) {
if (!val) return;
this.$emit(EMIT_EVENT, this.valueContainer);
}
}
},
methods: {
executeAll: function executeAll(val) {
var _this = this;
if (!this.formData.formConfig.formula.length) {
return val;
}
this.formData.formConfig.formula.forEach(function (formula) {
val = _this.executeFormalar(val, formula.formula, formula.output);
});
return val;
},
men: function men(val) {
var _this2 = this;
var sectionIds = Object.keys(this.formData.sections);
sectionIds.forEach(function (sectionId) {
var section = _this2.formData.sections[sectionId];
if (section.condition.length) {
var shouldBeHidden = _this2.executeDependency(val, section.condition);
if (shouldBeHidden) {
section.controls.forEach(function (controlId) {
if (_this2.formData.controls[controlId].evaluatedVisibility) {
var controlObj = _this2.formData.controls[controlId];
if (!controlObj.additionalContainerClass.includes("hide-me")) {
controlObj.additionalContainerClass = controlObj.additionalContainerClass + " hide-me";
console.log(controlObj);
_this2.$set(_this2.formData.controls, controlId, controlObj);
}
}
});
} else {
section.controls.forEach(function (controlId) {
if (_this2.formData.controls[controlId].evaluatedVisibility) {
var controlObj = _this2.formData.controls[controlId];
controlObj.additionalContainerClass = controlObj.additionalContainerClass.replaceAll(" hide-me", "");
console.log(controlObj);
_this2.$set(_this2.formData.controls, controlId, controlObj);
}
});
}
}
});
},
controlDepends: function controlDepends(val) {
var _this3 = this;
var controlIds = Object.keys(this.formData.controls);
controlIds.forEach(function (controlId) {
var control = _this3.formData.controls[controlId];
if (control.hideCondition && control.hideCondition.length) {
var shouldBeHidden = _this3.executeDependency(val, control.hideCondition);
if (shouldBeHidden) {
var controlObj = _this3.formData.controls[controlId];
if (!controlObj.additionalContainerClass.includes("hide-me")) {
controlObj.additionalContainerClass = controlObj.additionalContainerClass + " hide-me";
console.log(controlObj);
_this3.$set(_this3.formData.controls, controlId, controlObj);
}
} else {
var _controlObj = _this3.formData.controls[controlId];
_controlObj.additionalContainerClass = _controlObj.additionalContainerClass.replaceAll(" hide-me", "");
console.log(_controlObj);
_this3.$set(_this3.formData.controls, controlId, _controlObj);
}
}
});
},
createValueContainer: function createValueContainer() {
var _this4 = this;
var containerObj = {};
var controlIds = Object.keys(this.formData.controls);
controlIds.forEach(function (controlId) {
var controlItem = _this4.formData.controls[controlId]; // if disableValue is provided, we don't need to solve more for the control
if (typeof _configs_controls__WEBPACK_IMPORTED_MODULE_10__[/* CONTROLS */ "a"][controlItem.type].disableValue === "boolean" && _configs_controls__WEBPACK_IMPORTED_MODULE_10__[/* CONTROLS */ "a"][controlItem.type].disableValue) {
return;
} // get the key-name value
var name = controlItem.name;
if (!name) {
// fall-back to id if no name
name = controlId;
} // add new empty field value
containerObj[name] = ""; // if the control has default factory creation closure, run it
if (typeof _configs_controls__WEBPACK_IMPORTED_MODULE_10__[/* CONTROLS */ "a"][controlItem.type].rendererDefaultData === "function") {
containerObj[name] = _configs_controls__WEBPACK_IMPORTED_MODULE_10__[/* CONTROLS */ "a"][controlItem.type].rendererDefaultData(controlItem);
}
}); // emit to the parent for the value detail
if (this.value) {
this.$emit(EMIT_EVENT, containerObj);
} // set to the real handler
this.valueContainer = containerObj;
},
executeDependency: function executeDependency(input, str) {
var shouldBeHidden = false;
var matches = str.match(/\[[^\]]*]/g);
console.log("MATCHES", matches);
var hasFailed = false;
matches.forEach(function (match) {
var key = match.replace("[", "").replace("]", "");
var keyValue = input["".concat(key)];
if (!keyValue) {
hasFailed = true;
}
if (isNaN(keyValue)) {
str = str.replace(match, "input['".concat(key, "']"));
} else {
str = str.replace(match, keyValue);
}
});
if (!hasFailed) {
console.log(str);
shouldBeHidden = eval(str);
}
console.log(str);
return shouldBeHidden;
},
executeFormalar: function executeFormalar(input, str, output) {
if (!str) {
return input;
}
var shouldBeHidden = false;
var matches = str.match(/\[[^\]]*]/g);
console.log("MATCHES", matches);
var hasFailed = false;
matches.forEach(function (match) {
var key = match.replace("[", "").replace("]", "");
var keyValue = input["".concat(key)];
if (!keyValue) {
hasFailed = true;
}
if (isNaN(keyValue)) {
str = str.replace(match, "input['".concat(key, "']"));
} else {
str = str.replace(match, keyValue);
}
});
if (!hasFailed) {
console.log(str);
input[output] = eval(str);
}
return input;
}
},
created: function created() {
this.createValueContainer();
}
};
/***/ }),
/***/ "5360":
/***/ (function(module, exports, __webpack_require__) {
/*!
*
* Litepicker v1.5.7 (https://github.com/wakirin/Litepicker)
* Package: litepicker (https://www.npmjs.com/package/litepicker)
* License: MIT (https://github.com/wakirin/Litepicker/blob/master/LICENCE.md)
* Copyright 2019-2020 Rinat G.
*
* Hash: 85b7ce11883a11b98abb
* Generated on: 1592979305748
*
*/
!function(t,e){ true?module.exports=e():undefined}(window,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(e,i,o){void 0===e&&(e=null),void 0===i&&(i=null),void 0===o&&(o="en-US"),this.dateInstance=i?t.parseDateTime(e,i,o):e?t.parseDateTime(e):t.parseDateTime(new Date),this.lang=o}return t.parseDateTime=function(e,i,o){if(void 0===i&&(i="YYYY-MM-DD"),void 0===o&&(o="en-US"),!e)return new Date(NaN);if(e instanceof Date)return new Date(e);if(e instanceof t)return e.clone().getDateInstance();if(/^-?\d{10,}$/.test(e))return t.getDateZeroTime(new Date(Number(e)));if("string"==typeof e){for(var n=[],s=null;null!=(s=t.regex.exec(i));)"\\"!==s[1]&&n.push(s);if(n.length){var r={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};n[0].index>0&&(r.value+=".*?");for(var a=0,l=Object.entries(n);a<l.length;a++){var p=l[a],c=p[0],h=p[1],d=Number(c),u=t.formatPatterns(h[0],o),m=u.group,f=u.pattern;r[m]=d+1,r.value+=f,r.value+=".*?"}var g=new RegExp("^"+r.value+"$");if(g.test(e)){var y=g.exec(e),k=Number(y[r.year]),v=null;r.month?v=Number(y[r.month])-1:r.shortMonth?v=t.shortMonths(o).indexOf(y[r.shortMonth]):r.longMonth&&(v=t.longMonths(o).indexOf(y[r.longMonth]));var D=Number(y[r.day])||1;return new Date(k,v,D,0,0,0,0)}}}return t.getDateZeroTime(new Date(e))},t.convertArray=function(e,i){return e.map((function(e){return e instanceof Array?e.map((function(e){return new t(e,i)})):new t(e,i)}))},t.getDateZeroTime=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},t.shortMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"short"})}))},t.longMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"long"})}))},t.formatPatterns=function(e,i){switch(e){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+e.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+t.shortMonths(i).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+t.longMonths(i).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},t.prototype.getDateInstance=function(){return this.dateInstance},t.prototype.toLocaleString=function(t,e){return this.dateInstance.toLocaleString(t,e)},t.prototype.toDateString=function(){return this.dateInstance.toDateString()},t.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},t.prototype.getDay=function(){return this.dateInstance.getDay()},t.prototype.getTime=function(){return this.dateInstance.getTime()},t.prototype.getDate=function(){return this.dateInstance.getDate()},t.prototype.getMonth=function(){return this.dateInstance.getMonth()},t.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},t.prototype.setMonth=function(t){return this.dateInstance.setMonth(t)},t.prototype.setHours=function(t,e,i,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===o&&(o=0),this.dateInstance.setHours(t,e,i,o)},t.prototype.setSeconds=function(t){return this.dateInstance.setSeconds(t)},t.prototype.setDate=function(t){return this.dateInstance.setDate(t)},t.prototype.setFullYear=function(t){return this.dateInstance.setFullYear(t)},t.prototype.getWeek=function(t){var e=new Date(this.timestamp()),i=(this.getDay()+(7-t))%7;e.setDate(e.getDate()-i);var o=e.getTime();return e.setMonth(0,1),e.getDay()!==t&&e.setMonth(0,1+(4-e.getDay()+7)%7),1+Math.ceil((o-e.getTime())/6048e5)},t.prototype.clone=function(){return new t(this.getDateInstance())},t.prototype.isBetween=function(t,e,i){switch(void 0===i&&(i="()"),i){default:case"()":return this.timestamp()>t.getTime()&&this.timestamp()<e.getTime();case"[)":return this.timestamp()>=t.getTime()&&this.timestamp()<e.getTime();case"(]":return this.timestamp()>t.getTime()&&this.timestamp()<=e.getTime();case"[]":return this.timestamp()>=t.getTime()&&this.timestamp()<=e.getTime()}},t.prototype.isBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return t.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},t.prototype.isSameOrBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>=this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},t.prototype.isAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(t.getFullYear(),t.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>t.getFullYear()}throw new Error("isAfter: Invalid unit!")},t.prototype.isSameOrAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>=t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},t.prototype.isSame=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()===t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},t.prototype.add=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()+t);break;case"day":case"days":this.setDate(this.getDate()+t);break;case"month":case"months":this.setMonth(this.getMonth()+t)}return this},t.prototype.subtract=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()-t);break;case"day":case"days":this.setDate(this.getDate()-t);break;case"month":case"months":this.setMonth(this.getMonth()-t)}return this},t.prototype.diff=function(t,e){void 0===e&&(e="seconds");switch(e){default:case"second":case"seconds":return this.getTime()-t.getTime();case"day":case"days":return Math.round((this.timestamp()-t.getTime())/864e5);case"month":case"months":}},t.prototype.format=function(e,i){void 0===i&&(i="en-US");for(var o="",n=[],s=null;null!=(s=t.regex.exec(e));)"\\"!==s[1]&&n.push(s);if(n.length){n[0].index>0&&(o+=e.substring(0,n[0].index));for(var r=0,a=Object.entries(n);r<a.length;r++){var l=a[r],p=l[0],c=l[1],h=Number(p);o+=this.formatTokens(c[0],i),n[h+1]&&(o+=e.substring(c.index+c[0].length,n[h+1].index)),h===n.length-1&&(o+=e.substring(c.index+c[0].length))}}return o.replace(/\\/g,"")},t.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},t.prototype.formatTokens=function(e,i){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return("0"+(this.getMonth()+1)).slice(-2);case"MMM":return t.shortMonths(i)[this.getMonth()];case"MMMM":return t.longMonths(i)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},t.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,t.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],t}();e.DateTime=o},function(t,e,i){var o=i(6);"string"==typeof o&&(o=[[t.i,o,""]]);var n={insert:function(t){var e=document.querySelector("head"),i=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};i(8)(o,n);o.locals&&(t.exports=o.locals)},function(t,e,i){"use strict";function o(){return window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}Object.defineProperty(e,"__esModule",{value:!0}),e.isMobile=function(){var t="portrait"===o();return window.matchMedia("(max-device-"+(t?"width":"height")+": 480px)").matches},e.getOrientation=o,e.findNestedMonthItem=function(t){for(var e=t.parentNode.childNodes,i=0;i<e.length;i+=1){if(e.item(i)===t)return i}return 0}},function(t,e,i){"use strict";var o,n=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var a=i(5),l=i(0),p=r(i(1)),c=i(2),h=function(t){function e(e){var i=t.call(this)||this;i.options=s(s({},i.options),e.element.dataset),Object.keys(i.options).forEach((function(t){"true"!==i.options[t]&&"false"!==i.options[t]||(i.options[t]="true"===i.options[t])}));var o=s(s({},i.options.dropdowns),e.dropdowns),n=s(s({},i.options.buttonText),e.buttonText),r=s(s({},i.options.tooltipText),e.tooltipText);i.options=s(s({},i.options),e),i.options.dropdowns=s({},o),i.options.buttonText=s({},n),i.options.tooltipText=s({},r),i.options.elementEnd||(i.options.allowRepick=!1),i.options.lockDays.length&&(i.options.lockDays=l.DateTime.convertArray(i.options.lockDays,i.options.lockDaysFormat)),i.options.bookedDays.length&&(i.options.bookedDays=l.DateTime.convertArray(i.options.bookedDays,i.options.bookedDaysFormat)),i.options.highlightedDays.length&&(i.options.highlightedDays=l.DateTime.convertArray(i.options.highlightedDays,i.options.highlightedDaysFormat)),!i.options.hotelMode||"bookedDaysInclusivity"in e||(i.options.bookedDaysInclusivity="[)"),!i.options.hotelMode||"disallowBookedDaysInRange"in e||(i.options.disallowBookedDaysInRange=!0),!i.options.hotelMode||"selectForward"in e||(i.options.selectForward=!0);var a=i.parseInput(),p=a[0],c=a[1];i.options.startDate&&(i.options.singleMode||i.options.endDate)&&(p=new l.DateTime(i.options.startDate,i.options.format,i.options.lang)),p&&i.options.endDate&&(c=new l.DateTime(i.options.endDate,i.options.format,i.options.lang)),p instanceof l.DateTime&&!isNaN(p.getTime())&&(i.options.startDate=p),i.options.startDate&&c instanceof l.DateTime&&!isNaN(c.getTime())&&(i.options.endDate=c),!i.options.singleMode||i.options.startDate instanceof l.DateTime||(i.options.startDate=null),i.options.singleMode||i.options.startDate instanceof l.DateTime&&i.options.endDate instanceof l.DateTime||(i.options.startDate=null,i.options.endDate=null);for(var h=0;h<i.options.numberOfMonths;h+=1){var d=i.options.startDate instanceof l.DateTime?i.options.startDate.clone():new l.DateTime;d.setDate(1),d.setMonth(d.getMonth()+h),i.calendars[h]=d}if(i.options.showTooltip)if(i.options.tooltipPluralSelector)i.pluralSelector=i.options.tooltipPluralSelector;else try{var u=new Intl.PluralRules(i.options.lang);i.pluralSelector=u.select.bind(u)}catch(t){i.pluralSelector=function(t){return 0===Math.abs(t)?"one":"other"}}return i.loadPolyfillsForIE11(),i.onInit(),i}return n(e,t),e.prototype.onInit=function(){var t=this;if(document.addEventListener("click",(function(e){return t.onClick(e)}),!0),this.picker=document.createElement("div"),this.picker.className=p.litepicker,this.picker.style.display="none",this.picker.addEventListener("mouseenter",(function(e){return t.onMouseEnter(e)}),!0),this.picker.addEventListener("mouseleave",(function(e){return t.onMouseLeave(e)}),!1),this.options.autoRefresh?(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("keyup",(function(e){return t.onInput(e)}),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("keyup",(function(e){return t.onInput(e)}),!0)):(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("change",(function(e){return t.onInput(e)}),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("change",(function(e){return t.onInput(e)}),!0)),this.options.moduleNavKeyboard){if("function"!=typeof this.enableModuleNavKeyboard)throw new Error("moduleNavKeyboard is on but library does not included. See https://github.com/wakirin/litepicker-module-navkeyboard.");this.enableModuleNavKeyboard.call(this,this)}this.render(),this.options.parentEl?this.options.parentEl instanceof HTMLElement?this.options.parentEl.appendChild(this.picker):document.querySelector(this.options.parentEl).appendChild(this.picker):this.options.inlineMode?this.options.element instanceof HTMLInputElement?this.options.element.parentNode.appendChild(this.picker):this.options.element.appendChild(this.picker):document.body.appendChild(this.picker),this.options.mobileFriendly&&(this.backdrop=document.createElement("div"),this.backdrop.className=p.litepickerBackdrop,this.backdrop.addEventListener("click",this.hide()),this.options.element&&this.options.element.parentNode&&this.options.element.parentNode.appendChild(this.backdrop),window.addEventListener("orientationchange",(function(e){var i=function(){if(c.isMobile()&&t.isShowning()){switch(c.getOrientation()){case"landscape":t.options.numberOfMonths=2,t.options.numberOfColumns=2;break;default:t.options.numberOfMonths=1,t.options.numberOfColumns=1}if(t.render(),!t.options.inlineMode){var e=t.picker.getBoundingClientRect();t.picker.style.top="calc(50% - "+e.height/2+"px)",t.picker.style.left="calc(50% - "+e.width/2+"px)"}}window.removeEventListener("resize",i)};window.addEventListener("resize",i)}))),this.options.inlineMode&&(this.show(),this.options.mobileFriendly&&c.isMobile()&&(window.dispatchEvent(new Event("orientationchange")),window.dispatchEvent(new Event("resize")))),this.updateInput()},e.prototype.parseInput=function(){var t=this.options.delimiter,e=new RegExp(""+t),i=this.options.element instanceof HTMLInputElement?this.options.element.value.split(t):[];if(this.options.elementEnd){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length)return[new l.DateTime(this.options.element.value,this.options.format),new l.DateTime(this.options.elementEnd.value,this.options.format)]}else if(this.options.singleMode){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length)return[new l.DateTime(this.options.element.value,this.options.format)]}else if(this.options.element instanceof HTMLInputElement&&e.test(this.options.element.value)&&i.length&&i.length%2==0){var o=i.slice(0,i.length/2).join(t),n=i.slice(i.length/2).join(t);return[new l.DateTime(o,this.options.format),new l.DateTime(n,this.options.format)]}return[]},e.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){if(this.options.singleMode&&this.options.startDate)this.options.element.value=this.options.startDate.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&this.options.startDate&&this.options.endDate){var t=this.options.startDate.format(this.options.format,this.options.lang),e=this.options.endDate.format(this.options.format,this.options.lang);this.options.elementEnd?(this.options.element.value=t,this.options.elementEnd.value=e):this.options.element.value=""+t+this.options.delimiter+e}this.options.startDate||this.options.endDate||(this.options.element.value="",this.options.elementEnd&&(this.options.elementEnd.value=""))}},e.prototype.isSamePicker=function(t){return t.closest("."+p.litepicker)===this.picker},e.prototype.shouldShown=function(t){return t===this.options.element||this.options.elementEnd&&t===this.options.elementEnd},e.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},e.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},e.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&this.options.lockDays.length&&2===this.datePicked.length},e.prototype.shouldCheckBookedDays=function(){return this.options.disallowBookedDaysInRange&&this.options.bookedDays.length&&2===this.datePicked.length},e.prototype.onClick=function(t){var e=this,i=t.target;if(i&&this.picker)if(this.shouldShown(i))this.show(i);else if(i.closest("."+p.litepicker)){if(i.classList.contains(p.dayItem)){if(t.preventDefault(),!this.isSamePicker(i))return;if(i.classList.contains(p.isLocked))return;if(i.classList.contains(p.isBooked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new l.DateTime(i.dataset.time),this.shouldSwapDatePicked()){var o=this.datePicked[1].clone();this.datePicked[1]=this.datePicked[0].clone(),this.datePicked[0]=o.clone()}if(this.shouldCheckLockDays()){var n=this.options.lockDaysInclusivity;this.options.lockDays.filter((function(t){return t instanceof Array?t[0].isBetween(e.datePicked[0],e.datePicked[1],n)||t[1].isBetween(e.datePicked[0],e.datePicked[1],n):t.isBetween(e.datePicked[0],e.datePicked[1],n)})).length&&(this.datePicked.length=0,"function"==typeof this.options.onError&&this.options.onError.call(this,"INVALID_RANGE"))}if(this.shouldCheckBookedDays()){var s=this.options.bookedDaysInclusivity;this.options.hotelMode&&2===this.datePicked.length&&(s="()");var r=this.options.bookedDays.filter((function(t){return t instanceof Array?t[0].isBetween(e.datePicked[0],e.datePicked[1],s)||t[1].isBetween(e.datePicked[0],e.datePicked[1],s):t.isBetween(e.datePicked[0],e.datePicked[1])})).length,a=this.options.anyBookedDaysAsCheckout&&1===this.datePicked.length;r&&!a&&(this.datePicked.length=0,"function"==typeof this.options.onError&&this.options.onError.call(this,"INVALID_RANGE"))}return this.render(),void(this.options.autoApply&&(this.options.singleMode&&this.datePicked.length?(this.setDate(this.datePicked[0]),this.hide()):this.options.singleMode||2!==this.datePicked.length||(this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide())))}if(i.classList.contains(p.buttonPreviousMonth)){if(t.preventDefault(),!this.isSamePicker(i))return;var h=0,d=this.options.moveByOneMonth?1:this.options.numberOfMonths;if(this.options.splitView){var u=i.closest("."+p.monthItem);h=c.findNestedMonthItem(u),d=1}return this.calendars[h].setMonth(this.calendars[h].getMonth()-d),this.gotoDate(this.calendars[h],h),void("function"==typeof this.options.onChangeMonth&&this.options.onChangeMonth.call(this,this.calendars[h],h))}if(i.classList.contains(p.buttonNextMonth)){if(t.preventDefault(),!this.isSamePicker(i))return;h=0,d=this.options.moveByOneMonth?1:this.options.numberOfMonths;if(this.options.splitView){u=i.closest("."+p.monthItem);h=c.findNestedMonthItem(u),d=1}return this.calendars[h].setMonth(this.calendars[h].getMonth()+d),this.gotoDate(this.calendars[h],h),void("function"==typeof this.options.onChangeMonth&&this.options.onChangeMonth.call(this,this.calendars[h],h))}if(i.classList.contains(p.buttonCancel)){if(t.preventDefault(),!this.isSamePicker(i))return;this.hide()}if(i.classList.contains(p.buttonApply)){if(t.preventDefault(),!this.isSamePicker(i))return;this.options.singleMode&&this.datePicked.length?this.setDate(this.datePicked[0]):this.options.singleMode||2!==this.datePicked.length||this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide()}}else this.hide()},e.prototype.showTooltip=function(t,e){var i=this.picker.querySelector("."+p.containerTooltip);i.style.visibility="visible",i.innerHTML=e;var o=this.picker.getBoundingClientRect(),n=i.getBoundingClientRect(),s=t.getBoundingClientRect(),r=s.top,a=s.left;if(this.options.inlineMode&&this.options.parentEl){var l=this.picker.parentNode.getBoundingClientRect();r-=l.top,a-=l.left}else r-=o.top,a-=o.left;r-=n.height,a-=n.width/2,a+=s.width/2,i.style.top=r+"px",i.style.left=a+"px","function"==typeof this.options.onShowTooltip&&this.options.onShowTooltip.call(this,i,t)},e.prototype.hideTooltip=function(){this.picker.querySelector("."+p.containerTooltip).style.visibility="hidden"},e.prototype.shouldAllowMouseEnter=function(t){return!this.options.singleMode&&!t.classList.contains(p.isLocked)&&!t.classList.contains(p.isBooked)},e.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},e.prototype.isDayItem=function(t){return t.classList.contains(p.dayItem)},e.prototype.onMouseEnter=function(t){var e=this,i=t.target;if(this.isDayItem(i)&&("function"==typeof this.options.onDayHover&&this.options.onDayHover.call(this,l.DateTime.parseDateTime(i.dataset.time),i.classList.toString().split(/\s/),i),this.shouldAllowMouseEnter(i))){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var o=this.picker.querySelector("."+p.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),n=this.datePicked[0].clone(),s=new l.DateTime(i.dataset.time),r=!1;if(n.getTime()>s.getTime()){var a=n.clone();n=s.clone(),s=a.clone(),r=!0}if(Array.prototype.slice.call(this.picker.querySelectorAll("."+p.dayItem)).forEach((function(t){var i=new l.DateTime(t.dataset.time),o=e.renderDay(i);i.isBetween(n,s)&&o.classList.add(p.isInRange),t.className=o.className})),i.classList.add(p.isEndDate),r?(o&&o.classList.add(p.isFlipped),i.classList.add(p.isFlipped)):(o&&o.classList.remove(p.isFlipped),i.classList.remove(p.isFlipped)),this.options.showTooltip){var c=s.diff(n,"day");if(this.options.hotelMode||(c+=1),c>0){var h=this.pluralSelector(c),d=c+" "+(this.options.tooltipText[h]?this.options.tooltipText[h]:"["+h+"]");this.showTooltip(i,d)}else this.hideTooltip()}}},e.prototype.onMouseLeave=function(t){t.target;this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},e.prototype.onInput=function(t){var e=this.parseInput(),i=e[0],o=e[1],n=this.options.format;if(this.options.elementEnd?i instanceof l.DateTime&&o instanceof l.DateTime&&i.format(n)===this.options.element.value&&o.format(n)===this.options.elementEnd.value:this.options.singleMode?i instanceof l.DateTime&&i.format(n)===this.options.element.value:i instanceof l.DateTime&&o instanceof l.DateTime&&""+i.format(n)+this.options.delimiter+o.format(n)===this.options.element.value){if(o&&i.getTime()>o.getTime()){var s=i.clone();i=o.clone(),o=s.clone()}this.options.startDate=new l.DateTime(i,this.options.format,this.options.lang),o&&(this.options.endDate=new l.DateTime(o,this.options.format,this.options.lang)),this.updateInput(),this.render();var r=i.clone(),a=0;(this.options.elementEnd?i.format(n)===t.target.value:t.target.value.startsWith(i.format(n)))||(r=o.clone(),a=this.options.numberOfMonths-1),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.getStartDate(),this.getEndDate()),this.gotoDate(r,a)}},e.prototype.isShowning=function(){return this.picker&&"none"!==this.picker.style.display},e.prototype.loadPolyfillsForIE11=function(){Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),i=e.length,o=new Array(i);i;)o[i-=1]=[e[i],t[e[i]]];return o}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null})},e}(a.Calendar);e.Litepicker=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(3);e.Litepicker=o.Litepicker,i(9),i(10),window.Litepicker=o.Litepicker,e.default=o.Litepicker},function(t,e,i){"use strict";var o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(i(1)),r=i(2),a=function(){function t(){this.options={element:null,elementEnd:null,parentEl:null,firstDay:1,format:"YYYY-MM-DD",lang:"en-US",delimiter:" - ",numberOfMonths:1,numberOfColumns:1,startDate:null,endDate:null,zIndex:9999,minDate:null,maxDate:null,minDays:null,maxDays:null,selectForward:!1,selectBackward:!1,splitView:!1,inlineMode:!1,singleMode:!0,autoApply:!0,allowRepick:!1,showWeekNumbers:!1,showTooltip:!0,hotelMode:!1,disableWeekends:!1,scrollToDate:!0,mobileFriendly:!0,useResetBtn:!1,autoRefresh:!1,moveByOneMonth:!1,lockDaysFormat:"YYYY-MM-DD",lockDays:[],disallowLockDaysInRange:!1,lockDaysInclusivity:"[]",bookedDaysFormat:"YYYY-MM-DD",bookedDays:[],disallowBookedDaysInRange:!1,bookedDaysInclusivity:"[]",anyBookedDaysAsCheckout:!1,highlightedDaysFormat:"YYYY-MM-DD",highlightedDays:[],dropdowns:{minYear:1990,maxYear:null,months:!1,years:!1},buttonText:{apply:"Apply",cancel:"Cancel",previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>\n </svg>'},tooltipText:{one:"day",other:"days"},tooltipPluralSelector:null,onShow:null,onHide:null,onSelect:null,onError:null,onRender:null,onRenderDay:null,onChangeMonth:null,onChangeYear:null,onDayHover:null,onShowTooltip:null,resetBtnCallback:null,moduleRanges:null,moduleNavKeyboard:null},this.calendars=[],this.datePicked=[]}return t.prototype.render=function(){var t=this,e=document.createElement("div");e.className=s.containerMain;var i=document.createElement("div");i.className=s.containerMonths,s["columns"+this.options.numberOfColumns]&&(i.classList.remove(s.columns2,s.columns3,s.columns4),i.classList.add(s["columns"+this.options.numberOfColumns])),this.options.splitView&&i.classList.add(s.splitView),this.options.showWeekNumbers&&i.classList.add(s.showWeekNumbers);for(var o=this.calendars[0].clone(),n=o.getMonth(),r=o.getMonth()+this.options.numberOfMonths,a=0,l=n;l<r;l+=1){var p=o.clone();p.setDate(1),this.options.splitView?p=this.calendars[a].clone():p.setMonth(l),i.appendChild(this.renderMonth(p)),a+=1}if(this.picker.innerHTML="",e.appendChild(i),this.options.useResetBtn){var c=document.createElement("a");c.href="#",c.className=s.resetButton,c.innerHTML=this.options.buttonText.reset,c.addEventListener("click",(function(e){e.preventDefault(),t.clearSelection(),"function"==typeof t.options.resetBtnCallback&&t.options.resetBtnCallback.call(t)})),e.querySelector("."+s.monthItem+":last-child").querySelector("."+s.monthItemHeader).appendChild(c)}if(this.picker.appendChild(e),this.options.autoApply&&!this.options.footerHTML||this.picker.appendChild(this.renderFooter()),this.options.showTooltip&&this.picker.appendChild(this.renderTooltip()),this.options.moduleRanges){if("function"!=typeof this.enableModuleRanges)throw new Error("moduleRanges is on but library does not included. See https://github.com/wakirin/litepicker-module-ranges.");this.enableModuleRanges.call(this,this)}"function"==typeof this.options.onRender&&this.options.onRender.call(this,this.picker)},t.prototype.renderMonth=function(t){var e=this,i=t.clone(),o=32-new Date(i.getFullYear(),i.getMonth(),32).getDate(),a=document.createElement("div");a.className=s.monthItem;var l=document.createElement("div");l.className=s.monthItemHeader;var p=document.createElement("div");if(this.options.dropdowns.months){var c=document.createElement("select");c.className=s.monthItemName;for(var h=0;h<12;h+=1){var d=document.createElement("option"),u=new n.DateTime(new Date(t.getFullYear(),h,1,0,0,0));d.value=String(h),d.text=u.toLocaleString(this.options.lang,{month:"long"}),d.disabled=this.options.minDate&&u.isBefore(new n.DateTime(this.options.minDate),"month")||this.options.maxDate&&u.isAfter(new n.DateTime(this.options.maxDate),"month"),d.selected=u.getMonth()===t.getMonth(),c.appendChild(d)}c.addEventListener("change",(function(t){var i=t.target,o=0;if(e.options.splitView){var n=i.closest("."+s.monthItem);o=r.findNestedMonthItem(n)}e.calendars[o].setMonth(Number(i.value)),e.render(),"function"==typeof e.options.onChangeMonth&&e.options.onChangeMonth.call(e,e.calendars[o],o)})),p.appendChild(c)}else{var m=document.createElement("strong");m.className=s.monthItemName,m.innerHTML=t.toLocaleString(this.options.lang,{month:"long"}),p.appendChild(m)}if(this.options.dropdowns.years){var f=document.createElement("select");f.className=s.monthItemYear;var g=this.options.dropdowns.minYear,y=this.options.dropdowns.maxYear?this.options.dropdowns.maxYear:(new Date).getFullYear();if(t.getFullYear()>y)(d=document.createElement("option")).value=String(t.getFullYear()),d.text=String(t.getFullYear()),d.selected=!0,d.disabled=!0,f.appendChild(d);for(h=y;h>=g;h-=1){var d=document.createElement("option"),k=new n.DateTime(new Date(h,0,1,0,0,0));d.value=h,d.text=h,d.disabled=this.options.minDate&&k.isBefore(new n.DateTime(this.options.minDate),"year")||this.options.maxDate&&k.isAfter(new n.DateTime(this.options.maxDate),"year"),d.selected=t.getFullYear()===h,f.appendChild(d)}if(t.getFullYear()<g)(d=document.createElement("option")).value=String(t.getFullYear()),d.text=String(t.getFullYear()),d.selected=!0,d.disabled=!0,f.appendChild(d);if("asc"===this.options.dropdowns.years){var v=Array.prototype.slice.call(f.childNodes).reverse();f.innerHTML="",v.forEach((function(t){t.innerHTML=t.value,f.appendChild(t)}))}f.addEventListener("change",(function(t){var i=t.target,o=0;if(e.options.splitView){var n=i.closest("."+s.monthItem);o=r.findNestedMonthItem(n)}e.calendars[o].setFullYear(Number(i.value)),e.render(),"function"==typeof e.options.onChangeYear&&e.options.onChangeYear.call(e,e.calendars[o],o)})),p.appendChild(f)}else{var D=document.createElement("span");D.className=s.monthItemYear,D.innerHTML=String(t.getFullYear()),p.appendChild(D)}var b=document.createElement("a");b.href="#",b.className=s.buttonPreviousMonth,b.innerHTML=this.options.buttonText.previousMonth;var w=document.createElement("a");w.href="#",w.className=s.buttonNextMonth,w.innerHTML=this.options.buttonText.nextMonth,l.appendChild(b),l.appendChild(p),l.appendChild(w),this.options.minDate&&i.isSameOrBefore(new n.DateTime(this.options.minDate),"month")&&a.classList.add(s.noPreviousMonth),this.options.maxDate&&i.isSameOrAfter(new n.DateTime(this.options.maxDate),"month")&&a.classList.add(s.noNextMonth);var M=document.createElement("div");M.className=s.monthItemWeekdaysRow,this.options.showWeekNumbers&&(M.innerHTML="<div>W</div>");for(var x=1;x<=7;x+=1){var T=3+this.options.firstDay+x,_=document.createElement("div");_.innerHTML=this.weekdayName(T),_.title=this.weekdayName(T,"long"),M.appendChild(_)}var L=document.createElement("div");L.className=s.containerDays;var S=this.calcSkipDays(i);this.options.showWeekNumbers&&S&&L.appendChild(this.renderWeekNumber(i));for(var E=0;E<S;E+=1){var I=document.createElement("div");L.appendChild(I)}for(E=1;E<=o;E+=1)i.setDate(E),this.options.showWeekNumbers&&i.getDay()===this.options.firstDay&&L.appendChild(this.renderWeekNumber(i)),L.appendChild(this.renderDay(i));return a.appendChild(l),a.appendChild(M),a.appendChild(L),a},t.prototype.renderDay=function(t){var e=this;t.setHours();var i=document.createElement("a");if(i.href="#",i.className=s.dayItem,i.innerHTML=String(t.getDate()),i.dataset.time=String(t.getTime()),t.toDateString()===(new Date).toDateString()&&i.classList.add(s.isToday),this.datePicked.length?(this.datePicked[0].toDateString()===t.toDateString()&&(i.classList.add(s.isStartDate),this.options.singleMode&&i.classList.add(s.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===t.toDateString()&&i.classList.add(s.isEndDate),2===this.datePicked.length&&t.isBetween(this.datePicked[0],this.datePicked[1])&&i.classList.add(s.isInRange)):this.options.startDate&&(this.options.startDate.toDateString()===t.toDateString()&&(i.classList.add(s.isStartDate),this.options.singleMode&&i.classList.add(s.isEndDate)),this.options.endDate&&this.options.endDate.toDateString()===t.toDateString()&&i.classList.add(s.isEndDate),this.options.startDate&&this.options.endDate&&t.isBetween(this.options.startDate,this.options.endDate)&&i.classList.add(s.isInRange)),this.options.minDate&&t.isBefore(new n.DateTime(this.options.minDate))&&i.classList.add(s.isLocked),this.options.maxDate&&t.isAfter(new n.DateTime(this.options.maxDate))&&i.classList.add(s.isLocked),this.options.minDays&&1===this.datePicked.length){var o=Number(!this.options.hotelMode),r=this.datePicked[0].clone().subtract(this.options.minDays-o,"day"),a=this.datePicked[0].clone().add(this.options.minDays-o,"day");t.isBetween(r,this.datePicked[0],"(]")&&i.classList.add(s.isLocked),t.isBetween(this.datePicked[0],a,"[)")&&i.classList.add(s.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){o=Number(this.options.hotelMode),r=this.datePicked[0].clone().subtract(this.options.maxDays+o,"day"),a=this.datePicked[0].clone().add(this.options.maxDays+o,"day");t.isSameOrBefore(r)&&i.classList.add(s.isLocked),t.isSameOrAfter(a)&&i.classList.add(s.isLocked)}(this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&i.classList.add(s.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&i.classList.add(s.isLocked),this.options.lockDays.length)&&(this.options.lockDays.filter((function(i){return i instanceof Array?t.isBetween(i[0],i[1],e.options.lockDaysInclusivity):i.isSame(t,"day")})).length&&i.classList.add(s.isLocked));this.options.highlightedDays.length&&(this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&i.classList.add(s.isHighlighted));if(this.datePicked.length<=1&&this.options.bookedDays.length){var l=this.options.bookedDaysInclusivity;this.options.hotelMode&&1===this.datePicked.length&&(l="()");var p=t.clone();p.subtract(1,"day"),t.clone().add(1,"day");var c=this.dateIsBooked(t,l),h=this.dateIsBooked(p,"[]"),d=this.dateIsBooked(t,"(]"),u=0===this.datePicked.length&&c||1===this.datePicked.length&&h&&c||1===this.datePicked.length&&h&&d,m=this.options.anyBookedDaysAsCheckout&&1===this.datePicked.length;u&&!m&&i.classList.add(s.isBooked)}return!this.options.disableWeekends||6!==t.getDay()&&0!==t.getDay()||i.classList.add(s.isLocked),"function"==typeof this.options.onRenderDay&&this.options.onRenderDay.call(this,i),i},t.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=s.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n <span class="'+s.previewDateRange+'"></span>\n <button type="button" class="'+s.buttonCancel+'">'+this.options.buttonText.cancel+'</button>\n <button type="button" class="'+s.buttonApply+'">'+this.options.buttonText.apply+"</button>\n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+s.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+s.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var i=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+s.previewDateRange).innerHTML=""+e+this.options.delimiter+i}return t},t.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),i=t.getWeek(this.options.firstDay);return e.className=s.weekNumber,e.innerHTML=53===i&&0===t.getMonth()?"53 / 1":i,e},t.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=s.containerTooltip,t},t.prototype.dateIsBooked=function(t,e){return this.options.bookedDays.filter((function(i){return i instanceof Array?t.isBetween(i[0],i[1],e):i.isSame(t,"day")})).length},t.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},t.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},t}();e.Calendar=a},function(t,e,i){(e=t.exports=i(7)(!1)).push([t.i,':root{--litepickerBgColor: #fff;--litepickerMonthHeaderTextColor: #333;--litepickerMonthButton: #9e9e9e;--litepickerMonthButtonHover: #2196f3;--litepickerMonthWidth: calc(var(--litepickerDayWidth) * 7);--litepickerMonthWeekdayColor: #9e9e9e;--litepickerDayColor: #333;--litepickerDayColorHover: #2196f3;--litepickerDayIsTodayColor: #f44336;--litepickerDayIsInRange: #bbdefb;--litepickerDayIsLockedColor: #9e9e9e;--litepickerDayIsBookedColor: #9e9e9e;--litepickerDayIsStartColor: #fff;--litepickerDayIsStartBg: #2196f3;--litepickerDayIsEndColor: #fff;--litepickerDayIsEndBg: #2196f3;--litepickerDayWidth: 38px;--litepickerButtonCancelColor: #fff;--litepickerButtonCancelBg: #9e9e9e;--litepickerButtonApplyColor: #fff;--litepickerButtonApplyBg: #2196f3;--litepickerButtonResetBtn: #909090;--litepickerButtonResetBtnHover: #2196f3;--litepickerHighlightedDayColor: #333;--litepickerHighlightedDayBg: #ffeb3b}.show-week-numbers{--litepickerMonthWidth: calc(var(--litepickerDayWidth) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepickerBgColor);border-radius:5px;-webkit-box-shadow:0 0 5px #ddd;box-shadow:0 0 5px #ddd;width:calc(var(--litepickerMonthWidth) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepickerMonthWidth) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepickerMonthWidth) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepickerMonthWidth) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepickerMonthWidth);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepickerMonthHeaderTextColor)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepickerButtonResetBtn)}.litepicker .container__months .month-item-header .reset-button>svg,.litepicker .container__months .month-item-header .reset-button>img{fill:var(--litepickerButtonResetBtn);pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepickerButtonResetBtnHover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepickerButtonResetBtnHover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;color:var(--litepickerMonthButton);padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img,.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepickerMonthButton);pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month:hover,.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepickerMonthButtonHover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg,.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepickerMonthButtonHover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepickerMonthWeekdayColor)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepickerDayWidth);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepickerDayWidth)}.litepicker .container__days .day-item{color:var(--litepickerDayColor);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepickerDayColorHover);-webkit-box-shadow:inset 0 0 0 1px var(--litepickerDayColorHover);box-shadow:inset 0 0 0 1px var(--litepickerDayColorHover)}.litepicker .container__days .day-item.is-today{color:var(--litepickerDayIsTodayColor)}.litepicker .container__days .day-item.is-locked{color:var(--litepickerDayIsLockedColor)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepickerDayIsLockedColor);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-booked{color:var(--litepickerDayIsBookedColor)}.litepicker .container__days .day-item.is-booked:hover{color:var(--litepickerDayIsBookedColor);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepickerDayIsInRange);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepickerDayIsStartColor);background-color:var(--litepickerDayIsStartBg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepickerDayIsEndColor);background-color:var(--litepickerDayIsEndBg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepickerHighlightedDayColor);background-color:var(--litepickerHighlightedDayBg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#9e9e9e;font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:#fafafa;-webkit-box-shadow:inset 0px 3px 3px 0px #ddd;box-shadow:inset 0px 3px 3px 0px #ddd;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepickerButtonCancelBg);color:var(--litepickerButtonCancelColor);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel>svg,.litepicker .container__footer .button-cancel>img{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepickerButtonApplyBg);color:var(--litepickerButtonApplyColor);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply>svg,.litepicker .container__footer .button-apply>img{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid #fff;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.litepicker-open{overflow:hidden}.litepicker-backdrop{display:none;background-color:#000;opacity:0.3;position:fixed;top:0;right:0;bottom:0;left:0}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isBooked:"is-booked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip",litepickerOpen:"litepicker-open",litepickerBackdrop:"litepicker-backdrop"}},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",o=t[3];if(!o)return i;if(e&&"function"==typeof btoa){var n=(r=o,a=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),s=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot).concat(t," */")}));return[i].concat(s).concat([n]).join("\n")}var r,a,l;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2],"{").concat(i,"}"):i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},n=0;n<this.length;n++){var s=this[n][0];null!=s&&(o[s]=!0)}for(var r=0;r<t.length;r++){var a=t[r];null!=a[0]&&o[a[0]]||(i&&!a[2]?a[2]=i:i&&(a[2]="(".concat(a[2],") and (").concat(i,")")),e.push(a))}},e}},function(t,e,i){"use strict";var o,n={},s=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}();function a(t,e){for(var i=[],o={},n=0;n<t.length;n++){var s=t[n],r=e.base?s[0]+e.base:s[0],a={css:s[1],media:s[2],sourceMap:s[3]};o[r]?o[r].parts.push(a):i.push(o[r]={id:r,parts:[a]})}return i}function l(t,e){for(var i=0;i<t.length;i++){var o=t[i],s=n[o.id],r=0;if(s){for(s.refs++;r<s.parts.length;r++)s.parts[r](o.parts[r]);for(;r<o.parts.length;r++)s.parts.push(g(o.parts[r],e))}else{for(var a=[];r<o.parts.length;r++)a.push(g(o.parts[r],e));n[o.id]={id:o.id,refs:1,parts:a}}}}function p(t){var e=document.createElement("style");if(void 0===t.attributes.nonce){var o=i.nc;o&&(t.attributes.nonce=o)}if(Object.keys(t.attributes).forEach((function(i){e.setAttribute(i,t.attributes[i])})),"function"==typeof t.insert)t.insert(e);else{var n=r(t.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var c,h=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function d(t,e,i,o){var n=i?"":o.css;if(t.styleSheet)t.styleSheet.cssText=h(e,n);else{var s=document.createTextNode(n),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}function u(t,e,i){var o=i.css,n=i.media,s=i.sourceMap;if(n&&t.setAttribute("media",n),s&&btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var m=null,f=0;function g(t,e){var i,o,n;if(e.singleton){var s=f++;i=m||(m=p(e)),o=d.bind(null,i,s,!1),n=d.bind(null,i,s,!0)}else i=p(e),o=u.bind(null,i,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).attributes="object"==typeof e.attributes?e.attributes:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s());var i=a(t,e);return l(i,e),function(t){for(var o=[],s=0;s<i.length;s++){var r=i[s],p=n[r.id];p&&(p.refs--,o.push(p))}t&&l(a(t,e),e);for(var c=0;c<o.length;c++){var h=o[c];if(0===h.refs){for(var d=0;d<h.parts.length;d++)h.parts[d]();delete n[h.id]}}}}},function(t,e,i){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),r=i(3),a=n(i(1)),l=i(2);r.Litepicker.prototype.show=function(t){void 0===t&&(t=null);var e=t||this.options.element;if(this.triggerElement=e,this.options.inlineMode)return this.picker.style.position="static",this.picker.style.display="inline-block",this.picker.style.top=null,this.picker.style.left=null,this.picker.style.bottom=null,void(this.picker.style.right=null);if(this.options.scrollToDate)if(!this.options.startDate||t&&t!==this.options.element){if(t&&this.options.endDate&&t===this.options.elementEnd){var i=this.options.endDate.clone();i.setDate(1),this.options.numberOfMonths>1&&i.setMonth(i.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=i.clone()}}else{var o=this.options.startDate.clone();o.setDate(1),this.calendars[0]=o.clone()}if(this.options.mobileFriendly&&l.isMobile()){this.picker.style.position="fixed",this.picker.style.display="block","portrait"===l.getOrientation()?(this.options.numberOfMonths=1,this.options.numberOfColumns=1):(this.options.numberOfMonths=2,this.options.numberOfColumns=2),this.render();var n=this.picker.getBoundingClientRect();return this.picker.style.top="calc(50% - "+n.height/2+"px)",this.picker.style.left="calc(50% - "+n.width/2+"px)",this.picker.style.right=null,this.picker.style.bottom=null,this.picker.style.zIndex=this.options.zIndex,this.backdrop.style.display="block",this.backdrop.style.zIndex=this.options.zIndex-1,document.body.classList.add(a.litepickerOpen),"function"==typeof this.options.onShow&&this.options.onShow.call(this),void(t?t.blur():this.options.element.blur())}this.render(),this.picker.style.position="absolute",this.picker.style.display="block",this.picker.style.zIndex=this.options.zIndex;var s=e.getBoundingClientRect(),r=this.picker.getBoundingClientRect(),p=s.bottom,c=s.left,h=0,d=0,u=0,m=0;if(this.options.parentEl){var f=this.picker.parentNode.getBoundingClientRect();p-=f.bottom,(p+=s.height)+r.height>window.innerHeight&&s.top-f.top-s.height>0&&(u=s.top-f.top-s.height),(c-=f.left)+r.width>window.innerWidth&&s.right-f.right-r.width>0&&(m=s.right-f.right-r.width)}else h=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,p+r.height>window.innerHeight&&s.top-r.height>0&&(u=s.top-r.height),c+r.width>window.innerWidth&&s.right-r.width>0&&(m=s.right-r.width);this.picker.style.top=(u||p)+d+"px",this.picker.style.left=(m||c)+h+"px",this.picker.style.right=null,this.picker.style.bottom=null,"function"==typeof this.options.onShow&&this.options.onShow.call(this)},r.Litepicker.prototype.hide=function(){this.isShowning()&&(this.datePicked.length=0,this.updateInput(),this.options.inlineMode?this.render():(this.picker.style.display="none","function"==typeof this.options.onHide&&this.options.onHide.call(this),this.options.mobileFriendly&&(document.body.classList.remove(a.litepickerOpen),this.backdrop.style.display="none")))},r.Litepicker.prototype.getDate=function(){return this.getStartDate()},r.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone().getDateInstance():null},r.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone().getDateInstance():null},r.Litepicker.prototype.setDate=function(t){this.setStartDate(t),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.getDate())},r.Litepicker.prototype.setStartDate=function(t){t&&(this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang),this.updateInput())},r.Litepicker.prototype.setEndDate=function(t){t&&(this.options.endDate=new s.DateTime(t,this.options.format,this.options.lang),this.options.startDate.getTime()>this.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e){this.triggerElement=void 0,this.setStartDate(t),this.setEndDate(e),this.updateInput(),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.getStartDate(),this.getEndDate())},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var i=new s.DateTime(t);i.setDate(1),this.calendars[e]=i.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=s.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setBookedDays=function(t){this.options.bookedDays=s.DateTime.convertArray(t,this.options.bookedDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=s.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new s.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new s.DateTime(t.endDate,this.options.format,this.options.lang));var e=o(o({},this.options.dropdowns),t.dropdowns),i=o(o({},this.options.buttonText),t.buttonText),n=o(o({},this.options.tooltipText),t.tooltipText);this.options=o(o({},this.options),t),this.options.dropdowns=o({},e),this.options.buttonText=o({},i),this.options.tooltipText=o({},n),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var r=0;r<this.options.numberOfMonths;r+=1){var a=this.options.startDate?this.options.startDate.clone():new s.DateTime;a.setDate(1),a.setMonth(a.getMonth()+r),this.calendars[r]=a}this.options.lockDays.length&&(this.options.lockDays=s.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.bookedDays.length&&(this.options.bookedDays=s.DateTime.convertArray(this.options.bookedDays,this.options.bookedDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=s.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},r.Litepicker.prototype.clearSelection=function(){this.options.startDate=null,this.options.endDate=null,this.datePicked.length=0,this.updateInput(),this.isShowning()&&this.render()},r.Litepicker.prototype.destroy=function(){this.picker&&this.picker.parentNode&&(this.picker.parentNode.removeChild(this.picker),this.picker=null),this.backdrop&&this.backdrop.parentNode&&this.backdrop.parentNode.removeChild(this.backdrop)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}]).Litepicker}));
/***/ }),
/***/ "53e2":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__("07e3");
var toObject = __webpack_require__("241e");
var IE_PROTO = __webpack_require__("5559")('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;
};
/***/ }),
/***/ "5402":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__("00ce");
var callBound = __webpack_require__("545e");
var inspect = __webpack_require__("2714");
var $TypeError = GetIntrinsic('%TypeError%');
var $WeakMap = GetIntrinsic('%WeakMap%', true);
var $Map = GetIntrinsic('%Map%', true);
var $weakMapGet = callBound('WeakMap.prototype.get', true);
var $weakMapSet = callBound('WeakMap.prototype.set', true);
var $weakMapHas = callBound('WeakMap.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSet = callBound('Map.prototype.set', true);
var $mapHas = callBound('Map.prototype.has', true);
/*
* This function traverses the list returning the node corresponding to the
* given key.
*
* That node is also moved to the head of the list, so that if it's accessed
* again we don't need to traverse the whole list. By doing so, all the recently
* used nodes can be accessed relatively quickly.
*/
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
if (curr.key === key) {
prev.next = curr.next;
curr.next = list.next;
list.next = curr; // eslint-disable-line no-param-reassign
return curr;
}
}
};
var listGet = function (objects, key) {
var node = listGetNode(objects, key);
return node && node.value;
};
var listSet = function (objects, key, value) {
var node = listGetNode(objects, key);
if (node) {
node.value = value;
} else {
// Prepend the new node to the beginning of the list
objects.next = { // eslint-disable-line no-param-reassign
key: key,
next: objects.next,
value: value
};
}
};
var listHas = function (objects, key) {
return !!listGetNode(objects, key);
};
module.exports = function getSideChannel() {
var $wm;
var $m;
var $o;
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
get: function (key) { // eslint-disable-line consistent-return
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapGet($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapGet($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return listGet($o, key);
}
}
},
has: function (key) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapHas($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapHas($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return listHas($o, key);
}
}
return false;
},
set: function (key, value) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if (!$wm) {
$wm = new $WeakMap();
}
$weakMapSet($wm, key, value);
} else if ($Map) {
if (!$m) {
$m = new $Map();
}
$mapSet($m, key, value);
} else {
if (!$o) {
/*
* Initialize the linked list as an empty node, so that we don't have
* to special-case handling of the first node: we can always refer to
* it as (previous node).next, instead of something like (list).head
*/
$o = { key: {}, next: null };
}
listSet($o, key, value);
}
}
};
return channel;
};
/***/ }),
/***/ "545e":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__("00ce");
var callBind = __webpack_require__("3eb1");
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
module.exports = function callBoundIntrinsic(name, allowMissing) {
var intrinsic = GetIntrinsic(name, !!allowMissing);
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
return callBind(intrinsic);
}
return intrinsic;
};
/***/ }),
/***/ "549b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__("d864");
var $export = __webpack_require__("63b6");
var toObject = __webpack_require__("241e");
var call = __webpack_require__("b0dc");
var isArrayIter = __webpack_require__("3702");
var toLength = __webpack_require__("b447");
var createProperty = __webpack_require__("20fd");
var getIterFn = __webpack_require__("7cd6");
$export($export.S + $export.F * !__webpack_require__("4ee1")(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;
}
});
/***/ }),
/***/ "551c":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__("2d00");
var global = __webpack_require__("7726");
var ctx = __webpack_require__("9b43");
var classof = __webpack_require__("23c6");
var $export = __webpack_require__("5ca1");
var isObject = __webpack_require__("d3f4");
var aFunction = __webpack_require__("d8e8");
var anInstance = __webpack_require__("f605");
var forOf = __webpack_require__("4a59");
var speciesConstructor = __webpack_require__("ebd6");
var task = __webpack_require__("1991").set;
var microtask = __webpack_require__("8079")();
var newPromiseCapabilityModule = __webpack_require__("a5b8");
var perform = __webpack_require__("9c80");
var userAgent = __webpack_require__("a25f");
var promiseResolve = __webpack_require__("bcaa");
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8 || '';
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
var USE_NATIVE = !!function () {
try {
// correct subclassing with @@species support
var promise = $Promise.resolve(1);
var FakePromise = (promise.constructor = {})[__webpack_require__("2b4c")('species')] = function (exec) {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return (isNode || typeof PromiseRejectionEvent == 'function')
&& promise.then(empty) instanceof FakePromise
// v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// we can't detect it synchronously, so just check versions
&& v8.indexOf('6.6') !== 0
&& userAgent.indexOf('Chrome/66') === -1;
} catch (e) { /* empty */ }
}();
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
if (promise._n) return;
promise._n = true;
var chain = promise._c;
microtask(function () {
var value = promise._v;
var ok = promise._s == 1;
var i = 0;
var run = function (reaction) {
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then, exited;
try {
if (handler) {
if (!ok) {
if (promise._h == 2) onHandleUnhandled(promise);
promise._h = 1;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // may throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (e) {
if (domain && !exited) domain.exit();
reject(e);
}
};
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
promise._c = [];
promise._n = false;
if (isReject && !promise._h) onUnhandled(promise);
});
};
var onUnhandled = function (promise) {
task.call(global, function () {
var value = promise._v;
var unhandled = isUnhandled(promise);
var result, handler, console;
if (unhandled) {
result = perform(function () {
if (isNode) {
process.emit('unhandledRejection', value, promise);
} else if (handler = global.onunhandledrejection) {
handler({ promise: promise, reason: value });
} else if ((console = global.console) && console.error) {
console.error('Unhandled promise rejection', value);
}
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
} promise._a = undefined;
if (unhandled && result.e) throw result.v;
});
};
var isUnhandled = function (promise) {
return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
var handler;
if (isNode) {
process.emit('rejectionHandled', promise);
} else if (handler = global.onrejectionhandled) {
handler({ promise: promise, reason: promise._v });
}
});
};
var $reject = function (value) {
var promise = this;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
promise._v = value;
promise._s = 2;
if (!promise._a) promise._a = promise._c.slice();
notify(promise, true);
};
var $resolve = function (value) {
var promise = this;
var then;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
if (then = isThenable(value)) {
microtask(function () {
var wrapper = { _w: promise, _d: false }; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch (e) {
$reject.call(wrapper, e);
}
});
} else {
promise._v = value;
promise._s = 1;
notify(promise, false);
}
} catch (e) {
$reject.call({ _w: promise, _d: false }, e); // wrap
}
};
// constructor polyfill
if (!USE_NATIVE) {
// 25.4.3.1 Promise(executor)
$Promise = function Promise(executor) {
anInstance(this, $Promise, PROMISE, '_h');
aFunction(executor);
Internal.call(this);
try {
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
} catch (err) {
$reject.call(this, err);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
this._c = []; // <- awaiting reactions
this._a = undefined; // <- checked in isUnhandled reactions
this._s = 0; // <- state
this._d = false; // <- done
this._v = undefined; // <- value
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
this._n = false; // <- notify
};
Internal.prototype = __webpack_require__("dcbc")($Promise.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected) {
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = isNode ? process.domain : undefined;
this._c.push(reaction);
if (this._a) this._a.push(reaction);
if (this._s) notify(this, false);
return reaction.promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
this.promise = promise;
this.resolve = ctx($resolve, promise, 1);
this.reject = ctx($reject, promise, 1);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === $Promise || C === Wrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__("7f20")($Promise, PROMISE);
__webpack_require__("7a56")(PROMISE);
Wrapper = __webpack_require__("8378")[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r) {
var capability = newPromiseCapability(this);
var $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x) {
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__("5cc5")(function (iter) {
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var values = [];
var index = 0;
var remaining = 1;
forOf(iterable, false, function (promise) {
var $index = index++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
C.resolve(promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[$index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.e) reject(result.v);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
forOf(iterable, false, function (promise) {
C.resolve(promise).then(capability.resolve, reject);
});
});
if (result.e) reject(result.v);
return capability.promise;
}
});
/***/ }),
/***/ "5537":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("8378");
var global = __webpack_require__("7726");
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__("2d00") ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "5559":
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__("dbdb")('keys');
var uid = __webpack_require__("62a0");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "55b2":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
try {
strValue.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = __webpack_require__("07a4")();
module.exports = function isString(value) {
if (typeof value === 'string') {
return true;
}
if (typeof value !== 'object') {
return false;
}
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};
/***/ }),
/***/ "55dd":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__("5ca1");
var aFunction = __webpack_require__("d8e8");
var toObject = __webpack_require__("4bf8");
var fails = __webpack_require__("79e5");
var $sort = [].sort;
var test = [1, 2, 3];
$export($export.P + $export.F * (fails(function () {
// IE8-
test.sort(undefined);
}) || !fails(function () {
// V8 bug
test.sort(null);
// Old WebKit
}) || !__webpack_require__("2f21")($sort)), 'Array', {
// 22.1.3.25 Array.prototype.sort(comparefn)
sort: function sort(comparefn) {
return comparefn === undefined
? $sort.call(toObject(this))
: $sort.call(toObject(this), aFunction(comparefn));
}
});
/***/ }),
/***/ "5708":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $Object = Object;
var $TypeError = TypeError;
module.exports = function flags() {
if (this != null && this !== $Object(this)) {
throw new $TypeError('RegExp.prototype.flags getter called on non-object');
}
var result = '';
if (this.hasIndices) {
result += 'd';
}
if (this.global) {
result += 'g';
}
if (this.ignoreCase) {
result += 'i';
}
if (this.multiline) {
result += 'm';
}
if (this.dotAll) {
result += 's';
}
if (this.unicode) {
result += 'u';
}
if (this.sticky) {
result += 'y';
}
return result;
};
/***/ }),
/***/ "57ec":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__("5708");
var supportsDescriptors = __webpack_require__("f367").supportsDescriptors;
var $gOPD = Object.getOwnPropertyDescriptor;
module.exports = function getPolyfill() {
if (supportsDescriptors && (/a/mig).flags === 'gim') {
var descriptor = $gOPD(RegExp.prototype, 'flags');
if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {
return descriptor.get;
}
}
return implementation;
};
/***/ }),
/***/ "5834":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__("d6ef");
module.exports = function getPolyfill() {
return typeof Object.is === 'function' ? Object.is : implementation;
};
/***/ }),
/***/ "584a":
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.12' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "5873":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VueEditor; });
/* unused harmony export install */
/* harmony import */ var quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9339");
/* harmony import */ var quill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill__WEBPACK_IMPORTED_MODULE_0__);
/*!
* vue2-editor v2.10.3
* (c) 2021 David Royer
* Released under the MIT License.
*/
var defaultToolbar = [[{
header: [false, 1, 2, 3, 4, 5, 6]
}], ["bold", "italic", "underline", "strike"], // toggled buttons
[{
align: ""
}, {
align: "center"
}, {
align: "right"
}, {
align: "justify"
}], ["blockquote", "code-block"], [{
list: "ordered"
}, {
list: "bullet"
}, {
list: "check"
}], [{
indent: "-1"
}, {
indent: "+1"
}], // outdent/indent
[{
color: []
}, {
background: []
}], // dropdown with defaults from theme
["link", "image", "video"], ["clean"] // remove formatting button
];
var oldApi = {
props: {
customModules: Array
},
methods: {
registerCustomModules: function registerCustomModules(Quill) {
if (this.customModules !== undefined) {
this.customModules.forEach(function (customModule) {
Quill.register("modules/" + customModule.alias, customModule.module);
});
}
}
}
};
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
/**
* Performs a deep merge of `source` into `target`.
* Mutates `target` only but not its objects and arrays.
*
*/
function mergeDeep(target, source) {
var isObject = function isObject(obj) {
return obj && _typeof(obj) === "object";
};
if (!isObject(target) || !isObject(source)) {
return source;
}
Object.keys(source).forEach(function (key) {
var targetValue = target[key];
var sourceValue = source[key];
if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {
target[key] = targetValue.concat(sourceValue);
} else if (isObject(targetValue) && isObject(sourceValue)) {
target[key] = mergeDeep(Object.assign({}, targetValue), sourceValue);
} else {
target[key] = sourceValue;
}
});
return target;
}
var BlockEmbed = quill__WEBPACK_IMPORTED_MODULE_0___default.a.import("blots/block/embed");
var HorizontalRule =
/*#__PURE__*/
function (_BlockEmbed) {
_inherits(HorizontalRule, _BlockEmbed);
function HorizontalRule() {
_classCallCheck(this, HorizontalRule);
return _possibleConstructorReturn(this, _getPrototypeOf(HorizontalRule).apply(this, arguments));
}
return HorizontalRule;
}(BlockEmbed);
HorizontalRule.blotName = "hr";
HorizontalRule.tagName = "hr";
quill__WEBPACK_IMPORTED_MODULE_0___default.a.register("formats/horizontal", HorizontalRule);
var MarkdownShortcuts =
/*#__PURE__*/
function () {
function MarkdownShortcuts(quill, options) {
var _this = this;
_classCallCheck(this, MarkdownShortcuts);
this.quill = quill;
this.options = options;
this.ignoreTags = ["PRE"];
this.matches = [{
name: "header",
pattern: /^(#){1,6}\s/g,
action: function action(text, selection, pattern) {
var match = pattern.exec(text);
if (!match) return;
var size = match[0].length; // Need to defer this action https://github.com/quilljs/quill/issues/1134
setTimeout(function () {
_this.quill.formatLine(selection.index, 0, "header", size - 1);
_this.quill.deleteText(selection.index - size, size);
}, 0);
}
}, {
name: "blockquote",
pattern: /^(>)\s/g,
action: function action(_text, selection) {
// Need to defer this action https://github.com/quilljs/quill/issues/1134
setTimeout(function () {
_this.quill.formatLine(selection.index, 1, "blockquote", true);
_this.quill.deleteText(selection.index - 2, 2);
}, 0);
}
}, {
name: "code-block",
pattern: /^`{3}(?:\s|\n)/g,
action: function action(_text, selection) {
// Need to defer this action https://github.com/quilljs/quill/issues/1134
setTimeout(function () {
_this.quill.formatLine(selection.index, 1, "code-block", true);
_this.quill.deleteText(selection.index - 4, 4);
}, 0);
}
}, {
name: "bolditalic",
pattern: /(?:\*|_){3}(.+?)(?:\*|_){3}/g,
action: function action(text, _selection, pattern, lineStart) {
var match = pattern.exec(text);
var annotatedText = match[0];
var matchedText = match[1];
var startIndex = lineStart + match.index;
if (text.match(/^([*_ \n]+)$/g)) return;
setTimeout(function () {
_this.quill.deleteText(startIndex, annotatedText.length);
_this.quill.insertText(startIndex, matchedText, {
bold: true,
italic: true
});
_this.quill.format("bold", false);
}, 0);
}
}, {
name: "bold",
pattern: /(?:\*|_){2}(.+?)(?:\*|_){2}/g,
action: function action(text, _selection, pattern, lineStart) {
var match = pattern.exec(text);
var annotatedText = match[0];
var matchedText = match[1];
var startIndex = lineStart + match.index;
if (text.match(/^([*_ \n]+)$/g)) return;
setTimeout(function () {
_this.quill.deleteText(startIndex, annotatedText.length);
_this.quill.insertText(startIndex, matchedText, {
bold: true
});
_this.quill.format("bold", false);
}, 0);
}
}, {
name: "italic",
pattern: /(?:\*|_){1}(.+?)(?:\*|_){1}/g,
action: function action(text, _selection, pattern, lineStart) {
var match = pattern.exec(text);
var annotatedText = match[0];
var matchedText = match[1];
var startIndex = lineStart + match.index;
if (text.match(/^([*_ \n]+)$/g)) return;
setTimeout(function () {
_this.quill.deleteText(startIndex, annotatedText.length);
_this.quill.insertText(startIndex, matchedText, {
italic: true
});
_this.quill.format("italic", false);
}, 0);
}
}, {
name: "strikethrough",
pattern: /(?:~~)(.+?)(?:~~)/g,
action: function action(text, _selection, pattern, lineStart) {
var match = pattern.exec(text);
var annotatedText = match[0];
var matchedText = match[1];
var startIndex = lineStart + match.index;
if (text.match(/^([*_ \n]+)$/g)) return;
setTimeout(function () {
_this.quill.deleteText(startIndex, annotatedText.length);
_this.quill.insertText(startIndex, matchedText, {
strike: true
});
_this.quill.format("strike", false);
}, 0);
}
}, {
name: "code",
pattern: /(?:`)(.+?)(?:`)/g,
action: function action(text, _selection, pattern, lineStart) {
var match = pattern.exec(text);
var annotatedText = match[0];
var matchedText = match[1];
var startIndex = lineStart + match.index;
if (text.match(/^([*_ \n]+)$/g)) return;
setTimeout(function () {
_this.quill.deleteText(startIndex, annotatedText.length);
_this.quill.insertText(startIndex, matchedText, {
code: true
});
_this.quill.format("code", false);
_this.quill.insertText(_this.quill.getSelection(), " ");
}, 0);
}
}, {
name: "hr",
pattern: /^([-*]\s?){3}/g,
action: function action(text, selection) {
var startIndex = selection.index - text.length;
setTimeout(function () {
_this.quill.deleteText(startIndex, text.length);
_this.quill.insertEmbed(startIndex + 1, "hr", true, quill__WEBPACK_IMPORTED_MODULE_0___default.a.sources.USER);
_this.quill.insertText(startIndex + 2, "\n", quill__WEBPACK_IMPORTED_MODULE_0___default.a.sources.SILENT);
_this.quill.setSelection(startIndex + 2, quill__WEBPACK_IMPORTED_MODULE_0___default.a.sources.SILENT);
}, 0);
}
}, {
name: "asterisk-ul",
pattern: /^(\*|\+)\s$/g,
// eslint-disable-next-line no-unused-vars
action: function action(_text, selection, _pattern) {
setTimeout(function () {
_this.quill.formatLine(selection.index, 1, "list", "unordered");
_this.quill.deleteText(selection.index - 2, 2);
}, 0);
}
}, {
name: "image",
pattern: /(?:!\[(.+?)\])(?:\((.+?)\))/g,
action: function action(text, selection, pattern) {
var startIndex = text.search(pattern);
var matchedText = text.match(pattern)[0]; // const hrefText = text.match(/(?:!\[(.*?)\])/g)[0]
var hrefLink = text.match(/(?:\((.*?)\))/g)[0];
var start = selection.index - matchedText.length - 1;
if (startIndex !== -1) {
setTimeout(function () {
_this.quill.deleteText(start, matchedText.length);
_this.quill.insertEmbed(start, "image", hrefLink.slice(1, hrefLink.length - 1));
}, 0);
}
}
}, {
name: "link",
pattern: /(?:\[(.+?)\])(?:\((.+?)\))/g,
action: function action(text, selection, pattern) {
var startIndex = text.search(pattern);
var matchedText = text.match(pattern)[0];
var hrefText = text.match(/(?:\[(.*?)\])/g)[0];
var hrefLink = text.match(/(?:\((.*?)\))/g)[0];
var start = selection.index - matchedText.length - 1;
if (startIndex !== -1) {
setTimeout(function () {
_this.quill.deleteText(start, matchedText.length);
_this.quill.insertText(start, hrefText.slice(1, hrefText.length - 1), "link", hrefLink.slice(1, hrefLink.length - 1));
}, 0);
}
}
}]; // Handler that looks for insert deltas that match specific characters
// eslint-disable-next-line no-unused-vars
this.quill.on("text-change", function (delta, _oldContents, _source) {
for (var i = 0; i < delta.ops.length; i++) {
if (delta.ops[i].hasOwnProperty("insert")) {
if (delta.ops[i].insert === " ") {
_this.onSpace();
} else if (delta.ops[i].insert === "\n") {
_this.onEnter();
}
}
}
});
}
_createClass(MarkdownShortcuts, [{
key: "isValid",
value: function isValid(text, tagName) {
return typeof text !== "undefined" && text && this.ignoreTags.indexOf(tagName) === -1;
}
}, {
key: "onSpace",
value: function onSpace() {
var selection = this.quill.getSelection();
if (!selection) return;
var _this$quill$getLine = this.quill.getLine(selection.index),
_this$quill$getLine2 = _slicedToArray(_this$quill$getLine, 2),
line = _this$quill$getLine2[0],
offset = _this$quill$getLine2[1];
var text = line.domNode.textContent;
var lineStart = selection.index - offset;
if (this.isValid(text, line.domNode.tagName)) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = this.matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var match = _step.value;
var matchedText = text.match(match.pattern);
if (matchedText) {
// We need to replace only matched text not the whole line
console.log("matched:", match.name, text);
match.action(text, selection, match.pattern, lineStart);
return;
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
}
}, {
key: "onEnter",
value: function onEnter() {
var selection = this.quill.getSelection();
if (!selection) return;
var _this$quill$getLine3 = this.quill.getLine(selection.index),
_this$quill$getLine4 = _slicedToArray(_this$quill$getLine3, 2),
line = _this$quill$getLine4[0],
offset = _this$quill$getLine4[1];
var text = line.domNode.textContent + " ";
var lineStart = selection.index - offset;
selection.length = selection.index++;
if (this.isValid(text, line.domNode.tagName)) {
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = this.matches[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var match = _step2.value;
var matchedText = text.match(match.pattern);
if (matchedText) {
console.log("matched", match.name, text);
match.action(text, selection, match.pattern, lineStart);
return;
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
}
}
}]);
return MarkdownShortcuts;
}(); // module.exports = MarkdownShortcuts;
//
var script = {
name: "VueEditor",
mixins: [oldApi],
props: {
id: {
type: String,
default: "quill-container"
},
placeholder: {
type: String,
default: ""
},
value: {
type: String,
default: ""
},
disabled: {
type: Boolean
},
editorToolbar: {
type: Array,
default: function _default() {
return [];
}
},
editorOptions: {
type: Object,
required: false,
default: function _default() {
return {};
}
},
useCustomImageHandler: {
type: Boolean,
default: false
},
useMarkdownShortcuts: {
type: Boolean,
default: false
}
},
data: function data() {
return {
quill: null
};
},
watch: {
value: function value(val) {
if (val != this.quill.root.innerHTML && !this.quill.hasFocus()) {
this.quill.root.innerHTML = val;
}
},
disabled: function disabled(status) {
this.quill.enable(!status);
}
},
mounted: function mounted() {
this.registerCustomModules(quill__WEBPACK_IMPORTED_MODULE_0___default.a);
this.registerPrototypes();
this.initializeEditor();
},
beforeDestroy: function beforeDestroy() {
this.quill = null;
delete this.quill;
},
methods: {
initializeEditor: function initializeEditor() {
this.setupQuillEditor();
this.checkForCustomImageHandler();
this.handleInitialContent();
this.registerEditorEventListeners();
this.$emit("ready", this.quill);
},
setupQuillEditor: function setupQuillEditor() {
var editorConfig = {
debug: false,
modules: this.setModules(),
theme: "snow",
placeholder: this.placeholder ? this.placeholder : "",
readOnly: this.disabled ? this.disabled : false
};
this.prepareEditorConfig(editorConfig);
this.quill = new quill__WEBPACK_IMPORTED_MODULE_0___default.a(this.$refs.quillContainer, editorConfig);
},
setModules: function setModules() {
var modules = {
toolbar: this.editorToolbar.length ? this.editorToolbar : defaultToolbar
};
if (this.useMarkdownShortcuts) {
quill__WEBPACK_IMPORTED_MODULE_0___default.a.register("modules/markdownShortcuts", MarkdownShortcuts, true);
modules["markdownShortcuts"] = {};
}
return modules;
},
prepareEditorConfig: function prepareEditorConfig(editorConfig) {
if (Object.keys(this.editorOptions).length > 0 && this.editorOptions.constructor === Object) {
if (this.editorOptions.modules && typeof this.editorOptions.modules.toolbar !== "undefined") {
// We don't want to merge default toolbar with provided toolbar.
delete editorConfig.modules.toolbar;
}
mergeDeep(editorConfig, this.editorOptions);
}
},
registerPrototypes: function registerPrototypes() {
quill__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.getHTML = function () {
return this.container.querySelector(".ql-editor").innerHTML;
};
quill__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.getWordCount = function () {
return this.container.querySelector(".ql-editor").innerText.length;
};
},
registerEditorEventListeners: function registerEditorEventListeners() {
this.quill.on("text-change", this.handleTextChange);
this.quill.on("selection-change", this.handleSelectionChange);
this.listenForEditorEvent("text-change");
this.listenForEditorEvent("selection-change");
this.listenForEditorEvent("editor-change");
},
listenForEditorEvent: function listenForEditorEvent(type) {
var _this = this;
this.quill.on(type, function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this.$emit.apply(_this, [type].concat(args));
});
},
handleInitialContent: function handleInitialContent() {
if (this.value) this.quill.root.innerHTML = this.value; // Set initial editor content
},
handleSelectionChange: function handleSelectionChange(range, oldRange) {
if (!range && oldRange) this.$emit("blur", this.quill);else if (range && !oldRange) this.$emit("focus", this.quill);
},
handleTextChange: function handleTextChange(delta, oldContents) {
var editorContent = this.quill.getHTML() === "<p><br></p>" ? "" : this.quill.getHTML();
this.$emit("input", editorContent);
if (this.useCustomImageHandler) this.handleImageRemoved(delta, oldContents);
},
handleImageRemoved: function handleImageRemoved(delta, oldContents) {
var _this2 = this;
var currrentContents = this.quill.getContents();
var deletedContents = currrentContents.diff(oldContents);
var operations = deletedContents.ops;
operations.map(function (operation) {
if (operation.insert && operation.insert.hasOwnProperty("image")) {
var image = operation.insert.image;
_this2.$emit("image-removed", image);
}
});
},
checkForCustomImageHandler: function checkForCustomImageHandler() {
this.useCustomImageHandler === true ? this.setupCustomImageHandler() : "";
},
setupCustomImageHandler: function setupCustomImageHandler() {
var toolbar = this.quill.getModule("toolbar");
toolbar.addHandler("image", this.customImageHandler);
},
customImageHandler: function customImageHandler() {
this.$refs.fileInput.click();
},
emitImageInfo: function emitImageInfo($event) {
var resetUploader = function resetUploader() {
var uploader = document.getElementById("file-upload");
uploader.value = "";
};
var file = $event.target.files[0];
var Editor = this.quill;
var range = Editor.getSelection();
var cursorLocation = range.index;
this.$emit("image-added", file, Editor, cursorLocation, resetUploader);
}
}
};
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
/* server only */
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
} // Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script; // render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true; // functional template
if (isFunctionalTemplate) {
options.functional = true;
}
} // scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function hook(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 (style) {
style.call(this, createInjectorSSR(context));
} // register component module identifier for async chunk inference
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 (style) {
hook = shadowMode ? function () {
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
} : function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
var normalizeComponent_1 = normalizeComponent;
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
function createInjector(context) {
return function (id, style) {
return addStyle(id, style);
};
}
var HEAD;
var styles = {};
function addStyle(id, css) {
var group = isOldIE ? css.media || 'default' : id;
var style = styles[group] || (styles[group] = {
ids: new Set(),
styles: []
});
if (!style.ids.has(id)) {
style.ids.add(id);
var code = css.source;
if (css.map) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */'; // http://stackoverflow.com/a/26603875
code += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) + ' */';
}
if (!style.element) {
style.element = document.createElement('style');
style.element.type = 'text/css';
if (css.media) style.element.setAttribute('media', css.media);
if (HEAD === undefined) {
HEAD = document.head || document.getElementsByTagName('head')[0];
}
HEAD.appendChild(style.element);
}
if ('styleSheet' in style.element) {
style.styles.push(code);
style.element.styleSheet.cssText = style.styles.filter(Boolean).join('\n');
} else {
var index = style.ids.size - 1;
var textNode = document.createTextNode(code);
var nodes = style.element.childNodes;
if (nodes[index]) style.element.removeChild(nodes[index]);
if (nodes.length) style.element.insertBefore(textNode, nodes[index]);else style.element.appendChild(textNode);
}
}
}
var browser = createInjector;
/* script */
const __vue_script__ = script;
/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"quillWrapper"},[_vm._t("toolbar"),_vm._v(" "),_c('div',{ref:"quillContainer",attrs:{"id":_vm.id}}),_vm._v(" "),(_vm.useCustomImageHandler)?_c('input',{ref:"fileInput",staticStyle:{"display":"none"},attrs:{"id":"file-upload","type":"file","accept":"image/*"},on:{"change":function($event){return _vm.emitImageInfo($event)}}}):_vm._e()],2)};
var __vue_staticRenderFns__ = [];
/* style */
const __vue_inject_styles__ = function (inject) {
if (!inject) return
inject("data-v-776e788e_0", { source: "/*!\n * Quill Editor v1.3.6\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li::before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:0;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li::before{content:'\\2022'}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li::before,.ql-editor ul[data-checked=true]>li::before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li::before{content:'\\2611'}.ql-editor ul[data-checked=false]>li::before{content:'\\2610'}.ql-editor li::before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl)::before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl::before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) '. '}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) '. '}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) '. '}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) '. '}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) '. '}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) '. '}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) '. '}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) '. '}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) '. '}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) '. '}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank::before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow .ql-toolbar:after,.ql-snow.ql-toolbar:after{clear:both;content:'';display:table}.ql-snow .ql-toolbar button,.ql-snow.ql-toolbar button{background:0 0;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow .ql-toolbar button svg,.ql-snow.ql-toolbar button svg{float:left;height:100%}.ql-snow .ql-toolbar button:active:hover,.ql-snow.ql-toolbar button:active:hover{outline:0}.ql-snow .ql-toolbar input.ql-image[type=file],.ql-snow.ql-toolbar input.ql-image[type=file]{display:none}.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar button.ql-active,.ql-snow .ql-toolbar button:focus,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:focus,.ql-snow.ql-toolbar button:hover{color:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow .ql-toolbar button:hover:not(.ql-active),.ql-snow.ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow{box-sizing:border-box}.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:'';display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label::before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item::before,.ql-snow .ql-picker.ql-header .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before{content:'Heading 1'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before{content:'Heading 2'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before{content:'Heading 3'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before{content:'Heading 4'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before{content:'Heading 5'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before{content:'Heading 6'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item::before,.ql-snow .ql-picker.ql-font .ql-picker-label::before{content:'Sans Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before{content:'Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before{content:'Monospace'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item::before,.ql-snow .ql-picker.ql-size .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before{content:'Small'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before{content:'Large'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before{content:'Huge'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:rgba(0,0,0,.2) 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border-color:#ccc}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove::before{content:'Remove';margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action::after{border-right:0;content:'Save';padding-right:0}.ql-snow .ql-tooltip[data-mode=link]::before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]::before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]::before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}", map: undefined, media: undefined })
,inject("data-v-776e788e_1", { source: ".ql-editor{min-height:200px;font-size:16px}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1px!important}.quillWrapper .ql-snow.ql-toolbar{padding-top:8px;padding-bottom:4px}.quillWrapper .ql-snow.ql-toolbar .ql-formats{margin-bottom:10px}.ql-snow .ql-toolbar button svg,.quillWrapper .ql-snow.ql-toolbar button svg{width:22px;height:22px}.quillWrapper .ql-editor ul[data-checked=false]>li::before,.quillWrapper .ql-editor ul[data-checked=true]>li::before{font-size:1.35em;vertical-align:baseline;bottom:-.065em;font-weight:900;color:#222}.quillWrapper .ql-snow .ql-stroke{stroke:rgba(63,63,63,.95);stroke-linecap:square;stroke-linejoin:initial;stroke-width:1.7px}.quillWrapper .ql-picker-label{font-size:15px}.quillWrapper .ql-snow .ql-active .ql-stroke{stroke-width:2.25px}.quillWrapper .ql-toolbar.ql-snow .ql-formats{vertical-align:top}.ql-picker:not(.ql-background){position:relative;top:2px}.ql-picker.ql-color-picker svg{width:22px!important;height:22px!important}.quillWrapper .imageResizeActive img{display:block;cursor:pointer}.quillWrapper .imageResizeActive~div svg{cursor:pointer}", map: undefined, media: undefined });
};
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;
/* style inject SSR */
var VueEditor = normalizeComponent_1(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
__vue_inject_styles__,
__vue_script__,
__vue_scope_id__,
__vue_is_functional_template__,
__vue_module_identifier__,
browser,
undefined
);
var version = "2.10.3"; // Declare install function executed by Vue.use()
function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component("VueEditor", VueEditor);
}
var VPlugin = {
install: install,
version: version,
Quill: quill__WEBPACK_IMPORTED_MODULE_0___default.a,
VueEditor: VueEditor
}; // Auto-install when vue is found (eg. in browser via <script> tag)
var GlobalVue = null;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(VPlugin);
}
/*************************************************/
/* unused harmony default export */ var _unused_webpack_default_export = (VPlugin);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "5a0c":
/***/ (function(module, exports, __webpack_require__) {
!function(t,e){ true?module.exports=e():undefined}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i}return!n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
/***/ }),
/***/ "5b4e":
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__("36c3");
var toLength = __webpack_require__("b447");
var toAbsoluteIndex = __webpack_require__("0fc9");
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;
};
};
/***/ }),
/***/ "5ca1":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var core = __webpack_require__("8378");
var hide = __webpack_require__("32e9");
var redefine = __webpack_require__("2aba");
var ctx = __webpack_require__("9b43");
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 target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// 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;
/***/ }),
/***/ "5cc5":
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__("2b4c")('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;
};
/***/ }),
/***/ "5d58":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("d8d6");
/***/ }),
/***/ "5df3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__("02f4")(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__("01f9")(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 };
});
/***/ }),
/***/ "5eda":
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__("5ca1");
var core = __webpack_require__("8378");
var fails = __webpack_require__("79e5");
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);
};
/***/ }),
/***/ "5f1b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__("23c6");
var builtinExec = RegExp.prototype.exec;
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw new TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw new TypeError('RegExp#exec called on incompatible receiver');
}
return builtinExec.call(R, S);
};
/***/ }),
/***/ "613b":
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__("5537")('keys');
var uid = __webpack_require__("ca5a");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "626a":
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__("2d95");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ "62a0":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "63b6":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("e53d");
var core = __webpack_require__("584a");
var ctx = __webpack_require__("d864");
var hide = __webpack_require__("35e8");
var has = __webpack_require__("07e3");
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;
/***/ }),
/***/ "653e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CONTROL_FIELD_EXTEND_MIXIN; });
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f7f");
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _mixins_style_injection_mixin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("28fe");
/**
* Base Setup for any `controls` of Control in Vue-Form-Builder
* @example InputControl - use the mixin. I'll keep our code extendable as possible
*/
var EMIT_EVENT = "change";
var CONTROL_FIELD_EXTEND_MIXIN = {
mixins: [_mixins_style_injection_mixin__WEBPACK_IMPORTED_MODULE_1__[/* STYLE_INJECTION_MIXIN */ "a"]],
props: {
// control configuration
control: {
type: Object,
required: true
},
valueContainer: {
type: Object,
defaultValue: null
},
// v-model value
value: null,
// any types
readonly: {
type: Boolean,
default: false
}
},
// global data-field - available to override
data: function data() {
return {
stopDefaultValueAssign: false
};
},
/**
* For V-Model Purpose
* Basically, we will emit the 'change' to the parent to keep the update...
*/
model: {
event: EMIT_EVENT,
props: "value"
},
watch: {
/**
* Watch if there is new data being assigned
* @param val
*/
value: function value(val) {
this.setValue(val);
}
},
methods: {
/**
* Run this to emit the value to the parent
* @param val
*/
updateValue: function updateValue(val) {
this.$emit(EMIT_EVENT, val);
},
/**
* Need-To-Override Method - Set Value.
* Set value from parent to the current field/control
*/
setValue: function setValue(val) {
return val;
} // NEED TO OVERRIDE
},
computed: {
/**
* Class for Field (input)
* @returns {(string)[]}
*/
controlFieldClass: function controlFieldClass() {
return [this.styles.FORM.FORM_CONTROL, this.control.additionalFieldClass];
},
/**
* Control Name
* @returns {*|string|string}
*/
controlName: function controlName() {
return this.control.name || this.control.uniqueId;
}
},
/**
* Global post-mounted processing
*/
mounted: function mounted() {
// default set value
if (this.stopDefaultValueAssign === false && !this.value && this.control.defaultValue) {
this.updateValue(this.control.defaultValue);
}
}
};
/***/ }),
/***/ "6718":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("e53d");
var core = __webpack_require__("584a");
var LIBRARY = __webpack_require__("b8e3");
var wksExt = __webpack_require__("ccb9");
var defineProperty = __webpack_require__("d9f6").f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
/***/ }),
/***/ "6762":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__("5ca1");
var $includes = __webpack_require__("c366")(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__("9c6c")('includes');
/***/ }),
/***/ "67ab":
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__("ca5a")('meta');
var isObject = __webpack_require__("d3f4");
var has = __webpack_require__("69a8");
var setDesc = __webpack_require__("86cc").f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__("79e5")(function () {
return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
setDesc(it, META, { value: {
i: 'O' + ++id, // object ID
w: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMeta(it);
// return object ID
} return it[META].i;
};
var getWeak = function (it, create) {
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMeta(it);
// return hash weak collections IDs
} return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
return it;
};
var meta = module.exports = {
KEY: META,
NEED: false,
fastKey: fastKey,
getWeak: getWeak,
onFreeze: onFreeze
};
/***/ }),
/***/ "67bb":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("f921");
/***/ }),
/***/ "6821":
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__("626a");
var defined = __webpack_require__("be13");
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ "688e":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slice.call(arguments, 1);
var bound;
var binder = function () {
if (this instanceof bound) {
var result = target.apply(
this,
args.concat(slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args.concat(slice.call(arguments))
);
}
};
var boundLength = Math.max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs.push('$' + i);
}
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
/***/ }),
/***/ "69a8":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "69d3":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("6718")('asyncIterator');
/***/ }),
/***/ "6a29":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FormBuilder.vue?vue&type=template&id=7ba2110f&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:[_vm.styles.CONTAINER.FLUID, 'form-padding', 'vue-form-builder']},[_c('FormConfiguration',{model:{value:(_vm.formData.formConfig),callback:function ($$v) {_vm.$set(_vm.formData, "formConfig", $$v)},expression:"formData.formConfig"}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.formData.formConfig.isShowHeadline),expression:"formData.formConfig.isShowHeadline"}],staticClass:"form-headline-container"},[_c('h1',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.headline)}}),_c('p',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.subHeadline)}})]),_vm._l((_vm.sortedSections),function(sectionData){return _c('SectionContainer',{key:sectionData.uniqueId,attrs:{"section":sectionData,"rows":_vm.formData.rows,"controls":_vm.formData.controls}})}),_c('AddSectionControl',{on:{"addSectionNotify":_vm.addSection}}),_c('add-formula',{on:{"addFormula":_vm.addFormula}}),_c('GlobalSidebar',{attrs:{"formData":_vm.formData}}),_c('hr'),_c('p',{staticClass:"copyright-text",domProps:{"textContent":_vm._s(_vm.copyrightText)}})],2)}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/components/FormBuilder.vue?vue&type=template&id=7ba2110f&
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("7618");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddSectionControl.vue?vue&type=template&id=02d85b7e&
var AddSectionControlvue_type_template_id_02d85b7e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"add-section-container",class:_vm.styles.COLUMNS.COL12,on:{"click":_vm.showOption}},[_c('p',[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '32px', '32px', '#000'))}}),_c('span',[_vm._v("Add Section")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.show),expression:"show"}],class:[_vm.styles.LIST_GROUP.CONTAINER, 'add-container-list']},_vm._l((_vm.sectionTypes),function(sectionInfo,sectionKey){return _c('a',{class:_vm.styles.LIST_GROUP.SINGLE_ITEM,attrs:{"href":"javascript:void(0)"},on:{"click":function($event){return _vm.addNew(sectionKey)}}},[_c('p',{staticClass:"type-headline",domProps:{"textContent":_vm._s(sectionInfo.name)}}),_c('p',{staticClass:"type-desc",domProps:{"textContent":_vm._s(sectionInfo.description)}})])}),0)])}
var AddSectionControlvue_type_template_id_02d85b7e_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddSectionControl.vue?vue&type=template&id=02d85b7e&
// EXTERNAL MODULE: ./src/configs/styles.js
var styles = __webpack_require__("d60e");
// EXTERNAL MODULE: ./src/configs/section.js + 92 modules
var section = __webpack_require__("dd3c");
// EXTERNAL MODULE: ./src/mixins/style-injection-mixin.js
var style_injection_mixin = __webpack_require__("28fe");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddSectionControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AddSectionControlvue_type_script_lang_js_ = ({
name: "AddSectionControl",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
data: function data() {
return {
show: false,
sectionTypes: section["b" /* SECTION_TYPES */]
};
},
methods: {
showOption: function showOption() {
this.show = !this.show;
},
addNew: function addNew(type) {
this.$emit('addSectionNotify', type);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddSectionControl.vue?vue&type=script&lang=js&
/* harmony default export */ var add_controls_AddSectionControlvue_type_script_lang_js_ = (AddSectionControlvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddSectionControl.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
add_controls_AddSectionControlvue_type_script_lang_js_,
AddSectionControlvue_type_template_id_02d85b7e_render,
AddSectionControlvue_type_template_id_02d85b7e_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var AddSectionControl = (component.exports);
// CONCATENATED MODULE: ./src/configs/index.js
var MAIN_CONSTANTS = {
COPYRIGHT: "FORMS V2.0.0"
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/SectionContainer.vue?vue&type=template&id=59957aae&scoped=true&
var SectionContainervue_type_template_id_59957aae_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"section-container",class:{'active': _vm.isDoingConfiguration}},[_c('SectionNavigationBar',{attrs:{"section":_vm.section},on:{"active":_vm.setActive}}),_c(_vm.sectionViewComponent,{key:_vm.section.uniqueId,tag:"component",attrs:{"section":_vm.section,"rows":_vm.rows,"controls":_vm.controls}})],1)}
var SectionContainervue_type_template_id_59957aae_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/SectionContainer.vue?vue&type=template&id=59957aae&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/SectionNavigationBar.vue?vue&type=template&id=4d08c59c&
var SectionNavigationBarvue_type_template_id_4d08c59c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"section-config"},[_c('div',{staticClass:"buttons"},[_c('button',{class:_vm.styles.BUTTON.PRIMARY,attrs:{"title":"Push Up"},domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('arrowUp'))},on:{"click":_vm.pushUp}}),_c('button',{class:_vm.styles.BUTTON.SECONDARY,attrs:{"title":"Push Down"},domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('arrowDown'))},on:{"click":_vm.pushDown}}),_c('button',{class:_vm.styles.BUTTON.INFO,on:{"click":_vm.openConfiguration}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('cog'))}}),_c('span',[_vm._v("Configuration")])]),_c('button',{class:_vm.styles.BUTTON.DANGER,on:{"click":_vm.deleteSection}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('trash'))}}),_c('span',[_vm._v("Delete")])])])])}
var SectionNavigationBarvue_type_template_id_4d08c59c_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/SectionNavigationBar.vue?vue&type=template&id=4d08c59c&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./src/configs/events.js
var events = __webpack_require__("fbe6");
// CONCATENATED MODULE: ./src/mixins/section-sort-mixins.js
/**
* Section Sort Mixins
* @desc Where I handle the sorting (push up/down) for the Section
* @used SectionNavigationBar
* @author Phat Tran
*/
var SECTION_SORT_MIXINS = {
methods: {
/**
* Push-up Section
* @desc Send Fire Event to Parent to handle the Push-Up of Current Section
* @listener FormBuilder
*/
pushUp: function pushUp() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.PUSH, this.section, 0);
},
/**
* Push-down Section
* @desc Send Fire Event to Parent to handle the Push-Down of Current Section
* @listener FormBuilder
*/
pushDown: function pushDown() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.PUSH, this.section, 1);
}
}
};
// EXTERNAL MODULE: ./src/libraries/sidebar-renderer.class.js
var sidebar_renderer_class = __webpack_require__("1ec8");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarSectionConfiguration.vue?vue&type=template&id=5b7dc120&
var SidebarSectionConfigurationvue_type_template_id_5b7dc120_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar-form-configuration"},[_c('h5',[_vm._v("Section Configuration")]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Headline")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.headline),expression:"sectionConfiguration.headline"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.sectionConfiguration.headline)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "headline", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Headline Additional Class (CSS)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.headlineAdditionalClass),expression:"sectionConfiguration.headlineAdditionalClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.sectionConfiguration.headlineAdditionalClass)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "headlineAdditionalClass", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Sub-Headline")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.subHeadline),expression:"sectionConfiguration.subHeadline"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.sectionConfiguration.subHeadline)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "subHeadline", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Sub-Headline Additional Class (CSS)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.subHeadlineAdditionalClass),expression:"sectionConfiguration.subHeadlineAdditionalClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.sectionConfiguration.subHeadlineAdditionalClass)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "subHeadlineAdditionalClass", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Show Section Headline? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.isShowHeadline),expression:"sectionConfiguration.isShowHeadline"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.sectionConfiguration.isShowHeadline)?_vm._i(_vm.sectionConfiguration.isShowHeadline,null)>-1:(_vm.sectionConfiguration.isShowHeadline)},on:{"change":function($event){var $$a=_vm.sectionConfiguration.isShowHeadline,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.sectionConfiguration, "isShowHeadline", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.sectionConfiguration, "isShowHeadline", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.sectionConfiguration, "isShowHeadline", $$c)}}}})])]),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Show Graph "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.showGraph),expression:"sectionConfiguration.showGraph"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.sectionConfiguration.showGraph)?_vm._i(_vm.sectionConfiguration.showGraph,null)>-1:(_vm.sectionConfiguration.showGraph)},on:{"change":function($event){var $$a=_vm.sectionConfiguration.showGraph,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.sectionConfiguration, "showGraph", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.sectionConfiguration, "showGraph", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.sectionConfiguration, "showGraph", $$c)}}}})])]),(_vm.sectionConfiguration.showGraph)?_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" X - Axis")]),_c('b-form-select',{class:_vm.controlFieldClass,model:{value:(_vm.formData.xAxisField),callback:function ($$v) {_vm.$set(_vm.formData, "xAxisField", $$v)},expression:"formData.xAxisField"}},_vm._l((_vm.sectionConfiguration.controls),function(optionObj){return _c('b-form-select-option',{key:optionObj,attrs:{"value":optionObj,"selected":_vm.value === optionObj},domProps:{"textContent":_vm._s(optionObj)}})}),1)],1):_vm._e(),(_vm.sectionConfiguration.showGraph)?_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Select y axis Fields For Graph ")]),_c('select',{class:_vm.controlFieldClass,on:{"input":function($event){return _vm.updateValue2($event.target.value)}}},_vm._l((_vm.sectionConfiguration.controls),function(optionObj){return _c('option',{key:optionObj,domProps:{"value":optionObj,"selected":_vm.value === optionObj,"textContent":_vm._s(optionObj)}})}),0)]):_vm._e(),(_vm.sectionConfiguration.showGraph)?_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Field To plotted on Graph")]),_c('textarea',{class:_vm.styles.FORM.FORM_CONTROL,attrs:{"placeholder":"Add you Graph Fields","rows":"6"},domProps:{"value":_vm.sectionConfiguration.graphFields}})]):_vm._e(),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Reference Table")]),_c('div',{ref:"doctype",staticClass:"ref-field-input"})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Select Formula Controls ")]),_c('select',{class:_vm.controlFieldClass,on:{"input":function($event){return _vm.updateValue($event.target.value)}}},_vm._l((_vm.sectionConfiguration.controls),function(optionObj){return _c('option',{key:optionObj,domProps:{"value":optionObj,"selected":_vm.value === optionObj,"textContent":_vm._s(optionObj)}})}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Child Table Reference")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.tableReference),expression:"sectionConfiguration.tableReference"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Write child references"},domProps:{"value":(_vm.sectionConfiguration.tableReference)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "tableReference", $event.target.value)}}})]),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Evaluation visibility")]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.condition),expression:"sectionConfiguration.condition"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Write your formula here","rows":"6"},domProps:{"value":(_vm.sectionConfiguration.condition)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "condition", $event.target.value)}}})]),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Calculated Fields")]),_c('div',{ref:"doctypex",staticClass:"ref-field-input"}),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.sectionConfiguration.calculatedFields),expression:"sectionConfiguration.calculatedFields"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Calculated Fields","rows":"6"},domProps:{"value":(_vm.sectionConfiguration.calculatedFields)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.sectionConfiguration, "calculatedFields", $event.target.value)}}})]),_c('hr'),_vm._v(" "+_vm._s(_vm.sectionConfiguration.sectionFormula)+" "),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',{staticStyle:{"margin-right":"15px"}},[_vm._v("Table Formula")]),_c('button',{class:_vm.styles.BUTTON.PRIMARY,on:{"click":function($event){return _vm.addTableFormula()}}},[_vm._v("Add Formula")])]),(_vm.currentFormula.length)?_c('div',_vm._l((_vm.currentFormula),function(item,index){return _c('div',{key:index,class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Output Field Name "+_vm._s(index + 1))]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.currentFormula[index].outputField),expression:"currentFormula[index].outputField"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Output Field label"},domProps:{"value":(_vm.currentFormula[index].outputField)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.currentFormula[index], "outputField", $event.target.value)}}}),_c('label',[_vm._v("Formula "+_vm._s(index + 1))]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.currentFormula[index].formula),expression:"currentFormula[index].formula"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Write your formula here","rows":"6"},domProps:{"value":(_vm.currentFormula[index].formula)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.currentFormula[index], "formula", $event.target.value)}}}),_vm._v(" "),_c('br'),_c('button',{staticClass:"padding-top: 15px;",class:_vm.styles.BUTTON.PRIMARY,on:{"click":function($event){return _vm.saveFormula(index, _vm.currentFormula[index])}}},[_vm._v("Save")]),_c('hr')])}),0):_vm._e(),_c('div',{staticClass:"buttons"},[_c('button',{class:_vm.styles.BUTTON.PRIMARY,on:{"click":function($event){return _vm.save(false)}}},[_vm._v(" Save ")]),_c('button',{class:_vm.styles.BUTTON.INFO,on:{"click":function($event){return _vm.save(true)}}},[_vm._v(" Save & Close ")])])])}
var SidebarSectionConfigurationvue_type_template_id_5b7dc120_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarSectionConfiguration.vue?vue&type=template&id=5b7dc120&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.find.js
var es6_array_find = __webpack_require__("7514");
// EXTERNAL MODULE: ./src/mixins/sidebar-body-mixin.js
var sidebar_body_mixin = __webpack_require__("cbce");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarSectionConfiguration.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SidebarSectionConfigurationvue_type_script_lang_js_ = ({
name: "SidebarSectionConfiguration",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], sidebar_body_mixin["a" /* SIDEBAR_BODY_MIXIN */]],
data: function data() {
return {
dataKey: "sectionConfiguration",
sectionConfiguration: Object.assign({}, section["a" /* SECTION_DEFAULT_DATA */]),
currentFormula: []
};
},
created: function created() {
// retrieve the data from `GlobalSidebar` passed in
this.sectionConfiguration = Object.assign({}, this.sectionConfiguration, this.dataPackage);
if (this.sectionConfiguration.sectionFormula) {
this.currentFormula = this.sectionConfiguration.sectionFormula;
}
},
mounted: function mounted() {
if (window.frappe) {
this.makeSelectDoctypeControl();
this.makeSelectDoctypeControl2();
}
},
methods: {
updateValue2: function updateValue2(val) {
var value = this.sectionConfiguration.graphFields || "";
value += value.length ? ",".concat(val) : "".concat(val);
this.$set(this.sectionConfiguration, "graphFields", value);
this.$set(this.formData, "graphFields", value);
},
updateValue: function updateValue(val) {
var value = this.sectionConfiguration.condition + " " + "[".concat(val, "] ");
this.$set(this.sectionConfiguration, "condition", value);
},
makeSelectDoctypeControl: function makeSelectDoctypeControl() {
var me = this;
var customer_field = frappe.ui.form.make_control({
df: {
label: __("Reference"),
fieldtype: "Link",
fieldname: "reference",
options: "Form Design",
placeholder: "Options",
onchange: function onchange() {
if (this.value) {
me.sectionConfiguration.referenceTable = this.value;
}
}
},
parent: this.$refs["doctype"],
render_input: true
});
customer_field.toggle_label(false);
customer_field.$input.val(me.sectionConfiguration.referenceTable);
$("#modal-body").find(".input-max-width").removeClass("input-max-width");
},
makeSelectDoctypeControl2: function makeSelectDoctypeControl2() {
var me = this;
var customer_field = frappe.ui.form.make_control({
df: {
label: __("Reference"),
fieldtype: "Link",
fieldname: "reference",
options: "Dictionary Concept",
placeholder: "Options",
onchange: function onchange() {
if (this.value) {
if (me.sectionConfiguration.calculatedFields) {
var result = "".concat(me.sectionConfiguration.calculatedFields, ",").concat(this.value);
me.$set(me.sectionConfiguration, "calculatedFields", result);
} else {
me.$set(me.sectionConfiguration, "calculatedFields", value);
}
}
}
},
parent: this.$refs["doctypex"],
render_input: true
});
customer_field.toggle_label(false); // customer_field.$input.val(me.sectionConfiguration.referenceTable);
$("#modal-body").find(".input-max-width").removeClass("input-max-width");
},
addTableFormula: function addTableFormula() {
this.currentFormula.push({
outputField: "",
formula: ""
});
},
saveFormula: function saveFormula(index, data) {
if (this.sectionConfiguration.sectionFormula) {
this.sectionConfiguration.sectionFormula.push({});
this.$set(this.sectionConfiguration, "sectionFormula", this.sectionConfiguration.sectionFormula);
this.sectionConfiguration.sectionFormula.push({});
} else {
this.$set(this.sectionConfiguration, "sectionFormula", [{}]);
}
this.sectionConfiguration.sectionFormula[index] = data;
this.$set(this.sectionConfiguration, "sectionFormula", this.sectionConfiguration.sectionFormula);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarSectionConfiguration.vue?vue&type=script&lang=js&
/* harmony default export */ var sidebar_config_views_SidebarSectionConfigurationvue_type_script_lang_js_ = (SidebarSectionConfigurationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarSectionConfiguration.vue
/* normalize component */
var SidebarSectionConfiguration_component = Object(componentNormalizer["a" /* default */])(
sidebar_config_views_SidebarSectionConfigurationvue_type_script_lang_js_,
SidebarSectionConfigurationvue_type_template_id_5b7dc120_render,
SidebarSectionConfigurationvue_type_template_id_5b7dc120_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var SidebarSectionConfiguration = (SidebarSectionConfiguration_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/SectionNavigationBar.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SectionNavigationBarvue_type_script_lang_js_ = ({
name: "SectionNavigationBar",
mixins: [SECTION_SORT_MIXINS, style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
section: {
type: Object,
required: true
}
},
methods: {
/**
* Submit to delete a Section
*/
deleteSection: function deleteSection() {
if (this.section.rows.length > 0) {
if (!confirm("This section contains row(s). Are you sure? Everything is gone and can't be recovered after deleted.")) {
return;
}
} // submit to delete
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.DELETE, this.section.uniqueId);
},
/**
* Tell the sidebar to open so we can configure our Section =))
*/
openConfiguration: function openConfiguration() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, this.section.uniqueId);
},
/**
* We need this special event to know when the sidebar is opened
* Therefore, we will render the sidebar and turn on the border (current editing section)
*/
configurationOpened: function configurationOpened(runnerId) {
if (this.section.uniqueId !== runnerId) {
return;
} // render sidebar and turn on the border
this.renderSidebar();
this.$emit('active', true); // call to parent to let it know this section is currently editing..
},
/**
* Emitting the configuration to render the Section-Config-Sidebar
*/
renderSidebar: function renderSidebar() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, new sidebar_renderer_class["a" /* default */](this.section.uniqueId, SidebarSectionConfiguration, this.section));
},
/**
* Handle Saving the Form Configuration
* @param {string} runnerId
* @param {Object} data
*/
saveConfiguration: function saveConfiguration(runnerId, data) {
// does it out of scope? if it does, stop
if (runnerId !== this.section.uniqueId) {
return;
}
var newValue = Object.assign({}, this.section, data);
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.UPDATE, newValue);
},
/**
* Save and close
* @param runnerId
* @param data
*/
saveAndClose: function saveAndClose(runnerId, data) {
// does it out of scope? if it does, stop
if (runnerId !== this.section.uniqueId) {
return;
}
this.saveConfiguration(runnerId, data);
},
/**
* After Sidebar closed => Remove the Active Class
*/
removeActive: function removeActive() {
this.$emit('active', false); // call to parent to let it know this section is finished edit
}
},
created: function created() {
// listen to after-closed from GlobalSidebar
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE, this.saveConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE_AND_CLOSE, this.saveAndClose);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.AFTER_CLOSED, this.removeActive);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, this.configurationOpened);
}
});
// CONCATENATED MODULE: ./src/views/builder/SectionNavigationBar.vue?vue&type=script&lang=js&
/* harmony default export */ var builder_SectionNavigationBarvue_type_script_lang_js_ = (SectionNavigationBarvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/SectionNavigationBar.vue
/* normalize component */
var SectionNavigationBar_component = Object(componentNormalizer["a" /* default */])(
builder_SectionNavigationBarvue_type_script_lang_js_,
SectionNavigationBarvue_type_template_id_4d08c59c_render,
SectionNavigationBarvue_type_template_id_4d08c59c_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var SectionNavigationBar = (SectionNavigationBar_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/SectionContainer.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SectionContainervue_type_script_lang_js_ = ({
name: "SectionContainer",
components: {
SectionNavigationBar: SectionNavigationBar
},
props: {
section: Object,
rows: Object,
controls: Object,
reference: Object
},
data: function data() {
return {
isDoingConfiguration: false
};
},
methods: {
/**
* Set Active in order to show the holder of current editing section
* @param val
*/
setActive: function setActive() {
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
this.isDoingConfiguration = val;
}
},
computed: {
sectionViewComponent: function sectionViewComponent() {
return section["b" /* SECTION_TYPES */][this.section.type].builderView;
}
}
});
// CONCATENATED MODULE: ./src/views/builder/SectionContainer.vue?vue&type=script&lang=js&
/* harmony default export */ var builder_SectionContainervue_type_script_lang_js_ = (SectionContainervue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/SectionContainer.vue
/* normalize component */
var SectionContainer_component = Object(componentNormalizer["a" /* default */])(
builder_SectionContainervue_type_script_lang_js_,
SectionContainervue_type_template_id_59957aae_scoped_true_render,
SectionContainervue_type_template_id_59957aae_scoped_true_staticRenderFns,
false,
null,
"59957aae",
null
)
/* harmony default export */ var SectionContainer = (SectionContainer_component.exports);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.symbol.async-iterator.js
var es7_symbol_async_iterator = __webpack_require__("ac4d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.symbol.js
var es6_symbol = __webpack_require__("8a81");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.iterator.js
var es6_string_iterator = __webpack_require__("5df3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.from.js
var es6_array_from = __webpack_require__("1c4c");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.to-string.js
var es6_regexp_to_string = __webpack_require__("6b54");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.find-index.js
var es6_array_find_index = __webpack_require__("20d6");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./src/libraries/helper.js
var helper = __webpack_require__("43b3");
// CONCATENATED MODULE: ./src/mixins/form-builder/form-builder-event-handler.js
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
/**
* [Note] Do not use this mixin for other purpose. This is where I move all the code of FormBuilder to keep easy to:
* - Structuring
* - Refactoring
* - ...
* This file will be handled all the Event (mostly listening) from the children to update the big `formData`
* @author Phat Tran <phattranminh96@gmail.com>
*/
var FORM_BUILDER_EVENT_HANDLER = {
methods: {
/**
* Do mapping for section after row added
* @param sectionId
* @param rowId
*/
sectionAndRowMapping: function sectionAndRowMapping(sectionId, rowId) {
// push it into the section Rows...
// I can ensure that sectionId is exists to be retrieve
this.formData.sections[sectionId].rows.push(rowId);
},
/**
* Push-up section (SORT)
* @param sectionObj
* @param {Number} type
* - 0 => Up
* - 1 => Down
*/
sectionPushedUp: function sectionPushedUp(sectionObj) {
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if ( // sort == 0 and push up => stop
sectionObj.sortOrder <= 1 && type === 0 || // sort == total_sections and push down => stop
sectionObj.sortOrder === this.sortedSections.length && type === 1) {
return;
} // old sort order to exchange with the upper section
var postSortOrder = sectionObj.sortOrder; // pick section from sort order - Sort Order is unique
var preSectionOrder = type === 0 ? postSortOrder - 1 : postSortOrder + 1;
var preSection = helper["a" /* HELPER */].find(this.formData.sections, "sortOrder", preSectionOrder); // swap now
this.$set(this.formData.sections[sectionObj.uniqueId], "sortOrder", preSectionOrder);
this.$set(this.formData.sections[preSection.uniqueId], "sortOrder", postSortOrder); // Sort Again After Swapped Order
this.doSortSection();
},
/**
* Delete a section
* @param sectionId
*/
sectionDelete: function sectionDelete(sectionId) {
var _this = this;
// validate input
if (!this.formData.sections[sectionId]) {
return;
} // need to delete all the related control & row
var sectionObj = this.formData.sections[sectionId];
sectionObj.rows.forEach(function (rowId) {
// delete inner control of the rows
var rowItem = _this.formData.rows[rowId];
rowItem.controls.forEach(function (controlId) {
// delete control by ID :D
_this.$delete(_this.formData.controls, controlId);
}); // delete this rows.
_this.$delete(_this.formData.rows, rowItem.uniqueId);
}); // delete ($delete to reactive)
this.$delete(this.formData.sections, sectionId); // Sort Again After Deleted
this.doSortSection(); // re-index sortOrder
// thankfully this still keep reference... :D
var index = 1;
var _iterator = _createForOfIteratorHelper(this.sortedSections),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _sectionObj = _step.value;
_sectionObj.sortOrder = index++;
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
},
/**
* Update data for section
* @param sectionObj
*/
sectionUpdate: function sectionUpdate(sectionObj) {
var sectionId = sectionObj.uniqueId; // validate input
if (!this.formData.sections.hasOwnProperty(sectionId)) {
return;
} // update by using the extend . best way
this.formData.sections[sectionId] = Object.assign(this.formData.sections[sectionId], sectionObj);
},
/**
* Added new row
* @param rowObject
*/
rowNewAdded: function rowNewAdded(rowObject) {
this.formData.rows[rowObject.uniqueId] = rowObject;
},
/**
* Added new control to a section
* @param {string} sectionId
* @param {Object} controlObj
*/
controlNewAdded: function controlNewAdded(sectionId, controlObj) {
// add into big list
this.$set(this.formData.controls, controlObj.uniqueId, controlObj); // add controlID to section
if (this.formData.sections[sectionId].controls.indexOf(controlObj.uniqueId) === -1) {
this.formData.sections[sectionId].controls.push(controlObj.uniqueId);
}
},
/**
* Delete a control from section/row
* @param {string} parentId - Might be SectionId, might be RowId
* @param {string} controlId - LOL
* @afterHandled Emit an event to notify the deletion is complete
*/
controlDeletion: function controlDeletion(parentId, controlId) {
var type = this.formData.sections.hasOwnProperty(parentId) ? "section" : "row"; // FIRST: We delete the relationship in section/row
if (type === "section") {
// find index and delete in section-controls
var indexInSection = helper["a" /* HELPER */].findIndex(this.formData.sections[parentId].controls, undefined, controlId);
this.formData.sections[parentId].controls.splice(indexInSection, 1);
} else {
// find index and delete in row-controls
var indexInRow = helper["a" /* HELPER */].findIndex(this.formData.rows[parentId].controls, undefined, controlId);
this.formData.rows[parentId].controls.splice(indexInRow, 1);
} // SECOND: We delete the control object in `controls`
this.$delete(this.formData.controls, controlId); // LAST: Emit DELETED (might be some component will register this??)
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.DELETED, parentId, controlId);
},
/**
* Update a control
* @param {String} controlId
* @param {Object} controlData
*/
controlUpdated: function controlUpdated(controlId, controlData) {
// validate input
if (!this.formData.controls.hasOwnProperty(controlId)) {
return;
} // update by using the extend . best way
this.formData.controls[controlId] = Object.assign(this.formData.controls[controlId], controlData);
}
},
created: function created() {
// section events
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.ADDED_ROW, this.sectionAndRowMapping);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.PUSH, this.sectionPushedUp);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.DELETE, this.sectionDelete);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.UPDATE, this.sectionUpdate); // row events
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.ROW.CREATE, this.rowNewAdded); // control events
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.CREATE, this.controlNewAdded);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.FORMULA.ADD, this.addFormula);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.DELETE, this.controlDeletion);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.UPDATE, this.controlUpdated);
}
};
// EXTERNAL MODULE: ./src/mixins/form-builder/form-builder-methods.js + 1 modules
var form_builder_methods = __webpack_require__("bcc7");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// CONCATENATED MODULE: ./src/mixins/form-builder/form-builder-model.js
/**
* [Note] Do not use this mixin for other purpose. This is where I move all the code of FormBuilder to keep easy to:
* - Structuring
* - Refactoring
* - ...
* This file will be handle the v-model of the FormBuilder.
* @author Phat Tran <phattranminh96@gmail.com>
*/
var EMIT_EVENT = "change";
var deepEqual = __webpack_require__("7fae"); // TO CHECK THE DEEPEST VALUES OF THE FORM...
var FORM_BUILDER_MODEL = {
props: {
value: Object
},
model: {
event: EMIT_EVENT,
props: "value"
},
watch: {
/**
* For Update New Configuration After User Changed the Form
*/
formData: {
deep: true,
// deep watcher - because we have a long-tree object
handler: function handler(newFormData) {
this.$emit(EMIT_EVENT, newFormData);
}
},
/**
* For Update the New Configuration After User Applied new DATA into v-model
*/
value: {
deep: true,
handler: function handler(newFormData, oldFormData) {
// because this is in the initialize => no data at first
if (typeof oldFormData === 'undefined') {
return;
} // we have to create a new formConfig for the "unexpected value" like: {}, null, undefined
// only available for null and empty object data
if (!newFormData || !Object.keys(newFormData).length) {
return this.mapping();
} // this time object have data, we have to make sure everything
if (deepEqual(newFormData, oldFormData)) {
return;
} // okay this time object is fully new and we need to do mapping again
return this.mapping(newFormData);
}
}
}
};
// CONCATENATED MODULE: ./src/mixins/form-builder-mixins.js
/* harmony default export */ var form_builder_mixins = ([FORM_BUILDER_EVENT_HANDLER, form_builder_methods["a" /* FORM_BUILDER_METHODS */], FORM_BUILDER_MODEL, style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]]);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/FormConfiguration.vue?vue&type=template&id=e3f8d538&
var FormConfigurationvue_type_template_id_e3f8d538_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"form-configuration-block pbottom-10"},[_c('button',{class:_vm.styles.BUTTON.PRIMARY,on:{"click":_vm.open}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('cog'))}}),_c('span',[_vm._v("Form Configurations")])])])}
var FormConfigurationvue_type_template_id_e3f8d538_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/FormConfiguration.vue?vue&type=template&id=e3f8d538&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarFormConfiguration.vue?vue&type=template&id=bdcd0d34&scoped=true&
var SidebarFormConfigurationvue_type_template_id_bdcd0d34_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar-form-configuration"},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Form Config "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.frmConfig),expression:"frmConfig"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.frmConfig)?_vm._i(_vm.frmConfig,null)>-1:(_vm.frmConfig)},on:{"change":function($event){var $$a=_vm.frmConfig,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.frmConfig=$$a.concat([$$v]))}else{$$i>-1&&(_vm.frmConfig=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.frmConfig=$$c}}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.frmConfig),expression:"frmConfig"}]},[_c('h5',[_vm._v("Main Form Configuration")]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Form Headline")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.headline),expression:"formConfiguration.headline"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.formConfiguration.headline)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.formConfiguration, "headline", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Form Sub-Headline")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.subHeadline),expression:"formConfiguration.subHeadline"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.formConfiguration.subHeadline)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.formConfiguration, "subHeadline", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Mapped Doctype")]),_c('div',{ref:"doctype",staticClass:"ref-field-input"})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Show Form Headline? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.isShowHeadline),expression:"formConfiguration.isShowHeadline"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.formConfiguration.isShowHeadline)?_vm._i(_vm.formConfiguration.isShowHeadline,null)>-1:(_vm.formConfiguration.isShowHeadline)},on:{"change":function($event){var $$a=_vm.formConfiguration.isShowHeadline,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.formConfiguration, "isShowHeadline", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.formConfiguration, "isShowHeadline", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.formConfiguration, "isShowHeadline", $$c)}}}})])])]),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Add Formula "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.frm),expression:"frm"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.frm)?_vm._i(_vm.frm,null)>-1:(_vm.frm)},on:{"change":function($event){var $$a=_vm.frm,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.frm=$$a.concat([$$v]))}else{$$i>-1&&(_vm.frm=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.frm=$$c}}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.frm),expression:"frm"}]},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Name")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.tempFormula.name),expression:"tempFormula.name"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.tempFormula.name)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.tempFormula, "name", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Formula")]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.tempFormula.formula),expression:"tempFormula.formula"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"rows":"6","type":"text"},domProps:{"value":(_vm.tempFormula.formula)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.tempFormula, "formula", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Output Field")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.tempFormula.output),expression:"tempFormula.output"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.tempFormula.output)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.tempFormula, "output", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('button',{class:_vm.styles.FORM.FORM_CONTROL,on:{"click":_vm.addFormula}},[_vm._v(" Add Formula ")])])]),_vm._l((_vm.formConfiguration.formula),function(formula){return _c('div',{key:formula,class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(_vm._s(formula.name)+" "),_c('span',{staticClass:"pointer",attrs:{"title":"Click this to remove this rule"},domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('close', '16px', '16px', 'red'))},on:{"click":function($event){return _vm.removeFormula(formula)}}})]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(formula.formula),expression:"formula.formula"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","rows":"6","readonly":""},domProps:{"value":(formula.formula)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(formula, "formula", $event.target.value)}}})])}),_c('hr'),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Wrapper <form> outside of the Form? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.renderFormTag),expression:"formConfiguration.renderFormTag"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.formConfiguration.renderFormTag)?_vm._i(_vm.formConfiguration.renderFormTag,null)>-1:(_vm.formConfiguration.renderFormTag)},on:{"change":function($event){var $$a=_vm.formConfiguration.renderFormTag,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.formConfiguration, "renderFormTag", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.formConfiguration, "renderFormTag", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.formConfiguration, "renderFormTag", $$c)}}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.formConfiguration.renderFormTag),expression:"formConfiguration.renderFormTag"}]},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Form-TAG Action URL")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.formActionURL),expression:"formConfiguration.formActionURL"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.formConfiguration.formActionURL)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.formConfiguration, "formActionURL", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Form-TAG Method")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.formConfiguration.formMethod),expression:"formConfiguration.formMethod"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.formConfiguration.formMethod)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.formConfiguration, "formMethod", $event.target.value)}}})])]),_c('div',{staticClass:"buttons"},[_c('button',{class:_vm.styles.BUTTON.PRIMARY,on:{"click":function($event){return _vm.save(false)}}},[_vm._v(" Save ")]),_c('button',{class:_vm.styles.BUTTON.INFO,on:{"click":function($event){return _vm.save(true)}}},[_vm._v(" Save & Close ")])])],2)}
var SidebarFormConfigurationvue_type_template_id_bdcd0d34_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormConfiguration.vue?vue&type=template&id=bdcd0d34&scoped=true&
// EXTERNAL MODULE: ./src/configs/form.js
var configs_form = __webpack_require__("22a0");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarFormConfiguration.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* @property {FORM_DEFAULT_DATA} formConfiguration
*/
/* harmony default export */ var SidebarFormConfigurationvue_type_script_lang_js_ = ({
name: "SidebarFormConfiguration",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], sidebar_body_mixin["a" /* SIDEBAR_BODY_MIXIN */]],
data: function data() {
return {
// OVERRIDE IT FROM `SIDEBAR_BODY_MIXIN`
dataKey: "formConfiguration",
formConfiguration: Object.assign({}, configs_form["a" /* FORM_DEFAULT_DATA */]),
tempFormula: {},
frm: false,
frmConfig: false
};
},
mounted: function mounted() {
this.makeSelectDoctypeControl();
},
methods: {
addFormula: function addFormula() {
this.formConfiguration.formula.push(this.tempFormula);
this.tempFormula = {};
},
removeFormula: function removeFormula(formula) {
var result = this.formConfiguration.formula.filter(function (item) {
return item.name != formula.name;
});
this.formConfiguration.formula = result;
},
makeSelectDoctypeControl: function makeSelectDoctypeControl() {
var me = this;
var customer_field = frappe.ui.form.make_control({
df: {
label: __("Reference"),
fieldtype: "Link",
fieldname: "reference",
options: "DocType",
placeholder: "Select doctype",
onchange: function onchange() {
if (this.value) {
me.formConfiguration.mappedDoctype = this.value;
}
}
},
parent: this.$refs["doctype"],
render_input: true
});
customer_field.toggle_label(false);
customer_field.$input.val(me.formConfiguration.mappedDoctype);
$("#modal-body").find(".input-max-width").removeClass("input-max-width");
}
},
created: function created() {
// retrieve the data from `GlobalSidebar` passed in
this.formConfiguration = Object.assign({}, this.formConfiguration, this.dataPackage);
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormConfiguration.vue?vue&type=script&lang=js&
/* harmony default export */ var sidebar_config_views_SidebarFormConfigurationvue_type_script_lang_js_ = (SidebarFormConfigurationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormConfiguration.vue
/* normalize component */
var SidebarFormConfiguration_component = Object(componentNormalizer["a" /* default */])(
sidebar_config_views_SidebarFormConfigurationvue_type_script_lang_js_,
SidebarFormConfigurationvue_type_template_id_bdcd0d34_scoped_true_render,
SidebarFormConfigurationvue_type_template_id_bdcd0d34_scoped_true_staticRenderFns,
false,
null,
"bdcd0d34",
null
)
/* harmony default export */ var SidebarFormConfiguration = (SidebarFormConfiguration_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/FormConfiguration.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
var RUNNER_ID = 'FormConfiguration';
/* harmony default export */ var FormConfigurationvue_type_script_lang_js_ = ({
name: "FormConfiguration",
components: {
SidebarFormConfiguration: SidebarFormConfiguration
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
value: Object
},
model: {
event: 'change',
props: 'value'
},
methods: {
/**
* Open Configuration Sidebar
* @desc Fire an Event to GlobalSidebar
*/
open: function open() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, RUNNER_ID);
},
/**
* Emit an Event to Render Sidebar Body
* @desc Fire an Event to GlobalSidebar
*/
renderSidebar: function renderSidebar() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, new sidebar_renderer_class["a" /* default */](RUNNER_ID, SidebarFormConfiguration, this.value));
},
/**
* Handle Saving the Form Configuration
* @param {string} runnerId
* @param {Object} data
*/
saveConfiguration: function saveConfiguration(runnerId, data) {
// does it out of scope? if it does, stop
if (runnerId !== RUNNER_ID) {
return;
}
var newValue = Object.assign({}, this.value, data);
this.$emit('change', newValue); // run this to update v-model
},
/**
* After sidebar is opened - we will render the GlobalSidebar's body
* @param runnerId
*/
afterOpenedSidebar: function afterOpenedSidebar(runnerId) {
// does it out of scope? if it does, stop
if (runnerId !== RUNNER_ID) {
return;
} // render sidebar if its from FormConfiguration
this.renderSidebar();
}
},
created: function created() {
// listen to GlobalSidebar Event...
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE, this.saveConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE_AND_CLOSE, this.saveConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, this.renderSidebar);
}
});
// CONCATENATED MODULE: ./src/views/builder/FormConfiguration.vue?vue&type=script&lang=js&
/* harmony default export */ var builder_FormConfigurationvue_type_script_lang_js_ = (FormConfigurationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/FormConfiguration.vue
/* normalize component */
var FormConfiguration_component = Object(componentNormalizer["a" /* default */])(
builder_FormConfigurationvue_type_script_lang_js_,
FormConfigurationvue_type_template_id_e3f8d538_render,
FormConfigurationvue_type_template_id_e3f8d538_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var FormConfiguration = (FormConfiguration_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/GlobalSidebar.vue?vue&type=template&id=3eb20324&
var GlobalSidebarvue_type_template_id_3eb20324_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar"},[_c('span',{staticClass:"close",domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('close', '24px', '24px', '#000'))},on:{"click":_vm.close}}),(_vm.component)?_c(_vm.component,{tag:"component",attrs:{"dataPackage":_vm.dynamicData,"formData":_vm.formData},on:{"save":_vm.save,"saveAndClose":_vm.saveAndClose,"close":_vm.close}}):_vm._e()],1)}
var GlobalSidebarvue_type_template_id_3eb20324_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/GlobalSidebar.vue?vue&type=template&id=3eb20324&
// EXTERNAL MODULE: ./src/libraries/alert-dialog.js
var alert_dialog = __webpack_require__("caca");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/GlobalSidebar.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var SIDEBAR_WIDTH_SIZE = "300px";
/* harmony default export */ var GlobalSidebarvue_type_script_lang_js_ = ({
name: "GlobalSidebar",
props: {
formData: {
type: Object,
default: function _default() {
return {};
}
}
},
data: function data() {
return {
component: null,
dynamicData: {},
runnerId: null,
isOpen: false
};
},
methods: {
/**
* Open the Right Sidebar
*/
open: function open(runnerId) {
if (this.isOpen) {
alert_dialog["a" /* ALERT_DIALOG */].show('Please close the current active sidebar before open another');
return;
} // set size
this.$el.style.width = SIDEBAR_WIDTH_SIZE;
document.getElementsByTagName("body")[0].style.marginRight = SIDEBAR_WIDTH_SIZE; // turn on flag and notify watcher that sidebar is opened
// `runnerId` will be sent back in order to make sure other components will touch yours
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, runnerId);
this.isOpen = true;
},
/**
* Save - Emitting data to the listener but do not close the sidebar
* @hook Emit Data to the Listener
*/
save: function save() {
var specialData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE, this.runnerId, Object.assign({}, specialData));
},
/**
* Save event with close the right sidebar
*/
saveAndClose: function saveAndClose() {
var specialData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE_AND_CLOSE, this.runnerId, Object.assign({}, specialData));
this.close();
},
/**
* Close the right sidebar
* @hook After Closed - Fire an Event to notify (maybe someone will listen :v )
*/
close: function close() {
this.$el.style.width = 0;
document.getElementsByTagName("body")[0].style.marginRight = 0; // fire event after closed (if emit == true)
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.AFTER_CLOSED, this.runnerId, null); // remove renderer
this.component = null;
this.dynamicData = {};
this.runnerId = null;
this.isOpen = false;
},
/**
* This method will help us inject our Component into the Sidebar Body
* @param {SidebarRenderer} rendererInfo - data that will be assigned for the Component
*/
updateBody: function updateBody(rendererInfo) {
if (this.isOpen) {
return;
}
this.dynamicData = Object.assign({}, rendererInfo.data);
this.component = rendererInfo.component;
this.runnerId = rendererInfo.runnerId;
}
},
created: function created() {
// listen to render even
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, this.updateBody); // listen to open
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, this.open);
}
});
// CONCATENATED MODULE: ./src/views/builder/GlobalSidebar.vue?vue&type=script&lang=js&
/* harmony default export */ var builder_GlobalSidebarvue_type_script_lang_js_ = (GlobalSidebarvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/GlobalSidebar.vue
/* normalize component */
var GlobalSidebar_component = Object(componentNormalizer["a" /* default */])(
builder_GlobalSidebarvue_type_script_lang_js_,
GlobalSidebarvue_type_template_id_3eb20324_render,
GlobalSidebarvue_type_template_id_3eb20324_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var GlobalSidebar = (GlobalSidebar_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddFormula.vue?vue&type=template&id=07cd5b55&
var AddFormulavue_type_template_id_07cd5b55_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"add-control-outer",class:_vm.styles.COLUMNS.COL12},[_c('div',{staticClass:"add-control-container",on:{"click":_vm.openAddControl}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '32px', '32px', '#000'))}}),_c('span',[_vm._v("Add Formula")])])])}
var AddFormulavue_type_template_id_07cd5b55_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddFormula.vue?vue&type=template&id=07cd5b55&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarFormulaSelectList.vue?vue&type=template&id=412bc282&scoped=true&
var SidebarFormulaSelectListvue_type_template_id_412bc282_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar-form-configuration"},[_c('h5',[_vm._v("Select Formula")]),_c('div',[_c('div',{staticStyle:{"margin-bottom":"8px"}},[_c('div',{},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.searchQuery),expression:"searchQuery"}],staticClass:"form-control md-field",attrs:{"type":"text","placeholder":"Search...."},domProps:{"value":(_vm.searchQuery)},on:{"input":function($event){if($event.target.composing){ return; }_vm.searchQuery=$event.target.value}}})])])]),_c('div',{class:[_vm.styles.LIST_GROUP.CONTAINER]},_vm._l((_vm.controlList),function(control){return _c('a',{key:control.name,class:_vm.styles.LIST_GROUP.SINGLE_ITEM,attrs:{"href":"javascript:void(0)"},on:{"click":function($event){return _vm.selectedControl(control)}}},[_c('p',{staticClass:"type-headline",domProps:{"textContent":_vm._s(control.name)}}),_c('p',{staticClass:"type-desc",domProps:{"textContent":_vm._s(control.description)}})])}),0)])}
var SidebarFormulaSelectListvue_type_template_id_412bc282_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormulaSelectList.vue?vue&type=template&id=412bc282&scoped=true&
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("bd86");
// EXTERNAL MODULE: ./src/configs/controls.js + 162 modules
var controls = __webpack_require__("8dbe");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarFormulaSelectList.vue?vue&type=script&lang=js&
var _name$mixins$computed;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SidebarFormulaSelectListvue_type_script_lang_js_ = (_name$mixins$computed = {
name: "SidebarControlSelectList",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], sidebar_body_mixin["a" /* SIDEBAR_BODY_MIXIN */]],
computed: {
controlTypes: function controlTypes() {
return controls["a" /* CONTROLS */];
}
},
data: function data() {
return {
dataKey: "newControlData",
newControlData: null,
searchQuery: null,
apiList: [// [
// "BMI formula",
// "Calculate the BMI",
// "[Lastname] / ([Firstname] * [Firstname] )",
// "Female",
// ],
]
};
}
}, Object(defineProperty["a" /* default */])(_name$mixins$computed, "computed", {
controlList: function controlList() {
return this.apiList.map(function (item) {
return {
name: item[0],
description: item[1],
formula: item[2],
output: item[3]
};
});
}
}), Object(defineProperty["a" /* default */])(_name$mixins$computed, "watch", {
searchQuery: function searchQuery(t) {
this.fetchConcepts(t);
}
}), Object(defineProperty["a" /* default */])(_name$mixins$computed, "methods", {
selectedControl: function selectedControl(controlKey) {
this.close();
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.FORMULA.ADD, controlKey);
},
fetchConcepts: function fetchConcepts(t) {
var _this = this;
var e = this;
this.api({
method: "clinical.api.forms.form_builder.concept_formula_query",
args: {
txt: t
},
callback: function callback(t) {
var n = t.message;
e.apiList = n;
}
}).then(function (t) {
var n = t.message;
_this.apiList = n;
});
}
}), _name$mixins$computed);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormulaSelectList.vue?vue&type=script&lang=js&
/* harmony default export */ var sidebar_config_views_SidebarFormulaSelectListvue_type_script_lang_js_ = (SidebarFormulaSelectListvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarFormulaSelectList.vue
/* normalize component */
var SidebarFormulaSelectList_component = Object(componentNormalizer["a" /* default */])(
sidebar_config_views_SidebarFormulaSelectListvue_type_script_lang_js_,
SidebarFormulaSelectListvue_type_template_id_412bc282_scoped_true_render,
SidebarFormulaSelectListvue_type_template_id_412bc282_scoped_true_staticRenderFns,
false,
null,
"412bc282",
null
)
/* harmony default export */ var SidebarFormulaSelectList = (SidebarFormulaSelectList_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddFormula.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AddFormulavue_type_script_lang_js_ = ({
name: "AddFormula",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
section: {
type: Object,
required: false
} // TODO: Need to extend: Row too.
},
data: function data() {
return {
show: false
};
},
methods: {
/**
* Open the sidebar to add control yeah yeah
*/
openAddControl: function openAddControl() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, this.runnerId);
},
/**
* Render the sidebar if can be opened hehe
*/
afterOpenedSidebar: function afterOpenedSidebar(runnerId) {
if (runnerId !== this.runnerId) {
return;
} // render
this.renderSidebar();
},
/**
* Trigger this to render the GlobalSidebar for Select Controls
*/
renderSidebar: function renderSidebar() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, new sidebar_renderer_class["a" /* default */](this.runnerId, SidebarFormulaSelectList, this.section));
},
/**
* After user chose a control. This will be invoked in order to create a new control
*/
createNewFormFormula: function createNewFormFormula(runnerId, controlObj) {
// runnerId to check the right identifier of the Invoker
// uniqueId to check if we create new control or not
if (this.runnerId !== runnerId) {
return;
} // this.$formEvent.$emit(
// EVENT_CONSTANTS.BUILDER.FORMULA.ADD,
// this.section.uniqueId,
// controlObj
// );
}
},
computed: {
/**
* Runner ID to detect the right
* @returns {string}
*/
runnerId: function runnerId() {
return "add-control-FORMULAR}";
}
},
created: function created() {
// listen to Global Sidebar
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, this.afterOpenedSidebar);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.CLOSE, this.createNewFormFormula);
}
});
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddFormula.vue?vue&type=script&lang=js&
/* harmony default export */ var add_controls_AddFormulavue_type_script_lang_js_ = (AddFormulavue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddFormula.vue
/* normalize component */
var AddFormula_component = Object(componentNormalizer["a" /* default */])(
add_controls_AddFormulavue_type_script_lang_js_,
AddFormulavue_type_template_id_07cd5b55_render,
AddFormulavue_type_template_id_07cd5b55_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var AddFormula = (AddFormula_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FormBuilder.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var FormBuildervue_type_script_lang_js_ = ({
name: "FormBuilder",
components: {
GlobalSidebar: GlobalSidebar,
FormConfiguration: FormConfiguration,
SectionContainer: SectionContainer,
AddSectionControl: AddSectionControl,
AddFormula: AddFormula
},
mixins: form_builder_mixins,
data: function data() {
return {
formData: {
formConfig: {},
sections: {},
rows: {},
controls: {}
}
};
},
created: function created() {
if (this.value && Object(esm_typeof["a" /* default */])(this.value) === "object") {
this.mapping(this.value);
} else {
this.createDefaultData();
}
},
computed: {
/**
* Copyright Text
* @returns {string}
*/
copyrightText: function copyrightText() {
return MAIN_CONSTANTS.COPYRIGHT;
}
}
});
// CONCATENATED MODULE: ./src/components/FormBuilder.vue?vue&type=script&lang=js&
/* harmony default export */ var components_FormBuildervue_type_script_lang_js_ = (FormBuildervue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/components/FormBuilder.vue
/* normalize component */
var FormBuilder_component = Object(componentNormalizer["a" /* default */])(
components_FormBuildervue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var FormBuilder = __webpack_exports__["a"] = (FormBuilder_component.exports);
/***/ }),
/***/ "6a99":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("d3f4");
// 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");
};
/***/ }),
/***/ "6abf":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__("e6f3");
var hiddenKeys = __webpack_require__("1691").concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ "6b4c":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "6b54":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__("3846");
var anObject = __webpack_require__("cb7c");
var $flags = __webpack_require__("0bfb");
var DESCRIPTORS = __webpack_require__("9e1e");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
var define = function (fn) {
__webpack_require__("2aba")(RegExp.prototype, TO_STRING, fn, true);
};
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__("79e5")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "6c1c":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("c367");
var global = __webpack_require__("e53d");
var hide = __webpack_require__("35e8");
var Iterators = __webpack_require__("481b");
var TO_STRING_TAG = __webpack_require__("5168")('toStringTag');
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
'TextTrackList,TouchList').split(',');
for (var i = 0; i < DOMIterables.length; i++) {
var NAME = DOMIterables[i];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = Iterators.Array;
}
/***/ }),
/***/ "6db7":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var define = __webpack_require__("f367");
var callBind = __webpack_require__("3eb1");
var implementation = __webpack_require__("d6ef");
var getPolyfill = __webpack_require__("5834");
var shim = __webpack_require__("c15a");
var polyfill = callBind(getPolyfill(), Object);
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;
/***/ }),
/***/ "71c1":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("3a38");
var defined = __webpack_require__("25eb");
// 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;
};
};
/***/ }),
/***/ "7226":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var possibleNames = [
'BigInt64Array',
'BigUint64Array',
'Float32Array',
'Float64Array',
'Int16Array',
'Int32Array',
'Int8Array',
'Uint16Array',
'Uint32Array',
'Uint8Array',
'Uint8ClampedArray'
];
var g = typeof globalThis === 'undefined' ? global : globalThis;
module.exports = function availableTypedArrays() {
var out = [];
for (var i = 0; i < possibleNames.length; i++) {
if (typeof g[possibleNames[i]] === 'function') {
out[out.length] = possibleNames[i];
}
}
return out;
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "7333":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var DESCRIPTORS = __webpack_require__("9e1e");
var getKeys = __webpack_require__("0d58");
var gOPS = __webpack_require__("2621");
var pIE = __webpack_require__("52a7");
var toObject = __webpack_require__("4bf8");
var IObject = __webpack_require__("626a");
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__("79e5")(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) {
key = keys[j++];
if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
}
} return T;
} : $assign;
/***/ }),
/***/ "7514":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__("5ca1");
var $find = __webpack_require__("0a49")(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__("9c6c")(KEY);
/***/ }),
/***/ "7618":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
/* harmony import */ var _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("67bb");
/* harmony import */ var _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5d58");
/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0___default.a && "symbol" == typeof _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1___default.a ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0___default.a && obj.constructor === _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0___default.a && obj !== _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_0___default.a.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
/***/ }),
/***/ "765d":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("6718")('observable');
/***/ }),
/***/ "768b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js
var is_array = __webpack_require__("a745");
var is_array_default = /*#__PURE__*/__webpack_require__.n(is_array);
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
if (is_array_default()(arr)) return arr;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol.js
var symbol = __webpack_require__("67bb");
var symbol_default = /*#__PURE__*/__webpack_require__.n(symbol);
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol/iterator.js
var iterator = __webpack_require__("5d58");
var iterator_default = /*#__PURE__*/__webpack_require__.n(iterator);
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(arr, i) {
var _i = arr == null ? null : typeof symbol_default.a !== "undefined" && arr[iterator_default.a] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("e630");
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/slicedToArray.js
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest();
}
/***/ }),
/***/ "768d":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "7726":
/***/ (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
/***/ }),
/***/ "774e":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("d2d5");
/***/ }),
/***/ "77f1":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("4588");
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);
};
/***/ }),
/***/ "7917":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c532");
/**
* Create an Error with the specified message, config, error code, request and response.
*
* @param {string} message The error message.
* @param {string} [code] The error code (for example, 'ECONNABORTED').
* @param {Object} [config] The config.
* @param {Object} [request] The request.
* @param {Object} [response] The response.
*
* @returns {Error} The created error.
*/
function AxiosError(message, code, config, request, response) {
Error.call(this);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = (new Error()).stack;
}
this.message = message;
this.name = 'AxiosError';
code && (this.code = code);
config && (this.config = config);
request && (this.request = request);
response && (this.response = response);
}
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].inherits(AxiosError, Error, {
toJSON: function toJSON() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
};
}
});
const prototype = AxiosError.prototype;
const descriptors = {};
[
'ERR_BAD_OPTION_VALUE',
'ERR_BAD_OPTION',
'ECONNABORTED',
'ETIMEDOUT',
'ERR_NETWORK',
'ERR_FR_TOO_MANY_REDIRECTS',
'ERR_DEPRECATED',
'ERR_BAD_RESPONSE',
'ERR_BAD_REQUEST',
'ERR_CANCELED',
'ERR_NOT_SUPPORT',
'ERR_INVALID_URL'
// eslint-disable-next-line func-names
].forEach(code => {
descriptors[code] = {value: code};
});
Object.defineProperties(AxiosError, descriptors);
Object.defineProperty(prototype, 'isAxiosError', {value: true});
// eslint-disable-next-line func-names
AxiosError.from = (error, code, config, request, response, customProps) => {
const axiosError = Object.create(prototype);
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(error, axiosError, function filter(obj) {
return obj !== Error.prototype;
}, prop => {
return prop !== 'isAxiosError';
});
AxiosError.call(axiosError, error.message, code, config, request, response);
axiosError.cause = error;
axiosError.name = error.name;
customProps && Object.assign(axiosError, customProps);
return axiosError;
};
/* harmony default export */ __webpack_exports__["a"] = (AxiosError);
/***/ }),
/***/ "794b":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("8e60") && !__webpack_require__("294c")(function () {
return Object.defineProperty(__webpack_require__("1ec9")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "79aa":
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "79e5":
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "7a56":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__("7726");
var dP = __webpack_require__("86cc");
var DESCRIPTORS = __webpack_require__("9e1e");
var SPECIES = __webpack_require__("2b4c")('species');
module.exports = function (KEY) {
var C = global[KEY];
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
configurable: true,
get: function () { return this; }
});
};
/***/ }),
/***/ "7bbc":
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__("6821");
var gOPN = __webpack_require__("9093").f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};
/***/ }),
/***/ "7cd6":
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__("40c3");
var ITERATOR = __webpack_require__("5168")('iterator');
var Iterators = __webpack_require__("481b");
module.exports = __webpack_require__("584a").getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/***/ "7d7e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ROW_TYPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ROW_DEFAULT_DATA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createNewRow; });
/* harmony import */ var _libraries_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("43b3");
/**
* Row Constants in Vue-Form-Builder
* @author Phat Tran
*/
var ROW_TYPES = {
normal: 'normal',
// Normal Row in Div (div.row)
tableRow: 'tableRow' // Table row (tr)
};
var ROW_DEFAULT_DATA = {
uniqueId: '',
additionalClass: '',
type: ROW_TYPES.normal,
sortOrder: 0,
controls: [] // ids of control
};
/**
* Create new Row Object
* @param type
*/
function createNewRow(type) {
if (!ROW_TYPES[type]) {
throw new TypeError("Row Type: ".concat(type, " doesn't exists in Vue-Form-Builder"));
} // create new section data base on the default data
var newRowObject = _libraries_helper__WEBPACK_IMPORTED_MODULE_0__[/* HELPER */ "a"].cloneDeep(ROW_DEFAULT_DATA);
newRowObject.type = type;
newRowObject.uniqueId = "row-" + _libraries_helper__WEBPACK_IMPORTED_MODULE_0__[/* HELPER */ "a"].getUUIDv4();
return newRowObject;
}
/***/ }),
/***/ "7e90":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("d9f6");
var anObject = __webpack_require__("e4ae");
var getKeys = __webpack_require__("c3a1");
module.exports = __webpack_require__("8e60") ? 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;
};
/***/ }),
/***/ "7f20":
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__("86cc").f;
var has = __webpack_require__("69a8");
var TAG = __webpack_require__("2b4c")('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/***/ "7f7f":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("86cc").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__("9e1e") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/***/ "7fae":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var objectKeys = __webpack_require__("d6c7");
var isArguments = __webpack_require__("e39c");
var is = __webpack_require__("6db7");
var isRegex = __webpack_require__("d8d8");
var flags = __webpack_require__("e710");
var isArray = __webpack_require__("768d");
var isDate = __webpack_require__("0e65");
var whichBoxedPrimitive = __webpack_require__("2fb9");
var GetIntrinsic = __webpack_require__("00ce");
var callBound = __webpack_require__("545e");
var whichCollection = __webpack_require__("bd25");
var getIterator = __webpack_require__("b2b8");
var getSideChannel = __webpack_require__("5402");
var whichTypedArray = __webpack_require__("edc4");
var assign = __webpack_require__("2a8a");
var $getTime = callBound('Date.prototype.getTime');
var gPO = Object.getPrototypeOf;
var $objToString = callBound('Object.prototype.toString');
var $Set = GetIntrinsic('%Set%', true);
var $mapHas = callBound('Map.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSize = callBound('Map.prototype.size', true);
var $setAdd = callBound('Set.prototype.add', true);
var $setDelete = callBound('Set.prototype.delete', true);
var $setHas = callBound('Set.prototype.has', true);
var $setSize = callBound('Set.prototype.size', true);
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
function setHasEqualElement(set, val1, opts, channel) {
var i = getIterator(set);
var result;
while ((result = i.next()) && !result.done) {
if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
// Remove the matching element to make sure we do not check that again.
$setDelete(set, result.value);
return true;
}
}
return false;
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
function findLooseMatchingPrimitives(prim) {
if (typeof prim === 'undefined') {
return null;
}
if (typeof prim === 'object') { // Only pass in null as object!
return void 0;
}
if (typeof prim === 'symbol') {
return false;
}
if (typeof prim === 'string' || typeof prim === 'number') {
// Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
return +prim === +prim; // eslint-disable-line no-implicit-coercion
}
return true;
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
var altValue = findLooseMatchingPrimitives(prim);
if (altValue != null) {
return altValue;
}
var curB = $mapGet(b, altValue);
var looseOpts = assign({}, opts, { strict: false });
if (
(typeof curB === 'undefined' && !$mapHas(b, altValue))
// eslint-disable-next-line no-use-before-define
|| !internalDeepEqual(item, curB, looseOpts, channel)
) {
return false;
}
// eslint-disable-next-line no-use-before-define
return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
function setMightHaveLoosePrim(a, b, prim) {
var altValue = findLooseMatchingPrimitives(prim);
if (altValue != null) {
return altValue;
}
return $setHas(b, altValue) && !$setHas(a, altValue);
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
var i = getIterator(set);
var result;
var key2;
while ((result = i.next()) && !result.done) {
key2 = result.value;
if (
// eslint-disable-next-line no-use-before-define
internalDeepEqual(key1, key2, opts, channel)
// eslint-disable-next-line no-use-before-define
&& internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
) {
$setDelete(set, key2);
return true;
}
}
return false;
}
function internalDeepEqual(actual, expected, options, channel) {
var opts = options || {};
// 7.1. All identical values are equivalent, as determined by ===.
if (opts.strict ? is(actual, expected) : actual === expected) {
return true;
}
var actualBoxed = whichBoxedPrimitive(actual);
var expectedBoxed = whichBoxedPrimitive(expected);
if (actualBoxed !== expectedBoxed) {
return false;
}
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
}
/*
* 7.4. For all other Object pairs, including Array objects, equivalence is
* determined by having the same number of owned properties (as verified
* with Object.prototype.hasOwnProperty.call), the same set of keys
* (although not necessarily the same order), equivalent values for every
* corresponding key, and an identical 'prototype' property. Note: this
* accounts for both named and indexed properties on Arrays.
*/
// see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
var hasActual = channel.has(actual);
var hasExpected = channel.has(expected);
var sentinel;
if (hasActual && hasExpected) {
if (channel.get(actual) === channel.get(expected)) {
return true;
}
} else {
sentinel = {};
}
if (!hasActual) { channel.set(actual, sentinel); }
if (!hasExpected) { channel.set(expected, sentinel); }
// eslint-disable-next-line no-use-before-define
return objEquiv(actual, expected, opts, channel);
}
function isBuffer(x) {
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
return false;
}
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
return false;
}
if (x.length > 0 && typeof x[0] !== 'number') {
return false;
}
return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
}
function setEquiv(a, b, opts, channel) {
if ($setSize(a) !== $setSize(b)) {
return false;
}
var iA = getIterator(a);
var iB = getIterator(b);
var resultA;
var resultB;
var set;
while ((resultA = iA.next()) && !resultA.done) {
if (resultA.value && typeof resultA.value === 'object') {
if (!set) { set = new $Set(); }
$setAdd(set, resultA.value);
} else if (!$setHas(b, resultA.value)) {
if (opts.strict) { return false; }
if (!setMightHaveLoosePrim(a, b, resultA.value)) {
return false;
}
if (!set) { set = new $Set(); }
$setAdd(set, resultA.value);
}
}
if (set) {
while ((resultB = iB.next()) && !resultB.done) {
// We have to check if a primitive value is already matching and only if it's not, go hunting for it.
if (resultB.value && typeof resultB.value === 'object') {
if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
return false;
}
} else if (
!opts.strict
&& !$setHas(a, resultB.value)
&& !setHasEqualElement(set, resultB.value, opts.strict, channel)
) {
return false;
}
}
return $setSize(set) === 0;
}
return true;
}
function mapEquiv(a, b, opts, channel) {
if ($mapSize(a) !== $mapSize(b)) {
return false;
}
var iA = getIterator(a);
var iB = getIterator(b);
var resultA;
var resultB;
var set;
var key;
var item1;
var item2;
while ((resultA = iA.next()) && !resultA.done) {
key = resultA.value[0];
item1 = resultA.value[1];
if (key && typeof key === 'object') {
if (!set) { set = new $Set(); }
$setAdd(set, key);
} else {
item2 = $mapGet(b, key);
if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
if (opts.strict) {
return false;
}
if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
return false;
}
if (!set) { set = new $Set(); }
$setAdd(set, key);
}
}
}
if (set) {
while ((resultB = iB.next()) && !resultB.done) {
key = resultB.value[0];
item2 = resultB.value[1];
if (key && typeof key === 'object') {
if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
return false;
}
} else if (
!opts.strict
&& (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
&& !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
) {
return false;
}
}
return $setSize(set) === 0;
}
return true;
}
function objEquiv(a, b, opts, channel) {
/* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
var i, key;
if (typeof a !== typeof b) { return false; }
if (a == null || b == null) { return false; }
if ($objToString(a) !== $objToString(b)) { return false; }
if (isArguments(a) !== isArguments(b)) { return false; }
var aIsArray = isArray(a);
var bIsArray = isArray(b);
if (aIsArray !== bIsArray) { return false; }
// TODO: replace when a cross-realm brand check is available
var aIsError = a instanceof Error;
var bIsError = b instanceof Error;
if (aIsError !== bIsError) { return false; }
if (aIsError || bIsError) {
if (a.name !== b.name || a.message !== b.message) { return false; }
}
var aIsRegex = isRegex(a);
var bIsRegex = isRegex(b);
if (aIsRegex !== bIsRegex) { return false; }
if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
return false;
}
var aIsDate = isDate(a);
var bIsDate = isDate(b);
if (aIsDate !== bIsDate) { return false; }
if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
if ($getTime(a) !== $getTime(b)) { return false; }
}
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
if (whichTypedArray(a) !== whichTypedArray(b)) {
return false;
}
var aIsBuffer = isBuffer(a);
var bIsBuffer = isBuffer(b);
if (aIsBuffer !== bIsBuffer) { return false; }
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
if (a.length !== b.length) { return false; }
for (i = 0; i < a.length; i++) {
if (a[i] !== b[i]) { return false; }
}
return true;
}
if (typeof a !== typeof b) { return false; }
var ka = objectKeys(a);
var kb = objectKeys(b);
// having the same number of owned properties (keys incorporates hasOwnProperty)
if (ka.length !== kb.length) { return false; }
// the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
// ~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
}
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
}
var aCollection = whichCollection(a);
var bCollection = whichCollection(b);
if (aCollection !== bCollection) {
return false;
}
if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
return setEquiv(a, b, opts, channel);
}
if (aCollection === 'Map') { // aCollection === bCollection
return mapEquiv(a, b, opts, channel);
}
return true;
}
module.exports = function deepEqual(a, b, opts) {
return internalDeepEqual(a, b, opts, getSideChannel());
};
/***/ }),
/***/ "8079":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var macrotask = __webpack_require__("1991").set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__("2d95")(process) == 'process';
module.exports = function () {
var head, last, notify;
var flush = function () {
var parent, fn;
if (isNode && (parent = process.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
try {
fn();
} catch (e) {
if (head) notify();
else last = undefined;
throw e;
}
} last = undefined;
if (parent) parent.enter();
};
// Node.js
if (isNode) {
notify = function () {
process.nextTick(flush);
};
// browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
} else if (Observer && !(global.navigator && global.navigator.standalone)) {
var toggle = true;
var node = document.createTextNode('');
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
var promise = Promise.resolve(undefined);
notify = function () {
promise.then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function () {
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
return function (fn) {
var task = { fn: fn, next: undefined };
if (last) last.next = task;
if (!head) {
head = task;
notify();
} last = task;
};
};
/***/ }),
/***/ "8378":
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.12' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "8436":
/***/ (function(module, exports) {
module.exports = function () { /* empty */ };
/***/ }),
/***/ "84f2":
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "85f2":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("454f");
/***/ }),
/***/ "86cc":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("cb7c");
var IE8_DOM_DEFINE = __webpack_require__("c69a");
var toPrimitive = __webpack_require__("6a99");
var dP = Object.defineProperty;
exports.f = __webpack_require__("9e1e") ? 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;
};
/***/ }),
/***/ "8875":
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
// MIT license
// source: https://github.com/amiller-gh/currentScript-polyfill
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
(function (root, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {}
}(typeof self !== 'undefined' ? self : this, function () {
function getCurrentScript () {
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
// for chrome
if (!descriptor && 'currentScript' in document && document.currentScript) {
return document.currentScript
}
// for other browsers with native support for currentScript
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
return document.currentScript
}
// IE 8-10 support script readyState
// IE 11+ & Firefox support stack trace
try {
throw new Error();
}
catch (err) {
// Find the second match for the "at" string to get file src url from stack.
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
scriptLocation = (stackDetails && stackDetails[1]) || false,
line = (stackDetails && stackDetails[2]) || false,
currentLocation = document.location.href.replace(document.location.hash, ''),
pageSource,
inlineScriptSourceRegExp,
inlineScriptSource,
scripts = document.getElementsByTagName('script'); // Live NodeList collection
if (scriptLocation === currentLocation) {
pageSource = document.documentElement.outerHTML;
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
}
for (var i = 0; i < scripts.length; i++) {
// If ready state is interactive, return the script tag
if (scripts[i].readyState === 'interactive') {
return scripts[i];
}
// If src matches, return the script tag
if (scripts[i].src === scriptLocation) {
return scripts[i];
}
// If inline source matches, return the script tag
if (
scriptLocation === currentLocation &&
scripts[i].innerHTML &&
scripts[i].innerHTML.trim() === inlineScriptSource
) {
return scripts[i];
}
}
// If no match, return null
return null;
}
};
return getCurrentScript
}));
/***/ }),
/***/ "8a81":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__("7726");
var has = __webpack_require__("69a8");
var DESCRIPTORS = __webpack_require__("9e1e");
var $export = __webpack_require__("5ca1");
var redefine = __webpack_require__("2aba");
var META = __webpack_require__("67ab").KEY;
var $fails = __webpack_require__("79e5");
var shared = __webpack_require__("5537");
var setToStringTag = __webpack_require__("7f20");
var uid = __webpack_require__("ca5a");
var wks = __webpack_require__("2b4c");
var wksExt = __webpack_require__("37c8");
var wksDefine = __webpack_require__("3a72");
var enumKeys = __webpack_require__("d4c0");
var isArray = __webpack_require__("1169");
var anObject = __webpack_require__("cb7c");
var isObject = __webpack_require__("d3f4");
var toObject = __webpack_require__("4bf8");
var toIObject = __webpack_require__("6821");
var toPrimitive = __webpack_require__("6a99");
var createDesc = __webpack_require__("4630");
var _create = __webpack_require__("2aeb");
var gOPNExt = __webpack_require__("7bbc");
var $GOPD = __webpack_require__("11e9");
var $GOPS = __webpack_require__("2621");
var $DP = __webpack_require__("86cc");
var $keys = __webpack_require__("0d58");
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__("9093").f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__("52a7").f = $propertyIsEnumerable;
$GOPS.f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__("2d00")) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
return $GOPS.f(toObject(it));
}
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("32e9")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/***/ "8ae1":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ CONTROL_SPECIAL_CONFIG_MIXIN; });
// EXTERNAL MODULE: ./src/mixins/style-injection-mixin.js
var style_injection_mixin = __webpack_require__("28fe");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/misc/IconTooltip.vue?vue&type=template&id=02fef337&scoped=true&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"v-tooltip"},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon(_vm.icon, _vm.iconSize, _vm.iconSize, _vm.iconColor))}}),_c('span',{staticClass:"tooltiptext",domProps:{"innerHTML":_vm._s(_vm.text)}})])}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/misc/IconTooltip.vue?vue&type=template&id=02fef337&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/misc/IconTooltip.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
/* harmony default export */ var IconTooltipvue_type_script_lang_js_ = ({
name: "IconTooltip",
props: {
text: String,
icon: String,
iconSize: {
type: String,
default: '16px'
},
iconColor: {
type: String,
default: '#000'
}
}
});
// CONCATENATED MODULE: ./src/views/builder/misc/IconTooltip.vue?vue&type=script&lang=js&
/* harmony default export */ var misc_IconTooltipvue_type_script_lang_js_ = (IconTooltipvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/builder/misc/IconTooltip.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
misc_IconTooltipvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
"02fef337",
null
)
/* harmony default export */ var IconTooltip = (component.exports);
// CONCATENATED MODULE: ./src/mixins/control-special-config-mixin.js
var CONTROL_SPECIAL_CONFIG_MIXIN = {
components: {
IconTooltip: IconTooltip
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
/**
* Control Object Configuration
*/
control: {
type: Object,
required: true
},
/**
* Form-Data from the ROOT
*/
formData: {
type: Object,
required: true
}
}
};
/***/ }),
/***/ "8dbe":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ CONTROLS; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ CONTROL_DEFAULT_DATA; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ STATIC_CONTROLS; });
// UNUSED EXPORTS: createControlData
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./src/configs/styles.js
var styles = __webpack_require__("d60e");
// EXTERNAL MODULE: ./src/libraries/helper.js
var helper = __webpack_require__("43b3");
// CONCATENATED MODULE: ./src/configs/control-config-enum.js
/**
* Constant for Radio/Checkbox Styling
* @type {{next: string, bothSide: string, line: string}}
*/
var RADIO_CHECKBOX_STYLE = {
line: {
val: 'line',
description: "Line by Line"
},
next: {
val: 'next',
description: "Next to each others"
},
bothSide: {
val: "bothSide",
description: "Stay on each sides in a row (Left - Right)"
}
};
/**
* Constant for Radio/Checkbox position
* @type {{left: string, center: string, right: string}}
*/
var RADIO_CHECKBOX_POSITION = {
left: {
val: 'left',
description: "Left"
},
center: {
val: 'center',
description: 'Center'
},
right: {
val: 'right',
description: 'Right'
}
};
/**
* Return Type for Date-Picker
* @type {{format: {val: string, description: string}, object: {val: string, description: string}}}
*/
var DATE_PICKER_RETURN_TYPES = {
format: {
val: "format",
description: "Date String from Date Format"
},
object: {
val: "object",
description: "JS-Date Object"
}
};
/**
* Date Picker Start Date (Sunday, Monday,...) of the Week
*/
var DATE_PICKER_START_DATES = {
monday: {
val: 1,
description: "Monday"
},
tuesday: {
val: 2,
description: "Tuesday"
},
wednesday: {
val: 3,
description: "Wednesday"
},
thursday: {
val: 4,
description: "Thursday"
},
friday: {
val: 5,
description: "Friday"
},
saturday: {
val: 6,
description: "Saturday"
},
sunday: {
val: 0,
description: "Sunday"
}
};
/**
* DROPDOWN DATA MODE
* - Normal
* - API
*/
var DROPDOWN_DATA_MODES = {
list: {
val: 'list',
description: "Normal - Pre-Config List Items"
},
api: {
val: 'api',
description: "API - List Items from your own API"
}
};
/**
* File Upload Modes
*/
var FILE_UPLOAD_MODES = {
normal: {
val: 'normal',
description: "Keep the file there for HTTP Form Request"
},
preUpload: {
val: 'preUpload',
description: "Pre-Upload to your own API"
}
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/InputControl.vue?vue&type=template&id=43a854f8&scoped=true&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{class:_vm.controlFieldClass,attrs:{"id":_vm.control.uniqueId,"type":"text","name":_vm.control.name || _vm.control.uniqueId,"placeholder":_vm.control.placeholderText},domProps:{"value":_vm.value},on:{"input":function($event){return _vm.updateValue($event.target.value)}}})}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/InputControl.vue?vue&type=template&id=43a854f8&scoped=true&
// EXTERNAL MODULE: ./src/mixins/control-field-extend-mixin.js
var control_field_extend_mixin = __webpack_require__("653e");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/InputControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/**
* InputControl doesn't need to setValue. We can eventually assign the bind the value into the <input>
* Safe safe...
*/
/* harmony default export */ var InputControlvue_type_script_lang_js_ = ({
name: "InputControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/controls/InputControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_InputControlvue_type_script_lang_js_ = (InputControlvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/controls/InputControl.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
controls_InputControlvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
"43a854f8",
null
)
/* harmony default export */ var InputControl = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TextControl.vue?vue&type=template&id=4ba99d1a&
var TextControlvue_type_template_id_4ba99d1a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('textarea',{class:_vm.controlFieldClass,attrs:{"id":_vm.control.uniqueId,"type":"text","rows":_vm.control.rows,"name":_vm.control.name,"placeholder":_vm.control.placeholderText},domProps:{"value":_vm.value},on:{"input":function($event){return _vm.updateValue($event.target.value)}}})}
var TextControlvue_type_template_id_4ba99d1a_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/TextControl.vue?vue&type=template&id=4ba99d1a&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TextControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* TextControl doesn't need to setValue. We can eventually assign the bind the value into the <textarea>
* Safe safe...
*/
/* harmony default export */ var TextControlvue_type_script_lang_js_ = ({
name: "TextControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/controls/TextControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_TextControlvue_type_script_lang_js_ = (TextControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/TextControl.vue
/* normalize component */
var TextControl_component = Object(componentNormalizer["a" /* default */])(
controls_TextControlvue_type_script_lang_js_,
TextControlvue_type_template_id_4ba99d1a_render,
TextControlvue_type_template_id_4ba99d1a_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var TextControl = (TextControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/ButtonControl.vue?vue&type=template&id=555c5003&
var ButtonControlvue_type_template_id_555c5003_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{class:_vm.buttonClasses,attrs:{"id":_vm.control.uniqueId,"name":_vm.control.name,"type":_vm.control.buttonType || 'button'},domProps:{"textContent":_vm._s(_vm.control.label)},on:{"click":_vm.clickedHandle}})}
var ButtonControlvue_type_template_id_555c5003_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/ButtonControl.vue?vue&type=template&id=555c5003&
// EXTERNAL MODULE: ./src/configs/events.js
var events = __webpack_require__("fbe6");
// EXTERNAL MODULE: ./src/configs/global.js
var global = __webpack_require__("b1f2");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/ButtonControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
/**
* Button Control
* Usage:
* - label => button name
* - buttonType
* - buttonClass
* - additionalFieldClass
*/
/* harmony default export */ var ButtonControlvue_type_script_lang_js_ = ({
name: "ButtonControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
methods: {
/**
* What should we do if user clicked?
* - Validation
* - Emit
*/
clickedHandle: function clickedHandle() {
if (this.control.isRunValidation) {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].RENDERER.RUN_VALIDATION, true);
} else {
// no need to validation => submit
this.submit();
}
},
/**
* [VALIDATION-OK-EMIT] Continue to process
*/
continueProcessAfterValidationOk: function continueProcessAfterValidationOk() {
// can be submit after validation
this.submit();
},
/**
* Submitting The Form
* Rules:
* - Had Event Code & Event Data => Submit By Emitting
* - Empty Event Code & Event Data, Had <Form>, Had type = "submit" => Submit by Form Request
*/
submit: function submit() {
if (this.control.emitEventCode && this.control.emitEventData) {
// emit to the specific emitEventCode
this.$formEvent.$emit(this.control.emitEventCode, this.control.emitEventData);
return;
} // triggering form-submit if exists
// use DOM object ??
var formDOM = document.getElementById(global["a" /* GLOBAL_CONFIG */].rendererFormId);
if (!formDOM || this.$el.type !== 'submit') {
return;
}
formDOM.submit();
}
},
computed: {
buttonClasses: function buttonClasses() {
return [this.control.buttonClass, this.control.additionalFieldClass];
}
},
created: function created() {
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].RENDERER.VALIDATION_OK, this.continueProcessAfterValidationOk);
}
});
// CONCATENATED MODULE: ./src/views/controls/ButtonControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_ButtonControlvue_type_script_lang_js_ = (ButtonControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/ButtonControl.vue
/* normalize component */
var ButtonControl_component = Object(componentNormalizer["a" /* default */])(
controls_ButtonControlvue_type_script_lang_js_,
ButtonControlvue_type_template_id_555c5003_render,
ButtonControlvue_type_template_id_555c5003_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ButtonControl = (ButtonControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/EmptyBlockControl.vue?vue&type=template&id=3fdfbdb1&
var EmptyBlockControlvue_type_template_id_3fdfbdb1_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div')}
var EmptyBlockControlvue_type_template_id_3fdfbdb1_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/EmptyBlockControl.vue?vue&type=template&id=3fdfbdb1&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/EmptyBlockControl.vue?vue&type=script&lang=js&
//
//
//
//
/**
* As you can see, it's surely an empty block =))
*/
/* harmony default export */ var EmptyBlockControlvue_type_script_lang_js_ = ({
name: "EmptyBlockControl"
});
// CONCATENATED MODULE: ./src/views/controls/EmptyBlockControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_EmptyBlockControlvue_type_script_lang_js_ = (EmptyBlockControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/EmptyBlockControl.vue
/* normalize component */
var EmptyBlockControl_component = Object(componentNormalizer["a" /* default */])(
controls_EmptyBlockControlvue_type_script_lang_js_,
EmptyBlockControlvue_type_template_id_3fdfbdb1_render,
EmptyBlockControlvue_type_template_id_3fdfbdb1_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var EmptyBlockControl = (EmptyBlockControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TextBlockControl.vue?vue&type=template&id=11f2f70f&
var TextBlockControlvue_type_template_id_11f2f70f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.control.additionalFieldClass,domProps:{"textContent":_vm._s(_vm.control.text)}})])}
var TextBlockControlvue_type_template_id_11f2f70f_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/TextBlockControl.vue?vue&type=template&id=11f2f70f&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TextBlockControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
/**
* As you can see, it's surely an empty block =))
*/
/* harmony default export */ var TextBlockControlvue_type_script_lang_js_ = ({
name: "TextBlockControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/controls/TextBlockControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_TextBlockControlvue_type_script_lang_js_ = (TextBlockControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/TextBlockControl.vue
/* normalize component */
var TextBlockControl_component = Object(componentNormalizer["a" /* default */])(
controls_TextBlockControlvue_type_script_lang_js_,
TextBlockControlvue_type_template_id_11f2f70f_render,
TextBlockControlvue_type_template_id_11f2f70f_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var TextBlockControl = (TextBlockControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/LabelControl.vue?vue&type=template&id=3e7935fd&
var LabelControlvue_type_template_id_3e7935fd_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{class:_vm.control.additionalLabelClass,attrs:{"id":_vm.control.uniqueId,"for":_vm.control.forAttribute},domProps:{"innerHTML":_vm._s(_vm.control.label)}})}
var LabelControlvue_type_template_id_3e7935fd_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/LabelControl.vue?vue&type=template&id=3e7935fd&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/LabelControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/**
* LabelControl
* <label for='...'>...</label>
*/
/* harmony default export */ var LabelControlvue_type_script_lang_js_ = ({
name: "LabelControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/controls/LabelControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_LabelControlvue_type_script_lang_js_ = (LabelControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/LabelControl.vue
/* normalize component */
var LabelControl_component = Object(componentNormalizer["a" /* default */])(
controls_LabelControlvue_type_script_lang_js_,
LabelControlvue_type_template_id_3e7935fd_render,
LabelControlvue_type_template_id_3e7935fd_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var LabelControl = (LabelControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/RadioCheckboxControl.vue?vue&type=template&id=c46aea28&
var RadioCheckboxControlvue_type_template_id_c46aea28_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.control.uniqueId}},[(_vm.isSameBlock)?_c('div',{staticClass:"radio-checkbox",class:_vm.lineNextClasses},_vm._l((_vm.control.items),function(listItem){return _c('label',{key:listItem.value,class:_vm.positionClasses},[((_vm.control.type)==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":"checkbox"},domProps:{"value":listItem.value,"checked":Array.isArray(_vm.valueContainer[_vm.controlName])?_vm._i(_vm.valueContainer[_vm.controlName],listItem.value)>-1:(_vm.valueContainer[_vm.controlName])},on:{"change":function($event){var $$a=_vm.valueContainer[_vm.controlName],$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=listItem.value,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.valueContainer, _vm.controlName, $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.valueContainer, _vm.controlName, $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.valueContainer, _vm.controlName, $$c)}}}}):((_vm.control.type)==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":"radio"},domProps:{"value":listItem.value,"checked":_vm._q(_vm.valueContainer[_vm.controlName],listItem.value)},on:{"change":function($event){return _vm.$set(_vm.valueContainer, _vm.controlName, listItem.value)}}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":_vm.control.type},domProps:{"value":listItem.value,"value":(_vm.valueContainer[_vm.controlName])},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.valueContainer, _vm.controlName, $event.target.value)}}}),_vm._v(" "+_vm._s(listItem.text)+" "),(_vm.displayMode === 'line')?_c('br'):_vm._e()])}),0):_c('div',[_c('div',{staticClass:"radio-checkbox",class:_vm.styles.ROW},_vm._l((_vm.control.items),function(listItem){return _c('div',{key:listItem.value,class:[_vm.styles.COLUMNS.COL6, _vm.positionClasses]},[_c('label',[((_vm.control.type)==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":"checkbox"},domProps:{"value":listItem.value,"checked":Array.isArray(_vm.valueContainer[_vm.controlName])?_vm._i(_vm.valueContainer[_vm.controlName],listItem.value)>-1:(_vm.valueContainer[_vm.controlName])},on:{"change":function($event){var $$a=_vm.valueContainer[_vm.controlName],$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=listItem.value,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.valueContainer, _vm.controlName, $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.valueContainer, _vm.controlName, $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.valueContainer, _vm.controlName, $$c)}}}}):((_vm.control.type)==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":"radio"},domProps:{"value":listItem.value,"checked":_vm._q(_vm.valueContainer[_vm.controlName],listItem.value)},on:{"change":function($event){return _vm.$set(_vm.valueContainer, _vm.controlName, listItem.value)}}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueContainer[_vm.controlName]),expression:"valueContainer[controlName]"}],class:_vm.control.additionalFieldClass,attrs:{"name":_vm.inputName,"type":_vm.control.type},domProps:{"value":listItem.value,"value":(_vm.valueContainer[_vm.controlName])},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.valueContainer, _vm.controlName, $event.target.value)}}}),_vm._v(" "+_vm._s(listItem.text)+" ")])])}),0)])])}
var RadioCheckboxControlvue_type_template_id_c46aea28_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/RadioCheckboxControl.vue?vue&type=template&id=c46aea28&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/RadioCheckboxControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* Radio/Checkbox List Control
* Probably, we can use them together. Because the only main difference is input[type=radio|checkbox]
* @property {ListItem[]} control.items
*/
/* harmony default export */ var RadioCheckboxControlvue_type_script_lang_js_ = ({
name: "RadioCheckboxControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
props: {
valueContainer: {
type: Object,
default: function _default() {
return {};
}
}
},
data: function data() {
return {
stopDefaultValueAssign: true,
defaultBucket: ''
};
},
created: function created() {
// special case for Form-Builder since we can't use the
// valueContainer (value container only available on Renderer)
if (!this.valueContainer[this.controlName]) {
this.valueContainer[this.controlName] = '';
}
},
mounted: function mounted() {
if (this.control.defaultValue) {
// assign default value for control
if (this.isRadio) {
this.updateValue(this.control.defaultValue);
} else {
this.updateValue([this.control.defaultValue]);
}
}
},
computed: {
/**
* Check if the current instance control is radio??
* @returns {boolean}
*/
isRadio: function isRadio() {
return this.control.type === 'radio';
},
/**
* Quick Access to The Control.DisplayMode
* @returns {string}
*/
displayMode: function displayMode() {
return this.control.displayMode;
},
/**
* Check if the displayMode either line or next. Because both of them are in the same `div` block
* @returns {boolean}
*/
isSameBlock: function isSameBlock() {
return this.displayMode === RADIO_CHECKBOX_STYLE.line.val || this.displayMode === RADIO_CHECKBOX_STYLE.next.val;
},
/**
* Get classes for view mode of Line - Next
* @returns {Object}
*/
lineNextClasses: function lineNextClasses() {
return {
'line': this.displayMode === 'line',
'next': this.displayMode === 'next'
};
},
/**
* Get position class depends on the configuration
* @returns {Object}
*/
positionClasses: function positionClasses() {
return {
'text-center': this.control.position === RADIO_CHECKBOX_POSITION.center.val,
'text-right': this.control.position === RADIO_CHECKBOX_POSITION.right.val,
'text-left': this.control.position === RADIO_CHECKBOX_POSITION.left.val
};
},
/**
* Generate the :name for the input[type=checkbox|radio]
* @returns {string|string}
*/
inputName: function inputName() {
// For input[name] of Radio, they need to be the same.
// If Control Name is Empty => Use ID instead (otherwise, control will break =)) )
if (this.isRadio) {
return this.controlName;
} // For Checkbox, name will always be Array Mode (name[])
return this.controlName + "[]";
}
}
});
// CONCATENATED MODULE: ./src/views/controls/RadioCheckboxControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_RadioCheckboxControlvue_type_script_lang_js_ = (RadioCheckboxControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/RadioCheckboxControl.vue
/* normalize component */
var RadioCheckboxControl_component = Object(componentNormalizer["a" /* default */])(
controls_RadioCheckboxControlvue_type_script_lang_js_,
RadioCheckboxControlvue_type_template_id_c46aea28_render,
RadioCheckboxControlvue_type_template_id_c46aea28_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var RadioCheckboxControl = (RadioCheckboxControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DatePickerControl.vue?vue&type=template&id=f1dd2036&scoped=true&
var DatePickerControlvue_type_template_id_f1dd2036_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.control.singleMode)?[_c('input',{class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","id":_vm.control.uniqueId,"name":_vm.control.name || _vm.control.uniqueId,"placeholder":_vm.control.placeholderText,"autocomplete":"off"}})]:[_c('input',{class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","id":_vm.control.uniqueId,"placeholder":_vm.control.placeholderText,"autocomplete":"off"}}),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.value.startDate),expression:"value.startDate"}],attrs:{"type":"hidden","name":_vm.startDateFieldName},domProps:{"value":(_vm.value.startDate)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.value, "startDate", $event.target.value)}}}),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.value.endDate),expression:"value.endDate"}],attrs:{"type":"hidden","name":_vm.endDateFieldName},domProps:{"value":(_vm.value.endDate)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.value, "endDate", $event.target.value)}}})]],2)}
var DatePickerControlvue_type_template_id_f1dd2036_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/DatePickerControl.vue?vue&type=template&id=f1dd2036&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
var es7_object_get_own_property_descriptors = __webpack_require__("8e6e");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("bd86");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("7618");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// EXTERNAL MODULE: ./node_modules/litepicker/dist/js/main.js
var main = __webpack_require__("5360");
var main_default = /*#__PURE__*/__webpack_require__.n(main);
// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
var dayjs_min = __webpack_require__("5a0c");
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DatePickerControl.vue?vue&type=script&lang=js&
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var DatePickerControlvue_type_script_lang_js_ = ({
name: "DatePickerControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
datepicker: null,
currentValue: null
};
},
model: {
event: 'change',
prop: 'value'
},
watch: {
control: {
deep: true,
handler: function handler(val) {
this.setOption(val);
}
},
value: function value(val) {
this.setValue(val);
}
},
methods: {
/**
* Re-set the DatePicker Configuration
*/
setOption: function setOption() {
var ops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (!Object.keys(ops).length) {
return;
}
this.datepicker.setOptions(ops);
},
/**
* Special Func to set Value
* @param val
*/
setValue: function setValue(val) {
if (val === null || val === undefined || val === '') {
this.datepicker.setDate(null);
return;
} // set for date-range
if (Object(esm_typeof["a" /* default */])(val) === 'object' && val.startDate && val.endDate) {
// stop if same value
if (this.currentValue && this.currentValue.startDate === val.startDate && this.currentValue.endDate === val.endDate) {
return;
}
this.datepicker.setDateRange(val.startDate, val.endDate);
return;
} // set by single date
if (typeof val === 'string' || val instanceof Date) {
// stop reset because of same date
if (this.val === this.currentValue) {
return;
}
this.datepicker.setDate(val);
}
},
/**
* onSelect get date
* @param {Date} startDate
* @param {Date|null} endDate
*/
getValue: function getValue(startDate, endDate) {
if (startDate == null) {
return this.updateValue(null);
} // Single-mode will have a single emit
if (this.control.singleMode) {
var _emitValue = startDate; // Parse to format before emit??
if (this.control.returnType === DATE_PICKER_RETURN_TYPES.format.val) {
_emitValue = dayjs_min_default()(startDate).format(this.control.format);
} // emit to parent
this.updateValue(_emitValue);
this.currentValue = _emitValue;
return;
} // date-range will have {startDate: ... , endDate: ...}
var emitValue = {
startDate: startDate,
endDate: endDate
}; // Parse to format before emit??
if (this.control.returnType === DATE_PICKER_RETURN_TYPES.format.val) {
emitValue.startDate = dayjs_min_default()(startDate).format(this.control.format);
emitValue.endDate = dayjs_min_default()(endDate).format(this.control.format);
} // emit to parent
this.updateValue(emitValue);
this.currentValue = emitValue;
}
},
mounted: function mounted() {
var _this = this;
this.datepicker = new main_default.a(_objectSpread(_objectSpread({
element: document.getElementById(this.control.uniqueId)
}, this.control), {}, {
/**
* Post-render processing
*/
onRender: function onRender() {
if (_this.control.defaultValue) {
_this.setValue(_this.control.defaultValue);
}
},
/**
* On-Selected a Day
* @param {Date} date
*/
onSelect: this.getValue
}));
},
beforeDestroy: function beforeDestroy() {
this.datepicker.destroy();
},
computed: {
startDateFieldName: function startDateFieldName() {
return (this.control.name || this.control.uniqueId) + '[startDate]';
},
endDateFieldName: function endDateFieldName() {
return (this.control.name || this.control.uniqueId) + '[endDate]';
}
}
});
// CONCATENATED MODULE: ./src/views/controls/DatePickerControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_DatePickerControlvue_type_script_lang_js_ = (DatePickerControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/DatePickerControl.vue
/* normalize component */
var DatePickerControl_component = Object(componentNormalizer["a" /* default */])(
controls_DatePickerControlvue_type_script_lang_js_,
DatePickerControlvue_type_template_id_f1dd2036_scoped_true_render,
DatePickerControlvue_type_template_id_f1dd2036_scoped_true_staticRenderFns,
false,
null,
"f1dd2036",
null
)
/* harmony default export */ var DatePickerControl = (DatePickerControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DateControl.vue?vue&type=template&id=953c4b9a&scoped=true&
var DateControlvue_type_template_id_953c4b9a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-form-datepicker',{attrs:{"id":_vm.control.uniqueId,"value":_vm.value,"show-decade-nav":true,"today-button":"","reset-button":"","close-button":"","locale":"en"},on:{"input":_vm.dataChanged}})],1)}
var DateControlvue_type_template_id_953c4b9a_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/DateControl.vue?vue&type=template&id=953c4b9a&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DateControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var DateControlvue_type_script_lang_js_ = ({
name: "DateControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
methods: {
dataChanged: function dataChanged(val) {
this.updateValue(val);
}
}
});
// CONCATENATED MODULE: ./src/views/controls/DateControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_DateControlvue_type_script_lang_js_ = (DateControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/DateControl.vue
/* normalize component */
var DateControl_component = Object(componentNormalizer["a" /* default */])(
controls_DateControlvue_type_script_lang_js_,
DateControlvue_type_template_id_953c4b9a_scoped_true_render,
DateControlvue_type_template_id_953c4b9a_scoped_true_staticRenderFns,
false,
null,
"953c4b9a",
null
)
/* harmony default export */ var DateControl = (DateControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/NumberControl.vue?vue&type=template&id=7f8d83f0&scoped=true&
var NumberControlvue_type_template_id_7f8d83f0_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{class:_vm.controlFieldClass,attrs:{"id":_vm.control.uniqueId,"type":"number","name":_vm.control.name,"placeholder":_vm.control.placeholderText},domProps:{"value":_vm.number},on:{"input":function($event){return _vm.convertToNumber($event.target.value)}}})}
var NumberControlvue_type_template_id_7f8d83f0_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/NumberControl.vue?vue&type=template&id=7f8d83f0&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/NumberControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/**
* Number Control
* Later
* @focusin="previewMode = number"
* @focusout="updatedPreview"
*/
/* harmony default export */ var NumberControlvue_type_script_lang_js_ = ({
name: "NumberControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
number: 0,
stopDefaultValueAssign: true,
previewMode: "0"
};
},
methods: {
/**
* Convert to Number before Emit V-Model
* @param value
*/
convertToNumber: function convertToNumber(value) {
var convertedVal = this.isRealNumber ? parseFloat(value) : parseInt(value, 10); // emit now
this.updateValue(convertedVal); // re-assign val
//this.updatedPreview()
this.number = convertedVal;
},
/**
* Updated Preview Mode (Mask preview, eg: 1,123,456.00) for Number
* TODO: Available only v2.1
*/
updatedPreview: function updatedPreview() {},
/**
* Specific set value for the Number Control from the v-model
*/
setValue: function setValue(val) {
this.convertToNumber(val);
}
},
computed: {
/**
* Check if the num control is using int or float/double
* @returns {boolean}
*/
isRealNumber: function isRealNumber() {
return this.control.isReal;
}
},
created: function created() {
// set default value (if exists)
if (this.control.defaultValue) {
this.convertToNumber(this.control.defaultValue);
}
}
});
// CONCATENATED MODULE: ./src/views/controls/NumberControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_NumberControlvue_type_script_lang_js_ = (NumberControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/NumberControl.vue
/* normalize component */
var NumberControl_component = Object(componentNormalizer["a" /* default */])(
controls_NumberControlvue_type_script_lang_js_,
NumberControlvue_type_template_id_7f8d83f0_scoped_true_render,
NumberControlvue_type_template_id_7f8d83f0_scoped_true_staticRenderFns,
false,
null,
"7f8d83f0",
null
)
/* harmony default export */ var NumberControl = (NumberControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DropdownControl.vue?vue&type=template&id=5cc6b373&scoped=true&
var DropdownControlvue_type_template_id_5cc6b373_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('select',{class:_vm.controlFieldClass,attrs:{"id":_vm.control.uniqueId,"name":_vm.control.name || _vm.control.uniqueId,"multiple":this.control.multiple},on:{"input":function($event){return _vm.updateValue($event.target.value)}}},[(_vm.control.placeholderText)?_c('option',{attrs:{"disabled":"","selected":""},domProps:{"textContent":_vm._s(_vm.control.placeholderText)}}):_vm._e(),_vm._l((_vm.listOptions),function(optionObj){return _c('option',{key:optionObj.value,domProps:{"value":optionObj.value,"selected":_vm.value === optionObj.value,"textContent":_vm._s(optionObj.text)}})})],2)}
var DropdownControlvue_type_template_id_5cc6b373_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/DropdownControl.vue?vue&type=template&id=5cc6b373&scoped=true&
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/createClass.js
var createClass = __webpack_require__("b0b4");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d225");
// CONCATENATED MODULE: ./src/libraries/list-item.class.js
/**
* List-Item for Checkbox/Radio/Select
*/
var list_item_class_ListItem = /*#__PURE__*/Object(createClass["a" /* default */])(function ListItem(value, text) {
Object(classCallCheck["a" /* default */])(this, ListItem);
Object(defineProperty["a" /* default */])(this, "value", "");
Object(defineProperty["a" /* default */])(this, "text", "");
this.value = value;
this.text = text;
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DropdownControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* Dropdown Control.
* I've been thinking all day, all night, should I use some library (select2, choices.js,...)
* But, after some researched via https://bundlephobia.com/ , I decided to use Native Select instead
* In order to save some KBs, the bundle is kinda bigger now @@
* @property {ListItem[]} listOptions
*/
/* harmony default export */ var DropdownControlvue_type_script_lang_js_ = ({
name: "DropdownControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
listOptions: [],
dataMode: "",
apiURL: ""
};
},
watch: {
control: {
deep: true,
handler: function handler(controlObj) {
// we cached it. If nothing change => no reload
if ( // single check
controlObj.dataMode !== this.dataMode || controlObj.apiURL !== this.apiURL || // list check
controlObj.dataMode === DROPDOWN_DATA_MODES.list.val && controlObj.items.length !== this.listOptions.length) {
return this.retrieveOptionLists();
}
}
}
},
methods: {
retrieveOptionLists: function retrieveOptionLists() {
this.dataMode = this.control.dataMode;
this.apiURL = this.control.apiURL; // pick up option data
if (this.control.dataMode === DROPDOWN_DATA_MODES.list.val) {
this.listOptions = this.control.items;
return;
} // our code goes down here? => REST-API
if (!this.control.apiURL) {
throw new TypeError("[Dropdown] In order to use REST-API for Dropdown. You must set your Rest-API Endpoint.");
} // is it http/https?
if (this.control.apiURL.indexOf("http://") < 0 && this.control.apiURL.indexOf("https://") < 0) {
throw new TypeError("[Dropdown] Rest-API Endpoint must be valid http/https URL.");
} // ok retrieve now
fetch(this.control.apiURL, {
method: "GET"
}).then(function (result) {
return result.json();
}).then(this.afterRestAPICallDataSuccessfully).catch(this.restAPICallErrorHandling);
},
/**
* [FOR-RestAPI-Dropdown][EVENT]
* Appending data after success
* @param {[]} result
*/
afterRestAPICallDataSuccessfully: function afterRestAPICallDataSuccessfully(result) {
var _this = this;
if (!Array.isArray(result)) {
throw new TypeError("[DROPDOWN-".concat(this.control.name, "] Wrong API-data format."));
} // clear list
this.listOptions = []; // traversal all list and add it into the list
result.forEach(function (optionObj) {
_this.listOptions.push(new list_item_class_ListItem(optionObj[_this.valueKey], optionObj[_this.textKey]));
});
},
/**
* [FOR-RestAPI-Dropdown][EVENT]
* Show error for dropdown.
*/
restAPICallErrorHandling: function restAPICallErrorHandling(e) {
console.error("[DROPDOWN-Control-".concat(this.control.uniqueId, "] Request API to get data failed."), e);
}
},
computed: {
/**
* [API-Only] Get Text Key
* @returns {string}
*/
textKey: function textKey() {
return this.control.apiTextKey || "text";
},
/**
* [API-Only] Get Text Key
* @returns {string}
*/
valueKey: function valueKey() {
return this.control.apiValueKey || "value";
}
},
created: function created() {
this.retrieveOptionLists();
}
});
// CONCATENATED MODULE: ./src/views/controls/DropdownControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_DropdownControlvue_type_script_lang_js_ = (DropdownControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/DropdownControl.vue
/* normalize component */
var DropdownControl_component = Object(componentNormalizer["a" /* default */])(
controls_DropdownControlvue_type_script_lang_js_,
DropdownControlvue_type_template_id_5cc6b373_scoped_true_render,
DropdownControlvue_type_template_id_5cc6b373_scoped_true_staticRenderFns,
false,
null,
"5cc6b373",
null
)
/* harmony default export */ var DropdownControl = (DropdownControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/LinkControl.vue?vue&type=template&id=58715031&scoped=true&
var LinkControlvue_type_template_id_58715031_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":("parent-" + (_vm.control.uniqueId))}},[_c('div',[_c('v-select',{attrs:{"options":_vm.searchResults,"label":"name","filterable":false,"placeholder":"Search"},on:{"search":_vm.onSearch},scopedSlots:_vm._u([{key:"selected-option",fn:function(option){return [_c('div',{staticClass:"selected d-center"},[_vm._v(" "+_vm._s(option.value)+" ")])]}},{key:"option",fn:function(option){return [_c('div',{staticClass:"d-center"},[_vm._v(" "+_vm._s(option.value)+" ")])]}}]),model:{value:(_vm.searchValue),callback:function ($$v) {_vm.searchValue=$$v},expression:"searchValue"}})],1)])}
var LinkControlvue_type_template_id_58715031_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/LinkControl.vue?vue&type=template&id=58715031&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.find.js
var es6_array_find = __webpack_require__("7514");
// EXTERNAL MODULE: ./src/services/frappe.js + 38 modules
var services_frappe = __webpack_require__("ee28");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/LinkControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var LinkControlvue_type_script_lang_js_ = ({
name: "LinkControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return Object(defineProperty["a" /* default */])({
searchValue: {
value: this.value
},
linkControl: null,
linkFilters: {},
parentData: null,
searchTerm: "",
selectedItem: null,
searchResults: []
}, "parentData", "");
},
mounted: function mounted() {
this.preload();
},
watch: {
searchValue: function searchValue(o, n) {
this.updateValue(o.value);
},
valueContainer: {
handler: function handler(newData, oldData) {
if (this.control.parentData != null && newData[this.control.parentData] != null) {
this.parentData = newData[this.control.parentData];
}
},
deep: true
},
value: function value(val) {
if (!val || !val.length) {} else {
this.searchValue = {
value: val,
description: ""
};
}
}
},
methods: {
openConfig: function openConfig() {
console.log(this.formData);
},
preload: function preload() {
var me = this;
var condition = me.control.searchFilters;
var parentData = me.control.parentData;
var parentConcept = me.control.parentConcept;
if (parentConcept != null && parentConcept.length > 0) {
// const parentKey = `parent_${this.control.searchDocument.toLowerCase()}`
this.linkFilters = {
parent_residence: parentConcept
};
}
if (parentData != null && parentData.length > 0) {
var parentKey = "parent_".concat(this.control.searchDocument.toLowerCase());
this.linkFilters[parentKey] = this.valueContainer[parentData];
}
if (condition != null && condition.length > 0) {
this.linkFilters = JSON.parse(condition);
}
},
fetchData: function fetchData(loading, search, context) {
var _this = this;
Object(services_frappe["a" /* api */])({
method: "frappe.desk.search.search_link",
args: {
txt: search,
doctype: context.control.searchDocument,
reference_doctype: "",
filters: context.linkFilters
}
}).then(function (response) {
loading(false);
_this.$set(_this, "searchResults", response.results);
});
},
handleSelect: function handleSelect(value) {
this.selectedItem = this.searchResults.find(function (item) {
return item.id === value;
});
},
onSearch: function onSearch(search, loading) {
var me = this;
var condition = me.control.searchFilters;
var parentData = me.control.parentData;
var parentConcept = me.control.parentConcept;
if (parentConcept != null && parentConcept.length > 0) {
this.linkFilters = {
parent_residence: parentConcept
};
}
if (parentData != null && parentData.length > 0) {
this.linkFilters = {
parent_residence: this.valueContainer[parentData]
};
}
if (condition != null && condition.length > 0) {
this.linkFilters = JSON.parse(condition);
}
if (search.length) {
loading(true);
this.fetchData(loading, search, this);
}
}
}
});
// CONCATENATED MODULE: ./src/views/controls/LinkControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_LinkControlvue_type_script_lang_js_ = (LinkControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/LinkControl.vue
/* normalize component */
var LinkControl_component = Object(componentNormalizer["a" /* default */])(
controls_LinkControlvue_type_script_lang_js_,
LinkControlvue_type_template_id_58715031_scoped_true_render,
LinkControlvue_type_template_id_58715031_scoped_true_staticRenderFns,
false,
null,
"58715031",
null
)
/* harmony default export */ var LinkControl = (LinkControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/ImageSelectControl.vue?vue&type=template&id=32845e5a&scoped=true&
var ImageSelectControlvue_type_template_id_32845e5a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-row',[_c('div',{ref:"doctype",staticClass:"ref-field-input",attrs:{"id":("div-" + (_vm.control.uniqueId))}},[_c('img',{style:([_vm.imageStyle]),attrs:{"src":_vm.control.imageUrl}})])]),_c('b-row',{staticClass:"mt-3"},[_c('input',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],class:_vm.controlFieldClass,attrs:{"id":_vm.control.uniqueId,"type":"text","name":_vm.control.name || _vm.control.uniqueId,"placeholder":_vm.control.placeholderText},domProps:{"value":_vm.value}})])],1)}
var ImageSelectControlvue_type_template_id_32845e5a_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/ImageSelectControl.vue?vue&type=template&id=32845e5a&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/ImageSelectControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ImageSelectControlvue_type_script_lang_js_ = ({
name: "ImageSelectControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
searchValue: "",
linkControl: null,
imageStyle: {
width: "".concat(this.control.width, "px"),
height: "".concat(this.control.height, "px")
}
};
},
mounted: function mounted() {//this.makeSelectDoctypeControl();
},
watch: {
value: function value(val) {
if (!val || !val.length) {
this.linkControl.$input.val(" ");
} else {
this.linkControl.$input.val(val);
}
}
},
methods: {}
});
// CONCATENATED MODULE: ./src/views/controls/ImageSelectControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_ImageSelectControlvue_type_script_lang_js_ = (ImageSelectControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/ImageSelectControl.vue
/* normalize component */
var ImageSelectControl_component = Object(componentNormalizer["a" /* default */])(
controls_ImageSelectControlvue_type_script_lang_js_,
ImageSelectControlvue_type_template_id_32845e5a_scoped_true_render,
ImageSelectControlvue_type_template_id_32845e5a_scoped_true_staticRenderFns,
false,
null,
"32845e5a",
null
)
/* harmony default export */ var ImageSelectControl = (ImageSelectControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/AttachmentControl.vue?vue&type=template&id=11885ae4&scoped=true&
var AttachmentControlvue_type_template_id_11885ae4_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.value)?_c('label',[_vm._v(_vm._s(_vm.value.split("/")))]):_vm._e(),(_vm.url)?_c('label',[_vm._v(_vm._s(_vm.url))]):_vm._e(),_c('b-button',{class:_vm.buttonClasses,attrs:{"id":_vm.control.uniqueId,"name":_vm.control.name},domProps:{"textContent":_vm._s(_vm.url?'Show image':_vm.control.label)},on:{"click":_vm.clickedHandle}})],1)}
var AttachmentControlvue_type_template_id_11885ae4_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/AttachmentControl.vue?vue&type=template&id=11885ae4&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.split.js
var es6_regexp_split = __webpack_require__("28a5");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/AttachmentControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AttachmentControlvue_type_script_lang_js_ = ({
name: "AttachmentControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
url: null
};
},
computed: {
urlVal: function urlVal() {
if (this.value) {
var wordArray = this.value.split("/");
if (wordArray.length) {
return wordArray[wordArray.length - 1];
} else {
return "";
}
}
}
},
methods: {
clickedHandle: function clickedHandle() {
var me = this;
new frappe.ui.FileUploaderCustom({
doctype: me.control.document,
docname: me.documentName,
on_success: function on_success(file_doc) {
var file_url = file_doc.file_url,
filename = file_doc.filename;
me.updateValue(file_url);
me.url = file_url;
}
});
}
}
});
// CONCATENATED MODULE: ./src/views/controls/AttachmentControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_AttachmentControlvue_type_script_lang_js_ = (AttachmentControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/AttachmentControl.vue
/* normalize component */
var AttachmentControl_component = Object(componentNormalizer["a" /* default */])(
controls_AttachmentControlvue_type_script_lang_js_,
AttachmentControlvue_type_template_id_11885ae4_scoped_true_render,
AttachmentControlvue_type_template_id_11885ae4_scoped_true_staticRenderFns,
false,
null,
"11885ae4",
null
)
/* harmony default export */ var AttachmentControl = (AttachmentControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/HtmlTextControl.vue?vue&type=template&id=26d1daaa&scoped=true&
var HtmlTextControlvue_type_template_id_26d1daaa_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.readonly)?_c('div',{style:({ 'min-height': ((_vm.control.height+130 )||330 ) + 'px' })},[_c('vue-editor',{style:({ 'min-height': (_vm.control.height ||200 ) + 'px', 'max-height': ((_vm.control.height*3) ||600 ) + 'px' }),attrs:{"value":_vm.value,"id":_vm.control.uniqueId,"type":"text","name":_vm.control.name || _vm.control.uniqueId,"placeholder":_vm.control.placeholderText,"editor-toolbar":_vm.customToolbar},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}})],1):_vm._e(),(_vm.readonly)?_c('div',{domProps:{"innerHTML":_vm._s(_vm.value)}}):_vm._e()])}
var HtmlTextControlvue_type_template_id_26d1daaa_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/HtmlTextControl.vue?vue&type=template&id=26d1daaa&scoped=true&
// EXTERNAL MODULE: ./node_modules/vue2-editor/dist/vue2-editor.esm.js
var vue2_editor_esm = __webpack_require__("5873");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/HtmlTextControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var HtmlTextControlvue_type_script_lang_js_ = ({
name: "HtlmTextControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
customToolbar: [["bold", "underline"], [{
list: "ordered"
}], []]
};
},
components: {
VueEditor: vue2_editor_esm["a" /* VueEditor */]
},
watch: {
value: function value(al) {
this.updateValue(al);
}
}
});
// CONCATENATED MODULE: ./src/views/controls/HtmlTextControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_HtmlTextControlvue_type_script_lang_js_ = (HtmlTextControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/HtmlTextControl.vue
/* normalize component */
var HtmlTextControl_component = Object(componentNormalizer["a" /* default */])(
controls_HtmlTextControlvue_type_script_lang_js_,
HtmlTextControlvue_type_template_id_26d1daaa_scoped_true_render,
HtmlTextControlvue_type_template_id_26d1daaa_scoped_true_staticRenderFns,
false,
null,
"26d1daaa",
null
)
/* harmony default export */ var HtmlTextControl = (HtmlTextControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TimeControl.vue?vue&type=template&id=47516cd1&scoped=true&
var TimeControlvue_type_template_id_47516cd1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-time',{attrs:{"id":_vm.control.uniqueId,"value":_vm.value,"show-seconds":"","hour12":false,"locale":"en"},on:{"input":_vm.dataChanged}},[_c('div',{staticClass:"d-flex",attrs:{"dir":"ltr"}},[(_vm.value)?_c('b-button',{attrs:{"size":"sm","variant":"outline-danger"},on:{"click":_vm.clearTime}},[_vm._v(" Clear time ")]):_vm._e(),_c('b-button',{staticClass:"ml-auto",attrs:{"size":"sm","variant":"outline-primary"},on:{"click":_vm.setNow}},[_vm._v(" Set Now ")])],1)])],1)}
var TimeControlvue_type_template_id_47516cd1_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/TimeControl.vue?vue&type=template&id=47516cd1&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/TimeControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var TimeControlvue_type_script_lang_js_ = ({
name: "TimeControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
searchValue: ""
};
},
methods: {
setNow: function setNow() {
var now = new Date();
this.value = now.toTimeString().slice(0, 8);
},
clearTime: function clearTime() {
this.value = "";
},
dataChanged: function dataChanged(val) {
this.updateValue(val);
}
}
});
// CONCATENATED MODULE: ./src/views/controls/TimeControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_TimeControlvue_type_script_lang_js_ = (TimeControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/TimeControl.vue
/* normalize component */
var TimeControl_component = Object(componentNormalizer["a" /* default */])(
controls_TimeControlvue_type_script_lang_js_,
TimeControlvue_type_template_id_47516cd1_scoped_true_render,
TimeControlvue_type_template_id_47516cd1_scoped_true_staticRenderFns,
false,
null,
"47516cd1",
null
)
/* harmony default export */ var TimeControl = (TimeControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/Icd11Control.vue?vue&type=template&id=43aeb4b4&scoped=true&
var Icd11Controlvue_type_template_id_43aeb4b4_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":("parent-" + (_vm.control.uniqueId))}},[_c('div',[_c('v-select',{attrs:{"options":_vm.searchResults,"label":"name","filterable":false,"placeholder":"Search"},on:{"search":_vm.onSearch},scopedSlots:_vm._u([{key:"selected-option",fn:function(option){return [_c('div',{staticClass:"selected d-center",domProps:{"innerHTML":_vm._s(option.name)}})]}},{key:"option",fn:function(option){return [_c('div',{staticClass:"d-center",domProps:{"innerHTML":_vm._s(option.name)}})]}}]),model:{value:(_vm.searchValue),callback:function ($$v) {_vm.searchValue=$$v},expression:"searchValue"}})],1)])}
var Icd11Controlvue_type_template_id_43aeb4b4_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/Icd11Control.vue?vue&type=template&id=43aeb4b4&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
var es6_regexp_replace = __webpack_require__("a481");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/Icd11Control.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var Icd11Controlvue_type_script_lang_js_ = ({
name: "Icd11Control",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return Object(defineProperty["a" /* default */])({
searchValue: null,
linkControl: null,
linkFilters: {},
parentData: null,
searchTerm: "",
selectedItem: null,
searchResults: []
}, "parentData", "");
},
mounted: function mounted() {
this.preload();
},
watch: {
searchValue: function searchValue(o, n) {
if (o != null && o.length > 0) {
this.updateValue(o.replace(/<\/?[^>]+(>|$)/g, ""));
}
},
valueContainer: {
handler: function handler(newData, oldData) {
if (this.control.parentData != null && newData[this.control.parentData] != null) {
this.parentData = newData[this.control.parentData];
}
},
deep: true
},
value: function value(val) {
if (!val || !val.length) {} else {
if (this.searchValue == null) {
this.searchValue = val;
}
}
}
},
methods: {
fetchData: function fetchData(loading, search, context) {
var _this = this;
Object(services_frappe["a" /* api */])({
method: "clinical.api.icd.auth.access_icd",
args: {
q: search
}
}).then(function (response) {
loading(false);
var results = response.message.destinationEntities.map(function (item) {
return "".concat(item.theCode, "-").concat(item.title);
});
_this.$set(_this, "searchResults", results);
});
},
handleSelect: function handleSelect(value) {
this.selectedItem = this.searchResults.find(function (item) {
return item.id === value;
});
},
onSearch: function onSearch(search, loading) {
if (search.length) {
loading(true);
this.fetchData(loading, search, this);
}
}
}
});
// CONCATENATED MODULE: ./src/views/controls/Icd11Control.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_Icd11Controlvue_type_script_lang_js_ = (Icd11Controlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/Icd11Control.vue
/* normalize component */
var Icd11Control_component = Object(componentNormalizer["a" /* default */])(
controls_Icd11Controlvue_type_script_lang_js_,
Icd11Controlvue_type_template_id_43aeb4b4_scoped_true_render,
Icd11Controlvue_type_template_id_43aeb4b4_scoped_true_staticRenderFns,
false,
null,
"43aeb4b4",
null
)
/* harmony default export */ var Icd11Control = (Icd11Control_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/NhddControl.vue?vue&type=template&id=e16eb290&scoped=true&
var NhddControlvue_type_template_id_e16eb290_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":("parent-" + (_vm.control.uniqueId))}},[_c('div',[_c('v-select',{attrs:{"options":_vm.searchResults,"label":"name","filterable":false,"placeholder":"Search"},on:{"search":_vm.onSearch},scopedSlots:_vm._u([{key:"selected-option",fn:function(option){return [_c('div',{staticClass:"selected d-center"},[_vm._v(" "+_vm._s(((option.id) + " - " + (option.display_name)))+" ")])]}},{key:"option",fn:function(option){return [_c('div',{staticClass:"d-center"},[_vm._v(" "+_vm._s(option.id)+" - "+_vm._s(option.display_name)+" ")])]}}]),model:{value:(_vm.searchValue),callback:function ($$v) {_vm.searchValue=$$v},expression:"searchValue"}})],1)])}
var NhddControlvue_type_template_id_e16eb290_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/NhddControl.vue?vue&type=template&id=e16eb290&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/NhddControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var NhddControlvue_type_script_lang_js_ = ({
name: "NhddControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return Object(defineProperty["a" /* default */])({
searchValue: null,
linkControl: null,
linkFilters: {},
parentData: null,
searchTerm: "",
selectedItem: null,
searchResults: []
}, "parentData", "");
},
watch: {
searchValue: function searchValue(o, n) {
if (o != null) {
var result = "".concat(o.id, " - ").concat(o.display_name);
this.updateValue(result);
}
},
valueContainer: {
handler: function handler(newData, oldData) {
if (this.control.parentData != null && newData[this.control.parentData] != null) {
this.parentData = newData[this.control.parentData];
}
},
deep: true
},
value: function value(val) {
if (!val || !val.length) {} else {
if (this.searchValue == null) {
var tiltes = val.split("-");
this.searchValue = {
id: tiltes[0],
display_name: titles[1]
};
}
}
}
},
methods: {
fetchData: function fetchData(loading, search, context) {
var _this = this;
Object(services_frappe["a" /* api */])({
method: "clinical.hie.api.search_terminology",
args: {
searchkey: search
}
}).then(function (response) {
loading(false);
var results = response.message;
_this.$set(_this, "searchResults", results);
});
},
handleSelect: function handleSelect(value) {
this.selectedItem = this.searchResults.find(function (item) {
return item.id === value;
});
},
onSearch: function onSearch(search, loading) {
if (search.length) {
loading(true);
this.fetchData(loading, search, this);
}
}
}
});
// CONCATENATED MODULE: ./src/views/controls/NhddControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_NhddControlvue_type_script_lang_js_ = (NhddControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/NhddControl.vue
/* normalize component */
var NhddControl_component = Object(componentNormalizer["a" /* default */])(
controls_NhddControlvue_type_script_lang_js_,
NhddControlvue_type_template_id_e16eb290_scoped_true_render,
NhddControlvue_type_template_id_e16eb290_scoped_true_staticRenderFns,
false,
null,
"e16eb290",
null
)
/* harmony default export */ var NhddControl = (NhddControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DateTimeControl.vue?vue&type=template&id=6eca649b&scoped=true&
var DateTimeControlvue_type_template_id_6eca649b_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-form-input',{attrs:{"id":_vm.control.uniqueId,"value":_vm.value,"type":"datetime-local"},on:{"input":_vm.dataChanged}})],1)}
var DateTimeControlvue_type_template_id_6eca649b_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/controls/DateTimeControl.vue?vue&type=template&id=6eca649b&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/controls/DateTimeControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
/* harmony default export */ var DateTimeControlvue_type_script_lang_js_ = ({
name: "DateTimeControl",
mixins: [control_field_extend_mixin["a" /* CONTROL_FIELD_EXTEND_MIXIN */]],
data: function data() {
return {
searchValue: ""
};
},
methods: {
dataChanged: function dataChanged(val) {
this.updateValue(val);
}
}
});
// CONCATENATED MODULE: ./src/views/controls/DateTimeControl.vue?vue&type=script&lang=js&
/* harmony default export */ var controls_DateTimeControlvue_type_script_lang_js_ = (DateTimeControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/controls/DateTimeControl.vue
/* normalize component */
var DateTimeControl_component = Object(componentNormalizer["a" /* default */])(
controls_DateTimeControlvue_type_script_lang_js_,
DateTimeControlvue_type_template_id_6eca649b_scoped_true_render,
DateTimeControlvue_type_template_id_6eca649b_scoped_true_staticRenderFns,
false,
null,
"6eca649b",
null
)
/* harmony default export */ var DateTimeControl = (DateTimeControl_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TextBlockConfigView.vue?vue&type=template&id=7c65e5f4&
var TextBlockConfigViewvue_type_template_id_7c65e5f4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Text for Text-Block")]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.text),expression:"control.text"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","rows":"6"},domProps:{"value":(_vm.control.text)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "text", $event.target.value)}}})])])}
var TextBlockConfigViewvue_type_template_id_7c65e5f4_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/TextBlockConfigView.vue?vue&type=template&id=7c65e5f4&
// EXTERNAL MODULE: ./src/mixins/control-special-config-mixin.js + 5 modules
var control_special_config_mixin = __webpack_require__("8ae1");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TextBlockConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/* harmony default export */ var TextBlockConfigViewvue_type_script_lang_js_ = ({
name: "TextBlockConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/TextBlockConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_TextBlockConfigViewvue_type_script_lang_js_ = (TextBlockConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/TextBlockConfigView.vue
/* normalize component */
var TextBlockConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_TextBlockConfigViewvue_type_script_lang_js_,
TextBlockConfigViewvue_type_template_id_7c65e5f4_render,
TextBlockConfigViewvue_type_template_id_7c65e5f4_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var TextBlockConfigView = (TextBlockConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/ButtonConfigView.vue?vue&type=template&id=3392d5a7&
var ButtonConfigViewvue_type_template_id_3392d5a7_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Button Type (Type Attribute)")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.buttonType),expression:"control.buttonType"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "buttonType", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.buttonTypeList),function(item){return _c('option',{key:item,domProps:{"value":item,"textContent":_vm._s(item)}})}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Button Class (Type Attribute)")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.buttonClass),expression:"control.buttonClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "buttonClass", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.buttonClasses),function(className,name){return _c('option',{key:className,domProps:{"value":className}},[_vm._v(" "+_vm._s(name)+" ("+_vm._s(className)+") ")])}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Run validation before emitting? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.isRunValidation),expression:"control.isRunValidation"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.isRunValidation)?_vm._i(_vm.control.isRunValidation,null)>-1:(_vm.control.isRunValidation)},on:{"change":function($event){var $$a=_vm.control.isRunValidation,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "isRunValidation", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "isRunValidation", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "isRunValidation", $$c)}}}})])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Emitting Code "),_c('IconTooltip',{attrs:{"icon":"informationOutline","text":"V-Form will $emit an Event with <strong>YOUR CODE</strong>"}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.emitEventCode),expression:"control.emitEventCode"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.emitEventCode)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "emitEventCode", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Emitting Value "),_c('IconTooltip',{attrs:{"icon":"informationOutline","text":"Specific Data-String when V-Form performs invoke $emit"}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.emitEventData),expression:"control.emitEventData"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.emitEventData)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "emitEventData", $event.target.value)}}})])])}
var ButtonConfigViewvue_type_template_id_3392d5a7_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/ButtonConfigView.vue?vue&type=template&id=3392d5a7&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/ButtonConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ButtonConfigViewvue_type_script_lang_js_ = ({
name: "ButtonConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]],
computed: {
buttonTypeList: function buttonTypeList() {
return ['button', 'submit', 'clear'];
},
buttonClasses: function buttonClasses() {
return this.styles.BUTTON;
}
}
});
// CONCATENATED MODULE: ./src/views/control-configs/ButtonConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_ButtonConfigViewvue_type_script_lang_js_ = (ButtonConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/ButtonConfigView.vue
/* normalize component */
var ButtonConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_ButtonConfigViewvue_type_script_lang_js_,
ButtonConfigViewvue_type_template_id_3392d5a7_render,
ButtonConfigViewvue_type_template_id_3392d5a7_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ButtonConfigView = (ButtonConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/LabelConfigView.vue?vue&type=template&id=11c7a614&
var LabelConfigViewvue_type_template_id_11c7a614_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("For-Attribute to Control?")]),_c('select',{class:_vm.styles.FORM.FORM_CONTROL,on:{"input":_vm.selectedFor}},[_c('option',[_vm._v("None")]),_vm._l((_vm.listControlData),function(item){return _c('option',{key:item.value,domProps:{"value":item.value,"textContent":_vm._s(item.text)}})})],2)])])}
var LabelConfigViewvue_type_template_id_11c7a614_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/LabelConfigView.vue?vue&type=template&id=11c7a614&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/LabelConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var LABEL_SELECTED_CLASS = 'label-selected';
/**
* @property {ListItem[]} listControlData
*/
/* harmony default export */ var LabelConfigViewvue_type_script_lang_js_ = ({
name: "LabelConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]],
data: function data() {
return {
listControlData: []
};
},
methods: {
selectedFor: function selectedFor($e) {
this.clearAllMapped();
this.control.forAttribute = $e.target.value; // is eligible to add selected class??
if (this.control.forAttribute) {
this.labelMappedAssign(this.control.forAttribute);
}
},
/**
* Find the control and add it a simple class to let the configurator know which
* label they're assigning to which control.
* @param controlId
*/
labelMappedAssign: function labelMappedAssign(controlId) {
var controlDOM = document.getElementById(controlId);
if (!controlDOM || !controlDOM.parentNode) {
return;
}
controlDOM.parentNode.classList.add(LABEL_SELECTED_CLASS);
},
/**
* Simply loop through all the controls and remove the `bordered` class
* Vanilla JS rules
*/
clearAllMapped: function clearAllMapped() {
this.listControlData.forEach(function (controlOption) {
var controlDOM = document.getElementById(controlOption.value);
if (!controlDOM || !controlDOM.parentNode) {
return;
}
controlDOM.parentNode.classList.remove(LABEL_SELECTED_CLASS);
});
}
},
created: function created() {
// prepare control list and remove the current
var pureIds = Object.keys(this.formData.controls);
for (var _i = 0, _pureIds = pureIds; _i < _pureIds.length; _i++) {
var controlId = _pureIds[_i];
// Current Label => NO ID should be added
if (controlId === this.control.uniqueId) {
continue;
} // Label Control => NO ID should be added
if (this.formData.controls[controlId].type === 'label') {
continue;
} // option text generation
var controlObj = this.formData.controls[controlId];
var fieldName = "".concat(controlObj.label, " - #").concat(controlObj.uniqueId); // if name is exist => use it instead of uniqueID
if (controlObj.name) {
fieldName = "".concat(controlObj.label, " - ").concat(controlObj.name);
} // add it to the list
this.listControlData.push(new list_item_class_ListItem(controlId, fieldName));
} // do we need to mark the border??
if (this.control.forAttribute) {
this.labelMappedAssign(this.control.forAttribute);
}
},
beforeDestroy: function beforeDestroy() {
this.clearAllMapped();
}
});
// CONCATENATED MODULE: ./src/views/control-configs/LabelConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_LabelConfigViewvue_type_script_lang_js_ = (LabelConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/LabelConfigView.vue
/* normalize component */
var LabelConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_LabelConfigViewvue_type_script_lang_js_,
LabelConfigViewvue_type_template_id_11c7a614_render,
LabelConfigViewvue_type_template_id_11c7a614_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var LabelConfigView = (LabelConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/RadioCheckboxConfigView.vue?vue&type=template&id=b6e79938&
var RadioCheckboxConfigViewvue_type_template_id_b6e79938_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Display Mode")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.displayMode),expression:"control.displayMode"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "displayMode", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.listDisplayModes),function(item){return _c('option',{key:item.val,domProps:{"value":item.val,"textContent":_vm._s(item.description)}})}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Display Position")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.position),expression:"control.position"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "position", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.listPositions),function(item){return _c('option',{key:item.val,domProps:{"value":item.val,"textContent":_vm._s(item.description)}})}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" List Selections "),_c('span',{staticClass:"pointer",domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '16px', '16px', 'green'))},on:{"click":_vm.addListItem}})]),_vm._l((_vm.control.items),function(listItem,iItem){return _c('div',{key:iItem,class:['list-selection']},[_c('div',{staticClass:"tool-block"},[_c('span',{staticClass:"pointer",domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('close', '16px', '16px', 'red'))},on:{"click":function($event){return _vm.removeListItem(iItem)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Item Value")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(listItem.value),expression:"listItem.value"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Radio/Checkbox-Value"},domProps:{"value":(listItem.value)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(listItem, "value", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Label Text")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(listItem.text),expression:"listItem.text"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Label text"},domProps:{"value":(listItem.text)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(listItem, "text", $event.target.value)}}})])])})],2)])}
var RadioCheckboxConfigViewvue_type_template_id_b6e79938_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/RadioCheckboxConfigView.vue?vue&type=template&id=b6e79938&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/RadioCheckboxConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var RadioCheckboxConfigViewvue_type_script_lang_js_ = ({
name: "RadioCheckboxConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]],
methods: {
/**
* Add new List-Item for the Current Radio/Checkbox
*/
addListItem: function addListItem() {
this.control.items.push(new list_item_class_ListItem('', ''));
},
/**
* Remove list-Item by Index of the Array
*/
removeListItem: function removeListItem(index) {
this.control.items.splice(index, 1);
}
},
computed: {
/**
* Configuration for the displayMode
*/
listDisplayModes: function listDisplayModes() {
return RADIO_CHECKBOX_STYLE;
},
/**
* Configuration for the position
*/
listPositions: function listPositions() {
return RADIO_CHECKBOX_POSITION;
}
}
});
// CONCATENATED MODULE: ./src/views/control-configs/RadioCheckboxConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_RadioCheckboxConfigViewvue_type_script_lang_js_ = (RadioCheckboxConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/RadioCheckboxConfigView.vue
/* normalize component */
var RadioCheckboxConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_RadioCheckboxConfigViewvue_type_script_lang_js_,
RadioCheckboxConfigViewvue_type_template_id_b6e79938_render,
RadioCheckboxConfigViewvue_type_template_id_b6e79938_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var RadioCheckboxConfigView = (RadioCheckboxConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/NumberConfigView.vue?vue&type=template&id=b76ee402&
var NumberConfigViewvue_type_template_id_b76ee402_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Is Real Number (Float/Double) "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.isReal),expression:"control.isReal"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.isReal)?_vm._i(_vm.control.isReal,null)>-1:(_vm.control.isReal)},on:{"change":function($event){var $$a=_vm.control.isReal,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "isReal", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "isReal", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "isReal", $$c)}}}})])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Read Only (Float/Double) "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.isReadOnly),expression:"control.isReadOnly"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.isReadOnly)?_vm._i(_vm.control.isReadOnly,null)>-1:(_vm.control.isReadOnly)},on:{"change":function($event){var $$a=_vm.control.isReadOnly,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "isReadOnly", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "isReadOnly", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "isReadOnly", $$c)}}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.control.isReal),expression:"control.isReal"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Decimal Places")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.decimalPlace),expression:"control.decimalPlace",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1","min":"0","max":"10"},domProps:{"value":(_vm.control.decimalPlace)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "decimalPlace", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}})])])}
var NumberConfigViewvue_type_template_id_b76ee402_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/NumberConfigView.vue?vue&type=template&id=b76ee402&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/NumberConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var NumberConfigViewvue_type_script_lang_js_ = ({
name: "NumberConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/NumberConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_NumberConfigViewvue_type_script_lang_js_ = (NumberConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/NumberConfigView.vue
/* normalize component */
var NumberConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_NumberConfigViewvue_type_script_lang_js_,
NumberConfigViewvue_type_template_id_b76ee402_render,
NumberConfigViewvue_type_template_id_b76ee402_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var NumberConfigView = (NumberConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/DatePickerConfigView.vue?vue&type=template&id=2100e27f&
var DatePickerConfigViewvue_type_template_id_2100e27f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Data Return Type")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.returnType),expression:"control.returnType"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "returnType", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.listReturnTypes),function(item){return _c('option',{key:item.val,domProps:{"value":item.val,"textContent":_vm._s(item.description)}})}),0)]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.control.returnType === _vm.listReturnTypes.format.val),expression:"control.returnType === listReturnTypes.format.val"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Date Format")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.format),expression:"control.format"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.format)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "format", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Start Date of the Week")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.firstDay),expression:"control.firstDay"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "firstDay", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.listStartDates),function(item){return _c('option',{key:item.val,domProps:{"value":item.val,"textContent":_vm._s(item.description)}})}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Minimum Date "),_c('IconTooltip',{attrs:{"icon":"informationOutline","text":"Follow this format: YYYY-MM-DD. Empty for none."}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.minDate),expression:"control.minDate"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.minDate)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "minDate", $event.target.value)}}}),_c('small',[_vm._v("Minimum Date can be selected in the Calendar")])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Maximum Date "),_c('IconTooltip',{attrs:{"icon":"informationOutline","text":"Follow this format: YYYY-MM-DD. Empty for none."}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.maxDate),expression:"control.maxDate"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.maxDate)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "maxDate", $event.target.value)}}}),_c('small',[_vm._v("Maximum Date can be selected in the Calendar")])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Enable Date-Range? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.singleMode),expression:"control.singleMode"}],attrs:{"type":"checkbox","name":"enableDateRange","true-value":false,"false-value":true},domProps:{"checked":Array.isArray(_vm.control.singleMode)?_vm._i(_vm.control.singleMode,null)>-1:_vm._q(_vm.control.singleMode,false)},on:{"change":function($event){var $$a=_vm.control.singleMode,$$el=$event.target,$$c=$$el.checked?(false):(true);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "singleMode", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "singleMode", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "singleMode", $$c)}}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.control.singleMode),expression:"!control.singleMode"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Minimum Day in Range (0 for none)")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.minDays),expression:"control.minDays",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.minDays)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "minDays", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.control.singleMode),expression:"!control.singleMode"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Maximum Day in Range (0 for none)")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.maxDays),expression:"control.maxDays",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.maxDays)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "maxDays", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Number of Months")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.numberOfMonths),expression:"control.numberOfMonths",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.numberOfMonths)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "numberOfMonths", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}}),_c('small',[_vm._v("Number of Months will be shown up")])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Number of Columns")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.numberOfColumns),expression:"control.numberOfColumns",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.numberOfColumns)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "numberOfColumns", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}}),_c('small',[_vm._v("Number of Columns will be shown up")])])])}
var DatePickerConfigViewvue_type_template_id_2100e27f_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/DatePickerConfigView.vue?vue&type=template&id=2100e27f&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/DatePickerConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var DatePickerConfigViewvue_type_script_lang_js_ = ({
name: "DatePickerConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]],
computed: {
/**
* Return types of DatePicker
*/
listReturnTypes: function listReturnTypes() {
return DATE_PICKER_RETURN_TYPES;
},
/**
* Start dates of the Week
*/
listStartDates: function listStartDates() {
return DATE_PICKER_START_DATES;
}
}
});
// CONCATENATED MODULE: ./src/views/control-configs/DatePickerConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_DatePickerConfigViewvue_type_script_lang_js_ = (DatePickerConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/DatePickerConfigView.vue
/* normalize component */
var DatePickerConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_DatePickerConfigViewvue_type_script_lang_js_,
DatePickerConfigViewvue_type_template_id_2100e27f_render,
DatePickerConfigViewvue_type_template_id_2100e27f_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var DatePickerConfigView = (DatePickerConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TextConfigView.vue?vue&type=template&id=82eeb1ae&
var TextConfigViewvue_type_template_id_82eeb1ae_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Number of Rows")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.rows),expression:"control.rows",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.rows)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "rows", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}}),_c('small',[_vm._v("`row` HTML Attribute Configuration")])])])}
var TextConfigViewvue_type_template_id_82eeb1ae_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/TextConfigView.vue?vue&type=template&id=82eeb1ae&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TextConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var TextConfigViewvue_type_script_lang_js_ = ({
name: "TextConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/TextConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_TextConfigViewvue_type_script_lang_js_ = (TextConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/TextConfigView.vue
/* normalize component */
var TextConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_TextConfigViewvue_type_script_lang_js_,
TextConfigViewvue_type_template_id_82eeb1ae_render,
TextConfigViewvue_type_template_id_82eeb1ae_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var TextConfigView = (TextConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/DropdownConfigView.vue?vue&type=template&id=73bbbb38&
var DropdownConfigViewvue_type_template_id_73bbbb38_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Multiple Selection? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.multiple),expression:"control.multiple"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.multiple)?_vm._i(_vm.control.multiple,null)>-1:(_vm.control.multiple)},on:{"change":function($event){var $$a=_vm.control.multiple,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "multiple", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "multiple", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "multiple", $$c)}}}})])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Option-Data-List Mode")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.dataMode),expression:"control.dataMode"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "dataMode", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.listDataModes),function(item){return _c('option',{key:item.val,domProps:{"value":item.val,"textContent":_vm._s(item.description)}})}),0)]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(this.control.dataMode === _vm.listDataModes.api.val),expression:"this.control.dataMode === listDataModes.api.val"}]},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Rest-API URL "),_c('icon-tooltip',{attrs:{"icon":"informationOutline","text":"Your API-Endpoint URL - GET Method. It must return an Array. Read more on Documentation"}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.apiURL),expression:"control.apiURL"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"https://your-domain/rest-api/get-list/..."},domProps:{"value":(_vm.control.apiURL)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "apiURL", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Value Key of your Object "),_c('icon-tooltip',{attrs:{"icon":"informationOutline","text":"[{'value': '',...}] => value"}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.apiValueKey),expression:"control.apiValueKey"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.apiValueKey)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "apiValueKey", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Text Key of your Object "),_c('icon-tooltip',{attrs:{"icon":"informationOutline","text":"[{'text': '',...}] => text"}})],1),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.apiTextKey),expression:"control.apiTextKey"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.apiTextKey)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "apiTextKey", $event.target.value)}}})])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(this.control.dataMode === _vm.listDataModes.list.val),expression:"this.control.dataMode === listDataModes.list.val"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" List Options "),_c('span',{staticClass:"pointer",domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '16px', '16px', 'green'))},on:{"click":_vm.addListItem}})]),_vm._l((_vm.control.items),function(listItem,iItem){return _c('div',{key:iItem,class:['list-selection']},[_c('div',{staticClass:"tool-block"},[_c('span',{staticClass:"pointer",domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('close', '16px', '16px', 'red'))},on:{"click":function($event){return _vm.removeListItem(iItem)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Item Value")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(listItem.value),expression:"listItem.value"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Radio-Value"},domProps:{"value":(listItem.value)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(listItem, "value", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Label Text")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(listItem.text),expression:"listItem.text"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":"Label text"},domProps:{"value":(listItem.text)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(listItem, "text", $event.target.value)}}})])])})],2)])}
var DropdownConfigViewvue_type_template_id_73bbbb38_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/DropdownConfigView.vue?vue&type=template&id=73bbbb38&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/DropdownConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var DropdownConfigViewvue_type_script_lang_js_ = ({
name: "DropdownConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]],
methods: {
/**
* Add new List-Item for the Current Radio/Checkbox
*/
addListItem: function addListItem() {
this.control.items.push(new list_item_class_ListItem('', ''));
},
/**
* Remove list-Item by Index of the Array
*/
removeListItem: function removeListItem(index) {
this.control.items.splice(index, 1);
}
},
computed: {
/**
* Dropdown Data Modes List
*/
listDataModes: function listDataModes() {
return DROPDOWN_DATA_MODES;
}
}
});
// CONCATENATED MODULE: ./src/views/control-configs/DropdownConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_DropdownConfigViewvue_type_script_lang_js_ = (DropdownConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/DropdownConfigView.vue
/* normalize component */
var DropdownConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_DropdownConfigViewvue_type_script_lang_js_,
DropdownConfigViewvue_type_template_id_73bbbb38_render,
DropdownConfigViewvue_type_template_id_73bbbb38_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var DropdownConfigView = (DropdownConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/LinkConfigView.vue?vue&type=template&id=05ccac5e&
var LinkConfigViewvue_type_template_id_05ccac5e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Search Document")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.searchDocument),expression:"control.searchDocument"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.searchDocument)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "searchDocument", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Search document field")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.searchDocumentField),expression:"control.searchDocumentField"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.searchDocumentField)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "searchDocumentField", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Parent")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.parentData),expression:"control.parentData"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.parentData)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "parentData", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Static parent (If tree)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.parentConcept),expression:"control.parentConcept"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.parentConcept)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "parentConcept", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Search Filters")]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.searchFilters),expression:"control.searchFilters"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","rows":"6"},domProps:{"value":(_vm.control.searchFilters)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "searchFilters", $event.target.value)}}})])])}
var LinkConfigViewvue_type_template_id_05ccac5e_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/LinkConfigView.vue?vue&type=template&id=05ccac5e&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/LinkConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var LinkConfigViewvue_type_script_lang_js_ = ({
name: "LinkConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/LinkConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_LinkConfigViewvue_type_script_lang_js_ = (LinkConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/LinkConfigView.vue
/* normalize component */
var LinkConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_LinkConfigViewvue_type_script_lang_js_,
LinkConfigViewvue_type_template_id_05ccac5e_render,
LinkConfigViewvue_type_template_id_05ccac5e_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var LinkConfigView = (LinkConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/AttachmentConfigView.vue?vue&type=template&id=3bb80d3b&
var AttachmentConfigViewvue_type_template_id_3bb80d3b_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Document")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.document),expression:"control.document"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.document)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "document", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Document name")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.documentName),expression:"control.documentName"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.documentName)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "documentName", $event.target.value)}}})])])}
var AttachmentConfigViewvue_type_template_id_3bb80d3b_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/AttachmentConfigView.vue?vue&type=template&id=3bb80d3b&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/AttachmentConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AttachmentConfigViewvue_type_script_lang_js_ = ({
name: "AttachmentConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/AttachmentConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_AttachmentConfigViewvue_type_script_lang_js_ = (AttachmentConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/AttachmentConfigView.vue
/* normalize component */
var AttachmentConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_AttachmentConfigViewvue_type_script_lang_js_,
AttachmentConfigViewvue_type_template_id_3bb80d3b_render,
AttachmentConfigViewvue_type_template_id_3bb80d3b_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var AttachmentConfigView = (AttachmentConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TimeConfigView.vue?vue&type=template&id=79216743&
var TimeConfigViewvue_type_template_id_79216743_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Hide header")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.hideHeader),expression:"control.hideHeader",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.hideHeader)?_vm._i(_vm.control.hideHeader,null)>-1:(_vm.control.hideHeader)},on:{"change":function($event){var $$a=_vm.control.hideHeader,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=_vm._n(null),$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "hideHeader", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "hideHeader", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "hideHeader", $$c)}}}})])])}
var TimeConfigViewvue_type_template_id_79216743_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/TimeConfigView.vue?vue&type=template&id=79216743&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/TimeConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var TimeConfigViewvue_type_script_lang_js_ = ({
name: "TimeConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/TimeConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_TimeConfigViewvue_type_script_lang_js_ = (TimeConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/TimeConfigView.vue
/* normalize component */
var TimeConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_TimeConfigViewvue_type_script_lang_js_,
TimeConfigViewvue_type_template_id_79216743_render,
TimeConfigViewvue_type_template_id_79216743_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var TimeConfigView = (TimeConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/HtmlTextConfigView.vue?vue&type=template&id=5d0ffff5&
var HtmlTextConfigViewvue_type_template_id_5d0ffff5_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Height ")]),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.control.height),expression:"control.height",modifiers:{"number":true}}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number","step":"1"},domProps:{"value":(_vm.control.height)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "height", _vm._n($event.target.value))},"blur":function($event){return _vm.$forceUpdate()}}}),_c('small',[_vm._v("`row` Height of the editor")])])])}
var HtmlTextConfigViewvue_type_template_id_5d0ffff5_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/HtmlTextConfigView.vue?vue&type=template&id=5d0ffff5&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/HtmlTextConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var HtmlTextConfigViewvue_type_script_lang_js_ = ({
name: "TextConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/HtmlTextConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_HtmlTextConfigViewvue_type_script_lang_js_ = (HtmlTextConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/HtmlTextConfigView.vue
/* normalize component */
var HtmlTextConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_HtmlTextConfigViewvue_type_script_lang_js_,
HtmlTextConfigViewvue_type_template_id_5d0ffff5_render,
HtmlTextConfigViewvue_type_template_id_5d0ffff5_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var HtmlTextConfigView = (HtmlTextConfigView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/ImageSelectConfigView.vue?vue&type=template&id=341e16f9&
var ImageSelectConfigViewvue_type_template_id_341e16f9_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("ImageUrl: ")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.imageUrl),expression:"control.imageUrl"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.imageUrl)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "imageUrl", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Height: ")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.height),expression:"control.height"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number"},domProps:{"value":(_vm.control.height)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "height", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Width: ")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.width),expression:"control.width"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"number"},domProps:{"value":(_vm.control.width)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "width", $event.target.value)}}})])])}
var ImageSelectConfigViewvue_type_template_id_341e16f9_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/control-configs/ImageSelectConfigView.vue?vue&type=template&id=341e16f9&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/control-configs/ImageSelectConfigView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ImageSelectConfigViewvue_type_script_lang_js_ = ({
name: "ImageSelectConfigView",
mixins: [control_special_config_mixin["a" /* CONTROL_SPECIAL_CONFIG_MIXIN */]]
});
// CONCATENATED MODULE: ./src/views/control-configs/ImageSelectConfigView.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configs_ImageSelectConfigViewvue_type_script_lang_js_ = (ImageSelectConfigViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/control-configs/ImageSelectConfigView.vue
/* normalize component */
var ImageSelectConfigView_component = Object(componentNormalizer["a" /* default */])(
control_configs_ImageSelectConfigViewvue_type_script_lang_js_,
ImageSelectConfigViewvue_type_template_id_341e16f9_render,
ImageSelectConfigViewvue_type_template_id_341e16f9_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ImageSelectConfigView = (ImageSelectConfigView_component.exports);
// CONCATENATED MODULE: ./src/configs/controls.js
/**
* Supported Controls in Vue-Form-Builder
* @author Phat Tran
*/
// Control-GUI-Component
// Control-Config-Component
var CONTROLS = {
input: {
name: "Input Field",
description: "Input text single line",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
// component mapping
fieldComponent: InputControl
},
icd11: {
name: "Icd11",
description: "Icd 11 tool",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
// component mapping
fieldComponent: Icd11Control
},
nhdd: {
name: "nhdd",
description: "nhdd",
icon: "editPencil",
fieldComponent: NhddControl
},
link: {
name: "Link Field",
description: "Add searchable items",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
// component mapping
fieldComponent: LinkControl,
configComponent: LinkConfigView
},
imageSelect: {
name: "ImageSelect Field",
description: "Select Image",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
fieldComponent: ImageSelectControl,
configComponent: ImageSelectConfigView
},
attachment: {
name: "Attachment Field",
description: "Add attachment",
icon: "editPencil",
fieldComponent: AttachmentControl,
configComponent: AttachmentConfigView
},
time: {
name: "Time Field",
description: "Add time selection",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
// component mapping
fieldComponent: TimeControl,
configComponent: TimeConfigView
},
datetime: {
name: "Date Time Field",
description: "Date Time",
icon: "editPencil",
fieldComponent: DateTimeControl,
configComponent: TimeConfigView
},
htmlText: {
name: "Formatted Text Field",
description: "For fomated long text",
icon: "editPencil",
// Follow ICON in `icon-facade.js` to see how it works.
// component mapping
fieldComponent: HtmlTextControl,
configComponent: HtmlTextConfigView
},
number: {
name: "Number Input Field",
description: "Input text single line - Number Only",
configData: {
isReal: false,
// integer or real (float/double)
decimalPlace: 1 // [For Real] 0.xxx?? (x = num of places)
},
fieldComponent: NumberControl,
configComponent: NumberConfigView,
/**
* As same like Vue-JS Property Default Data
* Specific field need some special data-type/structure, they need to
* put the creation in a factory method.
* It must return a value.
*/
rendererDefaultData: function rendererDefaultData() {
return 0;
}
},
text: {
name: "Text Field",
description: "Multiple line text field",
// config data for the input field - it will be merge with the CONTROL_DEFAULT_DATA
configData: {
rows: 3 // numeric
},
// component mapping
fieldComponent: TextControl,
configComponent: TextConfigView
},
date: {
name: "Date Picker",
description: "Simple date picker field",
// component mapping
fieldComponent: DateControl,
configComponent: TimeConfigView
},
// I would love to support this, but the thing is, many rich editors are too large:
// js: 150KB+
// css: 30KB+
// So 2.0.0 won't have this field.
// richText: {
// name: "Rich-Text Field",
// description: "Multiple line text field - Rich Editor (WYSIWYG)",
// },
datex: {
name: "Date Picker",
description: "Simple date picker field",
configData: {
format: "YYYY-MM-DD",
firstDay: DATE_PICKER_START_DATES.monday.val,
// 0 Sunday, 1 Monday,...
numberOfMonths: 1,
// Number of Month(s) will be shown
numberOfColumns: 1,
// Number of Column(s) will be shown
minDate: null,
// min day (less => can't select)
maxDate: null,
// max day (more => can't select),
singleMode: true,
// date or date-range
// for date-range
minDays: 0,
// min-day range
maxDays: 0,
// max-day range
returnType: DATE_PICKER_RETURN_TYPES.format.val // specific return type
},
fieldComponent: DatePickerControl,
configComponent: DatePickerConfigView
},
// fileUpload: {
// name: "File Upload",
// description: "Upload single file through API",
//
// configData: {
// uploadMode: FILE_UPLOAD_MODES.normal.val,
// apiURL: "", // API-Url to upload
// },
// },
dropDown: {
name: "Dropdown",
description: "Dropdown select from a list",
configData: {
dataMode: DROPDOWN_DATA_MODES.list.val,
// normal - api
multiple: false,
// is multiple selection
/**
* @var {ListItem[]} items
*/
items: [],
// for normal hard-list
apiURL: "",
// for api-request - must be entered
apiTextKey: "text",
// <option>TEXT</option>
apiValueKey: "value" // <option value=value>...</option>
},
fieldComponent: DropdownControl,
configComponent: DropdownConfigView
},
checkbox: {
name: "Checkbox List",
description: "Checkbox list items (Multiple Select)",
configData: {
displayMode: RADIO_CHECKBOX_STYLE.line.val,
// line by line / next to each others / 2 items per line
position: RADIO_CHECKBOX_POSITION.left.val,
// POSITION
/**
* @var {ListItem[]} items
*/
items: [] // list-item
},
fieldComponent: RadioCheckboxControl,
configComponent: RadioCheckboxConfigView,
rendererDefaultData: function rendererDefaultData() {
return [];
}
},
radio: {
name: "Radio List",
description: "Radio-Button list items (Single Select)",
configData: {
displayMode: RADIO_CHECKBOX_STYLE.line.val,
// line by line / next to each others / 2 items per line
position: RADIO_CHECKBOX_POSITION.left.val,
// POSITION
/**
* @var {ListItem[]} items
*/
items: [] // list-item
},
fieldComponent: RadioCheckboxControl,
configComponent: RadioCheckboxConfigView
},
label: {
name: "Label",
description: "Simple label text show up in your Form",
disableValue: true,
configData: {
forAttribute: null,
// `for` for any control? (except the Label)
// Override here in order to not show the Label
isShowLabel: false
},
// no need validation
disableValidation: true,
fieldComponent: LabelControl,
configComponent: LabelConfigView
},
button: {
name: "Button",
description: "Simple button for your own purpose",
disableValidation: true,
disableValue: true,
configData: {
buttonClass: styles["a" /* STYLES */].BUTTON.PRIMARY,
buttonType: "button",
// submit/reset/button/...
emitEventCode: "",
// like: "BtnClicked/clicked/change"
emitEventData: "",
// special data to emit to let you know which button is clicked
// if this is true => validation will be run before the real invoke method
isRunValidation: false,
// Override here in order to not show the Label
isShowLabel: false
},
fieldComponent: ButtonControl,
configComponent: ButtonConfigView
},
emptyBlock: {
name: "Empty Block",
description: "Empty block to design your section/row.",
disableValidation: true,
disableValue: true,
fieldComponent: EmptyBlockControl,
configData: {
// Override here in order to not show the Label
isShowLabel: false
}
},
textBlock: {
name: "Text Block",
description: "Block with text only (without any controls)",
disableValidation: true,
disableValue: true,
// if you provide this, the control field value will not be recorded.
fieldComponent: TextBlockControl,
configComponent: TextBlockConfigView,
configData: {
text: ""
}
}
};
var CONTROL_DEFAULT_DATA = {
// default configuration
uniqueId: "",
// :id
type: "",
// control type...
name: "",
// :name
label: "",
subLabel: "",
isShowLabel: true,
placeholderText: "",
// :placeholder
containerClass: styles["a" /* STYLES */].COLUMNS.COL6,
additionalContainerClass: "",
// :class for the <div> outer container
additionalFieldClass: "",
// :class for <input> <select> ...
additionalLabelClass: "",
// :class for the <label>
defaultValue: "",
validations: [],
hideCondition: "",
mappedField: "" // data of the others - coming up later
};
var STATIC_CONTROLS = [// {
// "uniqueId": "control-addaf56d-08f9-4c44-9969-f693b74c7760",
// "type": "button",
// "name": "",
// "label": "Button",
// "subLabel": "",
// "description":"Button",
// "isShowLabel": false,
// "placeholderText": "",
// "containerClass": "col-md-4",
// "additionalContainerClass": "",
// "additionalFieldClass": "",
// "additionalLabelClass": "",
// "defaultValue": "",
// "validations": [],
// "buttonClass": "btn btn-primary",
// "buttonType": "button",
// "emitEventCode": "",
// "emitEventData": "",
// "isRunValidation": false
// },
{
uniqueId: "control-7be0c01a-9b18-411f-9c9a-07eb5efec813",
type: "emptyBlock",
name: "",
label: "Empty Block",
description: "Horizontal Block for form spacing and detached titles ",
subLabel: "",
isShowLabel: false,
placeholderText: "",
containerClass: "col-md-12",
additionalContainerClass: "mt-2 mb-2",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: []
}, {
uniqueId: "control-57f2738e-6f19-4721-b2a7-c973c41232fd",
type: "textBlock",
name: "",
label: "Text Block",
description: "Used to add additional information to the form",
subLabel: "",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-12",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: [],
text: ""
} // {
// uniqueId: "control-a4d0e350-b1cf-42ed-bfc4-957655457b0b",
// type: "htmlText",
// name: "Female",
// label: "Female",
// isShowLabel: true,
// placeholderText: "",
// containerClass: "col-md-6 md-layout-item md-size-50",
// additionalContainerClass: "",
// additionalFieldClass: "",
// additionalLabelClass: "",
// defaultValue: "",
// validations: [],
// rows: 3,
// },
// {
// uniqueId: "control-a4d0e350-b1cf-42ed-bfc4sdf-957655457b32b",
// type: "icd11",
// name: "Icd 11",
// label: "Female",
// isShowLabel: true,
// placeholderText: "",
// containerClass: "col-md-12 md-layout-item md-size-100",
// additionalContainerClass: "",
// additionalFieldClass: "",
// additionalLabelClass: "",
// defaultValue: "",
// validations: [],
// rows: 3,
// },
// {
// uniqueId: "control-a4d0e350-b1cf-42ed-bfc4sdf-95765545734839",
// type: "imageSelect",
// name: "Image Select",
// label: "Image Select",
// isShowLabel: true,
// placeholderText: "",
// containerClass: "col-md-12 md-layout-item md-size-100",
// additionalContainerClass: "",
// additionalFieldClass: "",
// additionalLabelClass: "",
// defaultValue: "",
// validations: [],
// rows: 3,
// },
];
/**
* Create new control data
* @param controlKey
* @returns {CONTROL_DEFAULT_DATA}
*/
function createControlData(controlKey) {
var newData = Object.assign({}, CONTROL_DEFAULT_DATA, CONTROLS[controlKey].configData || {}); // set default data
newData.label = CONTROLS[controlKey].name;
newData.type = controlKey; // unique ID is a must - I used UUIDv4 => 99% Unique
newData.uniqueId = "control-" + helper["a" /* HELPER */].getUUIDv4();
return newData;
}
/***/ }),
/***/ "8e60":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("294c")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "8e6e":
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__("5ca1");
var ownKeys = __webpack_require__("990b");
var toIObject = __webpack_require__("6821");
var gOPD = __webpack_require__("11e9");
var createProperty = __webpack_require__("f1ae");
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
var O = toIObject(object);
var getDesc = gOPD.f;
var keys = ownKeys(O);
var result = {};
var i = 0;
var key, desc;
while (keys.length > i) {
desc = getDesc(O, key = keys[i++]);
if (desc !== undefined) createProperty(result, key, desc);
}
return result;
}
});
/***/ }),
/***/ "8f60":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__("a159");
var descriptor = __webpack_require__("aebd");
var setToStringTag = __webpack_require__("45f2");
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__("35e8")(IteratorPrototype, __webpack_require__("5168")('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/***/ "9003":
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__("6b4c");
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/***/ "9093":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__("ce10");
var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ "9138":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("35e8");
/***/ }),
/***/ "9152":
/***/ (function(module, exports) {
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = ((value * c) - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
/***/ }),
/***/ "9339":
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {/*!
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(true)
module.exports = factory();
else {}
})(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 = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 109);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var container_1 = __webpack_require__(17);
var format_1 = __webpack_require__(18);
var leaf_1 = __webpack_require__(19);
var scroll_1 = __webpack_require__(45);
var inline_1 = __webpack_require__(46);
var block_1 = __webpack_require__(47);
var embed_1 = __webpack_require__(48);
var text_1 = __webpack_require__(49);
var attributor_1 = __webpack_require__(12);
var class_1 = __webpack_require__(32);
var style_1 = __webpack_require__(33);
var store_1 = __webpack_require__(31);
var Registry = __webpack_require__(1);
var Parchment = {
Scope: Registry.Scope,
create: Registry.create,
find: Registry.find,
query: Registry.query,
register: Registry.register,
Container: container_1.default,
Format: format_1.default,
Leaf: leaf_1.default,
Embed: embed_1.default,
Scroll: scroll_1.default,
Block: block_1.default,
Inline: inline_1.default,
Text: text_1.default,
Attributor: {
Attribute: attributor_1.default,
Class: class_1.default,
Style: style_1.default,
Store: store_1.default,
},
};
exports.default = Parchment;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ParchmentError = /** @class */ (function (_super) {
__extends(ParchmentError, _super);
function ParchmentError(message) {
var _this = this;
message = '[Parchment] ' + message;
_this = _super.call(this, message) || this;
_this.message = message;
_this.name = _this.constructor.name;
return _this;
}
return ParchmentError;
}(Error));
exports.ParchmentError = ParchmentError;
var attributes = {};
var classes = {};
var tags = {};
var types = {};
exports.DATA_KEY = '__blot';
var Scope;
(function (Scope) {
Scope[Scope["TYPE"] = 3] = "TYPE";
Scope[Scope["LEVEL"] = 12] = "LEVEL";
Scope[Scope["ATTRIBUTE"] = 13] = "ATTRIBUTE";
Scope[Scope["BLOT"] = 14] = "BLOT";
Scope[Scope["INLINE"] = 7] = "INLINE";
Scope[Scope["BLOCK"] = 11] = "BLOCK";
Scope[Scope["BLOCK_BLOT"] = 10] = "BLOCK_BLOT";
Scope[Scope["INLINE_BLOT"] = 6] = "INLINE_BLOT";
Scope[Scope["BLOCK_ATTRIBUTE"] = 9] = "BLOCK_ATTRIBUTE";
Scope[Scope["INLINE_ATTRIBUTE"] = 5] = "INLINE_ATTRIBUTE";
Scope[Scope["ANY"] = 15] = "ANY";
})(Scope = exports.Scope || (exports.Scope = {}));
function create(input, value) {
var match = query(input);
if (match == null) {
throw new ParchmentError("Unable to create " + input + " blot");
}
var BlotClass = match;
var node =
// @ts-ignore
input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);
return new BlotClass(node, value);
}
exports.create = create;
function find(node, bubble) {
if (bubble === void 0) { bubble = false; }
if (node == null)
return null;
// @ts-ignore
if (node[exports.DATA_KEY] != null)
return node[exports.DATA_KEY].blot;
if (bubble)
return find(node.parentNode, bubble);
return null;
}
exports.find = find;
function query(query, scope) {
if (scope === void 0) { scope = Scope.ANY; }
var match;
if (typeof query === 'string') {
match = types[query] || attributes[query];
// @ts-ignore
}
else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {
match = types['text'];
}
else if (typeof query === 'number') {
if (query & Scope.LEVEL & Scope.BLOCK) {
match = types['block'];
}
else if (query & Scope.LEVEL & Scope.INLINE) {
match = types['inline'];
}
}
else if (query instanceof HTMLElement) {
var names = (query.getAttribute('class') || '').split(/\s+/);
for (var i in names) {
match = classes[names[i]];
if (match)
break;
}
match = match || tags[query.tagName];
}
if (match == null)
return null;
// @ts-ignore
if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)
return match;
return null;
}
exports.query = query;
function register() {
var Definitions = [];
for (var _i = 0; _i < arguments.length; _i++) {
Definitions[_i] = arguments[_i];
}
if (Definitions.length > 1) {
return Definitions.map(function (d) {
return register(d);
});
}
var Definition = Definitions[0];
if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {
throw new ParchmentError('Invalid definition');
}
else if (Definition.blotName === 'abstract') {
throw new ParchmentError('Cannot register abstract class');
}
types[Definition.blotName || Definition.attrName] = Definition;
if (typeof Definition.keyName === 'string') {
attributes[Definition.keyName] = Definition;
}
else {
if (Definition.className != null) {
classes[Definition.className] = Definition;
}
if (Definition.tagName != null) {
if (Array.isArray(Definition.tagName)) {
Definition.tagName = Definition.tagName.map(function (tagName) {
return tagName.toUpperCase();
});
}
else {
Definition.tagName = Definition.tagName.toUpperCase();
}
var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];
tagNames.forEach(function (tag) {
if (tags[tag] == null || Definition.className == null) {
tags[tag] = Definition;
}
});
}
}
return Definition;
}
exports.register = register;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
var diff = __webpack_require__(51);
var equal = __webpack_require__(11);
var extend = __webpack_require__(3);
var op = __webpack_require__(20);
var NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff()
var Delta = function (ops) {
// Assume we are given a well formed ops
if (Array.isArray(ops)) {
this.ops = ops;
} else if (ops != null && Array.isArray(ops.ops)) {
this.ops = ops.ops;
} else {
this.ops = [];
}
};
Delta.prototype.insert = function (text, attributes) {
var newOp = {};
if (text.length === 0) return this;
newOp.insert = text;
if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
newOp.attributes = attributes;
}
return this.push(newOp);
};
Delta.prototype['delete'] = function (length) {
if (length <= 0) return this;
return this.push({ 'delete': length });
};
Delta.prototype.retain = function (length, attributes) {
if (length <= 0) return this;
var newOp = { retain: length };
if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
newOp.attributes = attributes;
}
return this.push(newOp);
};
Delta.prototype.push = function (newOp) {
var index = this.ops.length;
var lastOp = this.ops[index - 1];
newOp = extend(true, {}, newOp);
if (typeof lastOp === 'object') {
if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {
this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };
return this;
}
// Since it does not matter if we insert before or after deleting at the same index,
// always prefer to insert first
if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {
index -= 1;
lastOp = this.ops[index - 1];
if (typeof lastOp !== 'object') {
this.ops.unshift(newOp);
return this;
}
}
if (equal(newOp.attributes, lastOp.attributes)) {
if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {
this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };
if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
return this;
} else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {
this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };
if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
return this;
}
}
}
if (index === this.ops.length) {
this.ops.push(newOp);
} else {
this.ops.splice(index, 0, newOp);
}
return this;
};
Delta.prototype.chop = function () {
var lastOp = this.ops[this.ops.length - 1];
if (lastOp && lastOp.retain && !lastOp.attributes) {
this.ops.pop();
}
return this;
};
Delta.prototype.filter = function (predicate) {
return this.ops.filter(predicate);
};
Delta.prototype.forEach = function (predicate) {
this.ops.forEach(predicate);
};
Delta.prototype.map = function (predicate) {
return this.ops.map(predicate);
};
Delta.prototype.partition = function (predicate) {
var passed = [], failed = [];
this.forEach(function(op) {
var target = predicate(op) ? passed : failed;
target.push(op);
});
return [passed, failed];
};
Delta.prototype.reduce = function (predicate, initial) {
return this.ops.reduce(predicate, initial);
};
Delta.prototype.changeLength = function () {
return this.reduce(function (length, elem) {
if (elem.insert) {
return length + op.length(elem);
} else if (elem.delete) {
return length - elem.delete;
}
return length;
}, 0);
};
Delta.prototype.length = function () {
return this.reduce(function (length, elem) {
return length + op.length(elem);
}, 0);
};
Delta.prototype.slice = function (start, end) {
start = start || 0;
if (typeof end !== 'number') end = Infinity;
var ops = [];
var iter = op.iterator(this.ops);
var index = 0;
while (index < end && iter.hasNext()) {
var nextOp;
if (index < start) {
nextOp = iter.next(start - index);
} else {
nextOp = iter.next(end - index);
ops.push(nextOp);
}
index += op.length(nextOp);
}
return new Delta(ops);
};
Delta.prototype.compose = function (other) {
var thisIter = op.iterator(this.ops);
var otherIter = op.iterator(other.ops);
var ops = [];
var firstOther = otherIter.peek();
if (firstOther != null && typeof firstOther.retain === 'number' && firstOther.attributes == null) {
var firstLeft = firstOther.retain;
while (thisIter.peekType() === 'insert' && thisIter.peekLength() <= firstLeft) {
firstLeft -= thisIter.peekLength();
ops.push(thisIter.next());
}
if (firstOther.retain - firstLeft > 0) {
otherIter.next(firstOther.retain - firstLeft);
}
}
var delta = new Delta(ops);
while (thisIter.hasNext() || otherIter.hasNext()) {
if (otherIter.peekType() === 'insert') {
delta.push(otherIter.next());
} else if (thisIter.peekType() === 'delete') {
delta.push(thisIter.next());
} else {
var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
var thisOp = thisIter.next(length);
var otherOp = otherIter.next(length);
if (typeof otherOp.retain === 'number') {
var newOp = {};
if (typeof thisOp.retain === 'number') {
newOp.retain = length;
} else {
newOp.insert = thisOp.insert;
}
// Preserve null when composing with a retain, otherwise remove it for inserts
var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');
if (attributes) newOp.attributes = attributes;
delta.push(newOp);
// Optimization if rest of other is just retain
if (!otherIter.hasNext() && equal(delta.ops[delta.ops.length - 1], newOp)) {
var rest = new Delta(thisIter.rest());
return delta.concat(rest).chop();
}
// Other op should be delete, we could be an insert or retain
// Insert + delete cancels out
} else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {
delta.push(otherOp);
}
}
}
return delta.chop();
};
Delta.prototype.concat = function (other) {
var delta = new Delta(this.ops.slice());
if (other.ops.length > 0) {
delta.push(other.ops[0]);
delta.ops = delta.ops.concat(other.ops.slice(1));
}
return delta;
};
Delta.prototype.diff = function (other, index) {
if (this.ops === other.ops) {
return new Delta();
}
var strings = [this, other].map(function (delta) {
return delta.map(function (op) {
if (op.insert != null) {
return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;
}
var prep = (delta === other) ? 'on' : 'with';
throw new Error('diff() called ' + prep + ' non-document');
}).join('');
});
var delta = new Delta();
var diffResult = diff(strings[0], strings[1], index);
var thisIter = op.iterator(this.ops);
var otherIter = op.iterator(other.ops);
diffResult.forEach(function (component) {
var length = component[1].length;
while (length > 0) {
var opLength = 0;
switch (component[0]) {
case diff.INSERT:
opLength = Math.min(otherIter.peekLength(), length);
delta.push(otherIter.next(opLength));
break;
case diff.DELETE:
opLength = Math.min(length, thisIter.peekLength());
thisIter.next(opLength);
delta['delete'](opLength);
break;
case diff.EQUAL:
opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);
var thisOp = thisIter.next(opLength);
var otherOp = otherIter.next(opLength);
if (equal(thisOp.insert, otherOp.insert)) {
delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));
} else {
delta.push(otherOp)['delete'](opLength);
}
break;
}
length -= opLength;
}
});
return delta.chop();
};
Delta.prototype.eachLine = function (predicate, newline) {
newline = newline || '\n';
var iter = op.iterator(this.ops);
var line = new Delta();
var i = 0;
while (iter.hasNext()) {
if (iter.peekType() !== 'insert') return;
var thisOp = iter.peek();
var start = op.length(thisOp) - iter.peekLength();
var index = typeof thisOp.insert === 'string' ?
thisOp.insert.indexOf(newline, start) - start : -1;
if (index < 0) {
line.push(iter.next());
} else if (index > 0) {
line.push(iter.next(index));
} else {
if (predicate(line, iter.next(1).attributes || {}, i) === false) {
return;
}
i += 1;
line = new Delta();
}
}
if (line.length() > 0) {
predicate(line, {}, i);
}
};
Delta.prototype.transform = function (other, priority) {
priority = !!priority;
if (typeof other === 'number') {
return this.transformPosition(other, priority);
}
var thisIter = op.iterator(this.ops);
var otherIter = op.iterator(other.ops);
var delta = new Delta();
while (thisIter.hasNext() || otherIter.hasNext()) {
if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {
delta.retain(op.length(thisIter.next()));
} else if (otherIter.peekType() === 'insert') {
delta.push(otherIter.next());
} else {
var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
var thisOp = thisIter.next(length);
var otherOp = otherIter.next(length);
if (thisOp['delete']) {
// Our delete either makes their delete redundant or removes their retain
continue;
} else if (otherOp['delete']) {
delta.push(otherOp);
} else {
// We retain either their retain or insert
delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));
}
}
}
return delta.chop();
};
Delta.prototype.transformPosition = function (index, priority) {
priority = !!priority;
var thisIter = op.iterator(this.ops);
var offset = 0;
while (thisIter.hasNext() && offset <= index) {
var length = thisIter.peekLength();
var nextType = thisIter.peekType();
thisIter.next();
if (nextType === 'delete') {
index -= Math.min(length, index - offset);
continue;
} else if (nextType === 'insert' && (offset < index || !priority)) {
index += length;
}
offset += length;
}
return index;
};
module.exports = Delta;
/***/ }),
/* 3 */
/***/ (function(module, exports) {
'use strict';
var hasOwn = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var defineProperty = Object.defineProperty;
var gOPD = Object.getOwnPropertyDescriptor;
var isArray = function isArray(arr) {
if (typeof Array.isArray === 'function') {
return Array.isArray(arr);
}
return toStr.call(arr) === '[object Array]';
};
var isPlainObject = function isPlainObject(obj) {
if (!obj || toStr.call(obj) !== '[object Object]') {
return false;
}
var hasOwnConstructor = hasOwn.call(obj, 'constructor');
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
// Not own constructor property must be Object
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
for (key in obj) { /**/ }
return typeof key === 'undefined' || hasOwn.call(obj, key);
};
// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
var setProperty = function setProperty(target, options) {
if (defineProperty && options.name === '__proto__') {
defineProperty(target, options.name, {
enumerable: true,
configurable: true,
value: options.newValue,
writable: true
});
} else {
target[options.name] = options.newValue;
}
};
// Return undefined instead of __proto__ if '__proto__' is not an own property
var getProperty = function getProperty(obj, name) {
if (name === '__proto__') {
if (!hasOwn.call(obj, name)) {
return void 0;
} else if (gOPD) {
// In early versions of node, obj['__proto__'] is buggy when obj has
// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
return gOPD(obj, name).value;
}
}
return obj[name];
};
module.exports = function extend() {
var options, name, src, copy, copyIsArray, clone;
var target = arguments[0];
var i = 1;
var length = arguments.length;
var deep = false;
// Handle a deep copy situation
if (typeof target === 'boolean') {
deep = target;
target = arguments[1] || {};
// skip the boolean and the target
i = 2;
}
if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
target = {};
}
for (; i < length; ++i) {
options = arguments[i];
// Only deal with non-null/undefined values
if (options != null) {
// Extend the base object
for (name in options) {
src = getProperty(target, name);
copy = getProperty(options, name);
// Prevent never-ending loop
if (target !== copy) {
// Recurse if we're merging plain objects or arrays
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && isArray(src) ? src : [];
} else {
clone = src && isPlainObject(src) ? src : {};
}
// Never move original objects, clone them
setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
// Don't bring in undefined values
} else if (typeof copy !== 'undefined') {
setProperty(target, { name: name, newValue: copy });
}
}
}
}
}
// Return the modified object
return target;
};
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _break = __webpack_require__(16);
var _break2 = _interopRequireDefault(_break);
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var NEWLINE_LENGTH = 1;
var BlockEmbed = function (_Parchment$Embed) {
_inherits(BlockEmbed, _Parchment$Embed);
function BlockEmbed() {
_classCallCheck(this, BlockEmbed);
return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));
}
_createClass(BlockEmbed, [{
key: 'attach',
value: function attach() {
_get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);
this.attributes = new _parchment2.default.Attributor.Store(this.domNode);
}
}, {
key: 'delta',
value: function delta() {
return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));
}
}, {
key: 'format',
value: function format(name, value) {
var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);
if (attribute != null) {
this.attributes.attribute(attribute, value);
}
}
}, {
key: 'formatAt',
value: function formatAt(index, length, name, value) {
this.format(name, value);
}
}, {
key: 'insertAt',
value: function insertAt(index, value, def) {
if (typeof value === 'string' && value.endsWith('\n')) {
var block = _parchment2.default.create(Block.blotName);
this.parent.insertBefore(block, index === 0 ? this : this.next);
block.insertAt(0, value.slice(0, -1));
} else {
_get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);
}
}
}]);
return BlockEmbed;
}(_parchment2.default.Embed);
BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;
// It is important for cursor behavior BlockEmbeds use tags that are block level elements
var Block = function (_Parchment$Block) {
_inherits(Block, _Parchment$Block);
function Block(domNode) {
_classCallCheck(this, Block);
var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));
_this2.cache = {};
return _this2;
}
_createClass(Block, [{
key: 'delta',
value: function delta() {
if (this.cache.delta == null) {
this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {
if (leaf.length() === 0) {
return delta;
} else {
return delta.insert(leaf.value(), bubbleFormats(leaf));
}
}, new _quillDelta2.default()).insert('\n', bubbleFormats(this));
}
return this.cache.delta;
}
}, {
key: 'deleteAt',
value: function deleteAt(index, length) {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);
this.cache = {};
}
}, {
key: 'formatAt',
value: function formatAt(index, length, name, value) {
if (length <= 0) return;
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
if (index + length === this.length()) {
this.format(name, value);
}
} else {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);
}
this.cache = {};
}
}, {
key: 'insertAt',
value: function insertAt(index, value, def) {
if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);
if (value.length === 0) return;
var lines = value.split('\n');
var text = lines.shift();
if (text.length > 0) {
if (index < this.length() - 1 || this.children.tail == null) {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);
} else {
this.children.tail.insertAt(this.children.tail.length(), text);
}
this.cache = {};
}
var block = this;
lines.reduce(function (index, line) {
block = block.split(index, true);
block.insertAt(0, line);
return line.length;
}, index + text.length);
}
}, {
key: 'insertBefore',
value: function insertBefore(blot, ref) {
var head = this.children.head;
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);
if (head instanceof _break2.default) {
head.remove();
}
this.cache = {};
}
}, {
key: 'length',
value: function length() {
if (this.cache.length == null) {
this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;
}
return this.cache.length;
}
}, {
key: 'moveChildren',
value: function moveChildren(target, ref) {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);
this.cache = {};
}
}, {
key: 'optimize',
value: function optimize(context) {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);
this.cache = {};
}
}, {
key: 'path',
value: function path(index) {
return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);
}
}, {
key: 'removeChild',
value: function removeChild(child) {
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);
this.cache = {};
}
}, {
key: 'split',
value: function split(index) {
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {
var clone = this.clone();
if (index === 0) {
this.parent.insertBefore(clone, this);
return this;
} else {
this.parent.insertBefore(clone, this.next);
return clone;
}
} else {
var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);
this.cache = {};
return next;
}
}
}]);
return Block;
}(_parchment2.default.Block);
Block.blotName = 'block';
Block.tagName = 'P';
Block.defaultChild = 'break';
Block.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];
function bubbleFormats(blot) {
var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (blot == null) return formats;
if (typeof blot.formats === 'function') {
formats = (0, _extend2.default)(formats, blot.formats());
}
if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {
return formats;
}
return bubbleFormats(blot.parent, formats);
}
exports.bubbleFormats = bubbleFormats;
exports.BlockEmbed = BlockEmbed;
exports.default = Block;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.overload = exports.expandConfig = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
__webpack_require__(50);
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _editor = __webpack_require__(14);
var _editor2 = _interopRequireDefault(_editor);
var _emitter3 = __webpack_require__(8);
var _emitter4 = _interopRequireDefault(_emitter3);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _selection = __webpack_require__(15);
var _selection2 = _interopRequireDefault(_selection);
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
var _theme = __webpack_require__(34);
var _theme2 = _interopRequireDefault(_theme);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var debug = (0, _logger2.default)('quill');
var Quill = function () {
_createClass(Quill, null, [{
key: 'debug',
value: function debug(limit) {
if (limit === true) {
limit = 'log';
}
_logger2.default.level(limit);
}
}, {
key: 'find',
value: function find(node) {
return node.__quill || _parchment2.default.find(node);
}
}, {
key: 'import',
value: function _import(name) {
if (this.imports[name] == null) {
debug.error('Cannot import ' + name + '. Are you sure it was registered?');
}
return this.imports[name];
}
}, {
key: 'register',
value: function register(path, target) {
var _this = this;
var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (typeof path !== 'string') {
var name = path.attrName || path.blotName;
if (typeof name === 'string') {
// register(Blot | Attributor, overwrite)
this.register('formats/' + name, path, target);
} else {
Object.keys(path).forEach(function (key) {
_this.register(key, path[key], target);
});
}
} else {
if (this.imports[path] != null && !overwrite) {
debug.warn('Overwriting ' + path + ' with', target);
}
this.imports[path] = target;
if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {
_parchment2.default.register(target);
} else if (path.startsWith('modules') && typeof target.register === 'function') {
target.register();
}
}
}
}]);
function Quill(container) {
var _this2 = this;
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Quill);
this.options = expandConfig(container, options);
this.container = this.options.container;
if (this.container == null) {
return debug.error('Invalid Quill container', container);
}
if (this.options.debug) {
Quill.debug(this.options.debug);
}
var html = this.container.innerHTML.trim();
this.container.classList.add('ql-container');
this.container.innerHTML = '';
this.container.__quill = this;
this.root = this.addContainer('ql-editor');
this.root.classList.add('ql-blank');
this.root.setAttribute('data-gramm', false);
this.scrollingContainer = this.options.scrollingContainer || this.root;
this.emitter = new _emitter4.default();
this.scroll = _parchment2.default.create(this.root, {
emitter: this.emitter,
whitelist: this.options.formats
});
this.editor = new _editor2.default(this.scroll);
this.selection = new _selection2.default(this.scroll, this.emitter);
this.theme = new this.options.theme(this, this.options);
this.keyboard = this.theme.addModule('keyboard');
this.clipboard = this.theme.addModule('clipboard');
this.history = this.theme.addModule('history');
this.theme.init();
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {
if (type === _emitter4.default.events.TEXT_CHANGE) {
_this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());
}
});
this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {
var range = _this2.selection.lastRange;
var index = range && range.length === 0 ? range.index : undefined;
modify.call(_this2, function () {
return _this2.editor.update(null, mutations, index);
}, source);
});
var contents = this.clipboard.convert('<div class=\'ql-editor\' style="white-space: normal;">' + html + '<p><br></p></div>');
this.setContents(contents);
this.history.clear();
if (this.options.placeholder) {
this.root.setAttribute('data-placeholder', this.options.placeholder);
}
if (this.options.readOnly) {
this.disable();
}
}
_createClass(Quill, [{
key: 'addContainer',
value: function addContainer(container) {
var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (typeof container === 'string') {
var className = container;
container = document.createElement('div');
container.classList.add(className);
}
this.container.insertBefore(container, refNode);
return container;
}
}, {
key: 'blur',
value: function blur() {
this.selection.setRange(null);
}
}, {
key: 'deleteText',
value: function deleteText(index, length, source) {
var _this3 = this;
var _overload = overload(index, length, source);
var _overload2 = _slicedToArray(_overload, 4);
index = _overload2[0];
length = _overload2[1];
source = _overload2[3];
return modify.call(this, function () {
return _this3.editor.deleteText(index, length);
}, source, index, -1 * length);
}
}, {
key: 'disable',
value: function disable() {
this.enable(false);
}
}, {
key: 'enable',
value: function enable() {
var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
this.scroll.enable(enabled);
this.container.classList.toggle('ql-disabled', !enabled);
}
}, {
key: 'focus',
value: function focus() {
var scrollTop = this.scrollingContainer.scrollTop;
this.selection.focus();
this.scrollingContainer.scrollTop = scrollTop;
this.scrollIntoView();
}
}, {
key: 'format',
value: function format(name, value) {
var _this4 = this;
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
return modify.call(this, function () {
var range = _this4.getSelection(true);
var change = new _quillDelta2.default();
if (range == null) {
return change;
} else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));
} else if (range.length === 0) {
_this4.selection.format(name, value);
return change;
} else {
change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));
}
_this4.setSelection(range, _emitter4.default.sources.SILENT);
return change;
}, source);
}
}, {
key: 'formatLine',
value: function formatLine(index, length, name, value, source) {
var _this5 = this;
var formats = void 0;
var _overload3 = overload(index, length, name, value, source);
var _overload4 = _slicedToArray(_overload3, 4);
index = _overload4[0];
length = _overload4[1];
formats = _overload4[2];
source = _overload4[3];
return modify.call(this, function () {
return _this5.editor.formatLine(index, length, formats);
}, source, index, 0);
}
}, {
key: 'formatText',
value: function formatText(index, length, name, value, source) {
var _this6 = this;
var formats = void 0;
var _overload5 = overload(index, length, name, value, source);
var _overload6 = _slicedToArray(_overload5, 4);
index = _overload6[0];
length = _overload6[1];
formats = _overload6[2];
source = _overload6[3];
return modify.call(this, function () {
return _this6.editor.formatText(index, length, formats);
}, source, index, 0);
}
}, {
key: 'getBounds',
value: function getBounds(index) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var bounds = void 0;
if (typeof index === 'number') {
bounds = this.selection.getBounds(index, length);
} else {
bounds = this.selection.getBounds(index.index, index.length);
}
var containerBounds = this.container.getBoundingClientRect();
return {
bottom: bounds.bottom - containerBounds.top,
height: bounds.height,
left: bounds.left - containerBounds.left,
right: bounds.right - containerBounds.left,
top: bounds.top - containerBounds.top,
width: bounds.width
};
}
}, {
key: 'getContents',
value: function getContents() {
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
var _overload7 = overload(index, length);
var _overload8 = _slicedToArray(_overload7, 2);
index = _overload8[0];
length = _overload8[1];
return this.editor.getContents(index, length);
}
}, {
key: 'getFormat',
value: function getFormat() {
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (typeof index === 'number') {
return this.editor.getFormat(index, length);
} else {
return this.editor.getFormat(index.index, index.length);
}
}
}, {
key: 'getIndex',
value: function getIndex(blot) {
return blot.offset(this.scroll);
}
}, {
key: 'getLength',
value: function getLength() {
return this.scroll.length();
}
}, {
key: 'getLeaf',
value: function getLeaf(index) {
return this.scroll.leaf(index);
}
}, {
key: 'getLine',
value: function getLine(index) {
return this.scroll.line(index);
}
}, {
key: 'getLines',
value: function getLines() {
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
if (typeof index !== 'number') {
return this.scroll.lines(index.index, index.length);
} else {
return this.scroll.lines(index, length);
}
}
}, {
key: 'getModule',
value: function getModule(name) {
return this.theme.modules[name];
}
}, {
key: 'getSelection',
value: function getSelection() {
var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (focus) this.focus();
this.update(); // Make sure we access getRange with editor in consistent state
return this.selection.getRange()[0];
}
}, {
key: 'getText',
value: function getText() {
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
var _overload9 = overload(index, length);
var _overload10 = _slicedToArray(_overload9, 2);
index = _overload10[0];
length = _overload10[1];
return this.editor.getText(index, length);
}
}, {
key: 'hasFocus',
value: function hasFocus() {
return this.selection.hasFocus();
}
}, {
key: 'insertEmbed',
value: function insertEmbed(index, embed, value) {
var _this7 = this;
var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;
return modify.call(this, function () {
return _this7.editor.insertEmbed(index, embed, value);
}, source, index);
}
}, {
key: 'insertText',
value: function insertText(index, text, name, value, source) {
var _this8 = this;
var formats = void 0;
var _overload11 = overload(index, 0, name, value, source);
var _overload12 = _slicedToArray(_overload11, 4);
index = _overload12[0];
formats = _overload12[2];
source = _overload12[3];
return modify.call(this, function () {
return _this8.editor.insertText(index, text, formats);
}, source, index, text.length);
}
}, {
key: 'isEnabled',
value: function isEnabled() {
return !this.container.classList.contains('ql-disabled');
}
}, {
key: 'off',
value: function off() {
return this.emitter.off.apply(this.emitter, arguments);
}
}, {
key: 'on',
value: function on() {
return this.emitter.on.apply(this.emitter, arguments);
}
}, {
key: 'once',
value: function once() {
return this.emitter.once.apply(this.emitter, arguments);
}
}, {
key: 'pasteHTML',
value: function pasteHTML(index, html, source) {
this.clipboard.dangerouslyPasteHTML(index, html, source);
}
}, {
key: 'removeFormat',
value: function removeFormat(index, length, source) {
var _this9 = this;
var _overload13 = overload(index, length, source);
var _overload14 = _slicedToArray(_overload13, 4);
index = _overload14[0];
length = _overload14[1];
source = _overload14[3];
return modify.call(this, function () {
return _this9.editor.removeFormat(index, length);
}, source, index);
}
}, {
key: 'scrollIntoView',
value: function scrollIntoView() {
this.selection.scrollIntoView(this.scrollingContainer);
}
}, {
key: 'setContents',
value: function setContents(delta) {
var _this10 = this;
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
return modify.call(this, function () {
delta = new _quillDelta2.default(delta);
var length = _this10.getLength();
var deleted = _this10.editor.deleteText(0, length);
var applied = _this10.editor.applyDelta(delta);
var lastOp = applied.ops[applied.ops.length - 1];
if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\n') {
_this10.editor.deleteText(_this10.getLength() - 1, 1);
applied.delete(1);
}
var ret = deleted.compose(applied);
return ret;
}, source);
}
}, {
key: 'setSelection',
value: function setSelection(index, length, source) {
if (index == null) {
this.selection.setRange(null, length || Quill.sources.API);
} else {
var _overload15 = overload(index, length, source);
var _overload16 = _slicedToArray(_overload15, 4);
index = _overload16[0];
length = _overload16[1];
source = _overload16[3];
this.selection.setRange(new _selection.Range(index, length), source);
if (source !== _emitter4.default.sources.SILENT) {
this.selection.scrollIntoView(this.scrollingContainer);
}
}
}
}, {
key: 'setText',
value: function setText(text) {
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
var delta = new _quillDelta2.default().insert(text);
return this.setContents(delta, source);
}
}, {
key: 'update',
value: function update() {
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes
this.selection.update(source);
return change;
}
}, {
key: 'updateContents',
value: function updateContents(delta) {
var _this11 = this;
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
return modify.call(this, function () {
delta = new _quillDelta2.default(delta);
return _this11.editor.applyDelta(delta, source);
}, source, true);
}
}]);
return Quill;
}();
Quill.DEFAULTS = {
bounds: null,
formats: null,
modules: {},
placeholder: '',
readOnly: false,
scrollingContainer: null,
strict: true,
theme: 'default'
};
Quill.events = _emitter4.default.events;
Quill.sources = _emitter4.default.sources;
// eslint-disable-next-line no-undef
Quill.version = false ? undefined : "1.3.7";
Quill.imports = {
'delta': _quillDelta2.default,
'parchment': _parchment2.default,
'core/module': _module2.default,
'core/theme': _theme2.default
};
function expandConfig(container, userConfig) {
userConfig = (0, _extend2.default)(true, {
container: container,
modules: {
clipboard: true,
keyboard: true,
history: true
}
}, userConfig);
if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {
userConfig.theme = _theme2.default;
} else {
userConfig.theme = Quill.import('themes/' + userConfig.theme);
if (userConfig.theme == null) {
throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');
}
}
var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);
[themeConfig, userConfig].forEach(function (config) {
config.modules = config.modules || {};
Object.keys(config.modules).forEach(function (module) {
if (config.modules[module] === true) {
config.modules[module] = {};
}
});
});
var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));
var moduleConfig = moduleNames.reduce(function (config, name) {
var moduleClass = Quill.import('modules/' + name);
if (moduleClass == null) {
debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');
} else {
config[name] = moduleClass.DEFAULTS || {};
}
return config;
}, {});
// Special case toolbar shorthand
if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {
userConfig.modules.toolbar = {
container: userConfig.modules.toolbar
};
}
userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);
['bounds', 'container', 'scrollingContainer'].forEach(function (key) {
if (typeof userConfig[key] === 'string') {
userConfig[key] = document.querySelector(userConfig[key]);
}
});
userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {
if (userConfig.modules[name]) {
config[name] = userConfig.modules[name];
}
return config;
}, {});
return userConfig;
}
// Handle selection preservation and TEXT_CHANGE emission
// common to modification APIs
function modify(modifier, source, index, shift) {
if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {
return new _quillDelta2.default();
}
var range = index == null ? null : this.getSelection();
var oldDelta = this.editor.delta;
var change = modifier();
if (range != null) {
if (index === true) index = range.index;
if (shift == null) {
range = shiftRange(range, change, source);
} else if (shift !== 0) {
range = shiftRange(range, index, shift, source);
}
this.setSelection(range, _emitter4.default.sources.SILENT);
}
if (change.length() > 0) {
var _emitter;
var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
if (source !== _emitter4.default.sources.SILENT) {
var _emitter2;
(_emitter2 = this.emitter).emit.apply(_emitter2, args);
}
}
return change;
}
function overload(index, length, name, value, source) {
var formats = {};
if (typeof index.index === 'number' && typeof index.length === 'number') {
// Allow for throwaway end (used by insertText/insertEmbed)
if (typeof length !== 'number') {
source = value, value = name, name = length, length = index.length, index = index.index;
} else {
length = index.length, index = index.index;
}
} else if (typeof length !== 'number') {
source = value, value = name, name = length, length = 0;
}
// Handle format being object, two format name/value strings or excluded
if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
formats = name;
source = value;
} else if (typeof name === 'string') {
if (value != null) {
formats[name] = value;
} else {
source = name;
}
}
// Handle optional source
source = source || _emitter4.default.sources.API;
return [index, length, formats, source];
}
function shiftRange(range, index, length, source) {
if (range == null) return null;
var start = void 0,
end = void 0;
if (index instanceof _quillDelta2.default) {
var _map = [range.index, range.index + range.length].map(function (pos) {
return index.transformPosition(pos, source !== _emitter4.default.sources.USER);
});
var _map2 = _slicedToArray(_map, 2);
start = _map2[0];
end = _map2[1];
} else {
var _map3 = [range.index, range.index + range.length].map(function (pos) {
if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;
if (length >= 0) {
return pos + length;
} else {
return Math.max(index, pos + length);
}
});
var _map4 = _slicedToArray(_map3, 2);
start = _map4[0];
end = _map4[1];
}
return new _selection.Range(start, end - start);
}
exports.expandConfig = expandConfig;
exports.overload = overload;
exports.default = Quill;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Inline = function (_Parchment$Inline) {
_inherits(Inline, _Parchment$Inline);
function Inline() {
_classCallCheck(this, Inline);
return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));
}
_createClass(Inline, [{
key: 'formatAt',
value: function formatAt(index, length, name, value) {
if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {
var blot = this.isolate(index, length);
if (value) {
blot.wrap(name, value);
}
} else {
_get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);
}
}
}, {
key: 'optimize',
value: function optimize(context) {
_get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);
if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
var parent = this.parent.isolate(this.offset(), this.length());
this.moveChildren(parent);
parent.wrap(this);
}
}
}], [{
key: 'compare',
value: function compare(self, other) {
var selfIndex = Inline.order.indexOf(self);
var otherIndex = Inline.order.indexOf(other);
if (selfIndex >= 0 || otherIndex >= 0) {
return selfIndex - otherIndex;
} else if (self === other) {
return 0;
} else if (self < other) {
return -1;
} else {
return 1;
}
}
}]);
return Inline;
}(_parchment2.default.Inline);
Inline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];
// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
Inline.order = ['cursor', 'inline', // Must be lower
'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher
];
exports.default = Inline;
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var TextBlot = function (_Parchment$Text) {
_inherits(TextBlot, _Parchment$Text);
function TextBlot() {
_classCallCheck(this, TextBlot);
return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));
}
return TextBlot;
}(_parchment2.default.Text);
exports.default = TextBlot;
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _eventemitter = __webpack_require__(54);
var _eventemitter2 = _interopRequireDefault(_eventemitter);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var debug = (0, _logger2.default)('quill:events');
var EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];
EVENTS.forEach(function (eventName) {
document.addEventListener(eventName, function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
[].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {
// TODO use WeakMap
if (node.__quill && node.__quill.emitter) {
var _node$__quill$emitter;
(_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);
}
});
});
});
var Emitter = function (_EventEmitter) {
_inherits(Emitter, _EventEmitter);
function Emitter() {
_classCallCheck(this, Emitter);
var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));
_this.listeners = {};
_this.on('error', debug.error);
return _this;
}
_createClass(Emitter, [{
key: 'emit',
value: function emit() {
debug.log.apply(debug, arguments);
_get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);
}
}, {
key: 'handleDOM',
value: function handleDOM(event) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
(this.listeners[event.type] || []).forEach(function (_ref) {
var node = _ref.node,
handler = _ref.handler;
if (event.target === node || node.contains(event.target)) {
handler.apply(undefined, [event].concat(args));
}
});
}
}, {
key: 'listenDOM',
value: function listenDOM(eventName, node, handler) {
if (!this.listeners[eventName]) {
this.listeners[eventName] = [];
}
this.listeners[eventName].push({ node: node, handler: handler });
}
}]);
return Emitter;
}(_eventemitter2.default);
Emitter.events = {
EDITOR_CHANGE: 'editor-change',
SCROLL_BEFORE_UPDATE: 'scroll-before-update',
SCROLL_OPTIMIZE: 'scroll-optimize',
SCROLL_UPDATE: 'scroll-update',
SELECTION_CHANGE: 'selection-change',
TEXT_CHANGE: 'text-change'
};
Emitter.sources = {
API: 'api',
SILENT: 'silent',
USER: 'user'
};
exports.default = Emitter;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Module = function Module(quill) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Module);
this.quill = quill;
this.options = options;
};
Module.DEFAULTS = {};
exports.default = Module;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var levels = ['error', 'warn', 'log', 'info'];
var level = 'warn';
function debug(method) {
if (levels.indexOf(method) <= levels.indexOf(level)) {
var _console;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
(_console = console)[method].apply(_console, args); // eslint-disable-line no-console
}
}
function namespace(ns) {
return levels.reduce(function (logger, method) {
logger[method] = debug.bind(console, method, ns);
return logger;
}, {});
}
debug.level = namespace.level = function (newLevel) {
level = newLevel;
};
exports.default = namespace;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
var pSlice = Array.prototype.slice;
var objectKeys = __webpack_require__(52);
var isArguments = __webpack_require__(53);
var deepEqual = module.exports = function (actual, expected, opts) {
if (!opts) opts = {};
// 7.1. All identical values are equivalent, as determined by ===.
if (actual === expected) {
return true;
} else if (actual instanceof Date && expected instanceof Date) {
return actual.getTime() === expected.getTime();
// 7.3. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
return opts.strict ? actual === expected : actual == expected;
// 7.4. For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
return objEquiv(actual, expected, opts);
}
}
function isUndefinedOrNull(value) {
return value === null || value === undefined;
}
function isBuffer (x) {
if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
return false;
}
if (x.length > 0 && typeof x[0] !== 'number') return false;
return true;
}
function objEquiv(a, b, opts) {
var i, key;
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) return false;
//~~~I've managed to break Object.keys through screwy arguments passing.
// Converting to array solves the problem.
if (isArguments(a)) {
if (!isArguments(b)) {
return false;
}
a = pSlice.call(a);
b = pSlice.call(b);
return deepEqual(a, b, opts);
}
if (isBuffer(a)) {
if (!isBuffer(b)) {
return false;
}
if (a.length !== b.length) return false;
for (i = 0; i < a.length; i++) {
if (a[i] !== b[i]) return false;
}
return true;
}
try {
var ka = objectKeys(a),
kb = objectKeys(b);
} catch (e) {//happens when one is a string literal and the other isn't
return false;
}
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length != kb.length)
return false;
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i])
return false;
}
//equivalent values for every corresponding key, and
//~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!deepEqual(a[key], b[key], opts)) return false;
}
return typeof a === typeof b;
}
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Registry = __webpack_require__(1);
var Attributor = /** @class */ (function () {
function Attributor(attrName, keyName, options) {
if (options === void 0) { options = {}; }
this.attrName = attrName;
this.keyName = keyName;
var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;
if (options.scope != null) {
// Ignore type bits, force attribute bit
this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;
}
else {
this.scope = Registry.Scope.ATTRIBUTE;
}
if (options.whitelist != null)
this.whitelist = options.whitelist;
}
Attributor.keys = function (node) {
return [].map.call(node.attributes, function (item) {
return item.name;
});
};
Attributor.prototype.add = function (node, value) {
if (!this.canAdd(node, value))
return false;
node.setAttribute(this.keyName, value);
return true;
};
Attributor.prototype.canAdd = function (node, value) {
var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));
if (match == null)
return false;
if (this.whitelist == null)
return true;
if (typeof value === 'string') {
return this.whitelist.indexOf(value.replace(/["']/g, '')) > -1;
}
else {
return this.whitelist.indexOf(value) > -1;
}
};
Attributor.prototype.remove = function (node) {
node.removeAttribute(this.keyName);
};
Attributor.prototype.value = function (node) {
var value = node.getAttribute(this.keyName);
if (this.canAdd(node, value) && value) {
return value;
}
return '';
};
return Attributor;
}());
exports.default = Attributor;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.Code = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Code = function (_Inline) {
_inherits(Code, _Inline);
function Code() {
_classCallCheck(this, Code);
return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));
}
return Code;
}(_inline2.default);
Code.blotName = 'code';
Code.tagName = 'CODE';
var CodeBlock = function (_Block) {
_inherits(CodeBlock, _Block);
function CodeBlock() {
_classCallCheck(this, CodeBlock);
return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));
}
_createClass(CodeBlock, [{
key: 'delta',
value: function delta() {
var _this3 = this;
var text = this.domNode.textContent;
if (text.endsWith('\n')) {
// Should always be true
text = text.slice(0, -1);
}
return text.split('\n').reduce(function (delta, frag) {
return delta.insert(frag).insert('\n', _this3.formats());
}, new _quillDelta2.default());
}
}, {
key: 'format',
value: function format(name, value) {
if (name === this.statics.blotName && value) return;
var _descendant = this.descendant(_text2.default, this.length() - 1),
_descendant2 = _slicedToArray(_descendant, 1),
text = _descendant2[0];
if (text != null) {
text.deleteAt(text.length() - 1, 1);
}
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);
}
}, {
key: 'formatAt',
value: function formatAt(index, length, name, value) {
if (length === 0) return;
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {
return;
}
var nextNewline = this.newlineIndex(index);
if (nextNewline < 0 || nextNewline >= index + length) return;
var prevNewline = this.newlineIndex(index, true) + 1;
var isolateLength = nextNewline - prevNewline + 1;
var blot = this.isolate(prevNewline, isolateLength);
var next = blot.next;
blot.format(name, value);
if (next instanceof CodeBlock) {
next.formatAt(0, index - prevNewline + length - isolateLength, name, value);
}
}
}, {
key: 'insertAt',
value: function insertAt(index, value, def) {
if (def != null) return;
var _descendant3 = this.descendant(_text2.default, index),
_descendant4 = _slicedToArray(_descendant3, 2),
text = _descendant4[0],
offset = _descendant4[1];
text.insertAt(offset, value);
}
}, {
key: 'length',
value: function length() {
var length = this.domNode.textContent.length;
if (!this.domNode.textContent.endsWith('\n')) {
return length + 1;
}
return length;
}
}, {
key: 'newlineIndex',
value: function newlineIndex(searchIndex) {
var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!reverse) {
var offset = this.domNode.textContent.slice(searchIndex).indexOf('\n');
return offset > -1 ? searchIndex + offset : -1;
} else {
return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\n');
}
}
}, {
key: 'optimize',
value: function optimize(context) {
if (!this.domNode.textContent.endsWith('\n')) {
this.appendChild(_parchment2.default.create('text', '\n'));
}
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);
var next = this.next;
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {
next.optimize(context);
next.moveChildren(this);
next.remove();
}
}
}, {
key: 'replace',
value: function replace(target) {
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);
[].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {
var blot = _parchment2.default.find(node);
if (blot == null) {
node.parentNode.removeChild(node);
} else if (blot instanceof _parchment2.default.Embed) {
blot.remove();
} else {
blot.unwrap();
}
});
}
}], [{
key: 'create',
value: function create(value) {
var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);
domNode.setAttribute('spellcheck', false);
return domNode;
}
}, {
key: 'formats',
value: function formats() {
return true;
}
}]);
return CodeBlock;
}(_block2.default);
CodeBlock.blotName = 'code-block';
CodeBlock.tagName = 'PRE';
CodeBlock.TAB = ' ';
exports.Code = Code;
exports.default = CodeBlock;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _op = __webpack_require__(20);
var _op2 = _interopRequireDefault(_op);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _code = __webpack_require__(13);
var _code2 = _interopRequireDefault(_code);
var _cursor = __webpack_require__(24);
var _cursor2 = _interopRequireDefault(_cursor);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
var _break = __webpack_require__(16);
var _break2 = _interopRequireDefault(_break);
var _clone = __webpack_require__(21);
var _clone2 = _interopRequireDefault(_clone);
var _deepEqual = __webpack_require__(11);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ASCII = /^[ -~]*$/;
var Editor = function () {
function Editor(scroll) {
_classCallCheck(this, Editor);
this.scroll = scroll;
this.delta = this.getDelta();
}
_createClass(Editor, [{
key: 'applyDelta',
value: function applyDelta(delta) {
var _this = this;
var consumeNextNewline = false;
this.scroll.update();
var scrollLength = this.scroll.length();
this.scroll.batchStart();
delta = normalizeDelta(delta);
delta.reduce(function (index, op) {
var length = op.retain || op.delete || op.insert.length || 1;
var attributes = op.attributes || {};
if (op.insert != null) {
if (typeof op.insert === 'string') {
var text = op.insert;
if (text.endsWith('\n') && consumeNextNewline) {
consumeNextNewline = false;
text = text.slice(0, -1);
}
if (index >= scrollLength && !text.endsWith('\n')) {
consumeNextNewline = true;
}
_this.scroll.insertAt(index, text);
var _scroll$line = _this.scroll.line(index),
_scroll$line2 = _slicedToArray(_scroll$line, 2),
line = _scroll$line2[0],
offset = _scroll$line2[1];
var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));
if (line instanceof _block2.default) {
var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),
_line$descendant2 = _slicedToArray(_line$descendant, 1),
leaf = _line$descendant2[0];
formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));
}
attributes = _op2.default.attributes.diff(formats, attributes) || {};
} else if (_typeof(op.insert) === 'object') {
var key = Object.keys(op.insert)[0]; // There should only be one key
if (key == null) return index;
_this.scroll.insertAt(index, key, op.insert[key]);
}
scrollLength += length;
}
Object.keys(attributes).forEach(function (name) {
_this.scroll.formatAt(index, length, name, attributes[name]);
});
return index + length;
}, 0);
delta.reduce(function (index, op) {
if (typeof op.delete === 'number') {
_this.scroll.deleteAt(index, op.delete);
return index;
}
return index + (op.retain || op.insert.length || 1);
}, 0);
this.scroll.batchEnd();
return this.update(delta);
}
}, {
key: 'deleteText',
value: function deleteText(index, length) {
this.scroll.deleteAt(index, length);
return this.update(new _quillDelta2.default().retain(index).delete(length));
}
}, {
key: 'formatLine',
value: function formatLine(index, length) {
var _this2 = this;
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
this.scroll.update();
Object.keys(formats).forEach(function (format) {
if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;
var lines = _this2.scroll.lines(index, Math.max(length, 1));
var lengthRemaining = length;
lines.forEach(function (line) {
var lineLength = line.length();
if (!(line instanceof _code2.default)) {
line.format(format, formats[format]);
} else {
var codeIndex = index - line.offset(_this2.scroll);
var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;
line.formatAt(codeIndex, codeLength, format, formats[format]);
}
lengthRemaining -= lineLength;
});
});
this.scroll.optimize();
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
}
}, {
key: 'formatText',
value: function formatText(index, length) {
var _this3 = this;
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
Object.keys(formats).forEach(function (format) {
_this3.scroll.formatAt(index, length, format, formats[format]);
});
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
}
}, {
key: 'getContents',
value: function getContents(index, length) {
return this.delta.slice(index, index + length);
}
}, {
key: 'getDelta',
value: function getDelta() {
return this.scroll.lines().reduce(function (delta, line) {
return delta.concat(line.delta());
}, new _quillDelta2.default());
}
}, {
key: 'getFormat',
value: function getFormat(index) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var lines = [],
leaves = [];
if (length === 0) {
this.scroll.path(index).forEach(function (path) {
var _path = _slicedToArray(path, 1),
blot = _path[0];
if (blot instanceof _block2.default) {
lines.push(blot);
} else if (blot instanceof _parchment2.default.Leaf) {
leaves.push(blot);
}
});
} else {
lines = this.scroll.lines(index, length);
leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);
}
var formatsArr = [lines, leaves].map(function (blots) {
if (blots.length === 0) return {};
var formats = (0, _block.bubbleFormats)(blots.shift());
while (Object.keys(formats).length > 0) {
var blot = blots.shift();
if (blot == null) return formats;
formats = combineFormats((0, _block.bubbleFormats)(blot), formats);
}
return formats;
});
return _extend2.default.apply(_extend2.default, formatsArr);
}
}, {
key: 'getText',
value: function getText(index, length) {
return this.getContents(index, length).filter(function (op) {
return typeof op.insert === 'string';
}).map(function (op) {
return op.insert;
}).join('');
}
}, {
key: 'insertEmbed',
value: function insertEmbed(index, embed, value) {
this.scroll.insertAt(index, embed, value);
return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));
}
}, {
key: 'insertText',
value: function insertText(index, text) {
var _this4 = this;
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
this.scroll.insertAt(index, text);
Object.keys(formats).forEach(function (format) {
_this4.scroll.formatAt(index, text.length, format, formats[format]);
});
return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));
}
}, {
key: 'isBlank',
value: function isBlank() {
if (this.scroll.children.length == 0) return true;
if (this.scroll.children.length > 1) return false;
var block = this.scroll.children.head;
if (block.statics.blotName !== _block2.default.blotName) return false;
if (block.children.length > 1) return false;
return block.children.head instanceof _break2.default;
}
}, {
key: 'removeFormat',
value: function removeFormat(index, length) {
var text = this.getText(index, length);
var _scroll$line3 = this.scroll.line(index + length),
_scroll$line4 = _slicedToArray(_scroll$line3, 2),
line = _scroll$line4[0],
offset = _scroll$line4[1];
var suffixLength = 0,
suffix = new _quillDelta2.default();
if (line != null) {
if (!(line instanceof _code2.default)) {
suffixLength = line.length() - offset;
} else {
suffixLength = line.newlineIndex(offset) - offset + 1;
}
suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\n');
}
var contents = this.getContents(index, length + suffixLength);
var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));
var delta = new _quillDelta2.default().retain(index).concat(diff);
return this.applyDelta(delta);
}
}, {
key: 'update',
value: function update(change) {
var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
var oldDelta = this.delta;
if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {
// Optimization for character changes
var textBlot = _parchment2.default.find(mutations[0].target);
var formats = (0, _block.bubbleFormats)(textBlot);
var index = textBlot.offset(this.scroll);
var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');
var oldText = new _quillDelta2.default().insert(oldValue);
var newText = new _quillDelta2.default().insert(textBlot.value());
var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));
change = diffDelta.reduce(function (delta, op) {
if (op.insert) {
return delta.insert(op.insert, formats);
} else {
return delta.push(op);
}
}, new _quillDelta2.default());
this.delta = oldDelta.compose(change);
} else {
this.delta = this.getDelta();
if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {
change = oldDelta.diff(this.delta, cursorIndex);
}
}
return change;
}
}]);
return Editor;
}();
function combineFormats(formats, combined) {
return Object.keys(combined).reduce(function (merged, name) {
if (formats[name] == null) return merged;
if (combined[name] === formats[name]) {
merged[name] = combined[name];
} else if (Array.isArray(combined[name])) {
if (combined[name].indexOf(formats[name]) < 0) {
merged[name] = combined[name].concat([formats[name]]);
}
} else {
merged[name] = [combined[name], formats[name]];
}
return merged;
}, {});
}
function normalizeDelta(delta) {
return delta.reduce(function (delta, op) {
if (op.insert === 1) {
var attributes = (0, _clone2.default)(op.attributes);
delete attributes['image'];
return delta.insert({ image: op.attributes.image }, attributes);
}
if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {
op = (0, _clone2.default)(op);
if (op.attributes.list) {
op.attributes.list = 'ordered';
} else {
op.attributes.list = 'bullet';
delete op.attributes.bullet;
}
}
if (typeof op.insert === 'string') {
var text = op.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
return delta.insert(text, op.attributes);
}
return delta.push(op);
}, new _quillDelta2.default());
}
exports.default = Editor;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.Range = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _clone = __webpack_require__(21);
var _clone2 = _interopRequireDefault(_clone);
var _deepEqual = __webpack_require__(11);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _emitter3 = __webpack_require__(8);
var _emitter4 = _interopRequireDefault(_emitter3);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(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 Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var debug = (0, _logger2.default)('quill:selection');
var Range = function Range(index) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
_classCallCheck(this, Range);
this.index = index;
this.length = length;
};
var Selection = function () {
function Selection(scroll, emitter) {
var _this = this;
_classCallCheck(this, Selection);
this.emitter = emitter;
this.scroll = scroll;
this.composing = false;
this.mouseDown = false;
this.root = this.scroll.domNode;
this.cursor = _parchment2.default.create('cursor', this);
// savedRange is last non-null range
this.lastRange = this.savedRange = new Range(0, 0);
this.handleComposition();
this.handleDragging();
this.emitter.listenDOM('selectionchange', document, function () {
if (!_this.mouseDown) {
setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);
}
});
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {
if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {
_this.update(_emitter4.default.sources.SILENT);
}
});
this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {
if (!_this.hasFocus()) return;
var native = _this.getNativeRange();
if (native == null) return;
if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle
// TODO unclear if this has negative side effects
_this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {
try {
_this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);
} catch (ignored) {}
});
});
this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {
if (context.range) {
var _context$range = context.range,
startNode = _context$range.startNode,
startOffset = _context$range.startOffset,
endNode = _context$range.endNode,
endOffset = _context$range.endOffset;
_this.setNativeRange(startNode, startOffset, endNode, endOffset);
}
});
this.update(_emitter4.default.sources.SILENT);
}
_createClass(Selection, [{
key: 'handleComposition',
value: function handleComposition() {
var _this2 = this;
this.root.addEventListener('compositionstart', function () {
_this2.composing = true;
});
this.root.addEventListener('compositionend', function () {
_this2.composing = false;
if (_this2.cursor.parent) {
var range = _this2.cursor.restore();
if (!range) return;
setTimeout(function () {
_this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);
}, 1);
}
});
}
}, {
key: 'handleDragging',
value: function handleDragging() {
var _this3 = this;
this.emitter.listenDOM('mousedown', document.body, function () {
_this3.mouseDown = true;
});
this.emitter.listenDOM('mouseup', document.body, function () {
_this3.mouseDown = false;
_this3.update(_emitter4.default.sources.USER);
});
}
}, {
key: 'focus',
value: function focus() {
if (this.hasFocus()) return;
this.root.focus();
this.setRange(this.savedRange);
}
}, {
key: 'format',
value: function format(_format, value) {
if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;
this.scroll.update();
var nativeRange = this.getNativeRange();
if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;
if (nativeRange.start.node !== this.cursor.textNode) {
var blot = _parchment2.default.find(nativeRange.start.node, false);
if (blot == null) return;
// TODO Give blot ability to not split
if (blot instanceof _parchment2.default.Leaf) {
var after = blot.split(nativeRange.start.offset);
blot.parent.insertBefore(this.cursor, after);
} else {
blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen
}
this.cursor.attach();
}
this.cursor.format(_format, value);
this.scroll.optimize();
this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);
this.update();
}
}, {
key: 'getBounds',
value: function getBounds(index) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var scrollLength = this.scroll.length();
index = Math.min(index, scrollLength - 1);
length = Math.min(index + length, scrollLength - 1) - index;
var node = void 0,
_scroll$leaf = this.scroll.leaf(index),
_scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),
leaf = _scroll$leaf2[0],
offset = _scroll$leaf2[1];
if (leaf == null) return null;
var _leaf$position = leaf.position(offset, true);
var _leaf$position2 = _slicedToArray(_leaf$position, 2);
node = _leaf$position2[0];
offset = _leaf$position2[1];
var range = document.createRange();
if (length > 0) {
range.setStart(node, offset);
var _scroll$leaf3 = this.scroll.leaf(index + length);
var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);
leaf = _scroll$leaf4[0];
offset = _scroll$leaf4[1];
if (leaf == null) return null;
var _leaf$position3 = leaf.position(offset, true);
var _leaf$position4 = _slicedToArray(_leaf$position3, 2);
node = _leaf$position4[0];
offset = _leaf$position4[1];
range.setEnd(node, offset);
return range.getBoundingClientRect();
} else {
var side = 'left';
var rect = void 0;
if (node instanceof Text) {
if (offset < node.data.length) {
range.setStart(node, offset);
range.setEnd(node, offset + 1);
} else {
range.setStart(node, offset - 1);
range.setEnd(node, offset);
side = 'right';
}
rect = range.getBoundingClientRect();
} else {
rect = leaf.domNode.getBoundingClientRect();
if (offset > 0) side = 'right';
}
return {
bottom: rect.top + rect.height,
height: rect.height,
left: rect[side],
right: rect[side],
top: rect.top,
width: 0
};
}
}
}, {
key: 'getNativeRange',
value: function getNativeRange() {
var selection = document.getSelection();
if (selection == null || selection.rangeCount <= 0) return null;
var nativeRange = selection.getRangeAt(0);
if (nativeRange == null) return null;
var range = this.normalizeNative(nativeRange);
debug.info('getNativeRange', range);
return range;
}
}, {
key: 'getRange',
value: function getRange() {
var normalized = this.getNativeRange();
if (normalized == null) return [null, null];
var range = this.normalizedToRange(normalized);
return [range, normalized];
}
}, {
key: 'hasFocus',
value: function hasFocus() {
return document.activeElement === this.root;
}
}, {
key: 'normalizedToRange',
value: function normalizedToRange(range) {
var _this4 = this;
var positions = [[range.start.node, range.start.offset]];
if (!range.native.collapsed) {
positions.push([range.end.node, range.end.offset]);
}
var indexes = positions.map(function (position) {
var _position = _slicedToArray(position, 2),
node = _position[0],
offset = _position[1];
var blot = _parchment2.default.find(node, true);
var index = blot.offset(_this4.scroll);
if (offset === 0) {
return index;
} else if (blot instanceof _parchment2.default.Container) {
return index + blot.length();
} else {
return index + blot.index(node, offset);
}
});
var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);
var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));
return new Range(start, end - start);
}
}, {
key: 'normalizeNative',
value: function normalizeNative(nativeRange) {
if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {
return null;
}
var range = {
start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },
end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },
native: nativeRange
};
[range.start, range.end].forEach(function (position) {
var node = position.node,
offset = position.offset;
while (!(node instanceof Text) && node.childNodes.length > 0) {
if (node.childNodes.length > offset) {
node = node.childNodes[offset];
offset = 0;
} else if (node.childNodes.length === offset) {
node = node.lastChild;
offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;
} else {
break;
}
}
position.node = node, position.offset = offset;
});
return range;
}
}, {
key: 'rangeToNative',
value: function rangeToNative(range) {
var _this5 = this;
var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];
var args = [];
var scrollLength = this.scroll.length();
indexes.forEach(function (index, i) {
index = Math.min(scrollLength - 1, index);
var node = void 0,
_scroll$leaf5 = _this5.scroll.leaf(index),
_scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),
leaf = _scroll$leaf6[0],
offset = _scroll$leaf6[1];
var _leaf$position5 = leaf.position(offset, i !== 0);
var _leaf$position6 = _slicedToArray(_leaf$position5, 2);
node = _leaf$position6[0];
offset = _leaf$position6[1];
args.push(node, offset);
});
if (args.length < 2) {
args = args.concat(args);
}
return args;
}
}, {
key: 'scrollIntoView',
value: function scrollIntoView(scrollingContainer) {
var range = this.lastRange;
if (range == null) return;
var bounds = this.getBounds(range.index, range.length);
if (bounds == null) return;
var limit = this.scroll.length() - 1;
var _scroll$line = this.scroll.line(Math.min(range.index, limit)),
_scroll$line2 = _slicedToArray(_scroll$line, 1),
first = _scroll$line2[0];
var last = first;
if (range.length > 0) {
var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));
var _scroll$line4 = _slicedToArray(_scroll$line3, 1);
last = _scroll$line4[0];
}
if (first == null || last == null) return;
var scrollBounds = scrollingContainer.getBoundingClientRect();
if (bounds.top < scrollBounds.top) {
scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;
} else if (bounds.bottom > scrollBounds.bottom) {
scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;
}
}
}, {
key: 'setNativeRange',
value: function setNativeRange(startNode, startOffset) {
var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;
var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;
var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);
if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {
return;
}
var selection = document.getSelection();
if (selection == null) return;
if (startNode != null) {
if (!this.hasFocus()) this.root.focus();
var native = (this.getNativeRange() || {}).native;
if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {
if (startNode.tagName == "BR") {
startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);
startNode = startNode.parentNode;
}
if (endNode.tagName == "BR") {
endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);
endNode = endNode.parentNode;
}
var range = document.createRange();
range.setStart(startNode, startOffset);
range.setEnd(endNode, endOffset);
selection.removeAllRanges();
selection.addRange(range);
}
} else {
selection.removeAllRanges();
this.root.blur();
document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)
}
}
}, {
key: 'setRange',
value: function setRange(range) {
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
if (typeof force === 'string') {
source = force;
force = false;
}
debug.info('setRange', range);
if (range != null) {
var args = this.rangeToNative(range);
this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));
} else {
this.setNativeRange(null);
}
this.update(source);
}
}, {
key: 'update',
value: function update() {
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
var oldRange = this.lastRange;
var _getRange = this.getRange(),
_getRange2 = _slicedToArray(_getRange, 2),
lastRange = _getRange2[0],
nativeRange = _getRange2[1];
this.lastRange = lastRange;
if (this.lastRange != null) {
this.savedRange = this.lastRange;
}
if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {
var _emitter;
if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {
this.cursor.restore();
}
var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
if (source !== _emitter4.default.sources.SILENT) {
var _emitter2;
(_emitter2 = this.emitter).emit.apply(_emitter2, args);
}
}
}
}]);
return Selection;
}();
function contains(parent, descendant) {
try {
// Firefox inserts inaccessible nodes around video elements
descendant.parentNode;
} catch (e) {
return false;
}
// IE11 has bug with Text nodes
// https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect
if (descendant instanceof Text) {
descendant = descendant.parentNode;
}
return parent.contains(descendant);
}
exports.Range = Range;
exports.default = Selection;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Break = function (_Parchment$Embed) {
_inherits(Break, _Parchment$Embed);
function Break() {
_classCallCheck(this, Break);
return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));
}
_createClass(Break, [{
key: 'insertInto',
value: function insertInto(parent, ref) {
if (parent.children.length === 0) {
_get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);
} else {
this.remove();
}
}
}, {
key: 'length',
value: function length() {
return 0;
}
}, {
key: 'value',
value: function value() {
return '';
}
}], [{
key: 'value',
value: function value() {
return undefined;
}
}]);
return Break;
}(_parchment2.default.Embed);
Break.blotName = 'break';
Break.tagName = 'BR';
exports.default = Break;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var linked_list_1 = __webpack_require__(44);
var shadow_1 = __webpack_require__(30);
var Registry = __webpack_require__(1);
var ContainerBlot = /** @class */ (function (_super) {
__extends(ContainerBlot, _super);
function ContainerBlot(domNode) {
var _this = _super.call(this, domNode) || this;
_this.build();
return _this;
}
ContainerBlot.prototype.appendChild = function (other) {
this.insertBefore(other);
};
ContainerBlot.prototype.attach = function () {
_super.prototype.attach.call(this);
this.children.forEach(function (child) {
child.attach();
});
};
ContainerBlot.prototype.build = function () {
var _this = this;
this.children = new linked_list_1.default();
// Need to be reversed for if DOM nodes already in order
[].slice
.call(this.domNode.childNodes)
.reverse()
.forEach(function (node) {
try {
var child = makeBlot(node);
_this.insertBefore(child, _this.children.head || undefined);
}
catch (err) {
if (err instanceof Registry.ParchmentError)
return;
else
throw err;
}
});
};
ContainerBlot.prototype.deleteAt = function (index, length) {
if (index === 0 && length === this.length()) {
return this.remove();
}
this.children.forEachAt(index, length, function (child, offset, length) {
child.deleteAt(offset, length);
});
};
ContainerBlot.prototype.descendant = function (criteria, index) {
var _a = this.children.find(index), child = _a[0], offset = _a[1];
if ((criteria.blotName == null && criteria(child)) ||
(criteria.blotName != null && child instanceof criteria)) {
return [child, offset];
}
else if (child instanceof ContainerBlot) {
return child.descendant(criteria, offset);
}
else {
return [null, -1];
}
};
ContainerBlot.prototype.descendants = function (criteria, index, length) {
if (index === void 0) { index = 0; }
if (length === void 0) { length = Number.MAX_VALUE; }
var descendants = [];
var lengthLeft = length;
this.children.forEachAt(index, length, function (child, index, length) {
if ((criteria.blotName == null && criteria(child)) ||
(criteria.blotName != null && child instanceof criteria)) {
descendants.push(child);
}
if (child instanceof ContainerBlot) {
descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));
}
lengthLeft -= length;
});
return descendants;
};
ContainerBlot.prototype.detach = function () {
this.children.forEach(function (child) {
child.detach();
});
_super.prototype.detach.call(this);
};
ContainerBlot.prototype.formatAt = function (index, length, name, value) {
this.children.forEachAt(index, length, function (child, offset, length) {
child.formatAt(offset, length, name, value);
});
};
ContainerBlot.prototype.insertAt = function (index, value, def) {
var _a = this.children.find(index), child = _a[0], offset = _a[1];
if (child) {
child.insertAt(offset, value, def);
}
else {
var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
this.appendChild(blot);
}
};
ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {
if (this.statics.allowedChildren != null &&
!this.statics.allowedChildren.some(function (child) {
return childBlot instanceof child;
})) {
throw new Registry.ParchmentError("Cannot insert " + childBlot.statics.blotName + " into " + this.statics.blotName);
}
childBlot.insertInto(this, refBlot);
};
ContainerBlot.prototype.length = function () {
return this.children.reduce(function (memo, child) {
return memo + child.length();
}, 0);
};
ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {
this.children.forEach(function (child) {
targetParent.insertBefore(child, refNode);
});
};
ContainerBlot.prototype.optimize = function (context) {
_super.prototype.optimize.call(this, context);
if (this.children.length === 0) {
if (this.statics.defaultChild != null) {
var child = Registry.create(this.statics.defaultChild);
this.appendChild(child);
child.optimize(context);
}
else {
this.remove();
}
}
};
ContainerBlot.prototype.path = function (index, inclusive) {
if (inclusive === void 0) { inclusive = false; }
var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];
var position = [[this, index]];
if (child instanceof ContainerBlot) {
return position.concat(child.path(offset, inclusive));
}
else if (child != null) {
position.push([child, offset]);
}
return position;
};
ContainerBlot.prototype.removeChild = function (child) {
this.children.remove(child);
};
ContainerBlot.prototype.replace = function (target) {
if (target instanceof ContainerBlot) {
target.moveChildren(this);
}
_super.prototype.replace.call(this, target);
};
ContainerBlot.prototype.split = function (index, force) {
if (force === void 0) { force = false; }
if (!force) {
if (index === 0)
return this;
if (index === this.length())
return this.next;
}
var after = this.clone();
this.parent.insertBefore(after, this.next);
this.children.forEachAt(index, this.length(), function (child, offset, length) {
child = child.split(offset, force);
after.appendChild(child);
});
return after;
};
ContainerBlot.prototype.unwrap = function () {
this.moveChildren(this.parent, this.next);
this.remove();
};
ContainerBlot.prototype.update = function (mutations, context) {
var _this = this;
var addedNodes = [];
var removedNodes = [];
mutations.forEach(function (mutation) {
if (mutation.target === _this.domNode && mutation.type === 'childList') {
addedNodes.push.apply(addedNodes, mutation.addedNodes);
removedNodes.push.apply(removedNodes, mutation.removedNodes);
}
});
removedNodes.forEach(function (node) {
// Check node has actually been removed
// One exception is Chrome does not immediately remove IFRAMEs
// from DOM but MutationRecord is correct in its reported removal
if (node.parentNode != null &&
// @ts-ignore
node.tagName !== 'IFRAME' &&
document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
return;
}
var blot = Registry.find(node);
if (blot == null)
return;
if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {
blot.detach();
}
});
addedNodes
.filter(function (node) {
return node.parentNode == _this.domNode;
})
.sort(function (a, b) {
if (a === b)
return 0;
if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {
return 1;
}
return -1;
})
.forEach(function (node) {
var refBlot = null;
if (node.nextSibling != null) {
refBlot = Registry.find(node.nextSibling);
}
var blot = makeBlot(node);
if (blot.next != refBlot || blot.next == null) {
if (blot.parent != null) {
blot.parent.removeChild(_this);
}
_this.insertBefore(blot, refBlot || undefined);
}
});
};
return ContainerBlot;
}(shadow_1.default));
function makeBlot(node) {
var blot = Registry.find(node);
if (blot == null) {
try {
blot = Registry.create(node);
}
catch (e) {
blot = Registry.create(Registry.Scope.INLINE);
[].slice.call(node.childNodes).forEach(function (child) {
// @ts-ignore
blot.domNode.appendChild(child);
});
if (node.parentNode) {
node.parentNode.replaceChild(blot.domNode, node);
}
blot.attach();
}
}
return blot;
}
exports.default = ContainerBlot;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var attributor_1 = __webpack_require__(12);
var store_1 = __webpack_require__(31);
var container_1 = __webpack_require__(17);
var Registry = __webpack_require__(1);
var FormatBlot = /** @class */ (function (_super) {
__extends(FormatBlot, _super);
function FormatBlot(domNode) {
var _this = _super.call(this, domNode) || this;
_this.attributes = new store_1.default(_this.domNode);
return _this;
}
FormatBlot.formats = function (domNode) {
if (typeof this.tagName === 'string') {
return true;
}
else if (Array.isArray(this.tagName)) {
return domNode.tagName.toLowerCase();
}
return undefined;
};
FormatBlot.prototype.format = function (name, value) {
var format = Registry.query(name);
if (format instanceof attributor_1.default) {
this.attributes.attribute(format, value);
}
else if (value) {
if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {
this.replaceWith(name, value);
}
}
};
FormatBlot.prototype.formats = function () {
var formats = this.attributes.values();
var format = this.statics.formats(this.domNode);
if (format != null) {
formats[this.statics.blotName] = format;
}
return formats;
};
FormatBlot.prototype.replaceWith = function (name, value) {
var replacement = _super.prototype.replaceWith.call(this, name, value);
this.attributes.copy(replacement);
return replacement;
};
FormatBlot.prototype.update = function (mutations, context) {
var _this = this;
_super.prototype.update.call(this, mutations, context);
if (mutations.some(function (mutation) {
return mutation.target === _this.domNode && mutation.type === 'attributes';
})) {
this.attributes.build();
}
};
FormatBlot.prototype.wrap = function (name, value) {
var wrapper = _super.prototype.wrap.call(this, name, value);
if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {
this.attributes.move(wrapper);
}
return wrapper;
};
return FormatBlot;
}(container_1.default));
exports.default = FormatBlot;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var shadow_1 = __webpack_require__(30);
var Registry = __webpack_require__(1);
var LeafBlot = /** @class */ (function (_super) {
__extends(LeafBlot, _super);
function LeafBlot() {
return _super !== null && _super.apply(this, arguments) || this;
}
LeafBlot.value = function (domNode) {
return true;
};
LeafBlot.prototype.index = function (node, offset) {
if (this.domNode === node ||
this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
return Math.min(offset, 1);
}
return -1;
};
LeafBlot.prototype.position = function (index, inclusive) {
var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);
if (index > 0)
offset += 1;
return [this.parent.domNode, offset];
};
LeafBlot.prototype.value = function () {
var _a;
return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;
};
LeafBlot.scope = Registry.Scope.INLINE_BLOT;
return LeafBlot;
}(shadow_1.default));
exports.default = LeafBlot;
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
var equal = __webpack_require__(11);
var extend = __webpack_require__(3);
var lib = {
attributes: {
compose: function (a, b, keepNull) {
if (typeof a !== 'object') a = {};
if (typeof b !== 'object') b = {};
var attributes = extend(true, {}, b);
if (!keepNull) {
attributes = Object.keys(attributes).reduce(function (copy, key) {
if (attributes[key] != null) {
copy[key] = attributes[key];
}
return copy;
}, {});
}
for (var key in a) {
if (a[key] !== undefined && b[key] === undefined) {
attributes[key] = a[key];
}
}
return Object.keys(attributes).length > 0 ? attributes : undefined;
},
diff: function(a, b) {
if (typeof a !== 'object') a = {};
if (typeof b !== 'object') b = {};
var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {
if (!equal(a[key], b[key])) {
attributes[key] = b[key] === undefined ? null : b[key];
}
return attributes;
}, {});
return Object.keys(attributes).length > 0 ? attributes : undefined;
},
transform: function (a, b, priority) {
if (typeof a !== 'object') return b;
if (typeof b !== 'object') return undefined;
if (!priority) return b; // b simply overwrites us without priority
var attributes = Object.keys(b).reduce(function (attributes, key) {
if (a[key] === undefined) attributes[key] = b[key]; // null is a valid value
return attributes;
}, {});
return Object.keys(attributes).length > 0 ? attributes : undefined;
}
},
iterator: function (ops) {
return new Iterator(ops);
},
length: function (op) {
if (typeof op['delete'] === 'number') {
return op['delete'];
} else if (typeof op.retain === 'number') {
return op.retain;
} else {
return typeof op.insert === 'string' ? op.insert.length : 1;
}
}
};
function Iterator(ops) {
this.ops = ops;
this.index = 0;
this.offset = 0;
};
Iterator.prototype.hasNext = function () {
return this.peekLength() < Infinity;
};
Iterator.prototype.next = function (length) {
if (!length) length = Infinity;
var nextOp = this.ops[this.index];
if (nextOp) {
var offset = this.offset;
var opLength = lib.length(nextOp)
if (length >= opLength - offset) {
length = opLength - offset;
this.index += 1;
this.offset = 0;
} else {
this.offset += length;
}
if (typeof nextOp['delete'] === 'number') {
return { 'delete': length };
} else {
var retOp = {};
if (nextOp.attributes) {
retOp.attributes = nextOp.attributes;
}
if (typeof nextOp.retain === 'number') {
retOp.retain = length;
} else if (typeof nextOp.insert === 'string') {
retOp.insert = nextOp.insert.substr(offset, length);
} else {
// offset should === 0, length should === 1
retOp.insert = nextOp.insert;
}
return retOp;
}
} else {
return { retain: Infinity };
}
};
Iterator.prototype.peek = function () {
return this.ops[this.index];
};
Iterator.prototype.peekLength = function () {
if (this.ops[this.index]) {
// Should never return 0 if our index is being managed correctly
return lib.length(this.ops[this.index]) - this.offset;
} else {
return Infinity;
}
};
Iterator.prototype.peekType = function () {
if (this.ops[this.index]) {
if (typeof this.ops[this.index]['delete'] === 'number') {
return 'delete';
} else if (typeof this.ops[this.index].retain === 'number') {
return 'retain';
} else {
return 'insert';
}
}
return 'retain';
};
Iterator.prototype.rest = function () {
if (!this.hasNext()) {
return [];
} else if (this.offset === 0) {
return this.ops.slice(this.index);
} else {
var offset = this.offset;
var index = this.index;
var next = this.next();
var rest = this.ops.slice(this.index);
this.offset = offset;
this.index = index;
return [next].concat(rest);
}
};
module.exports = lib;
/***/ }),
/* 21 */
/***/ (function(module, exports) {
var clone = (function() {
'use strict';
function _instanceof(obj, type) {
return type != null && obj instanceof type;
}
var nativeMap;
try {
nativeMap = Map;
} catch(_) {
// maybe a reference error because no `Map`. Give it a dummy value that no
// value will ever be an instanceof.
nativeMap = function() {};
}
var nativeSet;
try {
nativeSet = Set;
} catch(_) {
nativeSet = function() {};
}
var nativePromise;
try {
nativePromise = Promise;
} catch(_) {
nativePromise = function() {};
}
/**
* Clones (copies) an Object using deep copying.
*
* This function supports circular references by default, but if you are certain
* there are no circular references in your object, you can save some CPU time
* by calling clone(obj, false).
*
* Caution: if `circular` is false and `parent` contains circular references,
* your program may enter an infinite loop and crash.
*
* @param `parent` - the object to be cloned
* @param `circular` - set to true if the object to be cloned may contain
* circular references. (optional - true by default)
* @param `depth` - set to a number if the object is only to be cloned to
* a particular depth. (optional - defaults to Infinity)
* @param `prototype` - sets the prototype to be used when cloning an object.
* (optional - defaults to parent prototype).
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
* should be cloned as well. Non-enumerable properties on the prototype
* chain will be ignored. (optional - false by default)
*/
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
if (typeof circular === 'object') {
depth = circular.depth;
prototype = circular.prototype;
includeNonEnumerable = circular.includeNonEnumerable;
circular = circular.circular;
}
// maintain two arrays for circular references, where corresponding parents
// and children have the same index
var allParents = [];
var allChildren = [];
var useBuffer = typeof Buffer != 'undefined';
if (typeof circular == 'undefined')
circular = true;
if (typeof depth == 'undefined')
depth = Infinity;
// recurse this function so we don't reset allParents and allChildren
function _clone(parent, depth) {
// cloning null always returns null
if (parent === null)
return null;
if (depth === 0)
return parent;
var child;
var proto;
if (typeof parent != 'object') {
return parent;
}
if (_instanceof(parent, nativeMap)) {
child = new nativeMap();
} else if (_instanceof(parent, nativeSet)) {
child = new nativeSet();
} else if (_instanceof(parent, nativePromise)) {
child = new nativePromise(function (resolve, reject) {
parent.then(function(value) {
resolve(_clone(value, depth - 1));
}, function(err) {
reject(_clone(err, depth - 1));
});
});
} else if (clone.__isArray(parent)) {
child = [];
} else if (clone.__isRegExp(parent)) {
child = new RegExp(parent.source, __getRegExpFlags(parent));
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
} else if (clone.__isDate(parent)) {
child = new Date(parent.getTime());
} else if (useBuffer && Buffer.isBuffer(parent)) {
if (Buffer.allocUnsafe) {
// Node.js >= 4.5.0
child = Buffer.allocUnsafe(parent.length);
} else {
// Older Node.js versions
child = new Buffer(parent.length);
}
parent.copy(child);
return child;
} else if (_instanceof(parent, Error)) {
child = Object.create(parent);
} else {
if (typeof prototype == 'undefined') {
proto = Object.getPrototypeOf(parent);
child = Object.create(proto);
}
else {
child = Object.create(prototype);
proto = prototype;
}
}
if (circular) {
var index = allParents.indexOf(parent);
if (index != -1) {
return allChildren[index];
}
allParents.push(parent);
allChildren.push(child);
}
if (_instanceof(parent, nativeMap)) {
parent.forEach(function(value, key) {
var keyChild = _clone(key, depth - 1);
var valueChild = _clone(value, depth - 1);
child.set(keyChild, valueChild);
});
}
if (_instanceof(parent, nativeSet)) {
parent.forEach(function(value) {
var entryChild = _clone(value, depth - 1);
child.add(entryChild);
});
}
for (var i in parent) {
var attrs;
if (proto) {
attrs = Object.getOwnPropertyDescriptor(proto, i);
}
if (attrs && attrs.set == null) {
continue;
}
child[i] = _clone(parent[i], depth - 1);
}
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(parent);
for (var i = 0; i < symbols.length; i++) {
// Don't need to worry about cloning a symbol because it is a primitive,
// like a number or string.
var symbol = symbols[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
continue;
}
child[symbol] = _clone(parent[symbol], depth - 1);
if (!descriptor.enumerable) {
Object.defineProperty(child, symbol, {
enumerable: false
});
}
}
}
if (includeNonEnumerable) {
var allPropertyNames = Object.getOwnPropertyNames(parent);
for (var i = 0; i < allPropertyNames.length; i++) {
var propertyName = allPropertyNames[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
if (descriptor && descriptor.enumerable) {
continue;
}
child[propertyName] = _clone(parent[propertyName], depth - 1);
Object.defineProperty(child, propertyName, {
enumerable: false
});
}
}
return child;
}
return _clone(parent, depth);
}
/**
* Simple flat clone using prototype, accepts only objects, usefull for property
* override on FLAT configuration object (no nested props).
*
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
* works.
*/
clone.clonePrototype = function clonePrototype(parent) {
if (parent === null)
return null;
var c = function () {};
c.prototype = parent;
return new c();
};
// private utility functions
function __objToStr(o) {
return Object.prototype.toString.call(o);
}
clone.__objToStr = __objToStr;
function __isDate(o) {
return typeof o === 'object' && __objToStr(o) === '[object Date]';
}
clone.__isDate = __isDate;
function __isArray(o) {
return typeof o === 'object' && __objToStr(o) === '[object Array]';
}
clone.__isArray = __isArray;
function __isRegExp(o) {
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
}
clone.__isRegExp = __isRegExp;
function __getRegExpFlags(re) {
var flags = '';
if (re.global) flags += 'g';
if (re.ignoreCase) flags += 'i';
if (re.multiline) flags += 'm';
return flags;
}
clone.__getRegExpFlags = __getRegExpFlags;
return clone;
})();
if (typeof module === 'object' && module.exports) {
module.exports = clone;
}
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _emitter = __webpack_require__(8);
var _emitter2 = _interopRequireDefault(_emitter);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
var _break = __webpack_require__(16);
var _break2 = _interopRequireDefault(_break);
var _code = __webpack_require__(13);
var _code2 = _interopRequireDefault(_code);
var _container = __webpack_require__(25);
var _container2 = _interopRequireDefault(_container);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function isLine(blot) {
return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;
}
var Scroll = function (_Parchment$Scroll) {
_inherits(Scroll, _Parchment$Scroll);
function Scroll(domNode, config) {
_classCallCheck(this, Scroll);
var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));
_this.emitter = config.emitter;
if (Array.isArray(config.whitelist)) {
_this.whitelist = config.whitelist.reduce(function (whitelist, format) {
whitelist[format] = true;
return whitelist;
}, {});
}
// Some reason fixes composition issues with character languages in Windows/Chrome, Safari
_this.domNode.addEventListener('DOMNodeInserted', function () {});
_this.optimize();
_this.enable();
return _this;
}
_createClass(Scroll, [{
key: 'batchStart',
value: function batchStart() {
this.batch = true;
}
}, {
key: 'batchEnd',
value: function batchEnd() {
this.batch = false;
this.optimize();
}
}, {
key: 'deleteAt',
value: function deleteAt(index, length) {
var _line = this.line(index),
_line2 = _slicedToArray(_line, 2),
first = _line2[0],
offset = _line2[1];
var _line3 = this.line(index + length),
_line4 = _slicedToArray(_line3, 1),
last = _line4[0];
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);
if (last != null && first !== last && offset > 0) {
if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {
this.optimize();
return;
}
if (first instanceof _code2.default) {
var newlineIndex = first.newlineIndex(first.length(), true);
if (newlineIndex > -1) {
first = first.split(newlineIndex + 1);
if (first === last) {
this.optimize();
return;
}
}
} else if (last instanceof _code2.default) {
var _newlineIndex = last.newlineIndex(0);
if (_newlineIndex > -1) {
last.split(_newlineIndex + 1);
}
}
var ref = last.children.head instanceof _break2.default ? null : last.children.head;
first.moveChildren(last, ref);
first.remove();
}
this.optimize();
}
}, {
key: 'enable',
value: function enable() {
var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
this.domNode.setAttribute('contenteditable', enabled);
}
}, {
key: 'formatAt',
value: function formatAt(index, length, format, value) {
if (this.whitelist != null && !this.whitelist[format]) return;
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);
this.optimize();
}
}, {
key: 'insertAt',
value: function insertAt(index, value, def) {
if (def != null && this.whitelist != null && !this.whitelist[value]) return;
if (index >= this.length()) {
if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {
var blot = _parchment2.default.create(this.statics.defaultChild);
this.appendChild(blot);
if (def == null && value.endsWith('\n')) {
value = value.slice(0, -1);
}
blot.insertAt(0, value, def);
} else {
var embed = _parchment2.default.create(value, def);
this.appendChild(embed);
}
} else {
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);
}
this.optimize();
}
}, {
key: 'insertBefore',
value: function insertBefore(blot, ref) {
if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {
var wrapper = _parchment2.default.create(this.statics.defaultChild);
wrapper.appendChild(blot);
blot = wrapper;
}
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);
}
}, {
key: 'leaf',
value: function leaf(index) {
return this.path(index).pop() || [null, -1];
}
}, {
key: 'line',
value: function line(index) {
if (index === this.length()) {
return this.line(index - 1);
}
return this.descendant(isLine, index);
}
}, {
key: 'lines',
value: function lines() {
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
var getLines = function getLines(blot, index, length) {
var lines = [],
lengthLeft = length;
blot.children.forEachAt(index, length, function (child, index, length) {
if (isLine(child)) {
lines.push(child);
} else if (child instanceof _parchment2.default.Container) {
lines = lines.concat(getLines(child, index, lengthLeft));
}
lengthLeft -= length;
});
return lines;
};
return getLines(this, index, length);
}
}, {
key: 'optimize',
value: function optimize() {
var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (this.batch === true) return;
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);
if (mutations.length > 0) {
this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);
}
}
}, {
key: 'path',
value: function path(index) {
return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self
}
}, {
key: 'update',
value: function update(mutations) {
if (this.batch === true) return;
var source = _emitter2.default.sources.USER;
if (typeof mutations === 'string') {
source = mutations;
}
if (!Array.isArray(mutations)) {
mutations = this.observer.takeRecords();
}
if (mutations.length > 0) {
this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);
}
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy
if (mutations.length > 0) {
this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);
}
}
}]);
return Scroll;
}(_parchment2.default.Scroll);
Scroll.blotName = 'scroll';
Scroll.className = 'ql-editor';
Scroll.tagName = 'DIV';
Scroll.defaultChild = 'block';
Scroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];
exports.default = Scroll;
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SHORTKEY = exports.default = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _clone = __webpack_require__(21);
var _clone2 = _interopRequireDefault(_clone);
var _deepEqual = __webpack_require__(11);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _op = __webpack_require__(20);
var _op2 = _interopRequireDefault(_op);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var debug = (0, _logger2.default)('quill:keyboard');
var SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';
var Keyboard = function (_Module) {
_inherits(Keyboard, _Module);
_createClass(Keyboard, null, [{
key: 'match',
value: function match(evt, binding) {
binding = normalize(binding);
if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {
return !!binding[key] !== evt[key] && binding[key] !== null;
})) {
return false;
}
return binding.key === (evt.which || evt.keyCode);
}
}]);
function Keyboard(quill, options) {
_classCallCheck(this, Keyboard);
var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));
_this.bindings = {};
Object.keys(_this.options.bindings).forEach(function (name) {
if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {
return;
}
if (_this.options.bindings[name]) {
_this.addBinding(_this.options.bindings[name]);
}
});
_this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);
_this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});
if (/Firefox/i.test(navigator.userAgent)) {
// Need to handle delete and backspace for Firefox in the general case #1171
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);
} else {
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);
}
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);
_this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);
_this.listen();
return _this;
}
_createClass(Keyboard, [{
key: 'addBinding',
value: function addBinding(key) {
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var binding = normalize(key);
if (binding == null || binding.key == null) {
return debug.warn('Attempted to add invalid keyboard binding', binding);
}
if (typeof context === 'function') {
context = { handler: context };
}
if (typeof handler === 'function') {
handler = { handler: handler };
}
binding = (0, _extend2.default)(binding, context, handler);
this.bindings[binding.key] = this.bindings[binding.key] || [];
this.bindings[binding.key].push(binding);
}
}, {
key: 'listen',
value: function listen() {
var _this2 = this;
this.quill.root.addEventListener('keydown', function (evt) {
if (evt.defaultPrevented) return;
var which = evt.which || evt.keyCode;
var bindings = (_this2.bindings[which] || []).filter(function (binding) {
return Keyboard.match(evt, binding);
});
if (bindings.length === 0) return;
var range = _this2.quill.getSelection();
if (range == null || !_this2.quill.hasFocus()) return;
var _quill$getLine = _this2.quill.getLine(range.index),
_quill$getLine2 = _slicedToArray(_quill$getLine, 2),
line = _quill$getLine2[0],
offset = _quill$getLine2[1];
var _quill$getLeaf = _this2.quill.getLeaf(range.index),
_quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),
leafStart = _quill$getLeaf2[0],
offsetStart = _quill$getLeaf2[1];
var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),
_ref2 = _slicedToArray(_ref, 2),
leafEnd = _ref2[0],
offsetEnd = _ref2[1];
var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';
var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';
var curContext = {
collapsed: range.length === 0,
empty: range.length === 0 && line.length() <= 1,
format: _this2.quill.getFormat(range),
offset: offset,
prefix: prefixText,
suffix: suffixText
};
var prevented = bindings.some(function (binding) {
if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;
if (binding.empty != null && binding.empty !== curContext.empty) return false;
if (binding.offset != null && binding.offset !== curContext.offset) return false;
if (Array.isArray(binding.format)) {
// any format is present
if (binding.format.every(function (name) {
return curContext.format[name] == null;
})) {
return false;
}
} else if (_typeof(binding.format) === 'object') {
// all formats must match
if (!Object.keys(binding.format).every(function (name) {
if (binding.format[name] === true) return curContext.format[name] != null;
if (binding.format[name] === false) return curContext.format[name] == null;
return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);
})) {
return false;
}
}
if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;
if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;
return binding.handler.call(_this2, range, curContext) !== true;
});
if (prevented) {
evt.preventDefault();
}
});
}
}]);
return Keyboard;
}(_module2.default);
Keyboard.keys = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
ESCAPE: 27,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
};
Keyboard.DEFAULTS = {
bindings: {
'bold': makeFormatHandler('bold'),
'italic': makeFormatHandler('italic'),
'underline': makeFormatHandler('underline'),
'indent': {
// highlight tab or tab at beginning of list, indent or blockquote
key: Keyboard.keys.TAB,
format: ['blockquote', 'indent', 'list'],
handler: function handler(range, context) {
if (context.collapsed && context.offset !== 0) return true;
this.quill.format('indent', '+1', _quill2.default.sources.USER);
}
},
'outdent': {
key: Keyboard.keys.TAB,
shiftKey: true,
format: ['blockquote', 'indent', 'list'],
// highlight tab or tab at beginning of list, indent or blockquote
handler: function handler(range, context) {
if (context.collapsed && context.offset !== 0) return true;
this.quill.format('indent', '-1', _quill2.default.sources.USER);
}
},
'outdent backspace': {
key: Keyboard.keys.BACKSPACE,
collapsed: true,
shiftKey: null,
metaKey: null,
ctrlKey: null,
altKey: null,
format: ['indent', 'list'],
offset: 0,
handler: function handler(range, context) {
if (context.format.indent != null) {
this.quill.format('indent', '-1', _quill2.default.sources.USER);
} else if (context.format.list != null) {
this.quill.format('list', false, _quill2.default.sources.USER);
}
}
},
'indent code-block': makeCodeBlockHandler(true),
'outdent code-block': makeCodeBlockHandler(false),
'remove tab': {
key: Keyboard.keys.TAB,
shiftKey: true,
collapsed: true,
prefix: /\t$/,
handler: function handler(range) {
this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);
}
},
'tab': {
key: Keyboard.keys.TAB,
handler: function handler(range) {
this.quill.history.cutoff();
var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\t');
this.quill.updateContents(delta, _quill2.default.sources.USER);
this.quill.history.cutoff();
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
}
},
'list empty enter': {
key: Keyboard.keys.ENTER,
collapsed: true,
format: ['list'],
empty: true,
handler: function handler(range, context) {
this.quill.format('list', false, _quill2.default.sources.USER);
if (context.format.indent) {
this.quill.format('indent', false, _quill2.default.sources.USER);
}
}
},
'checklist enter': {
key: Keyboard.keys.ENTER,
collapsed: true,
format: { list: 'checked' },
handler: function handler(range) {
var _quill$getLine3 = this.quill.getLine(range.index),
_quill$getLine4 = _slicedToArray(_quill$getLine3, 2),
line = _quill$getLine4[0],
offset = _quill$getLine4[1];
var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });
var delta = new _quillDelta2.default().retain(range.index).insert('\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });
this.quill.updateContents(delta, _quill2.default.sources.USER);
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
this.quill.scrollIntoView();
}
},
'header enter': {
key: Keyboard.keys.ENTER,
collapsed: true,
format: ['header'],
suffix: /^$/,
handler: function handler(range, context) {
var _quill$getLine5 = this.quill.getLine(range.index),
_quill$getLine6 = _slicedToArray(_quill$getLine5, 2),
line = _quill$getLine6[0],
offset = _quill$getLine6[1];
var delta = new _quillDelta2.default().retain(range.index).insert('\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });
this.quill.updateContents(delta, _quill2.default.sources.USER);
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
this.quill.scrollIntoView();
}
},
'list autofill': {
key: ' ',
collapsed: true,
format: { list: false },
prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
handler: function handler(range, context) {
var length = context.prefix.length;
var _quill$getLine7 = this.quill.getLine(range.index),
_quill$getLine8 = _slicedToArray(_quill$getLine7, 2),
line = _quill$getLine8[0],
offset = _quill$getLine8[1];
if (offset > length) return true;
var value = void 0;
switch (context.prefix.trim()) {
case '[]':case '[ ]':
value = 'unchecked';
break;
case '[x]':
value = 'checked';
break;
case '-':case '*':
value = 'bullet';
break;
default:
value = 'ordered';
}
this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);
this.quill.history.cutoff();
var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });
this.quill.updateContents(delta, _quill2.default.sources.USER);
this.quill.history.cutoff();
this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);
}
},
'code exit': {
key: Keyboard.keys.ENTER,
collapsed: true,
format: ['code-block'],
prefix: /\n\n$/,
suffix: /^\s+$/,
handler: function handler(range) {
var _quill$getLine9 = this.quill.getLine(range.index),
_quill$getLine10 = _slicedToArray(_quill$getLine9, 2),
line = _quill$getLine10[0],
offset = _quill$getLine10[1];
var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);
this.quill.updateContents(delta, _quill2.default.sources.USER);
}
},
'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),
'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),
'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),
'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)
}
};
function makeEmbedArrowHandler(key, shiftKey) {
var _ref3;
var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';
return _ref3 = {
key: key,
shiftKey: shiftKey,
altKey: null
}, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {
var index = range.index;
if (key === Keyboard.keys.RIGHT) {
index += range.length + 1;
}
var _quill$getLeaf3 = this.quill.getLeaf(index),
_quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),
leaf = _quill$getLeaf4[0];
if (!(leaf instanceof _parchment2.default.Embed)) return true;
if (key === Keyboard.keys.LEFT) {
if (shiftKey) {
this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);
} else {
this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);
}
} else {
if (shiftKey) {
this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);
} else {
this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);
}
}
return false;
}), _ref3;
}
function handleBackspace(range, context) {
if (range.index === 0 || this.quill.getLength() <= 1) return;
var _quill$getLine11 = this.quill.getLine(range.index),
_quill$getLine12 = _slicedToArray(_quill$getLine11, 1),
line = _quill$getLine12[0];
var formats = {};
if (context.offset === 0) {
var _quill$getLine13 = this.quill.getLine(range.index - 1),
_quill$getLine14 = _slicedToArray(_quill$getLine13, 1),
prev = _quill$getLine14[0];
if (prev != null && prev.length() > 1) {
var curFormats = line.formats();
var prevFormats = this.quill.getFormat(range.index - 1, 1);
formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};
}
}
// Check for astral symbols
var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1;
this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);
if (Object.keys(formats).length > 0) {
this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);
}
this.quill.focus();
}
function handleDelete(range, context) {
// Check for astral symbols
var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1;
if (range.index >= this.quill.getLength() - length) return;
var formats = {},
nextLength = 0;
var _quill$getLine15 = this.quill.getLine(range.index),
_quill$getLine16 = _slicedToArray(_quill$getLine15, 1),
line = _quill$getLine16[0];
if (context.offset >= line.length() - 1) {
var _quill$getLine17 = this.quill.getLine(range.index + 1),
_quill$getLine18 = _slicedToArray(_quill$getLine17, 1),
next = _quill$getLine18[0];
if (next) {
var curFormats = line.formats();
var nextFormats = this.quill.getFormat(range.index, 1);
formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};
nextLength = next.length();
}
}
this.quill.deleteText(range.index, length, _quill2.default.sources.USER);
if (Object.keys(formats).length > 0) {
this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);
}
}
function handleDeleteRange(range) {
var lines = this.quill.getLines(range);
var formats = {};
if (lines.length > 1) {
var firstFormats = lines[0].formats();
var lastFormats = lines[lines.length - 1].formats();
formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};
}
this.quill.deleteText(range, _quill2.default.sources.USER);
if (Object.keys(formats).length > 0) {
this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);
}
this.quill.setSelection(range.index, _quill2.default.sources.SILENT);
this.quill.focus();
}
function handleEnter(range, context) {
var _this3 = this;
if (range.length > 0) {
this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change
}
var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {
if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {
lineFormats[format] = context.format[format];
}
return lineFormats;
}, {});
this.quill.insertText(range.index, '\n', lineFormats, _quill2.default.sources.USER);
// Earlier scroll.deleteAt might have messed up our selection,
// so insertText's built in selection preservation is not reliable
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
this.quill.focus();
Object.keys(context.format).forEach(function (name) {
if (lineFormats[name] != null) return;
if (Array.isArray(context.format[name])) return;
if (name === 'link') return;
_this3.quill.format(name, context.format[name], _quill2.default.sources.USER);
});
}
function makeCodeBlockHandler(indent) {
return {
key: Keyboard.keys.TAB,
shiftKey: !indent,
format: { 'code-block': true },
handler: function handler(range) {
var CodeBlock = _parchment2.default.query('code-block');
var index = range.index,
length = range.length;
var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),
_quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
block = _quill$scroll$descend2[0],
offset = _quill$scroll$descend2[1];
if (block == null) return;
var scrollIndex = this.quill.getIndex(block);
var start = block.newlineIndex(offset, true) + 1;
var end = block.newlineIndex(scrollIndex + offset + length);
var lines = block.domNode.textContent.slice(start, end).split('\n');
offset = 0;
lines.forEach(function (line, i) {
if (indent) {
block.insertAt(start + offset, CodeBlock.TAB);
offset += CodeBlock.TAB.length;
if (i === 0) {
index += CodeBlock.TAB.length;
} else {
length += CodeBlock.TAB.length;
}
} else if (line.startsWith(CodeBlock.TAB)) {
block.deleteAt(start + offset, CodeBlock.TAB.length);
offset -= CodeBlock.TAB.length;
if (i === 0) {
index -= CodeBlock.TAB.length;
} else {
length -= CodeBlock.TAB.length;
}
}
offset += line.length + 1;
});
this.quill.update(_quill2.default.sources.USER);
this.quill.setSelection(index, length, _quill2.default.sources.SILENT);
}
};
}
function makeFormatHandler(format) {
return {
key: format[0].toUpperCase(),
shortKey: true,
handler: function handler(range, context) {
this.quill.format(format, !context.format[format], _quill2.default.sources.USER);
}
};
}
function normalize(binding) {
if (typeof binding === 'string' || typeof binding === 'number') {
return normalize({ key: binding });
}
if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {
binding = (0, _clone2.default)(binding, false);
}
if (typeof binding.key === 'string') {
if (Keyboard.keys[binding.key.toUpperCase()] != null) {
binding.key = Keyboard.keys[binding.key.toUpperCase()];
} else if (binding.key.length === 1) {
binding.key = binding.key.toUpperCase().charCodeAt(0);
} else {
return null;
}
}
if (binding.shortKey) {
binding[SHORTKEY] = binding.shortKey;
delete binding.shortKey;
}
return binding;
}
exports.default = Keyboard;
exports.SHORTKEY = SHORTKEY;
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Cursor = function (_Parchment$Embed) {
_inherits(Cursor, _Parchment$Embed);
_createClass(Cursor, null, [{
key: 'value',
value: function value() {
return undefined;
}
}]);
function Cursor(domNode, selection) {
_classCallCheck(this, Cursor);
var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));
_this.selection = selection;
_this.textNode = document.createTextNode(Cursor.CONTENTS);
_this.domNode.appendChild(_this.textNode);
_this._length = 0;
return _this;
}
_createClass(Cursor, [{
key: 'detach',
value: function detach() {
// super.detach() will also clear domNode.__blot
if (this.parent != null) this.parent.removeChild(this);
}
}, {
key: 'format',
value: function format(name, value) {
if (this._length !== 0) {
return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);
}
var target = this,
index = 0;
while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {
index += target.offset(target.parent);
target = target.parent;
}
if (target != null) {
this._length = Cursor.CONTENTS.length;
target.optimize();
target.formatAt(index, Cursor.CONTENTS.length, name, value);
this._length = 0;
}
}
}, {
key: 'index',
value: function index(node, offset) {
if (node === this.textNode) return 0;
return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);
}
}, {
key: 'length',
value: function length() {
return this._length;
}
}, {
key: 'position',
value: function position() {
return [this.textNode, this.textNode.data.length];
}
}, {
key: 'remove',
value: function remove() {
_get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);
this.parent = null;
}
}, {
key: 'restore',
value: function restore() {
if (this.selection.composing || this.parent == null) return;
var textNode = this.textNode;
var range = this.selection.getNativeRange();
var restoreText = void 0,
start = void 0,
end = void 0;
if (range != null && range.start.node === textNode && range.end.node === textNode) {
var _ref = [textNode, range.start.offset, range.end.offset];
restoreText = _ref[0];
start = _ref[1];
end = _ref[2];
}
// Link format will insert text outside of anchor tag
while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
}
if (this.textNode.data !== Cursor.CONTENTS) {
var text = this.textNode.data.split(Cursor.CONTENTS).join('');
if (this.next instanceof _text2.default) {
restoreText = this.next.domNode;
this.next.insertAt(0, text);
this.textNode.data = Cursor.CONTENTS;
} else {
this.textNode.data = text;
this.parent.insertBefore(_parchment2.default.create(this.textNode), this);
this.textNode = document.createTextNode(Cursor.CONTENTS);
this.domNode.appendChild(this.textNode);
}
}
this.remove();
if (start != null) {
var _map = [start, end].map(function (offset) {
return Math.max(0, Math.min(restoreText.data.length, offset - 1));
});
var _map2 = _slicedToArray(_map, 2);
start = _map2[0];
end = _map2[1];
return {
startNode: restoreText,
startOffset: start,
endNode: restoreText,
endOffset: end
};
}
}
}, {
key: 'update',
value: function update(mutations, context) {
var _this2 = this;
if (mutations.some(function (mutation) {
return mutation.type === 'characterData' && mutation.target === _this2.textNode;
})) {
var range = this.restore();
if (range) context.range = range;
}
}
}, {
key: 'value',
value: function value() {
return '';
}
}]);
return Cursor;
}(_parchment2.default.Embed);
Cursor.blotName = 'cursor';
Cursor.className = 'ql-cursor';
Cursor.tagName = 'span';
Cursor.CONTENTS = '\uFEFF'; // Zero width no break space
exports.default = Cursor;
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Container = function (_Parchment$Container) {
_inherits(Container, _Parchment$Container);
function Container() {
_classCallCheck(this, Container);
return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));
}
return Container;
}(_parchment2.default.Container);
Container.allowedChildren = [_block2.default, _block.BlockEmbed, Container];
exports.default = Container;
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ColorAttributor = function (_Parchment$Attributor) {
_inherits(ColorAttributor, _Parchment$Attributor);
function ColorAttributor() {
_classCallCheck(this, ColorAttributor);
return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));
}
_createClass(ColorAttributor, [{
key: 'value',
value: function value(domNode) {
var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);
if (!value.startsWith('rgb(')) return value;
value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '');
return '#' + value.split(',').map(function (component) {
return ('00' + parseInt(component).toString(16)).slice(-2);
}).join('');
}
}]);
return ColorAttributor;
}(_parchment2.default.Attributor.Style);
var ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {
scope: _parchment2.default.Scope.INLINE
});
var ColorStyle = new ColorAttributor('color', 'color', {
scope: _parchment2.default.Scope.INLINE
});
exports.ColorAttributor = ColorAttributor;
exports.ColorClass = ColorClass;
exports.ColorStyle = ColorStyle;
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.sanitize = exports.default = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Link = function (_Inline) {
_inherits(Link, _Inline);
function Link() {
_classCallCheck(this, Link);
return _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).apply(this, arguments));
}
_createClass(Link, [{
key: 'format',
value: function format(name, value) {
if (name !== this.statics.blotName || !value) return _get(Link.prototype.__proto__ || Object.getPrototypeOf(Link.prototype), 'format', this).call(this, name, value);
value = this.constructor.sanitize(value);
this.domNode.setAttribute('href', value);
}
}], [{
key: 'create',
value: function create(value) {
var node = _get(Link.__proto__ || Object.getPrototypeOf(Link), 'create', this).call(this, value);
value = this.sanitize(value);
node.setAttribute('href', value);
node.setAttribute('rel', 'noopener noreferrer');
node.setAttribute('target', '_blank');
return node;
}
}, {
key: 'formats',
value: function formats(domNode) {
return domNode.getAttribute('href');
}
}, {
key: 'sanitize',
value: function sanitize(url) {
return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
}
}]);
return Link;
}(_inline2.default);
Link.blotName = 'link';
Link.tagName = 'A';
Link.SANITIZED_URL = 'about:blank';
Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];
function _sanitize(url, protocols) {
var anchor = document.createElement('a');
anchor.href = url;
var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));
return protocols.indexOf(protocol) > -1;
}
exports.default = Link;
exports.sanitize = _sanitize;
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _keyboard = __webpack_require__(23);
var _keyboard2 = _interopRequireDefault(_keyboard);
var _dropdown = __webpack_require__(107);
var _dropdown2 = _interopRequireDefault(_dropdown);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var optionsCounter = 0;
function toggleAriaAttribute(element, attribute) {
element.setAttribute(attribute, !(element.getAttribute(attribute) === 'true'));
}
var Picker = function () {
function Picker(select) {
var _this = this;
_classCallCheck(this, Picker);
this.select = select;
this.container = document.createElement('span');
this.buildPicker();
this.select.style.display = 'none';
this.select.parentNode.insertBefore(this.container, this.select);
this.label.addEventListener('mousedown', function () {
_this.togglePicker();
});
this.label.addEventListener('keydown', function (event) {
switch (event.keyCode) {
// Allows the "Enter" key to open the picker
case _keyboard2.default.keys.ENTER:
_this.togglePicker();
break;
// Allows the "Escape" key to close the picker
case _keyboard2.default.keys.ESCAPE:
_this.escape();
event.preventDefault();
break;
default:
}
});
this.select.addEventListener('change', this.update.bind(this));
}
_createClass(Picker, [{
key: 'togglePicker',
value: function togglePicker() {
this.container.classList.toggle('ql-expanded');
// Toggle aria-expanded and aria-hidden to make the picker accessible
toggleAriaAttribute(this.label, 'aria-expanded');
toggleAriaAttribute(this.options, 'aria-hidden');
}
}, {
key: 'buildItem',
value: function buildItem(option) {
var _this2 = this;
var item = document.createElement('span');
item.tabIndex = '0';
item.setAttribute('role', 'button');
item.classList.add('ql-picker-item');
if (option.hasAttribute('value')) {
item.setAttribute('data-value', option.getAttribute('value'));
}
if (option.textContent) {
item.setAttribute('data-label', option.textContent);
}
item.addEventListener('click', function () {
_this2.selectItem(item, true);
});
item.addEventListener('keydown', function (event) {
switch (event.keyCode) {
// Allows the "Enter" key to select an item
case _keyboard2.default.keys.ENTER:
_this2.selectItem(item, true);
event.preventDefault();
break;
// Allows the "Escape" key to close the picker
case _keyboard2.default.keys.ESCAPE:
_this2.escape();
event.preventDefault();
break;
default:
}
});
return item;
}
}, {
key: 'buildLabel',
value: function buildLabel() {
var label = document.createElement('span');
label.classList.add('ql-picker-label');
label.innerHTML = _dropdown2.default;
label.tabIndex = '0';
label.setAttribute('role', 'button');
label.setAttribute('aria-expanded', 'false');
this.container.appendChild(label);
return label;
}
}, {
key: 'buildOptions',
value: function buildOptions() {
var _this3 = this;
var options = document.createElement('span');
options.classList.add('ql-picker-options');
// Don't want screen readers to read this until options are visible
options.setAttribute('aria-hidden', 'true');
options.tabIndex = '-1';
// Need a unique id for aria-controls
options.id = 'ql-picker-options-' + optionsCounter;
optionsCounter += 1;
this.label.setAttribute('aria-controls', options.id);
this.options = options;
[].slice.call(this.select.options).forEach(function (option) {
var item = _this3.buildItem(option);
options.appendChild(item);
if (option.selected === true) {
_this3.selectItem(item);
}
});
this.container.appendChild(options);
}
}, {
key: 'buildPicker',
value: function buildPicker() {
var _this4 = this;
[].slice.call(this.select.attributes).forEach(function (item) {
_this4.container.setAttribute(item.name, item.value);
});
this.container.classList.add('ql-picker');
this.label = this.buildLabel();
this.buildOptions();
}
}, {
key: 'escape',
value: function escape() {
var _this5 = this;
// Close menu and return focus to trigger label
this.close();
// Need setTimeout for accessibility to ensure that the browser executes
// focus on the next process thread and after any DOM content changes
setTimeout(function () {
return _this5.label.focus();
}, 1);
}
}, {
key: 'close',
value: function close() {
this.container.classList.remove('ql-expanded');
this.label.setAttribute('aria-expanded', 'false');
this.options.setAttribute('aria-hidden', 'true');
}
}, {
key: 'selectItem',
value: function selectItem(item) {
var trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var selected = this.container.querySelector('.ql-selected');
if (item === selected) return;
if (selected != null) {
selected.classList.remove('ql-selected');
}
if (item == null) return;
item.classList.add('ql-selected');
this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item);
if (item.hasAttribute('data-value')) {
this.label.setAttribute('data-value', item.getAttribute('data-value'));
} else {
this.label.removeAttribute('data-value');
}
if (item.hasAttribute('data-label')) {
this.label.setAttribute('data-label', item.getAttribute('data-label'));
} else {
this.label.removeAttribute('data-label');
}
if (trigger) {
if (typeof Event === 'function') {
this.select.dispatchEvent(new Event('change'));
} else if ((typeof Event === 'undefined' ? 'undefined' : _typeof(Event)) === 'object') {
// IE11
var event = document.createEvent('Event');
event.initEvent('change', true, true);
this.select.dispatchEvent(event);
}
this.close();
}
}
}, {
key: 'update',
value: function update() {
var option = void 0;
if (this.select.selectedIndex > -1) {
var item = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
option = this.select.options[this.select.selectedIndex];
this.selectItem(item);
} else {
this.selectItem(null);
}
var isActive = option != null && option !== this.select.querySelector('option[selected]');
this.label.classList.toggle('ql-active', isActive);
}
}]);
return Picker;
}();
exports.default = Picker;
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
var _break = __webpack_require__(16);
var _break2 = _interopRequireDefault(_break);
var _container = __webpack_require__(25);
var _container2 = _interopRequireDefault(_container);
var _cursor = __webpack_require__(24);
var _cursor2 = _interopRequireDefault(_cursor);
var _embed = __webpack_require__(35);
var _embed2 = _interopRequireDefault(_embed);
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
var _scroll = __webpack_require__(22);
var _scroll2 = _interopRequireDefault(_scroll);
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
var _clipboard = __webpack_require__(55);
var _clipboard2 = _interopRequireDefault(_clipboard);
var _history = __webpack_require__(42);
var _history2 = _interopRequireDefault(_history);
var _keyboard = __webpack_require__(23);
var _keyboard2 = _interopRequireDefault(_keyboard);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_quill2.default.register({
'blots/block': _block2.default,
'blots/block/embed': _block.BlockEmbed,
'blots/break': _break2.default,
'blots/container': _container2.default,
'blots/cursor': _cursor2.default,
'blots/embed': _embed2.default,
'blots/inline': _inline2.default,
'blots/scroll': _scroll2.default,
'blots/text': _text2.default,
'modules/clipboard': _clipboard2.default,
'modules/history': _history2.default,
'modules/keyboard': _keyboard2.default
});
_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);
exports.default = _quill2.default;
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Registry = __webpack_require__(1);
var ShadowBlot = /** @class */ (function () {
function ShadowBlot(domNode) {
this.domNode = domNode;
// @ts-ignore
this.domNode[Registry.DATA_KEY] = { blot: this };
}
Object.defineProperty(ShadowBlot.prototype, "statics", {
// Hack for accessing inherited static methods
get: function () {
return this.constructor;
},
enumerable: true,
configurable: true
});
ShadowBlot.create = function (value) {
if (this.tagName == null) {
throw new Registry.ParchmentError('Blot definition missing tagName');
}
var node;
if (Array.isArray(this.tagName)) {
if (typeof value === 'string') {
value = value.toUpperCase();
if (parseInt(value).toString() === value) {
value = parseInt(value);
}
}
if (typeof value === 'number') {
node = document.createElement(this.tagName[value - 1]);
}
else if (this.tagName.indexOf(value) > -1) {
node = document.createElement(value);
}
else {
node = document.createElement(this.tagName[0]);
}
}
else {
node = document.createElement(this.tagName);
}
if (this.className) {
node.classList.add(this.className);
}
return node;
};
ShadowBlot.prototype.attach = function () {
if (this.parent != null) {
this.scroll = this.parent.scroll;
}
};
ShadowBlot.prototype.clone = function () {
var domNode = this.domNode.cloneNode(false);
return Registry.create(domNode);
};
ShadowBlot.prototype.detach = function () {
if (this.parent != null)
this.parent.removeChild(this);
// @ts-ignore
delete this.domNode[Registry.DATA_KEY];
};
ShadowBlot.prototype.deleteAt = function (index, length) {
var blot = this.isolate(index, length);
blot.remove();
};
ShadowBlot.prototype.formatAt = function (index, length, name, value) {
var blot = this.isolate(index, length);
if (Registry.query(name, Registry.Scope.BLOT) != null && value) {
blot.wrap(name, value);
}
else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {
var parent = Registry.create(this.statics.scope);
blot.wrap(parent);
parent.format(name, value);
}
};
ShadowBlot.prototype.insertAt = function (index, value, def) {
var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
var ref = this.split(index);
this.parent.insertBefore(blot, ref);
};
ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {
if (refBlot === void 0) { refBlot = null; }
if (this.parent != null) {
this.parent.children.remove(this);
}
var refDomNode = null;
parentBlot.children.insertBefore(this, refBlot);
if (refBlot != null) {
refDomNode = refBlot.domNode;
}
if (this.domNode.parentNode != parentBlot.domNode ||
this.domNode.nextSibling != refDomNode) {
parentBlot.domNode.insertBefore(this.domNode, refDomNode);
}
this.parent = parentBlot;
this.attach();
};
ShadowBlot.prototype.isolate = function (index, length) {
var target = this.split(index);
target.split(length);
return target;
};
ShadowBlot.prototype.length = function () {
return 1;
};
ShadowBlot.prototype.offset = function (root) {
if (root === void 0) { root = this.parent; }
if (this.parent == null || this == root)
return 0;
return this.parent.children.offset(this) + this.parent.offset(root);
};
ShadowBlot.prototype.optimize = function (context) {
// TODO clean up once we use WeakMap
// @ts-ignore
if (this.domNode[Registry.DATA_KEY] != null) {
// @ts-ignore
delete this.domNode[Registry.DATA_KEY].mutations;
}
};
ShadowBlot.prototype.remove = function () {
if (this.domNode.parentNode != null) {
this.domNode.parentNode.removeChild(this.domNode);
}
this.detach();
};
ShadowBlot.prototype.replace = function (target) {
if (target.parent == null)
return;
target.parent.insertBefore(this, target.next);
target.remove();
};
ShadowBlot.prototype.replaceWith = function (name, value) {
var replacement = typeof name === 'string' ? Registry.create(name, value) : name;
replacement.replace(this);
return replacement;
};
ShadowBlot.prototype.split = function (index, force) {
return index === 0 ? this : this.next;
};
ShadowBlot.prototype.update = function (mutations, context) {
// Nothing to do by default
};
ShadowBlot.prototype.wrap = function (name, value) {
var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;
if (this.parent != null) {
this.parent.insertBefore(wrapper, this.next);
}
wrapper.appendChild(this);
return wrapper;
};
ShadowBlot.blotName = 'abstract';
return ShadowBlot;
}());
exports.default = ShadowBlot;
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var attributor_1 = __webpack_require__(12);
var class_1 = __webpack_require__(32);
var style_1 = __webpack_require__(33);
var Registry = __webpack_require__(1);
var AttributorStore = /** @class */ (function () {
function AttributorStore(domNode) {
this.attributes = {};
this.domNode = domNode;
this.build();
}
AttributorStore.prototype.attribute = function (attribute, value) {
// verb
if (value) {
if (attribute.add(this.domNode, value)) {
if (attribute.value(this.domNode) != null) {
this.attributes[attribute.attrName] = attribute;
}
else {
delete this.attributes[attribute.attrName];
}
}
}
else {
attribute.remove(this.domNode);
delete this.attributes[attribute.attrName];
}
};
AttributorStore.prototype.build = function () {
var _this = this;
this.attributes = {};
var attributes = attributor_1.default.keys(this.domNode);
var classes = class_1.default.keys(this.domNode);
var styles = style_1.default.keys(this.domNode);
attributes
.concat(classes)
.concat(styles)
.forEach(function (name) {
var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);
if (attr instanceof attributor_1.default) {
_this.attributes[attr.attrName] = attr;
}
});
};
AttributorStore.prototype.copy = function (target) {
var _this = this;
Object.keys(this.attributes).forEach(function (key) {
var value = _this.attributes[key].value(_this.domNode);
target.format(key, value);
});
};
AttributorStore.prototype.move = function (target) {
var _this = this;
this.copy(target);
Object.keys(this.attributes).forEach(function (key) {
_this.attributes[key].remove(_this.domNode);
});
this.attributes = {};
};
AttributorStore.prototype.values = function () {
var _this = this;
return Object.keys(this.attributes).reduce(function (attributes, name) {
attributes[name] = _this.attributes[name].value(_this.domNode);
return attributes;
}, {});
};
return AttributorStore;
}());
exports.default = AttributorStore;
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var attributor_1 = __webpack_require__(12);
function match(node, prefix) {
var className = node.getAttribute('class') || '';
return className.split(/\s+/).filter(function (name) {
return name.indexOf(prefix + "-") === 0;
});
}
var ClassAttributor = /** @class */ (function (_super) {
__extends(ClassAttributor, _super);
function ClassAttributor() {
return _super !== null && _super.apply(this, arguments) || this;
}
ClassAttributor.keys = function (node) {
return (node.getAttribute('class') || '').split(/\s+/).map(function (name) {
return name
.split('-')
.slice(0, -1)
.join('-');
});
};
ClassAttributor.prototype.add = function (node, value) {
if (!this.canAdd(node, value))
return false;
this.remove(node);
node.classList.add(this.keyName + "-" + value);
return true;
};
ClassAttributor.prototype.remove = function (node) {
var matches = match(node, this.keyName);
matches.forEach(function (name) {
node.classList.remove(name);
});
if (node.classList.length === 0) {
node.removeAttribute('class');
}
};
ClassAttributor.prototype.value = function (node) {
var result = match(node, this.keyName)[0] || '';
var value = result.slice(this.keyName.length + 1); // +1 for hyphen
return this.canAdd(node, value) ? value : '';
};
return ClassAttributor;
}(attributor_1.default));
exports.default = ClassAttributor;
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var attributor_1 = __webpack_require__(12);
function camelize(name) {
var parts = name.split('-');
var rest = parts
.slice(1)
.map(function (part) {
return part[0].toUpperCase() + part.slice(1);
})
.join('');
return parts[0] + rest;
}
var StyleAttributor = /** @class */ (function (_super) {
__extends(StyleAttributor, _super);
function StyleAttributor() {
return _super !== null && _super.apply(this, arguments) || this;
}
StyleAttributor.keys = function (node) {
return (node.getAttribute('style') || '').split(';').map(function (value) {
var arr = value.split(':');
return arr[0].trim();
});
};
StyleAttributor.prototype.add = function (node, value) {
if (!this.canAdd(node, value))
return false;
// @ts-ignore
node.style[camelize(this.keyName)] = value;
return true;
};
StyleAttributor.prototype.remove = function (node) {
// @ts-ignore
node.style[camelize(this.keyName)] = '';
if (!node.getAttribute('style')) {
node.removeAttribute('style');
}
};
StyleAttributor.prototype.value = function (node) {
// @ts-ignore
var value = node.style[camelize(this.keyName)];
return this.canAdd(node, value) ? value : '';
};
return StyleAttributor;
}(attributor_1.default));
exports.default = StyleAttributor;
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Theme = function () {
function Theme(quill, options) {
_classCallCheck(this, Theme);
this.quill = quill;
this.options = options;
this.modules = {};
}
_createClass(Theme, [{
key: 'init',
value: function init() {
var _this = this;
Object.keys(this.options.modules).forEach(function (name) {
if (_this.modules[name] == null) {
_this.addModule(name);
}
});
}
}, {
key: 'addModule',
value: function addModule(name) {
var moduleClass = this.quill.constructor.import('modules/' + name);
this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});
return this.modules[name];
}
}]);
return Theme;
}();
Theme.DEFAULTS = {
modules: {}
};
Theme.themes = {
'default': Theme
};
exports.default = Theme;
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _text = __webpack_require__(7);
var _text2 = _interopRequireDefault(_text);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var GUARD_TEXT = '\uFEFF';
var Embed = function (_Parchment$Embed) {
_inherits(Embed, _Parchment$Embed);
function Embed(node) {
_classCallCheck(this, Embed);
var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));
_this.contentNode = document.createElement('span');
_this.contentNode.setAttribute('contenteditable', false);
[].slice.call(_this.domNode.childNodes).forEach(function (childNode) {
_this.contentNode.appendChild(childNode);
});
_this.leftGuard = document.createTextNode(GUARD_TEXT);
_this.rightGuard = document.createTextNode(GUARD_TEXT);
_this.domNode.appendChild(_this.leftGuard);
_this.domNode.appendChild(_this.contentNode);
_this.domNode.appendChild(_this.rightGuard);
return _this;
}
_createClass(Embed, [{
key: 'index',
value: function index(node, offset) {
if (node === this.leftGuard) return 0;
if (node === this.rightGuard) return 1;
return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);
}
}, {
key: 'restore',
value: function restore(node) {
var range = void 0,
textNode = void 0;
var text = node.data.split(GUARD_TEXT).join('');
if (node === this.leftGuard) {
if (this.prev instanceof _text2.default) {
var prevLength = this.prev.length();
this.prev.insertAt(prevLength, text);
range = {
startNode: this.prev.domNode,
startOffset: prevLength + text.length
};
} else {
textNode = document.createTextNode(text);
this.parent.insertBefore(_parchment2.default.create(textNode), this);
range = {
startNode: textNode,
startOffset: text.length
};
}
} else if (node === this.rightGuard) {
if (this.next instanceof _text2.default) {
this.next.insertAt(0, text);
range = {
startNode: this.next.domNode,
startOffset: text.length
};
} else {
textNode = document.createTextNode(text);
this.parent.insertBefore(_parchment2.default.create(textNode), this.next);
range = {
startNode: textNode,
startOffset: text.length
};
}
}
node.data = GUARD_TEXT;
return range;
}
}, {
key: 'update',
value: function update(mutations, context) {
var _this2 = this;
mutations.forEach(function (mutation) {
if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {
var range = _this2.restore(mutation.target);
if (range) context.range = range;
}
});
}
}]);
return Embed;
}(_parchment2.default.Embed);
exports.default = Embed;
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var config = {
scope: _parchment2.default.Scope.BLOCK,
whitelist: ['right', 'center', 'justify']
};
var AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);
var AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);
var AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);
exports.AlignAttribute = AlignAttribute;
exports.AlignClass = AlignClass;
exports.AlignStyle = AlignStyle;
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BackgroundStyle = exports.BackgroundClass = undefined;
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _color = __webpack_require__(26);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {
scope: _parchment2.default.Scope.INLINE
});
var BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {
scope: _parchment2.default.Scope.INLINE
});
exports.BackgroundClass = BackgroundClass;
exports.BackgroundStyle = BackgroundStyle;
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var config = {
scope: _parchment2.default.Scope.BLOCK,
whitelist: ['rtl']
};
var DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);
var DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);
var DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);
exports.DirectionAttribute = DirectionAttribute;
exports.DirectionClass = DirectionClass;
exports.DirectionStyle = DirectionStyle;
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FontClass = exports.FontStyle = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var config = {
scope: _parchment2.default.Scope.INLINE,
whitelist: ['serif', 'monospace']
};
var FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);
var FontStyleAttributor = function (_Parchment$Attributor) {
_inherits(FontStyleAttributor, _Parchment$Attributor);
function FontStyleAttributor() {
_classCallCheck(this, FontStyleAttributor);
return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));
}
_createClass(FontStyleAttributor, [{
key: 'value',
value: function value(node) {
return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/["']/g, '');
}
}]);
return FontStyleAttributor;
}(_parchment2.default.Attributor.Style);
var FontStyle = new FontStyleAttributor('font', 'font-family', config);
exports.FontStyle = FontStyle;
exports.FontClass = FontClass;
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SizeStyle = exports.SizeClass = undefined;
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {
scope: _parchment2.default.Scope.INLINE,
whitelist: ['small', 'large', 'huge']
});
var SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {
scope: _parchment2.default.Scope.INLINE,
whitelist: ['10px', '18px', '32px']
});
exports.SizeClass = SizeClass;
exports.SizeStyle = SizeStyle;
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {
'align': {
'': __webpack_require__(76),
'center': __webpack_require__(77),
'right': __webpack_require__(78),
'justify': __webpack_require__(79)
},
'background': __webpack_require__(80),
'blockquote': __webpack_require__(81),
'bold': __webpack_require__(82),
'clean': __webpack_require__(83),
'code': __webpack_require__(58),
'code-block': __webpack_require__(58),
'color': __webpack_require__(84),
'direction': {
'': __webpack_require__(85),
'rtl': __webpack_require__(86)
},
'float': {
'center': __webpack_require__(87),
'full': __webpack_require__(88),
'left': __webpack_require__(89),
'right': __webpack_require__(90)
},
'formula': __webpack_require__(91),
'header': {
'1': __webpack_require__(92),
'2': __webpack_require__(93)
},
'italic': __webpack_require__(94),
'image': __webpack_require__(95),
'indent': {
'+1': __webpack_require__(96),
'-1': __webpack_require__(97)
},
'link': __webpack_require__(98),
'list': {
'ordered': __webpack_require__(99),
'bullet': __webpack_require__(100),
'check': __webpack_require__(101)
},
'script': {
'sub': __webpack_require__(102),
'super': __webpack_require__(103)
},
'strike': __webpack_require__(104),
'underline': __webpack_require__(105),
'video': __webpack_require__(106)
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLastChangeIndex = exports.default = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var History = function (_Module) {
_inherits(History, _Module);
function History(quill, options) {
_classCallCheck(this, History);
var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));
_this.lastRecorded = 0;
_this.ignoreChange = false;
_this.clear();
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {
if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;
if (!_this.options.userOnly || source === _quill2.default.sources.USER) {
_this.record(delta, oldDelta);
} else {
_this.transform(delta);
}
});
_this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));
_this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));
if (/Win/i.test(navigator.platform)) {
_this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));
}
return _this;
}
_createClass(History, [{
key: 'change',
value: function change(source, dest) {
if (this.stack[source].length === 0) return;
var delta = this.stack[source].pop();
this.stack[dest].push(delta);
this.lastRecorded = 0;
this.ignoreChange = true;
this.quill.updateContents(delta[source], _quill2.default.sources.USER);
this.ignoreChange = false;
var index = getLastChangeIndex(delta[source]);
this.quill.setSelection(index);
}
}, {
key: 'clear',
value: function clear() {
this.stack = { undo: [], redo: [] };
}
}, {
key: 'cutoff',
value: function cutoff() {
this.lastRecorded = 0;
}
}, {
key: 'record',
value: function record(changeDelta, oldDelta) {
if (changeDelta.ops.length === 0) return;
this.stack.redo = [];
var undoDelta = this.quill.getContents().diff(oldDelta);
var timestamp = Date.now();
if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {
var delta = this.stack.undo.pop();
undoDelta = undoDelta.compose(delta.undo);
changeDelta = delta.redo.compose(changeDelta);
} else {
this.lastRecorded = timestamp;
}
this.stack.undo.push({
redo: changeDelta,
undo: undoDelta
});
if (this.stack.undo.length > this.options.maxStack) {
this.stack.undo.shift();
}
}
}, {
key: 'redo',
value: function redo() {
this.change('redo', 'undo');
}
}, {
key: 'transform',
value: function transform(delta) {
this.stack.undo.forEach(function (change) {
change.undo = delta.transform(change.undo, true);
change.redo = delta.transform(change.redo, true);
});
this.stack.redo.forEach(function (change) {
change.undo = delta.transform(change.undo, true);
change.redo = delta.transform(change.redo, true);
});
}
}, {
key: 'undo',
value: function undo() {
this.change('undo', 'redo');
}
}]);
return History;
}(_module2.default);
History.DEFAULTS = {
delay: 1000,
maxStack: 100,
userOnly: false
};
function endsWithNewlineChange(delta) {
var lastOp = delta.ops[delta.ops.length - 1];
if (lastOp == null) return false;
if (lastOp.insert != null) {
return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n');
}
if (lastOp.attributes != null) {
return Object.keys(lastOp.attributes).some(function (attr) {
return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;
});
}
return false;
}
function getLastChangeIndex(delta) {
var deleteLength = delta.reduce(function (length, op) {
length += op.delete || 0;
return length;
}, 0);
var changeIndex = delta.length() - deleteLength;
if (endsWithNewlineChange(delta)) {
changeIndex -= 1;
}
return changeIndex;
}
exports.default = History;
exports.getLastChangeIndex = getLastChangeIndex;
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.BaseTooltip = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _emitter = __webpack_require__(8);
var _emitter2 = _interopRequireDefault(_emitter);
var _keyboard = __webpack_require__(23);
var _keyboard2 = _interopRequireDefault(_keyboard);
var _theme = __webpack_require__(34);
var _theme2 = _interopRequireDefault(_theme);
var _colorPicker = __webpack_require__(59);
var _colorPicker2 = _interopRequireDefault(_colorPicker);
var _iconPicker = __webpack_require__(60);
var _iconPicker2 = _interopRequireDefault(_iconPicker);
var _picker = __webpack_require__(28);
var _picker2 = _interopRequireDefault(_picker);
var _tooltip = __webpack_require__(61);
var _tooltip2 = _interopRequireDefault(_tooltip);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ALIGNS = [false, 'center', 'right', 'justify'];
var COLORS = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"];
var FONTS = [false, 'serif', 'monospace'];
var HEADERS = ['1', '2', '3', false];
var SIZES = ['small', false, 'large', 'huge'];
var BaseTheme = function (_Theme) {
_inherits(BaseTheme, _Theme);
function BaseTheme(quill, options) {
_classCallCheck(this, BaseTheme);
var _this = _possibleConstructorReturn(this, (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call(this, quill, options));
var listener = function listener(e) {
if (!document.body.contains(quill.root)) {
return document.body.removeEventListener('click', listener);
}
if (_this.tooltip != null && !_this.tooltip.root.contains(e.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) {
_this.tooltip.hide();
}
if (_this.pickers != null) {
_this.pickers.forEach(function (picker) {
if (!picker.container.contains(e.target)) {
picker.close();
}
});
}
};
quill.emitter.listenDOM('click', document.body, listener);
return _this;
}
_createClass(BaseTheme, [{
key: 'addModule',
value: function addModule(name) {
var module = _get(BaseTheme.prototype.__proto__ || Object.getPrototypeOf(BaseTheme.prototype), 'addModule', this).call(this, name);
if (name === 'toolbar') {
this.extendToolbar(module);
}
return module;
}
}, {
key: 'buildButtons',
value: function buildButtons(buttons, icons) {
buttons.forEach(function (button) {
var className = button.getAttribute('class') || '';
className.split(/\s+/).forEach(function (name) {
if (!name.startsWith('ql-')) return;
name = name.slice('ql-'.length);
if (icons[name] == null) return;
if (name === 'direction') {
button.innerHTML = icons[name][''] + icons[name]['rtl'];
} else if (typeof icons[name] === 'string') {
button.innerHTML = icons[name];
} else {
var value = button.value || '';
if (value != null && icons[name][value]) {
button.innerHTML = icons[name][value];
}
}
});
});
}
}, {
key: 'buildPickers',
value: function buildPickers(selects, icons) {
var _this2 = this;
this.pickers = selects.map(function (select) {
if (select.classList.contains('ql-align')) {
if (select.querySelector('option') == null) {
fillSelect(select, ALIGNS);
}
return new _iconPicker2.default(select, icons.align);
} else if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {
var format = select.classList.contains('ql-background') ? 'background' : 'color';
if (select.querySelector('option') == null) {
fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');
}
return new _colorPicker2.default(select, icons[format]);
} else {
if (select.querySelector('option') == null) {
if (select.classList.contains('ql-font')) {
fillSelect(select, FONTS);
} else if (select.classList.contains('ql-header')) {
fillSelect(select, HEADERS);
} else if (select.classList.contains('ql-size')) {
fillSelect(select, SIZES);
}
}
return new _picker2.default(select);
}
});
var update = function update() {
_this2.pickers.forEach(function (picker) {
picker.update();
});
};
this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update);
}
}]);
return BaseTheme;
}(_theme2.default);
BaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, {
modules: {
toolbar: {
handlers: {
formula: function formula() {
this.quill.theme.tooltip.edit('formula');
},
image: function image() {
var _this3 = this;
var fileInput = this.container.querySelector('input.ql-image[type=file]');
if (fileInput == null) {
fileInput = document.createElement('input');
fileInput.setAttribute('type', 'file');
fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');
fileInput.classList.add('ql-image');
fileInput.addEventListener('change', function () {
if (fileInput.files != null && fileInput.files[0] != null) {
var reader = new FileReader();
reader.onload = function (e) {
var range = _this3.quill.getSelection(true);
_this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e.target.result }), _emitter2.default.sources.USER);
_this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT);
fileInput.value = "";
};
reader.readAsDataURL(fileInput.files[0]);
}
});
this.container.appendChild(fileInput);
}
fileInput.click();
},
video: function video() {
this.quill.theme.tooltip.edit('video');
}
}
}
}
});
var BaseTooltip = function (_Tooltip) {
_inherits(BaseTooltip, _Tooltip);
function BaseTooltip(quill, boundsContainer) {
_classCallCheck(this, BaseTooltip);
var _this4 = _possibleConstructorReturn(this, (BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip)).call(this, quill, boundsContainer));
_this4.textbox = _this4.root.querySelector('input[type="text"]');
_this4.listen();
return _this4;
}
_createClass(BaseTooltip, [{
key: 'listen',
value: function listen() {
var _this5 = this;
this.textbox.addEventListener('keydown', function (event) {
if (_keyboard2.default.match(event, 'enter')) {
_this5.save();
event.preventDefault();
} else if (_keyboard2.default.match(event, 'escape')) {
_this5.cancel();
event.preventDefault();
}
});
}
}, {
key: 'cancel',
value: function cancel() {
this.hide();
}
}, {
key: 'edit',
value: function edit() {
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';
var preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
this.root.classList.remove('ql-hidden');
this.root.classList.add('ql-editing');
if (preview != null) {
this.textbox.value = preview;
} else if (mode !== this.root.getAttribute('data-mode')) {
this.textbox.value = '';
}
this.position(this.quill.getBounds(this.quill.selection.savedRange));
this.textbox.select();
this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + mode) || '');
this.root.setAttribute('data-mode', mode);
}
}, {
key: 'restoreFocus',
value: function restoreFocus() {
var scrollTop = this.quill.scrollingContainer.scrollTop;
this.quill.focus();
this.quill.scrollingContainer.scrollTop = scrollTop;
}
}, {
key: 'save',
value: function save() {
var value = this.textbox.value;
switch (this.root.getAttribute('data-mode')) {
case 'link':
{
var scrollTop = this.quill.root.scrollTop;
if (this.linkRange) {
this.quill.formatText(this.linkRange, 'link', value, _emitter2.default.sources.USER);
delete this.linkRange;
} else {
this.restoreFocus();
this.quill.format('link', value, _emitter2.default.sources.USER);
}
this.quill.root.scrollTop = scrollTop;
break;
}
case 'video':
{
value = extractVideoUrl(value);
} // eslint-disable-next-line no-fallthrough
case 'formula':
{
if (!value) break;
var range = this.quill.getSelection(true);
if (range != null) {
var index = range.index + range.length;
this.quill.insertEmbed(index, this.root.getAttribute('data-mode'), value, _emitter2.default.sources.USER);
if (this.root.getAttribute('data-mode') === 'formula') {
this.quill.insertText(index + 1, ' ', _emitter2.default.sources.USER);
}
this.quill.setSelection(index + 2, _emitter2.default.sources.USER);
}
break;
}
default:
}
this.textbox.value = '';
this.hide();
}
}]);
return BaseTooltip;
}(_tooltip2.default);
function extractVideoUrl(url) {
var match = url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
if (match) {
return (match[1] || 'https') + '://www.youtube.com/embed/' + match[2] + '?showinfo=0';
}
if (match = url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) {
// eslint-disable-line no-cond-assign
return (match[1] || 'https') + '://player.vimeo.com/video/' + match[2] + '/';
}
return url;
}
function fillSelect(select, values) {
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
values.forEach(function (value) {
var option = document.createElement('option');
if (value === defaultValue) {
option.setAttribute('selected', 'selected');
} else {
option.setAttribute('value', value);
}
select.appendChild(option);
});
}
exports.BaseTooltip = BaseTooltip;
exports.default = BaseTheme;
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var LinkedList = /** @class */ (function () {
function LinkedList() {
this.head = this.tail = null;
this.length = 0;
}
LinkedList.prototype.append = function () {
var nodes = [];
for (var _i = 0; _i < arguments.length; _i++) {
nodes[_i] = arguments[_i];
}
this.insertBefore(nodes[0], null);
if (nodes.length > 1) {
this.append.apply(this, nodes.slice(1));
}
};
LinkedList.prototype.contains = function (node) {
var cur, next = this.iterator();
while ((cur = next())) {
if (cur === node)
return true;
}
return false;
};
LinkedList.prototype.insertBefore = function (node, refNode) {
if (!node)
return;
node.next = refNode;
if (refNode != null) {
node.prev = refNode.prev;
if (refNode.prev != null) {
refNode.prev.next = node;
}
refNode.prev = node;
if (refNode === this.head) {
this.head = node;
}
}
else if (this.tail != null) {
this.tail.next = node;
node.prev = this.tail;
this.tail = node;
}
else {
node.prev = null;
this.head = this.tail = node;
}
this.length += 1;
};
LinkedList.prototype.offset = function (target) {
var index = 0, cur = this.head;
while (cur != null) {
if (cur === target)
return index;
index += cur.length();
cur = cur.next;
}
return -1;
};
LinkedList.prototype.remove = function (node) {
if (!this.contains(node))
return;
if (node.prev != null)
node.prev.next = node.next;
if (node.next != null)
node.next.prev = node.prev;
if (node === this.head)
this.head = node.next;
if (node === this.tail)
this.tail = node.prev;
this.length -= 1;
};
LinkedList.prototype.iterator = function (curNode) {
if (curNode === void 0) { curNode = this.head; }
// TODO use yield when we can
return function () {
var ret = curNode;
if (curNode != null)
curNode = curNode.next;
return ret;
};
};
LinkedList.prototype.find = function (index, inclusive) {
if (inclusive === void 0) { inclusive = false; }
var cur, next = this.iterator();
while ((cur = next())) {
var length = cur.length();
if (index < length ||
(inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {
return [cur, index];
}
index -= length;
}
return [null, 0];
};
LinkedList.prototype.forEach = function (callback) {
var cur, next = this.iterator();
while ((cur = next())) {
callback(cur);
}
};
LinkedList.prototype.forEachAt = function (index, length, callback) {
if (length <= 0)
return;
var _a = this.find(index), startNode = _a[0], offset = _a[1];
var cur, curIndex = index - offset, next = this.iterator(startNode);
while ((cur = next()) && curIndex < index + length) {
var curLength = cur.length();
if (index > curIndex) {
callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));
}
else {
callback(cur, 0, Math.min(curLength, index + length - curIndex));
}
curIndex += curLength;
}
};
LinkedList.prototype.map = function (callback) {
return this.reduce(function (memo, cur) {
memo.push(callback(cur));
return memo;
}, []);
};
LinkedList.prototype.reduce = function (callback, memo) {
var cur, next = this.iterator();
while ((cur = next())) {
memo = callback(memo, cur);
}
return memo;
};
return LinkedList;
}());
exports.default = LinkedList;
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var container_1 = __webpack_require__(17);
var Registry = __webpack_require__(1);
var OBSERVER_CONFIG = {
attributes: true,
characterData: true,
characterDataOldValue: true,
childList: true,
subtree: true,
};
var MAX_OPTIMIZE_ITERATIONS = 100;
var ScrollBlot = /** @class */ (function (_super) {
__extends(ScrollBlot, _super);
function ScrollBlot(node) {
var _this = _super.call(this, node) || this;
_this.scroll = _this;
_this.observer = new MutationObserver(function (mutations) {
_this.update(mutations);
});
_this.observer.observe(_this.domNode, OBSERVER_CONFIG);
_this.attach();
return _this;
}
ScrollBlot.prototype.detach = function () {
_super.prototype.detach.call(this);
this.observer.disconnect();
};
ScrollBlot.prototype.deleteAt = function (index, length) {
this.update();
if (index === 0 && length === this.length()) {
this.children.forEach(function (child) {
child.remove();
});
}
else {
_super.prototype.deleteAt.call(this, index, length);
}
};
ScrollBlot.prototype.formatAt = function (index, length, name, value) {
this.update();
_super.prototype.formatAt.call(this, index, length, name, value);
};
ScrollBlot.prototype.insertAt = function (index, value, def) {
this.update();
_super.prototype.insertAt.call(this, index, value, def);
};
ScrollBlot.prototype.optimize = function (mutations, context) {
var _this = this;
if (mutations === void 0) { mutations = []; }
if (context === void 0) { context = {}; }
_super.prototype.optimize.call(this, context);
// We must modify mutations directly, cannot make copy and then modify
var records = [].slice.call(this.observer.takeRecords());
// Array.push currently seems to be implemented by a non-tail recursive function
// so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());
while (records.length > 0)
mutations.push(records.pop());
// TODO use WeakMap
var mark = function (blot, markParent) {
if (markParent === void 0) { markParent = true; }
if (blot == null || blot === _this)
return;
if (blot.domNode.parentNode == null)
return;
// @ts-ignore
if (blot.domNode[Registry.DATA_KEY].mutations == null) {
// @ts-ignore
blot.domNode[Registry.DATA_KEY].mutations = [];
}
if (markParent)
mark(blot.parent);
};
var optimize = function (blot) {
// Post-order traversal
if (
// @ts-ignore
blot.domNode[Registry.DATA_KEY] == null ||
// @ts-ignore
blot.domNode[Registry.DATA_KEY].mutations == null) {
return;
}
if (blot instanceof container_1.default) {
blot.children.forEach(optimize);
}
blot.optimize(context);
};
var remaining = mutations;
for (var i = 0; remaining.length > 0; i += 1) {
if (i >= MAX_OPTIMIZE_ITERATIONS) {
throw new Error('[Parchment] Maximum optimize iterations reached');
}
remaining.forEach(function (mutation) {
var blot = Registry.find(mutation.target, true);
if (blot == null)
return;
if (blot.domNode === mutation.target) {
if (mutation.type === 'childList') {
mark(Registry.find(mutation.previousSibling, false));
[].forEach.call(mutation.addedNodes, function (node) {
var child = Registry.find(node, false);
mark(child, false);
if (child instanceof container_1.default) {
child.children.forEach(function (grandChild) {
mark(grandChild, false);
});
}
});
}
else if (mutation.type === 'attributes') {
mark(blot.prev);
}
}
mark(blot);
});
this.children.forEach(optimize);
remaining = [].slice.call(this.observer.takeRecords());
records = remaining.slice();
while (records.length > 0)
mutations.push(records.pop());
}
};
ScrollBlot.prototype.update = function (mutations, context) {
var _this = this;
if (context === void 0) { context = {}; }
mutations = mutations || this.observer.takeRecords();
// TODO use WeakMap
mutations
.map(function (mutation) {
var blot = Registry.find(mutation.target, true);
if (blot == null)
return null;
// @ts-ignore
if (blot.domNode[Registry.DATA_KEY].mutations == null) {
// @ts-ignore
blot.domNode[Registry.DATA_KEY].mutations = [mutation];
return blot;
}
else {
// @ts-ignore
blot.domNode[Registry.DATA_KEY].mutations.push(mutation);
return null;
}
})
.forEach(function (blot) {
if (blot == null ||
blot === _this ||
//@ts-ignore
blot.domNode[Registry.DATA_KEY] == null)
return;
// @ts-ignore
blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);
});
// @ts-ignore
if (this.domNode[Registry.DATA_KEY].mutations != null) {
// @ts-ignore
_super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);
}
this.optimize(mutations, context);
};
ScrollBlot.blotName = 'scroll';
ScrollBlot.defaultChild = 'block';
ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;
ScrollBlot.tagName = 'DIV';
return ScrollBlot;
}(container_1.default));
exports.default = ScrollBlot;
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var format_1 = __webpack_require__(18);
var Registry = __webpack_require__(1);
// Shallow object comparison
function isEqual(obj1, obj2) {
if (Object.keys(obj1).length !== Object.keys(obj2).length)
return false;
// @ts-ignore
for (var prop in obj1) {
// @ts-ignore
if (obj1[prop] !== obj2[prop])
return false;
}
return true;
}
var InlineBlot = /** @class */ (function (_super) {
__extends(InlineBlot, _super);
function InlineBlot() {
return _super !== null && _super.apply(this, arguments) || this;
}
InlineBlot.formats = function (domNode) {
if (domNode.tagName === InlineBlot.tagName)
return undefined;
return _super.formats.call(this, domNode);
};
InlineBlot.prototype.format = function (name, value) {
var _this = this;
if (name === this.statics.blotName && !value) {
this.children.forEach(function (child) {
if (!(child instanceof format_1.default)) {
child = child.wrap(InlineBlot.blotName, true);
}
_this.attributes.copy(child);
});
this.unwrap();
}
else {
_super.prototype.format.call(this, name, value);
}
};
InlineBlot.prototype.formatAt = function (index, length, name, value) {
if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {
var blot = this.isolate(index, length);
blot.format(name, value);
}
else {
_super.prototype.formatAt.call(this, index, length, name, value);
}
};
InlineBlot.prototype.optimize = function (context) {
_super.prototype.optimize.call(this, context);
var formats = this.formats();
if (Object.keys(formats).length === 0) {
return this.unwrap(); // unformatted span
}
var next = this.next;
if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {
next.moveChildren(this);
next.remove();
}
};
InlineBlot.blotName = 'inline';
InlineBlot.scope = Registry.Scope.INLINE_BLOT;
InlineBlot.tagName = 'SPAN';
return InlineBlot;
}(format_1.default));
exports.default = InlineBlot;
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var format_1 = __webpack_require__(18);
var Registry = __webpack_require__(1);
var BlockBlot = /** @class */ (function (_super) {
__extends(BlockBlot, _super);
function BlockBlot() {
return _super !== null && _super.apply(this, arguments) || this;
}
BlockBlot.formats = function (domNode) {
var tagName = Registry.query(BlockBlot.blotName).tagName;
if (domNode.tagName === tagName)
return undefined;
return _super.formats.call(this, domNode);
};
BlockBlot.prototype.format = function (name, value) {
if (Registry.query(name, Registry.Scope.BLOCK) == null) {
return;
}
else if (name === this.statics.blotName && !value) {
this.replaceWith(BlockBlot.blotName);
}
else {
_super.prototype.format.call(this, name, value);
}
};
BlockBlot.prototype.formatAt = function (index, length, name, value) {
if (Registry.query(name, Registry.Scope.BLOCK) != null) {
this.format(name, value);
}
else {
_super.prototype.formatAt.call(this, index, length, name, value);
}
};
BlockBlot.prototype.insertAt = function (index, value, def) {
if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {
// Insert text or inline
_super.prototype.insertAt.call(this, index, value, def);
}
else {
var after = this.split(index);
var blot = Registry.create(value, def);
after.parent.insertBefore(blot, after);
}
};
BlockBlot.prototype.update = function (mutations, context) {
if (navigator.userAgent.match(/Trident/)) {
this.build();
}
else {
_super.prototype.update.call(this, mutations, context);
}
};
BlockBlot.blotName = 'block';
BlockBlot.scope = Registry.Scope.BLOCK_BLOT;
BlockBlot.tagName = 'P';
return BlockBlot;
}(format_1.default));
exports.default = BlockBlot;
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var leaf_1 = __webpack_require__(19);
var EmbedBlot = /** @class */ (function (_super) {
__extends(EmbedBlot, _super);
function EmbedBlot() {
return _super !== null && _super.apply(this, arguments) || this;
}
EmbedBlot.formats = function (domNode) {
return undefined;
};
EmbedBlot.prototype.format = function (name, value) {
// super.formatAt wraps, which is what we want in general,
// but this allows subclasses to overwrite for formats
// that just apply to particular embeds
_super.prototype.formatAt.call(this, 0, this.length(), name, value);
};
EmbedBlot.prototype.formatAt = function (index, length, name, value) {
if (index === 0 && length === this.length()) {
this.format(name, value);
}
else {
_super.prototype.formatAt.call(this, index, length, name, value);
}
};
EmbedBlot.prototype.formats = function () {
return this.statics.formats(this.domNode);
};
return EmbedBlot;
}(leaf_1.default));
exports.default = EmbedBlot;
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var leaf_1 = __webpack_require__(19);
var Registry = __webpack_require__(1);
var TextBlot = /** @class */ (function (_super) {
__extends(TextBlot, _super);
function TextBlot(node) {
var _this = _super.call(this, node) || this;
_this.text = _this.statics.value(_this.domNode);
return _this;
}
TextBlot.create = function (value) {
return document.createTextNode(value);
};
TextBlot.value = function (domNode) {
var text = domNode.data;
// @ts-ignore
if (text['normalize'])
text = text['normalize']();
return text;
};
TextBlot.prototype.deleteAt = function (index, length) {
this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);
};
TextBlot.prototype.index = function (node, offset) {
if (this.domNode === node) {
return offset;
}
return -1;
};
TextBlot.prototype.insertAt = function (index, value, def) {
if (def == null) {
this.text = this.text.slice(0, index) + value + this.text.slice(index);
this.domNode.data = this.text;
}
else {
_super.prototype.insertAt.call(this, index, value, def);
}
};
TextBlot.prototype.length = function () {
return this.text.length;
};
TextBlot.prototype.optimize = function (context) {
_super.prototype.optimize.call(this, context);
this.text = this.statics.value(this.domNode);
if (this.text.length === 0) {
this.remove();
}
else if (this.next instanceof TextBlot && this.next.prev === this) {
this.insertAt(this.length(), this.next.value());
this.next.remove();
}
};
TextBlot.prototype.position = function (index, inclusive) {
if (inclusive === void 0) { inclusive = false; }
return [this.domNode, index];
};
TextBlot.prototype.split = function (index, force) {
if (force === void 0) { force = false; }
if (!force) {
if (index === 0)
return this;
if (index === this.length())
return this.next;
}
var after = Registry.create(this.domNode.splitText(index));
this.parent.insertBefore(after, this.next);
this.text = this.statics.value(this.domNode);
return after;
};
TextBlot.prototype.update = function (mutations, context) {
var _this = this;
if (mutations.some(function (mutation) {
return mutation.type === 'characterData' && mutation.target === _this.domNode;
})) {
this.text = this.statics.value(this.domNode);
}
};
TextBlot.prototype.value = function () {
return this.text;
};
TextBlot.blotName = 'text';
TextBlot.scope = Registry.Scope.INLINE_BLOT;
return TextBlot;
}(leaf_1.default));
exports.default = TextBlot;
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var elem = document.createElement('div');
elem.classList.toggle('test-class', false);
if (elem.classList.contains('test-class')) {
var _toggle = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function (token, force) {
if (arguments.length > 1 && !this.contains(token) === !force) {
return force;
} else {
return _toggle.call(this, token);
}
};
}
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (searchString, position) {
position = position || 0;
return this.substr(position, searchString.length) === searchString;
};
}
if (!String.prototype.endsWith) {
String.prototype.endsWith = function (searchString, position) {
var subjectString = this.toString();
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
position = subjectString.length;
}
position -= searchString.length;
var lastIndex = subjectString.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
};
}
if (!Array.prototype.find) {
Object.defineProperty(Array.prototype, "find", {
value: function value(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;
for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
}
});
}
document.addEventListener("DOMContentLoaded", function () {
// Disable resizing in Firefox
document.execCommand("enableObjectResizing", false, false);
// Disable automatic linkifying in IE11
document.execCommand("autoUrlDetect", false, false);
});
/***/ }),
/* 51 */
/***/ (function(module, exports) {
/**
* This library modifies the diff-patch-match library by Neil Fraser
* by removing the patch and match functionality and certain advanced
* options in the diff function. The original license is as follows:
*
* ===
*
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The data structure representing a diff is an array of tuples:
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
*/
var DIFF_DELETE = -1;
var DIFF_INSERT = 1;
var DIFF_EQUAL = 0;
/**
* Find the differences between two texts. Simplifies the problem by stripping
* any common prefix or suffix off the texts before diffing.
* @param {string} text1 Old string to be diffed.
* @param {string} text2 New string to be diffed.
* @param {Int} cursor_pos Expected edit position in text1 (optional)
* @return {Array} Array of diff tuples.
*/
function diff_main(text1, text2, cursor_pos) {
// Check for equality (speedup).
if (text1 == text2) {
if (text1) {
return [[DIFF_EQUAL, text1]];
}
return [];
}
// Check cursor_pos within bounds
if (cursor_pos < 0 || text1.length < cursor_pos) {
cursor_pos = null;
}
// Trim off common prefix (speedup).
var commonlength = diff_commonPrefix(text1, text2);
var commonprefix = text1.substring(0, commonlength);
text1 = text1.substring(commonlength);
text2 = text2.substring(commonlength);
// Trim off common suffix (speedup).
commonlength = diff_commonSuffix(text1, text2);
var commonsuffix = text1.substring(text1.length - commonlength);
text1 = text1.substring(0, text1.length - commonlength);
text2 = text2.substring(0, text2.length - commonlength);
// Compute the diff on the middle block.
var diffs = diff_compute_(text1, text2);
// Restore the prefix and suffix.
if (commonprefix) {
diffs.unshift([DIFF_EQUAL, commonprefix]);
}
if (commonsuffix) {
diffs.push([DIFF_EQUAL, commonsuffix]);
}
diff_cleanupMerge(diffs);
if (cursor_pos != null) {
diffs = fix_cursor(diffs, cursor_pos);
}
diffs = fix_emoji(diffs);
return diffs;
};
/**
* Find the differences between two texts. Assumes that the texts do not
* have any common prefix or suffix.
* @param {string} text1 Old string to be diffed.
* @param {string} text2 New string to be diffed.
* @return {Array} Array of diff tuples.
*/
function diff_compute_(text1, text2) {
var diffs;
if (!text1) {
// Just add some text (speedup).
return [[DIFF_INSERT, text2]];
}
if (!text2) {
// Just delete some text (speedup).
return [[DIFF_DELETE, text1]];
}
var longtext = text1.length > text2.length ? text1 : text2;
var shorttext = text1.length > text2.length ? text2 : text1;
var i = longtext.indexOf(shorttext);
if (i != -1) {
// Shorter text is inside the longer text (speedup).
diffs = [[DIFF_INSERT, longtext.substring(0, i)],
[DIFF_EQUAL, shorttext],
[DIFF_INSERT, longtext.substring(i + shorttext.length)]];
// Swap insertions for deletions if diff is reversed.
if (text1.length > text2.length) {
diffs[0][0] = diffs[2][0] = DIFF_DELETE;
}
return diffs;
}
if (shorttext.length == 1) {
// Single character string.
// After the previous speedup, the character can't be an equality.
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
}
// Check to see if the problem can be split in two.
var hm = diff_halfMatch_(text1, text2);
if (hm) {
// A half-match was found, sort out the return data.
var text1_a = hm[0];
var text1_b = hm[1];
var text2_a = hm[2];
var text2_b = hm[3];
var mid_common = hm[4];
// Send both pairs off for separate processing.
var diffs_a = diff_main(text1_a, text2_a);
var diffs_b = diff_main(text1_b, text2_b);
// Merge the results.
return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
}
return diff_bisect_(text1, text2);
};
/**
* Find the 'middle snake' of a diff, split the problem in two
* and return the recursively constructed diff.
* See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
* @param {string} text1 Old string to be diffed.
* @param {string} text2 New string to be diffed.
* @return {Array} Array of diff tuples.
* @private
*/
function diff_bisect_(text1, text2) {
// Cache the text lengths to prevent multiple calls.
var text1_length = text1.length;
var text2_length = text2.length;
var max_d = Math.ceil((text1_length + text2_length) / 2);
var v_offset = max_d;
var v_length = 2 * max_d;
var v1 = new Array(v_length);
var v2 = new Array(v_length);
// Setting all elements to -1 is faster in Chrome & Firefox than mixing
// integers and undefined.
for (var x = 0; x < v_length; x++) {
v1[x] = -1;
v2[x] = -1;
}
v1[v_offset + 1] = 0;
v2[v_offset + 1] = 0;
var delta = text1_length - text2_length;
// If the total number of characters is odd, then the front path will collide
// with the reverse path.
var front = (delta % 2 != 0);
// Offsets for start and end of k loop.
// Prevents mapping of space beyond the grid.
var k1start = 0;
var k1end = 0;
var k2start = 0;
var k2end = 0;
for (var d = 0; d < max_d; d++) {
// Walk the front path one step.
for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
var k1_offset = v_offset + k1;
var x1;
if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {
x1 = v1[k1_offset + 1];
} else {
x1 = v1[k1_offset - 1] + 1;
}
var y1 = x1 - k1;
while (x1 < text1_length && y1 < text2_length &&
text1.charAt(x1) == text2.charAt(y1)) {
x1++;
y1++;
}
v1[k1_offset] = x1;
if (x1 > text1_length) {
// Ran off the right of the graph.
k1end += 2;
} else if (y1 > text2_length) {
// Ran off the bottom of the graph.
k1start += 2;
} else if (front) {
var k2_offset = v_offset + delta - k1;
if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {
// Mirror x2 onto top-left coordinate system.
var x2 = text1_length - v2[k2_offset];
if (x1 >= x2) {
// Overlap detected.
return diff_bisectSplit_(text1, text2, x1, y1);
}
}
}
}
// Walk the reverse path one step.
for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
var k2_offset = v_offset + k2;
var x2;
if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {
x2 = v2[k2_offset + 1];
} else {
x2 = v2[k2_offset - 1] + 1;
}
var y2 = x2 - k2;
while (x2 < text1_length && y2 < text2_length &&
text1.charAt(text1_length - x2 - 1) ==
text2.charAt(text2_length - y2 - 1)) {
x2++;
y2++;
}
v2[k2_offset] = x2;
if (x2 > text1_length) {
// Ran off the left of the graph.
k2end += 2;
} else if (y2 > text2_length) {
// Ran off the top of the graph.
k2start += 2;
} else if (!front) {
var k1_offset = v_offset + delta - k2;
if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {
var x1 = v1[k1_offset];
var y1 = v_offset + x1 - k1_offset;
// Mirror x2 onto top-left coordinate system.
x2 = text1_length - x2;
if (x1 >= x2) {
// Overlap detected.
return diff_bisectSplit_(text1, text2, x1, y1);
}
}
}
}
}
// Diff took too long and hit the deadline or
// number of diffs equals number of characters, no commonality at all.
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
};
/**
* Given the location of the 'middle snake', split the diff in two parts
* and recurse.
* @param {string} text1 Old string to be diffed.
* @param {string} text2 New string to be diffed.
* @param {number} x Index of split point in text1.
* @param {number} y Index of split point in text2.
* @return {Array} Array of diff tuples.
*/
function diff_bisectSplit_(text1, text2, x, y) {
var text1a = text1.substring(0, x);
var text2a = text2.substring(0, y);
var text1b = text1.substring(x);
var text2b = text2.substring(y);
// Compute both diffs serially.
var diffs = diff_main(text1a, text2a);
var diffsb = diff_main(text1b, text2b);
return diffs.concat(diffsb);
};
/**
* Determine the common prefix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {number} The number of characters common to the start of each
* string.
*/
function diff_commonPrefix(text1, text2) {
// Quick check for common null cases.
if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {
return 0;
}
// Binary search.
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
var pointermin = 0;
var pointermax = Math.min(text1.length, text2.length);
var pointermid = pointermax;
var pointerstart = 0;
while (pointermin < pointermid) {
if (text1.substring(pointerstart, pointermid) ==
text2.substring(pointerstart, pointermid)) {
pointermin = pointermid;
pointerstart = pointermin;
} else {
pointermax = pointermid;
}
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
}
return pointermid;
};
/**
* Determine the common suffix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {number} The number of characters common to the end of each string.
*/
function diff_commonSuffix(text1, text2) {
// Quick check for common null cases.
if (!text1 || !text2 ||
text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {
return 0;
}
// Binary search.
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
var pointermin = 0;
var pointermax = Math.min(text1.length, text2.length);
var pointermid = pointermax;
var pointerend = 0;
while (pointermin < pointermid) {
if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==
text2.substring(text2.length - pointermid, text2.length - pointerend)) {
pointermin = pointermid;
pointerend = pointermin;
} else {
pointermax = pointermid;
}
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
}
return pointermid;
};
/**
* Do the two texts share a substring which is at least half the length of the
* longer text?
* This speedup can produce non-minimal diffs.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {Array.<string>} Five element Array, containing the prefix of
* text1, the suffix of text1, the prefix of text2, the suffix of
* text2 and the common middle. Or null if there was no match.
*/
function diff_halfMatch_(text1, text2) {
var longtext = text1.length > text2.length ? text1 : text2;
var shorttext = text1.length > text2.length ? text2 : text1;
if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
return null; // Pointless.
}
/**
* Does a substring of shorttext exist within longtext such that the substring
* is at least half the length of longtext?
* Closure, but does not reference any external variables.
* @param {string} longtext Longer string.
* @param {string} shorttext Shorter string.
* @param {number} i Start index of quarter length substring within longtext.
* @return {Array.<string>} Five element Array, containing the prefix of
* longtext, the suffix of longtext, the prefix of shorttext, the suffix
* of shorttext and the common middle. Or null if there was no match.
* @private
*/
function diff_halfMatchI_(longtext, shorttext, i) {
// Start with a 1/4 length substring at position i as a seed.
var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));
var j = -1;
var best_common = '';
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
while ((j = shorttext.indexOf(seed, j + 1)) != -1) {
var prefixLength = diff_commonPrefix(longtext.substring(i),
shorttext.substring(j));
var suffixLength = diff_commonSuffix(longtext.substring(0, i),
shorttext.substring(0, j));
if (best_common.length < suffixLength + prefixLength) {
best_common = shorttext.substring(j - suffixLength, j) +
shorttext.substring(j, j + prefixLength);
best_longtext_a = longtext.substring(0, i - suffixLength);
best_longtext_b = longtext.substring(i + prefixLength);
best_shorttext_a = shorttext.substring(0, j - suffixLength);
best_shorttext_b = shorttext.substring(j + prefixLength);
}
}
if (best_common.length * 2 >= longtext.length) {
return [best_longtext_a, best_longtext_b,
best_shorttext_a, best_shorttext_b, best_common];
} else {
return null;
}
}
// First check if the second quarter is the seed for a half-match.
var hm1 = diff_halfMatchI_(longtext, shorttext,
Math.ceil(longtext.length / 4));
// Check again based on the third quarter.
var hm2 = diff_halfMatchI_(longtext, shorttext,
Math.ceil(longtext.length / 2));
var hm;
if (!hm1 && !hm2) {
return null;
} else if (!hm2) {
hm = hm1;
} else if (!hm1) {
hm = hm2;
} else {
// Both matched. Select the longest.
hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
}
// A half-match was found, sort out the return data.
var text1_a, text1_b, text2_a, text2_b;
if (text1.length > text2.length) {
text1_a = hm[0];
text1_b = hm[1];
text2_a = hm[2];
text2_b = hm[3];
} else {
text2_a = hm[0];
text2_b = hm[1];
text1_a = hm[2];
text1_b = hm[3];
}
var mid_common = hm[4];
return [text1_a, text1_b, text2_a, text2_b, mid_common];
};
/**
* Reorder and merge like edit sections. Merge equalities.
* Any edit section can move as long as it doesn't cross an equality.
* @param {Array} diffs Array of diff tuples.
*/
function diff_cleanupMerge(diffs) {
diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.
var pointer = 0;
var count_delete = 0;
var count_insert = 0;
var text_delete = '';
var text_insert = '';
var commonlength;
while (pointer < diffs.length) {
switch (diffs[pointer][0]) {
case DIFF_INSERT:
count_insert++;
text_insert += diffs[pointer][1];
pointer++;
break;
case DIFF_DELETE:
count_delete++;
text_delete += diffs[pointer][1];
pointer++;
break;
case DIFF_EQUAL:
// Upon reaching an equality, check for prior redundancies.
if (count_delete + count_insert > 1) {
if (count_delete !== 0 && count_insert !== 0) {
// Factor out any common prefixies.
commonlength = diff_commonPrefix(text_insert, text_delete);
if (commonlength !== 0) {
if ((pointer - count_delete - count_insert) > 0 &&
diffs[pointer - count_delete - count_insert - 1][0] ==
DIFF_EQUAL) {
diffs[pointer - count_delete - count_insert - 1][1] +=
text_insert.substring(0, commonlength);
} else {
diffs.splice(0, 0, [DIFF_EQUAL,
text_insert.substring(0, commonlength)]);
pointer++;
}
text_insert = text_insert.substring(commonlength);
text_delete = text_delete.substring(commonlength);
}
// Factor out any common suffixies.
commonlength = diff_commonSuffix(text_insert, text_delete);
if (commonlength !== 0) {
diffs[pointer][1] = text_insert.substring(text_insert.length -
commonlength) + diffs[pointer][1];
text_insert = text_insert.substring(0, text_insert.length -
commonlength);
text_delete = text_delete.substring(0, text_delete.length -
commonlength);
}
}
// Delete the offending records and add the merged ones.
if (count_delete === 0) {
diffs.splice(pointer - count_insert,
count_delete + count_insert, [DIFF_INSERT, text_insert]);
} else if (count_insert === 0) {
diffs.splice(pointer - count_delete,
count_delete + count_insert, [DIFF_DELETE, text_delete]);
} else {
diffs.splice(pointer - count_delete - count_insert,
count_delete + count_insert, [DIFF_DELETE, text_delete],
[DIFF_INSERT, text_insert]);
}
pointer = pointer - count_delete - count_insert +
(count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;
} else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {
// Merge this equality with the previous one.
diffs[pointer - 1][1] += diffs[pointer][1];
diffs.splice(pointer, 1);
} else {
pointer++;
}
count_insert = 0;
count_delete = 0;
text_delete = '';
text_insert = '';
break;
}
}
if (diffs[diffs.length - 1][1] === '') {
diffs.pop(); // Remove the dummy entry at the end.
}
// Second pass: look for single edits surrounded on both sides by equalities
// which can be shifted sideways to eliminate an equality.
// e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
var changes = false;
pointer = 1;
// Intentionally ignore the first and last element (don't need checking).
while (pointer < diffs.length - 1) {
if (diffs[pointer - 1][0] == DIFF_EQUAL &&
diffs[pointer + 1][0] == DIFF_EQUAL) {
// This is a single edit surrounded by equalities.
if (diffs[pointer][1].substring(diffs[pointer][1].length -
diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {
// Shift the edit over the previous equality.
diffs[pointer][1] = diffs[pointer - 1][1] +
diffs[pointer][1].substring(0, diffs[pointer][1].length -
diffs[pointer - 1][1].length);
diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
diffs.splice(pointer - 1, 1);
changes = true;
} else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==
diffs[pointer + 1][1]) {
// Shift the edit over the next equality.
diffs[pointer - 1][1] += diffs[pointer + 1][1];
diffs[pointer][1] =
diffs[pointer][1].substring(diffs[pointer + 1][1].length) +
diffs[pointer + 1][1];
diffs.splice(pointer + 1, 1);
changes = true;
}
}
pointer++;
}
// If shifts were made, the diff needs reordering and another shift sweep.
if (changes) {
diff_cleanupMerge(diffs);
}
};
var diff = diff_main;
diff.INSERT = DIFF_INSERT;
diff.DELETE = DIFF_DELETE;
diff.EQUAL = DIFF_EQUAL;
module.exports = diff;
/*
* Modify a diff such that the cursor position points to the start of a change:
* E.g.
* cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)
* => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]
* cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)
* => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]
*
* @param {Array} diffs Array of diff tuples
* @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
* @return {Array} A tuple [cursor location in the modified diff, modified diff]
*/
function cursor_normalize_diff (diffs, cursor_pos) {
if (cursor_pos === 0) {
return [DIFF_EQUAL, diffs];
}
for (var current_pos = 0, i = 0; i < diffs.length; i++) {
var d = diffs[i];
if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {
var next_pos = current_pos + d[1].length;
if (cursor_pos === next_pos) {
return [i + 1, diffs];
} else if (cursor_pos < next_pos) {
// copy to prevent side effects
diffs = diffs.slice();
// split d into two diff changes
var split_pos = cursor_pos - current_pos;
var d_left = [d[0], d[1].slice(0, split_pos)];
var d_right = [d[0], d[1].slice(split_pos)];
diffs.splice(i, 1, d_left, d_right);
return [i + 1, diffs];
} else {
current_pos = next_pos;
}
}
}
throw new Error('cursor_pos is out of bounds!')
}
/*
* Modify a diff such that the edit position is "shifted" to the proposed edit location (cursor_position).
*
* Case 1)
* Check if a naive shift is possible:
* [0, X], [ 1, Y] -> [ 1, Y], [0, X] (if X + Y === Y + X)
* [0, X], [-1, Y] -> [-1, Y], [0, X] (if X + Y === Y + X) - holds same result
* Case 2)
* Check if the following shifts are possible:
* [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']
* [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']
* ^ ^
* d d_next
*
* @param {Array} diffs Array of diff tuples
* @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
* @return {Array} Array of diff tuples
*/
function fix_cursor (diffs, cursor_pos) {
var norm = cursor_normalize_diff(diffs, cursor_pos);
var ndiffs = norm[1];
var cursor_pointer = norm[0];
var d = ndiffs[cursor_pointer];
var d_next = ndiffs[cursor_pointer + 1];
if (d == null) {
// Text was deleted from end of original string,
// cursor is now out of bounds in new string
return diffs;
} else if (d[0] !== DIFF_EQUAL) {
// A modification happened at the cursor location.
// This is the expected outcome, so we can return the original diff.
return diffs;
} else {
if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {
// Case 1)
// It is possible to perform a naive shift
ndiffs.splice(cursor_pointer, 2, d_next, d)
return merge_tuples(ndiffs, cursor_pointer, 2)
} else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {
// Case 2)
// d[1] is a prefix of d_next[1]
// We can assume that d_next[0] !== 0, since d[0] === 0
// Shift edit locations..
ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);
var suffix = d_next[1].slice(d[1].length);
if (suffix.length > 0) {
ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);
}
return merge_tuples(ndiffs, cursor_pointer, 3)
} else {
// Not possible to perform any modification
return diffs;
}
}
}
/*
* Check diff did not split surrogate pairs.
* Ex. [0, '\uD83D'], [-1, '\uDC36'], [1, '\uDC2F'] -> [-1, '\uD83D\uDC36'], [1, '\uD83D\uDC2F']
* '\uD83D\uDC36' === '🐶', '\uD83D\uDC2F' === '🐯'
*
* @param {Array} diffs Array of diff tuples
* @return {Array} Array of diff tuples
*/
function fix_emoji (diffs) {
var compact = false;
var starts_with_pair_end = function(str) {
return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;
}
var ends_with_pair_start = function(str) {
return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;
}
for (var i = 2; i < diffs.length; i += 1) {
if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&
diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&
diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {
compact = true;
diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];
diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];
diffs[i-2][1] = diffs[i-2][1].slice(0, -1);
}
}
if (!compact) {
return diffs;
}
var fixed_diffs = [];
for (var i = 0; i < diffs.length; i += 1) {
if (diffs[i][1].length > 0) {
fixed_diffs.push(diffs[i]);
}
}
return fixed_diffs;
}
/*
* Try to merge tuples with their neigbors in a given range.
* E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']
*
* @param {Array} diffs Array of diff tuples.
* @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).
* @param {Int} length Number of consecutive elements to check.
* @return {Array} Array of merged diff tuples.
*/
function merge_tuples (diffs, start, length) {
// Check from (start-1) to (start+length).
for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {
if (i + 1 < diffs.length) {
var left_d = diffs[i];
var right_d = diffs[i+1];
if (left_d[0] === right_d[1]) {
diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);
}
}
}
return diffs;
}
/***/ }),
/* 52 */
/***/ (function(module, exports) {
exports = module.exports = typeof Object.keys === 'function'
? Object.keys : shim;
exports.shim = shim;
function shim (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
/***/ }),
/* 53 */
/***/ (function(module, exports) {
var supportsArgumentsClass = (function(){
return Object.prototype.toString.call(arguments)
})() == '[object Arguments]';
exports = module.exports = supportsArgumentsClass ? supported : unsupported;
exports.supported = supported;
function supported(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
};
exports.unsupported = unsupported;
function unsupported(object){
return object &&
typeof object == 'object' &&
typeof object.length == 'number' &&
Object.prototype.hasOwnProperty.call(object, 'callee') &&
!Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
false;
};
/***/ }),
/* 54 */
/***/ (function(module, exports) {
'use strict';
var has = Object.prototype.hasOwnProperty
, prefix = '~';
/**
* Constructor to create a storage for our `EE` objects.
* An `Events` instance is a plain object whose properties are event names.
*
* @constructor
* @api private
*/
function Events() {}
//
// We try to not inherit from `Object.prototype`. In some engines creating an
// instance in this way is faster than calling `Object.create(null)` directly.
// If `Object.create(null)` is not supported we prefix the event names with a
// character to make sure that the built-in object properties are not
// overridden or used as an attack vector.
//
if (Object.create) {
Events.prototype = Object.create(null);
//
// This hack is needed because the `__proto__` property is still inherited in
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
//
if (!new Events().__proto__) prefix = false;
}
/**
* Representation of a single event listener.
*
* @param {Function} fn The listener function.
* @param {Mixed} context The context to invoke the listener with.
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
* @constructor
* @api private
*/
function EE(fn, context, once) {
this.fn = fn;
this.context = context;
this.once = once || false;
}
/**
* Minimal `EventEmitter` interface that is molded against the Node.js
* `EventEmitter` interface.
*
* @constructor
* @api public
*/
function EventEmitter() {
this._events = new Events();
this._eventsCount = 0;
}
/**
* Return an array listing the events for which the emitter has registered
* listeners.
*
* @returns {Array}
* @api public
*/
EventEmitter.prototype.eventNames = function eventNames() {
var names = []
, events
, name;
if (this._eventsCount === 0) return names;
for (name in (events = this._events)) {
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
}
if (Object.getOwnPropertySymbols) {
return names.concat(Object.getOwnPropertySymbols(events));
}
return names;
};
/**
* Return the listeners registered for a given event.
*
* @param {String|Symbol} event The event name.
* @param {Boolean} exists Only check if there are listeners.
* @returns {Array|Boolean}
* @api public
*/
EventEmitter.prototype.listeners = function listeners(event, exists) {
var evt = prefix ? prefix + event : event
, available = this._events[evt];
if (exists) return !!available;
if (!available) return [];
if (available.fn) return [available.fn];
for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {
ee[i] = available[i].fn;
}
return ee;
};
/**
* Calls each of the listeners registered for a given event.
*
* @param {String|Symbol} event The event name.
* @returns {Boolean} `true` if the event had listeners, else `false`.
* @api public
*/
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
var evt = prefix ? prefix + event : event;
if (!this._events[evt]) return false;
var listeners = this._events[evt]
, len = arguments.length
, args
, i;
if (listeners.fn) {
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
switch (len) {
case 1: return listeners.fn.call(listeners.context), true;
case 2: return listeners.fn.call(listeners.context, a1), true;
case 3: return listeners.fn.call(listeners.context, a1, a2), true;
case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
}
for (i = 1, args = new Array(len -1); i < len; i++) {
args[i - 1] = arguments[i];
}
listeners.fn.apply(listeners.context, args);
} else {
var length = listeners.length
, j;
for (i = 0; i < length; i++) {
if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
switch (len) {
case 1: listeners[i].fn.call(listeners[i].context); break;
case 2: listeners[i].fn.call(listeners[i].context, a1); break;
case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
default:
if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
args[j - 1] = arguments[j];
}
listeners[i].fn.apply(listeners[i].context, args);
}
}
}
return true;
};
/**
* Add a listener for a given event.
*
* @param {String|Symbol} event The event name.
* @param {Function} fn The listener function.
* @param {Mixed} [context=this] The context to invoke the listener with.
* @returns {EventEmitter} `this`.
* @api public
*/
EventEmitter.prototype.on = function on(event, fn, context) {
var listener = new EE(fn, context || this)
, evt = prefix ? prefix + event : event;
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
else if (!this._events[evt].fn) this._events[evt].push(listener);
else this._events[evt] = [this._events[evt], listener];
return this;
};
/**
* Add a one-time listener for a given event.
*
* @param {String|Symbol} event The event name.
* @param {Function} fn The listener function.
* @param {Mixed} [context=this] The context to invoke the listener with.
* @returns {EventEmitter} `this`.
* @api public
*/
EventEmitter.prototype.once = function once(event, fn, context) {
var listener = new EE(fn, context || this, true)
, evt = prefix ? prefix + event : event;
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
else if (!this._events[evt].fn) this._events[evt].push(listener);
else this._events[evt] = [this._events[evt], listener];
return this;
};
/**
* Remove the listeners of a given event.
*
* @param {String|Symbol} event The event name.
* @param {Function} fn Only remove the listeners that match this function.
* @param {Mixed} context Only remove the listeners that have this context.
* @param {Boolean} once Only remove one-time listeners.
* @returns {EventEmitter} `this`.
* @api public
*/
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
var evt = prefix ? prefix + event : event;
if (!this._events[evt]) return this;
if (!fn) {
if (--this._eventsCount === 0) this._events = new Events();
else delete this._events[evt];
return this;
}
var listeners = this._events[evt];
if (listeners.fn) {
if (
listeners.fn === fn
&& (!once || listeners.once)
&& (!context || listeners.context === context)
) {
if (--this._eventsCount === 0) this._events = new Events();
else delete this._events[evt];
}
} else {
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
if (
listeners[i].fn !== fn
|| (once && !listeners[i].once)
|| (context && listeners[i].context !== context)
) {
events.push(listeners[i]);
}
}
//
// Reset the array, or remove it completely if we have no more listeners.
//
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
else if (--this._eventsCount === 0) this._events = new Events();
else delete this._events[evt];
}
return this;
};
/**
* Remove all listeners, or those of the specified event.
*
* @param {String|Symbol} [event] The event name.
* @returns {EventEmitter} `this`.
* @api public
*/
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
var evt;
if (event) {
evt = prefix ? prefix + event : event;
if (this._events[evt]) {
if (--this._eventsCount === 0) this._events = new Events();
else delete this._events[evt];
}
} else {
this._events = new Events();
this._eventsCount = 0;
}
return this;
};
//
// Alias methods names because people roll like that.
//
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
//
// This function doesn't apply anymore.
//
EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
return this;
};
//
// Expose the prefix.
//
EventEmitter.prefixed = prefix;
//
// Allow `EventEmitter` to be imported as module namespace.
//
EventEmitter.EventEmitter = EventEmitter;
//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = EventEmitter;
}
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _extend2 = __webpack_require__(3);
var _extend3 = _interopRequireDefault(_extend2);
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
var _align = __webpack_require__(36);
var _background = __webpack_require__(37);
var _code = __webpack_require__(13);
var _code2 = _interopRequireDefault(_code);
var _color = __webpack_require__(26);
var _direction = __webpack_require__(38);
var _font = __webpack_require__(39);
var _size = __webpack_require__(40);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var debug = (0, _logger2.default)('quill:clipboard');
var DOM_KEY = '__ql-matcher';
var CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];
var ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {
memo[attr.keyName] = attr;
return memo;
}, {});
var STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {
memo[attr.keyName] = attr;
return memo;
}, {});
var Clipboard = function (_Module) {
_inherits(Clipboard, _Module);
function Clipboard(quill, options) {
_classCallCheck(this, Clipboard);
var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));
_this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));
_this.container = _this.quill.addContainer('ql-clipboard');
_this.container.setAttribute('contenteditable', true);
_this.container.setAttribute('tabindex', -1);
_this.matchers = [];
CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
selector = _ref2[0],
matcher = _ref2[1];
if (!options.matchVisual && matcher === matchSpacing) return;
_this.addMatcher(selector, matcher);
});
return _this;
}
_createClass(Clipboard, [{
key: 'addMatcher',
value: function addMatcher(selector, matcher) {
this.matchers.push([selector, matcher]);
}
}, {
key: 'convert',
value: function convert(html) {
if (typeof html === 'string') {
this.container.innerHTML = html.replace(/\>\r?\n +\</g, '><'); // Remove spaces between tags
return this.convert();
}
var formats = this.quill.getFormat(this.quill.selection.savedRange.index);
if (formats[_code2.default.blotName]) {
var text = this.container.innerText;
this.container.innerHTML = '';
return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));
}
var _prepareMatching = this.prepareMatching(),
_prepareMatching2 = _slicedToArray(_prepareMatching, 2),
elementMatchers = _prepareMatching2[0],
textMatchers = _prepareMatching2[1];
var delta = traverse(this.container, elementMatchers, textMatchers);
// Remove trailing newline
if (deltaEndsWith(delta, '\n') && delta.ops[delta.ops.length - 1].attributes == null) {
delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));
}
debug.log('convert', this.container.innerHTML, delta);
this.container.innerHTML = '';
return delta;
}
}, {
key: 'dangerouslyPasteHTML',
value: function dangerouslyPasteHTML(index, html) {
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;
if (typeof index === 'string') {
this.quill.setContents(this.convert(index), html);
this.quill.setSelection(0, _quill2.default.sources.SILENT);
} else {
var paste = this.convert(html);
this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);
this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);
}
}
}, {
key: 'onPaste',
value: function onPaste(e) {
var _this2 = this;
if (e.defaultPrevented || !this.quill.isEnabled()) return;
var range = this.quill.getSelection();
var delta = new _quillDelta2.default().retain(range.index);
var scrollTop = this.quill.scrollingContainer.scrollTop;
this.container.focus();
this.quill.selection.update(_quill2.default.sources.SILENT);
setTimeout(function () {
delta = delta.concat(_this2.convert()).delete(range.length);
_this2.quill.updateContents(delta, _quill2.default.sources.USER);
// range.length contributes to delta.length()
_this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);
_this2.quill.scrollingContainer.scrollTop = scrollTop;
_this2.quill.focus();
}, 1);
}
}, {
key: 'prepareMatching',
value: function prepareMatching() {
var _this3 = this;
var elementMatchers = [],
textMatchers = [];
this.matchers.forEach(function (pair) {
var _pair = _slicedToArray(pair, 2),
selector = _pair[0],
matcher = _pair[1];
switch (selector) {
case Node.TEXT_NODE:
textMatchers.push(matcher);
break;
case Node.ELEMENT_NODE:
elementMatchers.push(matcher);
break;
default:
[].forEach.call(_this3.container.querySelectorAll(selector), function (node) {
// TODO use weakmap
node[DOM_KEY] = node[DOM_KEY] || [];
node[DOM_KEY].push(matcher);
});
break;
}
});
return [elementMatchers, textMatchers];
}
}]);
return Clipboard;
}(_module2.default);
Clipboard.DEFAULTS = {
matchers: [],
matchVisual: true
};
function applyFormat(delta, format, value) {
if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {
return Object.keys(format).reduce(function (delta, key) {
return applyFormat(delta, key, format[key]);
}, delta);
} else {
return delta.reduce(function (delta, op) {
if (op.attributes && op.attributes[format]) {
return delta.push(op);
} else {
return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));
}
}, new _quillDelta2.default());
}
}
function computeStyle(node) {
if (node.nodeType !== Node.ELEMENT_NODE) return {};
var DOM_KEY = '__ql-computed-style';
return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));
}
function deltaEndsWith(delta, text) {
var endText = "";
for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {
var op = delta.ops[i];
if (typeof op.insert !== 'string') break;
endText = op.insert + endText;
}
return endText.slice(-1 * text.length) === text;
}
function isLine(node) {
if (node.childNodes.length === 0) return false; // Exclude embed blocks
var style = computeStyle(node);
return ['block', 'list-item'].indexOf(style.display) > -1;
}
function traverse(node, elementMatchers, textMatchers) {
// Post-order
if (node.nodeType === node.TEXT_NODE) {
return textMatchers.reduce(function (delta, matcher) {
return matcher(node, delta);
}, new _quillDelta2.default());
} else if (node.nodeType === node.ELEMENT_NODE) {
return [].reduce.call(node.childNodes || [], function (delta, childNode) {
var childrenDelta = traverse(childNode, elementMatchers, textMatchers);
if (childNode.nodeType === node.ELEMENT_NODE) {
childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {
return matcher(childNode, childrenDelta);
}, childrenDelta);
childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {
return matcher(childNode, childrenDelta);
}, childrenDelta);
}
return delta.concat(childrenDelta);
}, new _quillDelta2.default());
} else {
return new _quillDelta2.default();
}
}
function matchAlias(format, node, delta) {
return applyFormat(delta, format, true);
}
function matchAttributor(node, delta) {
var attributes = _parchment2.default.Attributor.Attribute.keys(node);
var classes = _parchment2.default.Attributor.Class.keys(node);
var styles = _parchment2.default.Attributor.Style.keys(node);
var formats = {};
attributes.concat(classes).concat(styles).forEach(function (name) {
var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);
if (attr != null) {
formats[attr.attrName] = attr.value(node);
if (formats[attr.attrName]) return;
}
attr = ATTRIBUTE_ATTRIBUTORS[name];
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
formats[attr.attrName] = attr.value(node) || undefined;
}
attr = STYLE_ATTRIBUTORS[name];
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
attr = STYLE_ATTRIBUTORS[name];
formats[attr.attrName] = attr.value(node) || undefined;
}
});
if (Object.keys(formats).length > 0) {
delta = applyFormat(delta, formats);
}
return delta;
}
function matchBlot(node, delta) {
var match = _parchment2.default.query(node);
if (match == null) return delta;
if (match.prototype instanceof _parchment2.default.Embed) {
var embed = {};
var value = match.value(node);
if (value != null) {
embed[match.blotName] = value;
delta = new _quillDelta2.default().insert(embed, match.formats(node));
}
} else if (typeof match.formats === 'function') {
delta = applyFormat(delta, match.blotName, match.formats(node));
}
return delta;
}
function matchBreak(node, delta) {
if (!deltaEndsWith(delta, '\n')) {
delta.insert('\n');
}
return delta;
}
function matchIgnore() {
return new _quillDelta2.default();
}
function matchIndent(node, delta) {
var match = _parchment2.default.query(node);
if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\n')) {
return delta;
}
var indent = -1,
parent = node.parentNode;
while (!parent.classList.contains('ql-clipboard')) {
if ((_parchment2.default.query(parent) || {}).blotName === 'list') {
indent += 1;
}
parent = parent.parentNode;
}
if (indent <= 0) return delta;
return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));
}
function matchNewline(node, delta) {
if (!deltaEndsWith(delta, '\n')) {
if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {
delta.insert('\n');
}
}
return delta;
}
function matchSpacing(node, delta) {
if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\n\n')) {
var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);
if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {
delta.insert('\n');
}
}
return delta;
}
function matchStyles(node, delta) {
var formats = {};
var style = node.style || {};
if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {
formats.italic = true;
}
if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {
formats.bold = true;
}
if (Object.keys(formats).length > 0) {
delta = applyFormat(delta, formats);
}
if (parseFloat(style.textIndent || 0) > 0) {
// Could be 0.5in
delta = new _quillDelta2.default().insert('\t').concat(delta);
}
return delta;
}
function matchText(node, delta) {
var text = node.data;
// Word represents empty line with <o:p> </o:p>
if (node.parentNode.tagName === 'O:P') {
return delta.insert(text.trim());
}
if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {
return delta;
}
if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {
// eslint-disable-next-line func-style
var replacer = function replacer(collapse, match) {
match = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp;
return match.length < 1 && collapse ? ' ' : match;
};
text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' ');
text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace
if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {
text = text.replace(/^\s+/, replacer.bind(replacer, false));
}
if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {
text = text.replace(/\s+$/, replacer.bind(replacer, false));
}
}
return delta.insert(text);
}
exports.default = Clipboard;
exports.matchAttributor = matchAttributor;
exports.matchBlot = matchBlot;
exports.matchNewline = matchNewline;
exports.matchSpacing = matchSpacing;
exports.matchText = matchText;
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Bold = function (_Inline) {
_inherits(Bold, _Inline);
function Bold() {
_classCallCheck(this, Bold);
return _possibleConstructorReturn(this, (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply(this, arguments));
}
_createClass(Bold, [{
key: 'optimize',
value: function optimize(context) {
_get(Bold.prototype.__proto__ || Object.getPrototypeOf(Bold.prototype), 'optimize', this).call(this, context);
if (this.domNode.tagName !== this.statics.tagName[0]) {
this.replaceWith(this.statics.blotName);
}
}
}], [{
key: 'create',
value: function create() {
return _get(Bold.__proto__ || Object.getPrototypeOf(Bold), 'create', this).call(this);
}
}, {
key: 'formats',
value: function formats() {
return true;
}
}]);
return Bold;
}(_inline2.default);
Bold.blotName = 'bold';
Bold.tagName = ['STRONG', 'B'];
exports.default = Bold;
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addControls = exports.default = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _quillDelta = __webpack_require__(2);
var _quillDelta2 = _interopRequireDefault(_quillDelta);
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _logger = __webpack_require__(10);
var _logger2 = _interopRequireDefault(_logger);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var debug = (0, _logger2.default)('quill:toolbar');
var Toolbar = function (_Module) {
_inherits(Toolbar, _Module);
function Toolbar(quill, options) {
_classCallCheck(this, Toolbar);
var _this = _possibleConstructorReturn(this, (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call(this, quill, options));
if (Array.isArray(_this.options.container)) {
var container = document.createElement('div');
addControls(container, _this.options.container);
quill.container.parentNode.insertBefore(container, quill.container);
_this.container = container;
} else if (typeof _this.options.container === 'string') {
_this.container = document.querySelector(_this.options.container);
} else {
_this.container = _this.options.container;
}
if (!(_this.container instanceof HTMLElement)) {
var _ret;
return _ret = debug.error('Container required for toolbar', _this.options), _possibleConstructorReturn(_this, _ret);
}
_this.container.classList.add('ql-toolbar');
_this.controls = [];
_this.handlers = {};
Object.keys(_this.options.handlers).forEach(function (format) {
_this.addHandler(format, _this.options.handlers[format]);
});
[].forEach.call(_this.container.querySelectorAll('button, select'), function (input) {
_this.attach(input);
});
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (type, range) {
if (type === _quill2.default.events.SELECTION_CHANGE) {
_this.update(range);
}
});
_this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
var _this$quill$selection = _this.quill.selection.getRange(),
_this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),
range = _this$quill$selection2[0]; // quill.getSelection triggers update
_this.update(range);
});
return _this;
}
_createClass(Toolbar, [{
key: 'addHandler',
value: function addHandler(format, handler) {
this.handlers[format] = handler;
}
}, {
key: 'attach',
value: function attach(input) {
var _this2 = this;
var format = [].find.call(input.classList, function (className) {
return className.indexOf('ql-') === 0;
});
if (!format) return;
format = format.slice('ql-'.length);
if (input.tagName === 'BUTTON') {
input.setAttribute('type', 'button');
}
if (this.handlers[format] == null) {
if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) {
debug.warn('ignoring attaching to disabled format', format, input);
return;
}
if (_parchment2.default.query(format) == null) {
debug.warn('ignoring attaching to nonexistent format', format, input);
return;
}
}
var eventName = input.tagName === 'SELECT' ? 'change' : 'click';
input.addEventListener(eventName, function (e) {
var value = void 0;
if (input.tagName === 'SELECT') {
if (input.selectedIndex < 0) return;
var selected = input.options[input.selectedIndex];
if (selected.hasAttribute('selected')) {
value = false;
} else {
value = selected.value || false;
}
} else {
if (input.classList.contains('ql-active')) {
value = false;
} else {
value = input.value || !input.hasAttribute('value');
}
e.preventDefault();
}
_this2.quill.focus();
var _quill$selection$getR = _this2.quill.selection.getRange(),
_quill$selection$getR2 = _slicedToArray(_quill$selection$getR, 1),
range = _quill$selection$getR2[0];
if (_this2.handlers[format] != null) {
_this2.handlers[format].call(_this2, value);
} else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) {
value = prompt('Enter ' + format);
if (!value) return;
_this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);
} else {
_this2.quill.format(format, value, _quill2.default.sources.USER);
}
_this2.update(range);
});
// TODO use weakmap
this.controls.push([format, input]);
}
}, {
key: 'update',
value: function update(range) {
var formats = range == null ? {} : this.quill.getFormat(range);
this.controls.forEach(function (pair) {
var _pair = _slicedToArray(pair, 2),
format = _pair[0],
input = _pair[1];
if (input.tagName === 'SELECT') {
var option = void 0;
if (range == null) {
option = null;
} else if (formats[format] == null) {
option = input.querySelector('option[selected]');
} else if (!Array.isArray(formats[format])) {
var value = formats[format];
if (typeof value === 'string') {
value = value.replace(/\"/g, '\\"');
}
option = input.querySelector('option[value="' + value + '"]');
}
if (option == null) {
input.value = ''; // TODO make configurable?
input.selectedIndex = -1;
} else {
option.selected = true;
}
} else {
if (range == null) {
input.classList.remove('ql-active');
} else if (input.hasAttribute('value')) {
// both being null should match (default values)
// '1' should match with 1 (headers)
var isActive = formats[format] === input.getAttribute('value') || formats[format] != null && formats[format].toString() === input.getAttribute('value') || formats[format] == null && !input.getAttribute('value');
input.classList.toggle('ql-active', isActive);
} else {
input.classList.toggle('ql-active', formats[format] != null);
}
}
});
}
}]);
return Toolbar;
}(_module2.default);
Toolbar.DEFAULTS = {};
function addButton(container, format, value) {
var input = document.createElement('button');
input.setAttribute('type', 'button');
input.classList.add('ql-' + format);
if (value != null) {
input.value = value;
}
container.appendChild(input);
}
function addControls(container, groups) {
if (!Array.isArray(groups[0])) {
groups = [groups];
}
groups.forEach(function (controls) {
var group = document.createElement('span');
group.classList.add('ql-formats');
controls.forEach(function (control) {
if (typeof control === 'string') {
addButton(group, control);
} else {
var format = Object.keys(control)[0];
var value = control[format];
if (Array.isArray(value)) {
addSelect(group, format, value);
} else {
addButton(group, format, value);
}
}
});
container.appendChild(group);
});
}
function addSelect(container, format, values) {
var input = document.createElement('select');
input.classList.add('ql-' + format);
values.forEach(function (value) {
var option = document.createElement('option');
if (value !== false) {
option.setAttribute('value', value);
} else {
option.setAttribute('selected', 'selected');
}
input.appendChild(option);
});
container.appendChild(input);
}
Toolbar.DEFAULTS = {
container: null,
handlers: {
clean: function clean() {
var _this3 = this;
var range = this.quill.getSelection();
if (range == null) return;
if (range.length == 0) {
var formats = this.quill.getFormat();
Object.keys(formats).forEach(function (name) {
// Clean functionality in existing apps only clean inline formats
if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) {
_this3.quill.format(name, false);
}
});
} else {
this.quill.removeFormat(range, _quill2.default.sources.USER);
}
},
direction: function direction(value) {
var align = this.quill.getFormat()['align'];
if (value === 'rtl' && align == null) {
this.quill.format('align', 'right', _quill2.default.sources.USER);
} else if (!value && align === 'right') {
this.quill.format('align', false, _quill2.default.sources.USER);
}
this.quill.format('direction', value, _quill2.default.sources.USER);
},
indent: function indent(value) {
var range = this.quill.getSelection();
var formats = this.quill.getFormat(range);
var indent = parseInt(formats.indent || 0);
if (value === '+1' || value === '-1') {
var modifier = value === '+1' ? 1 : -1;
if (formats.direction === 'rtl') modifier *= -1;
this.quill.format('indent', indent + modifier, _quill2.default.sources.USER);
}
},
link: function link(value) {
if (value === true) {
value = prompt('Enter link URL:');
}
this.quill.format('link', value, _quill2.default.sources.USER);
},
list: function list(value) {
var range = this.quill.getSelection();
var formats = this.quill.getFormat(range);
if (value === 'check') {
if (formats['list'] === 'checked' || formats['list'] === 'unchecked') {
this.quill.format('list', false, _quill2.default.sources.USER);
} else {
this.quill.format('list', 'unchecked', _quill2.default.sources.USER);
}
} else {
this.quill.format('list', value, _quill2.default.sources.USER);
}
}
}
};
exports.default = Toolbar;
exports.addControls = addControls;
/***/ }),
/* 58 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <polyline class=\"ql-even ql-stroke\" points=\"5 7 3 9 5 11\"></polyline> <polyline class=\"ql-even ql-stroke\" points=\"13 7 15 9 13 11\"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>";
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _picker = __webpack_require__(28);
var _picker2 = _interopRequireDefault(_picker);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ColorPicker = function (_Picker) {
_inherits(ColorPicker, _Picker);
function ColorPicker(select, label) {
_classCallCheck(this, ColorPicker);
var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, select));
_this.label.innerHTML = label;
_this.container.classList.add('ql-color-picker');
[].slice.call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function (item) {
item.classList.add('ql-primary');
});
return _this;
}
_createClass(ColorPicker, [{
key: 'buildItem',
value: function buildItem(option) {
var item = _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'buildItem', this).call(this, option);
item.style.backgroundColor = option.getAttribute('value') || '';
return item;
}
}, {
key: 'selectItem',
value: function selectItem(item, trigger) {
_get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'selectItem', this).call(this, item, trigger);
var colorLabel = this.label.querySelector('.ql-color-label');
var value = item ? item.getAttribute('data-value') || '' : '';
if (colorLabel) {
if (colorLabel.tagName === 'line') {
colorLabel.style.stroke = value;
} else {
colorLabel.style.fill = value;
}
}
}
}]);
return ColorPicker;
}(_picker2.default);
exports.default = ColorPicker;
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _picker = __webpack_require__(28);
var _picker2 = _interopRequireDefault(_picker);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var IconPicker = function (_Picker) {
_inherits(IconPicker, _Picker);
function IconPicker(select, icons) {
_classCallCheck(this, IconPicker);
var _this = _possibleConstructorReturn(this, (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call(this, select));
_this.container.classList.add('ql-icon-picker');
[].forEach.call(_this.container.querySelectorAll('.ql-picker-item'), function (item) {
item.innerHTML = icons[item.getAttribute('data-value') || ''];
});
_this.defaultItem = _this.container.querySelector('.ql-selected');
_this.selectItem(_this.defaultItem);
return _this;
}
_createClass(IconPicker, [{
key: 'selectItem',
value: function selectItem(item, trigger) {
_get(IconPicker.prototype.__proto__ || Object.getPrototypeOf(IconPicker.prototype), 'selectItem', this).call(this, item, trigger);
item = item || this.defaultItem;
this.label.innerHTML = item.innerHTML;
}
}]);
return IconPicker;
}(_picker2.default);
exports.default = IconPicker;
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Tooltip = function () {
function Tooltip(quill, boundsContainer) {
var _this = this;
_classCallCheck(this, Tooltip);
this.quill = quill;
this.boundsContainer = boundsContainer || document.body;
this.root = quill.addContainer('ql-tooltip');
this.root.innerHTML = this.constructor.TEMPLATE;
if (this.quill.root === this.quill.scrollingContainer) {
this.quill.root.addEventListener('scroll', function () {
_this.root.style.marginTop = -1 * _this.quill.root.scrollTop + 'px';
});
}
this.hide();
}
_createClass(Tooltip, [{
key: 'hide',
value: function hide() {
this.root.classList.add('ql-hidden');
}
}, {
key: 'position',
value: function position(reference) {
var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;
// root.scrollTop should be 0 if scrollContainer !== root
var top = reference.bottom + this.quill.root.scrollTop;
this.root.style.left = left + 'px';
this.root.style.top = top + 'px';
this.root.classList.remove('ql-flip');
var containerBounds = this.boundsContainer.getBoundingClientRect();
var rootBounds = this.root.getBoundingClientRect();
var shift = 0;
if (rootBounds.right > containerBounds.right) {
shift = containerBounds.right - rootBounds.right;
this.root.style.left = left + shift + 'px';
}
if (rootBounds.left < containerBounds.left) {
shift = containerBounds.left - rootBounds.left;
this.root.style.left = left + shift + 'px';
}
if (rootBounds.bottom > containerBounds.bottom) {
var height = rootBounds.bottom - rootBounds.top;
var verticalShift = reference.bottom - reference.top + height;
this.root.style.top = top - verticalShift + 'px';
this.root.classList.add('ql-flip');
}
return shift;
}
}, {
key: 'show',
value: function show() {
this.root.classList.remove('ql-editing');
this.root.classList.remove('ql-hidden');
}
}]);
return Tooltip;
}();
exports.default = Tooltip;
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _emitter = __webpack_require__(8);
var _emitter2 = _interopRequireDefault(_emitter);
var _base = __webpack_require__(43);
var _base2 = _interopRequireDefault(_base);
var _link = __webpack_require__(27);
var _link2 = _interopRequireDefault(_link);
var _selection = __webpack_require__(15);
var _icons = __webpack_require__(41);
var _icons2 = _interopRequireDefault(_icons);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var TOOLBAR_CONFIG = [[{ header: ['1', '2', '3', false] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];
var SnowTheme = function (_BaseTheme) {
_inherits(SnowTheme, _BaseTheme);
function SnowTheme(quill, options) {
_classCallCheck(this, SnowTheme);
if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
options.modules.toolbar.container = TOOLBAR_CONFIG;
}
var _this = _possibleConstructorReturn(this, (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call(this, quill, options));
_this.quill.container.classList.add('ql-snow');
return _this;
}
_createClass(SnowTheme, [{
key: 'extendToolbar',
value: function extendToolbar(toolbar) {
toolbar.container.classList.add('ql-snow');
this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
this.tooltip = new SnowTooltip(this.quill, this.options.bounds);
if (toolbar.container.querySelector('.ql-link')) {
this.quill.keyboard.addBinding({ key: 'K', shortKey: true }, function (range, context) {
toolbar.handlers['link'].call(toolbar, !context.format.link);
});
}
}
}]);
return SnowTheme;
}(_base2.default);
SnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
modules: {
toolbar: {
handlers: {
link: function link(value) {
if (value) {
var range = this.quill.getSelection();
if (range == null || range.length == 0) return;
var preview = this.quill.getText(range);
if (/^\S+@\S+\.\S+$/.test(preview) && preview.indexOf('mailto:') !== 0) {
preview = 'mailto:' + preview;
}
var tooltip = this.quill.theme.tooltip;
tooltip.edit('link', preview);
} else {
this.quill.format('link', false);
}
}
}
}
}
});
var SnowTooltip = function (_BaseTooltip) {
_inherits(SnowTooltip, _BaseTooltip);
function SnowTooltip(quill, bounds) {
_classCallCheck(this, SnowTooltip);
var _this2 = _possibleConstructorReturn(this, (SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip)).call(this, quill, bounds));
_this2.preview = _this2.root.querySelector('a.ql-preview');
return _this2;
}
_createClass(SnowTooltip, [{
key: 'listen',
value: function listen() {
var _this3 = this;
_get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'listen', this).call(this);
this.root.querySelector('a.ql-action').addEventListener('click', function (event) {
if (_this3.root.classList.contains('ql-editing')) {
_this3.save();
} else {
_this3.edit('link', _this3.preview.textContent);
}
event.preventDefault();
});
this.root.querySelector('a.ql-remove').addEventListener('click', function (event) {
if (_this3.linkRange != null) {
var range = _this3.linkRange;
_this3.restoreFocus();
_this3.quill.formatText(range, 'link', false, _emitter2.default.sources.USER);
delete _this3.linkRange;
}
event.preventDefault();
_this3.hide();
});
this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function (range, oldRange, source) {
if (range == null) return;
if (range.length === 0 && source === _emitter2.default.sources.USER) {
var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index),
_quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
link = _quill$scroll$descend2[0],
offset = _quill$scroll$descend2[1];
if (link != null) {
_this3.linkRange = new _selection.Range(range.index - offset, link.length());
var preview = _link2.default.formats(link.domNode);
_this3.preview.textContent = preview;
_this3.preview.setAttribute('href', preview);
_this3.show();
_this3.position(_this3.quill.getBounds(_this3.linkRange));
return;
}
} else {
delete _this3.linkRange;
}
_this3.hide();
});
}
}, {
key: 'show',
value: function show() {
_get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'show', this).call(this);
this.root.removeAttribute('data-mode');
}
}]);
return SnowTooltip;
}(_base.BaseTooltip);
SnowTooltip.TEMPLATE = ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join('');
exports.default = SnowTheme;
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _core = __webpack_require__(29);
var _core2 = _interopRequireDefault(_core);
var _align = __webpack_require__(36);
var _direction = __webpack_require__(38);
var _indent = __webpack_require__(64);
var _blockquote = __webpack_require__(65);
var _blockquote2 = _interopRequireDefault(_blockquote);
var _header = __webpack_require__(66);
var _header2 = _interopRequireDefault(_header);
var _list = __webpack_require__(67);
var _list2 = _interopRequireDefault(_list);
var _background = __webpack_require__(37);
var _color = __webpack_require__(26);
var _font = __webpack_require__(39);
var _size = __webpack_require__(40);
var _bold = __webpack_require__(56);
var _bold2 = _interopRequireDefault(_bold);
var _italic = __webpack_require__(68);
var _italic2 = _interopRequireDefault(_italic);
var _link = __webpack_require__(27);
var _link2 = _interopRequireDefault(_link);
var _script = __webpack_require__(69);
var _script2 = _interopRequireDefault(_script);
var _strike = __webpack_require__(70);
var _strike2 = _interopRequireDefault(_strike);
var _underline = __webpack_require__(71);
var _underline2 = _interopRequireDefault(_underline);
var _image = __webpack_require__(72);
var _image2 = _interopRequireDefault(_image);
var _video = __webpack_require__(73);
var _video2 = _interopRequireDefault(_video);
var _code = __webpack_require__(13);
var _code2 = _interopRequireDefault(_code);
var _formula = __webpack_require__(74);
var _formula2 = _interopRequireDefault(_formula);
var _syntax = __webpack_require__(75);
var _syntax2 = _interopRequireDefault(_syntax);
var _toolbar = __webpack_require__(57);
var _toolbar2 = _interopRequireDefault(_toolbar);
var _icons = __webpack_require__(41);
var _icons2 = _interopRequireDefault(_icons);
var _picker = __webpack_require__(28);
var _picker2 = _interopRequireDefault(_picker);
var _colorPicker = __webpack_require__(59);
var _colorPicker2 = _interopRequireDefault(_colorPicker);
var _iconPicker = __webpack_require__(60);
var _iconPicker2 = _interopRequireDefault(_iconPicker);
var _tooltip = __webpack_require__(61);
var _tooltip2 = _interopRequireDefault(_tooltip);
var _bubble = __webpack_require__(108);
var _bubble2 = _interopRequireDefault(_bubble);
var _snow = __webpack_require__(62);
var _snow2 = _interopRequireDefault(_snow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_core2.default.register({
'attributors/attribute/direction': _direction.DirectionAttribute,
'attributors/class/align': _align.AlignClass,
'attributors/class/background': _background.BackgroundClass,
'attributors/class/color': _color.ColorClass,
'attributors/class/direction': _direction.DirectionClass,
'attributors/class/font': _font.FontClass,
'attributors/class/size': _size.SizeClass,
'attributors/style/align': _align.AlignStyle,
'attributors/style/background': _background.BackgroundStyle,
'attributors/style/color': _color.ColorStyle,
'attributors/style/direction': _direction.DirectionStyle,
'attributors/style/font': _font.FontStyle,
'attributors/style/size': _size.SizeStyle
}, true);
_core2.default.register({
'formats/align': _align.AlignClass,
'formats/direction': _direction.DirectionClass,
'formats/indent': _indent.IndentClass,
'formats/background': _background.BackgroundStyle,
'formats/color': _color.ColorStyle,
'formats/font': _font.FontClass,
'formats/size': _size.SizeClass,
'formats/blockquote': _blockquote2.default,
'formats/code-block': _code2.default,
'formats/header': _header2.default,
'formats/list': _list2.default,
'formats/bold': _bold2.default,
'formats/code': _code.Code,
'formats/italic': _italic2.default,
'formats/link': _link2.default,
'formats/script': _script2.default,
'formats/strike': _strike2.default,
'formats/underline': _underline2.default,
'formats/image': _image2.default,
'formats/video': _video2.default,
'formats/list/item': _list.ListItem,
'modules/formula': _formula2.default,
'modules/syntax': _syntax2.default,
'modules/toolbar': _toolbar2.default,
'themes/bubble': _bubble2.default,
'themes/snow': _snow2.default,
'ui/icons': _icons2.default,
'ui/picker': _picker2.default,
'ui/icon-picker': _iconPicker2.default,
'ui/color-picker': _colorPicker2.default,
'ui/tooltip': _tooltip2.default
}, true);
exports.default = _core2.default;
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IndentClass = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var IdentAttributor = function (_Parchment$Attributor) {
_inherits(IdentAttributor, _Parchment$Attributor);
function IdentAttributor() {
_classCallCheck(this, IdentAttributor);
return _possibleConstructorReturn(this, (IdentAttributor.__proto__ || Object.getPrototypeOf(IdentAttributor)).apply(this, arguments));
}
_createClass(IdentAttributor, [{
key: 'add',
value: function add(node, value) {
if (value === '+1' || value === '-1') {
var indent = this.value(node) || 0;
value = value === '+1' ? indent + 1 : indent - 1;
}
if (value === 0) {
this.remove(node);
return true;
} else {
return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'add', this).call(this, node, value);
}
}
}, {
key: 'canAdd',
value: function canAdd(node, value) {
return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, value) || _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, parseInt(value));
}
}, {
key: 'value',
value: function value(node) {
return parseInt(_get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'value', this).call(this, node)) || undefined; // Don't return NaN
}
}]);
return IdentAttributor;
}(_parchment2.default.Attributor.Class);
var IndentClass = new IdentAttributor('indent', 'ql-indent', {
scope: _parchment2.default.Scope.BLOCK,
whitelist: [1, 2, 3, 4, 5, 6, 7, 8]
});
exports.IndentClass = IndentClass;
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Blockquote = function (_Block) {
_inherits(Blockquote, _Block);
function Blockquote() {
_classCallCheck(this, Blockquote);
return _possibleConstructorReturn(this, (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply(this, arguments));
}
return Blockquote;
}(_block2.default);
Blockquote.blotName = 'blockquote';
Blockquote.tagName = 'blockquote';
exports.default = Blockquote;
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Header = function (_Block) {
_inherits(Header, _Block);
function Header() {
_classCallCheck(this, Header);
return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments));
}
_createClass(Header, null, [{
key: 'formats',
value: function formats(domNode) {
return this.tagName.indexOf(domNode.tagName) + 1;
}
}]);
return Header;
}(_block2.default);
Header.blotName = 'header';
Header.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
exports.default = Header;
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.ListItem = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _block = __webpack_require__(4);
var _block2 = _interopRequireDefault(_block);
var _container = __webpack_require__(25);
var _container2 = _interopRequireDefault(_container);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ListItem = function (_Block) {
_inherits(ListItem, _Block);
function ListItem() {
_classCallCheck(this, ListItem);
return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));
}
_createClass(ListItem, [{
key: 'format',
value: function format(name, value) {
if (name === List.blotName && !value) {
this.replaceWith(_parchment2.default.create(this.statics.scope));
} else {
_get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'format', this).call(this, name, value);
}
}
}, {
key: 'remove',
value: function remove() {
if (this.prev == null && this.next == null) {
this.parent.remove();
} else {
_get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'remove', this).call(this);
}
}
}, {
key: 'replaceWith',
value: function replaceWith(name, value) {
this.parent.isolate(this.offset(this.parent), this.length());
if (name === this.parent.statics.blotName) {
this.parent.replaceWith(name, value);
return this;
} else {
this.parent.unwrap();
return _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'replaceWith', this).call(this, name, value);
}
}
}], [{
key: 'formats',
value: function formats(domNode) {
return domNode.tagName === this.tagName ? undefined : _get(ListItem.__proto__ || Object.getPrototypeOf(ListItem), 'formats', this).call(this, domNode);
}
}]);
return ListItem;
}(_block2.default);
ListItem.blotName = 'list-item';
ListItem.tagName = 'LI';
var List = function (_Container) {
_inherits(List, _Container);
_createClass(List, null, [{
key: 'create',
value: function create(value) {
var tagName = value === 'ordered' ? 'OL' : 'UL';
var node = _get(List.__proto__ || Object.getPrototypeOf(List), 'create', this).call(this, tagName);
if (value === 'checked' || value === 'unchecked') {
node.setAttribute('data-checked', value === 'checked');
}
return node;
}
}, {
key: 'formats',
value: function formats(domNode) {
if (domNode.tagName === 'OL') return 'ordered';
if (domNode.tagName === 'UL') {
if (domNode.hasAttribute('data-checked')) {
return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';
} else {
return 'bullet';
}
}
return undefined;
}
}]);
function List(domNode) {
_classCallCheck(this, List);
var _this2 = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, domNode));
var listEventHandler = function listEventHandler(e) {
if (e.target.parentNode !== domNode) return;
var format = _this2.statics.formats(domNode);
var blot = _parchment2.default.find(e.target);
if (format === 'checked') {
blot.format('list', 'unchecked');
} else if (format === 'unchecked') {
blot.format('list', 'checked');
}
};
domNode.addEventListener('touchstart', listEventHandler);
domNode.addEventListener('mousedown', listEventHandler);
return _this2;
}
_createClass(List, [{
key: 'format',
value: function format(name, value) {
if (this.children.length > 0) {
this.children.tail.format(name, value);
}
}
}, {
key: 'formats',
value: function formats() {
// We don't inherit from FormatBlot
return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
}
}, {
key: 'insertBefore',
value: function insertBefore(blot, ref) {
if (blot instanceof ListItem) {
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'insertBefore', this).call(this, blot, ref);
} else {
var index = ref == null ? this.length() : ref.offset(this);
var after = this.split(index);
after.parent.insertBefore(blot, after);
}
}
}, {
key: 'optimize',
value: function optimize(context) {
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'optimize', this).call(this, context);
var next = this.next;
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {
next.moveChildren(this);
next.remove();
}
}
}, {
key: 'replace',
value: function replace(target) {
if (target.statics.blotName !== this.statics.blotName) {
var item = _parchment2.default.create(this.statics.defaultChild);
target.moveChildren(item);
this.appendChild(item);
}
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'replace', this).call(this, target);
}
}]);
return List;
}(_container2.default);
List.blotName = 'list';
List.scope = _parchment2.default.Scope.BLOCK_BLOT;
List.tagName = ['OL', 'UL'];
List.defaultChild = 'list-item';
List.allowedChildren = [ListItem];
exports.ListItem = ListItem;
exports.default = List;
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _bold = __webpack_require__(56);
var _bold2 = _interopRequireDefault(_bold);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Italic = function (_Bold) {
_inherits(Italic, _Bold);
function Italic() {
_classCallCheck(this, Italic);
return _possibleConstructorReturn(this, (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply(this, arguments));
}
return Italic;
}(_bold2.default);
Italic.blotName = 'italic';
Italic.tagName = ['EM', 'I'];
exports.default = Italic;
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Script = function (_Inline) {
_inherits(Script, _Inline);
function Script() {
_classCallCheck(this, Script);
return _possibleConstructorReturn(this, (Script.__proto__ || Object.getPrototypeOf(Script)).apply(this, arguments));
}
_createClass(Script, null, [{
key: 'create',
value: function create(value) {
if (value === 'super') {
return document.createElement('sup');
} else if (value === 'sub') {
return document.createElement('sub');
} else {
return _get(Script.__proto__ || Object.getPrototypeOf(Script), 'create', this).call(this, value);
}
}
}, {
key: 'formats',
value: function formats(domNode) {
if (domNode.tagName === 'SUB') return 'sub';
if (domNode.tagName === 'SUP') return 'super';
return undefined;
}
}]);
return Script;
}(_inline2.default);
Script.blotName = 'script';
Script.tagName = ['SUB', 'SUP'];
exports.default = Script;
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Strike = function (_Inline) {
_inherits(Strike, _Inline);
function Strike() {
_classCallCheck(this, Strike);
return _possibleConstructorReturn(this, (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply(this, arguments));
}
return Strike;
}(_inline2.default);
Strike.blotName = 'strike';
Strike.tagName = 'S';
exports.default = Strike;
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _inline = __webpack_require__(6);
var _inline2 = _interopRequireDefault(_inline);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Underline = function (_Inline) {
_inherits(Underline, _Inline);
function Underline() {
_classCallCheck(this, Underline);
return _possibleConstructorReturn(this, (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply(this, arguments));
}
return Underline;
}(_inline2.default);
Underline.blotName = 'underline';
Underline.tagName = 'U';
exports.default = Underline;
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _link = __webpack_require__(27);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ATTRIBUTES = ['alt', 'height', 'width'];
var Image = function (_Parchment$Embed) {
_inherits(Image, _Parchment$Embed);
function Image() {
_classCallCheck(this, Image);
return _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).apply(this, arguments));
}
_createClass(Image, [{
key: 'format',
value: function format(name, value) {
if (ATTRIBUTES.indexOf(name) > -1) {
if (value) {
this.domNode.setAttribute(name, value);
} else {
this.domNode.removeAttribute(name);
}
} else {
_get(Image.prototype.__proto__ || Object.getPrototypeOf(Image.prototype), 'format', this).call(this, name, value);
}
}
}], [{
key: 'create',
value: function create(value) {
var node = _get(Image.__proto__ || Object.getPrototypeOf(Image), 'create', this).call(this, value);
if (typeof value === 'string') {
node.setAttribute('src', this.sanitize(value));
}
return node;
}
}, {
key: 'formats',
value: function formats(domNode) {
return ATTRIBUTES.reduce(function (formats, attribute) {
if (domNode.hasAttribute(attribute)) {
formats[attribute] = domNode.getAttribute(attribute);
}
return formats;
}, {});
}
}, {
key: 'match',
value: function match(url) {
return (/\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url)
);
}
}, {
key: 'sanitize',
value: function sanitize(url) {
return (0, _link.sanitize)(url, ['http', 'https', 'data']) ? url : '//:0';
}
}, {
key: 'value',
value: function value(domNode) {
return domNode.getAttribute('src');
}
}]);
return Image;
}(_parchment2.default.Embed);
Image.blotName = 'image';
Image.tagName = 'IMG';
exports.default = Image;
/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _block = __webpack_require__(4);
var _link = __webpack_require__(27);
var _link2 = _interopRequireDefault(_link);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ATTRIBUTES = ['height', 'width'];
var Video = function (_BlockEmbed) {
_inherits(Video, _BlockEmbed);
function Video() {
_classCallCheck(this, Video);
return _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));
}
_createClass(Video, [{
key: 'format',
value: function format(name, value) {
if (ATTRIBUTES.indexOf(name) > -1) {
if (value) {
this.domNode.setAttribute(name, value);
} else {
this.domNode.removeAttribute(name);
}
} else {
_get(Video.prototype.__proto__ || Object.getPrototypeOf(Video.prototype), 'format', this).call(this, name, value);
}
}
}], [{
key: 'create',
value: function create(value) {
var node = _get(Video.__proto__ || Object.getPrototypeOf(Video), 'create', this).call(this, value);
node.setAttribute('frameborder', '0');
node.setAttribute('allowfullscreen', true);
node.setAttribute('src', this.sanitize(value));
return node;
}
}, {
key: 'formats',
value: function formats(domNode) {
return ATTRIBUTES.reduce(function (formats, attribute) {
if (domNode.hasAttribute(attribute)) {
formats[attribute] = domNode.getAttribute(attribute);
}
return formats;
}, {});
}
}, {
key: 'sanitize',
value: function sanitize(url) {
return _link2.default.sanitize(url);
}
}, {
key: 'value',
value: function value(domNode) {
return domNode.getAttribute('src');
}
}]);
return Video;
}(_block.BlockEmbed);
Video.blotName = 'video';
Video.className = 'ql-video';
Video.tagName = 'IFRAME';
exports.default = Video;
/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.FormulaBlot = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _embed = __webpack_require__(35);
var _embed2 = _interopRequireDefault(_embed);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var FormulaBlot = function (_Embed) {
_inherits(FormulaBlot, _Embed);
function FormulaBlot() {
_classCallCheck(this, FormulaBlot);
return _possibleConstructorReturn(this, (FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot)).apply(this, arguments));
}
_createClass(FormulaBlot, null, [{
key: 'create',
value: function create(value) {
var node = _get(FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), 'create', this).call(this, value);
if (typeof value === 'string') {
window.katex.render(value, node, {
throwOnError: false,
errorColor: '#f00'
});
node.setAttribute('data-value', value);
}
return node;
}
}, {
key: 'value',
value: function value(domNode) {
return domNode.getAttribute('data-value');
}
}]);
return FormulaBlot;
}(_embed2.default);
FormulaBlot.blotName = 'formula';
FormulaBlot.className = 'ql-formula';
FormulaBlot.tagName = 'SPAN';
var Formula = function (_Module) {
_inherits(Formula, _Module);
_createClass(Formula, null, [{
key: 'register',
value: function register() {
_quill2.default.register(FormulaBlot, true);
}
}]);
function Formula() {
_classCallCheck(this, Formula);
var _this2 = _possibleConstructorReturn(this, (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this));
if (window.katex == null) {
throw new Error('Formula module requires KaTeX.');
}
return _this2;
}
return Formula;
}(_module2.default);
exports.FormulaBlot = FormulaBlot;
exports.default = Formula;
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.CodeToken = exports.CodeBlock = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _parchment = __webpack_require__(0);
var _parchment2 = _interopRequireDefault(_parchment);
var _quill = __webpack_require__(5);
var _quill2 = _interopRequireDefault(_quill);
var _module = __webpack_require__(9);
var _module2 = _interopRequireDefault(_module);
var _code = __webpack_require__(13);
var _code2 = _interopRequireDefault(_code);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SyntaxCodeBlock = function (_CodeBlock) {
_inherits(SyntaxCodeBlock, _CodeBlock);
function SyntaxCodeBlock() {
_classCallCheck(this, SyntaxCodeBlock);
return _possibleConstructorReturn(this, (SyntaxCodeBlock.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock)).apply(this, arguments));
}
_createClass(SyntaxCodeBlock, [{
key: 'replaceWith',
value: function replaceWith(block) {
this.domNode.textContent = this.domNode.textContent;
this.attach();
_get(SyntaxCodeBlock.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock.prototype), 'replaceWith', this).call(this, block);
}
}, {
key: 'highlight',
value: function highlight(_highlight) {
var text = this.domNode.textContent;
if (this.cachedText !== text) {
if (text.trim().length > 0 || this.cachedText == null) {
this.domNode.innerHTML = _highlight(text);
this.domNode.normalize();
this.attach();
}
this.cachedText = text;
}
}
}]);
return SyntaxCodeBlock;
}(_code2.default);
SyntaxCodeBlock.className = 'ql-syntax';
var CodeToken = new _parchment2.default.Attributor.Class('token', 'hljs', {
scope: _parchment2.default.Scope.INLINE
});
var Syntax = function (_Module) {
_inherits(Syntax, _Module);
_createClass(Syntax, null, [{
key: 'register',
value: function register() {
_quill2.default.register(CodeToken, true);
_quill2.default.register(SyntaxCodeBlock, true);
}
}]);
function Syntax(quill, options) {
_classCallCheck(this, Syntax);
var _this2 = _possibleConstructorReturn(this, (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call(this, quill, options));
if (typeof _this2.options.highlight !== 'function') {
throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');
}
var timer = null;
_this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
clearTimeout(timer);
timer = setTimeout(function () {
_this2.highlight();
timer = null;
}, _this2.options.interval);
});
_this2.highlight();
return _this2;
}
_createClass(Syntax, [{
key: 'highlight',
value: function highlight() {
var _this3 = this;
if (this.quill.selection.composing) return;
this.quill.update(_quill2.default.sources.USER);
var range = this.quill.getSelection();
this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function (code) {
code.highlight(_this3.options.highlight);
});
this.quill.update(_quill2.default.sources.SILENT);
if (range != null) {
this.quill.setSelection(range, _quill2.default.sources.SILENT);
}
}
}]);
return Syntax;
}(_module2.default);
Syntax.DEFAULTS = {
highlight: function () {
if (window.hljs == null) return null;
return function (text) {
var result = window.hljs.highlightAuto(text);
return result.value;
};
}(),
interval: 1000
};
exports.CodeBlock = SyntaxCodeBlock;
exports.CodeToken = CodeToken;
exports.default = Syntax;
/***/ }),
/* 76 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>";
/***/ }),
/* 77 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>";
/***/ }),
/* 78 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>";
/***/ }),
/* 79 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>";
/***/ }),
/* 80 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <g class=\"ql-fill ql-color-label\"> <polygon points=\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points=\"6.817 5 6 5 6 6 6.38 6 6.817 5\"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points=\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points=\"4.63 10 4 10 4 11 4.192 11 4.63 10\"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points=\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points=\"12 6.868 12 6 11.62 6 12 6.868\"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points=\"12.933 9 13 9 13 8 12.495 8 12.933 9\"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points=\"5.5 13 9 5 12.5 13\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>";
/***/ }),
/* 81 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=4 y=5></rect> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=11 y=5></rect> <path class=\"ql-even ql-fill ql-stroke\" d=M7,8c0,4.031-3,5-3,5></path> <path class=\"ql-even ql-fill ql-stroke\" d=M14,8c0,4.031-3,5-3,5></path> </svg>";
/***/ }),
/* 82 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>";
/***/ }),
/* 83 */
/***/ (function(module, exports) {
module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>";
/***/ }),
/* 84 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-color-label ql-stroke ql-transparent\" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points=\"5.5 11 9 3 12.5 11\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>";
/***/ }),
/* 85 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"3 11 5 9 3 7 3 11\"></polygon> <line class=\"ql-stroke ql-fill\" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>";
/***/ }),
/* 86 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"15 12 13 10 15 8 15 12\"></polygon> <line class=\"ql-stroke ql-fill\" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>";
/***/ }),
/* 87 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>";
/***/ }),
/* 88 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>";
/***/ }),
/* 89 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>";
/***/ }),
/* 90 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform=\"translate(24 18) rotate(-180)\"/> </svg>";
/***/ }),
/* 91 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>";
/***/ }),
/* 92 */
/***/ (function(module, exports) {
module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>";
/***/ }),
/* 93 */
/***/ (function(module, exports) {
module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>";
/***/ }),
/* 94 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>";
/***/ }),
/* 95 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class=\"ql-even ql-fill\" points=\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\"></polyline> </svg>";
/***/ }),
/* 96 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=\"ql-fill ql-stroke\" points=\"3 7 3 11 5 9 3 7\"></polyline> </svg>";
/***/ }),
/* 97 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"5 7 5 11 3 9 5 7\"></polyline> </svg>";
/***/ }),
/* 98 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class=\"ql-even ql-stroke\" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class=\"ql-even ql-stroke\" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>";
/***/ }),
/* 99 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class=\"ql-stroke ql-thin\" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class=\"ql-stroke ql-thin\" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class=\"ql-stroke ql-thin\" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>";
/***/ }),
/* 100 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>";
/***/ }),
/* 101 */
/***/ (function(module, exports) {
module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points=\"3 4 4 5 6 3\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points=\"3 14 4 15 6 13\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"3 9 4 10 6 8\"></polyline> </svg>";
/***/ }),
/* 102 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>";
/***/ }),
/* 103 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>";
/***/ }),
/* 104 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-stroke ql-thin\" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>";
/***/ }),
/* 105 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>";
/***/ }),
/* 106 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>";
/***/ }),
/* 107 */
/***/ (function(module, exports) {
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=ql-stroke points=\"7 11 9 13 11 11 7 11\"></polygon> <polygon class=ql-stroke points=\"7 7 9 5 11 7 7 7\"></polygon> </svg>";
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.BubbleTooltip = undefined;
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _extend = __webpack_require__(3);
var _extend2 = _interopRequireDefault(_extend);
var _emitter = __webpack_require__(8);
var _emitter2 = _interopRequireDefault(_emitter);
var _base = __webpack_require__(43);
var _base2 = _interopRequireDefault(_base);
var _selection = __webpack_require__(15);
var _icons = __webpack_require__(41);
var _icons2 = _interopRequireDefault(_icons);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var TOOLBAR_CONFIG = [['bold', 'italic', 'link'], [{ header: 1 }, { header: 2 }, 'blockquote']];
var BubbleTheme = function (_BaseTheme) {
_inherits(BubbleTheme, _BaseTheme);
function BubbleTheme(quill, options) {
_classCallCheck(this, BubbleTheme);
if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
options.modules.toolbar.container = TOOLBAR_CONFIG;
}
var _this = _possibleConstructorReturn(this, (BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme)).call(this, quill, options));
_this.quill.container.classList.add('ql-bubble');
return _this;
}
_createClass(BubbleTheme, [{
key: 'extendToolbar',
value: function extendToolbar(toolbar) {
this.tooltip = new BubbleTooltip(this.quill, this.options.bounds);
this.tooltip.root.appendChild(toolbar.container);
this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
}
}]);
return BubbleTheme;
}(_base2.default);
BubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
modules: {
toolbar: {
handlers: {
link: function link(value) {
if (!value) {
this.quill.format('link', false);
} else {
this.quill.theme.tooltip.edit();
}
}
}
}
}
});
var BubbleTooltip = function (_BaseTooltip) {
_inherits(BubbleTooltip, _BaseTooltip);
function BubbleTooltip(quill, bounds) {
_classCallCheck(this, BubbleTooltip);
var _this2 = _possibleConstructorReturn(this, (BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip)).call(this, quill, bounds));
_this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function (type, range, oldRange, source) {
if (type !== _emitter2.default.events.SELECTION_CHANGE) return;
if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) {
_this2.show();
// Lock our width so we will expand beyond our offsetParent boundaries
_this2.root.style.left = '0px';
_this2.root.style.width = '';
_this2.root.style.width = _this2.root.offsetWidth + 'px';
var lines = _this2.quill.getLines(range.index, range.length);
if (lines.length === 1) {
_this2.position(_this2.quill.getBounds(range));
} else {
var lastLine = lines[lines.length - 1];
var index = _this2.quill.getIndex(lastLine);
var length = Math.min(lastLine.length() - 1, range.index + range.length - index);
var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));
_this2.position(_bounds);
}
} else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {
_this2.hide();
}
});
return _this2;
}
_createClass(BubbleTooltip, [{
key: 'listen',
value: function listen() {
var _this3 = this;
_get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);
this.root.querySelector('.ql-close').addEventListener('click', function () {
_this3.root.classList.remove('ql-editing');
});
this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {
// Let selection be restored by toolbar handlers before repositioning
setTimeout(function () {
if (_this3.root.classList.contains('ql-hidden')) return;
var range = _this3.quill.getSelection();
if (range != null) {
_this3.position(_this3.quill.getBounds(range));
}
}, 1);
});
}
}, {
key: 'cancel',
value: function cancel() {
this.show();
}
}, {
key: 'position',
value: function position(reference) {
var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);
var arrow = this.root.querySelector('.ql-tooltip-arrow');
arrow.style.marginLeft = '';
if (shift === 0) return shift;
arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';
}
}]);
return BubbleTooltip;
}(_base.BaseTooltip);
BubbleTooltip.TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', '</div>'].join('');
exports.BubbleTooltip = BubbleTooltip;
exports.default = BubbleTheme;
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(63);
/***/ })
/******/ ])["default"];
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("b639").Buffer))
/***/ }),
/***/ "9665":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "990b":
/***/ (function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__("9093");
var gOPS = __webpack_require__("2621");
var anObject = __webpack_require__("cb7c");
var Reflect = __webpack_require__("7726").Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
var keys = gOPN.f(anObject(it));
var getSymbols = gOPS.f;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ }),
/***/ "9aa9":
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "9b43":
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__("d8e8");
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);
};
};
/***/ }),
/***/ "9c6c":
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "9c80":
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { e: false, v: exec() };
} catch (e) {
return { e: true, v: e };
}
};
/***/ }),
/***/ "9def":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__("4588");
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ "9e1e":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("79e5")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "a0d3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__("0f7c");
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
/***/ }),
/***/ "a101":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__("00ce");
var callBound = __webpack_require__("545e");
var $WeakSet = GetIntrinsic('%WeakSet%', true);
var $setHas = callBound('WeakSet.prototype.has', true);
if ($setHas) {
var $mapHas = callBound('WeakMap.prototype.has', true);
module.exports = function isWeakSet(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$setHas(x, $setHas);
if ($mapHas) {
try {
$mapHas(x, $mapHas);
} catch (e) {
return true;
}
}
return x instanceof $WeakSet; // core-js workaround, pre-v3
} catch (e) {}
return false;
};
} else {
// eslint-disable-next-line no-unused-vars
module.exports = function isWeakSet(x) {
// `WeakSet` does not exist, or does not have a `has` method
return false;
};
}
/***/ }),
/***/ "a159":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__("e4ae");
var dPs = __webpack_require__("7e90");
var enumBugKeys = __webpack_require__("1691");
var IE_PROTO = __webpack_require__("5559")('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__("1ec9")('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__("32fc").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);
};
/***/ }),
/***/ "a25f":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var navigator = global.navigator;
module.exports = navigator && navigator.userAgent || '';
/***/ }),
/***/ "a481":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__("cb7c");
var toObject = __webpack_require__("4bf8");
var toLength = __webpack_require__("9def");
var toInteger = __webpack_require__("4588");
var advanceStringIndex = __webpack_require__("0390");
var regExpExec = __webpack_require__("5f1b");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
__webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = defined(this);
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
var res = maybeCallNative($replace, regexp, this, replaceValue);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return $replace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "a5b8":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__("d8e8");
function PromiseCapability(C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve);
this.reject = aFunction(reject);
}
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/***/ "a745":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("f410");
/***/ }),
/***/ "a786":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VALIDATION_RULES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ValidationRule; });
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b0b4");
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d225");
/* harmony import */ var _Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bd86");
/**
* Validation Rules of Vue-Form-Builder
* - desc: Validation Rule Info
* - needValue - boolean: Need additional value from user or not? True is yes
* - errorMessage: default error message, can be edit by the users
* -
*/
var VALIDATION_RULES = {
required: {
desc: "Field must have value (at least length must be 1)",
needValue: false,
errorMessage: "This field is required"
},
min: {
desc: "Minimum length of the value. For number field, it will be the value (not length)",
needValue: true,
valueInfo: "Number",
errorMessage: "Minimum value for this field is :min"
},
max: {
desc: "Maximum length of the value. For number field, it will be the value (not length)",
needValue: true,
valueInfo: "Number",
errorMessage: "Maximum value for this field is :max"
},
isEmail: {
desc: "Validate email address",
needValue: false,
errorMessage: "Wrong email address format"
},
regex: {
desc: "Validation the field by using your own Regex Rule",
needValue: true,
valueInfo: "Your Regex Rule here - JavaScript",
errorMessage: "This field value doesn't match with the rule"
},
sameAs: {
desc: "Check if the field has same value with another field",
needValue: true,
valueInfo: "The field name you want to check with",
errorMessage: "This field value doesn't as same as :sameAs"
},
customClosure: {
desc: "Invoke your own method to check your field",
needValue: true,
valueInfo: "Your method name",
errorMessage: "Custom validation failed."
}
};
/**
* Add Validation Rule for the Control Validation
* @param ruleType
* @returns {{errorMessage: (string), type: (string)}}
*/
var ValidationRule = /*#__PURE__*/Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(
/**
* Needed properties
*/
function ValidationRule(ruleType, customErrorMessage) {
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, ValidationRule);
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "ruleType", "");
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "errorMessage", "");
Object(_Users_philipademba_Documents_erpnext_bench_forms_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "additionalValue", "");
this.ruleType = ruleType;
if (ruleType) {
this.errorMessage = customErrorMessage || VALIDATION_RULES[ruleType].errorMessage || "";
}
});
/***/ }),
/***/ "aa47":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiDrag", function() { return MultiDragPlugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return Sortable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Swap", function() { return SwapPlugin; });
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _extends() {
_extends = Object.assign || 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;
};
return _extends.apply(this, arguments);
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
}
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}
var version = "1.10.2";
function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
return !!
/*@__PURE__*/
navigator.userAgent.match(pattern);
}
}
var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
var Edge = userAgent(/Edge/i);
var FireFox = userAgent(/firefox/i);
var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
var IOS = userAgent(/iP(ad|od|hone)/i);
var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
var captureMode = {
capture: false,
passive: false
};
function on(el, event, fn) {
el.addEventListener(event, fn, !IE11OrLess && captureMode);
}
function off(el, event, fn) {
el.removeEventListener(event, fn, !IE11OrLess && captureMode);
}
function matches(
/**HTMLElement*/
el,
/**String*/
selector) {
if (!selector) return;
selector[0] === '>' && (selector = selector.substring(1));
if (el) {
try {
if (el.matches) {
return el.matches(selector);
} else if (el.msMatchesSelector) {
return el.msMatchesSelector(selector);
} else if (el.webkitMatchesSelector) {
return el.webkitMatchesSelector(selector);
}
} catch (_) {
return false;
}
}
return false;
}
function getParentOrHost(el) {
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
}
function closest(
/**HTMLElement*/
el,
/**String*/
selector,
/**HTMLElement*/
ctx, includeCTX) {
if (el) {
ctx = ctx || document;
do {
if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
return el;
}
if (el === ctx) break;
/* jshint boss:true */
} while (el = getParentOrHost(el));
}
return null;
}
var R_SPACE = /\s+/g;
function toggleClass(el, name, state) {
if (el && name) {
if (el.classList) {
el.classList[state ? 'add' : 'remove'](name);
} else {
var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
}
}
}
function css(el, prop, val) {
var style = el && el.style;
if (style) {
if (val === void 0) {
if (document.defaultView && document.defaultView.getComputedStyle) {
val = document.defaultView.getComputedStyle(el, '');
} else if (el.currentStyle) {
val = el.currentStyle;
}
return prop === void 0 ? val : val[prop];
} else {
if (!(prop in style) && prop.indexOf('webkit') === -1) {
prop = '-webkit-' + prop;
}
style[prop] = val + (typeof val === 'string' ? '' : 'px');
}
}
}
function matrix(el, selfOnly) {
var appliedTransforms = '';
if (typeof el === 'string') {
appliedTransforms = el;
} else {
do {
var transform = css(el, 'transform');
if (transform && transform !== 'none') {
appliedTransforms = transform + ' ' + appliedTransforms;
}
/* jshint boss:true */
} while (!selfOnly && (el = el.parentNode));
}
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
/*jshint -W056 */
return matrixFn && new matrixFn(appliedTransforms);
}
function find(ctx, tagName, iterator) {
if (ctx) {
var list = ctx.getElementsByTagName(tagName),
i = 0,
n = list.length;
if (iterator) {
for (; i < n; i++) {
iterator(list[i], i);
}
}
return list;
}
return [];
}
function getWindowScrollingElement() {
var scrollingElement = document.scrollingElement;
if (scrollingElement) {
return scrollingElement;
} else {
return document.documentElement;
}
}
/**
* Returns the "bounding client rect" of given element
* @param {HTMLElement} el The element whose boundingClientRect is wanted
* @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
* @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
* @param {[Boolean]} undoScale Whether the container's scale() should be undone
* @param {[HTMLElement]} container The parent the element will be placed in
* @return {Object} The boundingClientRect of el, with specified adjustments
*/
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
if (!el.getBoundingClientRect && el !== window) return;
var elRect, top, left, bottom, right, height, width;
if (el !== window && el !== getWindowScrollingElement()) {
elRect = el.getBoundingClientRect();
top = elRect.top;
left = elRect.left;
bottom = elRect.bottom;
right = elRect.right;
height = elRect.height;
width = elRect.width;
} else {
top = 0;
left = 0;
bottom = window.innerHeight;
right = window.innerWidth;
height = window.innerHeight;
width = window.innerWidth;
}
if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
// Adjust for translate()
container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
// Not needed on <= IE11
if (!IE11OrLess) {
do {
if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
top -= containerRect.top + parseInt(css(container, 'border-top-width'));
left -= containerRect.left + parseInt(css(container, 'border-left-width'));
bottom = top + elRect.height;
right = left + elRect.width;
break;
}
/* jshint boss:true */
} while (container = container.parentNode);
}
}
if (undoScale && el !== window) {
// Adjust for scale()
var elMatrix = matrix(container || el),
scaleX = elMatrix && elMatrix.a,
scaleY = elMatrix && elMatrix.d;
if (elMatrix) {
top /= scaleY;
left /= scaleX;
width /= scaleX;
height /= scaleY;
bottom = top + height;
right = left + width;
}
}
return {
top: top,
left: left,
bottom: bottom,
right: right,
width: width,
height: height
};
}
/**
* Checks if a side of an element is scrolled past a side of its parents
* @param {HTMLElement} el The element who's side being scrolled out of view is in question
* @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
* @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
* @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
*/
function isScrolledPast(el, elSide, parentSide) {
var parent = getParentAutoScrollElement(el, true),
elSideVal = getRect(el)[elSide];
/* jshint boss:true */
while (parent) {
var parentSideVal = getRect(parent)[parentSide],
visible = void 0;
if (parentSide === 'top' || parentSide === 'left') {
visible = elSideVal >= parentSideVal;
} else {
visible = elSideVal <= parentSideVal;
}
if (!visible) return parent;
if (parent === getWindowScrollingElement()) break;
parent = getParentAutoScrollElement(parent, false);
}
return false;
}
/**
* Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
* and non-draggable elements
* @param {HTMLElement} el The parent element
* @param {Number} childNum The index of the child
* @param {Object} options Parent Sortable's options
* @return {HTMLElement} The child at index childNum, or null if not found
*/
function getChild(el, childNum, options) {
var currentChild = 0,
i = 0,
children = el.children;
while (i < children.length) {
if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {
if (currentChild === childNum) {
return children[i];
}
currentChild++;
}
i++;
}
return null;
}
/**
* Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
* @param {HTMLElement} el Parent element
* @param {selector} selector Any other elements that should be ignored
* @return {HTMLElement} The last child, ignoring ghostEl
*/
function lastChild(el, selector) {
var last = el.lastElementChild;
while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
last = last.previousElementSibling;
}
return last || null;
}
/**
* Returns the index of an element within its parent for a selected set of
* elements
* @param {HTMLElement} el
* @param {selector} selector
* @return {number}
*/
function index(el, selector) {
var index = 0;
if (!el || !el.parentNode) {
return -1;
}
/* jshint boss:true */
while (el = el.previousElementSibling) {
if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
index++;
}
}
return index;
}
/**
* Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
* The value is returned in real pixels.
* @param {HTMLElement} el
* @return {Array} Offsets in the format of [left, top]
*/
function getRelativeScrollOffset(el) {
var offsetLeft = 0,
offsetTop = 0,
winScroller = getWindowScrollingElement();
if (el) {
do {
var elMatrix = matrix(el),
scaleX = elMatrix.a,
scaleY = elMatrix.d;
offsetLeft += el.scrollLeft * scaleX;
offsetTop += el.scrollTop * scaleY;
} while (el !== winScroller && (el = el.parentNode));
}
return [offsetLeft, offsetTop];
}
/**
* Returns the index of the object within the given array
* @param {Array} arr Array that may or may not hold the object
* @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
* @return {Number} The index of the object in the array, or -1
*/
function indexOfObject(arr, obj) {
for (var i in arr) {
if (!arr.hasOwnProperty(i)) continue;
for (var key in obj) {
if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
}
}
return -1;
}
function getParentAutoScrollElement(el, includeSelf) {
// skip to window
if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
var elem = el;
var gotSelf = false;
do {
// we don't need to get elem css if it isn't even overflowing in the first place (performance)
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
var elemCSS = css(elem);
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
if (gotSelf || includeSelf) return elem;
gotSelf = true;
}
}
/* jshint boss:true */
} while (elem = elem.parentNode);
return getWindowScrollingElement();
}
function extend(dst, src) {
if (dst && src) {
for (var key in src) {
if (src.hasOwnProperty(key)) {
dst[key] = src[key];
}
}
}
return dst;
}
function isRectEqual(rect1, rect2) {
return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
}
var _throttleTimeout;
function throttle(callback, ms) {
return function () {
if (!_throttleTimeout) {
var args = arguments,
_this = this;
if (args.length === 1) {
callback.call(_this, args[0]);
} else {
callback.apply(_this, args);
}
_throttleTimeout = setTimeout(function () {
_throttleTimeout = void 0;
}, ms);
}
};
}
function cancelThrottle() {
clearTimeout(_throttleTimeout);
_throttleTimeout = void 0;
}
function scrollBy(el, x, y) {
el.scrollLeft += x;
el.scrollTop += y;
}
function clone(el) {
var Polymer = window.Polymer;
var $ = window.jQuery || window.Zepto;
if (Polymer && Polymer.dom) {
return Polymer.dom(el).cloneNode(true);
} else if ($) {
return $(el).clone(true)[0];
} else {
return el.cloneNode(true);
}
}
function setRect(el, rect) {
css(el, 'position', 'absolute');
css(el, 'top', rect.top);
css(el, 'left', rect.left);
css(el, 'width', rect.width);
css(el, 'height', rect.height);
}
function unsetRect(el) {
css(el, 'position', '');
css(el, 'top', '');
css(el, 'left', '');
css(el, 'width', '');
css(el, 'height', '');
}
var expando = 'Sortable' + new Date().getTime();
function AnimationStateManager() {
var animationStates = [],
animationCallbackId;
return {
captureAnimationState: function captureAnimationState() {
animationStates = [];
if (!this.options.animation) return;
var children = [].slice.call(this.el.children);
children.forEach(function (child) {
if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
animationStates.push({
target: child,
rect: getRect(child)
});
var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
if (child.thisAnimationDuration) {
var childMatrix = matrix(child, true);
if (childMatrix) {
fromRect.top -= childMatrix.f;
fromRect.left -= childMatrix.e;
}
}
child.fromRect = fromRect;
});
},
addAnimationState: function addAnimationState(state) {
animationStates.push(state);
},
removeAnimationState: function removeAnimationState(target) {
animationStates.splice(indexOfObject(animationStates, {
target: target
}), 1);
},
animateAll: function animateAll(callback) {
var _this = this;
if (!this.options.animation) {
clearTimeout(animationCallbackId);
if (typeof callback === 'function') callback();
return;
}
var animating = false,
animationTime = 0;
animationStates.forEach(function (state) {
var time = 0,
target = state.target,
fromRect = target.fromRect,
toRect = getRect(target),
prevFromRect = target.prevFromRect,
prevToRect = target.prevToRect,
animatingRect = state.rect,
targetMatrix = matrix(target, true);
if (targetMatrix) {
// Compensate for current animation
toRect.top -= targetMatrix.f;
toRect.left -= targetMatrix.e;
}
target.toRect = toRect;
if (target.thisAnimationDuration) {
// Could also check if animatingRect is between fromRect and toRect
if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
(animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
// If returning to same place as started from animation and on same axis
time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
}
} // if fromRect != toRect: animate
if (!isRectEqual(toRect, fromRect)) {
target.prevFromRect = fromRect;
target.prevToRect = toRect;
if (!time) {
time = _this.options.animation;
}
_this.animate(target, animatingRect, toRect, time);
}
if (time) {
animating = true;
animationTime = Math.max(animationTime, time);
clearTimeout(target.animationResetTimer);
target.animationResetTimer = setTimeout(function () {
target.animationTime = 0;
target.prevFromRect = null;
target.fromRect = null;
target.prevToRect = null;
target.thisAnimationDuration = null;
}, time);
target.thisAnimationDuration = time;
}
});
clearTimeout(animationCallbackId);
if (!animating) {
if (typeof callback === 'function') callback();
} else {
animationCallbackId = setTimeout(function () {
if (typeof callback === 'function') callback();
}, animationTime);
}
animationStates = [];
},
animate: function animate(target, currentRect, toRect, duration) {
if (duration) {
css(target, 'transition', '');
css(target, 'transform', '');
var elMatrix = matrix(this.el),
scaleX = elMatrix && elMatrix.a,
scaleY = elMatrix && elMatrix.d,
translateX = (currentRect.left - toRect.left) / (scaleX || 1),
translateY = (currentRect.top - toRect.top) / (scaleY || 1);
target.animatingX = !!translateX;
target.animatingY = !!translateY;
css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
repaint(target); // repaint
css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
css(target, 'transform', 'translate3d(0,0,0)');
typeof target.animated === 'number' && clearTimeout(target.animated);
target.animated = setTimeout(function () {
css(target, 'transition', '');
css(target, 'transform', '');
target.animated = false;
target.animatingX = false;
target.animatingY = false;
}, duration);
}
}
};
}
function repaint(target) {
return target.offsetWidth;
}
function calculateRealTime(animatingRect, fromRect, toRect, options) {
return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
}
var plugins = [];
var defaults = {
initializeByDefault: true
};
var PluginManager = {
mount: function mount(plugin) {
// Set default static properties
for (var option in defaults) {
if (defaults.hasOwnProperty(option) && !(option in plugin)) {
plugin[option] = defaults[option];
}
}
plugins.push(plugin);
},
pluginEvent: function pluginEvent(eventName, sortable, evt) {
var _this = this;
this.eventCanceled = false;
evt.cancel = function () {
_this.eventCanceled = true;
};
var eventNameGlobal = eventName + 'Global';
plugins.forEach(function (plugin) {
if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
if (sortable[plugin.pluginName][eventNameGlobal]) {
sortable[plugin.pluginName][eventNameGlobal](_objectSpread({
sortable: sortable
}, evt));
} // Only fire plugin event if plugin is enabled in this sortable,
// and plugin has event defined
if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
sortable[plugin.pluginName][eventName](_objectSpread({
sortable: sortable
}, evt));
}
});
},
initializePlugins: function initializePlugins(sortable, el, defaults, options) {
plugins.forEach(function (plugin) {
var pluginName = plugin.pluginName;
if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
var initialized = new plugin(sortable, el, sortable.options);
initialized.sortable = sortable;
initialized.options = sortable.options;
sortable[pluginName] = initialized; // Add default options from plugin
_extends(defaults, initialized.defaults);
});
for (var option in sortable.options) {
if (!sortable.options.hasOwnProperty(option)) continue;
var modified = this.modifyOption(sortable, option, sortable.options[option]);
if (typeof modified !== 'undefined') {
sortable.options[option] = modified;
}
}
},
getEventProperties: function getEventProperties(name, sortable) {
var eventProperties = {};
plugins.forEach(function (plugin) {
if (typeof plugin.eventProperties !== 'function') return;
_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
});
return eventProperties;
},
modifyOption: function modifyOption(sortable, name, value) {
var modifiedValue;
plugins.forEach(function (plugin) {
// Plugin must exist on the Sortable
if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
}
});
return modifiedValue;
}
};
function dispatchEvent(_ref) {
var sortable = _ref.sortable,
rootEl = _ref.rootEl,
name = _ref.name,
targetEl = _ref.targetEl,
cloneEl = _ref.cloneEl,
toEl = _ref.toEl,
fromEl = _ref.fromEl,
oldIndex = _ref.oldIndex,
newIndex = _ref.newIndex,
oldDraggableIndex = _ref.oldDraggableIndex,
newDraggableIndex = _ref.newDraggableIndex,
originalEvent = _ref.originalEvent,
putSortable = _ref.putSortable,
extraEventProperties = _ref.extraEventProperties;
sortable = sortable || rootEl && rootEl[expando];
if (!sortable) return;
var evt,
options = sortable.options,
onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
if (window.CustomEvent && !IE11OrLess && !Edge) {
evt = new CustomEvent(name, {
bubbles: true,
cancelable: true
});
} else {
evt = document.createEvent('Event');
evt.initEvent(name, true, true);
}
evt.to = toEl || rootEl;
evt.from = fromEl || rootEl;
evt.item = targetEl || rootEl;
evt.clone = cloneEl;
evt.oldIndex = oldIndex;
evt.newIndex = newIndex;
evt.oldDraggableIndex = oldDraggableIndex;
evt.newDraggableIndex = newDraggableIndex;
evt.originalEvent = originalEvent;
evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));
for (var option in allEventProperties) {
evt[option] = allEventProperties[option];
}
if (rootEl) {
rootEl.dispatchEvent(evt);
}
if (options[onName]) {
options[onName].call(sortable, evt);
}
}
var pluginEvent = function pluginEvent(eventName, sortable) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
originalEvent = _ref.evt,
data = _objectWithoutProperties(_ref, ["evt"]);
PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
dragEl: dragEl,
parentEl: parentEl,
ghostEl: ghostEl,
rootEl: rootEl,
nextEl: nextEl,
lastDownEl: lastDownEl,
cloneEl: cloneEl,
cloneHidden: cloneHidden,
dragStarted: moved,
putSortable: putSortable,
activeSortable: Sortable.active,
originalEvent: originalEvent,
oldIndex: oldIndex,
oldDraggableIndex: oldDraggableIndex,
newIndex: newIndex,
newDraggableIndex: newDraggableIndex,
hideGhostForTarget: _hideGhostForTarget,
unhideGhostForTarget: _unhideGhostForTarget,
cloneNowHidden: function cloneNowHidden() {
cloneHidden = true;
},
cloneNowShown: function cloneNowShown() {
cloneHidden = false;
},
dispatchSortableEvent: function dispatchSortableEvent(name) {
_dispatchEvent({
sortable: sortable,
name: name,
originalEvent: originalEvent
});
}
}, data));
};
function _dispatchEvent(info) {
dispatchEvent(_objectSpread({
putSortable: putSortable,
cloneEl: cloneEl,
targetEl: dragEl,
rootEl: rootEl,
oldIndex: oldIndex,
oldDraggableIndex: oldDraggableIndex,
newIndex: newIndex,
newDraggableIndex: newDraggableIndex
}, info));
}
var dragEl,
parentEl,
ghostEl,
rootEl,
nextEl,
lastDownEl,
cloneEl,
cloneHidden,
oldIndex,
newIndex,
oldDraggableIndex,
newDraggableIndex,
activeGroup,
putSortable,
awaitingDragStarted = false,
ignoreNextClick = false,
sortables = [],
tapEvt,
touchEvt,
lastDx,
lastDy,
tapDistanceLeft,
tapDistanceTop,
moved,
lastTarget,
lastDirection,
pastFirstInvertThresh = false,
isCircumstantialInvert = false,
targetMoveDistance,
// For positioning ghost absolutely
ghostRelativeParent,
ghostRelativeParentInitialScroll = [],
// (left, top)
_silent = false,
savedInputChecked = [];
/** @const */
var documentExists = typeof document !== 'undefined',
PositionGhostAbsolutely = IOS,
CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
// This will not pass for IE9, because IE9 DnD only works on anchors
supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
supportCssPointerEvents = function () {
if (!documentExists) return; // false when <= IE11
if (IE11OrLess) {
return false;
}
var el = document.createElement('x');
el.style.cssText = 'pointer-events:auto';
return el.style.pointerEvents === 'auto';
}(),
_detectDirection = function _detectDirection(el, options) {
var elCSS = css(el),
elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
child1 = getChild(el, 0, options),
child2 = getChild(el, 1, options),
firstChildCSS = child1 && css(child1),
secondChildCSS = child2 && css(child2),
firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
if (elCSS.display === 'flex') {
return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
}
if (elCSS.display === 'grid') {
return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
}
if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
}
return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
},
_dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
dragElOppLength = vertical ? dragRect.width : dragRect.height,
targetS1Opp = vertical ? targetRect.left : targetRect.top,
targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
targetOppLength = vertical ? targetRect.width : targetRect.height;
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
},
/**
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
* @param {Number} x X position
* @param {Number} y Y position
* @return {HTMLElement} Element of the first found nearest Sortable
*/
_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
var ret;
sortables.some(function (sortable) {
if (lastChild(sortable)) return;
var rect = getRect(sortable),
threshold = sortable[expando].options.emptyInsertThreshold,
insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
if (threshold && insideHorizontally && insideVertically) {
return ret = sortable;
}
});
return ret;
},
_prepareGroup = function _prepareGroup(options) {
function toFn(value, pull) {
return function (to, from, dragEl, evt) {
var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
if (value == null && (pull || sameGroup)) {
// Default pull value
// Default pull and put value if same group
return true;
} else if (value == null || value === false) {
return false;
} else if (pull && value === 'clone') {
return value;
} else if (typeof value === 'function') {
return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
} else {
var otherGroup = (pull ? to : from).options.group.name;
return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
}
};
}
var group = {};
var originalGroup = options.group;
if (!originalGroup || _typeof(originalGroup) != 'object') {
originalGroup = {
name: originalGroup
};
}
group.name = originalGroup.name;
group.checkPull = toFn(originalGroup.pull, true);
group.checkPut = toFn(originalGroup.put);
group.revertClone = originalGroup.revertClone;
options.group = group;
},
_hideGhostForTarget = function _hideGhostForTarget() {
if (!supportCssPointerEvents && ghostEl) {
css(ghostEl, 'display', 'none');
}
},
_unhideGhostForTarget = function _unhideGhostForTarget() {
if (!supportCssPointerEvents && ghostEl) {
css(ghostEl, 'display', '');
}
}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
if (documentExists) {
document.addEventListener('click', function (evt) {
if (ignoreNextClick) {
evt.preventDefault();
evt.stopPropagation && evt.stopPropagation();
evt.stopImmediatePropagation && evt.stopImmediatePropagation();
ignoreNextClick = false;
return false;
}
}, true);
}
var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
if (dragEl) {
evt = evt.touches ? evt.touches[0] : evt;
var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
if (nearest) {
// Create imitation event
var event = {};
for (var i in evt) {
if (evt.hasOwnProperty(i)) {
event[i] = evt[i];
}
}
event.target = event.rootEl = nearest;
event.preventDefault = void 0;
event.stopPropagation = void 0;
nearest[expando]._onDragOver(event);
}
}
};
var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
if (dragEl) {
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
}
};
/**
* @class Sortable
* @param {HTMLElement} el
* @param {Object} [options]
*/
function Sortable(el, options) {
if (!(el && el.nodeType && el.nodeType === 1)) {
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
}
this.el = el; // root element
this.options = options = _extends({}, options); // Export instance
el[expando] = this;
var defaults = {
group: null,
sort: true,
disabled: false,
store: null,
handle: null,
draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
swapThreshold: 1,
// percentage; 0 <= x <= 1
invertSwap: false,
// invert always
invertedSwapThreshold: null,
// will be set to same as swapThreshold if default
removeCloneOnHide: true,
direction: function direction() {
return _detectDirection(el, this.options);
},
ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen',
dragClass: 'sortable-drag',
ignore: 'a, img',
filter: null,
preventOnFilter: true,
animation: 0,
easing: null,
setData: function setData(dataTransfer, dragEl) {
dataTransfer.setData('Text', dragEl.textContent);
},
dropBubble: false,
dragoverBubble: false,
dataIdAttr: 'data-id',
delay: 0,
delayOnTouchOnly: false,
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
forceFallback: false,
fallbackClass: 'sortable-fallback',
fallbackOnBody: false,
fallbackTolerance: 0,
fallbackOffset: {
x: 0,
y: 0
},
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window,
emptyInsertThreshold: 5
};
PluginManager.initializePlugins(this, el, defaults); // Set default options
for (var name in defaults) {
!(name in options) && (options[name] = defaults[name]);
}
_prepareGroup(options); // Bind all private methods
for (var fn in this) {
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
this[fn] = this[fn].bind(this);
}
} // Setup drag mode
this.nativeDraggable = options.forceFallback ? false : supportDraggable;
if (this.nativeDraggable) {
// Touch start threshold cannot be greater than the native dragstart threshold
this.options.touchStartThreshold = 1;
} // Bind events
if (options.supportPointer) {
on(el, 'pointerdown', this._onTapStart);
} else {
on(el, 'mousedown', this._onTapStart);
on(el, 'touchstart', this._onTapStart);
}
if (this.nativeDraggable) {
on(el, 'dragover', this);
on(el, 'dragenter', this);
}
sortables.push(this.el); // Restore sorting
options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
_extends(this, AnimationStateManager());
}
Sortable.prototype =
/** @lends Sortable.prototype */
{
constructor: Sortable,
_isOutsideThisEl: function _isOutsideThisEl(target) {
if (!this.el.contains(target) && target !== this.el) {
lastTarget = null;
}
},
_getDirection: function _getDirection(evt, target) {
return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
},
_onTapStart: function _onTapStart(
/** Event|TouchEvent */
evt) {
if (!evt.cancelable) return;
var _this = this,
el = this.el,
options = this.options,
preventOnFilter = options.preventOnFilter,
type = evt.type,
touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
target = (touch || evt).target,
originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
filter = options.filter;
_saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
if (dragEl) {
return;
}
if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
return; // only left button and enabled
} // cancel dnd if original target is content editable
if (originalTarget.isContentEditable) {
return;
}
target = closest(target, options.draggable, el, false);
if (target && target.animated) {
return;
}
if (lastDownEl === target) {
// Ignoring duplicate `down`
return;
} // Get the index of the dragged element within its parent
oldIndex = index(target);
oldDraggableIndex = index(target, options.draggable); // Check filter
if (typeof filter === 'function') {
if (filter.call(this, evt, target, this)) {
_dispatchEvent({
sortable: _this,
rootEl: originalTarget,
name: 'filter',
targetEl: target,
toEl: el,
fromEl: el
});
pluginEvent('filter', _this, {
evt: evt
});
preventOnFilter && evt.cancelable && evt.preventDefault();
return; // cancel dnd
}
} else if (filter) {
filter = filter.split(',').some(function (criteria) {
criteria = closest(originalTarget, criteria.trim(), el, false);
if (criteria) {
_dispatchEvent({
sortable: _this,
rootEl: criteria,
name: 'filter',
targetEl: target,
fromEl: el,
toEl: el
});
pluginEvent('filter', _this, {
evt: evt
});
return true;
}
});
if (filter) {
preventOnFilter && evt.cancelable && evt.preventDefault();
return; // cancel dnd
}
}
if (options.handle && !closest(originalTarget, options.handle, el, false)) {
return;
} // Prepare `dragstart`
this._prepareDragStart(evt, touch, target);
},
_prepareDragStart: function _prepareDragStart(
/** Event */
evt,
/** Touch */
touch,
/** HTMLElement */
target) {
var _this = this,
el = _this.el,
options = _this.options,
ownerDocument = el.ownerDocument,
dragStartFn;
if (target && !dragEl && target.parentNode === el) {
var dragRect = getRect(target);
rootEl = el;
dragEl = target;
parentEl = dragEl.parentNode;
nextEl = dragEl.nextSibling;
lastDownEl = target;
activeGroup = options.group;
Sortable.dragged = dragEl;
tapEvt = {
target: dragEl,
clientX: (touch || evt).clientX,
clientY: (touch || evt).clientY
};
tapDistanceLeft = tapEvt.clientX - dragRect.left;
tapDistanceTop = tapEvt.clientY - dragRect.top;
this._lastX = (touch || evt).clientX;
this._lastY = (touch || evt).clientY;
dragEl.style['will-change'] = 'all';
dragStartFn = function dragStartFn() {
pluginEvent('delayEnded', _this, {
evt: evt
});
if (Sortable.eventCanceled) {
_this._onDrop();
return;
} // Delayed drag has been triggered
// we can re-enable the events: touchmove/mousemove
_this._disableDelayedDragEvents();
if (!FireFox && _this.nativeDraggable) {
dragEl.draggable = true;
} // Bind the events: dragstart/dragend
_this._triggerDragStart(evt, touch); // Drag start event
_dispatchEvent({
sortable: _this,
name: 'choose',
originalEvent: evt
}); // Chosen item
toggleClass(dragEl, options.chosenClass, true);
}; // Disable "draggable"
options.ignore.split(',').forEach(function (criteria) {
find(dragEl, criteria.trim(), _disableDraggable);
});
on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
on(ownerDocument, 'mouseup', _this._onDrop);
on(ownerDocument, 'touchend', _this._onDrop);
on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
if (FireFox && this.nativeDraggable) {
this.options.touchStartThreshold = 4;
dragEl.draggable = true;
}
pluginEvent('delayStart', this, {
evt: evt
}); // Delay is impossible for native DnD in Edge or IE
if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
if (Sortable.eventCanceled) {
this._onDrop();
return;
} // If the user moves the pointer or let go the click or touch
// before the delay has been reached:
// disable the delayed drag
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
_this._dragStartTimer = setTimeout(dragStartFn, options.delay);
} else {
dragStartFn();
}
}
},
_delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
/** TouchEvent|PointerEvent **/
e) {
var touch = e.touches ? e.touches[0] : e;
if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
this._disableDelayedDrag();
}
},
_disableDelayedDrag: function _disableDelayedDrag() {
dragEl && _disableDraggable(dragEl);
clearTimeout(this._dragStartTimer);
this._disableDelayedDragEvents();
},
_disableDelayedDragEvents: function _disableDelayedDragEvents() {
var ownerDocument = this.el.ownerDocument;
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
off(ownerDocument, 'touchend', this._disableDelayedDrag);
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
},
_triggerDragStart: function _triggerDragStart(
/** Event */
evt,
/** Touch */
touch) {
touch = touch || evt.pointerType == 'touch' && evt;
if (!this.nativeDraggable || touch) {
if (this.options.supportPointer) {
on(document, 'pointermove', this._onTouchMove);
} else if (touch) {
on(document, 'touchmove', this._onTouchMove);
} else {
on(document, 'mousemove', this._onTouchMove);
}
} else {
on(dragEl, 'dragend', this);
on(rootEl, 'dragstart', this._onDragStart);
}
try {
if (document.selection) {
// Timeout neccessary for IE9
_nextTick(function () {
document.selection.empty();
});
} else {
window.getSelection().removeAllRanges();
}
} catch (err) {}
},
_dragStarted: function _dragStarted(fallback, evt) {
awaitingDragStarted = false;
if (rootEl && dragEl) {
pluginEvent('dragStarted', this, {
evt: evt
});
if (this.nativeDraggable) {
on(document, 'dragover', _checkOutsideTargetEl);
}
var options = this.options; // Apply effect
!fallback && toggleClass(dragEl, options.dragClass, false);
toggleClass(dragEl, options.ghostClass, true);
Sortable.active = this;
fallback && this._appendGhost(); // Drag start event
_dispatchEvent({
sortable: this,
name: 'start',
originalEvent: evt
});
} else {
this._nulling();
}
},
_emulateDragOver: function _emulateDragOver() {
if (touchEvt) {
this._lastX = touchEvt.clientX;
this._lastY = touchEvt.clientY;
_hideGhostForTarget();
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
var parent = target;
while (target && target.shadowRoot) {
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
if (target === parent) break;
parent = target;
}
dragEl.parentNode[expando]._isOutsideThisEl(target);
if (parent) {
do {
if (parent[expando]) {
var inserted = void 0;
inserted = parent[expando]._onDragOver({
clientX: touchEvt.clientX,
clientY: touchEvt.clientY,
target: target,
rootEl: parent
});
if (inserted && !this.options.dragoverBubble) {
break;
}
}
target = parent; // store last element
}
/* jshint boss:true */
while (parent = parent.parentNode);
}
_unhideGhostForTarget();
}
},
_onTouchMove: function _onTouchMove(
/**TouchEvent*/
evt) {
if (tapEvt) {
var options = this.options,
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
ghostMatrix = ghostEl && matrix(ghostEl, true),
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
if (!Sortable.active && !awaitingDragStarted) {
if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
return;
}
this._onDragStart(evt, true);
}
if (ghostEl) {
if (ghostMatrix) {
ghostMatrix.e += dx - (lastDx || 0);
ghostMatrix.f += dy - (lastDy || 0);
} else {
ghostMatrix = {
a: 1,
b: 0,
c: 0,
d: 1,
e: dx,
f: dy
};
}
var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
css(ghostEl, 'webkitTransform', cssMatrix);
css(ghostEl, 'mozTransform', cssMatrix);
css(ghostEl, 'msTransform', cssMatrix);
css(ghostEl, 'transform', cssMatrix);
lastDx = dx;
lastDy = dy;
touchEvt = touch;
}
evt.cancelable && evt.preventDefault();
}
},
_appendGhost: function _appendGhost() {
// Bug if using scale(): https://stackoverflow.com/questions/2637058
// Not being adjusted for
if (!ghostEl) {
var container = this.options.fallbackOnBody ? document.body : rootEl,
rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
options = this.options; // Position absolutely
if (PositionGhostAbsolutely) {
// Get relatively positioned parent
ghostRelativeParent = container;
while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
ghostRelativeParent = ghostRelativeParent.parentNode;
}
if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
rect.top += ghostRelativeParent.scrollTop;
rect.left += ghostRelativeParent.scrollLeft;
} else {
ghostRelativeParent = getWindowScrollingElement();
}
ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
}
ghostEl = dragEl.cloneNode(true);
toggleClass(ghostEl, options.ghostClass, false);
toggleClass(ghostEl, options.fallbackClass, true);
toggleClass(ghostEl, options.dragClass, true);
css(ghostEl, 'transition', '');
css(ghostEl, 'transform', '');
css(ghostEl, 'box-sizing', 'border-box');
css(ghostEl, 'margin', 0);
css(ghostEl, 'top', rect.top);
css(ghostEl, 'left', rect.left);
css(ghostEl, 'width', rect.width);
css(ghostEl, 'height', rect.height);
css(ghostEl, 'opacity', '0.8');
css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
css(ghostEl, 'zIndex', '100000');
css(ghostEl, 'pointerEvents', 'none');
Sortable.ghost = ghostEl;
container.appendChild(ghostEl); // Set transform-origin
css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
}
},
_onDragStart: function _onDragStart(
/**Event*/
evt,
/**boolean*/
fallback) {
var _this = this;
var dataTransfer = evt.dataTransfer;
var options = _this.options;
pluginEvent('dragStart', this, {
evt: evt
});
if (Sortable.eventCanceled) {
this._onDrop();
return;
}
pluginEvent('setupClone', this);
if (!Sortable.eventCanceled) {
cloneEl = clone(dragEl);
cloneEl.draggable = false;
cloneEl.style['will-change'] = '';
this._hideClone();
toggleClass(cloneEl, this.options.chosenClass, false);
Sortable.clone = cloneEl;
} // #1143: IFrame support workaround
_this.cloneId = _nextTick(function () {
pluginEvent('clone', _this);
if (Sortable.eventCanceled) return;
if (!_this.options.removeCloneOnHide) {
rootEl.insertBefore(cloneEl, dragEl);
}
_this._hideClone();
_dispatchEvent({
sortable: _this,
name: 'clone'
});
});
!fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
if (fallback) {
ignoreNextClick = true;
_this._loopId = setInterval(_this._emulateDragOver, 50);
} else {
// Undo what was set in _prepareDragStart before drag started
off(document, 'mouseup', _this._onDrop);
off(document, 'touchend', _this._onDrop);
off(document, 'touchcancel', _this._onDrop);
if (dataTransfer) {
dataTransfer.effectAllowed = 'move';
options.setData && options.setData.call(_this, dataTransfer, dragEl);
}
on(document, 'drop', _this); // #1276 fix:
css(dragEl, 'transform', 'translateZ(0)');
}
awaitingDragStarted = true;
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
on(document, 'selectstart', _this);
moved = true;
if (Safari) {
css(document.body, 'user-select', 'none');
}
},
// Returns true - if no further action is needed (either inserted or another condition)
_onDragOver: function _onDragOver(
/**Event*/
evt) {
var el = this.el,
target = evt.target,
dragRect,
targetRect,
revert,
options = this.options,
group = options.group,
activeSortable = Sortable.active,
isOwner = activeGroup === group,
canSort = options.sort,
fromSortable = putSortable || activeSortable,
vertical,
_this = this,
completedFired = false;
if (_silent) return;
function dragOverEvent(name, extra) {
pluginEvent(name, _this, _objectSpread({
evt: evt,
isOwner: isOwner,
axis: vertical ? 'vertical' : 'horizontal',
revert: revert,
dragRect: dragRect,
targetRect: targetRect,
canSort: canSort,
fromSortable: fromSortable,
target: target,
completed: completed,
onMove: function onMove(target, after) {
return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
},
changed: changed
}, extra));
} // Capture animation state
function capture() {
dragOverEvent('dragOverAnimationCapture');
_this.captureAnimationState();
if (_this !== fromSortable) {
fromSortable.captureAnimationState();
}
} // Return invocation when dragEl is inserted (or completed)
function completed(insertion) {
dragOverEvent('dragOverCompleted', {
insertion: insertion
});
if (insertion) {
// Clones must be hidden before folding animation to capture dragRectAbsolute properly
if (isOwner) {
activeSortable._hideClone();
} else {
activeSortable._showClone(_this);
}
if (_this !== fromSortable) {
// Set ghost class to new sortable's ghost class
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
toggleClass(dragEl, options.ghostClass, true);
}
if (putSortable !== _this && _this !== Sortable.active) {
putSortable = _this;
} else if (_this === Sortable.active && putSortable) {
putSortable = null;
} // Animation
if (fromSortable === _this) {
_this._ignoreWhileAnimating = target;
}
_this.animateAll(function () {
dragOverEvent('dragOverAnimationComplete');
_this._ignoreWhileAnimating = null;
});
if (_this !== fromSortable) {
fromSortable.animateAll();
fromSortable._ignoreWhileAnimating = null;
}
} // Null lastTarget if it is not inside a previously swapped element
if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
lastTarget = null;
} // no bubbling and not fallback
if (!options.dragoverBubble && !evt.rootEl && target !== document) {
dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
!insertion && nearestEmptyInsertDetectEvent(evt);
}
!options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
return completedFired = true;
} // Call when dragEl has been inserted
function changed() {
newIndex = index(dragEl);
newDraggableIndex = index(dragEl, options.draggable);
_dispatchEvent({
sortable: _this,
name: 'change',
toEl: el,
newIndex: newIndex,
newDraggableIndex: newDraggableIndex,
originalEvent: evt
});
}
if (evt.preventDefault !== void 0) {
evt.cancelable && evt.preventDefault();
}
target = closest(target, options.draggable, el, true);
dragOverEvent('dragOver');
if (Sortable.eventCanceled) return completedFired;
if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
return completed(false);
}
ignoreNextClick = false;
if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
: putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
vertical = this._getDirection(evt, target) === 'vertical';
dragRect = getRect(dragEl);
dragOverEvent('dragOverValid');
if (Sortable.eventCanceled) return completedFired;
if (revert) {
parentEl = rootEl; // actualization
capture();
this._hideClone();
dragOverEvent('revert');
if (!Sortable.eventCanceled) {
if (nextEl) {
rootEl.insertBefore(dragEl, nextEl);
} else {
rootEl.appendChild(dragEl);
}
}
return completed(true);
}
var elLastChild = lastChild(el, options.draggable);
if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
// If already at end of list: Do not insert
if (elLastChild === dragEl) {
return completed(false);
} // assign target only if condition is true
if (elLastChild && el === evt.target) {
target = elLastChild;
}
if (target) {
targetRect = getRect(target);
}
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
capture();
el.appendChild(dragEl);
parentEl = el; // actualization
changed();
return completed(true);
}
} else if (target.parentNode === el) {
targetRect = getRect(target);
var direction = 0,
targetBeforeFirstSwap,
differentLevel = dragEl.parentNode !== el,
differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
side1 = vertical ? 'top' : 'left',
scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
if (lastTarget !== target) {
targetBeforeFirstSwap = targetRect[side1];
pastFirstInvertThresh = false;
isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
}
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
var sibling;
if (direction !== 0) {
// Check if target is beside dragEl in respective direction (ignoring hidden elements)
var dragIndex = index(dragEl);
do {
dragIndex -= direction;
sibling = parentEl.children[dragIndex];
} while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
} // If dragEl is already beside target: Do not insert
if (direction === 0 || sibling === target) {
return completed(false);
}
lastTarget = target;
lastDirection = direction;
var nextSibling = target.nextElementSibling,
after = false;
after = direction === 1;
var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
if (moveVector !== false) {
if (moveVector === 1 || moveVector === -1) {
after = moveVector === 1;
}
_silent = true;
setTimeout(_unsilent, 30);
capture();
if (after && !nextSibling) {
el.appendChild(dragEl);
} else {
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
} // Undo chrome's scroll adjustment (has no effect on other browsers)
if (scrolledPastTop) {
scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
}
parentEl = dragEl.parentNode; // actualization
// must be done before animation
if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
}
changed();
return completed(true);
}
}
if (el.contains(dragEl)) {
return completed(false);
}
}
return false;
},
_ignoreWhileAnimating: null,
_offMoveEvents: function _offMoveEvents() {
off(document, 'mousemove', this._onTouchMove);
off(document, 'touchmove', this._onTouchMove);
off(document, 'pointermove', this._onTouchMove);
off(document, 'dragover', nearestEmptyInsertDetectEvent);
off(document, 'mousemove', nearestEmptyInsertDetectEvent);
off(document, 'touchmove', nearestEmptyInsertDetectEvent);
},
_offUpEvents: function _offUpEvents() {
var ownerDocument = this.el.ownerDocument;
off(ownerDocument, 'mouseup', this._onDrop);
off(ownerDocument, 'touchend', this._onDrop);
off(ownerDocument, 'pointerup', this._onDrop);
off(ownerDocument, 'touchcancel', this._onDrop);
off(document, 'selectstart', this);
},
_onDrop: function _onDrop(
/**Event*/
evt) {
var el = this.el,
options = this.options; // Get the index of the dragged element within its parent
newIndex = index(dragEl);
newDraggableIndex = index(dragEl, options.draggable);
pluginEvent('drop', this, {
evt: evt
});
parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
newIndex = index(dragEl);
newDraggableIndex = index(dragEl, options.draggable);
if (Sortable.eventCanceled) {
this._nulling();
return;
}
awaitingDragStarted = false;
isCircumstantialInvert = false;
pastFirstInvertThresh = false;
clearInterval(this._loopId);
clearTimeout(this._dragStartTimer);
_cancelNextTick(this.cloneId);
_cancelNextTick(this._dragStartId); // Unbind events
if (this.nativeDraggable) {
off(document, 'drop', this);
off(el, 'dragstart', this._onDragStart);
}
this._offMoveEvents();
this._offUpEvents();
if (Safari) {
css(document.body, 'user-select', '');
}
css(dragEl, 'transform', '');
if (evt) {
if (moved) {
evt.cancelable && evt.preventDefault();
!options.dropBubble && evt.stopPropagation();
}
ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
// Remove clone(s)
cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
}
if (dragEl) {
if (this.nativeDraggable) {
off(dragEl, 'dragend', this);
}
_disableDraggable(dragEl);
dragEl.style['will-change'] = ''; // Remove classes
// ghostClass is added in dragStarted
if (moved && !awaitingDragStarted) {
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
}
toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
_dispatchEvent({
sortable: this,
name: 'unchoose',
toEl: parentEl,
newIndex: null,
newDraggableIndex: null,
originalEvent: evt
});
if (rootEl !== parentEl) {
if (newIndex >= 0) {
// Add event
_dispatchEvent({
rootEl: parentEl,
name: 'add',
toEl: parentEl,
fromEl: rootEl,
originalEvent: evt
}); // Remove event
_dispatchEvent({
sortable: this,
name: 'remove',
toEl: parentEl,
originalEvent: evt
}); // drag from one list and drop into another
_dispatchEvent({
rootEl: parentEl,
name: 'sort',
toEl: parentEl,
fromEl: rootEl,
originalEvent: evt
});
_dispatchEvent({
sortable: this,
name: 'sort',
toEl: parentEl,
originalEvent: evt
});
}
putSortable && putSortable.save();
} else {
if (newIndex !== oldIndex) {
if (newIndex >= 0) {
// drag & drop within the same list
_dispatchEvent({
sortable: this,
name: 'update',
toEl: parentEl,
originalEvent: evt
});
_dispatchEvent({
sortable: this,
name: 'sort',
toEl: parentEl,
originalEvent: evt
});
}
}
}
if (Sortable.active) {
/* jshint eqnull:true */
if (newIndex == null || newIndex === -1) {
newIndex = oldIndex;
newDraggableIndex = oldDraggableIndex;
}
_dispatchEvent({
sortable: this,
name: 'end',
toEl: parentEl,
originalEvent: evt
}); // Save sorting
this.save();
}
}
}
this._nulling();
},
_nulling: function _nulling() {
pluginEvent('nulling', this);
rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
savedInputChecked.forEach(function (el) {
el.checked = true;
});
savedInputChecked.length = lastDx = lastDy = 0;
},
handleEvent: function handleEvent(
/**Event*/
evt) {
switch (evt.type) {
case 'drop':
case 'dragend':
this._onDrop(evt);
break;
case 'dragenter':
case 'dragover':
if (dragEl) {
this._onDragOver(evt);
_globalDragOver(evt);
}
break;
case 'selectstart':
evt.preventDefault();
break;
}
},
/**
* Serializes the item into an array of string.
* @returns {String[]}
*/
toArray: function toArray() {
var order = [],
el,
children = this.el.children,
i = 0,
n = children.length,
options = this.options;
for (; i < n; i++) {
el = children[i];
if (closest(el, options.draggable, this.el, false)) {
order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
}
}
return order;
},
/**
* Sorts the elements according to the array.
* @param {String[]} order order of the items
*/
sort: function sort(order) {
var items = {},
rootEl = this.el;
this.toArray().forEach(function (id, i) {
var el = rootEl.children[i];
if (closest(el, this.options.draggable, rootEl, false)) {
items[id] = el;
}
}, this);
order.forEach(function (id) {
if (items[id]) {
rootEl.removeChild(items[id]);
rootEl.appendChild(items[id]);
}
});
},
/**
* Save the current sorting
*/
save: function save() {
var store = this.options.store;
store && store.set && store.set(this);
},
/**
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
* @param {HTMLElement} el
* @param {String} [selector] default: `options.draggable`
* @returns {HTMLElement|null}
*/
closest: function closest$1(el, selector) {
return closest(el, selector || this.options.draggable, this.el, false);
},
/**
* Set/get option
* @param {string} name
* @param {*} [value]
* @returns {*}
*/
option: function option(name, value) {
var options = this.options;
if (value === void 0) {
return options[name];
} else {
var modifiedValue = PluginManager.modifyOption(this, name, value);
if (typeof modifiedValue !== 'undefined') {
options[name] = modifiedValue;
} else {
options[name] = value;
}
if (name === 'group') {
_prepareGroup(options);
}
}
},
/**
* Destroy
*/
destroy: function destroy() {
pluginEvent('destroy', this);
var el = this.el;
el[expando] = null;
off(el, 'mousedown', this._onTapStart);
off(el, 'touchstart', this._onTapStart);
off(el, 'pointerdown', this._onTapStart);
if (this.nativeDraggable) {
off(el, 'dragover', this);
off(el, 'dragenter', this);
} // Remove draggable attributes
Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
el.removeAttribute('draggable');
});
this._onDrop();
this._disableDelayedDragEvents();
sortables.splice(sortables.indexOf(this.el), 1);
this.el = el = null;
},
_hideClone: function _hideClone() {
if (!cloneHidden) {
pluginEvent('hideClone', this);
if (Sortable.eventCanceled) return;
css(cloneEl, 'display', 'none');
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
cloneEl.parentNode.removeChild(cloneEl);
}
cloneHidden = true;
}
},
_showClone: function _showClone(putSortable) {
if (putSortable.lastPutMode !== 'clone') {
this._hideClone();
return;
}
if (cloneHidden) {
pluginEvent('showClone', this);
if (Sortable.eventCanceled) return; // show clone at dragEl or original position
if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
rootEl.insertBefore(cloneEl, dragEl);
} else if (nextEl) {
rootEl.insertBefore(cloneEl, nextEl);
} else {
rootEl.appendChild(cloneEl);
}
if (this.options.group.revertClone) {
this.animate(dragEl, cloneEl);
}
css(cloneEl, 'display', '');
cloneHidden = false;
}
}
};
function _globalDragOver(
/**Event*/
evt) {
if (evt.dataTransfer) {
evt.dataTransfer.dropEffect = 'move';
}
evt.cancelable && evt.preventDefault();
}
function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
var evt,
sortable = fromEl[expando],
onMoveFn = sortable.options.onMove,
retVal; // Support for new CustomEvent feature
if (window.CustomEvent && !IE11OrLess && !Edge) {
evt = new CustomEvent('move', {
bubbles: true,
cancelable: true
});
} else {
evt = document.createEvent('Event');
evt.initEvent('move', true, true);
}
evt.to = toEl;
evt.from = fromEl;
evt.dragged = dragEl;
evt.draggedRect = dragRect;
evt.related = targetEl || toEl;
evt.relatedRect = targetRect || getRect(toEl);
evt.willInsertAfter = willInsertAfter;
evt.originalEvent = originalEvent;
fromEl.dispatchEvent(evt);
if (onMoveFn) {
retVal = onMoveFn.call(sortable, evt, originalEvent);
}
return retVal;
}
function _disableDraggable(el) {
el.draggable = false;
}
function _unsilent() {
_silent = false;
}
function _ghostIsLast(evt, vertical, sortable) {
var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
var spacer = 10;
return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
}
function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
targetLength = vertical ? targetRect.height : targetRect.width,
targetS1 = vertical ? targetRect.top : targetRect.left,
targetS2 = vertical ? targetRect.bottom : targetRect.right,
invert = false;
if (!invertSwap) {
// Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
// multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
// check if past first invert threshold on side opposite of lastDirection
if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
// past first invert threshold, do not restrict inverted threshold to dragEl shadow
pastFirstInvertThresh = true;
}
if (!pastFirstInvertThresh) {
// dragEl shadow (target move distance shadow)
if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
: mouseOnAxis > targetS2 - targetMoveDistance) {
return -lastDirection;
}
} else {
invert = true;
}
} else {
// Regular
if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
return _getInsertDirection(target);
}
}
}
invert = invert || invertSwap;
if (invert) {
// Invert of regular
if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
}
}
return 0;
}
/**
* Gets the direction dragEl must be swapped relative to target in order to make it
* seem that dragEl has been "inserted" into that element's position
* @param {HTMLElement} target The target whose position dragEl is being inserted at
* @return {Number} Direction dragEl must be swapped
*/
function _getInsertDirection(target) {
if (index(dragEl) < index(target)) {
return 1;
} else {
return -1;
}
}
/**
* Generate id
* @param {HTMLElement} el
* @returns {String}
* @private
*/
function _generateId(el) {
var str = el.tagName + el.className + el.src + el.href + el.textContent,
i = str.length,
sum = 0;
while (i--) {
sum += str.charCodeAt(i);
}
return sum.toString(36);
}
function _saveInputCheckedState(root) {
savedInputChecked.length = 0;
var inputs = root.getElementsByTagName('input');
var idx = inputs.length;
while (idx--) {
var el = inputs[idx];
el.checked && savedInputChecked.push(el);
}
}
function _nextTick(fn) {
return setTimeout(fn, 0);
}
function _cancelNextTick(id) {
return clearTimeout(id);
} // Fixed #973:
if (documentExists) {
on(document, 'touchmove', function (evt) {
if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
evt.preventDefault();
}
});
} // Export utils
Sortable.utils = {
on: on,
off: off,
css: css,
find: find,
is: function is(el, selector) {
return !!closest(el, selector, el, false);
},
extend: extend,
throttle: throttle,
closest: closest,
toggleClass: toggleClass,
clone: clone,
index: index,
nextTick: _nextTick,
cancelNextTick: _cancelNextTick,
detectDirection: _detectDirection,
getChild: getChild
};
/**
* Get the Sortable instance of an element
* @param {HTMLElement} element The element
* @return {Sortable|undefined} The instance of Sortable
*/
Sortable.get = function (element) {
return element[expando];
};
/**
* Mount a plugin to Sortable
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
*/
Sortable.mount = function () {
for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
plugins[_key] = arguments[_key];
}
if (plugins[0].constructor === Array) plugins = plugins[0];
plugins.forEach(function (plugin) {
if (!plugin.prototype || !plugin.prototype.constructor) {
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
}
if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);
PluginManager.mount(plugin);
});
};
/**
* Create sortable instance
* @param {HTMLElement} el
* @param {Object} [options]
*/
Sortable.create = function (el, options) {
return new Sortable(el, options);
}; // Export
Sortable.version = version;
var autoScrolls = [],
scrollEl,
scrollRootEl,
scrolling = false,
lastAutoScrollX,
lastAutoScrollY,
touchEvt$1,
pointerElemChangedInterval;
function AutoScrollPlugin() {
function AutoScroll() {
this.defaults = {
scroll: true,
scrollSensitivity: 30,
scrollSpeed: 10,
bubbleScroll: true
}; // Bind all private methods
for (var fn in this) {
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
this[fn] = this[fn].bind(this);
}
}
}
AutoScroll.prototype = {
dragStarted: function dragStarted(_ref) {
var originalEvent = _ref.originalEvent;
if (this.sortable.nativeDraggable) {
on(document, 'dragover', this._handleAutoScroll);
} else {
if (this.options.supportPointer) {
on(document, 'pointermove', this._handleFallbackAutoScroll);
} else if (originalEvent.touches) {
on(document, 'touchmove', this._handleFallbackAutoScroll);
} else {
on(document, 'mousemove', this._handleFallbackAutoScroll);
}
}
},
dragOverCompleted: function dragOverCompleted(_ref2) {
var originalEvent = _ref2.originalEvent;
// For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
if (!this.options.dragOverBubble && !originalEvent.rootEl) {
this._handleAutoScroll(originalEvent);
}
},
drop: function drop() {
if (this.sortable.nativeDraggable) {
off(document, 'dragover', this._handleAutoScroll);
} else {
off(document, 'pointermove', this._handleFallbackAutoScroll);
off(document, 'touchmove', this._handleFallbackAutoScroll);
off(document, 'mousemove', this._handleFallbackAutoScroll);
}
clearPointerElemChangedInterval();
clearAutoScrolls();
cancelThrottle();
},
nulling: function nulling() {
touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
autoScrolls.length = 0;
},
_handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
this._handleAutoScroll(evt, true);
},
_handleAutoScroll: function _handleAutoScroll(evt, fallback) {
var _this = this;
var x = (evt.touches ? evt.touches[0] : evt).clientX,
y = (evt.touches ? evt.touches[0] : evt).clientY,
elem = document.elementFromPoint(x, y);
touchEvt$1 = evt; // IE does not seem to have native autoscroll,
// Edge's autoscroll seems too conditional,
// MACOS Safari does not have autoscroll,
// Firefox and Chrome are good
if (fallback || Edge || IE11OrLess || Safari) {
autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
var ogElemScroller = getParentAutoScrollElement(elem, true);
if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
pointerElemChangedInterval = setInterval(function () {
var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
if (newElem !== ogElemScroller) {
ogElemScroller = newElem;
clearAutoScrolls();
}
autoScroll(evt, _this.options, newElem, fallback);
}, 10);
lastAutoScrollX = x;
lastAutoScrollY = y;
}
} else {
// if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
clearAutoScrolls();
return;
}
autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
}
}
};
return _extends(AutoScroll, {
pluginName: 'scroll',
initializeByDefault: true
});
}
function clearAutoScrolls() {
autoScrolls.forEach(function (autoScroll) {
clearInterval(autoScroll.pid);
});
autoScrolls = [];
}
function clearPointerElemChangedInterval() {
clearInterval(pointerElemChangedInterval);
}
var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
if (!options.scroll) return;
var x = (evt.touches ? evt.touches[0] : evt).clientX,
y = (evt.touches ? evt.touches[0] : evt).clientY,
sens = options.scrollSensitivity,
speed = options.scrollSpeed,
winScroller = getWindowScrollingElement();
var scrollThisInstance = false,
scrollCustomFn; // New scroll root, set scrollEl
if (scrollRootEl !== rootEl) {
scrollRootEl = rootEl;
clearAutoScrolls();
scrollEl = options.scroll;
scrollCustomFn = options.scrollFn;
if (scrollEl === true) {
scrollEl = getParentAutoScrollElement(rootEl, true);
}
}
var layersOut = 0;
var currentParent = scrollEl;
do {
var el = currentParent,
rect = getRect(el),
top = rect.top,
bottom = rect.bottom,
left = rect.left,
right = rect.right,
width = rect.width,
height = rect.height,
canScrollX = void 0,
canScrollY = void 0,
scrollWidth = el.scrollWidth,
scrollHeight = el.scrollHeight,
elCSS = css(el),
scrollPosX = el.scrollLeft,
scrollPosY = el.scrollTop;
if (el === winScroller) {
canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
} else {
canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
}
var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
if (!autoScrolls[layersOut]) {
for (var i = 0; i <= layersOut; i++) {
if (!autoScrolls[i]) {
autoScrolls[i] = {};
}
}
}
if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
autoScrolls[layersOut].el = el;
autoScrolls[layersOut].vx = vx;
autoScrolls[layersOut].vy = vy;
clearInterval(autoScrolls[layersOut].pid);
if (vx != 0 || vy != 0) {
scrollThisInstance = true;
/* jshint loopfunc:true */
autoScrolls[layersOut].pid = setInterval(function () {
// emulate drag over during autoscroll (fallback), emulating native DnD behaviour
if (isFallback && this.layer === 0) {
Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
}
var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
if (typeof scrollCustomFn === 'function') {
if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
return;
}
}
scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
}.bind({
layer: layersOut
}), 24);
}
}
layersOut++;
} while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
}, 30);
var drop = function drop(_ref) {
var originalEvent = _ref.originalEvent,
putSortable = _ref.putSortable,
dragEl = _ref.dragEl,
activeSortable = _ref.activeSortable,
dispatchSortableEvent = _ref.dispatchSortableEvent,
hideGhostForTarget = _ref.hideGhostForTarget,
unhideGhostForTarget = _ref.unhideGhostForTarget;
if (!originalEvent) return;
var toSortable = putSortable || activeSortable;
hideGhostForTarget();
var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
var target = document.elementFromPoint(touch.clientX, touch.clientY);
unhideGhostForTarget();
if (toSortable && !toSortable.el.contains(target)) {
dispatchSortableEvent('spill');
this.onSpill({
dragEl: dragEl,
putSortable: putSortable
});
}
};
function Revert() {}
Revert.prototype = {
startIndex: null,
dragStart: function dragStart(_ref2) {
var oldDraggableIndex = _ref2.oldDraggableIndex;
this.startIndex = oldDraggableIndex;
},
onSpill: function onSpill(_ref3) {
var dragEl = _ref3.dragEl,
putSortable = _ref3.putSortable;
this.sortable.captureAnimationState();
if (putSortable) {
putSortable.captureAnimationState();
}
var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
if (nextSibling) {
this.sortable.el.insertBefore(dragEl, nextSibling);
} else {
this.sortable.el.appendChild(dragEl);
}
this.sortable.animateAll();
if (putSortable) {
putSortable.animateAll();
}
},
drop: drop
};
_extends(Revert, {
pluginName: 'revertOnSpill'
});
function Remove() {}
Remove.prototype = {
onSpill: function onSpill(_ref4) {
var dragEl = _ref4.dragEl,
putSortable = _ref4.putSortable;
var parentSortable = putSortable || this.sortable;
parentSortable.captureAnimationState();
dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
parentSortable.animateAll();
},
drop: drop
};
_extends(Remove, {
pluginName: 'removeOnSpill'
});
var lastSwapEl;
function SwapPlugin() {
function Swap() {
this.defaults = {
swapClass: 'sortable-swap-highlight'
};
}
Swap.prototype = {
dragStart: function dragStart(_ref) {
var dragEl = _ref.dragEl;
lastSwapEl = dragEl;
},
dragOverValid: function dragOverValid(_ref2) {
var completed = _ref2.completed,
target = _ref2.target,
onMove = _ref2.onMove,
activeSortable = _ref2.activeSortable,
changed = _ref2.changed,
cancel = _ref2.cancel;
if (!activeSortable.options.swap) return;
var el = this.sortable.el,
options = this.options;
if (target && target !== el) {
var prevSwapEl = lastSwapEl;
if (onMove(target) !== false) {
toggleClass(target, options.swapClass, true);
lastSwapEl = target;
} else {
lastSwapEl = null;
}
if (prevSwapEl && prevSwapEl !== lastSwapEl) {
toggleClass(prevSwapEl, options.swapClass, false);
}
}
changed();
completed(true);
cancel();
},
drop: function drop(_ref3) {
var activeSortable = _ref3.activeSortable,
putSortable = _ref3.putSortable,
dragEl = _ref3.dragEl;
var toSortable = putSortable || this.sortable;
var options = this.options;
lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
if (dragEl !== lastSwapEl) {
toSortable.captureAnimationState();
if (toSortable !== activeSortable) activeSortable.captureAnimationState();
swapNodes(dragEl, lastSwapEl);
toSortable.animateAll();
if (toSortable !== activeSortable) activeSortable.animateAll();
}
}
},
nulling: function nulling() {
lastSwapEl = null;
}
};
return _extends(Swap, {
pluginName: 'swap',
eventProperties: function eventProperties() {
return {
swapItem: lastSwapEl
};
}
});
}
function swapNodes(n1, n2) {
var p1 = n1.parentNode,
p2 = n2.parentNode,
i1,
i2;
if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
i1 = index(n1);
i2 = index(n2);
if (p1.isEqualNode(p2) && i1 < i2) {
i2++;
}
p1.insertBefore(n2, p1.children[i1]);
p2.insertBefore(n1, p2.children[i2]);
}
var multiDragElements = [],
multiDragClones = [],
lastMultiDragSelect,
// for selection with modifier key down (SHIFT)
multiDragSortable,
initialFolding = false,
// Initial multi-drag fold when drag started
folding = false,
// Folding any other time
dragStarted = false,
dragEl$1,
clonesFromRect,
clonesHidden;
function MultiDragPlugin() {
function MultiDrag(sortable) {
// Bind all private methods
for (var fn in this) {
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
this[fn] = this[fn].bind(this);
}
}
if (sortable.options.supportPointer) {
on(document, 'pointerup', this._deselectMultiDrag);
} else {
on(document, 'mouseup', this._deselectMultiDrag);
on(document, 'touchend', this._deselectMultiDrag);
}
on(document, 'keydown', this._checkKeyDown);
on(document, 'keyup', this._checkKeyUp);
this.defaults = {
selectedClass: 'sortable-selected',
multiDragKey: null,
setData: function setData(dataTransfer, dragEl) {
var data = '';
if (multiDragElements.length && multiDragSortable === sortable) {
multiDragElements.forEach(function (multiDragElement, i) {
data += (!i ? '' : ', ') + multiDragElement.textContent;
});
} else {
data = dragEl.textContent;
}
dataTransfer.setData('Text', data);
}
};
}
MultiDrag.prototype = {
multiDragKeyDown: false,
isMultiDrag: false,
delayStartGlobal: function delayStartGlobal(_ref) {
var dragged = _ref.dragEl;
dragEl$1 = dragged;
},
delayEnded: function delayEnded() {
this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
},
setupClone: function setupClone(_ref2) {
var sortable = _ref2.sortable,
cancel = _ref2.cancel;
if (!this.isMultiDrag) return;
for (var i = 0; i < multiDragElements.length; i++) {
multiDragClones.push(clone(multiDragElements[i]));
multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
multiDragClones[i].draggable = false;
multiDragClones[i].style['will-change'] = '';
toggleClass(multiDragClones[i], this.options.selectedClass, false);
multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
}
sortable._hideClone();
cancel();
},
clone: function clone(_ref3) {
var sortable = _ref3.sortable,
rootEl = _ref3.rootEl,
dispatchSortableEvent = _ref3.dispatchSortableEvent,
cancel = _ref3.cancel;
if (!this.isMultiDrag) return;
if (!this.options.removeCloneOnHide) {
if (multiDragElements.length && multiDragSortable === sortable) {
insertMultiDragClones(true, rootEl);
dispatchSortableEvent('clone');
cancel();
}
}
},
showClone: function showClone(_ref4) {
var cloneNowShown = _ref4.cloneNowShown,
rootEl = _ref4.rootEl,
cancel = _ref4.cancel;
if (!this.isMultiDrag) return;
insertMultiDragClones(false, rootEl);
multiDragClones.forEach(function (clone) {
css(clone, 'display', '');
});
cloneNowShown();
clonesHidden = false;
cancel();
},
hideClone: function hideClone(_ref5) {
var _this = this;
var sortable = _ref5.sortable,
cloneNowHidden = _ref5.cloneNowHidden,
cancel = _ref5.cancel;
if (!this.isMultiDrag) return;
multiDragClones.forEach(function (clone) {
css(clone, 'display', 'none');
if (_this.options.removeCloneOnHide && clone.parentNode) {
clone.parentNode.removeChild(clone);
}
});
cloneNowHidden();
clonesHidden = true;
cancel();
},
dragStartGlobal: function dragStartGlobal(_ref6) {
var sortable = _ref6.sortable;
if (!this.isMultiDrag && multiDragSortable) {
multiDragSortable.multiDrag._deselectMultiDrag();
}
multiDragElements.forEach(function (multiDragElement) {
multiDragElement.sortableIndex = index(multiDragElement);
}); // Sort multi-drag elements
multiDragElements = multiDragElements.sort(function (a, b) {
return a.sortableIndex - b.sortableIndex;
});
dragStarted = true;
},
dragStarted: function dragStarted(_ref7) {
var _this2 = this;
var sortable = _ref7.sortable;
if (!this.isMultiDrag) return;
if (this.options.sort) {
// Capture rects,
// hide multi drag elements (by positioning them absolute),
// set multi drag elements rects to dragRect,
// show multi drag elements,
// animate to rects,
// unset rects & remove from DOM
sortable.captureAnimationState();
if (this.options.animation) {
multiDragElements.forEach(function (multiDragElement) {
if (multiDragElement === dragEl$1) return;
css(multiDragElement, 'position', 'absolute');
});
var dragRect = getRect(dragEl$1, false, true, true);
multiDragElements.forEach(function (multiDragElement) {
if (multiDragElement === dragEl$1) return;
setRect(multiDragElement, dragRect);
});
folding = true;
initialFolding = true;
}
}
sortable.animateAll(function () {
folding = false;
initialFolding = false;
if (_this2.options.animation) {
multiDragElements.forEach(function (multiDragElement) {
unsetRect(multiDragElement);
});
} // Remove all auxiliary multidrag items from el, if sorting enabled
if (_this2.options.sort) {
removeMultiDragElements();
}
});
},
dragOver: function dragOver(_ref8) {
var target = _ref8.target,
completed = _ref8.completed,
cancel = _ref8.cancel;
if (folding && ~multiDragElements.indexOf(target)) {
completed(false);
cancel();
}
},
revert: function revert(_ref9) {
var fromSortable = _ref9.fromSortable,
rootEl = _ref9.rootEl,
sortable = _ref9.sortable,
dragRect = _ref9.dragRect;
if (multiDragElements.length > 1) {
// Setup unfold animation
multiDragElements.forEach(function (multiDragElement) {
sortable.addAnimationState({
target: multiDragElement,
rect: folding ? getRect(multiDragElement) : dragRect
});
unsetRect(multiDragElement);
multiDragElement.fromRect = dragRect;
fromSortable.removeAnimationState(multiDragElement);
});
folding = false;
insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
}
},
dragOverCompleted: function dragOverCompleted(_ref10) {
var sortable = _ref10.sortable,
isOwner = _ref10.isOwner,
insertion = _ref10.insertion,
activeSortable = _ref10.activeSortable,
parentEl = _ref10.parentEl,
putSortable = _ref10.putSortable;
var options = this.options;
if (insertion) {
// Clones must be hidden before folding animation to capture dragRectAbsolute properly
if (isOwner) {
activeSortable._hideClone();
}
initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
// Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
var dragRectAbsolute = getRect(dragEl$1, false, true, true);
multiDragElements.forEach(function (multiDragElement) {
if (multiDragElement === dragEl$1) return;
setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
// while folding, and so that we can capture them again because old sortable will no longer be fromSortable
parentEl.appendChild(multiDragElement);
});
folding = true;
} // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
if (!isOwner) {
// Only remove if not folding (folding will remove them anyways)
if (!folding) {
removeMultiDragElements();
}
if (multiDragElements.length > 1) {
var clonesHiddenBefore = clonesHidden;
activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
multiDragClones.forEach(function (clone) {
activeSortable.addAnimationState({
target: clone,
rect: clonesFromRect
});
clone.fromRect = clonesFromRect;
clone.thisAnimationDuration = null;
});
}
} else {
activeSortable._showClone(sortable);
}
}
}
},
dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
var dragRect = _ref11.dragRect,
isOwner = _ref11.isOwner,
activeSortable = _ref11.activeSortable;
multiDragElements.forEach(function (multiDragElement) {
multiDragElement.thisAnimationDuration = null;
});
if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
clonesFromRect = _extends({}, dragRect);
var dragMatrix = matrix(dragEl$1, true);
clonesFromRect.top -= dragMatrix.f;
clonesFromRect.left -= dragMatrix.e;
}
},
dragOverAnimationComplete: function dragOverAnimationComplete() {
if (folding) {
folding = false;
removeMultiDragElements();
}
},
drop: function drop(_ref12) {
var evt = _ref12.originalEvent,
rootEl = _ref12.rootEl,
parentEl = _ref12.parentEl,
sortable = _ref12.sortable,
dispatchSortableEvent = _ref12.dispatchSortableEvent,
oldIndex = _ref12.oldIndex,
putSortable = _ref12.putSortable;
var toSortable = putSortable || this.sortable;
if (!evt) return;
var options = this.options,
children = parentEl.children; // Multi-drag selection
if (!dragStarted) {
if (options.multiDragKey && !this.multiDragKeyDown) {
this._deselectMultiDrag();
}
toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
if (!~multiDragElements.indexOf(dragEl$1)) {
multiDragElements.push(dragEl$1);
dispatchEvent({
sortable: sortable,
rootEl: rootEl,
name: 'select',
targetEl: dragEl$1,
originalEvt: evt
}); // Modifier activated, select from last to dragEl
if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
var lastIndex = index(lastMultiDragSelect),
currentIndex = index(dragEl$1);
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
// Must include lastMultiDragSelect (select it), in case modified selection from no selection
// (but previous selection existed)
var n, i;
if (currentIndex > lastIndex) {
i = lastIndex;
n = currentIndex;
} else {
i = currentIndex;
n = lastIndex + 1;
}
for (; i < n; i++) {
if (~multiDragElements.indexOf(children[i])) continue;
toggleClass(children[i], options.selectedClass, true);
multiDragElements.push(children[i]);
dispatchEvent({
sortable: sortable,
rootEl: rootEl,
name: 'select',
targetEl: children[i],
originalEvt: evt
});
}
}
} else {
lastMultiDragSelect = dragEl$1;
}
multiDragSortable = toSortable;
} else {
multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
lastMultiDragSelect = null;
dispatchEvent({
sortable: sortable,
rootEl: rootEl,
name: 'deselect',
targetEl: dragEl$1,
originalEvt: evt
});
}
} // Multi-drag drop
if (dragStarted && this.isMultiDrag) {
// Do not "unfold" after around dragEl if reverted
if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
var dragRect = getRect(dragEl$1),
multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
toSortable.captureAnimationState();
if (!initialFolding) {
if (options.animation) {
dragEl$1.fromRect = dragRect;
multiDragElements.forEach(function (multiDragElement) {
multiDragElement.thisAnimationDuration = null;
if (multiDragElement !== dragEl$1) {
var rect = folding ? getRect(multiDragElement) : dragRect;
multiDragElement.fromRect = rect; // Prepare unfold animation
toSortable.addAnimationState({
target: multiDragElement,
rect: rect
});
}
});
} // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
// properly they must all be removed
removeMultiDragElements();
multiDragElements.forEach(function (multiDragElement) {
if (children[multiDragIndex]) {
parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
} else {
parentEl.appendChild(multiDragElement);
}
multiDragIndex++;
}); // If initial folding is done, the elements may have changed position because they are now
// unfolding around dragEl, even though dragEl may not have his index changed, so update event
// must be fired here as Sortable will not.
if (oldIndex === index(dragEl$1)) {
var update = false;
multiDragElements.forEach(function (multiDragElement) {
if (multiDragElement.sortableIndex !== index(multiDragElement)) {
update = true;
return;
}
});
if (update) {
dispatchSortableEvent('update');
}
}
} // Must be done after capturing individual rects (scroll bar)
multiDragElements.forEach(function (multiDragElement) {
unsetRect(multiDragElement);
});
toSortable.animateAll();
}
multiDragSortable = toSortable;
} // Remove clones if necessary
if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
multiDragClones.forEach(function (clone) {
clone.parentNode && clone.parentNode.removeChild(clone);
});
}
},
nullingGlobal: function nullingGlobal() {
this.isMultiDrag = dragStarted = false;
multiDragClones.length = 0;
},
destroyGlobal: function destroyGlobal() {
this._deselectMultiDrag();
off(document, 'pointerup', this._deselectMultiDrag);
off(document, 'mouseup', this._deselectMultiDrag);
off(document, 'touchend', this._deselectMultiDrag);
off(document, 'keydown', this._checkKeyDown);
off(document, 'keyup', this._checkKeyUp);
},
_deselectMultiDrag: function _deselectMultiDrag(evt) {
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
if (evt && evt.button !== 0) return;
while (multiDragElements.length) {
var el = multiDragElements[0];
toggleClass(el, this.options.selectedClass, false);
multiDragElements.shift();
dispatchEvent({
sortable: this.sortable,
rootEl: this.sortable.el,
name: 'deselect',
targetEl: el,
originalEvt: evt
});
}
},
_checkKeyDown: function _checkKeyDown(evt) {
if (evt.key === this.options.multiDragKey) {
this.multiDragKeyDown = true;
}
},
_checkKeyUp: function _checkKeyUp(evt) {
if (evt.key === this.options.multiDragKey) {
this.multiDragKeyDown = false;
}
}
};
return _extends(MultiDrag, {
// Static methods & properties
pluginName: 'multiDrag',
utils: {
/**
* Selects the provided multi-drag item
* @param {HTMLElement} el The element to be selected
*/
select: function select(el) {
var sortable = el.parentNode[expando];
if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
if (multiDragSortable && multiDragSortable !== sortable) {
multiDragSortable.multiDrag._deselectMultiDrag();
multiDragSortable = sortable;
}
toggleClass(el, sortable.options.selectedClass, true);
multiDragElements.push(el);
},
/**
* Deselects the provided multi-drag item
* @param {HTMLElement} el The element to be deselected
*/
deselect: function deselect(el) {
var sortable = el.parentNode[expando],
index = multiDragElements.indexOf(el);
if (!sortable || !sortable.options.multiDrag || !~index) return;
toggleClass(el, sortable.options.selectedClass, false);
multiDragElements.splice(index, 1);
}
},
eventProperties: function eventProperties() {
var _this3 = this;
var oldIndicies = [],
newIndicies = [];
multiDragElements.forEach(function (multiDragElement) {
oldIndicies.push({
multiDragElement: multiDragElement,
index: multiDragElement.sortableIndex
}); // multiDragElements will already be sorted if folding
var newIndex;
if (folding && multiDragElement !== dragEl$1) {
newIndex = -1;
} else if (folding) {
newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
} else {
newIndex = index(multiDragElement);
}
newIndicies.push({
multiDragElement: multiDragElement,
index: newIndex
});
});
return {
items: _toConsumableArray(multiDragElements),
clones: [].concat(multiDragClones),
oldIndicies: oldIndicies,
newIndicies: newIndicies
};
},
optionListeners: {
multiDragKey: function multiDragKey(key) {
key = key.toLowerCase();
if (key === 'ctrl') {
key = 'Control';
} else if (key.length > 1) {
key = key.charAt(0).toUpperCase() + key.substr(1);
}
return key;
}
}
});
}
function insertMultiDragElements(clonesInserted, rootEl) {
multiDragElements.forEach(function (multiDragElement, i) {
var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
if (target) {
rootEl.insertBefore(multiDragElement, target);
} else {
rootEl.appendChild(multiDragElement);
}
});
}
/**
* Insert multi-drag clones
* @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
* @param {HTMLElement} rootEl
*/
function insertMultiDragClones(elementsInserted, rootEl) {
multiDragClones.forEach(function (clone, i) {
var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
if (target) {
rootEl.insertBefore(clone, target);
} else {
rootEl.appendChild(clone);
}
});
}
function removeMultiDragElements() {
multiDragElements.forEach(function (multiDragElement) {
if (multiDragElement === dragEl$1) return;
multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
});
}
Sortable.mount(new AutoScrollPlugin());
Sortable.mount(Remove, Revert);
/* harmony default export */ __webpack_exports__["default"] = (Sortable);
/***/ }),
/***/ "aae3":
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__("d3f4");
var cof = __webpack_require__("2d95");
var MATCH = __webpack_require__("2b4c")('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/***/ "ac4d":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("3a72")('asyncIterator');
/***/ }),
/***/ "ac6a":
/***/ (function(module, exports, __webpack_require__) {
var $iterators = __webpack_require__("cadf");
var getKeys = __webpack_require__("0d58");
var redefine = __webpack_require__("2aba");
var global = __webpack_require__("7726");
var hide = __webpack_require__("32e9");
var Iterators = __webpack_require__("84f2");
var wks = __webpack_require__("2b4c");
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
var DOMIterables = {
CSSRuleList: true, // TODO: Not spec compliant, should be false.
CSSStyleDeclaration: false,
CSSValueList: false,
ClientRectList: false,
DOMRectList: false,
DOMStringList: false,
DOMTokenList: true,
DataTransferItemList: false,
FileList: false,
HTMLAllCollection: false,
HTMLCollection: false,
HTMLFormElement: false,
HTMLSelectElement: false,
MediaList: true, // TODO: Not spec compliant, should be false.
MimeTypeArray: false,
NamedNodeMap: false,
NodeList: true,
PaintRequestList: false,
Plugin: false,
PluginArray: false,
SVGLengthList: false,
SVGNumberList: false,
SVGPathSegList: false,
SVGPointList: false,
SVGStringList: false,
SVGTransformList: false,
SourceBufferList: false,
StyleSheetList: true, // TODO: Not spec compliant, should be false.
TextTrackCueList: false,
TextTrackList: false,
TouchList: false
};
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
var NAME = collections[i];
var explicit = DOMIterables[NAME];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
var key;
if (proto) {
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = ArrayValues;
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
}
}
/***/ }),
/***/ "acbf":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "aebd":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "b0b4":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("85f2");
/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(Constructor, "prototype", {
writable: false
});
return Constructor;
}
/***/ }),
/***/ "b0c5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpExec = __webpack_require__("520a");
__webpack_require__("5ca1")({
target: 'RegExp',
proto: true,
forced: regexpExec !== /./.exec
}, {
exec: regexpExec
});
/***/ }),
/***/ "b0dc":
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__("e4ae");
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;
}
};
/***/ }),
/***/ "b189":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var keysShim;
if (!Object.keys) {
// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var isArgs = __webpack_require__("d4ab"); // eslint-disable-line global-require
var isEnumerable = Object.prototype.propertyIsEnumerable;
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var excludedKeys = {
$applicationCache: true,
$console: true,
$external: true,
$frame: true,
$frameElement: true,
$frames: true,
$innerHeight: true,
$innerWidth: true,
$onmozfullscreenchange: true,
$onmozfullscreenerror: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
$pageYOffset: true,
$parent: true,
$scrollLeft: true,
$scrollTop: true,
$scrollX: true,
$scrollY: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
}
module.exports = keysShim;
/***/ }),
/***/ "b1f2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GLOBAL_CONFIG; });
var GLOBAL_CONFIG = {
rendererFormId: "vue-form-render-pro-max" // ID of <form> for Renderer
};
/***/ }),
/***/ "b2b8":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
/* eslint global-require: 0 */
// the code is structured this way so that bundlers can
// alias out `has-symbols` to `() => true` or `() => false` if your target
// environments' Symbol capabilities are known, and then use
// dead code elimination on the rest of this module.
//
// Similarly, `isarray` can be aliased to `Array.isArray` if
// available in all target environments.
var isArguments = __webpack_require__("e39c");
if (__webpack_require__("5156")() || __webpack_require__("1696")()) {
var $iterator = Symbol.iterator;
// Symbol is available natively or shammed
// natively:
// - Chrome >= 38
// - Edge 12-14?, Edge >= 15 for sure
// - FF >= 36
// - Safari >= 9
// - node >= 0.12
module.exports = function getIterator(iterable) {
// alternatively, `iterable[$iterator]?.()`
if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
return iterable[$iterator]();
}
if (isArguments(iterable)) {
// arguments objects lack Symbol.iterator
// - node 0.12
return Array.prototype[$iterator].call(iterable);
}
};
} else {
// Symbol is not available, native or shammed
var isArray = __webpack_require__("9665");
var isString = __webpack_require__("55b2");
var GetIntrinsic = __webpack_require__("00ce");
var $Map = GetIntrinsic('%Map%', true);
var $Set = GetIntrinsic('%Set%', true);
var callBound = __webpack_require__("545e");
var $arrayPush = callBound('Array.prototype.push');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $stringSlice = callBound('String.prototype.slice');
var advanceStringIndex = function advanceStringIndex(S, index) {
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var first = $charCodeAt(S, index);
if (first < 0xD800 || first > 0xDBFF) {
return index + 1;
}
var second = $charCodeAt(S, index + 1);
if (second < 0xDC00 || second > 0xDFFF) {
return index + 1;
}
return index + 2;
};
var getArrayIterator = function getArrayIterator(arraylike) {
var i = 0;
return {
next: function next() {
var done = i >= arraylike.length;
var value;
if (!done) {
value = arraylike[i];
i += 1;
}
return {
done: done,
value: value
};
}
};
};
var getNonCollectionIterator = function getNonCollectionIterator(iterable, noPrimordialCollections) {
if (isArray(iterable) || isArguments(iterable)) {
return getArrayIterator(iterable);
}
if (isString(iterable)) {
var i = 0;
return {
next: function next() {
var nextIndex = advanceStringIndex(iterable, i);
var value = $stringSlice(iterable, i, nextIndex);
i = nextIndex;
return {
done: nextIndex > iterable.length,
value: value
};
}
};
}
// es6-shim and es-shims' es-map use a string "_es6-shim iterator_" property on different iterables, such as MapIterator.
if (noPrimordialCollections && typeof iterable['_es6-shim iterator_'] !== 'undefined') {
return iterable['_es6-shim iterator_']();
}
};
if (!$Map && !$Set) {
// the only language iterables are Array, String, arguments
// - Safari <= 6.0
// - Chrome < 38
// - node < 0.12
// - FF < 13
// - IE < 11
// - Edge < 11
module.exports = function getIterator(iterable) {
if (iterable != null) {
return getNonCollectionIterator(iterable, true);
}
};
} else {
// either Map or Set are available, but Symbol is not
// - es6-shim on an ES5 browser
// - Safari 6.2 (maybe 6.1?)
// - FF v[13, 36)
// - IE 11
// - Edge 11
// - Safari v[6, 9)
var isMap = __webpack_require__("fd13");
var isSet = __webpack_require__("be03");
// Firefox >= 27, IE 11, Safari 6.2 - 9, Edge 11, es6-shim in older envs, all have forEach
var $mapForEach = callBound('Map.prototype.forEach', true);
var $setForEach = callBound('Set.prototype.forEach', true);
if (typeof process === 'undefined' || !process.versions || !process.versions.node) { // "if is not node"
// Firefox 17 - 26 has `.iterator()`, whose iterator `.next()` either
// returns a value, or throws a StopIteration object. These browsers
// do not have any other mechanism for iteration.
var $mapIterator = callBound('Map.prototype.iterator', true);
var $setIterator = callBound('Set.prototype.iterator', true);
var getStopIterationIterator = function (iterator) {
var done = false;
return {
next: function next() {
try {
return {
done: done,
value: done ? undefined : iterator.next()
};
} catch (e) {
done = true;
return {
done: true,
value: undefined
};
}
}
};
};
}
// Firefox 27-35, and some older es6-shim versions, use a string "@@iterator" property
// this returns a proper iterator object, so we should use it instead of forEach.
// newer es6-shim versions use a string "_es6-shim iterator_" property.
var $mapAtAtIterator = callBound('Map.prototype.@@iterator', true) || callBound('Map.prototype._es6-shim iterator_', true);
var $setAtAtIterator = callBound('Set.prototype.@@iterator', true) || callBound('Set.prototype._es6-shim iterator_', true);
var getCollectionIterator = function getCollectionIterator(iterable) {
if (isMap(iterable)) {
if ($mapIterator) {
return getStopIterationIterator($mapIterator(iterable));
}
if ($mapAtAtIterator) {
return $mapAtAtIterator(iterable);
}
if ($mapForEach) {
var entries = [];
$mapForEach(iterable, function (v, k) {
$arrayPush(entries, [k, v]);
});
return getArrayIterator(entries);
}
}
if (isSet(iterable)) {
if ($setIterator) {
return getStopIterationIterator($setIterator(iterable));
}
if ($setAtAtIterator) {
return $setAtAtIterator(iterable);
}
if ($setForEach) {
var values = [];
$setForEach(iterable, function (v) {
$arrayPush(values, v);
});
return getArrayIterator(values);
}
}
};
module.exports = function getIterator(iterable) {
return getCollectionIterator(iterable) || getNonCollectionIterator(iterable);
};
}
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
/***/ }),
/***/ "b447":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__("3a38");
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ "b635":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return VueFormBuilderPlugin; });
/* harmony import */ var _installer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2560");
/* harmony import */ var _components_FormBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6a29");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _components_FormBuilder__WEBPACK_IMPORTED_MODULE_1__["a"]; });
/* harmony import */ var _components_FormRenderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("fbdb");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _components_FormRenderer__WEBPACK_IMPORTED_MODULE_2__["a"]; });
/* harmony import */ var _skeletons_controls_BaseControlSkeleton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("c72d");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _skeletons_controls_BaseControlSkeleton__WEBPACK_IMPORTED_MODULE_3__["a"]; });
/* harmony import */ var _skeletons_controls_BaseControlConfigSkeleton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("da2a");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _skeletons_controls_BaseControlConfigSkeleton__WEBPACK_IMPORTED_MODULE_4__["a"]; });
/* harmony import */ var _assets_v_form_builder_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("c992");
/* harmony import */ var _assets_v_form_builder_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_assets_v_form_builder_css__WEBPACK_IMPORTED_MODULE_5__);
// Create module definition for Vue.use()
var VueFormBuilderPlugin = {
install: _installer__WEBPACK_IMPORTED_MODULE_0__[/* VueFormBuilderInstaller */ "a"]
}; // For Browser-Vue's purpose
// Export the VueFormBuilderPlugin to let developers register it later.
// I won't automatically register it, therefore you would have a big chance to
// - Configure the Internal Configuration of the Form
// - Extendable (Registering more controls, Styling Classes,...)
// - ...
if (typeof window !== 'undefined') {
window.VueFormBuilderPlugin = VueFormBuilderPlugin;
} else if (typeof global !== 'undefined') {
global.VueFormBuilderPlugin = VueFormBuilderPlugin;
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "b639":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__("1fb5")
var ieee754 = __webpack_require__("9152")
var isArray = __webpack_require__("e3db")
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length)
}
that.length = length
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype
return arr
}
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
})
}
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
}
function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
that = createBuffer(that, length)
var actual = that.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual)
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
that = createBuffer(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array)
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array)
}
return that
}
function fromObject (that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
that = createBuffer(that, len)
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len)
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8'
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true
function swap (b, n, m) {
var i = b[n]
b[n] = b[m]
b[m] = i
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1)
}
return this
}
Buffer.prototype.swap32 = function swap32 () {
var len = this.length
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3)
swap(this, i + 1, i + 2)
}
return this
}
Buffer.prototype.swap64 = function swap64 () {
var len = this.length
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7)
swap(this, i + 1, i + 6)
swap(this, i + 2, i + 5)
swap(this, i + 3, i + 4)
}
return this
}
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0
}
if (end === undefined) {
end = target ? target.length : 0
}
if (thisStart === undefined) {
thisStart = 0
}
if (thisEnd === undefined) {
thisEnd = this.length
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if (this === target) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math.min(x, y)
var thisCopy = this.slice(thisStart, thisEnd)
var targetCopy = target.slice(start, end)
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i]
y = targetCopy[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset
byteOffset = 0
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
byteOffset = +byteOffset // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1
} else if (byteOffset < 0) {
if (dir) byteOffset = 0
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding)
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase()
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i
if (dir) {
var foundIndex = -1
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
for (i = byteOffset; i >= 0; i--) {
var found = true
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
}
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0
if (isFinite(length)) {
length = length | 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; ++i) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end)
newBuf.__proto__ = Buffer.prototype
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start]
}
}
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = (value & 0xff)
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = this.length
} else if (typeof end === 'string') {
encoding = end
end = this.length
}
if (val.length === 1) {
var code = val.charCodeAt(0)
if (code < 256) {
val = code
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0
end = end === undefined ? this.length : end >>> 0
if (!val) val = 0
var i
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val
}
} else {
var bytes = Buffer.isBuffer(val)
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
function isnan (val) {
return val !== val // eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "b76a":
/***/ (function(module, exports, __webpack_require__) {
(function webpackUniversalModuleDefinition(root, factory) {
if(true)
module.exports = factory(__webpack_require__("aa47"));
else {}
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE_a352__) {
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, { 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 = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
/******/ })
/************************************************************************/
/******/ ({
/***/ "01f9":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__("2d00");
var $export = __webpack_require__("5ca1");
var redefine = __webpack_require__("2aba");
var hide = __webpack_require__("32e9");
var Iterators = __webpack_require__("84f2");
var $iterCreate = __webpack_require__("41a0");
var setToStringTag = __webpack_require__("7f20");
var getPrototypeOf = __webpack_require__("38fd");
var ITERATOR = __webpack_require__("2b4c")('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;
};
/***/ }),
/***/ "02f4":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("4588");
var defined = __webpack_require__("be13");
// 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;
};
};
/***/ }),
/***/ "0390":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var at = __webpack_require__("02f4")(true);
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? at(S, index).length : 1);
};
/***/ }),
/***/ "0bfb":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("cb7c");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "0d58":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("ce10");
var enumBugKeys = __webpack_require__("e11e");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "1495":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("86cc");
var anObject = __webpack_require__("cb7c");
var getKeys = __webpack_require__("0d58");
module.exports = __webpack_require__("9e1e") ? 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;
};
/***/ }),
/***/ "214f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__("b0c5");
var redefine = __webpack_require__("2aba");
var hide = __webpack_require__("32e9");
var fails = __webpack_require__("79e5");
var defined = __webpack_require__("be13");
var wks = __webpack_require__("2b4c");
var regexpExec = __webpack_require__("520a");
var SPECIES = wks('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$<a>') !== '7';
});
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length === 2 && result[0] === 'a' && result[1] === 'b';
})();
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
re.exec = function () { execCalled = true; return null; };
if (KEY === 'split') {
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
}
re[SYMBOL]('');
return !execCalled;
}) : undefined;
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var fns = exec(
defined,
SYMBOL,
''[KEY],
function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}
);
var strfn = fns[0];
var rxfn = fns[1];
redefine(String.prototype, KEY, strfn);
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return rxfn.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return rxfn.call(string, this); }
);
}
};
/***/ }),
/***/ "230e":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("d3f4");
var document = __webpack_require__("7726").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) : {};
};
/***/ }),
/***/ "23c6":
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__("2d95");
var TAG = __webpack_require__("2b4c")('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;
};
/***/ }),
/***/ "2621":
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "2aba":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var hide = __webpack_require__("32e9");
var has = __webpack_require__("69a8");
var SRC = __webpack_require__("ca5a")('src');
var $toString = __webpack_require__("fa5b");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__("8378").inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/***/ "2aeb":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__("cb7c");
var dPs = __webpack_require__("1495");
var enumBugKeys = __webpack_require__("e11e");
var IE_PROTO = __webpack_require__("613b")('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__("230e")('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__("fab2").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);
};
/***/ }),
/***/ "2b4c":
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__("5537")('wks');
var uid = __webpack_require__("ca5a");
var Symbol = __webpack_require__("7726").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;
/***/ }),
/***/ "2d00":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "2d95":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "2fdb":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__("5ca1");
var context = __webpack_require__("d2c8");
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__("5147")(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "32e9":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("86cc");
var createDesc = __webpack_require__("4630");
module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "38fd":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__("69a8");
var toObject = __webpack_require__("4bf8");
var IE_PROTO = __webpack_require__("613b")('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;
};
/***/ }),
/***/ "41a0":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__("2aeb");
var descriptor = __webpack_require__("4630");
var setToStringTag = __webpack_require__("7f20");
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/***/ "456d":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__("4bf8");
var $keys = __webpack_require__("0d58");
__webpack_require__("5eda")('keys', function () {
return function keys(it) {
return $keys(toObject(it));
};
});
/***/ }),
/***/ "4588":
/***/ (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);
};
/***/ }),
/***/ "4630":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "4bf8":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__("be13");
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/***/ "5147":
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__("2b4c")('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/***/ "520a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__("0bfb");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var LAST_INDEX = 'lastIndex';
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/,
re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
})();
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
match = nativeExec.call(re, str);
if (UPDATES_LAST_INDEX_WRONG && match) {
re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
// eslint-disable-next-line no-loop-func
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "52a7":
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ "5537":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("8378");
var global = __webpack_require__("7726");
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__("2d00") ? 'pure' : 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "5ca1":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7726");
var core = __webpack_require__("8378");
var hide = __webpack_require__("32e9");
var redefine = __webpack_require__("2aba");
var ctx = __webpack_require__("9b43");
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 target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// 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;
/***/ }),
/***/ "5eda":
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__("5ca1");
var core = __webpack_require__("8378");
var fails = __webpack_require__("79e5");
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);
};
/***/ }),
/***/ "5f1b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__("23c6");
var builtinExec = RegExp.prototype.exec;
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw new TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw new TypeError('RegExp#exec called on incompatible receiver');
}
return builtinExec.call(R, S);
};
/***/ }),
/***/ "613b":
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__("5537")('keys');
var uid = __webpack_require__("ca5a");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "626a":
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__("2d95");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ "6762":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__("5ca1");
var $includes = __webpack_require__("c366")(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__("9c6c")('includes');
/***/ }),
/***/ "6821":
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__("626a");
var defined = __webpack_require__("be13");
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ "69a8":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "6a99":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("d3f4");
// 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");
};
/***/ }),
/***/ "7333":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__("0d58");
var gOPS = __webpack_require__("2621");
var pIE = __webpack_require__("52a7");
var toObject = __webpack_require__("4bf8");
var IObject = __webpack_require__("626a");
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__("79e5")(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;
/***/ }),
/***/ "7726":
/***/ (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
/***/ }),
/***/ "77f1":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("4588");
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);
};
/***/ }),
/***/ "79e5":
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "7f20":
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__("86cc").f;
var has = __webpack_require__("69a8");
var TAG = __webpack_require__("2b4c")('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/***/ "8378":
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.5' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "84f2":
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "86cc":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("cb7c");
var IE8_DOM_DEFINE = __webpack_require__("c69a");
var toPrimitive = __webpack_require__("6a99");
var dP = Object.defineProperty;
exports.f = __webpack_require__("9e1e") ? 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;
};
/***/ }),
/***/ "9b43":
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__("d8e8");
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);
};
};
/***/ }),
/***/ "9c6c":
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "9def":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__("4588");
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ "9e1e":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("79e5")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "a352":
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_a352__;
/***/ }),
/***/ "a481":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__("cb7c");
var toObject = __webpack_require__("4bf8");
var toLength = __webpack_require__("9def");
var toInteger = __webpack_require__("4588");
var advanceStringIndex = __webpack_require__("0390");
var regExpExec = __webpack_require__("5f1b");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
__webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = defined(this);
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
var res = maybeCallNative($replace, regexp, this, replaceValue);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return $replace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "aae3":
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__("d3f4");
var cof = __webpack_require__("2d95");
var MATCH = __webpack_require__("2b4c")('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/***/ "ac6a":
/***/ (function(module, exports, __webpack_require__) {
var $iterators = __webpack_require__("cadf");
var getKeys = __webpack_require__("0d58");
var redefine = __webpack_require__("2aba");
var global = __webpack_require__("7726");
var hide = __webpack_require__("32e9");
var Iterators = __webpack_require__("84f2");
var wks = __webpack_require__("2b4c");
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
var DOMIterables = {
CSSRuleList: true, // TODO: Not spec compliant, should be false.
CSSStyleDeclaration: false,
CSSValueList: false,
ClientRectList: false,
DOMRectList: false,
DOMStringList: false,
DOMTokenList: true,
DataTransferItemList: false,
FileList: false,
HTMLAllCollection: false,
HTMLCollection: false,
HTMLFormElement: false,
HTMLSelectElement: false,
MediaList: true, // TODO: Not spec compliant, should be false.
MimeTypeArray: false,
NamedNodeMap: false,
NodeList: true,
PaintRequestList: false,
Plugin: false,
PluginArray: false,
SVGLengthList: false,
SVGNumberList: false,
SVGPathSegList: false,
SVGPointList: false,
SVGStringList: false,
SVGTransformList: false,
SourceBufferList: false,
StyleSheetList: true, // TODO: Not spec compliant, should be false.
TextTrackCueList: false,
TextTrackList: false,
TouchList: false
};
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
var NAME = collections[i];
var explicit = DOMIterables[NAME];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
var key;
if (proto) {
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = ArrayValues;
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
}
}
/***/ }),
/***/ "b0c5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpExec = __webpack_require__("520a");
__webpack_require__("5ca1")({
target: 'RegExp',
proto: true,
forced: regexpExec !== /./.exec
}, {
exec: regexpExec
});
/***/ }),
/***/ "be13":
/***/ (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;
};
/***/ }),
/***/ "c366":
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__("6821");
var toLength = __webpack_require__("9def");
var toAbsoluteIndex = __webpack_require__("77f1");
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;
};
};
/***/ }),
/***/ "c649":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return insertNodeAt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return camelize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return console; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return removeNode; });
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a481");
/* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__);
function getConsole() {
if (typeof window !== "undefined") {
return window.console;
}
return global.console;
}
var console = getConsole();
function cached(fn) {
var cache = Object.create(null);
return function cachedFn(str) {
var hit = cache[str];
return hit || (cache[str] = fn(str));
};
}
var regex = /-(\w)/g;
var camelize = cached(function (str) {
return str.replace(regex, function (_, c) {
return c ? c.toUpperCase() : "";
});
});
function removeNode(node) {
if (node.parentElement !== null) {
node.parentElement.removeChild(node);
}
}
function insertNodeAt(fatherNode, node, position) {
var refNode = position === 0 ? fatherNode.children[0] : fatherNode.children[position - 1].nextSibling;
fatherNode.insertBefore(node, refNode);
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "c69a":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "c8ba":
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ "ca5a":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "cadf":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__("9c6c");
var step = __webpack_require__("d53b");
var Iterators = __webpack_require__("84f2");
var toIObject = __webpack_require__("6821");
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
var O = this._t;
var kind = this._k;
var index = this._i++;
if (!O || index >= O.length) {
this._t = undefined;
return step(1);
}
if (kind == 'keys') return step(0, index);
if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "cb7c":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("d3f4");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "ce10":
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__("69a8");
var toIObject = __webpack_require__("6821");
var arrayIndexOf = __webpack_require__("c366")(false);
var IE_PROTO = __webpack_require__("613b")('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;
};
/***/ }),
/***/ "d2c8":
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__("aae3");
var defined = __webpack_require__("be13");
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/***/ "d3f4":
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "d53b":
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/***/ "d8e8":
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "e11e":
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ "f559":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
var $export = __webpack_require__("5ca1");
var toLength = __webpack_require__("9def");
var context = __webpack_require__("d2c8");
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];
$export($export.P + $export.F * __webpack_require__("5147")(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = context(this, searchString, STARTS_WITH);
var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/***/ "f6fd":
/***/ (function(module, exports) {
// document.currentScript polyfill by Adam Miller
// MIT license
(function(document){
var currentScript = "currentScript",
scripts = document.getElementsByTagName('script'); // Live NodeList collection
// If browser needs currentScript polyfill, add get currentScript() to the document object
if (!(currentScript in document)) {
Object.defineProperty(document, currentScript, {
get: function(){
// IE 6-10 supports script readyState
// IE 10+ support stack trace
try { throw new Error(); }
catch (err) {
// Find the second match for the "at" string to get file src url from stack.
// Specifically works with the format of stack traces in IE.
var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1];
// For all scripts on the page, if src matches or if ready state is interactive, return the script tag
for(i in scripts){
if(scripts[i].src == res || scripts[i].readyState == "interactive"){
return scripts[i];
}
}
// If no match, return null
return null;
}
}
});
}
})(document);
/***/ }),
/***/ "f751":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__("5ca1");
$export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
/***/ }),
/***/ "fa5b":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
/***/ }),
/***/ "fab2":
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__("7726").document;
module.exports = document && document.documentElement;
/***/ }),
/***/ "fb15":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.
if (typeof window !== 'undefined') {
if (true) {
__webpack_require__("f6fd")
}
var setPublicPath_i
if ((setPublicPath_i = window.document.currentScript) && (setPublicPath_i = setPublicPath_i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) {
__webpack_require__.p = setPublicPath_i[1] // eslint-disable-line
}
}
// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.starts-with.js
var es6_string_starts_with = __webpack_require__("f559");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.array.includes.js
var es7_array_includes = __webpack_require__("6762");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.includes.js
var es6_string_includes = __webpack_require__("2fdb");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
// EXTERNAL MODULE: external {"commonjs":"sortablejs","commonjs2":"sortablejs","amd":"sortablejs","root":"Sortable"}
var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_ = __webpack_require__("a352");
var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_);
// EXTERNAL MODULE: ./src/util/helper.js
var helper = __webpack_require__("c649");
// CONCATENATED MODULE: ./src/vuedraggable.js
function buildAttribute(object, propName, value) {
if (value === undefined) {
return object;
}
object = object || {};
object[propName] = value;
return object;
}
function computeVmIndex(vnodes, element) {
return vnodes.map(function (elt) {
return elt.elm;
}).indexOf(element);
}
function _computeIndexes(slots, children, isTransition, footerOffset) {
if (!slots) {
return [];
}
var elmFromNodes = slots.map(function (elt) {
return elt.elm;
});
var footerIndex = children.length - footerOffset;
var rawIndexes = _toConsumableArray(children).map(function (elt, idx) {
return idx >= footerIndex ? elmFromNodes.length : elmFromNodes.indexOf(elt);
});
return isTransition ? rawIndexes.filter(function (ind) {
return ind !== -1;
}) : rawIndexes;
}
function emit(evtName, evtData) {
var _this = this;
this.$nextTick(function () {
return _this.$emit(evtName.toLowerCase(), evtData);
});
}
function delegateAndEmit(evtName) {
var _this2 = this;
return function (evtData) {
if (_this2.realList !== null) {
_this2["onDrag" + evtName](evtData);
}
emit.call(_this2, evtName, evtData);
};
}
function isTransitionName(name) {
return ["transition-group", "TransitionGroup"].includes(name);
}
function vuedraggable_isTransition(slots) {
if (!slots || slots.length !== 1) {
return false;
}
var _slots = _slicedToArray(slots, 1),
componentOptions = _slots[0].componentOptions;
if (!componentOptions) {
return false;
}
return isTransitionName(componentOptions.tag);
}
function getSlot(slot, scopedSlot, key) {
return slot[key] || (scopedSlot[key] ? scopedSlot[key]() : undefined);
}
function computeChildrenAndOffsets(children, slot, scopedSlot) {
var headerOffset = 0;
var footerOffset = 0;
var header = getSlot(slot, scopedSlot, "header");
if (header) {
headerOffset = header.length;
children = children ? [].concat(_toConsumableArray(header), _toConsumableArray(children)) : _toConsumableArray(header);
}
var footer = getSlot(slot, scopedSlot, "footer");
if (footer) {
footerOffset = footer.length;
children = children ? [].concat(_toConsumableArray(children), _toConsumableArray(footer)) : _toConsumableArray(footer);
}
return {
children: children,
headerOffset: headerOffset,
footerOffset: footerOffset
};
}
function getComponentAttributes($attrs, componentData) {
var attributes = null;
var update = function update(name, value) {
attributes = buildAttribute(attributes, name, value);
};
var attrs = Object.keys($attrs).filter(function (key) {
return key === "id" || key.startsWith("data-");
}).reduce(function (res, key) {
res[key] = $attrs[key];
return res;
}, {});
update("attrs", attrs);
if (!componentData) {
return attributes;
}
var on = componentData.on,
props = componentData.props,
componentDataAttrs = componentData.attrs;
update("on", on);
update("props", props);
Object.assign(attributes.attrs, componentDataAttrs);
return attributes;
}
var eventsListened = ["Start", "Add", "Remove", "Update", "End"];
var eventsToEmit = ["Choose", "Unchoose", "Sort", "Filter", "Clone"];
var readonlyProperties = ["Move"].concat(eventsListened, eventsToEmit).map(function (evt) {
return "on" + evt;
});
var draggingElement = null;
var props = {
options: Object,
list: {
type: Array,
required: false,
default: null
},
value: {
type: Array,
required: false,
default: null
},
noTransitionOnDrag: {
type: Boolean,
default: false
},
clone: {
type: Function,
default: function _default(original) {
return original;
}
},
element: {
type: String,
default: "div"
},
tag: {
type: String,
default: null
},
move: {
type: Function,
default: null
},
componentData: {
type: Object,
required: false,
default: null
}
};
var draggableComponent = {
name: "draggable",
inheritAttrs: false,
props: props,
data: function data() {
return {
transitionMode: false,
noneFunctionalComponentMode: false
};
},
render: function render(h) {
var slots = this.$slots.default;
this.transitionMode = vuedraggable_isTransition(slots);
var _computeChildrenAndOf = computeChildrenAndOffsets(slots, this.$slots, this.$scopedSlots),
children = _computeChildrenAndOf.children,
headerOffset = _computeChildrenAndOf.headerOffset,
footerOffset = _computeChildrenAndOf.footerOffset;
this.headerOffset = headerOffset;
this.footerOffset = footerOffset;
var attributes = getComponentAttributes(this.$attrs, this.componentData);
return h(this.getTag(), attributes, children);
},
created: function created() {
if (this.list !== null && this.value !== null) {
helper["b" /* console */].error("Value and list props are mutually exclusive! Please set one or another.");
}
if (this.element !== "div") {
helper["b" /* console */].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props");
}
if (this.options !== undefined) {
helper["b" /* console */].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props");
}
},
mounted: function mounted() {
var _this3 = this;
this.noneFunctionalComponentMode = this.getTag().toLowerCase() !== this.$el.nodeName.toLowerCase() && !this.getIsFunctional();
if (this.noneFunctionalComponentMode && this.transitionMode) {
throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));
}
var optionsAdded = {};
eventsListened.forEach(function (elt) {
optionsAdded["on" + elt] = delegateAndEmit.call(_this3, elt);
});
eventsToEmit.forEach(function (elt) {
optionsAdded["on" + elt] = emit.bind(_this3, elt);
});
var attributes = Object.keys(this.$attrs).reduce(function (res, key) {
res[Object(helper["a" /* camelize */])(key)] = _this3.$attrs[key];
return res;
}, {});
var options = Object.assign({}, this.options, attributes, optionsAdded, {
onMove: function onMove(evt, originalEvent) {
return _this3.onDragMove(evt, originalEvent);
}
});
!("draggable" in options) && (options.draggable = ">*");
this._sortable = new external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default.a(this.rootContainer, options);
this.computeIndexes();
},
beforeDestroy: function beforeDestroy() {
if (this._sortable !== undefined) this._sortable.destroy();
},
computed: {
rootContainer: function rootContainer() {
return this.transitionMode ? this.$el.children[0] : this.$el;
},
realList: function realList() {
return this.list ? this.list : this.value;
}
},
watch: {
options: {
handler: function handler(newOptionValue) {
this.updateOptions(newOptionValue);
},
deep: true
},
$attrs: {
handler: function handler(newOptionValue) {
this.updateOptions(newOptionValue);
},
deep: true
},
realList: function realList() {
this.computeIndexes();
}
},
methods: {
getIsFunctional: function getIsFunctional() {
var fnOptions = this._vnode.fnOptions;
return fnOptions && fnOptions.functional;
},
getTag: function getTag() {
return this.tag || this.element;
},
updateOptions: function updateOptions(newOptionValue) {
for (var property in newOptionValue) {
var value = Object(helper["a" /* camelize */])(property);
if (readonlyProperties.indexOf(value) === -1) {
this._sortable.option(value, newOptionValue[property]);
}
}
},
getChildrenNodes: function getChildrenNodes() {
if (this.noneFunctionalComponentMode) {
return this.$children[0].$slots.default;
}
var rawNodes = this.$slots.default;
return this.transitionMode ? rawNodes[0].child.$slots.default : rawNodes;
},
computeIndexes: function computeIndexes() {
var _this4 = this;
this.$nextTick(function () {
_this4.visibleIndexes = _computeIndexes(_this4.getChildrenNodes(), _this4.rootContainer.children, _this4.transitionMode, _this4.footerOffset);
});
},
getUnderlyingVm: function getUnderlyingVm(htmlElt) {
var index = computeVmIndex(this.getChildrenNodes() || [], htmlElt);
if (index === -1) {
//Edge case during move callback: related element might be
//an element different from collection
return null;
}
var element = this.realList[index];
return {
index: index,
element: element
};
},
getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
var vue = _ref.__vue__;
if (!vue || !vue.$options || !isTransitionName(vue.$options._componentTag)) {
if (!("realList" in vue) && vue.$children.length === 1 && "realList" in vue.$children[0]) return vue.$children[0];
return vue;
}
return vue.$parent;
},
emitChanges: function emitChanges(evt) {
var _this5 = this;
this.$nextTick(function () {
_this5.$emit("change", evt);
});
},
alterList: function alterList(onList) {
if (this.list) {
onList(this.list);
return;
}
var newList = _toConsumableArray(this.value);
onList(newList);
this.$emit("input", newList);
},
spliceList: function spliceList() {
var _arguments = arguments;
var spliceList = function spliceList(list) {
return list.splice.apply(list, _toConsumableArray(_arguments));
};
this.alterList(spliceList);
},
updatePosition: function updatePosition(oldIndex, newIndex) {
var updatePosition = function updatePosition(list) {
return list.splice(newIndex, 0, list.splice(oldIndex, 1)[0]);
};
this.alterList(updatePosition);
},
getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
var to = _ref2.to,
related = _ref2.related;
var component = this.getUnderlyingPotencialDraggableComponent(to);
if (!component) {
return {
component: component
};
}
var list = component.realList;
var context = {
list: list,
component: component
};
if (to !== related && list && component.getUnderlyingVm) {
var destination = component.getUnderlyingVm(related);
if (destination) {
return Object.assign(destination, context);
}
}
return context;
},
getVmIndex: function getVmIndex(domIndex) {
var indexes = this.visibleIndexes;
var numberIndexes = indexes.length;
return domIndex > numberIndexes - 1 ? numberIndexes : indexes[domIndex];
},
getComponent: function getComponent() {
return this.$slots.default[0].componentInstance;
},
resetTransitionData: function resetTransitionData(index) {
if (!this.noTransitionOnDrag || !this.transitionMode) {
return;
}
var nodes = this.getChildrenNodes();
nodes[index].data = null;
var transitionContainer = this.getComponent();
transitionContainer.children = [];
transitionContainer.kept = undefined;
},
onDragStart: function onDragStart(evt) {
this.context = this.getUnderlyingVm(evt.item);
evt.item._underlying_vm_ = this.clone(this.context.element);
draggingElement = evt.item;
},
onDragAdd: function onDragAdd(evt) {
var element = evt.item._underlying_vm_;
if (element === undefined) {
return;
}
Object(helper["d" /* removeNode */])(evt.item);
var newIndex = this.getVmIndex(evt.newIndex);
this.spliceList(newIndex, 0, element);
this.computeIndexes();
var added = {
element: element,
newIndex: newIndex
};
this.emitChanges({
added: added
});
},
onDragRemove: function onDragRemove(evt) {
Object(helper["c" /* insertNodeAt */])(this.rootContainer, evt.item, evt.oldIndex);
if (evt.pullMode === "clone") {
Object(helper["d" /* removeNode */])(evt.clone);
return;
}
var oldIndex = this.context.index;
this.spliceList(oldIndex, 1);
var removed = {
element: this.context.element,
oldIndex: oldIndex
};
this.resetTransitionData(oldIndex);
this.emitChanges({
removed: removed
});
},
onDragUpdate: function onDragUpdate(evt) {
Object(helper["d" /* removeNode */])(evt.item);
Object(helper["c" /* insertNodeAt */])(evt.from, evt.item, evt.oldIndex);
var oldIndex = this.context.index;
var newIndex = this.getVmIndex(evt.newIndex);
this.updatePosition(oldIndex, newIndex);
var moved = {
element: this.context.element,
oldIndex: oldIndex,
newIndex: newIndex
};
this.emitChanges({
moved: moved
});
},
updateProperty: function updateProperty(evt, propertyName) {
evt.hasOwnProperty(propertyName) && (evt[propertyName] += this.headerOffset);
},
computeFutureIndex: function computeFutureIndex(relatedContext, evt) {
if (!relatedContext.element) {
return 0;
}
var domChildren = _toConsumableArray(evt.to.children).filter(function (el) {
return el.style["display"] !== "none";
});
var currentDOMIndex = domChildren.indexOf(evt.related);
var currentIndex = relatedContext.component.getVmIndex(currentDOMIndex);
var draggedInList = domChildren.indexOf(draggingElement) !== -1;
return draggedInList || !evt.willInsertAfter ? currentIndex : currentIndex + 1;
},
onDragMove: function onDragMove(evt, originalEvent) {
var onMove = this.move;
if (!onMove || !this.realList) {
return true;
}
var relatedContext = this.getRelatedContextFromMoveEvent(evt);
var draggedContext = this.context;
var futureIndex = this.computeFutureIndex(relatedContext, evt);
Object.assign(draggedContext, {
futureIndex: futureIndex
});
var sendEvt = Object.assign({}, evt, {
relatedContext: relatedContext,
draggedContext: draggedContext
});
return onMove(sendEvt, originalEvent);
},
onDragEnd: function onDragEnd() {
this.computeIndexes();
draggingElement = null;
}
}
};
if (typeof window !== "undefined" && "Vue" in window) {
window.Vue.component("draggable", draggableComponent);
}
/* harmony default export */ var vuedraggable = (draggableComponent);
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (vuedraggable);
/***/ })
/******/ })["default"];
});
//# sourceMappingURL=vuedraggable.umd.js.map
/***/ }),
/***/ "b8e3":
/***/ (function(module, exports) {
module.exports = true;
/***/ }),
/***/ "ba92":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var toObject = __webpack_require__("4bf8");
var toAbsoluteIndex = __webpack_require__("77f1");
var toLength = __webpack_require__("9def");
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
var O = toObject(this);
var len = toLength(O.length);
var to = toAbsoluteIndex(target, len);
var from = toAbsoluteIndex(start, len);
var end = arguments.length > 2 ? arguments[2] : undefined;
var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
var inc = 1;
if (from < to && to < from + count) {
inc = -1;
from += count - 1;
to += count - 1;
}
while (count-- > 0) {
if (from in O) O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ }),
/***/ "bcaa":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("cb7c");
var isObject = __webpack_require__("d3f4");
var newPromiseCapability = __webpack_require__("a5b8");
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/***/ "bcc7":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ FORM_BUILDER_METHODS; });
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.sort.js
var es6_array_sort = __webpack_require__("55dd");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("768b");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.entries.js
var es7_object_entries = __webpack_require__("ffc1");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./src/configs/section.js + 92 modules
var section = __webpack_require__("dd3c");
// EXTERNAL MODULE: ./src/configs/controls.js + 162 modules
var controls = __webpack_require__("8dbe");
// EXTERNAL MODULE: ./src/configs/form.js
var configs_form = __webpack_require__("22a0");
// EXTERNAL MODULE: ./src/libraries/helper.js
var helper = __webpack_require__("43b3");
// EXTERNAL MODULE: ./src/configs/row.js
var row = __webpack_require__("7d7e");
// CONCATENATED MODULE: ./src/libraries/applier.js
/**
* Applier is an extending-object to make sure your old form-configuration still working well with the new version
* @author Phat Tran
* @param {{formConfig: Object, sections: Array, rows: Object, controls: Object}|undefined} formConfigObject
* @return {Object} Final Object that can always use with the Form-Builder/Renderer
*/
var applier_dataApplier = function dataApplier(formConfigObject) {
var appliedObject = {
formConfig: {},
sections: {},
rows: {},
controls: {}
}; // base-created-form
if (!formConfigObject) {
appliedObject.formConfig = helper["a" /* HELPER */].cloneDeep(configs_form["a" /* FORM_DEFAULT_DATA */]);
return appliedObject;
} // Form-Config Apply
appliedObject.formConfig = Object.assign({}, configs_form["a" /* FORM_DEFAULT_DATA */], formConfigObject.formConfig); // Section(s) Apply
for (var _i = 0, _Object$entries = Object.entries(formConfigObject.sections); _i < _Object$entries.length; _i++) {
var _Object$entries$_i = Object(slicedToArray["a" /* default */])(_Object$entries[_i], 2),
sectionId = _Object$entries$_i[0],
sectionObject = _Object$entries$_i[1];
appliedObject.sections[sectionId] = baseObjectExtend(section["a" /* SECTION_DEFAULT_DATA */], sectionObject);
} // Row(s) Apply
for (var _i2 = 0, _Object$entries2 = Object.entries(formConfigObject.rows); _i2 < _Object$entries2.length; _i2++) {
var _Object$entries2$_i = Object(slicedToArray["a" /* default */])(_Object$entries2[_i2], 2),
rowId = _Object$entries2$_i[0],
rowObject = _Object$entries2$_i[1];
appliedObject.rows[rowId] = baseObjectExtend(row["a" /* ROW_DEFAULT_DATA */], rowObject);
} // Control(s) Apply
for (var _i3 = 0, _Object$entries3 = Object.entries(formConfigObject.controls); _i3 < _Object$entries3.length; _i3++) {
var _Object$entries3$_i = Object(slicedToArray["a" /* default */])(_Object$entries3[_i3], 2),
controlId = _Object$entries3$_i[0],
controlObject = _Object$entries3$_i[1];
// get type - pick up config of type - merge it with the base
var type = controlObject.type;
var baseConfigOfType = controls["a" /* CONTROLS */][type].configData;
var baseDefaultConfig = baseObjectExtend(controls["b" /* CONTROL_DEFAULT_DATA */], baseConfigOfType); // add to base
appliedObject.controls[controlId] = Object.assign(baseDefaultConfig, controlObject);
}
return appliedObject;
};
/**
* From A Base Object - We Clone and Extending from a different Object
* @param {Object} baseObject
* @param {Object} fromObject
* @returns {Object}
*/
function baseObjectExtend(baseObject, fromObject) {
var clonedData = helper["a" /* HELPER */].cloneDeep(baseObject);
return Object.assign(clonedData, fromObject);
}
// CONCATENATED MODULE: ./src/mixins/form-builder/form-builder-methods.js
/**
* [Note] Do not use this mixin for other purpose. This is where I move all the code of FormBuilder to keep easy to:
* - Structuring
* - Refactoring
* - ...
* This file will keep 90% methods of Form-Builder
* @author Phat Tran <phattranminh96@gmail.com>
*/
var FORM_BUILDER_METHODS = {
data: function data() {
return {
sortedSections: []
};
},
methods: {
/**
* Do Mapping Before Rendering/Showing Up
*/
mapping: function mapping(value) {
this.formData = Object.assign({}, this.formData, applier_dataApplier(value));
this.doSortSection();
},
/**
* Create Default Form-Config-Data on a new section...
*/
createDefaultData: function createDefaultData() {
this.formData = Object.assign({}, applier_dataApplier(this.formData));
},
/**
* Create a new Blank Section into the Big `sections`
*/
addSection: function addSection(sectionType) {
var newSortOrder = Object.keys(this.formData.sections).length + 1;
var sectionObject = Object(section["c" /* createNewSection */])(sectionType, newSortOrder); // we have to push it from $set otherwise it will not reactive (LOL)
this.$set(this.formData.sections, sectionObject.uniqueId, sectionObject);
this.doSortSection();
},
addFormula: function addFormula(formula) {
if (!formula) {
return;
}
this.formData.formConfig.formula.push(formula);
this.$set(this.formData.formConfig, "formula", this.formData.formConfig.formula);
},
/**
* Sort Section and Cache it...
*/
doSortSection: function doSortSection() {
this.sortedSections = [];
for (var _i = 0, _Object$entries = Object.entries(this.formData.sections); _i < _Object$entries.length; _i++) {
var _Object$entries$_i = Object(slicedToArray["a" /* default */])(_Object$entries[_i], 2),
sectionId = _Object$entries$_i[0],
sectionObject = _Object$entries$_i[1];
this.sortedSections.push(sectionObject);
}
this.sortedSections.sort(function (a, b) {
return a.sortOrder - b.sortOrder;
});
}
}
};
/***/ }),
/***/ "bd25":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isMap = __webpack_require__("fd13");
var isSet = __webpack_require__("be03");
var isWeakMap = __webpack_require__("e3e3");
var isWeakSet = __webpack_require__("a101");
module.exports = function whichCollection(value) {
if (value && typeof value === 'object') {
if (isMap(value)) {
return 'Map';
}
if (isSet(value)) {
return 'Set';
}
if (isWeakMap(value)) {
return 'WeakMap';
}
if (isWeakSet(value)) {
return 'WeakSet';
}
}
return false;
};
/***/ }),
/***/ "bd86":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("85f2");
/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__);
function _defineProperty(obj, key, value) {
if (key in obj) {
_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
/***/ }),
/***/ "be03":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Set) {
// eslint-disable-next-line no-unused-vars
exported = function isSet(x) {
// `Set` is not present in this environment.
return false;
};
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$setHas) {
// eslint-disable-next-line no-unused-vars
exported = function isSet(x) {
// `Set` does not have a `has` method
return false;
};
}
module.exports = exported || function isSet(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$setHas.call(x);
if ($mapHas) {
try {
$mapHas.call(x);
} catch (e) {
return true;
}
}
return x instanceof $Set; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
};
/***/ }),
/***/ "be13":
/***/ (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;
};
/***/ }),
/***/ "bf0b":
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__("355d");
var createDesc = __webpack_require__("aebd");
var toIObject = __webpack_require__("36c3");
var toPrimitive = __webpack_require__("1bc3");
var has = __webpack_require__("07e3");
var IE8_DOM_DEFINE = __webpack_require__("794b");
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__("8e60") ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) { /* empty */ }
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
/***/ }),
/***/ "bfad":
/***/ (function(module, exports) {
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');
}
var l = obj.length;
if (l === +l) {
for (var i = 0; i < l; i++) {
fn.call(ctx, obj[i], i, obj);
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
}
};
/***/ }),
/***/ "c15a":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getPolyfill = __webpack_require__("5834");
var define = __webpack_require__("f367");
module.exports = function shimObjectIs() {
var polyfill = getPolyfill();
define(Object, { is: polyfill }, {
is: function testObjectIs() {
return Object.is !== polyfill;
}
});
return polyfill;
};
/***/ }),
/***/ "c207":
/***/ (function(module, exports) {
/***/ }),
/***/ "c366":
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__("6821");
var toLength = __webpack_require__("9def");
var toAbsoluteIndex = __webpack_require__("77f1");
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;
};
};
/***/ }),
/***/ "c367":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__("8436");
var step = __webpack_require__("50ed");
var Iterators = __webpack_require__("481b");
var toIObject = __webpack_require__("36c3");
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__("30f1")(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
var O = this._t;
var kind = this._k;
var index = this._i++;
if (!O || index >= O.length) {
this._t = undefined;
return step(1);
}
if (kind == 'keys') return step(0, index);
if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "c3a1":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("e6f3");
var enumBugKeys = __webpack_require__("1691");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "c532":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1d2b");
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
}
const typeOfTest = type => thing => typeof thing === type;
/**
* Determine if a value is an Array
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
/**
* Determine if a value is undefined
*
* @param {*} val The value to test
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
/**
* Determine if a value is a Buffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
}
/**
* Determine if a value is an ArrayBuffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
/**
* Determine if a value is a view on an ArrayBuffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
}
return result;
}
/**
* Determine if a value is a String
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
/**
* Determine if a value is a Function
*
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction = typeOfTest('function');
/**
* Determine if a value is a Number
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
/**
* Determine if a value is an Object
*
* @param {*} thing The value to test
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
/**
* Determine if a value is a Boolean
*
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
/**
* Determine if a value is a plain Object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
}
/**
* Determine if a value is a Date
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
/**
* Determine if a value is a File
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
/**
* Determine if a value is a Blob
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
/**
* Determine if a value is a FileList
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
/**
* Determine if a value is a Stream
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Stream, otherwise false
*/
const isStream = (val) => isObject(val) && isFunction(val.pipe);
/**
* Determine if a value is a FormData
*
* @param {*} thing The value to test
*
* @returns {boolean} True if value is an FormData, otherwise false
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
}
/**
* Determine if a value is a URLSearchParams object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
/**
* Trim excess whitespace off the beginning and end of a string
*
* @param {String} str The String to trim
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
/**
* Iterate over an Array or an Object invoking a function for each item.
*
* If `obj` is an Array callback will be called passing
* the value, index, and complete array for each item.
*
* If 'obj' is an Object callback will be called passing
* the value, key, and complete object for each property.
*
* @param {Object|Array} obj The object to iterate
* @param {Function} fn The callback to invoke for each item
*
* @param {Boolean} [allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
return;
}
let i;
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
/*eslint no-param-reassign:0*/
obj = [obj];
}
if (isArray(obj)) {
// Iterate over array values
for (i = 0, l = obj.length; i < l; i++) {
fn.call(null, obj[i], i, obj);
}
} else {
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const len = keys.length;
let key;
for (i = 0; i < len; i++) {
key = keys[i];
fn.call(null, obj[key], key, obj);
}
}
}
function findKey(obj, key) {
key = key.toLowerCase();
const keys = Object.keys(obj);
let i = keys.length;
let _key;
while (i-- > 0) {
_key = keys[i];
if (key === _key.toLowerCase()) {
return _key;
}
}
return null;
}
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
* immutably merges the properties of each object and returns result.
*
* When multiple objects contain the same key the later object in
* the arguments list will take precedence.
*
* Example:
*
* ```js
* var result = merge({foo: 123}, {foo: 456});
* console.log(result.foo); // outputs 456
* ```
*
* @param {Object} obj1 Object to merge
*
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless} = isContextDefined(this) && this || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
result[targetKey] = merge({}, val);
} else if (isArray(val)) {
result[targetKey] = val.slice();
} else {
result[targetKey] = val;
}
}
for (let i = 0, l = arguments.length; i < l; i++) {
arguments[i] && forEach(arguments[i], assignValue);
}
return result;
}
/**
* Extends object a by mutably adding to it the properties of object b.
*
* @param {Object} a The object to be extended
* @param {Object} b The object to copy properties from
* @param {Object} thisArg The object to bind function to
*
* @param {Boolean} [allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction(val)) {
a[key] = Object(_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(val, thisArg);
} else {
a[key] = val;
}
}, {allOwnKeys});
return a;
}
/**
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
*
* @param {string} content with BOM
*
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
content = content.slice(1);
}
return content;
}
/**
* Inherit the prototype methods from one constructor into another
* @param {function} constructor
* @param {function} superConstructor
* @param {object} [props]
* @param {object} [descriptors]
*
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
constructor.prototype.constructor = constructor;
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
});
props && Object.assign(constructor.prototype, props);
}
/**
* Resolve object with deep prototype chain to a flat object
* @param {Object} sourceObj source object
* @param {Object} [destObj]
* @param {Function|Boolean} [filter]
* @param {Function} [propFilter]
*
* @returns {Object}
*/
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
let props;
let i;
let prop;
const merged = {};
destObj = destObj || {};
// eslint-disable-next-line no-eq-null,eqeqeq
if (sourceObj == null) return destObj;
do {
props = Object.getOwnPropertyNames(sourceObj);
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
return destObj;
}
/**
* Determines whether a string ends with the characters of a specified string
*
* @param {String} str
* @param {String} searchString
* @param {Number} [position= 0]
*
* @returns {boolean}
*/
const endsWith = (str, searchString, position) => {
str = String(str);
if (position === undefined || position > str.length) {
position = str.length;
}
position -= searchString.length;
const lastIndex = str.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
}
/**
* Returns new array from array like object or null if failed
*
* @param {*} [thing]
*
* @returns {?Array}
*/
const toArray = (thing) => {
if (!thing) return null;
if (isArray(thing)) return thing;
let i = thing.length;
if (!isNumber(i)) return null;
const arr = new Array(i);
while (i-- > 0) {
arr[i] = thing[i];
}
return arr;
}
/**
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
* thing passed in is an instance of Uint8Array
*
* @param {TypedArray}
*
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
// eslint-disable-next-line func-names
return thing => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
*
* @param {Object<any, any>} obj - The object to iterate over.
* @param {Function} fn - The function to call for each entry.
*
* @returns {void}
*/
const forEachEntry = (obj, fn) => {
const generator = obj && obj[Symbol.iterator];
const iterator = generator.call(obj);
let result;
while ((result = iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
}
/**
* It takes a regular expression and a string, and returns an array of all the matches
*
* @param {string} regExp - The regular expression to match against.
* @param {string} str - The string to search.
*
* @returns {Array<boolean>}
*/
const matchAll = (regExp, str) => {
let matches;
const arr = [];
while ((matches = regExp.exec(str)) !== null) {
arr.push(matches);
}
return arr;
}
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
/**
* Determine if a value is a RegExp object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
const reducedDescriptors = {};
forEach(descriptors, (descriptor, name) => {
let ret;
if ((ret = reducer(descriptor, name, obj)) !== false) {
reducedDescriptors[name] = ret || descriptor;
}
});
Object.defineProperties(obj, reducedDescriptors);
}
/**
* Makes all methods read-only
* @param {Object} obj
*/
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
return false;
}
const value = obj[name];
if (!isFunction(value)) return;
descriptor.enumerable = false;
if ('writable' in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
};
}
});
}
const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
obj[value] = true;
});
}
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
return obj;
}
const noop = () => {}
const toFiniteNumber = (value, defaultValue) => {
value = +value;
return Number.isFinite(value) ? value : defaultValue;
}
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
}
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
while (size--) {
str += alphabet[Math.random() * length|0]
}
return str;
}
/**
* If the thing is a FormData object, return true, otherwise return false.
*
* @param {unknown} thing - The thing to check.
*
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
}
if(!('toJSON' in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
forEach(source, (value, key) => {
const reducedValue = visit(value, i + 1);
!isUndefined(reducedValue) && (target[key] = reducedValue);
});
stack[i] = undefined;
return target;
}
}
return source;
}
return visit(obj, 0);
}
const isAsyncFn = kindOfTest('AsyncFunction');
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
/* harmony default export */ __webpack_exports__["a"] = ({
isArray,
isArrayBuffer,
isBuffer,
isFormData,
isArrayBufferView,
isString,
isNumber,
isBoolean,
isObject,
isPlainObject,
isUndefined,
isDate,
isFile,
isBlob,
isRegExp,
isFunction,
isStream,
isURLSearchParams,
isTypedArray,
isFileList,
forEach,
merge,
extend,
trim,
stripBOM,
inherits,
toFlatObject,
kindOf,
kindOfTest,
endsWith,
toArray,
forEachEntry,
matchAll,
isHTMLForm,
hasOwnProperty,
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors,
freezeMethods,
toObjectSet,
toCamelCase,
noop,
toFiniteNumber,
findKey,
global: _global,
isContextDefined,
ALPHABET,
generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
isThenable
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "c5e1":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/Chart.vue?vue&type=template&id=49c0c310&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{"width":"100% !important"}},[_c('h4',[_vm._v(_vm._s(_vm.title))]),_c('div',{staticStyle:{"width":"100% !important"},attrs:{"id":"chart123"}})])}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/row-views/Chart.vue?vue&type=template&id=49c0c310&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/Chart.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */ var Chartvue_type_script_lang_js_ = ({
props: {
title: String,
dataset: {
type: Array,
default: [],
required: true
},
labels: {
type: Array,
default: [],
required: true
}
},
watch: {
dataset: function dataset(val) {
this.createChart();
}
},
data: function data() {
return {
currentChart: null
};
},
mounted: function mounted() {
this.createChart();
},
methods: {
createChart: function createChart() {
var data = {
labels: this.labels,
datasets: this.dataset
};
if (this.labels.length) {
this.currentChart = new frappe.Chart("#chart123", {
// or a DOM element,
title: "",
data: data,
type: 'axis-mixed',
// or 'bar', 'line', 'scatter', 'pie', 'percentage'
height: 300,
width: 700,
colors: ['#7cd6fd', '#743ee2'],
axisOptions: {
xIsSeries: true // default: false
}
});
}
},
getFakeDataSet: function getFakeDataSet() {
return [{
name: "Test Graph",
type: "line",
values: [1, 2, 3, 4]
}];
},
getFakeLabeSet: function getFakeLabeSet() {
return ["monday", "tuesday", "wednesday", "Thursday"];
}
}
});
// CONCATENATED MODULE: ./src/views/builder/row-views/Chart.vue?vue&type=script&lang=js&
/* harmony default export */ var row_views_Chartvue_type_script_lang_js_ = (Chartvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/views/builder/row-views/Chart.vue?vue&type=style&index=0&lang=css&
var Chartvue_type_style_index_0_lang_css_ = __webpack_require__("45ff");
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/builder/row-views/Chart.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
row_views_Chartvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var Chart = __webpack_exports__["a"] = (component.exports);
/***/ }),
/***/ "c69a":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "c72d":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _mixins_control_field_extend_mixin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("653e");
/**
* Control Skeleton
* To extend for creating new custom control
*/
/* harmony default export */ __webpack_exports__["a"] = ({
name: "BaseControlSkeleton",
mixins: [_mixins_control_field_extend_mixin__WEBPACK_IMPORTED_MODULE_0__[/* CONTROL_FIELD_EXTEND_MIXIN */ "a"]]
});
/***/ }),
/***/ "c8ba":
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ "c8ba6":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__("16e7");
var lacksProperEnumerationOrder = function () {
if (!Object.assign) {
return false;
}
/*
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
* note: this does not detect the bug unless there's 20 characters
*/
var str = 'abcdefghijklmnopqrst';
var letters = str.split('');
var map = {};
for (var i = 0; i < letters.length; ++i) {
map[letters[i]] = letters[i];
}
var obj = Object.assign({}, map);
var actual = '';
for (var k in obj) {
actual += k;
}
return str !== actual;
};
var assignHasPendingExceptions = function () {
if (!Object.assign || !Object.preventExtensions) {
return false;
}
/*
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
* which is 72% slower than our shim, and Firefox 40's native implementation.
*/
var thrower = Object.preventExtensions({ 1: 2 });
try {
Object.assign(thrower, 'xy');
} catch (e) {
return thrower[1] === 'y';
}
return false;
};
module.exports = function getPolyfill() {
if (!Object.assign) {
return implementation;
}
if (lacksProperEnumerationOrder()) {
return implementation;
}
if (assignHasPendingExceptions()) {
return implementation;
}
return Object.assign;
};
/***/ }),
/***/ "c992":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "ca0c":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddControlControl.vue?vue&type=template&id=6d1e2399&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"add-control-outer",class:_vm.styles.COLUMNS.COL12},[_c('div',{staticClass:"add-control-container",on:{"click":_vm.openAddControl}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '32px', '32px', '#000'))}}),_c('span',[_vm._v("Add Control")])])])}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddControlControl.vue?vue&type=template&id=6d1e2399&
// EXTERNAL MODULE: ./src/mixins/style-injection-mixin.js
var style_injection_mixin = __webpack_require__("28fe");
// EXTERNAL MODULE: ./src/configs/events.js
var events = __webpack_require__("fbe6");
// EXTERNAL MODULE: ./src/libraries/sidebar-renderer.class.js
var sidebar_renderer_class = __webpack_require__("1ec8");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarConceptSelectList.vue?vue&type=template&id=5d7bdd48&scoped=true&
var SidebarConceptSelectListvue_type_template_id_5d7bdd48_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar-form-configuration"},[_c('h5',[_vm._v("Select Concept")]),_c('div',[_c('div',{staticStyle:{"margin-bottom":"8px"}},[_c('div',{},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.searchQuery),expression:"searchQuery"}],staticClass:"form-control md-field",attrs:{"type":"text","placeholder":"Search...."},domProps:{"value":(_vm.searchQuery)},on:{"input":function($event){if($event.target.composing){ return; }_vm.searchQuery=$event.target.value}}})])])]),_c('div',{class:[_vm.styles.LIST_GROUP.CONTAINER]},_vm._l((_vm.controlList),function(control){return _c('a',{key:control.name,class:_vm.styles.LIST_GROUP.SINGLE_ITEM,attrs:{"href":"javascript:void(0)"},on:{"click":function($event){return _vm.selectedControl(control)}}},[_c('p',{staticClass:"type-headline",domProps:{"textContent":_vm._s(control.name || control.type )}}),_c('p',{staticClass:"type-desc",domProps:{"textContent":_vm._s(control.description)}})])}),0)])}
var SidebarConceptSelectListvue_type_template_id_5d7bdd48_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarConceptSelectList.vue?vue&type=template&id=5d7bdd48&scoped=true&
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("bd86");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js
var is_array = __webpack_require__("a745");
var is_array_default = /*#__PURE__*/__webpack_require__.n(is_array);
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("db2a");
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (is_array_default()(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol.js
var symbol = __webpack_require__("67bb");
var symbol_default = /*#__PURE__*/__webpack_require__.n(symbol);
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol/iterator.js
var iterator = __webpack_require__("5d58");
var iterator_default = /*#__PURE__*/__webpack_require__.n(iterator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/from.js
var from = __webpack_require__("774e");
var from_default = /*#__PURE__*/__webpack_require__.n(from);
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/iterableToArray.js
function _iterableToArray(iter) {
if (typeof symbol_default.a !== "undefined" && iter[iterator_default.a] != null || iter["@@iterator"] != null) return from_default()(iter);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("e630");
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/toConsumableArray.js
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}
// EXTERNAL MODULE: ./src/configs/controls.js + 162 modules
var controls = __webpack_require__("8dbe");
// EXTERNAL MODULE: ./src/mixins/sidebar-body-mixin.js
var sidebar_body_mixin = __webpack_require__("cbce");
// EXTERNAL MODULE: ./src/libraries/helper.js
var helper = __webpack_require__("43b3");
// EXTERNAL MODULE: ./src/services/frappe.js + 38 modules
var frappe = __webpack_require__("ee28");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarConceptSelectList.vue?vue&type=script&lang=js&
var _name$mixins$computed;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SidebarConceptSelectListvue_type_script_lang_js_ = (_name$mixins$computed = {
name: "SidebarControlSelectList",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], sidebar_body_mixin["a" /* SIDEBAR_BODY_MIXIN */]],
computed: {
controlTypes: function controlTypes() {
return controls["a" /* CONTROLS */];
}
},
data: function data() {
return {
dataKey: "newControlData",
newControlData: null,
searchQuery: null,
apiList: [// [
// "Female",
// "Refers to female gender",
// '{"uniqueId":"control-a4d0e350-b1cf-42ed-bfc4-957655457b0b","type":"text","name":"Female","label":"Female","isShowLabel":true,"placeholderText":"","containerClass":"col-md-6 md-layout-item md-size-50","additionalContainerClass":"","additionalFieldClass":"","additionalLabelClass":"","defaultValue":"","validations":[],"rows":3}',
// ],
// [
// "Firstname",
// "The first name of a person",
// '{"uniqueId":"control-8e6f1378-109c-48e2-8344-267e3a8c91d5","type":"input","name":"Firstname","label":"First name","isShowLabel":true,"placeholderText":"","containerClass":"col-md-6 md-layout-item md-size-50","additionalContainerClass":"","additionalFieldClass":"","additionalLabelClass":"","defaultValue":"","validations":[]}',
// ],
// [
// "DC-Gender-00005",
// "The gender of a person normally referring to male or female",
// '{"uniqueId":"control-7a1c4094-c552-4811-a1ef-a68f7632d9e1","type":"radio","name":"DC-Gender-00005","label":"Gender","isShowLabel":true,"placeholderText":"","containerClass":"col-md-6 md-layout-item md-size-50","additionalContainerClass":"","additionalFieldClass":"","additionalLabelClass":"","defaultValue":"","validations":[],"displayMode":"line","position":"left","items":[{"text":"Male","value":"DC-Male-00003"},{"text":"Female","value":"Female"}]}',
// ],
// [
// "Lastname",
// "The lastname of a person as per identification documents",
// '{"uniqueId":"control-8e6f1378-109c-48e2-8344-267e3a8c91d5","type":"input","name":"Lastname","label":"Lastname","isShowLabel":true,"placeholderText":"","containerClass":"col-md-6 md-layout-item md-size-50","additionalContainerClass":"","additionalFieldClass":"","additionalLabelClass":"","defaultValue":"","validations":[]}',
// ],
]
};
}
}, Object(defineProperty["a" /* default */])(_name$mixins$computed, "computed", {
controlList: function controlList() {
var list = this.apiList.map(function (item) {
return {
name: item[0],
description: item[1],
config: item[2]
};
});
return [].concat(_toConsumableArray(list), _toConsumableArray(controls["c" /* STATIC_CONTROLS */]));
}
}), Object(defineProperty["a" /* default */])(_name$mixins$computed, "watch", {
searchQuery: function searchQuery(t) {
this.fetchConcepts(t);
}
}), Object(defineProperty["a" /* default */])(_name$mixins$computed, "methods", {
selectedControl: function selectedControl(controlKey) {
// create
// this.newControlData = createControlData(controlKey);
if (controlKey.config) {
var configuration = JSON.parse(controlKey.config);
configuration.uniqueId = controlKey.name;
this.newControlData = configuration;
this.save(true);
} else {
controlKey.uniqueId = "control-" + helper["a" /* HELPER */].getUUIDv4();
this.newControlData = controlKey;
this.save(true);
}
},
fetchConcepts: function fetchConcepts(t) {
var _this = this;
var e = this;
Object(frappe["a" /* api */])({
method: "clinical.api.forms.form_builder.concept_query",
args: {
txt: t
}
}).then(function (t) {
var n = t.message;
_this.apiList = n;
});
}
}), _name$mixins$computed);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarConceptSelectList.vue?vue&type=script&lang=js&
/* harmony default export */ var sidebar_config_views_SidebarConceptSelectListvue_type_script_lang_js_ = (SidebarConceptSelectListvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarConceptSelectList.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
sidebar_config_views_SidebarConceptSelectListvue_type_script_lang_js_,
SidebarConceptSelectListvue_type_template_id_5d7bdd48_scoped_true_render,
SidebarConceptSelectListvue_type_template_id_5d7bdd48_scoped_true_staticRenderFns,
false,
null,
"5d7bdd48",
null
)
/* harmony default export */ var SidebarConceptSelectList = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddControlControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AddControlControlvue_type_script_lang_js_ = ({
name: "AddControlControl",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
section: {
type: Object,
required: true
} // TODO: Need to extend: Row too.
},
data: function data() {
return {
show: false
};
},
methods: {
/**
* Open the sidebar to add control yeah yeah
*/
openAddControl: function openAddControl() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, this.runnerId);
},
/**
* Render the sidebar if can be opened hehe
*/
afterOpenedSidebar: function afterOpenedSidebar(runnerId) {
if (runnerId !== this.runnerId) {
return;
} // render
this.renderSidebar();
},
/**
* Trigger this to render the GlobalSidebar for Select Controls
*/
renderSidebar: function renderSidebar() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, new sidebar_renderer_class["a" /* default */](this.runnerId, SidebarConceptSelectList, this.section));
},
/**
* After user chose a control. This will be invoked in order to create a new control
*/
createNewControlForSection: function createNewControlForSection(runnerId, controlObj) {
// runnerId to check the right identifier of the Invoker
// uniqueId to check if we create new control or not
if (this.runnerId !== runnerId) {
return;
} // emit to FormBuilder and let it create control...
// TODO: Need to extend - For Rows
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.CREATE, this.section.uniqueId, controlObj);
}
},
computed: {
/**
* Runner ID to detect the right
* @returns {string}
*/
runnerId: function runnerId() {
return "add-control-".concat(this.section.uniqueId);
}
},
created: function created() {
// listen to Global Sidebar
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, this.afterOpenedSidebar);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE_AND_CLOSE, this.createNewControlForSection);
}
});
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddControlControl.vue?vue&type=script&lang=js&
/* harmony default export */ var add_controls_AddControlControlvue_type_script_lang_js_ = (AddControlControlvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddControlControl.vue
/* normalize component */
var AddControlControl_component = Object(componentNormalizer["a" /* default */])(
add_controls_AddControlControlvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var AddControlControl = __webpack_exports__["a"] = (AddControlControl_component.exports);
/***/ }),
/***/ "ca5a":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "cab0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_FullTableRowRenderView_vue_vue_type_style_index_0_id_d895f52c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("acbf");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_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_FullTableRowRenderView_vue_vue_type_style_index_0_id_d895f52c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_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_FullTableRowRenderView_vue_vue_type_style_index_0_id_d895f52c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/***/ }),
/***/ "caca":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ALERT_DIALOG; });
var ALERT_DIALOG = {
/**
* Show Alert Dialog
* @param message
* @param stopTime
*/
show: function show(message) {
var stopTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3000;
var alert = document.createElement('div');
alert.className = 'v-form-alert';
alert.innerText = message;
document.getElementsByTagName('body')[0].append(alert);
setTimeout(function () {
alert.remove();
}, stopTime || 3000);
}
};
/***/ }),
/***/ "cadf":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__("9c6c");
var step = __webpack_require__("d53b");
var Iterators = __webpack_require__("84f2");
var toIObject = __webpack_require__("6821");
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
var O = this._t;
var kind = this._k;
var index = this._i++;
if (!O || index >= O.length) {
this._t = undefined;
return step(1);
}
if (kind == 'keys') return step(0, index);
if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "cb7c":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("d3f4");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "cbce":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SIDEBAR_BODY_MIXIN; });
var SIDEBAR_BODY_MIXIN = {
props: {
/**
* Data Object that you will use for the Component inner Sidebar body
* Normally, you need to create your own `data` field and emit it later.
*/
dataPackage: Object,
/**
* Main Form-Data from the Parent.
* There might be some Configuration need these data.
*/
formData: Object
},
data: function data() {
return {
/**
* Ideally, you have put override this key. It will be used to access your data to send it back to your component
* @example For SidebarFormConfiguration. I created `formConfiguration` data field. And I will handle all data-changing stuff
* only in `formConfiguration`. And that will be the data I need to send it back to the right component.
* @required
*/
dataKey: ""
};
},
methods: {
/**
* Close the sidebar without fire any events
*/
close: function close() {
this.$emit(this.emitCloseKey, false);
},
/**
* Save the configuration (Actually I will close the sidebar and emit event =)) )
*/
save: function save() {
var close = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var data = this[this.dataKey];
if (close) {
this.$emit(this.emitSaveAndCloseKey, data);
} else {
this.$emit(this.emitSaveKey, data);
}
}
},
computed: {
/**
* Emit-Key to parent to close the sidebar
* @returns {string}
*/
emitCloseKey: function emitCloseKey() {
return 'close';
},
/**
* Emit-Key to the parent to save the result
* @returns {string}
*/
emitSaveKey: function emitSaveKey() {
return 'save';
},
/**
* Emit-Key - Save and Close
* @returns {string}
*/
emitSaveAndCloseKey: function emitSaveAndCloseKey() {
return 'saveAndClose';
}
}
};
/***/ }),
/***/ "ccb9":
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__("5168");
/***/ }),
/***/ "cd1c":
/***/ (function(module, exports, __webpack_require__) {
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__("e853");
module.exports = function (original, length) {
return new (speciesConstructor(original))(length);
};
/***/ }),
/***/ "ce10":
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__("69a8");
var toIObject = __webpack_require__("6821");
var arrayIndexOf = __webpack_require__("c366")(false);
var IE_PROTO = __webpack_require__("613b")('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;
};
/***/ }),
/***/ "cf35":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TABLE_VIEW_MIXIN; });
/* harmony import */ var _mixins_style_injection_mixin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("28fe");
/**
* Base extendation for the Row-View - Form-Builder
*/
var TABLE_VIEW_MIXIN = {
mixins: [_mixins_style_injection_mixin__WEBPACK_IMPORTED_MODULE_0__[/* STYLE_INJECTION_MIXIN */ "a"]],
props: {
/**
* Section that belong to the current row
*/
section: {
type: Object,
required: true
},
readOnly: {
type: Boolean,
required: false,
default: true
},
reference: Object
}
};
/***/ }),
/***/ "d225":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
/***/ }),
/***/ "d2c8":
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__("aae3");
var defined = __webpack_require__("be13");
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/***/ "d2d5":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("1654");
__webpack_require__("549b");
module.exports = __webpack_require__("584a").Array.from;
/***/ }),
/***/ "d3f4":
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "d4ab":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
/***/ }),
/***/ "d4c0":
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__("0d58");
var gOPS = __webpack_require__("2621");
var pIE = __webpack_require__("52a7");
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/***/ "d53b":
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/***/ "d60e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STYLES; });
/**
* Styling for Vue-Form-Builder
* Mostly it about the Container class.
* <note>
* The classes can be re-placed in run-time (For other CSS framework if you want)
* But the main ideas is following Bootstrap, hopefully yours framework is have a same structural.
* </note>
* @author Phat Tran
*/
var STYLES = {
CONTAINER: {
FLUID: "container-fluid md-layout",
NORMAL: "container"
},
ROW: "row md-layout",
COLUMNS: {
COL1: "col-md-1 md-layout-item md-size-5",
COL2: "col-md-2 md-layout-item md-size-10",
COL3: "col-md-3 md-layout-item md-size-25",
COL4: "col-md-4 md-layout-item md-size-33",
COL5: "col-md-5 md-layout-item md-size-40",
COL6: "col-md-6 md-layout-item md-size-50",
COL7: "col-md-7 md-layout-item md-size-60",
COL8: "col-md-8 md-layout-item md-size-66",
COL9: "col-md-9 md-layout-item md-size-75",
COL10: "col-md-10 md-layout-item md-size-90",
COL11: "col-md-11 md-layout-item md-size-95",
COL12: "col-md-12 md-layout-item md-size-100"
},
/**
* List Group Classes - Used in AddSectionVueControl
*/
LIST_GROUP: {
CONTAINER: "list-group md-list",
// div.list-group
SINGLE_ITEM: "list-group-item list-group-item-action md-list-item md-list-item-action" //a[href=...].list-group-item.list-group-item-action
},
/**
* Button Classes
*/
BUTTON: {
PRIMARY: "btn btn-primary md-button md-raised md-primary md-theme-default",
SECONDARY: "btn btn-secondary md-button md-raised md-secondary md-theme-default",
DEFAULT: "btn btn-default md-button md-raised md-default md-theme-default",
SUCCESS: "btn btn-success md-button md-raised md-success md-theme-default",
DANGER: "btn btn-danger md-button md-raised md-accent md-theme-default",
WARNING: "btn btn-warning md-button md-raised md-warning md-theme-default",
INFO: "btn btn-info md-button md-raised md-info md-theme-default"
},
/**
* Form Classes
*/
FORM: {
FORM_GROUP: "form-group",
INPUT_GROUP: "input-group",
FORM_CONTROL: "form-control md-field",
ERROR_OUTLINE: "is-invalid md-error",
ERROR_MESSAGE: "invalid-feedback"
},
/**
* Table Classes
*/
TABLE: {
TABLE_CLASS: "table md-table",
TR_CLASS: "md-table-row",
TD_CLASS: "md-table-cell"
}
};
/***/ }),
/***/ "d6c7":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var slice = Array.prototype.slice;
var isArgs = __webpack_require__("d4ab");
var origKeys = Object.keys;
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__("b189");
var originalKeys = Object.keys;
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
var args = Object.keys(arguments);
return args && args.length === arguments.length;
}(1, 2));
if (!keysWorksWithArguments) {
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
if (isArgs(object)) {
return originalKeys(slice.call(object));
}
return originalKeys(object);
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
/***/ }),
/***/ "d6ef":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var numberIsNaN = function (value) {
return value !== value;
};
module.exports = function is(a, b) {
if (a === 0 && b === 0) {
return 1 / a === 1 / b;
}
if (a === b) {
return true;
}
if (numberIsNaN(a) && numberIsNaN(b)) {
return true;
}
return false;
};
/***/ }),
/***/ "d864":
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__("79aa");
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);
};
};
/***/ }),
/***/ "d8d6":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("1654");
__webpack_require__("6c1c");
module.exports = __webpack_require__("ccb9").f('iterator');
/***/ }),
/***/ "d8d8":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var callBound = __webpack_require__("545e");
var hasToStringTag = __webpack_require__("07a4")();
var has;
var $exec;
var isRegexMarker;
var badStringifier;
if (hasToStringTag) {
has = callBound('Object.prototype.hasOwnProperty');
$exec = callBound('RegExp.prototype.exec');
isRegexMarker = {};
var throwRegexMarker = function () {
throw isRegexMarker;
};
badStringifier = {
toString: throwRegexMarker,
valueOf: throwRegexMarker
};
if (typeof Symbol.toPrimitive === 'symbol') {
badStringifier[Symbol.toPrimitive] = throwRegexMarker;
}
}
var $toString = callBound('Object.prototype.toString');
var gOPD = Object.getOwnPropertyDescriptor;
var regexClass = '[object RegExp]';
module.exports = hasToStringTag
// eslint-disable-next-line consistent-return
? function isRegex(value) {
if (!value || typeof value !== 'object') {
return false;
}
var descriptor = gOPD(value, 'lastIndex');
var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
if (!hasLastIndexDataProperty) {
return false;
}
try {
$exec(value, badStringifier);
} catch (e) {
return e === isRegexMarker;
}
}
: function isRegex(value) {
// In older browsers, typeof regex incorrectly returns 'function'
if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
return false;
}
return $toString(value) === regexClass;
};
/***/ }),
/***/ "d8e8":
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "d9f6":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("e4ae");
var IE8_DOM_DEFINE = __webpack_require__("794b");
var toPrimitive = __webpack_require__("1bc3");
var dP = Object.defineProperty;
exports.f = __webpack_require__("8e60") ? 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;
};
/***/ }),
/***/ "da2a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _mixins_control_special_config_mixin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8ae1");
/* harmony default export */ __webpack_exports__["a"] = ({
name: "BaseControlConfigSkeleton",
mixins: [_mixins_control_special_config_mixin__WEBPACK_IMPORTED_MODULE_0__[/* CONTROL_SPECIAL_CONFIG_MIXIN */ "a"]]
});
/***/ }),
/***/ "db2a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
/***/ }),
/***/ "dbdb":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("584a");
var global = __webpack_require__("e53d");
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__("b8e3") ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "dcbc":
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__("2aba");
module.exports = function (target, src, safe) {
for (var key in src) redefine(target, key, src[key], safe);
return target;
};
/***/ }),
/***/ "dd3c":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ SECTION_TYPES; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ SECTION_DEFAULT_DATA; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createNewSection; });
// EXTERNAL MODULE: ./src/libraries/helper.js
var helper = __webpack_require__("43b3");
// EXTERNAL MODULE: ./src/configs/row.js
var row = __webpack_require__("7d7e");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/NormalSectionView.vue?vue&type=template&id=2b6b601d&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"normal-section"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],staticClass:"headline-block p5"},[_c('h2',{class:_vm.section.headlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('p',{class:_vm.section.subHeadlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})]),_c('draggable',{class:_vm.draggableClasses,attrs:{"ghost-class":"ghost","handle":_vm.dragControlHandle,"list":_vm.section.controls,"group":_vm.dragGroup}},[_vm._l((_vm.section.controls),function(controlId){return _c('ControlView',{key:controlId,attrs:{"control":_vm.controls[controlId],"parent-id":_vm.section.uniqueId}})}),(!_vm.hasControl)?_c('p',[_vm._v(" Droppable Zone / Controls will be showed here... ")]):_vm._e()],2),_c('AddControlControl',{attrs:{"section":_vm.section}})],1)}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/section-views/NormalSectionView.vue?vue&type=template&id=2b6b601d&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddRowControl.vue?vue&type=template&id=12c0063a&scoped=true&
var AddRowControlvue_type_template_id_12c0063a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"add-row-outer"},[_c('div',{staticClass:"add-row-container",class:_vm.styles.COLUMNS.COL12,on:{"click":_vm.addNew}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '32px', '32px', '#000'))}}),_c('span',[_vm._v("Add Row")])])])}
var AddRowControlvue_type_template_id_12c0063a_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddRowControl.vue?vue&type=template&id=12c0063a&scoped=true&
// EXTERNAL MODULE: ./src/configs/styles.js
var styles = __webpack_require__("d60e");
// EXTERNAL MODULE: ./src/mixins/style-injection-mixin.js
var style_injection_mixin = __webpack_require__("28fe");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/add-controls/AddRowControl.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AddRowControlvue_type_script_lang_js_ = ({
name: "AddRowControl",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
data: function data() {
return {
show: false
};
},
methods: {
/**
* Add a new row by notify the parent...
*/
addNew: function addNew() {
this.$emit('addRowNotify', true);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddRowControl.vue?vue&type=script&lang=js&
/* harmony default export */ var add_controls_AddRowControlvue_type_script_lang_js_ = (AddRowControlvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/builder/add-controls/AddRowControl.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
add_controls_AddRowControlvue_type_script_lang_js_,
AddRowControlvue_type_template_id_12c0063a_scoped_true_render,
AddRowControlvue_type_template_id_12c0063a_scoped_true_staticRenderFns,
false,
null,
"12c0063a",
null
)
/* harmony default export */ var AddRowControl = (component.exports);
// EXTERNAL MODULE: ./src/configs/events.js
var events = __webpack_require__("fbe6");
// EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
var vuedraggable_umd = __webpack_require__("b76a");
var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
// EXTERNAL MODULE: ./src/views/builder/add-controls/AddControlControl.vue + 13 modules
var AddControlControl = __webpack_require__("ca0c");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/ControlView.vue?vue&type=template&id=bfd7fc56&
var ControlViewvue_type_template_id_bfd7fc56_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:[_vm.control.containerClass, 'control-view-wrapper', _vm.control.additionalContainerClass]},[_c('div',{staticClass:"control-view",class:{'active': _vm.isActive}},[_c('ControlLabel',{directives:[{name:"show",rawName:"v-show",value:(_vm.control.isShowLabel),expression:"control.isShowLabel"}],attrs:{"control":_vm.control}}),_c(_vm.controlComponent,{tag:"component",attrs:{"control":_vm.control}})],1),_c('ControlOption',{on:{"delete":_vm.deleteControl,"config":_vm.openConfiguration}})],1)}
var ControlViewvue_type_template_id_bfd7fc56_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/ControlView.vue?vue&type=template&id=bfd7fc56&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/control-views/ControlLabel.vue?vue&type=template&id=0b3fa3a0&scoped=true&
var ControlLabelvue_type_template_id_0b3fa3a0_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control-label-container"},[_c('label',{class:_vm.control.additionalLabelClass,attrs:{"for":_vm.control.uniqueId},domProps:{"textContent":_vm._s(_vm.control.label)}}),(_vm.control.subLabel)?_c('br'):_vm._e(),(_vm.control.subLabel)?_c('small',{domProps:{"textContent":_vm._s(_vm.control.subLabel)}}):_vm._e()])}
var ControlLabelvue_type_template_id_0b3fa3a0_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlLabel.vue?vue&type=template&id=0b3fa3a0&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/control-views/ControlLabel.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlLabelvue_type_script_lang_js_ = ({
name: "ControlLabel",
props: {
control: {
type: Object,
required: true
}
}
});
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlLabel.vue?vue&type=script&lang=js&
/* harmony default export */ var control_views_ControlLabelvue_type_script_lang_js_ = (ControlLabelvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlLabel.vue
/* normalize component */
var ControlLabel_component = Object(componentNormalizer["a" /* default */])(
control_views_ControlLabelvue_type_script_lang_js_,
ControlLabelvue_type_template_id_0b3fa3a0_scoped_true_render,
ControlLabelvue_type_template_id_0b3fa3a0_scoped_true_staticRenderFns,
false,
null,
"0b3fa3a0",
null
)
/* harmony default export */ var ControlLabel = (ControlLabel_component.exports);
// EXTERNAL MODULE: ./src/configs/controls.js + 162 modules
var controls = __webpack_require__("8dbe");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/control-views/ControlOption.vue?vue&type=template&id=096d9296&
var ControlOptionvue_type_template_id_096d9296_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control-option-container"},[_c('div',{staticClass:"option-control drag-item",attrs:{"title":"Re-position / Drag"}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('navigationMore', '24px', '24px', '#f1c40f'))}})]),_c('div',{staticClass:"option-control",attrs:{"title":"Control Configuration"},on:{"click":_vm.clickedConfiguration}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('cog', '24px', '24px', '#3498db'))}})]),_c('div',{staticClass:"option-control",attrs:{"title":"Delete Control"},on:{"click":_vm.clickedDelete}},[_c('span',{domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('trash', '24px', '24px', '#e74c3c'))}})])])}
var ControlOptionvue_type_template_id_096d9296_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlOption.vue?vue&type=template&id=096d9296&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/control-views/ControlOption.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlOptionvue_type_script_lang_js_ = ({
name: "ControlOption",
methods: {
/**
* Emit to parent to delete this control...
*/
clickedDelete: function clickedDelete() {
this.$emit('delete', true);
},
/**
* Emit to parent to open the configuration
*/
clickedConfiguration: function clickedConfiguration() {
this.$emit('config', true);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlOption.vue?vue&type=script&lang=js&
/* harmony default export */ var control_views_ControlOptionvue_type_script_lang_js_ = (ControlOptionvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/control-views/ControlOption.vue
/* normalize component */
var ControlOption_component = Object(componentNormalizer["a" /* default */])(
control_views_ControlOptionvue_type_script_lang_js_,
ControlOptionvue_type_template_id_096d9296_render,
ControlOptionvue_type_template_id_096d9296_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ControlOption = (ControlOption_component.exports);
// EXTERNAL MODULE: ./src/libraries/sidebar-renderer.class.js
var sidebar_renderer_class = __webpack_require__("1ec8");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarControlConfiguration.vue?vue&type=template&id=77b40782&
var SidebarControlConfigurationvue_type_template_id_77b40782_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sidebar-form-configuration"},[_c('h5',[_vm._v("Control Configuration")]),_c('ControlBasicInformation',{attrs:{"control":_vm.control,"formData":_vm.formData}}),_c('ControlStylingInformation',{attrs:{"control":_vm.control}}),(_vm.specificConfigurationView)?_c('SidebarToggleableContainer',{attrs:{"headline":"Control Specific Configuration"}},[_c(_vm.specificConfigurationView,{tag:"component",attrs:{"formData":_vm.formData,"control":_vm.control}})],1):_vm._e(),_c('ControlValidationInformation',{attrs:{"control":_vm.control}}),_c('div',{staticClass:"buttons"},[_c('button',{class:_vm.styles.BUTTON.PRIMARY,on:{"click":function($event){return _vm.save(false)}}},[_vm._v(" Save ")]),_c('button',{class:_vm.styles.BUTTON.INFO,on:{"click":function($event){return _vm.save(true)}}},[_vm._v(" Save & Close ")])])],1)}
var SidebarControlConfigurationvue_type_template_id_77b40782_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarControlConfiguration.vue?vue&type=template&id=77b40782&
// EXTERNAL MODULE: ./src/mixins/sidebar-body-mixin.js
var sidebar_body_mixin = __webpack_require__("cbce");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/container-views/SidebarToggleableContainer.vue?vue&type=template&id=5f21ce2a&
var SidebarToggleableContainervue_type_template_id_5f21ce2a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"toggleable-section"},[_c('div',{staticClass:"headline-block"},[_c('h5',[_c('span',{staticClass:"toggle-item",domProps:{"innerHTML":_vm._s(_vm.isVisible ? _vm.iconClose : _vm.iconOpen)},on:{"click":function($event){_vm.isVisible = !_vm.isVisible}}}),_c('span',{domProps:{"textContent":_vm._s(_vm.headline)}}),_c('small',{staticClass:"toggleable-sub-headline",domProps:{"textContent":_vm._s(_vm.subHeadline)}})])]),_c('transition',{attrs:{"name":"slide"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isVisible),expression:"isVisible"}]},[_vm._t("default")],2)])],1)}
var SidebarToggleableContainervue_type_template_id_5f21ce2a_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/container-views/SidebarToggleableContainer.vue?vue&type=template&id=5f21ce2a&
// CONCATENATED MODULE: ./src/mixins/toggleable-mixin.js
/**
* Toggleable Mixin - Same Methods/Properties would be use for Toggleable container
*
*/
var TOGGLEABLE_MIXIN = {
data: function data() {
return {
isVisible: true
};
},
computed: {
iconColor: function iconColor() {
return '#000';
},
iconSize: function iconSize() {
return '32px';
},
iconClose: function iconClose() {
return this.$form.getIcon('chevronUp', this.iconSize, this.iconSize, this.iconColor);
},
iconOpen: function iconOpen() {
return this.$form.getIcon('chevronDown', this.iconSize, this.iconSize, this.iconColor);
}
}
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/container-views/SidebarToggleableContainer.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* Normal ToggleableContainer to use anywhere
* Not used for Toggleable Renderer...
*/
/* harmony default export */ var SidebarToggleableContainervue_type_script_lang_js_ = ({
name: "SidebarToggleableContainer",
mixins: [TOGGLEABLE_MIXIN],
props: {
headline: {
type: String
},
subHeadline: {
type: String
},
initialOpen: {
type: Boolean,
default: true
}
},
created: function created() {
if (!this.initialOpen) {
this.isVisible = false;
}
}
});
// CONCATENATED MODULE: ./src/views/container-views/SidebarToggleableContainer.vue?vue&type=script&lang=js&
/* harmony default export */ var container_views_SidebarToggleableContainervue_type_script_lang_js_ = (SidebarToggleableContainervue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/container-views/SidebarToggleableContainer.vue
/* normalize component */
var SidebarToggleableContainer_component = Object(componentNormalizer["a" /* default */])(
container_views_SidebarToggleableContainervue_type_script_lang_js_,
SidebarToggleableContainervue_type_template_id_5f21ce2a_render,
SidebarToggleableContainervue_type_template_id_5f21ce2a_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var SidebarToggleableContainer = (SidebarToggleableContainer_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlBasicInformation.vue?vue&type=template&id=b7168f0a&scoped=true&
var ControlBasicInformationvue_type_template_id_b7168f0a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SidebarToggleableContainer',{attrs:{"headline":"Basic Detail"}},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Unique ID")]),_c('input',{class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","readonly":""},domProps:{"value":_vm.control.uniqueId}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Name (Must be unique)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.name),expression:"control.name"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","readonly":""},domProps:{"value":(_vm.control.name)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "name", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Label")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.label),expression:"control.label"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.label)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "label", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Sub-label")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.subLabel),expression:"control.subLabel"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.subLabel)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "subLabel", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Mapped Field")]),_c('div',[_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.mappedField),expression:"control.mappedField"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "mappedField", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},[_c('option',{attrs:{"disabled":"","value":""}},[_vm._v("Please select field")]),_vm._l((_vm.doctypeFields),function(field){return _c('option',{key:field},[_vm._v(_vm._s(field)+" ")])})],2)])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Show Label? "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.isShowLabel),expression:"control.isShowLabel"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.isShowLabel)?_vm._i(_vm.control.isShowLabel,null)>-1:(_vm.control.isShowLabel)},on:{"change":function($event){var $$a=_vm.control.isShowLabel,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "isShowLabel", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "isShowLabel", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "isShowLabel", $$c)}}}})])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v(" Evaluated Visibility "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.evaluatedVisibility),expression:"control.evaluatedVisibility"}],attrs:{"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.control.evaluatedVisibility)?_vm._i(_vm.control.evaluatedVisibility,null)>-1:(_vm.control.evaluatedVisibility)},on:{"change":function($event){var $$a=_vm.control.evaluatedVisibility,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.control, "evaluatedVisibility", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.control, "evaluatedVisibility", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.control, "evaluatedVisibility", $$c)}}}})])]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Hide condition")]),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.hideCondition),expression:"control.hideCondition"}],class:_vm.styles.FORM.FORM_CONTROL,domProps:{"value":(_vm.control.hideCondition)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "hideCondition", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Field Placeholder (Optional)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.placeholderText),expression:"control.placeholderText"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.placeholderText)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "placeholderText", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Default Value (Optional)")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.defaultValue),expression:"control.defaultValue"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.defaultValue)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "defaultValue", $event.target.value)}}})])])}
var ControlBasicInformationvue_type_template_id_b7168f0a_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlBasicInformation.vue?vue&type=template&id=b7168f0a&scoped=true&
// EXTERNAL MODULE: ./src/services/frappe.js + 38 modules
var frappe = __webpack_require__("ee28");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlBasicInformation.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlBasicInformationvue_type_script_lang_js_ = ({
name: "ControlBasicInformation",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
components: {
SidebarToggleableContainer: SidebarToggleableContainer
},
data: function data() {
return {
doctypeFields: []
};
},
props: {
control: Object,
formData: Object
},
created: function created() {
this.control.depends = "";
},
watch: {
formData: function formData(val) {
this.getFields();
}
},
mounted: function mounted() {
this.getFields();
},
methods: {
getFields: function getFields() {
var _this = this;
if (this.formData && this.formData.formConfig && this.formData.formConfig.mappedDoctype.length) {
var data = {
doctype: this.formData.formConfig.mappedDoctype
};
Object(frappe["c" /* getDoctypeFields */])(data).then(function (result) {
_this.doctypeFields = result.fields.map(function (item) {
return item.fieldname;
});
});
}
},
setField: function setField(field) {
this.$set(this.control, "mappedField", field);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlBasicInformation.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configuration_views_ControlBasicInformationvue_type_script_lang_js_ = (ControlBasicInformationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlBasicInformation.vue
/* normalize component */
var ControlBasicInformation_component = Object(componentNormalizer["a" /* default */])(
control_configuration_views_ControlBasicInformationvue_type_script_lang_js_,
ControlBasicInformationvue_type_template_id_b7168f0a_scoped_true_render,
ControlBasicInformationvue_type_template_id_b7168f0a_scoped_true_staticRenderFns,
false,
null,
"b7168f0a",
null
)
/* harmony default export */ var ControlBasicInformation = (ControlBasicInformation_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlStylingInformation.vue?vue&type=template&id=7bfdae9a&scoped=true&
var ControlStylingInformationvue_type_template_id_7bfdae9a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SidebarToggleableContainer',{attrs:{"headline":"Styling/Classes"}},[_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Container Size Class")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.containerClass),expression:"control.containerClass"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(_vm.control, "containerClass", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.containerClasses),function(className,classID){return _c('option',{key:className,domProps:{"value":className}},[_vm._v(" "+_vm._s(classID)+" ("+_vm._s(className)+") ")])}),0)]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Container Additional Classes")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.additionalContainerClass),expression:"control.additionalContainerClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.additionalContainerClass)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "additionalContainerClass", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Control Field Additional Classes")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.additionalFieldClass),expression:"control.additionalFieldClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.additionalFieldClass)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "additionalFieldClass", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Control-Label Additional Classes")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.control.additionalLabelClass),expression:"control.additionalLabelClass"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(_vm.control.additionalLabelClass)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.control, "additionalLabelClass", $event.target.value)}}})])])}
var ControlStylingInformationvue_type_template_id_7bfdae9a_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlStylingInformation.vue?vue&type=template&id=7bfdae9a&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlStylingInformation.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlStylingInformationvue_type_script_lang_js_ = ({
name: "ControlStylingInformation",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
components: {
SidebarToggleableContainer: SidebarToggleableContainer
},
props: {
control: Object
},
computed: {
containerClasses: function containerClasses() {
return this.styles.COLUMNS;
}
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlStylingInformation.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configuration_views_ControlStylingInformationvue_type_script_lang_js_ = (ControlStylingInformationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlStylingInformation.vue
/* normalize component */
var ControlStylingInformation_component = Object(componentNormalizer["a" /* default */])(
control_configuration_views_ControlStylingInformationvue_type_script_lang_js_,
ControlStylingInformationvue_type_template_id_7bfdae9a_scoped_true_render,
ControlStylingInformationvue_type_template_id_7bfdae9a_scoped_true_staticRenderFns,
false,
null,
"7bfdae9a",
null
)
/* harmony default export */ var ControlStylingInformation = (ControlStylingInformation_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlValidationInformation.vue?vue&type=template&id=e86148c8&
var ControlValidationInformationvue_type_template_id_e86148c8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SidebarToggleableContainer',{attrs:{"headline":"Validation"}},[_c('label',[_vm._v(" Validation Rules "),_c('span',{staticClass:"pointer",attrs:{"title":"Click this to add a new rule"},domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('addOutline', '16px', '16px', 'green'))},on:{"click":_vm.addNewRule}})]),_vm._l((_vm.control.validations),function(addedRule,ruleIndex){return _c('div',{key:addedRule.ruleType,staticClass:"list-selection"},[_c('div',{staticClass:"tool-block"},[_c('span',{staticClass:"pointer",attrs:{"title":"Click this to remove this rule"},domProps:{"innerHTML":_vm._s(_vm.$form.getIcon('close', '16px', '16px', 'red'))},on:{"click":function($event){return _vm.removeRule(ruleIndex)}}})]),_c('div',{class:[_vm.styles.FORM.FORM_GROUP]},[_c('label',[_vm._v("Validation Rule")]),_c('select',{directives:[{name:"model",rawName:"v-model",value:(addedRule.ruleType),expression:"addedRule.ruleType"}],class:_vm.styles.FORM.FORM_CONTROL,on:{"change":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.$set(addedRule, "ruleType", $event.target.multiple ? $$selectedVal : $$selectedVal[0])},function($event){return _vm.updateDefaultErrorMessage(addedRule)}]}},[_c('option',{attrs:{"selected":"","disabled":""}},[_vm._v("Choose a Rule")]),_vm._l((_vm.getRuleList(addedRule.ruleType)),function(ruleName,ruleIndex){return _c('option',{key:ruleIndex,domProps:{"value":ruleName,"textContent":_vm._s(ruleName)}})})],2),_c('small',{directives:[{name:"show",rawName:"v-show",value:(_vm.getRuleInfo(addedRule.ruleType, 'desc')),expression:"getRuleInfo(addedRule.ruleType, 'desc')"}],domProps:{"textContent":_vm._s(_vm.getRuleInfo(addedRule.ruleType, 'desc'))}})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.getRuleInfo(addedRule.ruleType, 'needValue')),expression:"getRuleInfo(addedRule.ruleType, 'needValue')"}],class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Rule Value")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(addedRule.additionalValue),expression:"addedRule.additionalValue"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text","placeholder":_vm.getRuleInfo(addedRule.ruleType, 'valueInfo')},domProps:{"value":(addedRule.additionalValue)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(addedRule, "additionalValue", $event.target.value)}}})]),_c('div',{class:_vm.styles.FORM.FORM_GROUP},[_c('label',[_vm._v("Default Error Message")]),_c('input',{directives:[{name:"model",rawName:"v-model",value:(addedRule.errorMessage),expression:"addedRule.errorMessage"}],class:_vm.styles.FORM.FORM_CONTROL,attrs:{"type":"text"},domProps:{"value":(addedRule.errorMessage)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(addedRule, "errorMessage", $event.target.value)}}})])])})],2)}
var ControlValidationInformationvue_type_template_id_e86148c8_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlValidationInformation.vue?vue&type=template&id=e86148c8&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.array.includes.js
var es7_array_includes = __webpack_require__("6762");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.includes.js
var es6_string_includes = __webpack_require__("2fdb");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// EXTERNAL MODULE: ./src/configs/validation.js
var validation = __webpack_require__("a786");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/control-configuration-views/ControlValidationInformation.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlValidationInformationvue_type_script_lang_js_ = ({
name: "ControlValidationInformation",
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
components: {
SidebarToggleableContainer: SidebarToggleableContainer
},
props: {
control: Object
},
methods: {
/**
* Get the rule info based on the validation rule
* @param ruleName
* @param ruleKey
* @returns {boolean}
*/
getRuleInfo: function getRuleInfo(ruleName, ruleKey) {
if (!ruleName) {
return false;
}
return validation["a" /* VALIDATION_RULES */][ruleName][ruleKey];
},
/**
* [ON-INPUT] Every-Time the rule-select is selected, we need to update the default error message.
*/
updateDefaultErrorMessage: function updateDefaultErrorMessage(addedRule) {
addedRule.errorMessage = this.getRuleInfo(addedRule.ruleType, 'errorMessage');
},
/**
* [CLICK] Add a new rule into validation array
*/
addNewRule: function addNewRule() {
this.control.validations.push(new validation["b" /* ValidationRule */]());
},
/**
* [CLICK] Remove a rule
*/
removeRule: function removeRule(index) {
this.control.validations.splice(index, 1);
},
/**
* Get all the available rules without the current one
* @return {String[]}
*/
getRuleList: function getRuleList(currentRule) {
var allUsedRules = this.control.validations.map(function (rule) {
return rule.ruleType;
}).filter(function (ruleName) {
return ruleName !== currentRule;
});
var allRules = Object.keys(validation["a" /* VALIDATION_RULES */]);
return allRules.filter(function (rule) {
return !allUsedRules.includes(rule);
});
}
},
computed: {
/**
* Get all Rule List
* @returns {string[]}
*/
ruleList: function ruleList() {
return Object.keys(validation["a" /* VALIDATION_RULES */]);
}
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlValidationInformation.vue?vue&type=script&lang=js&
/* harmony default export */ var control_configuration_views_ControlValidationInformationvue_type_script_lang_js_ = (ControlValidationInformationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/control-configuration-views/ControlValidationInformation.vue
/* normalize component */
var ControlValidationInformation_component = Object(componentNormalizer["a" /* default */])(
control_configuration_views_ControlValidationInformationvue_type_script_lang_js_,
ControlValidationInformationvue_type_template_id_e86148c8_render,
ControlValidationInformationvue_type_template_id_e86148c8_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ControlValidationInformation = (ControlValidationInformation_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/sidebar-config-views/SidebarControlConfiguration.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SidebarControlConfigurationvue_type_script_lang_js_ = ({
name: "SidebarControlConfiguration",
components: {
ControlValidationInformation: ControlValidationInformation,
ControlStylingInformation: ControlStylingInformation,
ControlBasicInformation: ControlBasicInformation,
SidebarToggleableContainer: SidebarToggleableContainer
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], sidebar_body_mixin["a" /* SIDEBAR_BODY_MIXIN */]],
data: function data() {
return {
dataKey: "control",
control: null
};
},
created: function created() {
// clone to make sure, no references will interrupt the configuration...
this.control = helper["a" /* HELPER */].cloneDeep(this.dataPackage);
},
computed: {
/**
* Quick'n'Short access to the control type
*/
controlType: function controlType() {
return this.control.type;
},
/**
* CHeck if the control doesn't need validation
*/
isValidationDisabled: function isValidationDisabled() {
if (controls["a" /* CONTROLS */][this.controlType].disableValidation) {
return true;
}
return false;
},
/**
* Pick-up the specific configuration View for the Control
* Depend on the `configComponent` of CONTROLS in `src/configs/controls.js`
* If there's none => No Specific Configuration for the field
* @returns VueComponent
*/
specificConfigurationView: function specificConfigurationView() {
if (!controls["a" /* CONTROLS */][this.controlType].hasOwnProperty('configComponent')) {
return null;
} // NOTE: this is a hash map access , not 2d array =))
return controls["a" /* CONTROLS */][this.controlType]['configComponent'];
}
}
});
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarControlConfiguration.vue?vue&type=script&lang=js&
/* harmony default export */ var sidebar_config_views_SidebarControlConfigurationvue_type_script_lang_js_ = (SidebarControlConfigurationvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/sidebar-config-views/SidebarControlConfiguration.vue
/* normalize component */
var SidebarControlConfiguration_component = Object(componentNormalizer["a" /* default */])(
sidebar_config_views_SidebarControlConfigurationvue_type_script_lang_js_,
SidebarControlConfigurationvue_type_template_id_77b40782_render,
SidebarControlConfigurationvue_type_template_id_77b40782_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var SidebarControlConfiguration = (SidebarControlConfiguration_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/ControlView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ControlViewvue_type_script_lang_js_ = ({
name: "ControlView",
components: {
ControlOption: ControlOption,
ControlLabel: ControlLabel
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
control: {
type: Object,
required: true
},
parentId: {
type: String,
required: true
}
},
data: function data() {
return {
isActive: false
};
},
methods: {
/**
* [Emit-from-children] ControlOption will emit this if user want to delete the current control
*/
deleteControl: function deleteControl() {
// EMIT to FormBuilder to let it delete the control for us
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.DELETE, this.parentId, this.control.uniqueId);
},
/**
* [Emit-from-children] ControlOption will emit this when user clicked "Cog" button
* We're opening the sidebar configuration....
*/
openConfiguration: function openConfiguration() {
// If the current one active => no trigger...
if (this.isActive) {
return;
}
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPEN, this.control.uniqueId);
},
/**
* [Emit-from-GlobalSidebar]
*/
openedConfiguration: function openedConfiguration(runnerId) {
if (runnerId !== this.control.uniqueId) {
return;
} // eligible to render sidebar
this.isActive = true;
this.renderSidebar();
},
/**
* Push an Event to GlobalSidebar to Render the Body :D
*/
renderSidebar: function renderSidebar() {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.INJECT, new sidebar_renderer_class["a" /* default */](this.control.uniqueId, SidebarControlConfiguration, this.control));
},
/**
* Received closed notification from sidebar
*/
closedConfiguration: function closedConfiguration() {
this.isActive = false;
},
/**
* Save Control Configuration Data
* @param {String} runnerId - Control ID
* @param {Object} controlData - Control Object (After edited in the sidebar)
*/
saveConfiguration: function saveConfiguration(runnerId, controlData) {
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.CONTROL.UPDATE, runnerId, controlData);
}
},
computed: {
/**
* This accessor will get the component object to let us inject the right control
*/
controlComponent: function controlComponent() {
// validate input
if (!controls["a" /* CONTROLS */][this.control.type] || !controls["a" /* CONTROLS */][this.control.type].fieldComponent) {
throw new TypeError("Control Type Mapping failed => Can't be rendered. Reason: Your control type ".concat(this.control.type, " doesn't have 'fieldComponent' property"));
}
return controls["a" /* CONTROLS */][this.control.type].fieldComponent;
}
},
created: function created() {
// listen to GlobalSidebar
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE, this.saveConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.SAVE_AND_CLOSE, this.saveConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.AFTER_CLOSED, this.closedConfiguration);
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].BUILDER.SIDEBAR.OPENED, this.openedConfiguration);
}
});
// CONCATENATED MODULE: ./src/views/builder/ControlView.vue?vue&type=script&lang=js&
/* harmony default export */ var builder_ControlViewvue_type_script_lang_js_ = (ControlViewvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/views/builder/ControlView.vue?vue&type=style&index=0&lang=css&
var ControlViewvue_type_style_index_0_lang_css_ = __webpack_require__("198e");
// CONCATENATED MODULE: ./src/views/builder/ControlView.vue
/* normalize component */
var ControlView_component = Object(componentNormalizer["a" /* default */])(
builder_ControlViewvue_type_script_lang_js_,
ControlViewvue_type_template_id_bfd7fc56_render,
ControlViewvue_type_template_id_bfd7fc56_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ControlView = (ControlView_component.exports);
// CONCATENATED MODULE: ./src/mixins/section-view-mixins.js
var SECTION_VIEW_MIXINS = {
components: {
AddRowControl: AddRowControl,
// Add Row
draggable: vuedraggable_umd_default.a,
// For Sorting Row/Control
AddControlControl: AddControlControl["a" /* default */],
// Add Control
ControlView: ControlView // Show Control
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
section: Object,
rows: Object,
controls: Object,
readonly: {
type: Boolean,
default: true
},
reference: Object
},
data: function data() {
return {};
},
methods: {
/**
* Add a new rows for the section
* @desc Typically, we create a new Row Object, push it into the global `Rows` Object. And then assign the ID
* into the current section.rows
* This method will be invoked whenever `AddRowControl` is emitted any value.
* @emitKey addRowNotify
*/
addRow: function addRow() {
// get rowType of Section
var rowType = SECTION_TYPES[this.section.type].rowType; // Create new Row Object - BUSS: New Object
var newRowObject = Object(row["c" /* createNewRow */])(rowType); // Parent-Handle: Add Row | Push ID into Section.rows
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.ROW.CREATE, newRowObject);
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].BUILDER.SECTION.ADDED_ROW, this.section.uniqueId, newRowObject.uniqueId);
}
},
computed: {
/**
* Property that will be used to drag - for Control Only
*/
dragControlHandle: function dragControlHandle() {
return ".option-control.drag-item";
},
/**
* Base group of drag/drop
* We can share this for each section/row
*/
dragGroup: function dragGroup() {
return "v-form-builder-control";
},
/**
* Accessor helper to check if the current section has control(s) or not
*/
hasControl: function hasControl() {
return this.section.controls.length > 0;
},
/**
* Classes for draggable
* @returns {(string|string)[]}
*/
draggableClasses: function draggableClasses() {
return [this.styles.ROW, 'control-list-container', this.hasControl ? '' : 'empty'];
}
}
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/NormalSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* @property {Object} section
* @property {Object} rows RowId - RowData
* @property {Object} controls ControlId - ControlData
* @property {Array} section.rows
* @property {Array} section.controls
*/
/* harmony default export */ var NormalSectionViewvue_type_script_lang_js_ = ({
name: "NormalSectionView",
mixins: [SECTION_VIEW_MIXINS],
data: function data() {
return {};
}
});
// CONCATENATED MODULE: ./src/views/builder/section-views/NormalSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var section_views_NormalSectionViewvue_type_script_lang_js_ = (NormalSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/section-views/NormalSectionView.vue
/* normalize component */
var NormalSectionView_component = Object(componentNormalizer["a" /* default */])(
section_views_NormalSectionViewvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var NormalSectionView = (NormalSectionView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/TableSectionView.vue?vue&type=template&id=6b2db530&scoped=true&
var TableSectionViewvue_type_template_id_6b2db530_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"table-section"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],staticClass:"headline-block p5"},[_c('h2',{class:_vm.section.headlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('p',{class:_vm.section.subHeadlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})]),_c('div',{staticClass:"table-wrapper"},[_c('FullTableRowView',{class:_vm.styles.TABLE.TABLE_CLASS,attrs:{"reference":_vm.reference,"section":_vm.section,"readOnly":true}})],1)])}
var TableSectionViewvue_type_template_id_6b2db530_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/section-views/TableSectionView.vue?vue&type=template&id=6b2db530&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/FullTableRowView.vue?vue&type=template&id=e8a8245c&scoped=true&
var FullTableRowViewvue_type_template_id_e8a8245c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',[_c('b-table',{ref:"selectableTable",staticStyle:{"width":"100%"},attrs:{"empty-text":"Items will be show here x","empty-filtered-text":"No items to show","show-empty":true,"items":_vm.items,"striped":"","outlined":"","bordered":"","head-row-variant":"secondary","sticky-header":'62vh',"responsive":"","selectable":"","small":"","select-mode":"single","hover":""},on:{"row-selected":_vm.onRowSelected},scopedSlots:_vm._u([{key:"head()",fn:function(data){return [(data.label)?_c('span',[_vm._v(_vm._s(data.label.split("-")[1]))]):_vm._e()]}}])})],1),_c('b-modal',{attrs:{"id":"bv-modal-example","hide-footer":"","size":"xl"}},[_c('FormRenderer',{attrs:{"form-configuration":_vm.formData},model:{value:(_vm.formInputData),callback:function ($$v) {_vm.formInputData=$$v},expression:"formInputData"}}),_c('b-button',{staticClass:"mt-3",attrs:{"variant":"primary","block":""},on:{"click":function($event){return _vm.getSave()}}},[_vm._v(" Save ")])],1),_c('div',{staticStyle:{"width":"100%"}},[_c('div',[_c('b-button',{attrs:{"variant":"primary","id":"show-btn","size":"sm"},on:{"click":function($event){return _vm.$bvModal.show('bv-modal-example')}}},[_vm._v("Add Row")]),_c('b-button',{attrs:{"variant":"danger","id":"show-btn","size":"sm"},on:{"click":function($event){return _vm.$bvModal.show('bv-modal-example')}}},[_vm._v("Clear ")])],1)])],1)}
var FullTableRowViewvue_type_template_id_e8a8245c_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowView.vue?vue&type=template&id=e8a8245c&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
var es6_object_assign = __webpack_require__("f751");
// EXTERNAL MODULE: ./src/mixins/table-view-mixin.js
var table_view_mixin = __webpack_require__("cf35");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/FullTableRowView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var FullTableRowViewvue_type_script_lang_js_ = ({
name: "TableRowView",
components: {
AddControlControl: AddControlControl["a" /* default */]
},
mixins: [table_view_mixin["a" /* TABLE_VIEW_MIXIN */]],
// v-if="!readOnly"
methods: {
getSave: function getSave() {
var _this = this;
var data = this.formInputData;
var isValid = true;
Object.keys(this.formData.controls).forEach(function (key) {
if (_this.formData.controls[key] != null && _this.formData.controls[key].validations != null && isValid) {
_this.formData.controls[key].validations.forEach(function (validation) {
if (validation.ruleType == 'required' && _this.formInputData[key] == null) {
_this.show_alert("Field ".concat(_this.formData.controls[key].label, " is required"));
isValid = false;
}
if (validation.ruleType == 'min' && "".concat(_this.formInputData[key]).length < validation.additionalValue) {
_this.show_alert("Field ".concat(_this.formData.controls[key].label, " is need at least ").concat(validation.additionalValue, " characters"));
isValid = false;
}
if (validation.ruleType == 'max' && "".concat(_this.formInputData[key]).length > validation.additionalValue) {
_this.show_alert("Field ".concat(_this.formData.controls[key].label, " can only have a max of ").concat(validation.additionalValue, " characters"));
isValid = false;
}
});
}
});
if (!isValid) {
return;
}
var returnedTarget = Object.assign({}, data);
this.items.unshift(returnedTarget);
this.clearData();
},
setValues: function setValues(val) {
this.$set(this, "formInputData", val);
},
clearData: function clearData() {
var val = {};
var keys = Object.keys(this.formInputData);
keys.forEach(function (key) {
val[key] = "";
});
this.setValues(val);
},
onRowSelected: function onRowSelected(val) {
alert(JSON.stringify(val));
},
getForm: function getForm(name) {
var _this2 = this;
Object(frappe["d" /* getFormConfiguration */])({
name: name
}).then(function (config) {
var formStringConfig = config.formdata;
var configObject = JSON.parse(formStringConfig);
_this2.configuration = formStringConfig;
_this2.formName = config.name;
_this2.formData = configObject;
_this2.originalConfig = configObject;
});
},
saveForm: function saveForm(formData) {
Object(frappe["f" /* saveFormData */])(formData).then(function (saved) {});
},
save: function save() {
var form_content = this.formInputData;
form_content = JSON.stringify(form_content);
var form_name = this.formName;
var reference_doctype = this.selectedDoctype;
var reference_doctype_id = this.selectedDoctypeReference;
var doctype = "Form Repository";
var formData = {
doctype: doctype,
form_content: form_content,
form_name: form_name,
reference_doctype: reference_doctype,
reference_doctype_id: reference_doctype_id
};
if (this.reference) {
formData.reference_doctype = this.reference.doctype;
formData.reference_doctype_id = this.reference.doctype_id;
}
this.saveForm({
formData: formData
});
}
},
data: function data() {
return {
items: [],
formData: {
formConfig: {
headline: "",
subHeadline: "",
isShowHeadline: false,
formula: [{
name: "BMI formula",
description: "Calculate the BMI",
formula: "[DC-Weight-00067] / ( [DC-Height-00066] * [DC-Height-00066] )",
output: "DC-BMI-00068"
}],
renderFormTag: false,
formActionURL: "",
formMethod: "POST"
},
sections: {
"section-9eed1a21-b1c4-4c55-9012-1af4667732c4": {
uniqueId: "section-9eed1a21-b1c4-4c55-9012-1af4667732c4",
headline: "Patient Vitals",
headlineAdditionalClass: "",
subHeadline: "Sample vitals information",
subHeadlineAdditionalClass: "",
isShowHeadline: true,
condition: ' [DC-Gender-00065] == "DC-Female-00064"',
sortOrder: 1,
type: "normal",
rows: [],
controls: ["DC-First Name-00061", "DC-Last Name-00062", "DC-Gender-00065", "DC-Height-00066", "DC-Weight-00067", "DC-BMI-00068"]
}
},
rows: {},
controls: {
"DC-First Name-00061": {
uniqueId: "DC-First Name-00061",
type: "input",
name: "DC-First Name-00061",
label: "First Name",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: []
},
"DC-Last Name-00062": {
uniqueId: "DC-Last Name-00062",
type: "input",
name: "DC-Last Name-00062",
label: "Last Name",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: []
},
"DC-Height-00066": {
uniqueId: "DC-Height-00066",
type: "input",
name: "DC-Height-00066",
label: "Height",
subLabel: "in meters",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: []
},
"DC-Weight-00067": {
uniqueId: "DC-Weight-00067",
type: "input",
name: "DC-Weight-00067",
label: "Weigth",
subLabel: "in Kgs",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: [],
depends: "",
evaluatedVisibility: true
},
"DC-BMI-00068": {
uniqueId: "DC-BMI-00068",
type: "input",
name: "DC-BMI-00068",
label: "BMI",
subLabel: "In Kg/m2",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: [],
depends: "",
evaluatedVisibility: true
},
"DC-Gender-00065": {
uniqueId: "DC-Gender-00065",
type: "radio",
name: "DC-Gender-00065",
label: "Gender",
subLabel: "Male or Female",
isShowLabel: true,
placeholderText: "",
containerClass: "col-md-6 md-layout-item md-size-50",
additionalContainerClass: "",
additionalFieldClass: "",
additionalLabelClass: "",
defaultValue: "",
validations: [],
displayMode: "line",
position: "left",
items: [{
text: "Male",
value: "DC-Male-00063"
}, {
text: "Female",
value: "DC-Female-00064"
}]
}
}
},
formInputData: {}
};
}
});
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowView.vue?vue&type=script&lang=js&
/* harmony default export */ var row_views_FullTableRowViewvue_type_script_lang_js_ = (FullTableRowViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowView.vue
/* normalize component */
var FullTableRowView_component = Object(componentNormalizer["a" /* default */])(
row_views_FullTableRowViewvue_type_script_lang_js_,
FullTableRowViewvue_type_template_id_e8a8245c_scoped_true_render,
FullTableRowViewvue_type_template_id_e8a8245c_scoped_true_staticRenderFns,
false,
null,
"e8a8245c",
null
)
/* harmony default export */ var FullTableRowView = (FullTableRowView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/TableSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var TableSectionViewvue_type_script_lang_js_ = ({
name: "TableSectionView",
components: {
FullTableRowView: FullTableRowView,
AddRowControl: AddRowControl
},
mixins: [SECTION_VIEW_MIXINS, style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
methods: {}
});
// CONCATENATED MODULE: ./src/views/builder/section-views/TableSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var section_views_TableSectionViewvue_type_script_lang_js_ = (TableSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/section-views/TableSectionView.vue
/* normalize component */
var TableSectionView_component = Object(componentNormalizer["a" /* default */])(
section_views_TableSectionViewvue_type_script_lang_js_,
TableSectionViewvue_type_template_id_6b2db530_scoped_true_render,
TableSectionViewvue_type_template_id_6b2db530_scoped_true_staticRenderFns,
false,
null,
"6b2db530",
null
)
/* harmony default export */ var TableSectionView = (TableSectionView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/ToggleableSectionView.vue?vue&type=template&id=2f81dcee&
var ToggleableSectionViewvue_type_template_id_2f81dcee_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"toggleable-section"},[_c('div',{staticClass:"headline-block p5"},[_c('h2',{class:_vm.section.headlineAdditionalClass},[_c('span',{staticClass:"toggle-item",domProps:{"innerHTML":_vm._s(_vm.isVisible ? _vm.iconClose : _vm.iconOpen)},on:{"click":function($event){_vm.isVisible = !_vm.isVisible}}}),_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('small',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],class:[_vm.section.subHeadlineAdditionalClass, 'toggleable-sub-headline'],domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})])]),_c('transition',{attrs:{"name":"slide"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isVisible),expression:"isVisible"}]},[_c('draggable',{class:_vm.draggableClasses,attrs:{"ghost-class":"ghost","handle":_vm.dragControlHandle,"list":_vm.section.controls,"group":_vm.dragGroup}},[_vm._l((_vm.section.controls),function(controlId){return _c('ControlView',{key:controlId,attrs:{"control":_vm.controls[controlId],"parent-id":_vm.section.uniqueId}})}),(!_vm.hasControl)?_c('p',[_vm._v(" Droppable Zone / Controls will be showed here... ")]):_vm._e()],2),_c('AddControlControl',{attrs:{"section":_vm.section}})],1)])],1)}
var ToggleableSectionViewvue_type_template_id_2f81dcee_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/section-views/ToggleableSectionView.vue?vue&type=template&id=2f81dcee&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/section-views/ToggleableSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ToggleableSectionViewvue_type_script_lang_js_ = ({
name: "ToggleableSectionView",
components: {
AddControlControl: AddControlControl["a" /* default */]
},
mixins: [SECTION_VIEW_MIXINS, style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], TOGGLEABLE_MIXIN]
});
// CONCATENATED MODULE: ./src/views/builder/section-views/ToggleableSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var section_views_ToggleableSectionViewvue_type_script_lang_js_ = (ToggleableSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/builder/section-views/ToggleableSectionView.vue
/* normalize component */
var ToggleableSectionView_component = Object(componentNormalizer["a" /* default */])(
section_views_ToggleableSectionViewvue_type_script_lang_js_,
ToggleableSectionViewvue_type_template_id_2f81dcee_render,
ToggleableSectionViewvue_type_template_id_2f81dcee_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ToggleableSectionView = (ToggleableSectionView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/NormalSectionView.vue?vue&type=template&id=dc18f6a4&
var NormalSectionViewvue_type_template_id_dc18f6a4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"normal-section"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],staticClass:"headline-block"},[_c('h2',{class:_vm.section.headlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('p',{class:_vm.section.subHeadlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})]),_c('div',{class:_vm.containerClasses},_vm._l((_vm.section.controls),function(controlId){return _c('ControlView',{key:controlId,attrs:{"readonly":_vm.readonly,"control":_vm.controls[controlId],"parent-id":_vm.section.uniqueId,"value-container":_vm.valueContainer,"validation-errors":_vm.validationErrors}})}),1)])}
var NormalSectionViewvue_type_template_id_dc18f6a4_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/renderer/section-views/NormalSectionView.vue?vue&type=template&id=dc18f6a4&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/ControlView.vue?vue&type=template&id=2d41630d&
var ControlViewvue_type_template_id_2d41630d_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.control.name == 'name' || _vm.valueContainer[_vm.lookUpField] == _vm.lookUpValue)?_c('div',{class:[
_vm.control.containerClass,
'control-view-wrapper',
_vm.control.additionalContainerClass ]},[_c('div',{staticClass:"control-view"},[_c('ControlLabel',{directives:[{name:"show",rawName:"v-show",value:(_vm.control.isShowLabel),expression:"control.isShowLabel"}],attrs:{"control":_vm.control}}),_c(_vm.controlComponent,{tag:"component",class:_vm.validationErrorClasses,attrs:{"control":_vm.control,"readonly":_vm.readonly,"value-container":_vm.valueContainer},model:{value:(_vm.valueContainer[_vm.controlName]),callback:function ($$v) {_vm.$set(_vm.valueContainer, _vm.controlName, $$v)},expression:"valueContainer[controlName]"}}),(_vm.hasValidationError)?_vm._l((_vm.validationErrorMessages),function(mess,i){return _c('div',{key:i,class:_vm.styles.FORM.ERROR_MESSAGE,domProps:{"textContent":_vm._s(mess)}})}):_vm._e()],2)]):_vm._e()}
var ControlViewvue_type_template_id_2d41630d_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/renderer/ControlView.vue?vue&type=template&id=2d41630d&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/ControlView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var renderer_ControlViewvue_type_script_lang_js_ = ({
name: "ControlView",
components: {
ControlLabel: ControlLabel
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
control: {
type: Object,
required: true
},
parentId: {
type: String,
required: true
},
valueContainer: {
type: Object,
required: true
},
validationErrors: {
type: Object,
default: function _default() {
return {};
} // empty object
},
readonly: {
type: Boolean,
default: false
}
},
data: function data() {
return {
isVisible: true,
lookUpField: 'null',
lookUpValue: null
};
},
computed: {
/**
* This accessor will get the component object to let us inject the right control
*/
controlComponent: function controlComponent() {
// validate input
if (!controls["a" /* CONTROLS */][this.control.type] || !controls["a" /* CONTROLS */][this.control.type].fieldComponent) {
throw new TypeError("Control Type Mapping failed => Can't be rendered. Reason: Your control type ".concat(this.control.type, " doesn't have 'fieldComponent' property"));
}
return controls["a" /* CONTROLS */][this.control.type].fieldComponent;
},
/**
* Generate Control Base Name
* @returns {string}
*/
controlName: function controlName() {
return this.control.name || this.control.uniqueId;
},
/**
* Check if current control has validation error(s)
* @returns {boolean}
*/
hasValidationError: function hasValidationError() {
return !!this.validationErrors[this.controlName];
},
/**
* Short-Path access to the Validation Error MEssages List
* @returns {String[]}
*/
validationErrorMessages: function validationErrorMessages() {
return this.validationErrors[this.controlName];
},
validationErrorClasses: function validationErrorClasses() {
var classes = {};
classes[this.styles.FORM.ERROR_OUTLINE] = this.hasValidationError;
return classes;
}
}
});
// CONCATENATED MODULE: ./src/views/renderer/ControlView.vue?vue&type=script&lang=js&
/* harmony default export */ var views_renderer_ControlViewvue_type_script_lang_js_ = (renderer_ControlViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/renderer/ControlView.vue
/* normalize component */
var renderer_ControlView_component = Object(componentNormalizer["a" /* default */])(
views_renderer_ControlViewvue_type_script_lang_js_,
ControlViewvue_type_template_id_2d41630d_render,
ControlViewvue_type_template_id_2d41630d_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var renderer_ControlView = (renderer_ControlView_component.exports);
// CONCATENATED MODULE: ./src/mixins/renderer-section-view-mixin.js
var RENDERER_SECTION_VIEW_MIXIN = {
components: {
ControlView: renderer_ControlView // Show Control
},
mixins: [style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */]],
props: {
section: Object,
rows: Object,
controls: Object,
valueContainer: Object,
validationErrors: Object,
reference: Object,
readonly: {
type: Boolean,
default: false
}
},
data: function data() {
return {};
},
methods: {},
computed: {
/**
* Classes for draggable
* @returns {(string|string)[]}
*/
containerClasses: function containerClasses() {
return [this.styles.ROW, 'control-list-container'];
}
}
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/NormalSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/**
* @property {Object} section
* @property {Object} rows RowId - RowData
* @property {Object} controls ControlId - ControlData
* @property {Array} section.rows
* @property {Array} section.controls
*/
/* harmony default export */ var renderer_section_views_NormalSectionViewvue_type_script_lang_js_ = ({
name: "NormalSectionView",
mixins: [RENDERER_SECTION_VIEW_MIXIN],
data: function data() {
return {};
}
});
// CONCATENATED MODULE: ./src/views/renderer/section-views/NormalSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var views_renderer_section_views_NormalSectionViewvue_type_script_lang_js_ = (renderer_section_views_NormalSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/renderer/section-views/NormalSectionView.vue
/* normalize component */
var section_views_NormalSectionView_component = Object(componentNormalizer["a" /* default */])(
views_renderer_section_views_NormalSectionViewvue_type_script_lang_js_,
NormalSectionViewvue_type_template_id_dc18f6a4_render,
NormalSectionViewvue_type_template_id_dc18f6a4_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var section_views_NormalSectionView = (section_views_NormalSectionView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/ToggleableSectionView.vue?vue&type=template&id=ad1dc21e&
var ToggleableSectionViewvue_type_template_id_ad1dc21e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"toggleable-section"},[_c('div',{staticClass:"headline-block"},[_c('h2',{class:_vm.section.headlineAdditionalClass},[_c('span',{staticClass:"toggle-item",domProps:{"innerHTML":_vm._s(_vm.isVisible ? _vm.iconClose : _vm.iconOpen)},on:{"click":function($event){_vm.isVisible = !_vm.isVisible}}}),_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('small',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],class:[_vm.section.subHeadlineAdditionalClass, 'toggleable-sub-headline'],domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})])]),_c('transition',{attrs:{"name":"slide"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isVisible),expression:"isVisible"}],class:_vm.containerClasses},_vm._l((_vm.section.controls),function(controlId){return _c('ControlView',{key:controlId,attrs:{"control":_vm.controls[controlId],"parent-id":_vm.section.uniqueId,"value-container":_vm.valueContainer,"validation-errors":_vm.validationErrors,"readonly":_vm.readonly}})}),1)])],1)}
var ToggleableSectionViewvue_type_template_id_ad1dc21e_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/renderer/section-views/ToggleableSectionView.vue?vue&type=template&id=ad1dc21e&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/ToggleableSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var renderer_section_views_ToggleableSectionViewvue_type_script_lang_js_ = ({
name: "ToggleableSectionView",
mixins: [RENDERER_SECTION_VIEW_MIXIN, TOGGLEABLE_MIXIN]
});
// CONCATENATED MODULE: ./src/views/renderer/section-views/ToggleableSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var views_renderer_section_views_ToggleableSectionViewvue_type_script_lang_js_ = (renderer_section_views_ToggleableSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/renderer/section-views/ToggleableSectionView.vue
/* normalize component */
var section_views_ToggleableSectionView_component = Object(componentNormalizer["a" /* default */])(
views_renderer_section_views_ToggleableSectionViewvue_type_script_lang_js_,
ToggleableSectionViewvue_type_template_id_ad1dc21e_render,
ToggleableSectionViewvue_type_template_id_ad1dc21e_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var section_views_ToggleableSectionView = (section_views_ToggleableSectionView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/TableSectionView.vue?vue&type=template&id=51755d70&scoped=true&
var TableSectionViewvue_type_template_id_51755d70_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"table-section"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.section.isShowHeadline),expression:"section.isShowHeadline"}],staticClass:"headline-block p5"},[_c('h2',{class:_vm.section.headlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.headline)}}),_c('p',{class:_vm.section.subHeadlineAdditionalClass,domProps:{"textContent":_vm._s(_vm.section.subHeadline)}})]),_c('div',{staticClass:"table-wrapper"},[_c('FullTableRowRenderView',{key:'123',attrs:{"section":_vm.section,"parent":_vm.parent,"reference":_vm.reference,"loaded":_vm.loaded,"dataInput":_vm.dataInput,"valueContainer":_vm.valueContainer,"readOnly":_vm.readonly},on:{"items":_vm.loadItems}})],1)])}
var TableSectionViewvue_type_template_id_51755d70_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/renderer/section-views/TableSectionView.vue?vue&type=template&id=51755d70&scoped=true&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/FullTableRowRenderView.vue?vue&type=template&id=d895f52c&scoped=true&
var FullTableRowRenderViewvue_type_template_id_d895f52c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.section.sectionFormula && _vm.section.sectionFormula.length)?_c('div',[_c('b-row',{staticClass:"my-2 mx-2"},[_c('b-col'),_vm._l((_vm.section.sectionFormula),function(formulaData){return _c('div',{key:formulaData,staticClass:"my-1 mx-1"},[(formulaData.outputField)?_c('b-input-group',{attrs:{"prepend":formulaData.outputField}},[(formulaData.formula)?_c('b-form-input',{attrs:{"value":_vm.getFormulaValue(formulaData.formula)}}):_vm._e()],1):_vm._e()],1)})],2)],1):_vm._e(),(_vm.formData)?_c('b-row'):_vm._e(),(_vm.showGraph && _vm.chartDataSet.length > 0 && _vm.chartDataSet[0].labels != null )?_c('b-row',[_c('Chart',{attrs:{"dataset":_vm.chartDataSet,"labels":_vm.chartLabels}})],1):_c('b-row',[_c('b-table',{ref:"selectableTable",staticStyle:{"width":"100%"},attrs:{"empty-text":"Items will be show here","empty-filtered-text":"No items to show","show-empty":true,"items":_vm.items,"striped":"","outlined":"","bordered":"","head-row-variant":"secondary","sticky-header":'62vh',"responsive":"","small":"","selectable":"","select-mode":"single","hover":"","foot-clone":""},on:{"row-selected":_vm.onRowSelected},scopedSlots:_vm._u([{key:"head()",fn:function(data){return [(data.label)?_c('span',[_vm._v(_vm._s(data.label.split('-')[1]))]):_vm._e()]}},{key:"cell(rowId)",fn:function(data){return [(false)?undefined:_vm._e()]}},(_vm.section.calculatedFields && _vm.section.calculatedFields.length)?{key:"foot(rowId)",fn:function(data){return [(false)?undefined:_vm._e(),_c('span',[_vm._v(" Totals")])]}}:null,(_vm.section.calculatedFields && _vm.section.calculatedFields.length)?{key:"foot()",fn:function(data){return [(_vm.section.calculatedFields)?_c('span',[(_vm.section.calculatedFields.split(',').includes(data.column))?_c('span',{staticClass:"text-danger"},[_vm._v(_vm._s(_vm.items.map(function (item){ return item[data.column]; }).reduce(function (partialSum, a) { return partialSum + a; }, 0)))]):_vm._e()]):_vm._e(),_vm._v(" "),_c('span')]}}:null],null,true)})],1),_c('b-modal',{attrs:{"id":_vm.tableId,"hide-footer":"","size":"xl"}},[_c('FormRenderer',{attrs:{"form-configuration":_vm.formData},model:{value:(_vm.formInputData),callback:function ($$v) {_vm.formInputData=$$v},expression:"formInputData"}}),_c('b-button',{staticClass:"mt-3",attrs:{"variant":"primary","block":"","size":"sm"},on:{"click":function($event){return _vm.save()}}},[_vm._v(" Save ")])],1),_c('div',{staticStyle:{"width":"100%"}},[(!_vm.readOnly && !_vm.readonly)?_c('b-button',{attrs:{"variant":"primary","id":"show-btn"},on:{"click":function($event){return _vm.$bvModal.show(_vm.tableId)}}},[_vm._v("Add Row")]):_vm._e()],1)],1)}
var FullTableRowRenderViewvue_type_template_id_d895f52c_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowRenderView.vue?vue&type=template&id=d895f52c&scoped=true&
// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/builder/row-views/FullTableRowRenderView.vue?vue&type=script&lang=js&
var FullTableRowRenderViewvue_type_script_lang_js_ = __webpack_require__("eb71");
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowRenderView.vue?vue&type=script&lang=js&
/* harmony default export */ var row_views_FullTableRowRenderViewvue_type_script_lang_js_ = (FullTableRowRenderViewvue_type_script_lang_js_["a" /* default */]);
// EXTERNAL MODULE: ./src/views/builder/row-views/FullTableRowRenderView.vue?vue&type=style&index=0&id=d895f52c&scoped=true&lang=css&
var FullTableRowRenderViewvue_type_style_index_0_id_d895f52c_scoped_true_lang_css_ = __webpack_require__("cab0");
// CONCATENATED MODULE: ./src/views/builder/row-views/FullTableRowRenderView.vue
/* normalize component */
var FullTableRowRenderView_component = Object(componentNormalizer["a" /* default */])(
row_views_FullTableRowRenderViewvue_type_script_lang_js_,
FullTableRowRenderViewvue_type_template_id_d895f52c_scoped_true_render,
FullTableRowRenderViewvue_type_template_id_d895f52c_scoped_true_staticRenderFns,
false,
null,
"d895f52c",
null
)
/* harmony default export */ var FullTableRowRenderView = (FullTableRowRenderView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/section-views/TableSectionView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var renderer_section_views_TableSectionViewvue_type_script_lang_js_ = ({
name: "TableSectionView",
components: {
FullTableRowRenderView: FullTableRowRenderView,
AddRowControl: AddRowControl
},
mixins: [SECTION_VIEW_MIXINS, style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], RENDERER_SECTION_VIEW_MIXIN],
methods: {
getTableData: function getTableData() {
var _this = this;
var doctype = "Form Repository";
var parent_repo = this.parent;
var form_name = this.section.referenceTable;
var formData = {
doctype: doctype,
filters: {
parent_repo: parent_repo,
form_name: form_name
},
fields: ["*"],
order_by: "creation desc",
page: 1,
start: 0,
limit: 200
};
Object(frappe["e" /* getList */])(formData).then(function (response) {
_this.loaded = response.message.map(function (item) {
var formResponse = JSON.parse(item.form_content);
formResponse.rowId = item.name;
return formResponse;
});
});
},
loadItems: function loadItems(val) {
this.section.childTable = val;
}
},
props: {
parent: String,
dataInput: Object
},
data: function data() {
return {
loaded: []
};
},
mounted: function mounted() {
if (this.dataInput != null && this.dataInput[this.section.referenceTable]) {
this.loaded = this.dataInput;
}
if (this.parent) {
this.getTableData();
}
}
});
// CONCATENATED MODULE: ./src/views/renderer/section-views/TableSectionView.vue?vue&type=script&lang=js&
/* harmony default export */ var views_renderer_section_views_TableSectionViewvue_type_script_lang_js_ = (renderer_section_views_TableSectionViewvue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/views/renderer/section-views/TableSectionView.vue
/* normalize component */
var section_views_TableSectionView_component = Object(componentNormalizer["a" /* default */])(
views_renderer_section_views_TableSectionViewvue_type_script_lang_js_,
TableSectionViewvue_type_template_id_51755d70_scoped_true_render,
TableSectionViewvue_type_template_id_51755d70_scoped_true_staticRenderFns,
false,
null,
"51755d70",
null
)
/* harmony default export */ var section_views_TableSectionView = (section_views_TableSectionView_component.exports);
// CONCATENATED MODULE: ./src/configs/section.js
/**
* Supported Section & Section Constants in Vue-Form-Builder
* @author Phat Tran
*/
var SECTION_TYPES = {
normal: {
name: "Normal Block",
description: "Normal block with a headline",
value: 'normal',
rowType: row["b" /* ROW_TYPES */].normal,
builderView: NormalSectionView,
rendererView: section_views_NormalSectionView
},
toggleable: {
name: "Toggleable Block",
description: "Section block with toggle (display/hide) feature",
value: 'toggleable',
rowType: row["b" /* ROW_TYPES */].normal,
builderView: ToggleableSectionView,
rendererView: section_views_ToggleableSectionView
},
table: {
name: "Table Block",
description: "Section block built from a table with 2 column",
value: 'table',
rowType: row["b" /* ROW_TYPES */].tableRow,
builderView: TableSectionView,
rendererView: section_views_TableSectionView
}
};
/**
* DEFAULT DATA in order to create/reread from the configuration
*/
var SECTION_DEFAULT_DATA = {
uniqueId: '',
headline: '',
headlineAdditionalClass: '',
subHeadline: '',
subHeadlineAdditionalClass: '',
isShowHeadline: true,
condition: "",
tableReference: "",
sortOrder: 0,
type: '',
rows: [],
// array of rowId
controls: [],
// array of controlIds
referenceTable: ''
};
/**
* Create new Section
* @param type
* @param sortOrder
*/
function createNewSection(type) {
var sortOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (!SECTION_TYPES[type]) {
throw new TypeError("Section Type: ".concat(type, " doesn't exists in Vue-Form-Builder"));
} // create new section data base on the default data
var newSectionData = helper["a" /* HELPER */].cloneDeep(SECTION_DEFAULT_DATA);
newSectionData.type = type;
newSectionData.uniqueId = "section-" + helper["a" /* HELPER */].getUUIDv4();
newSectionData.headline = "New Section";
newSectionData.subHeadline = "This is the sub-headline of the new section";
newSectionData.sortOrder = sortOrder;
newSectionData.referenceTable = " ";
return newSectionData;
}
/***/ }),
/***/ "df7c":
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
// Skip empty and invalid entries
if (typeof path !== 'string') {
throw new TypeError('Arguments to path.resolve must be strings');
} else if (!path) {
continue;
}
resolvedPath = path + '/' + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
return !!p;
}), !resolvedAbsolute).join('/');
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};
// path.normalize(path)
// posix version
exports.normalize = function(path) {
var isAbsolute = exports.isAbsolute(path),
trailingSlash = substr(path, -1) === '/';
// Normalize the path
path = normalizeArray(filter(path.split('/'), function(p) {
return !!p;
}), !isAbsolute).join('/');
if (!path && !isAbsolute) {
path = '.';
}
if (path && trailingSlash) {
path += '/';
}
return (isAbsolute ? '/' : '') + path;
};
// posix version
exports.isAbsolute = function(path) {
return path.charAt(0) === '/';
};
// posix version
exports.join = function() {
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(filter(paths, function(p, index) {
if (typeof p !== 'string') {
throw new TypeError('Arguments to path.join must be strings');
}
return p;
}).join('/'));
};
// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') break;
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') break;
}
if (start > end) return [];
return arr.slice(start, end - start + 1);
}
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
};
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function (path) {
if (typeof path !== 'string') path = path + '';
if (path.length === 0) return '.';
var code = path.charCodeAt(0);
var hasRoot = code === 47 /*/*/;
var end = -1;
var matchedSlash = true;
for (var i = path.length - 1; i >= 1; --i) {
code = path.charCodeAt(i);
if (code === 47 /*/*/) {
if (!matchedSlash) {
end = i;
break;
}
} else {
// We saw the first non-path separator
matchedSlash = false;
}
}
if (end === -1) return hasRoot ? '/' : '.';
if (hasRoot && end === 1) {
// return '//';
// Backwards-compat fix:
return '/';
}
return path.slice(0, end);
};
function basename(path) {
if (typeof path !== 'string') path = path + '';
var start = 0;
var end = -1;
var matchedSlash = true;
var i;
for (i = path.length - 1; i >= 0; --i) {
if (path.charCodeAt(i) === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
start = i + 1;
break;
}
} else if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// path component
matchedSlash = false;
end = i + 1;
}
}
if (end === -1) return '';
return path.slice(start, end);
}
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
var f = basename(path);
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
};
exports.extname = function (path) {
if (typeof path !== 'string') path = path + '';
var startDot = -1;
var startPart = 0;
var end = -1;
var matchedSlash = true;
// Track the state of characters (if any) we see before our first dot and
// after any path separator we find
var preDotState = 0;
for (var i = path.length - 1; i >= 0; --i) {
var code = path.charCodeAt(i);
if (code === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
startPart = i + 1;
break;
}
continue;
}
if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// extension
matchedSlash = false;
end = i + 1;
}
if (code === 46 /*.*/) {
// If this is our first dot, mark it as the start of our extension
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
// We saw a non-dot and non-path separator before our dot, so we should
// have a good chance at having a non-empty extension
preDotState = -1;
}
}
if (startDot === -1 || end === -1 ||
// We saw a non-dot character immediately before the dot
preDotState === 0 ||
// The (right-most) trimmed path component is exactly '..'
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
return '';
}
return path.slice(startDot, end);
};
function filter (xs, f) {
if (xs.filter) return xs.filter(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
if (f(xs[i], i, xs)) res.push(xs[i]);
}
return res;
}
// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
? function (str, start, len) { return str.substr(start, len) }
: function (str, start, len) {
if (start < 0) start = str.length + start;
return str.substr(start, len);
}
;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
/***/ }),
/***/ "e11e":
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ "e39c":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasToStringTag = __webpack_require__("07a4")();
var callBound = __webpack_require__("545e");
var $toString = callBound('Object.prototype.toString');
var isStandardArguments = function isArguments(value) {
if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
return false;
}
return $toString(value) === '[object Arguments]';
};
var isLegacyArguments = function isArguments(value) {
if (isStandardArguments(value)) {
return true;
}
return value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
$toString(value) !== '[object Array]' &&
$toString(value.callee) === '[object Function]';
};
var supportsStandardArguments = (function () {
return isStandardArguments(arguments);
}());
isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
/***/ }),
/***/ "e3db":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "e3e3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
var exported;
if (!$WeakMap) {
// eslint-disable-next-line no-unused-vars
exported = function isWeakMap(x) {
// `WeakMap` is not present in this environment.
return false;
};
}
var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$mapHas) {
// eslint-disable-next-line no-unused-vars
exported = function isWeakMap(x) {
// `WeakMap` does not have a `has` method
return false;
};
}
module.exports = exported || function isWeakMap(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$mapHas.call(x, $mapHas);
if ($setHas) {
try {
$setHas.call(x, $setHas);
} catch (e) {
return true;
}
}
return x instanceof $WeakMap; // core-js workaround, pre-v3
} catch (e) {}
return false;
};
/***/ }),
/***/ "e467":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c532");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7917");
/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("4581");
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
/**
* Determines if the given thing is a array or js object.
*
* @param {string} thing - The object or array to be visited.
*
* @returns {boolean}
*/
function isVisitable(thing) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(thing);
}
/**
* It removes the brackets from the end of a string
*
* @param {string} key - The key of the parameter.
*
* @returns {string} the key without the brackets.
*/
function removeBrackets(key) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]') ? key.slice(0, -2) : key;
}
/**
* It takes a path, a key, and a boolean, and returns a string
*
* @param {string} path - The path to the current key.
* @param {string} key - The key of the current object being iterated over.
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
*
* @returns {string} The path to the current key.
*/
function renderKey(path, key, dots) {
if (!path) return key;
return path.concat(key).map(function each(token, i) {
// eslint-disable-next-line no-param-reassign
token = removeBrackets(token);
return !dots && i ? '[' + token + ']' : token;
}).join(dots ? '.' : '');
}
/**
* If the array is an array and none of its elements are visitable, then it's a flat array.
*
* @param {Array<any>} arr - The array to check
*
* @returns {boolean}
*/
function isFlatArray(arr) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(arr) && !arr.some(isVisitable);
}
const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"], {}, null, function filter(prop) {
return /^is[A-Z]/.test(prop);
});
/**
* Convert a data object to FormData
*
* @param {Object} obj
* @param {?Object} [formData]
* @param {?Object} [options]
* @param {Function} [options.visitor]
* @param {Boolean} [options.metaTokens = true]
* @param {Boolean} [options.dots = false]
* @param {?Boolean} [options.indexes = false]
*
* @returns {Object}
**/
/**
* It converts an object into a FormData object
*
* @param {Object<any, any>} obj - The object to convert to form data.
* @param {string} formData - The FormData object to append to.
* @param {Object<string, any>} options
*
* @returns
*/
function toFormData(obj, formData, options) {
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) {
throw new TypeError('target must be an object');
}
// eslint-disable-next-line no-param-reassign
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] || FormData)();
// eslint-disable-next-line no-param-reassign
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(options, {
metaTokens: true,
dots: false,
indexes: false
}, false, function defined(option, source) {
// eslint-disable-next-line no-eq-null,eqeqeq
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(source[option]);
});
const metaTokens = options.metaTokens;
// eslint-disable-next-line no-use-before-define
const visitor = options.visitor || defaultVisitor;
const dots = options.dots;
const indexes = options.indexes;
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isSpecCompliantForm(formData);
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFunction(visitor)) {
throw new TypeError('visitor must be a function');
}
function convertValue(value) {
if (value === null) return '';
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isDate(value)) {
return value.toISOString();
}
if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isBlob(value)) {
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('Blob is not supported. Use a Buffer instead.');
}
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isTypedArray(value)) {
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
}
return value;
}
/**
* Default visitor.
*
* @param {*} value
* @param {String|Number} key
* @param {Array<String|Number>} path
* @this {FormData}
*
* @returns {boolean} return true to visit the each prop of the value recursively
*/
function defaultVisitor(value, key, path) {
let arr = value;
if (value && !path && typeof value === 'object') {
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '{}')) {
// eslint-disable-next-line no-param-reassign
key = metaTokens ? key : key.slice(0, -2);
// eslint-disable-next-line no-param-reassign
value = JSON.stringify(value);
} else if (
(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(value) && isFlatArray(value)) ||
((_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toArray(value))
)) {
// eslint-disable-next-line no-param-reassign
key = removeBrackets(key);
arr.forEach(function each(el, index) {
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && formData.append(
// eslint-disable-next-line no-nested-ternary
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
convertValue(el)
);
});
return false;
}
}
if (isVisitable(value)) {
return true;
}
formData.append(renderKey(path, key, dots), convertValue(value));
return false;
}
const stack = [];
const exposedHelpers = Object.assign(predicates, {
defaultVisitor,
convertValue,
isVisitable
});
function build(value, path) {
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(value)) return;
if (stack.indexOf(value) !== -1) {
throw Error('Circular reference detected in ' + path.join('.'));
}
stack.push(value);
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].forEach(value, function each(el, key) {
const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && visitor.call(
formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isString(key) ? key.trim() : key, path, exposedHelpers
);
if (result === true) {
build(el, path ? path.concat(key) : [key]);
}
});
stack.pop();
}
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) {
throw new TypeError('data must be an object');
}
build(obj);
return formData;
}
/* harmony default export */ __webpack_exports__["a"] = (toFormData);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("b639").Buffer))
/***/ }),
/***/ "e4ae":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("f772");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "e53d":
/***/ (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
/***/ }),
/***/ "e630":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("774e");
/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("db2a");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_0___default()(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(o, minLen);
}
/***/ }),
/***/ "e6f3":
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__("07e3");
var toIObject = __webpack_require__("36c3");
var arrayIndexOf = __webpack_require__("5b4e")(false);
var IE_PROTO = __webpack_require__("5559")('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;
};
/***/ }),
/***/ "e710":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var define = __webpack_require__("f367");
var callBind = __webpack_require__("3eb1");
var implementation = __webpack_require__("5708");
var getPolyfill = __webpack_require__("57ec");
var shim = __webpack_require__("1c7e");
var flagsBound = callBind(getPolyfill());
define(flagsBound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = flagsBound;
/***/ }),
/***/ "e853":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("d3f4");
var isArray = __webpack_require__("1169");
var SPECIES = __webpack_require__("2b4c")('species');
module.exports = function (original) {
var C;
if (isArray(original)) {
C = original.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/***/ "eb71":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f7f");
/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7514");
/* harmony import */ var core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("f751");
/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("cadf");
/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("456d");
/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ac6a");
/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("28a5");
/* harmony import */ var core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _mixins_table_view_mixin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("cf35");
/* harmony import */ var _services_frappe__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ee28");
/* harmony import */ var _views_builder_add_controls_AddControlControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ca0c");
/* harmony import */ var _views_builder_row_views_Chart__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("c5e1");
/* harmony import */ var _mixins_control_field_extend_mixin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("653e");
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
name: "FullTableRowRenderView",
components: {
AddControlControl: _views_builder_add_controls_AddControlControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"],
Chart: _views_builder_row_views_Chart__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]
},
mixins: [_mixins_table_view_mixin__WEBPACK_IMPORTED_MODULE_7__[/* TABLE_VIEW_MIXIN */ "a"], _mixins_control_field_extend_mixin__WEBPACK_IMPORTED_MODULE_11__[/* CONTROL_FIELD_EXTEND_MIXIN */ "a"]],
data: function data() {
return {
items: [],
formData: {},
formInputData: {},
savedItems: [],
calculatedFields: [],
tableFormula: [],
chartDataSet: [],
chartLabels: [],
showGraph: false
};
},
created: function created() {
this.showGraph = this.section.showGraph;
if (this.section.referenceTable.length) {
this.getForm(this.section.referenceTable);
if (this.dataInput != null && this.dataInput[this.section.referenceTable] != null) {
this.items = this.dataInput[this.section.referenceTable];
}
}
},
props: {
reference: Object,
parent: String,
dataInput: {
type: Object,
default: null
},
loaded: {
type: Array,
default: []
},
readonly: {
type: Boolean,
default: false
},
valueContainer: {
type: Object,
required: false
}
},
watch: {
loaded: function loaded(val) {
if (val.length) {
this.items = val;
this.populateGraph();
}
},
valueContainer: function valueContainer() {
if (this.valueContainer != null && this.valueContainer[this.section.referenceTable] != null) {
this.items = this.valueContainer[this.section.referenceTable];
}
}
},
methods: {
getCalculatedFields: function getCalculatedFields() {
this.calculatedFields = section.calculatedFields.split(",");
},
getFormulaValue: function getFormulaValue(formula) {
var _this = this;
var text = formula;
var regex = /\[([^\][]*)]/g;
var results = [],
m;
while (m = regex.exec(text)) {
results.push(m[1]);
}
var operands = results;
var resultFormula = formula;
operands.forEach(function (operand) {
var formattedOperand = "[".concat(operand, "]");
var calculatedValue = _this.items.map(function (listItem) {
return listItem[operand];
}).reduce(function (partialSum, a) {
return partialSum + a;
}, 0);
resultFormula = resultFormula.replaceAll(formattedOperand, calculatedValue);
});
return eval(resultFormula);
},
getRandomInt: function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
},
getSave: function getSave(savedId) {
var _this2 = this;
var data = this.formInputData;
console.log("DATA FROM FORM");
console.log(data);
var isValid = true;
Object.keys(this.formData.controls).forEach(function (key) {
if (_this2.formData.controls[key] != null && _this2.formData.controls[key].validations != null && isValid) {
_this2.formData.controls[key].validations.forEach(function (validation) {
if (validation.ruleType == 'required' && _this2.formInputData[key] == null) {
_this2.show_alert("Field ".concat(_this2.formData.controls[key].label, " is required"));
isValid = false;
}
if (validation.ruleType == 'min' && "".concat(_this2.formInputData[key]).length < validation.additionalValue) {
_this2.show_alert("Field ".concat(_this2.formData.controls[key].label, " is need at least ").concat(validation.additionalValue, " characters"));
isValid = false;
}
if (validation.ruleType == 'max' && "".concat(_this2.formInputData[key]).length > validation.additionalValue) {
_this2.show_alert("Field ".concat(_this2.formData.controls[key].label, " can only have a max of ").concat(validation.additionalValue, " characters"));
isValid = false;
}
});
}
});
if (!isValid) {
return;
}
var returnedTarget = Object.assign({
rowId: savedId
}, data);
returnedTarget.rowId = savedId;
this.items.unshift(returnedTarget);
this.map();
console.log({
parent: this.parent,
items: this.items
});
this.$emit("items", {
parent: this.parent,
items: this.items
});
this.clearData();
},
setValues: function setValues(val) {
this.$set(this, "formInputData", val);
},
clearData: function clearData() {
var val = {};
var keys = Object.keys(this.formInputData);
keys.forEach(function (key) {
val[key] = "";
});
this.setValues(val);
},
onRowSelected: function onRowSelected(val) {
var _this3 = this;
if (val.length < 1) {
return;
}
var size = val.length - 1;
val = val[size];
this.$bvModal.msgBoxConfirm("Are you sure you want to remove row ?").then(function (value) {
if (value) {
_this3.items = _this3.items.filter(function (item) {
return item.rowId != val.rowId;
});
Object(_services_frappe__WEBPACK_IMPORTED_MODULE_8__[/* deleteRepo */ "b"])({
name: val.rowId
}).then(function (reslt) {
_this3.show_alert("Item removed");
});
}
}).catch(function (err) {});
},
populateGraph: function populateGraph() {
var _this4 = this;
if (this.showGraph) {
this.chartLabels = this.items.map(function (item) {
return item["".concat(_this4.formData.xAxisField)];
});
var yAxisFields = this.formData.graphFields.split(",");
var tempSet = [];
yAxisFields.forEach(function (item) {
var currentSet = {};
currentSet.name = item.split("-")[1];
currentSet.type = "line";
currentSet.values = _this4.items.map(function (x) {
return x["".concat(item)];
});
var preset = tempSet.find(function (j) {
return j.name == currentSet.name;
});
if (preset == null) {
tempSet.push(currentSet);
}
});
this.chartDataSet = tempSet;
}
},
getForm: function getForm(name) {
var _this5 = this;
Object(_services_frappe__WEBPACK_IMPORTED_MODULE_8__[/* getFormConfiguration */ "d"])({
name: name
}).then(function (config) {
var formStringConfig = config.formdata;
var configObject = JSON.parse(formStringConfig);
_this5.configuration = formStringConfig;
_this5.formName = config.name;
_this5.formData = configObject;
_this5.originalConfig = configObject;
_this5.populateGraph();
});
},
list: function list(key, formData) {
var control = this.formData.controls[key];
if (control && (control.type == "radio" || control.type == "dropDown")) {
if (control.items.length) {
var erpValue = items.find(item.value === this.formInputData[key]);
var field = this.formData.controls[key].mappedField;
if (field) {
formData[field] = erpValue.erpValue;
}
}
}
},
map: function map() {
var _this6 = this;
if (this.formData.formConfig.mappedDoctype) {
var keys = Object.keys(this.formInputData);
var formData = {};
keys.forEach(function (key) {
var control = _this6.formData.controls[key];
if (control && (control.type === "radio" || control.type === "dropDown" || control.type === "checkbox")) {
if (control.items.length) {
var erpValueObject = control.items.find(function (item) {
return item.value === _this6.formInputData[key];
});
var field = _this6.formData.controls[key].mappedField;
if (field) {
formData[field] = erpValueObject.erpValue;
}
}
} else {
var _field = _this6.formData.controls[key].mappedField;
if (_field) {
formData[_field] = _this6.formInputData[key];
}
}
});
if (this.section.referenceTable.length) {
var snake = null;
if (this.section.tableReference) {
snake = this.section.tableReference;
} else {
snake = this.section.referenceTable.replaceAll(" ", "_").toLowerCase();
}
if (!this.valueContainer[snake]) {
this.valueContainer[snake] = [];
}
var currentVal = this.valueContainer[snake];
currentVal.push(formData);
this.$set(this.valueContainer, snake, currentVal);
}
}
},
saveForm: function saveForm(formData) {
var _this7 = this;
Object(_services_frappe__WEBPACK_IMPORTED_MODULE_8__[/* saveFormData */ "f"])(formData).then(function (saved) {
_this7.getSave(saved.name);
_this7.show_alert("Item saved " + saved.name);
_this7.savedItems.push(saved.name);
});
},
clearSavedData: function clearSavedData() {// clearChildTable({parent: this.parent} ).then(result => {
// this.items = [];
// })
},
save: function save() {
var form_content = this.formInputData;
form_content = JSON.stringify(form_content);
var form_name = this.formName;
var doctype = "Form Repository";
var parent_repo = this.parent;
var formData = {
doctype: doctype,
form_content: form_content,
parent_repo: parent_repo,
form_name: form_name,
completion_status: "Completed",
completed: 1
};
if (this.reference) {
formData.reference_doctype = this.reference.doctype;
formData.reference_doctype_id = this.reference.doctype_id;
}
this.saveForm({
formData: formData
});
}
},
computed: {
tableId: function tableId() {
var id = "".concat(this.getRandomInt(1, 3000));
return id;
}
}
});
/***/ }),
/***/ "ebd6":
/***/ (function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__("cb7c");
var aFunction = __webpack_require__("d8e8");
var SPECIES = __webpack_require__("2b4c")('species');
module.exports = function (O, D) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ }),
/***/ "ebfd":
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__("62a0")('meta');
var isObject = __webpack_require__("f772");
var has = __webpack_require__("07e3");
var setDesc = __webpack_require__("d9f6").f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__("294c")(function () {
return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
setDesc(it, META, { value: {
i: 'O' + ++id, // object ID
w: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMeta(it);
// return object ID
} return it[META].i;
};
var getWeak = function (it, create) {
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMeta(it);
// return hash weak collections IDs
} return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
return it;
};
var meta = module.exports = {
KEY: META,
NEED: false,
fastKey: fastKey,
getWeak: getWeak,
onFreeze: onFreeze
};
/***/ }),
/***/ "ec30":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (__webpack_require__("9e1e")) {
var LIBRARY = __webpack_require__("2d00");
var global = __webpack_require__("7726");
var fails = __webpack_require__("79e5");
var $export = __webpack_require__("5ca1");
var $typed = __webpack_require__("0f88");
var $buffer = __webpack_require__("ed0b");
var ctx = __webpack_require__("9b43");
var anInstance = __webpack_require__("f605");
var propertyDesc = __webpack_require__("4630");
var hide = __webpack_require__("32e9");
var redefineAll = __webpack_require__("dcbc");
var toInteger = __webpack_require__("4588");
var toLength = __webpack_require__("9def");
var toIndex = __webpack_require__("09fa");
var toAbsoluteIndex = __webpack_require__("77f1");
var toPrimitive = __webpack_require__("6a99");
var has = __webpack_require__("69a8");
var classof = __webpack_require__("23c6");
var isObject = __webpack_require__("d3f4");
var toObject = __webpack_require__("4bf8");
var isArrayIter = __webpack_require__("33a4");
var create = __webpack_require__("2aeb");
var getPrototypeOf = __webpack_require__("38fd");
var gOPN = __webpack_require__("9093").f;
var getIterFn = __webpack_require__("27ee");
var uid = __webpack_require__("ca5a");
var wks = __webpack_require__("2b4c");
var createArrayMethod = __webpack_require__("0a49");
var createArrayIncludes = __webpack_require__("c366");
var speciesConstructor = __webpack_require__("ebd6");
var ArrayIterators = __webpack_require__("cadf");
var Iterators = __webpack_require__("84f2");
var $iterDetect = __webpack_require__("5cc5");
var setSpecies = __webpack_require__("7a56");
var arrayFill = __webpack_require__("36bd");
var arrayCopyWithin = __webpack_require__("ba92");
var $DP = __webpack_require__("86cc");
var $GOPD = __webpack_require__("11e9");
var dP = $DP.f;
var gOPD = $GOPD.f;
var RangeError = global.RangeError;
var TypeError = global.TypeError;
var Uint8Array = global.Uint8Array;
var ARRAY_BUFFER = 'ArrayBuffer';
var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
var PROTOTYPE = 'prototype';
var ArrayProto = Array[PROTOTYPE];
var $ArrayBuffer = $buffer.ArrayBuffer;
var $DataView = $buffer.DataView;
var arrayForEach = createArrayMethod(0);
var arrayFilter = createArrayMethod(2);
var arraySome = createArrayMethod(3);
var arrayEvery = createArrayMethod(4);
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var arrayIncludes = createArrayIncludes(true);
var arrayIndexOf = createArrayIncludes(false);
var arrayValues = ArrayIterators.values;
var arrayKeys = ArrayIterators.keys;
var arrayEntries = ArrayIterators.entries;
var arrayLastIndexOf = ArrayProto.lastIndexOf;
var arrayReduce = ArrayProto.reduce;
var arrayReduceRight = ArrayProto.reduceRight;
var arrayJoin = ArrayProto.join;
var arraySort = ArrayProto.sort;
var arraySlice = ArrayProto.slice;
var arrayToString = ArrayProto.toString;
var arrayToLocaleString = ArrayProto.toLocaleString;
var ITERATOR = wks('iterator');
var TAG = wks('toStringTag');
var TYPED_CONSTRUCTOR = uid('typed_constructor');
var DEF_CONSTRUCTOR = uid('def_constructor');
var ALL_CONSTRUCTORS = $typed.CONSTR;
var TYPED_ARRAY = $typed.TYPED;
var VIEW = $typed.VIEW;
var WRONG_LENGTH = 'Wrong length!';
var $map = createArrayMethod(1, function (O, length) {
return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
});
var LITTLE_ENDIAN = fails(function () {
// eslint-disable-next-line no-undef
return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
});
var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
new Uint8Array(1).set({});
});
var toOffset = function (it, BYTES) {
var offset = toInteger(it);
if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
return offset;
};
var validate = function (it) {
if (isObject(it) && TYPED_ARRAY in it) return it;
throw TypeError(it + ' is not a typed array!');
};
var allocate = function (C, length) {
if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
throw TypeError('It is not a typed array constructor!');
} return new C(length);
};
var speciesFromList = function (O, list) {
return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
};
var fromList = function (C, list) {
var index = 0;
var length = list.length;
var result = allocate(C, length);
while (length > index) result[index] = list[index++];
return result;
};
var addGetter = function (it, key, internal) {
dP(it, key, { get: function () { return this._d[internal]; } });
};
var $from = function from(source /* , mapfn, thisArg */) {
var O = toObject(source);
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iterFn = getIterFn(O);
var i, length, values, result, step, iterator;
if (iterFn != undefined && !isArrayIter(iterFn)) {
for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
values.push(step.value);
} O = values;
}
if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
result[i] = mapping ? mapfn(O[i], i) : O[i];
}
return result;
};
var $of = function of(/* ...items */) {
var index = 0;
var length = arguments.length;
var result = allocate(this, length);
while (length > index) result[index] = arguments[index++];
return result;
};
// iOS Safari 6.x fails here
var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
var $toLocaleString = function toLocaleString() {
return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
};
var proto = {
copyWithin: function copyWithin(target, start /* , end */) {
return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
},
every: function every(callbackfn /* , thisArg */) {
return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
return arrayFill.apply(validate(this), arguments);
},
filter: function filter(callbackfn /* , thisArg */) {
return speciesFromList(this, arrayFilter(validate(this), callbackfn,
arguments.length > 1 ? arguments[1] : undefined));
},
find: function find(predicate /* , thisArg */) {
return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
},
findIndex: function findIndex(predicate /* , thisArg */) {
return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
},
forEach: function forEach(callbackfn /* , thisArg */) {
arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
indexOf: function indexOf(searchElement /* , fromIndex */) {
return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
},
includes: function includes(searchElement /* , fromIndex */) {
return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
},
join: function join(separator) { // eslint-disable-line no-unused-vars
return arrayJoin.apply(validate(this), arguments);
},
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
return arrayLastIndexOf.apply(validate(this), arguments);
},
map: function map(mapfn /* , thisArg */) {
return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
},
reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
return arrayReduce.apply(validate(this), arguments);
},
reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
return arrayReduceRight.apply(validate(this), arguments);
},
reverse: function reverse() {
var that = this;
var length = validate(that).length;
var middle = Math.floor(length / 2);
var index = 0;
var value;
while (index < middle) {
value = that[index];
that[index++] = that[--length];
that[length] = value;
} return that;
},
some: function some(callbackfn /* , thisArg */) {
return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
sort: function sort(comparefn) {
return arraySort.call(validate(this), comparefn);
},
subarray: function subarray(begin, end) {
var O = validate(this);
var length = O.length;
var $begin = toAbsoluteIndex(begin, length);
return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
O.buffer,
O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
);
}
};
var $slice = function slice(start, end) {
return speciesFromList(this, arraySlice.call(validate(this), start, end));
};
var $set = function set(arrayLike /* , offset */) {
validate(this);
var offset = toOffset(arguments[1], 1);
var length = this.length;
var src = toObject(arrayLike);
var len = toLength(src.length);
var index = 0;
if (len + offset > length) throw RangeError(WRONG_LENGTH);
while (index < len) this[offset + index] = src[index++];
};
var $iterators = {
entries: function entries() {
return arrayEntries.call(validate(this));
},
keys: function keys() {
return arrayKeys.call(validate(this));
},
values: function values() {
return arrayValues.call(validate(this));
}
};
var isTAIndex = function (target, key) {
return isObject(target)
&& target[TYPED_ARRAY]
&& typeof key != 'symbol'
&& key in target
&& String(+key) == String(key);
};
var $getDesc = function getOwnPropertyDescriptor(target, key) {
return isTAIndex(target, key = toPrimitive(key, true))
? propertyDesc(2, target[key])
: gOPD(target, key);
};
var $setDesc = function defineProperty(target, key, desc) {
if (isTAIndex(target, key = toPrimitive(key, true))
&& isObject(desc)
&& has(desc, 'value')
&& !has(desc, 'get')
&& !has(desc, 'set')
// TODO: add validation descriptor w/o calling accessors
&& !desc.configurable
&& (!has(desc, 'writable') || desc.writable)
&& (!has(desc, 'enumerable') || desc.enumerable)
) {
target[key] = desc.value;
return target;
} return dP(target, key, desc);
};
if (!ALL_CONSTRUCTORS) {
$GOPD.f = $getDesc;
$DP.f = $setDesc;
}
$export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
getOwnPropertyDescriptor: $getDesc,
defineProperty: $setDesc
});
if (fails(function () { arrayToString.call({}); })) {
arrayToString = arrayToLocaleString = function toString() {
return arrayJoin.call(this);
};
}
var $TypedArrayPrototype$ = redefineAll({}, proto);
redefineAll($TypedArrayPrototype$, $iterators);
hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
redefineAll($TypedArrayPrototype$, {
slice: $slice,
set: $set,
constructor: function () { /* noop */ },
toString: arrayToString,
toLocaleString: $toLocaleString
});
addGetter($TypedArrayPrototype$, 'buffer', 'b');
addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
addGetter($TypedArrayPrototype$, 'byteLength', 'l');
addGetter($TypedArrayPrototype$, 'length', 'e');
dP($TypedArrayPrototype$, TAG, {
get: function () { return this[TYPED_ARRAY]; }
});
// eslint-disable-next-line max-statements
module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
CLAMPED = !!CLAMPED;
var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
var GETTER = 'get' + KEY;
var SETTER = 'set' + KEY;
var TypedArray = global[NAME];
var Base = TypedArray || {};
var TAC = TypedArray && getPrototypeOf(TypedArray);
var FORCED = !TypedArray || !$typed.ABV;
var O = {};
var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
var getter = function (that, index) {
var data = that._d;
return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
};
var setter = function (that, index, value) {
var data = that._d;
if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
};
var addElement = function (that, index) {
dP(that, index, {
get: function () {
return getter(this, index);
},
set: function (value) {
return setter(this, index, value);
},
enumerable: true
});
};
if (FORCED) {
TypedArray = wrapper(function (that, data, $offset, $length) {
anInstance(that, TypedArray, NAME, '_d');
var index = 0;
var offset = 0;
var buffer, byteLength, length, klass;
if (!isObject(data)) {
length = toIndex(data);
byteLength = length * BYTES;
buffer = new $ArrayBuffer(byteLength);
} else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
buffer = data;
offset = toOffset($offset, BYTES);
var $len = data.byteLength;
if ($length === undefined) {
if ($len % BYTES) throw RangeError(WRONG_LENGTH);
byteLength = $len - offset;
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
} else {
byteLength = toLength($length) * BYTES;
if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
}
length = byteLength / BYTES;
} else if (TYPED_ARRAY in data) {
return fromList(TypedArray, data);
} else {
return $from.call(TypedArray, data);
}
hide(that, '_d', {
b: buffer,
o: offset,
l: byteLength,
e: length,
v: new $DataView(buffer)
});
while (index < length) addElement(that, index++);
});
TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
hide(TypedArrayPrototype, 'constructor', TypedArray);
} else if (!fails(function () {
TypedArray(1);
}) || !fails(function () {
new TypedArray(-1); // eslint-disable-line no-new
}) || !$iterDetect(function (iter) {
new TypedArray(); // eslint-disable-line no-new
new TypedArray(null); // eslint-disable-line no-new
new TypedArray(1.5); // eslint-disable-line no-new
new TypedArray(iter); // eslint-disable-line no-new
}, true)) {
TypedArray = wrapper(function (that, data, $offset, $length) {
anInstance(that, TypedArray, NAME);
var klass;
// `ws` module bug, temporarily remove validation length for Uint8Array
// https://github.com/websockets/ws/pull/645
if (!isObject(data)) return new Base(toIndex(data));
if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
return $length !== undefined
? new Base(data, toOffset($offset, BYTES), $length)
: $offset !== undefined
? new Base(data, toOffset($offset, BYTES))
: new Base(data);
}
if (TYPED_ARRAY in data) return fromList(TypedArray, data);
return $from.call(TypedArray, data);
});
arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
});
TypedArray[PROTOTYPE] = TypedArrayPrototype;
if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
}
var $nativeIterator = TypedArrayPrototype[ITERATOR];
var CORRECT_ITER_NAME = !!$nativeIterator
&& ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
var $iterator = $iterators.values;
hide(TypedArray, TYPED_CONSTRUCTOR, true);
hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
hide(TypedArrayPrototype, VIEW, true);
hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
dP(TypedArrayPrototype, TAG, {
get: function () { return NAME; }
});
}
O[NAME] = TypedArray;
$export($export.G + $export.W + $export.F * (TypedArray != Base), O);
$export($export.S, NAME, {
BYTES_PER_ELEMENT: BYTES
});
$export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
from: $from,
of: $of
});
if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
$export($export.P, NAME, proto);
setSpecies(NAME);
$export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
}), NAME, { slice: $slice });
$export($export.P + $export.F * (fails(function () {
return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
}) || !fails(function () {
TypedArrayPrototype.toLocaleString.call([1, 2]);
})), NAME, { toLocaleString: $toLocaleString });
Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
};
} else module.exports = function () { /* empty */ };
/***/ }),
/***/ "ed0b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__("7726");
var DESCRIPTORS = __webpack_require__("9e1e");
var LIBRARY = __webpack_require__("2d00");
var $typed = __webpack_require__("0f88");
var hide = __webpack_require__("32e9");
var redefineAll = __webpack_require__("dcbc");
var fails = __webpack_require__("79e5");
var anInstance = __webpack_require__("f605");
var toInteger = __webpack_require__("4588");
var toLength = __webpack_require__("9def");
var toIndex = __webpack_require__("09fa");
var gOPN = __webpack_require__("9093").f;
var dP = __webpack_require__("86cc").f;
var arrayFill = __webpack_require__("36bd");
var setToStringTag = __webpack_require__("7f20");
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length!';
var WRONG_INDEX = 'Wrong index!';
var $ArrayBuffer = global[ARRAY_BUFFER];
var $DataView = global[DATA_VIEW];
var Math = global.Math;
var RangeError = global.RangeError;
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = global.Infinity;
var BaseBuffer = $ArrayBuffer;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;
var BUFFER = 'buffer';
var BYTE_LENGTH = 'byteLength';
var BYTE_OFFSET = 'byteOffset';
var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
// IEEE754 conversions based on https://github.com/feross/ieee754
function packIEEE754(value, mLen, nBytes) {
var buffer = new Array(nBytes);
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
var i = 0;
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
var e, m, c;
value = abs(value);
// eslint-disable-next-line no-self-compare
if (value != value || value === Infinity) {
// eslint-disable-next-line no-self-compare
m = value != value ? 1 : 0;
e = eMax;
} else {
e = floor(log(value) / LN2);
if (value * (c = pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * pow(2, mLen);
e = e + eBias;
} else {
m = value * pow(2, eBias - 1) * pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
e = e << mLen | m;
eLen += mLen;
for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
buffer[--i] |= s * 128;
return buffer;
}
function unpackIEEE754(buffer, mLen, nBytes) {
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = eLen - 7;
var i = nBytes - 1;
var s = buffer[i--];
var e = s & 127;
var m;
s >>= 7;
for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
m = e & (1 << -nBits) - 1;
e >>= -nBits;
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : s ? -Infinity : Infinity;
} else {
m = m + pow(2, mLen);
e = e - eBias;
} return (s ? -1 : 1) * m * pow(2, e - mLen);
}
function unpackI32(bytes) {
return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
}
function packI8(it) {
return [it & 0xff];
}
function packI16(it) {
return [it & 0xff, it >> 8 & 0xff];
}
function packI32(it) {
return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
}
function packF64(it) {
return packIEEE754(it, 52, 8);
}
function packF32(it) {
return packIEEE754(it, 23, 4);
}
function addGetter(C, key, internal) {
dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
}
function get(view, bytes, index, isLittleEndian) {
var numIndex = +index;
var intIndex = toIndex(numIndex);
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
var store = view[$BUFFER]._b;
var start = intIndex + view[$OFFSET];
var pack = store.slice(start, start + bytes);
return isLittleEndian ? pack : pack.reverse();
}
function set(view, bytes, index, conversion, value, isLittleEndian) {
var numIndex = +index;
var intIndex = toIndex(numIndex);
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
var store = view[$BUFFER]._b;
var start = intIndex + view[$OFFSET];
var pack = conversion(+value);
for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
}
if (!$typed.ABV) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
var byteLength = toIndex(length);
this._b = arrayFill.call(new Array(byteLength), 0);
this[$LENGTH] = byteLength;
};
$DataView = function DataView(buffer, byteOffset, byteLength) {
anInstance(this, $DataView, DATA_VIEW);
anInstance(buffer, $ArrayBuffer, DATA_VIEW);
var bufferLength = buffer[$LENGTH];
var offset = toInteger(byteOffset);
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
this[$BUFFER] = buffer;
this[$OFFSET] = offset;
this[$LENGTH] = byteLength;
};
if (DESCRIPTORS) {
addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
addGetter($DataView, BUFFER, '_b');
addGetter($DataView, BYTE_LENGTH, '_l');
addGetter($DataView, BYTE_OFFSET, '_o');
}
redefineAll($DataView[PROTOTYPE], {
getInt8: function getInt8(byteOffset) {
return get(this, 1, byteOffset)[0] << 24 >> 24;
},
getUint8: function getUint8(byteOffset) {
return get(this, 1, byteOffset)[0];
},
getInt16: function getInt16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments[1]);
return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
},
getUint16: function getUint16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments[1]);
return bytes[1] << 8 | bytes[0];
},
getInt32: function getInt32(byteOffset /* , littleEndian */) {
return unpackI32(get(this, 4, byteOffset, arguments[1]));
},
getUint32: function getUint32(byteOffset /* , littleEndian */) {
return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
},
getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
},
getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
},
setInt8: function setInt8(byteOffset, value) {
set(this, 1, byteOffset, packI8, value);
},
setUint8: function setUint8(byteOffset, value) {
set(this, 1, byteOffset, packI8, value);
},
setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packI16, value, arguments[2]);
},
setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packI16, value, arguments[2]);
},
setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packI32, value, arguments[2]);
},
setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packI32, value, arguments[2]);
},
setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packF32, value, arguments[2]);
},
setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
set(this, 8, byteOffset, packF64, value, arguments[2]);
}
});
} else {
if (!fails(function () {
$ArrayBuffer(1);
}) || !fails(function () {
new $ArrayBuffer(-1); // eslint-disable-line no-new
}) || fails(function () {
new $ArrayBuffer(); // eslint-disable-line no-new
new $ArrayBuffer(1.5); // eslint-disable-line no-new
new $ArrayBuffer(NaN); // eslint-disable-line no-new
return $ArrayBuffer.name != ARRAY_BUFFER;
})) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer);
return new BaseBuffer(toIndex(length));
};
var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
}
if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
}
// iOS Safari 7.x bug
var view = new $DataView(new $ArrayBuffer(2));
var $setInt8 = $DataView[PROTOTYPE].setInt8;
view.setInt8(0, 2147483648);
view.setInt8(1, 2147483649);
if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
setInt8: function setInt8(byteOffset, value) {
$setInt8.call(this, byteOffset, value << 24 >> 24);
},
setUint8: function setUint8(byteOffset, value) {
$setInt8.call(this, byteOffset, value << 24 >> 24);
}
}, true);
}
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);
hide($DataView[PROTOTYPE], $typed.VIEW, true);
exports[ARRAY_BUFFER] = $ArrayBuffer;
exports[DATA_VIEW] = $DataView;
/***/ }),
/***/ "edc4":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var forEach = __webpack_require__("bfad");
var availableTypedArrays = __webpack_require__("7226");
var callBound = __webpack_require__("545e");
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__("07a4")();
var g = typeof globalThis === 'undefined' ? global : globalThis;
var typedArrays = availableTypedArrays();
var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__("1dd1");
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
forEach(typedArrays, function (typedArray) {
if (typeof g[typedArray] === 'function') {
var arr = new g[typedArray]();
if (Symbol.toStringTag in arr) {
var proto = getPrototypeOf(arr);
var descriptor = gOPD(proto, Symbol.toStringTag);
if (!descriptor) {
var superProto = getPrototypeOf(proto);
descriptor = gOPD(superProto, Symbol.toStringTag);
}
toStrTags[typedArray] = descriptor.get;
}
}
});
}
var tryTypedArrays = function tryAllTypedArrays(value) {
var foundName = false;
forEach(toStrTags, function (getter, typedArray) {
if (!foundName) {
try {
var name = getter.call(value);
if (name === typedArray) {
foundName = name;
}
} catch (e) {}
}
});
return foundName;
};
var isTypedArray = __webpack_require__("f4e3");
module.exports = function whichTypedArray(value) {
if (!isTypedArray(value)) { return false; }
if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
return tryTypedArrays(value);
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "ee28":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ frappe_api; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ getFormConfiguration; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ saveFormData; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ getList; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ getDoctypeFields; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ deleteRepo; });
// UNUSED EXPORTS: fetchx, notify
// NAMESPACE OBJECT: ./node_modules/axios/lib/platform/common/utils.js
var utils_namespaceObject = {};
__webpack_require__.r(utils_namespaceObject);
__webpack_require__.d(utils_namespaceObject, "hasBrowserEnv", function() { return hasBrowserEnv; });
__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserWebWorkerEnv", function() { return hasStandardBrowserWebWorkerEnv; });
__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserEnv", function() { return hasStandardBrowserEnv; });
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.promise.js
var es6_promise = __webpack_require__("551c");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("7618");
// EXTERNAL MODULE: ./node_modules/axios/lib/utils.js
var utils = __webpack_require__("c532");
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/bind.js
var bind = __webpack_require__("1d2b");
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/toFormData.js
var toFormData = __webpack_require__("e467");
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js
/**
* It encodes a string by replacing all characters that are not in the unreserved set with
* their percent-encoded equivalents
*
* @param {string} str - The string to encode.
*
* @returns {string} The encoded string.
*/
function encode(str) {
const charMap = {
'!': '%21',
"'": '%27',
'(': '%28',
')': '%29',
'~': '%7E',
'%20': '+',
'%00': '\x00'
};
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
return charMap[match];
});
}
/**
* It takes a params object and converts it to a FormData object
*
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
*
* @returns {void}
*/
function AxiosURLSearchParams(params, options) {
this._pairs = [];
params && Object(toFormData["a" /* default */])(params, this, options);
}
const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
AxiosURLSearchParams_prototype.append = function append(name, value) {
this._pairs.push([name, value]);
};
AxiosURLSearchParams_prototype.toString = function toString(encoder) {
const _encode = encoder ? function(value) {
return encoder.call(this, value, encode);
} : encode;
return this._pairs.map(function each(pair) {
return _encode(pair[0]) + '=' + _encode(pair[1]);
}, '').join('&');
};
/* harmony default export */ var helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js
/**
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
* URI encoded counterparts
*
* @param {string} val The value to be encoded.
*
* @returns {string} The encoded value.
*/
function buildURL_encode(val) {
return encodeURIComponent(val).
replace(/%3A/gi, ':').
replace(/%24/g, '$').
replace(/%2C/gi, ',').
replace(/%20/g, '+').
replace(/%5B/gi, '[').
replace(/%5D/gi, ']');
}
/**
* Build a URL by appending params to the end
*
* @param {string} url The base of the url (e.g., http://www.google.com)
* @param {object} [params] The params to be appended
* @param {?object} options
*
* @returns {string} The formatted url
*/
function buildURL(url, params, options) {
/*eslint no-param-reassign:0*/
if (!params) {
return url;
}
const _encode = options && options.encode || buildURL_encode;
const serializeFn = options && options.serialize;
let serializedParams;
if (serializeFn) {
serializedParams = serializeFn(params, options);
} else {
serializedParams = utils["a" /* default */].isURLSearchParams(params) ?
params.toString() :
new helpers_AxiosURLSearchParams(params, options).toString(_encode);
}
if (serializedParams) {
const hashmarkIndex = url.indexOf("#");
if (hashmarkIndex !== -1) {
url = url.slice(0, hashmarkIndex);
}
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
}
return url;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js
class InterceptorManager_InterceptorManager {
constructor() {
this.handlers = [];
}
/**
* Add a new interceptor to the stack
*
* @param {Function} fulfilled The function to handle `then` for a `Promise`
* @param {Function} rejected The function to handle `reject` for a `Promise`
*
* @return {Number} An ID used to remove interceptor later
*/
use(fulfilled, rejected, options) {
this.handlers.push({
fulfilled,
rejected,
synchronous: options ? options.synchronous : false,
runWhen: options ? options.runWhen : null
});
return this.handlers.length - 1;
}
/**
* Remove an interceptor from the stack
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(id) {
if (this.handlers[id]) {
this.handlers[id] = null;
}
}
/**
* Clear all interceptors from the stack
*
* @returns {void}
*/
clear() {
if (this.handlers) {
this.handlers = [];
}
}
/**
* Iterate over all the registered interceptors
*
* This method is particularly useful for skipping over any
* interceptors that may have become `null` calling `eject`.
*
* @param {Function} fn The function to call for each interceptor
*
* @returns {void}
*/
forEach(fn) {
utils["a" /* default */].forEach(this.handlers, function forEachHandler(h) {
if (h !== null) {
fn(h);
}
});
}
}
/* harmony default export */ var core_InterceptorManager = (InterceptorManager_InterceptorManager);
// EXTERNAL MODULE: ./node_modules/axios/lib/core/AxiosError.js
var AxiosError = __webpack_require__("7917");
// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js
/* harmony default export */ var defaults_transitional = ({
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
});
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
/* harmony default export */ var classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js
/* harmony default export */ var classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/Blob.js
/* harmony default export */ var classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js
/* harmony default export */ var browser = ({
isBrowser: true,
classes: {
URLSearchParams: classes_URLSearchParams,
FormData: classes_FormData,
Blob: classes_Blob
},
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
});
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/common/utils.js
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
/**
* Determine if we're running in a standard browser environment
*
* This allows axios to run in a web worker, and react-native.
* Both environments support XMLHttpRequest, but not fully standard globals.
*
* web workers:
* typeof window -> undefined
* typeof document -> undefined
*
* react-native:
* navigator.product -> 'ReactNative'
* nativescript
* navigator.product -> 'NativeScript' or 'NS'
*
* @returns {boolean}
*/
const hasStandardBrowserEnv = (
(product) => {
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
})(typeof navigator !== 'undefined' && navigator.product);
/**
* Determine if we're running in a standard browser webWorker environment
*
* Although the `isStandardBrowserEnv` method indicates that
* `allows axios to run in a web worker`, the WebWorker will still be
* filtered out due to its judgment standard
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
* This leads to a problem when axios post `FormData` in webWorker
*/
const hasStandardBrowserWebWorkerEnv = (() => {
return (
typeof WorkerGlobalScope !== 'undefined' &&
// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope &&
typeof self.importScripts === 'function'
);
})();
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/index.js
/* harmony default export */ var platform = ({
...utils_namespaceObject,
...browser
});
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js
function toURLEncodedForm(data, options) {
return Object(toFormData["a" /* default */])(data, new platform.classes.URLSearchParams(), Object.assign({
visitor: function(value, key, path, helpers) {
if (platform.isNode && utils["a" /* default */].isBuffer(value)) {
this.append(key, value.toString('base64'));
return false;
}
return helpers.defaultVisitor.apply(this, arguments);
}
}, options));
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js
/**
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
*
* @param {string} name - The name of the property to get.
*
* @returns An array of strings.
*/
function parsePropPath(name) {
// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return utils["a" /* default */].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
return match[0] === '[]' ? '' : match[1] || match[0];
});
}
/**
* Convert an array to an object.
*
* @param {Array<any>} arr - The array to convert to an object.
*
* @returns An object with the same keys and values as the array.
*/
function arrayToObject(arr) {
const obj = {};
const keys = Object.keys(arr);
let i;
const len = keys.length;
let key;
for (i = 0; i < len; i++) {
key = keys[i];
obj[key] = arr[key];
}
return obj;
}
/**
* It takes a FormData object and returns a JavaScript object
*
* @param {string} formData The FormData object to convert to JSON.
*
* @returns {Object<string, any> | null} The converted object.
*/
function formDataToJSON(formData) {
function buildPath(path, value, target, index) {
let name = path[index++];
const isNumericKey = Number.isFinite(+name);
const isLast = index >= path.length;
name = !name && utils["a" /* default */].isArray(target) ? target.length : name;
if (isLast) {
if (utils["a" /* default */].hasOwnProp(target, name)) {
target[name] = [target[name], value];
} else {
target[name] = value;
}
return !isNumericKey;
}
if (!target[name] || !utils["a" /* default */].isObject(target[name])) {
target[name] = [];
}
const result = buildPath(path, value, target[name], index);
if (result && utils["a" /* default */].isArray(target[name])) {
target[name] = arrayToObject(target[name]);
}
return !isNumericKey;
}
if (utils["a" /* default */].isFormData(formData) && utils["a" /* default */].isFunction(formData.entries)) {
const obj = {};
utils["a" /* default */].forEachEntry(formData, (name, value) => {
buildPath(parsePropPath(name), value, obj, 0);
});
return obj;
}
return null;
}
/* harmony default export */ var helpers_formDataToJSON = (formDataToJSON);
// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js
/**
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
* of the input
*
* @param {any} rawValue - The value to be stringified.
* @param {Function} parser - A function that parses a string into a JavaScript object.
* @param {Function} encoder - A function that takes a value and returns a string.
*
* @returns {string} A stringified version of the rawValue.
*/
function stringifySafely(rawValue, parser, encoder) {
if (utils["a" /* default */].isString(rawValue)) {
try {
(parser || JSON.parse)(rawValue);
return utils["a" /* default */].trim(rawValue);
} catch (e) {
if (e.name !== 'SyntaxError') {
throw e;
}
}
}
return (encoder || JSON.stringify)(rawValue);
}
const defaults = {
transitional: defaults_transitional,
adapter: ['xhr', 'http'],
transformRequest: [function transformRequest(data, headers) {
const contentType = headers.getContentType() || '';
const hasJSONContentType = contentType.indexOf('application/json') > -1;
const isObjectPayload = utils["a" /* default */].isObject(data);
if (isObjectPayload && utils["a" /* default */].isHTMLForm(data)) {
data = new FormData(data);
}
const isFormData = utils["a" /* default */].isFormData(data);
if (isFormData) {
if (!hasJSONContentType) {
return data;
}
return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
}
if (utils["a" /* default */].isArrayBuffer(data) ||
utils["a" /* default */].isBuffer(data) ||
utils["a" /* default */].isStream(data) ||
utils["a" /* default */].isFile(data) ||
utils["a" /* default */].isBlob(data)
) {
return data;
}
if (utils["a" /* default */].isArrayBufferView(data)) {
return data.buffer;
}
if (utils["a" /* default */].isURLSearchParams(data)) {
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
return data.toString();
}
let isFileList;
if (isObjectPayload) {
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
return toURLEncodedForm(data, this.formSerializer).toString();
}
if ((isFileList = utils["a" /* default */].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
const _FormData = this.env && this.env.FormData;
return Object(toFormData["a" /* default */])(
isFileList ? {'files[]': data} : data,
_FormData && new _FormData(),
this.formSerializer
);
}
}
if (isObjectPayload || hasJSONContentType ) {
headers.setContentType('application/json', false);
return stringifySafely(data);
}
return data;
}],
transformResponse: [function transformResponse(data) {
const transitional = this.transitional || defaults.transitional;
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
const JSONRequested = this.responseType === 'json';
if (data && utils["a" /* default */].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
const silentJSONParsing = transitional && transitional.silentJSONParsing;
const strictJSONParsing = !silentJSONParsing && JSONRequested;
try {
return JSON.parse(data);
} catch (e) {
if (strictJSONParsing) {
if (e.name === 'SyntaxError') {
throw AxiosError["a" /* default */].from(e, AxiosError["a" /* default */].ERR_BAD_RESPONSE, this, null, this.response);
}
throw e;
}
}
}
return data;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: platform.classes.FormData,
Blob: platform.classes.Blob
},
validateStatus: function validateStatus(status) {
return status >= 200 && status < 300;
},
headers: {
common: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': undefined
}
}
};
utils["a" /* default */].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
defaults.headers[method] = {};
});
/* harmony default export */ var lib_defaults = (defaults);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js
// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const ignoreDuplicateOf = utils["a" /* default */].toObjectSet([
'age', 'authorization', 'content-length', 'content-type', 'etag',
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
'referer', 'retry-after', 'user-agent'
]);
/**
* Parse headers into an object
*
* ```
* Date: Wed, 27 Aug 2014 08:58:49 GMT
* Content-Type: application/json
* Connection: keep-alive
* Transfer-Encoding: chunked
* ```
*
* @param {String} rawHeaders Headers needing to be parsed
*
* @returns {Object} Headers parsed into an object
*/
/* harmony default export */ var parseHeaders = (rawHeaders => {
const parsed = {};
let key;
let val;
let i;
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
i = line.indexOf(':');
key = line.substring(0, i).trim().toLowerCase();
val = line.substring(i + 1).trim();
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
return;
}
if (key === 'set-cookie') {
if (parsed[key]) {
parsed[key].push(val);
} else {
parsed[key] = [val];
}
} else {
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
}
});
return parsed;
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js
const $internals = Symbol('internals');
function normalizeHeader(header) {
return header && String(header).trim().toLowerCase();
}
function normalizeValue(value) {
if (value === false || value == null) {
return value;
}
return utils["a" /* default */].isArray(value) ? value.map(normalizeValue) : String(value);
}
function parseTokens(str) {
const tokens = Object.create(null);
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let match;
while ((match = tokensRE.exec(str))) {
tokens[match[1]] = match[2];
}
return tokens;
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils["a" /* default */].isFunction(filter)) {
return filter.call(this, value, header);
}
if (isHeaderNameFilter) {
value = header;
}
if (!utils["a" /* default */].isString(value)) return;
if (utils["a" /* default */].isString(filter)) {
return value.indexOf(filter) !== -1;
}
if (utils["a" /* default */].isRegExp(filter)) {
return filter.test(value);
}
}
function formatHeader(header) {
return header.trim()
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
return char.toUpperCase() + str;
});
}
function buildAccessors(obj, header) {
const accessorName = utils["a" /* default */].toCamelCase(' ' + header);
['get', 'set', 'has'].forEach(methodName => {
Object.defineProperty(obj, methodName + accessorName, {
value: function(arg1, arg2, arg3) {
return this[methodName].call(this, header, arg1, arg2, arg3);
},
configurable: true
});
});
}
class AxiosHeaders_AxiosHeaders {
constructor(headers) {
headers && this.set(headers);
}
set(header, valueOrRewrite, rewrite) {
const self = this;
function setHeader(_value, _header, _rewrite) {
const lHeader = normalizeHeader(_header);
if (!lHeader) {
throw new Error('header name must be a non-empty string');
}
const key = utils["a" /* default */].findKey(self, lHeader);
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
self[key || _header] = normalizeValue(_value);
}
}
const setHeaders = (headers, _rewrite) =>
utils["a" /* default */].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
if (utils["a" /* default */].isPlainObject(header) || header instanceof this.constructor) {
setHeaders(header, valueOrRewrite)
} else if(utils["a" /* default */].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
return this;
}
get(header, parser) {
header = normalizeHeader(header);
if (header) {
const key = utils["a" /* default */].findKey(this, header);
if (key) {
const value = this[key];
if (!parser) {
return value;
}
if (parser === true) {
return parseTokens(value);
}
if (utils["a" /* default */].isFunction(parser)) {
return parser.call(this, value, key);
}
if (utils["a" /* default */].isRegExp(parser)) {
return parser.exec(value);
}
throw new TypeError('parser must be boolean|regexp|function');
}
}
}
has(header, matcher) {
header = normalizeHeader(header);
if (header) {
const key = utils["a" /* default */].findKey(this, header);
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
}
return false;
}
delete(header, matcher) {
const self = this;
let deleted = false;
function deleteHeader(_header) {
_header = normalizeHeader(_header);
if (_header) {
const key = utils["a" /* default */].findKey(self, _header);
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
delete self[key];
deleted = true;
}
}
}
if (utils["a" /* default */].isArray(header)) {
header.forEach(deleteHeader);
} else {
deleteHeader(header);
}
return deleted;
}
clear(matcher) {
const keys = Object.keys(this);
let i = keys.length;
let deleted = false;
while (i--) {
const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key];
deleted = true;
}
}
return deleted;
}
normalize(format) {
const self = this;
const headers = {};
utils["a" /* default */].forEach(this, (value, header) => {
const key = utils["a" /* default */].findKey(headers, header);
if (key) {
self[key] = normalizeValue(value);
delete self[header];
return;
}
const normalized = format ? formatHeader(header) : String(header).trim();
if (normalized !== header) {
delete self[header];
}
self[normalized] = normalizeValue(value);
headers[normalized] = true;
});
return this;
}
concat(...targets) {
return this.constructor.concat(this, ...targets);
}
toJSON(asStrings) {
const obj = Object.create(null);
utils["a" /* default */].forEach(this, (value, header) => {
value != null && value !== false && (obj[header] = asStrings && utils["a" /* default */].isArray(value) ? value.join(', ') : value);
});
return obj;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
static from(thing) {
return thing instanceof this ? thing : new this(thing);
}
static concat(first, ...targets) {
const computed = new this(first);
targets.forEach((target) => computed.set(target));
return computed;
}
static accessor(header) {
const internals = this[$internals] = (this[$internals] = {
accessors: {}
});
const accessors = internals.accessors;
const prototype = this.prototype;
function defineAccessor(_header) {
const lHeader = normalizeHeader(_header);
if (!accessors[lHeader]) {
buildAccessors(prototype, _header);
accessors[lHeader] = true;
}
}
utils["a" /* default */].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
return this;
}
}
AxiosHeaders_AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
// reserved names hotfix
utils["a" /* default */].reduceDescriptors(AxiosHeaders_AxiosHeaders.prototype, ({value}, key) => {
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
return {
get: () => value,
set(headerValue) {
this[mapped] = headerValue;
}
}
});
utils["a" /* default */].freezeMethods(AxiosHeaders_AxiosHeaders);
/* harmony default export */ var core_AxiosHeaders = (AxiosHeaders_AxiosHeaders);
// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js
/**
* Transform the data for a request or a response
*
* @param {Array|Function} fns A single function or Array of functions
* @param {?Object} response The response object
*
* @returns {*} The resulting transformed data
*/
function transformData(fns, response) {
const config = this || lib_defaults;
const context = response || config;
const headers = core_AxiosHeaders.from(context.headers);
let data = context.data;
utils["a" /* default */].forEach(fns, function transform(fn) {
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
});
headers.normalize();
return data;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js
function isCancel(value) {
return !!(value && value.__CANCEL__);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js
/**
* A `CanceledError` is an object that is thrown when an operation is canceled.
*
* @param {string=} message The message.
* @param {Object=} config The config.
* @param {Object=} request The request.
*
* @returns {CanceledError} The created error.
*/
function CanceledError(message, config, request) {
// eslint-disable-next-line no-eq-null,eqeqeq
AxiosError["a" /* default */].call(this, message == null ? 'canceled' : message, AxiosError["a" /* default */].ERR_CANCELED, config, request);
this.name = 'CanceledError';
}
utils["a" /* default */].inherits(CanceledError, AxiosError["a" /* default */], {
__CANCEL__: true
});
/* harmony default export */ var cancel_CanceledError = (CanceledError);
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/null.js
var helpers_null = __webpack_require__("4581");
// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js
/**
* Resolve or reject a Promise based on response status.
*
* @param {Function} resolve A function that resolves the promise.
* @param {Function} reject A function that rejects the promise.
* @param {object} response The response.
*
* @returns {object} The response.
*/
function settle(resolve, reject, response) {
const validateStatus = response.config.validateStatus;
if (!response.status || !validateStatus || validateStatus(response.status)) {
resolve(response);
} else {
reject(new AxiosError["a" /* default */](
'Request failed with status code ' + response.status,
[AxiosError["a" /* default */].ERR_BAD_REQUEST, AxiosError["a" /* default */].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
response.config,
response.request,
response
));
}
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js
/* harmony default export */ var cookies = (platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
utils["a" /* default */].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
utils["a" /* default */].isString(path) && cookie.push('path=' + path);
utils["a" /* default */].isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
}
}
:
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {},
read() {
return null;
},
remove() {}
});
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js
/**
* Determines whether the specified URL is absolute
*
* @param {string} url The URL to test
*
* @returns {boolean} True if the specified URL is absolute, otherwise false
*/
function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js
/**
* Creates a new URL by combining the specified URLs
*
* @param {string} baseURL The base URL
* @param {string} relativeURL The relative URL
*
* @returns {string} The combined URL
*/
function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js
/**
* Creates a new URL by combining the baseURL with the requestedURL,
* only when the requestedURL is not already an absolute URL.
* If the requestURL is absolute, this function returns the requestedURL untouched.
*
* @param {string} baseURL The base URL
* @param {string} requestedURL Absolute or relative URL to combine
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
/* harmony default export */ var helpers_isURLSameOrigin = (platform.hasStandardBrowserEnv ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
const msie = /(msie|trident)/i.test(navigator.userAgent);
const urlParsingNode = document.createElement('a');
let originURL;
/**
* Parse a URL to discover its components
*
* @param {String} url The URL to be parsed
* @returns {Object}
*/
function resolveURL(url) {
let href = url;
if (msie) {
// IE needs attribute set twice to normalize properties
urlParsingNode.setAttribute('href', href);
href = urlParsingNode.href;
}
urlParsingNode.setAttribute('href', href);
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
return {
href: urlParsingNode.href,
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
host: urlParsingNode.host,
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
hostname: urlParsingNode.hostname,
port: urlParsingNode.port,
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
urlParsingNode.pathname :
'/' + urlParsingNode.pathname
};
}
originURL = resolveURL(window.location.href);
/**
* Determine if a URL shares the same origin as the current location
*
* @param {String} requestURL The URL to test
* @returns {boolean} True if URL shares the same origin, otherwise false
*/
return function isURLSameOrigin(requestURL) {
const parsed = (utils["a" /* default */].isString(requestURL)) ? resolveURL(requestURL) : requestURL;
return (parsed.protocol === originURL.protocol &&
parsed.host === originURL.host);
};
})() :
// Non standard browser envs (web workers, react-native) lack needed support.
(function nonStandardBrowserEnv() {
return function isURLSameOrigin() {
return true;
};
})());
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
return match && match[1] || '';
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js
/**
* Calculate data maxRate
* @param {Number} [samplesCount= 10]
* @param {Number} [min= 1000]
* @returns {Function}
*/
function speedometer(samplesCount, min) {
samplesCount = samplesCount || 10;
const bytes = new Array(samplesCount);
const timestamps = new Array(samplesCount);
let head = 0;
let tail = 0;
let firstSampleTS;
min = min !== undefined ? min : 1000;
return function push(chunkLength) {
const now = Date.now();
const startedAt = timestamps[tail];
if (!firstSampleTS) {
firstSampleTS = now;
}
bytes[head] = chunkLength;
timestamps[head] = now;
let i = tail;
let bytesCount = 0;
while (i !== head) {
bytesCount += bytes[i++];
i = i % samplesCount;
}
head = (head + 1) % samplesCount;
if (head === tail) {
tail = (tail + 1) % samplesCount;
}
if (now - firstSampleTS < min) {
return;
}
const passed = startedAt && now - startedAt;
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
};
}
/* harmony default export */ var helpers_speedometer = (speedometer);
// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js
function progressEventReducer(listener, isDownloadStream) {
let bytesNotified = 0;
const _speedometer = helpers_speedometer(50, 250);
return e => {
const loaded = e.loaded;
const total = e.lengthComputable ? e.total : undefined;
const progressBytes = loaded - bytesNotified;
const rate = _speedometer(progressBytes);
const inRange = loaded <= total;
bytesNotified = loaded;
const data = {
loaded,
total,
progress: total ? (loaded / total) : undefined,
bytes: progressBytes,
rate: rate ? rate : undefined,
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
event: e
};
data[isDownloadStream ? 'download' : 'upload'] = true;
listener(data);
};
}
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
/* harmony default export */ var xhr = (isXHRAdapterSupported && function (config) {
return new Promise(function dispatchXhrRequest(resolve, reject) {
let requestData = config.data;
const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
let {responseType, withXSRFToken} = config;
let onCanceled;
function done() {
if (config.cancelToken) {
config.cancelToken.unsubscribe(onCanceled);
}
if (config.signal) {
config.signal.removeEventListener('abort', onCanceled);
}
}
let contentType;
if (utils["a" /* default */].isFormData(requestData)) {
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
requestHeaders.setContentType(false); // Let the browser set it
} else if ((contentType = requestHeaders.getContentType()) !== false) {
// fix semicolon duplication issue for ReactNative FormData implementation
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
}
}
let request = new XMLHttpRequest();
// HTTP basic authentication
if (config.auth) {
const username = config.auth.username || '';
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
}
const fullPath = buildFullPath(config.baseURL, config.url);
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
// Set the request timeout in MS
request.timeout = config.timeout;
function onloadend() {
if (!request) {
return;
}
// Prepare the response
const responseHeaders = core_AxiosHeaders.from(
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
);
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
request.responseText : request.response;
const response = {
data: responseData,
status: request.status,
statusText: request.statusText,
headers: responseHeaders,
config,
request
};
settle(function _resolve(value) {
resolve(value);
done();
}, function _reject(err) {
reject(err);
done();
}, response);
// Clean up request
request = null;
}
if ('onloadend' in request) {
// Use onloadend if available
request.onloadend = onloadend;
} else {
// Listen for ready state to emulate onloadend
request.onreadystatechange = function handleLoad() {
if (!request || request.readyState !== 4) {
return;
}
// The request errored out and we didn't get a response, this will be
// handled by onerror instead
// With one exception: request that using file: protocol, most browsers
// will return status as 0 even though it's a successful request
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
return;
}
// readystate handler is calling before onerror or ontimeout handlers,
// so we should call onloadend on the next 'tick'
setTimeout(onloadend);
};
}
// Handle browser request cancellation (as opposed to a manual cancellation)
request.onabort = function handleAbort() {
if (!request) {
return;
}
reject(new AxiosError["a" /* default */]('Request aborted', AxiosError["a" /* default */].ECONNABORTED, config, request));
// Clean up request
request = null;
};
// Handle low level network errors
request.onerror = function handleError() {
// Real errors are hidden from us by the browser
// onerror should only fire if it's a network error
reject(new AxiosError["a" /* default */]('Network Error', AxiosError["a" /* default */].ERR_NETWORK, config, request));
// Clean up request
request = null;
};
// Handle timeout
request.ontimeout = function handleTimeout() {
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
const transitional = config.transitional || defaults_transitional;
if (config.timeoutErrorMessage) {
timeoutErrorMessage = config.timeoutErrorMessage;
}
reject(new AxiosError["a" /* default */](
timeoutErrorMessage,
transitional.clarifyTimeoutError ? AxiosError["a" /* default */].ETIMEDOUT : AxiosError["a" /* default */].ECONNABORTED,
config,
request));
// Clean up request
request = null;
};
// Add xsrf header
// This is only done if running in a standard browser environment.
// Specifically not if we're in a web worker, or react-native.
if(platform.hasStandardBrowserEnv) {
withXSRFToken && utils["a" /* default */].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
if (withXSRFToken || (withXSRFToken !== false && helpers_isURLSameOrigin(fullPath))) {
// Add xsrf header
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
if (xsrfValue) {
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
}
}
}
// Remove Content-Type if data is undefined
requestData === undefined && requestHeaders.setContentType(null);
// Add headers to the request
if ('setRequestHeader' in request) {
utils["a" /* default */].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
request.setRequestHeader(key, val);
});
}
// Add withCredentials to request if needed
if (!utils["a" /* default */].isUndefined(config.withCredentials)) {
request.withCredentials = !!config.withCredentials;
}
// Add responseType to request if needed
if (responseType && responseType !== 'json') {
request.responseType = config.responseType;
}
// Handle progress if needed
if (typeof config.onDownloadProgress === 'function') {
request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
}
// Not all browsers support upload events
if (typeof config.onUploadProgress === 'function' && request.upload) {
request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
}
if (config.cancelToken || config.signal) {
// Handle cancellation
// eslint-disable-next-line func-names
onCanceled = cancel => {
if (!request) {
return;
}
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
request.abort();
request = null;
};
config.cancelToken && config.cancelToken.subscribe(onCanceled);
if (config.signal) {
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
}
}
const protocol = parseProtocol(fullPath);
if (protocol && platform.protocols.indexOf(protocol) === -1) {
reject(new AxiosError["a" /* default */]('Unsupported protocol ' + protocol + ':', AxiosError["a" /* default */].ERR_BAD_REQUEST, config));
return;
}
// Send the request
request.send(requestData || null);
});
});
// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/adapters.js
const knownAdapters = {
http: helpers_null["a" /* default */],
xhr: xhr
}
utils["a" /* default */].forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
}
});
const renderReason = (reason) => `- ${reason}`;
const isResolvedHandle = (adapter) => utils["a" /* default */].isFunction(adapter) || adapter === null || adapter === false;
/* harmony default export */ var adapters_adapters = ({
getAdapter: (adapters) => {
adapters = utils["a" /* default */].isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError["a" /* default */](`Unknown adapter '${id}'`);
}
}
if (adapter) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError["a" /* default */](
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
},
adapters: knownAdapters
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js
/**
* Throws a `CanceledError` if cancellation has been requested.
*
* @param {Object} config The config that is to be used for the request
*
* @returns {void}
*/
function throwIfCancellationRequested(config) {
if (config.cancelToken) {
config.cancelToken.throwIfRequested();
}
if (config.signal && config.signal.aborted) {
throw new cancel_CanceledError(null, config);
}
}
/**
* Dispatch a request to the server using the configured adapter.
*
* @param {object} config The config that is to be used for the request
*
* @returns {Promise} The Promise to be fulfilled
*/
function dispatchRequest(config) {
throwIfCancellationRequested(config);
config.headers = core_AxiosHeaders.from(config.headers);
// Transform request data
config.data = transformData.call(
config,
config.transformRequest
);
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
config.headers.setContentType('application/x-www-form-urlencoded', false);
}
const adapter = adapters_adapters.getAdapter(config.adapter || lib_defaults.adapter);
return adapter(config).then(function onAdapterResolution(response) {
throwIfCancellationRequested(config);
// Transform response data
response.data = transformData.call(
config,
config.transformResponse,
response
);
response.headers = core_AxiosHeaders.from(response.headers);
return response;
}, function onAdapterRejection(reason) {
if (!isCancel(reason)) {
throwIfCancellationRequested(config);
// Transform response data
if (reason && reason.response) {
reason.response.data = transformData.call(
config,
config.transformResponse,
reason.response
);
reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
}
}
return Promise.reject(reason);
});
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js
const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? thing.toJSON() : thing;
/**
* Config-specific merge-function which creates a new config-object
* by merging two configuration objects together.
*
* @param {Object} config1
* @param {Object} config2
*
* @returns {Object} New object resulting from merging config2 to config1
*/
function mergeConfig(config1, config2) {
// eslint-disable-next-line no-param-reassign
config2 = config2 || {};
const config = {};
function getMergedValue(target, source, caseless) {
if (utils["a" /* default */].isPlainObject(target) && utils["a" /* default */].isPlainObject(source)) {
return utils["a" /* default */].merge.call({caseless}, target, source);
} else if (utils["a" /* default */].isPlainObject(source)) {
return utils["a" /* default */].merge({}, source);
} else if (utils["a" /* default */].isArray(source)) {
return source.slice();
}
return source;
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, caseless) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(a, b, caseless);
} else if (!utils["a" /* default */].isUndefined(a)) {
return getMergedValue(undefined, a, caseless);
}
}
// eslint-disable-next-line consistent-return
function valueFromConfig2(a, b) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(undefined, b);
}
}
// eslint-disable-next-line consistent-return
function defaultToConfig2(a, b) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(undefined, b);
} else if (!utils["a" /* default */].isUndefined(a)) {
return getMergedValue(undefined, a);
}
}
// eslint-disable-next-line consistent-return
function mergeDirectKeys(a, b, prop) {
if (prop in config2) {
return getMergedValue(a, b);
} else if (prop in config1) {
return getMergedValue(undefined, a);
}
}
const mergeMap = {
url: valueFromConfig2,
method: valueFromConfig2,
data: valueFromConfig2,
baseURL: defaultToConfig2,
transformRequest: defaultToConfig2,
transformResponse: defaultToConfig2,
paramsSerializer: defaultToConfig2,
timeout: defaultToConfig2,
timeoutMessage: defaultToConfig2,
withCredentials: defaultToConfig2,
withXSRFToken: defaultToConfig2,
adapter: defaultToConfig2,
responseType: defaultToConfig2,
xsrfCookieName: defaultToConfig2,
xsrfHeaderName: defaultToConfig2,
onUploadProgress: defaultToConfig2,
onDownloadProgress: defaultToConfig2,
decompress: defaultToConfig2,
maxContentLength: defaultToConfig2,
maxBodyLength: defaultToConfig2,
beforeRedirect: defaultToConfig2,
transport: defaultToConfig2,
httpAgent: defaultToConfig2,
httpsAgent: defaultToConfig2,
cancelToken: defaultToConfig2,
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
};
utils["a" /* default */].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils["a" /* default */].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
return config;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
const VERSION = "1.6.2";
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
const validators = {};
// eslint-disable-next-line func-names
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
validators[type] = function validator(thing) {
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
};
});
const deprecatedWarnings = {};
/**
* Transitional option validator
*
* @param {function|boolean?} validator - set to false if the transitional option has been removed
* @param {string?} version - deprecated version / removed since version
* @param {string?} message - some message with additional info
*
* @returns {function}
*/
validators.transitional = function transitional(validator, version, message) {
function formatMessage(opt, desc) {
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
}
// eslint-disable-next-line func-names
return (value, opt, opts) => {
if (validator === false) {
throw new AxiosError["a" /* default */](
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
AxiosError["a" /* default */].ERR_DEPRECATED
);
}
if (version && !deprecatedWarnings[opt]) {
deprecatedWarnings[opt] = true;
// eslint-disable-next-line no-console
console.warn(
formatMessage(
opt,
' has been deprecated since v' + version + ' and will be removed in the near future'
)
);
}
return validator ? validator(value, opt, opts) : true;
};
};
/**
* Assert object's properties type
*
* @param {object} options
* @param {object} schema
* @param {boolean?} allowUnknown
*
* @returns {object}
*/
function assertOptions(options, schema, allowUnknown) {
if (typeof options !== 'object') {
throw new AxiosError["a" /* default */]('options must be an object', AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE);
}
const keys = Object.keys(options);
let i = keys.length;
while (i-- > 0) {
const opt = keys[i];
const validator = schema[opt];
if (validator) {
const value = options[opt];
const result = value === undefined || validator(value, opt, options);
if (result !== true) {
throw new AxiosError["a" /* default */]('option ' + opt + ' must be ' + result, AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE);
}
continue;
}
if (allowUnknown !== true) {
throw new AxiosError["a" /* default */]('Unknown option ' + opt, AxiosError["a" /* default */].ERR_BAD_OPTION);
}
}
}
/* harmony default export */ var helpers_validator = ({
assertOptions,
validators
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js
const Axios_validators = helpers_validator.validators;
/**
* Create a new instance of Axios
*
* @param {Object} instanceConfig The default config for the instance
*
* @return {Axios} A new instance of Axios
*/
class Axios_Axios {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.interceptors = {
request: new core_InterceptorManager(),
response: new core_InterceptorManager()
};
}
/**
* Dispatch a request
*
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
* @param {?Object} config
*
* @returns {Promise} The Promise to be fulfilled
*/
request(configOrUrl, config) {
/*eslint no-param-reassign:0*/
// Allow for axios('example/url'[, config]) a la fetch API
if (typeof configOrUrl === 'string') {
config = config || {};
config.url = configOrUrl;
} else {
config = configOrUrl || {};
}
config = mergeConfig(this.defaults, config);
const {transitional, paramsSerializer, headers} = config;
if (transitional !== undefined) {
helpers_validator.assertOptions(transitional, {
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
}, false);
}
if (paramsSerializer != null) {
if (utils["a" /* default */].isFunction(paramsSerializer)) {
config.paramsSerializer = {
serialize: paramsSerializer
}
} else {
helpers_validator.assertOptions(paramsSerializer, {
encode: Axios_validators.function,
serialize: Axios_validators.function
}, true);
}
}
// Set config.method
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
// Flatten headers
let contextHeaders = headers && utils["a" /* default */].merge(
headers.common,
headers[config.method]
);
headers && utils["a" /* default */].forEach(
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
(method) => {
delete headers[method];
}
);
config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
// filter out skipped interceptors
const requestInterceptorChain = [];
let synchronousRequestInterceptors = true;
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
return;
}
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
});
const responseInterceptorChain = [];
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
});
let promise;
let i = 0;
let len;
if (!synchronousRequestInterceptors) {
const chain = [dispatchRequest.bind(this), undefined];
chain.unshift.apply(chain, requestInterceptorChain);
chain.push.apply(chain, responseInterceptorChain);
len = chain.length;
promise = Promise.resolve(config);
while (i < len) {
promise = promise.then(chain[i++], chain[i++]);
}
return promise;
}
len = requestInterceptorChain.length;
let newConfig = config;
i = 0;
while (i < len) {
const onFulfilled = requestInterceptorChain[i++];
const onRejected = requestInterceptorChain[i++];
try {
newConfig = onFulfilled(newConfig);
} catch (error) {
onRejected.call(this, error);
break;
}
}
try {
promise = dispatchRequest.call(this, newConfig);
} catch (error) {
return Promise.reject(error);
}
i = 0;
len = responseInterceptorChain.length;
while (i < len) {
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
}
return promise;
}
getUri(config) {
config = mergeConfig(this.defaults, config);
const fullPath = buildFullPath(config.baseURL, config.url);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
// Provide aliases for supported request methods
utils["a" /* default */].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
/*eslint func-names:0*/
Axios_Axios.prototype[method] = function(url, config) {
return this.request(mergeConfig(config || {}, {
method,
url,
data: (config || {}).data
}));
};
});
utils["a" /* default */].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
/*eslint func-names:0*/
function generateHTTPMethod(isForm) {
return function httpMethod(url, data, config) {
return this.request(mergeConfig(config || {}, {
method,
headers: isForm ? {
'Content-Type': 'multipart/form-data'
} : {},
url,
data
}));
};
}
Axios_Axios.prototype[method] = generateHTTPMethod();
Axios_Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
});
/* harmony default export */ var core_Axios = (Axios_Axios);
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js
/**
* A `CancelToken` is an object that can be used to request cancellation of an operation.
*
* @param {Function} executor The executor function.
*
* @returns {CancelToken}
*/
class CancelToken_CancelToken {
constructor(executor) {
if (typeof executor !== 'function') {
throw new TypeError('executor must be a function.');
}
let resolvePromise;
this.promise = new Promise(function promiseExecutor(resolve) {
resolvePromise = resolve;
});
const token = this;
// eslint-disable-next-line func-names
this.promise.then(cancel => {
if (!token._listeners) return;
let i = token._listeners.length;
while (i-- > 0) {
token._listeners[i](cancel);
}
token._listeners = null;
});
// eslint-disable-next-line func-names
this.promise.then = onfulfilled => {
let _resolve;
// eslint-disable-next-line func-names
const promise = new Promise(resolve => {
token.subscribe(resolve);
_resolve = resolve;
}).then(onfulfilled);
promise.cancel = function reject() {
token.unsubscribe(_resolve);
};
return promise;
};
executor(function cancel(message, config, request) {
if (token.reason) {
// Cancellation has already been requested
return;
}
token.reason = new cancel_CanceledError(message, config, request);
resolvePromise(token.reason);
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason) {
throw this.reason;
}
}
/**
* Subscribe to the cancel signal
*/
subscribe(listener) {
if (this.reason) {
listener(this.reason);
return;
}
if (this._listeners) {
this._listeners.push(listener);
} else {
this._listeners = [listener];
}
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(listener) {
if (!this._listeners) {
return;
}
const index = this._listeners.indexOf(listener);
if (index !== -1) {
this._listeners.splice(index, 1);
}
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let cancel;
const token = new CancelToken_CancelToken(function executor(c) {
cancel = c;
});
return {
token,
cancel
};
}
}
/* harmony default export */ var cancel_CancelToken = (CancelToken_CancelToken);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js
/**
* Syntactic sugar for invoking a function and expanding an array for arguments.
*
* Common use case would be to use `Function.prototype.apply`.
*
* ```js
* function f(x, y, z) {}
* var args = [1, 2, 3];
* f.apply(null, args);
* ```
*
* With `spread` this example can be re-written.
*
* ```js
* spread(function(x, y, z) {})([1, 2, 3]);
* ```
*
* @param {Function} callback
*
* @returns {Function}
*/
function spread(callback) {
return function wrap(arr) {
return callback.apply(null, arr);
};
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js
/**
* Determines whether the payload is an error thrown by Axios
*
* @param {*} payload The value to test
*
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
*/
function isAxiosError(payload) {
return utils["a" /* default */].isObject(payload) && (payload.isAxiosError === true);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/HttpStatusCode.js
const HttpStatusCode = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
};
Object.entries(HttpStatusCode).forEach(([key, value]) => {
HttpStatusCode[value] = key;
});
/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js
/**
* Create an instance of Axios
*
* @param {Object} defaultConfig The default config for the instance
*
* @returns {Axios} A new instance of Axios
*/
function createInstance(defaultConfig) {
const context = new core_Axios(defaultConfig);
const instance = Object(bind["a" /* default */])(core_Axios.prototype.request, context);
// Copy axios.prototype to instance
utils["a" /* default */].extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
// Copy context to instance
utils["a" /* default */].extend(instance, context, null, {allOwnKeys: true});
// Factory for creating new instances
instance.create = function create(instanceConfig) {
return createInstance(mergeConfig(defaultConfig, instanceConfig));
};
return instance;
}
// Create the default instance to be exported
const axios = createInstance(lib_defaults);
// Expose Axios class to allow class inheritance
axios.Axios = core_Axios;
// Expose Cancel & CancelToken
axios.CanceledError = cancel_CanceledError;
axios.CancelToken = cancel_CancelToken;
axios.isCancel = isCancel;
axios.VERSION = VERSION;
axios.toFormData = toFormData["a" /* default */];
// Expose AxiosError class
axios.AxiosError = AxiosError["a" /* default */];
// alias for CanceledError for backward compatibility
axios.Cancel = axios.CanceledError;
// Expose all/spread
axios.all = function all(promises) {
return Promise.all(promises);
};
axios.spread = spread;
// Expose isAxiosError
axios.isAxiosError = isAxiosError;
// Expose mergeConfig
axios.mergeConfig = mergeConfig;
axios.AxiosHeaders = core_AxiosHeaders;
axios.formToJSON = thing => helpers_formDataToJSON(utils["a" /* default */].isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters_adapters.getAdapter;
axios.HttpStatusCode = helpers_HttpStatusCode;
axios.default = axios;
// this module should only have a default export
/* harmony default export */ var lib_axios = (axios);
// CONCATENATED MODULE: ./src/services/frappe.js
var getUrl = function getUrl(method) {
return "".concat(localStorage.getItem('appBaseUrl'), "/api/method/").concat(method);
};
var frappe_stringifyNestedObjects = function stringifyNestedObjects(input) {
if (Object(esm_typeof["a" /* default */])(input) === 'object' && input !== null) {
for (var key in input) {
if (Object(esm_typeof["a" /* default */])(input[key]) === 'object' && input[key] !== null) {
input[key] = JSON.stringify(input[key]);
}
}
}
return input;
};
var frappe_api = function api(_ref) {
var method = _ref.method,
_ref$args = _ref.args,
args = _ref$args === void 0 ? {} : _ref$args;
return new Promise(function (resolve, reject) {
var headers = {
'Content-Type': 'application/json'
};
var stringifiedArgs = frappe_stringifyNestedObjects(args);
lib_axios.post(getUrl(method), stringifiedArgs, {
headers: headers,
withCredentials: true
}).then(function (response) {
return resolve(response.data);
}).catch(function (error) {
return reject(error);
});
});
};
var frappe_fetch = function fetch(_ref2) {
var method = _ref2.method,
_ref2$args = _ref2.args,
args = _ref2$args === void 0 ? {} : _ref2$args;
return new Promise(function (resolve, reject) {
var headers = {
"Content-Type": "application/json"
};
lib_axios.get(getUrl(method), {
headers: headers,
withCredentials: true,
params: args
}).then(function (response) {
return resolve(response.data);
}).catch(function (error) {
return reject(error);
});
});
};
var fetchx = function fetchx(_ref3) {
var method = _ref3.method,
_ref3$args = _ref3.args,
args = _ref3$args === void 0 ? {} : _ref3$args;
return new Promise(function (resolve, reject) {
return x.call({
method: method,
type: 'GET',
args: args,
callback: resolve
});
});
};
var getFormConfiguration = function getFormConfiguration(_ref4) {
var _ref4$name = _ref4.name,
name = _ref4$name === void 0 ? "" : _ref4$name;
return frappe_fetch({
method: "clinical.api.forms.form_builder.get_form_configuration",
args: {
name: name
}
}).then(function (_ref5) {
var message = _ref5.message;
return message;
});
};
var deleteRepo = function deleteRepo(_ref6) {
var _ref6$name = _ref6.name,
name = _ref6$name === void 0 ? "" : _ref6$name;
return frappe_fetch({
method: "clinical.api.forms.form_builder.delete_repo",
args: {
name: name
}
}).then(function (_ref7) {
var message = _ref7.message;
return message;
});
};
var saveFormData = function saveFormData(_ref8) {
var formData = _ref8.formData;
return frappe_api({
method: "clinical.api.forms.form_builder.save_form_data",
args: {
form_data: formData
}
}).then(function (_ref9) {
var message = _ref9.message;
return message;
});
};
var notify = function notify(message) {//
};
var getList = function getList(payload) {
return frappe_api({
method: "mtrh_dev.api.supplier-portal.base.base.get_list",
args: {
payload: payload
}
});
};
var getDoctypeFields = function getDoctypeFields(payload) {
return frappe_api({
method: "clinical.api.doctype.meta.get_doctype_fields",
args: {
payload: payload
}
}).then(function (_ref10) {
var message = _ref10.message;
return message;
});
};
/***/ }),
/***/ "ee8f":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "f11f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var define = __webpack_require__("f367");
var getPolyfill = __webpack_require__("c8ba6");
module.exports = function shimAssign() {
var polyfill = getPolyfill();
define(
Object,
{ assign: polyfill },
{ assign: function () { return Object.assign !== polyfill; } }
);
return polyfill;
};
/***/ }),
/***/ "f1ae":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__("86cc");
var createDesc = __webpack_require__("4630");
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/***/ "f21c":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "f367":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var keys = __webpack_require__("d6c7");
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
var toStr = Object.prototype.toString;
var concat = Array.prototype.concat;
var origDefineProperty = Object.defineProperty;
var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
var obj = {};
try {
origDefineProperty(obj, 'x', { enumerable: false, value: obj });
// eslint-disable-next-line no-unused-vars, no-restricted-syntax
for (var _ in obj) { // jscs:ignore disallowUnusedVariables
return false;
}
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
};
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
return;
}
if (supportsDescriptors) {
origDefineProperty(object, name, {
configurable: true,
enumerable: false,
value: value,
writable: true
});
} else {
object[name] = value;
}
};
var defineProperties = function (object, map) {
var predicates = arguments.length > 2 ? arguments[2] : {};
var props = keys(map);
if (hasSymbols) {
props = concat.call(props, Object.getOwnPropertySymbols(map));
}
for (var i = 0; i < props.length; i += 1) {
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
}
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
/***/ }),
/***/ "f410":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("1af6");
module.exports = __webpack_require__("584a").Array.isArray;
/***/ }),
/***/ "f4e3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var forEach = __webpack_require__("bfad");
var availableTypedArrays = __webpack_require__("7226");
var callBound = __webpack_require__("545e");
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__("07a4")();
var g = typeof globalThis === 'undefined' ? global : globalThis;
var typedArrays = availableTypedArrays();
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
for (var i = 0; i < array.length; i += 1) {
if (array[i] === value) {
return i;
}
}
return -1;
};
var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__("1dd1");
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
forEach(typedArrays, function (typedArray) {
var arr = new g[typedArray]();
if (Symbol.toStringTag in arr) {
var proto = getPrototypeOf(arr);
var descriptor = gOPD(proto, Symbol.toStringTag);
if (!descriptor) {
var superProto = getPrototypeOf(proto);
descriptor = gOPD(superProto, Symbol.toStringTag);
}
toStrTags[typedArray] = descriptor.get;
}
});
}
var tryTypedArrays = function tryAllTypedArrays(value) {
var anyTrue = false;
forEach(toStrTags, function (getter, typedArray) {
if (!anyTrue) {
try {
anyTrue = getter.call(value) === typedArray;
} catch (e) { /**/ }
}
});
return anyTrue;
};
module.exports = function isTypedArray(value) {
if (!value || typeof value !== 'object') { return false; }
if (!hasToStringTag || !(Symbol.toStringTag in value)) {
var tag = $slice($toString(value), 8, -1);
return $indexOf(typedArrays, tag) > -1;
}
if (!gOPD) { return false; }
return tryTypedArrays(value);
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
/***/ }),
/***/ "f605":
/***/ (function(module, exports) {
module.exports = function (it, Constructor, name, forbiddenField) {
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
throw TypeError(name + ': incorrect invocation!');
} return it;
};
/***/ }),
/***/ "f751":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__("5ca1");
$export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
/***/ }),
/***/ "f772":
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "f921":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("014b");
__webpack_require__("c207");
__webpack_require__("69d3");
__webpack_require__("765d");
module.exports = __webpack_require__("584a").Symbol;
/***/ }),
/***/ "fa5b":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
/***/ }),
/***/ "fab2":
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__("7726").document;
module.exports = document && document.documentElement;
/***/ }),
/***/ "fae3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, "VueFormBuilderPlugin", function() { return /* reexport */ src_0["e" /* VueFormBuilderPlugin */]; });
__webpack_require__.d(__webpack_exports__, "FormBuilder", function() { return /* reexport */ src_0["c" /* FormBuilder */]; });
__webpack_require__.d(__webpack_exports__, "FormRenderer", function() { return /* reexport */ src_0["d" /* FormRenderer */]; });
__webpack_require__.d(__webpack_exports__, "BaseControlSkeleton", function() { return /* reexport */ src_0["b" /* BaseControlSkeleton */]; });
__webpack_require__.d(__webpack_exports__, "BaseControlConfigSkeleton", function() { return /* reexport */ src_0["a" /* BaseControlConfigSkeleton */]; });
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.
if (typeof window !== 'undefined') {
var currentScript = window.document.currentScript
if (true) {
var getCurrentScript = __webpack_require__("8875")
currentScript = getCurrentScript()
// for backward compatibility, because previously we directly included the polyfill
if (!('currentScript' in document)) {
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
}
}
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
if (src) {
__webpack_require__.p = src[1] // eslint-disable-line
}
}
// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);
// EXTERNAL MODULE: ./src/index.js
var src_0 = __webpack_require__("b635");
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
/***/ }),
/***/ "fbdb":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FormRenderer.vue?vue&type=template&id=4f505b3b&scoped=true&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:[_vm.styles.CONTAINER.FLUID, 'form-padding', 'vue-form-renderer']},[(_vm.formData.formConfig.renderFormTag)?_c('form',{attrs:{"action":_vm.formData.formConfig.formActionURL,"method":_vm.formData.formConfig.formMethod,"id":_vm.formTagId},on:{"submit":function($event){$event.preventDefault();}}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.formData.formConfig.isShowHeadline),expression:"formData.formConfig.isShowHeadline"}],staticClass:"form-headline-container"},[_c('h1',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.headline)}}),_c('p',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.subHeadline)}})]),_vm._l((_vm.sortedSections),function(sectionData){return _c('SectionContainer',{key:sectionData.uniqueId,attrs:{"parent":_vm.parent,"section":sectionData,"readonly":_vm.readonly,"reference":_vm.reference,"rows":_vm.formData.rows,"controls":_vm.formData.controls,"value-container":_vm.valueContainer,"dataInput":_vm.dataInput,"validation-errors":_vm.validationErrors}})})],2):[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.formData.formConfig.isShowHeadline),expression:"formData.formConfig.isShowHeadline"}],staticClass:"form-headline-container"},[_c('h1',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.headline)}}),_c('p',{domProps:{"textContent":_vm._s(_vm.formData.formConfig.subHeadline)}})]),_vm._l((_vm.sortedSections),function(sectionData){return _c('SectionContainer',{key:sectionData.uniqueId,attrs:{"section":sectionData,"readonly":_vm.readonly,"reference":_vm.reference,"parent":_vm.parent,"rows":_vm.formData.rows,"controls":_vm.formData.controls,"value-container":_vm.valueContainer,"validation-errors":_vm.validationErrors,"dataInput":_vm.dataInput}})})]],2)}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/components/FormRenderer.vue?vue&type=template&id=4f505b3b&scoped=true&
// EXTERNAL MODULE: ./src/mixins/form-renderer/model.js
var model = __webpack_require__("52d0");
// EXTERNAL MODULE: ./src/configs/global.js
var global = __webpack_require__("b1f2");
// CONCATENATED MODULE: ./src/mixins/form-renderer/configuration.js
/**
* Form-Renderer Configuration Handler
*/
var deepEqual = __webpack_require__("7fae"); // TO CHECK THE DEEPEST VALUES OF THE FORM...
var CONFIGURATION = {
props: {
formConfiguration: {
type: Object,
required: true
},
parent: {
type: String,
default: "Parent"
},
reference: {
type: Object,
default: null
},
dataInput: {
type: Array,
default: null
},
readonly: {
type: Boolean,
required: false
}
},
watch: {
/**
* Watching the configuration, if user change it => need to re-updated the form itself
*/
formConfiguration: {
deep: true,
handler: function handler(val) {
if (deepEqual(val, this.formData)) {
return;
}
this.mapping(val);
this.createValueContainer(val);
}
}
},
created: function created() {
this.mapping(this.formConfiguration);
},
computed: {
/**
* Get the <form> id
* @returns {string}
*/
formTagId: function formTagId() {
return global["a" /* GLOBAL_CONFIG */].rendererFormId;
}
}
};
// EXTERNAL MODULE: ./src/mixins/style-injection-mixin.js
var style_injection_mixin = __webpack_require__("28fe");
// EXTERNAL MODULE: ./src/mixins/form-builder/form-builder-methods.js + 1 modules
var form_builder_methods = __webpack_require__("bcc7");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.symbol.async-iterator.js
var es7_symbol_async_iterator = __webpack_require__("ac4d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.symbol.js
var es6_symbol = __webpack_require__("8a81");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.iterator.js
var es6_string_iterator = __webpack_require__("5df3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.from.js
var es6_array_from = __webpack_require__("1c4c");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.to-string.js
var es6_regexp_to_string = __webpack_require__("6b54");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
var es6_object_keys = __webpack_require__("456d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("7f7f");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("768b");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
var es6_array_iterator = __webpack_require__("cadf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.entries.js
var es7_object_entries = __webpack_require__("ffc1");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("ac6a");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d225");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/createClass.js
var createClass = __webpack_require__("b0b4");
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("bd86");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
var es6_regexp_replace = __webpack_require__("a481");
// EXTERNAL MODULE: ./src/configs/validation.js
var validation = __webpack_require__("a786");
// CONCATENATED MODULE: ./src/libraries/classes/validation-result.class.js
var validation_result_class_ValidationResult = /*#__PURE__*/function () {
function ValidationResult() {
Object(classCallCheck["a" /* default */])(this, ValidationResult);
Object(defineProperty["a" /* default */])(this, "hasError", false);
Object(defineProperty["a" /* default */])(this, "errorBuckets", {});
}
Object(createClass["a" /* default */])(ValidationResult, [{
key: "errors",
value:
/**
* Check if the validation is successfully or not
* @returns {boolean}
*/
function errors() {
return this.hasError;
}
/**
* Add error and generate error message
* @param {String} fieldName
* @param {ValidationRule} validationRule
*/
}, {
key: "addError",
value: function addError(fieldName, validationRule) {
this.hasError = true;
if (!this.errorBuckets[fieldName]) {
this.errorBuckets[fieldName] = [];
} // generate error message and add it
var errorMessage = validationRule.errorMessage || validation["a" /* VALIDATION_RULES */][validationRule.ruleType].errorMessage; // if it has replaceable variable => replace it (:mix, :max, :lol)
var replaceableVar = ":".concat(validationRule.ruleType);
if (errorMessage.indexOf(replaceableVar) >= 0) {
errorMessage = errorMessage.replace(replaceableVar, validationRule.additionalValue);
} // add the error message
this.errorBuckets[fieldName].push(errorMessage);
}
}]);
return ValidationResult;
}();
// CONCATENATED MODULE: ./src/libraries/validations/required.js
/**
* Require check for validation
* @param {any} fieldValue
* @return {boolean}
*/
function requiredRule(fieldValue) {
// for checkboxes / multiple dropdown
if (Array.isArray(fieldValue)) {
return fieldValue.length > 0;
} // for text/number/any...
if (fieldValue === "") {
return false;
}
return true;
}
// CONCATENATED MODULE: ./src/libraries/validations/min.js
/**
* Check min value for a field
* - Text => min length
* - Number => min value
* - Checkboxes => min selected items
* @param {any} fieldValue
* @param {number} constraintValue
* @return {boolean}
*/
function minRule(fieldValue, constraintValue) {
var minVal = parseInt(constraintValue); // let's check - first is array
if (Array.isArray(fieldValue)) {
return fieldValue.length >= minVal;
} // second, number
// second, number
if (typeof fieldValue === 'number') {
return fieldValue >= minVal;
} // lastly, string
return fieldValue.length >= minVal;
}
// CONCATENATED MODULE: ./src/libraries/validations/max.js
/**
* Check max value for a field
* - Text => max length
* - Number => max value
* - Checkboxes => max selected items
* @param {any} fieldValue
* @param {number} constraintValue
* @return {boolean}
*/
function maxRule(fieldValue, constraintValue) {
var minVal = parseInt(constraintValue); // let's check - first is array
if (Array.isArray(fieldValue)) {
return fieldValue.length <= minVal;
} // second, number
if (typeof fieldValue === 'number') {
return fieldValue <= minVal;
} // lastly, string
return fieldValue.length <= minVal;
}
// CONCATENATED MODULE: ./src/libraries/validations/is-email.js
/**
* Check if the field is truly email or not
* @param {any} fieldValue
* @return {boolean}
*/
function isEmailRule(fieldValue) {
var REGEX_RULE = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
return REGEX_RULE.test(fieldValue);
}
// CONCATENATED MODULE: ./src/libraries/validations/same-as.js
/**
* Same-As check (field must be same as another field in the form)
* @param {any} fieldValue
* @param {any} fieldToCheck
* @param {Object} valuesContainer
* @return {boolean}
*/
function sameAsRule(fieldValue, fieldToCheck, valuesContainer) {
if (!valuesContainer[fieldToCheck]) {
return false;
}
return fieldValue === valuesContainer[fieldToCheck];
}
// CONCATENATED MODULE: ./src/libraries/validations/custom-closure.js
/**
* Run custom closure of to check
* @param {any} fieldValue
* @param {any} customClosureName
* @param {Object} valuesContainer
* @param {Object} customClosures
* @return {boolean}
*/
function customClosureRule(fieldValue, customClosureName, valuesContainer, customClosures) {
// since there no closure registered, no need to run and it always true
if (typeof customClosures[customClosureName] !== 'function') {
console.error("Custom Validation Closure ".concat(customClosureName, " does not exists. Bypassed"));
return true;
}
var closure = customClosures[customClosureName];
/**
* Custom closure can access field value & valuesContainer as well
*/
var result = closure(fieldValue, valuesContainer); // because it might be null/undefined => falsy will be false
if (!result) {
return false;
}
return true;
}
// CONCATENATED MODULE: ./src/libraries/validation.js
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var validation_Validation = /*#__PURE__*/function () {
/**
* Validation Result. Always create a new instance every time the validation is run
* @type {ValidationResult}
*/
/**
* Create a new Validation handler
* @param {Object} valueContainer
* @param {Object} controls
* @param {Object} definedClosures
*/
function Validation(valueContainer, controls) {
var definedClosures = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
Object(classCallCheck["a" /* default */])(this, Validation);
Object(defineProperty["a" /* default */])(this, "rules", null);
Object(defineProperty["a" /* default */])(this, "valueContainer", null);
Object(defineProperty["a" /* default */])(this, "customClosures", {});
Object(defineProperty["a" /* default */])(this, "validationResult", null);
this.valueContainer = valueContainer;
this.validationClosures = definedClosures;
this.setRules(controls);
}
/**
* Set validation rules from the controls
* @param {{validations: ValidationRule[]}} controls
*/
Object(createClass["a" /* default */])(Validation, [{
key: "setRules",
value: function setRules(controls) {
var _this = this;
var rules = {}; // traversal all control and pick the validations info
Object.entries(controls).forEach(function (controlInfo) {
var _controlInfo = Object(slicedToArray["a" /* default */])(controlInfo, 2),
controlId = _controlInfo[0],
controlItem = _controlInfo[1];
var controlName = controlItem.name || controlId; // no name => this field didn't have value
if (!_this.valueContainer.hasOwnProperty(controlName)) {
return;
}
rules[controlName] = controlItem.validations;
});
this.rules = rules;
}
/**
* Start a validation check
* @return {ValidationResult}
*/
}, {
key: "run",
value: function run() {
this.validationResult = new validation_result_class_ValidationResult();
var controlKeys = Object.keys(this.rules);
for (var _i = 0, _controlKeys = controlKeys; _i < _controlKeys.length; _i++) {
var key = _controlKeys[_i];
// pickup basic data
var controlValue = this.valueContainer[key];
var controlRules = this.rules[key] || []; // no rule no run
if (!controlRules.length) {
continue;
}
/**
* start the validation process by each rules added for the control
*/
var _iterator = _createForOfIteratorHelper(controlRules),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var validationRule = _step.value;
var status = this._singleRuleRun(validationRule, controlValue);
if (!status) {
this.validationResult.addError(key, validationRule);
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return this.validationResult;
}
/**
* Run single rule to check
* @param {ValidationRule} validationRule
* @param {any} fieldValue
* @private
*/
}, {
key: "_singleRuleRun",
value: function _singleRuleRun(validationRule, fieldValue) {
switch (validationRule.ruleType) {
case "required":
return requiredRule(fieldValue);
case "min":
return minRule(fieldValue, validationRule.additionalValue);
case "max":
return maxRule(fieldValue, validationRule.additionalValue);
case "isEmail":
return isEmailRule(fieldValue);
case "sameAs":
return sameAsRule(fieldValue, validationRule.additionalValue, this.valueContainer);
case "customClosure":
return customClosureRule(fieldValue, validationRule.additionalValue, this.valueContainer, this.customClosures);
default:
throw new TypeError("This validation type ".concat(validationRule.ruleType, " is not supported."));
}
}
}]);
return Validation;
}();
// EXTERNAL MODULE: ./src/configs/events.js
var events = __webpack_require__("fbe6");
// EXTERNAL MODULE: ./src/libraries/alert-dialog.js
var alert_dialog = __webpack_require__("caca");
// CONCATENATED MODULE: ./src/mixins/form-renderer/validation.js
var VALIDATION_MIXIN = {
data: function data() {
return {
validationErrors: {}
};
},
methods: {
/**
* Run the validation process
*/
runValidation: function runValidation() {
// always clear validation before run...
this.$set(this, 'validationErrors', {}); // run the validation
var result = this.$form.Validation.run(); // field-error handling
if (result.errors()) {
// use set for reactive...
this.$set(this, 'validationErrors', result.errorBuckets);
if (this.$form.validationErrorShowAlert) {
alert_dialog["a" /* ALERT_DIALOG */].show(this.$form.validationErrorAlertText);
}
return;
} // ok emit to all listener if they want to know the validation is ok or not
this.$formEvent.$emit(events["a" /* EVENT_CONSTANTS */].RENDERER.VALIDATION_OK, true);
}
},
/**
* Dependencies Injection into the Form-Renderer.
*/
created: function created() {
// create validation instance
this.$form.Validation = new validation_Validation(this.valueContainer, this.formData.controls, this.$form.validationClosures || {}); // listen to validation invoke
this.$formEvent.$on(events["a" /* EVENT_CONSTANTS */].RENDERER.RUN_VALIDATION, this.runValidation);
}
};
// CONCATENATED MODULE: ./src/mixins/form-renderer-mixins.js
/* harmony default export */ var form_renderer_mixins = ([CONFIGURATION, model["a" /* MODEL */], style_injection_mixin["a" /* STYLE_INJECTION_MIXIN */], form_builder_methods["a" /* FORM_BUILDER_METHODS */], VALIDATION_MIXIN]);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"eabc5390-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/SectionContainer.vue?vue&type=template&id=386bb7b5&scoped=true&
var SectionContainervue_type_template_id_386bb7b5_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"section-container"},[_c(_vm.sectionViewComponent,{key:_vm.section.uniqueId,tag:"component",attrs:{"section":_vm.section,"rows":_vm.rows,"readonly":_vm.readonly,"controls":_vm.controls,"parent":_vm.parent,"reference":_vm.reference,"value-container":_vm.valueContainer,"dataInput":_vm.dataInput,"validation-errors":_vm.validationErrors}})],1)}
var SectionContainervue_type_template_id_386bb7b5_scoped_true_staticRenderFns = []
// CONCATENATED MODULE: ./src/views/renderer/SectionContainer.vue?vue&type=template&id=386bb7b5&scoped=true&
// EXTERNAL MODULE: ./src/configs/section.js + 92 modules
var section = __webpack_require__("dd3c");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/renderer/SectionContainer.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var SectionContainervue_type_script_lang_js_ = ({
name: "SectionContainer",
props: {
section: Object,
rows: Object,
controls: Object,
valueContainer: Object,
validationErrors: Object,
readonly: {
type: Boolean,
default: true
},
reference: Object,
parent: {
type: String,
default: "no parent"
},
dataInput: {
type: Object,
default: null
}
},
computed: {
sectionViewComponent: function sectionViewComponent() {
this.section.parent = this.parent;
return section["b" /* SECTION_TYPES */][this.section.type].rendererView;
}
}
});
// CONCATENATED MODULE: ./src/views/renderer/SectionContainer.vue?vue&type=script&lang=js&
/* harmony default export */ var renderer_SectionContainervue_type_script_lang_js_ = (SectionContainervue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");
// CONCATENATED MODULE: ./src/views/renderer/SectionContainer.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
renderer_SectionContainervue_type_script_lang_js_,
SectionContainervue_type_template_id_386bb7b5_scoped_true_render,
SectionContainervue_type_template_id_386bb7b5_scoped_true_staticRenderFns,
false,
null,
"386bb7b5",
null
)
/* harmony default export */ var SectionContainer = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FormRenderer.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var FormRenderervue_type_script_lang_js_ = ({
name: "FormRenderer",
components: {
SectionContainer: SectionContainer
},
mixins: form_renderer_mixins,
data: function data() {
return {
formData: null
};
}
});
// CONCATENATED MODULE: ./src/components/FormRenderer.vue?vue&type=script&lang=js&
/* harmony default export */ var components_FormRenderervue_type_script_lang_js_ = (FormRenderervue_type_script_lang_js_);
// CONCATENATED MODULE: ./src/components/FormRenderer.vue
/* normalize component */
var FormRenderer_component = Object(componentNormalizer["a" /* default */])(
components_FormRenderervue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
"4f505b3b",
null
)
/* harmony default export */ var FormRenderer = __webpack_exports__["a"] = (FormRenderer_component.exports);
/***/ }),
/***/ "fbe6":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EVENT_CONSTANTS; });
/**
* Event-Communication Constants in Vue-Form-Builder
* @author Phat Tran <phattranminh96@gmai.com>
*/
var EVENT_CONSTANTS = {
/**
* Constants for Form-Builder
*/
BUILDER: {
SECTION: {
ADDED_ROW: "builder.section.added_row",
DELETE: "builder.section.delete",
UPDATE: "builder.section.update",
// section sort
PUSH: "builder.section.push"
},
ROW: {
CREATE: "builder.row.create",
UPDATE: "builder.row.update",
DELETE: "builder.row.delete"
},
FORMULA: {
ADD: "builder.formula.add"
},
CONTROL: {
CREATE: "builder.control.create",
UPDATE: "builder.control.update",
DELETE: "builder.control.delete",
DELETED: "builder.control.deleted",
SORT: "builder.control.delete"
},
/**
* GLOBAL SIDEBAR EVENTS
*/
SIDEBAR: {
INJECT: "builder.sidebar.inject",
OPEN: "builder.sidebar.open",
OPENED: "builder.sidebar.opened",
SAVE: "builder.sidebar.save",
SAVE_AND_CLOSE: "builder.sidebar.save_and_close",
AFTER_CLOSED: "builder.sidebar.after_closed"
}
},
/**
* Constants for Form-Renderer
*/
RENDERER: {
RUN_VALIDATION: "renderer.run_validation",
VALIDATION_OK: "renderer.validation_ok"
}
};
/***/ }),
/***/ "fd13":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Map) {
// eslint-disable-next-line no-unused-vars
exported = function isMap(x) {
// `Map` is not present in this environment.
return false;
};
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$mapHas) {
// eslint-disable-next-line no-unused-vars
exported = function isMap(x) {
// `Map` does not have a `has` method
return false;
};
}
module.exports = exported || function isMap(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$mapHas.call(x);
if ($setHas) {
try {
$setHas.call(x);
} catch (e) {
return true;
}
}
return x instanceof $Map; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
};
/***/ }),
/***/ "fec5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toStr = Object.prototype.toString;
var hasSymbols = __webpack_require__("5156")();
if (hasSymbols) {
var symToStr = Symbol.prototype.toString;
var symStringRegex = /^Symbol\(.*\)$/;
var isSymbolObject = function isRealSymbolObject(value) {
if (typeof value.valueOf() !== 'symbol') {
return false;
}
return symStringRegex.test(symToStr.call(value));
};
module.exports = function isSymbol(value) {
if (typeof value === 'symbol') {
return true;
}
if (toStr.call(value) !== '[object Symbol]') {
return false;
}
try {
return isSymbolObject(value);
} catch (e) {
return false;
}
};
} else {
module.exports = function isSymbol(value) {
// this environment does not support Symbols.
return false && false;
};
}
/***/ }),
/***/ "ffc1":
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__("5ca1");
var $entries = __webpack_require__("504c")(true);
$export($export.S, 'Object', {
entries: function entries(it) {
return $entries(it);
}
});
/***/ })
/******/ });