diff --git a/README.md b/README.md
index b8beec8..13c237b 100644
--- a/README.md
+++ b/README.md
@@ -111,34 +111,35 @@ TIP: The default slot only renders **once** at the beginning, and it will overwr
# Props
-| Prop | Type | Default | Describe |
-| ---- | ---- | ------- | ------- |
-| watches | Array | `["source", "show", "toc"]` | HTML refresh automatically when the prop in this array changed |
-| source | String | `null` | the markdown source code |
-| show | Boolean | `true` | enable render to the default slot automatically |
-| html | Boolean | `true` | enable HTML syntax in source |
-| xhtml-out | Boolean | `true` | `
` => `
` |
-| breaks | Boolean | `true` | `\n` => `
` |
-| linkify | Boolean | `true` | autoconvert URL-like text to link |
-| emoji | Boolean | `true` | `:)` => `๐` |
-| typographer | Boolean | `true` | enable some language-neutral replacement and quotes beautification |
-| lang-prefix | String | `language-` | CSS language prefix for fenced blocks |
-| quotes | String | `โโโโ` | use `โโโโ` for Chinese, `โโโโ` for German, `ยซยปโโ` for Russian |
-| table-class | String | `table` | customize html class of the `
` |
-| task-lists | Boolean | `true` | enable GFM task list |
-| toc | Boolean | `false` | enable automatic table of contents |
-| toc-id | String | `undefined` | the HTML id to render TOC |
-| toc-class | String | `table` | customize html class of the `` wrapping the TOC |
-| toc-first-level | Number | `2` | use `2` if you want to skip `` from the TOC |
-| toc-last-level | Number | `'toc-first-level' + 1` | use `5` if you want to skip `` from the TOC |
-| toc-anchor-link | Boolean | `true` | enable the automatic anchor link in the headings |
-| toc-anchor-class | String | `toc-anchor` | customize the anchor class name |
-| toc-anchor-link-symbol | String | `#` | customize the anchor link symbol |
-| toc-anchor-link-space | Boolean | `true` | enable inserting a space between the anchor link and heading |
-| toc-anchor-link-class | String | `toc-anchor-link` | customize the anchor link symbol class name |
-| anchorAttributes | Object | `{}` | anchor tag attributes such as `target: '_blank'` or `rel: 'nofollow'` |
-| prerender | Function (String) String | `null` | filter function before markdown parse |
-| postrender | Function (String) String | `null` | filter function after markdown parse |
+| Prop | Type | Default | Describe |
+| ---------------------- | ------------------------ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
+| watches | Array | `["source", "show", "toc"]` | HTML refresh automatically when the prop in this array changed |
+| source | String | `null` | the markdown source code |
+| show | Boolean | `true` | enable render to the default slot automatically |
+| html | Boolean | `true` | enable HTML syntax in source |
+| xhtml-out | Boolean | `true` | `
` => `
` |
+| breaks | Boolean | `true` | `\n` => `
` |
+| linkify | Boolean | `true` | autoconvert URL-like text to link |
+| emoji | Boolean | `true` | `:)` => `๐` |
+| typographer | Boolean | `true` | enable some language-neutral replacement and quotes beautification |
+| update-prism | Boolean | `true` | if true, vue-markdown will automatically call a re-render of all code blocks through Prism.js ([Using Prism.js](#using-prism.js)) |
+| lang-prefix | String | `language-` | CSS language prefix for fenced blocks |
+| quotes | String | `โโโโ` | use `โโโโ` for Chinese, `โโโโ` for German, `ยซยปโโ` for Russian |
+| table-class | String | `table` | customize html class of the `
` |
+| task-lists | Boolean | `true` | enable GFM task list |
+| toc | Boolean | `false` | enable automatic table of contents |
+| toc-id | String | `undefined` | the HTML id to render TOC |
+| toc-class | String | `table` | customize html class of the `` wrapping the TOC |
+| toc-first-level | Number | `2` | use `2` if you want to skip `` from the TOC |
+| toc-last-level | Number | `'toc-first-level' + 1` | use `5` if you want to skip `` from the TOC |
+| toc-anchor-link | Boolean | `true` | enable the automatic anchor link in the headings |
+| toc-anchor-class | String | `toc-anchor` | customize the anchor class name |
+| toc-anchor-link-symbol | String | `#` | customize the anchor link symbol |
+| toc-anchor-link-space | Boolean | `true` | enable inserting a space between the anchor link and heading |
+| toc-anchor-link-class | String | `toc-anchor-link` | customize the anchor link symbol class name |
+| anchorAttributes | Object | `{}` | anchor tag attributes such as `target: '_blank'` or `rel: 'nofollow'` |
+| prerender | Function (String) String | `null` | filter function before markdown parse |
+| postrender | Function (String) String | `null` | filter function after markdown parse |
# Events
@@ -147,6 +148,13 @@ TIP: The default slot only renders **once** at the beginning, and it will overwr
| rendered | outHtml[String] | dispatch when render finish |
| toc-rendered | tocHtml[String] | dispatch when TOC render finish, never dispatch if the toc[prop] is `false` |
+# Using Prism.js
+
+1. Visit the [download page](https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript)
+2. Select all the options that apply for your project
+3. At the bottom of the page download both the JS and CSS
+4. Include them in your `index.html` **MAKE SURE to include Prism before your** `app.js`
+
# Thanks
- [markdown-it](https://github.com/markdown-it/markdown-it)
@@ -164,6 +172,7 @@ TIP: The default slot only renders **once** at the beginning, and it will overwr
- [printscreen](https://github.com/printscreen)
- [killix](https://github.com/killix)
- [LeFnord](https://github.com/lefnord)
+- [NoahCardoza](https://github.com/NoahCardoza)
# License
diff --git a/dist/vue-markdown.common.js b/dist/vue-markdown.common.js
index a5ee835..c6effae 100644
--- a/dist/vue-markdown.common.js
+++ b/dist/vue-markdown.common.js
@@ -1,5 +1,5 @@
/**
- * vue-markdown v2.2.4
+ * vue-markdown v2.2.5
* https://github.com/miaolz123/vue-markdown
* MIT License
*/
@@ -250,6 +250,10 @@ return /******/ (function(modules) { // webpackBootstrap
default: function _default(htmlData) {
return htmlData;
}
+ },
+ updatePrism: {
+ type: Boolean,
+ default: true
}
},
@@ -322,6 +326,13 @@ return /******/ (function(modules) { // webpackBootstrap
outHtml = this.postrender(outHtml);
this.$emit('rendered', outHtml);
+
+ if (this.updatePrism && window.Prism) {
+ this.$nextTick(function () {
+ Prism.highlightAllUnder(_this.$el);
+ });
+ }
+
return createElement('div', {
domProps: {
innerHTML: outHtml
diff --git a/dist/vue-markdown.js b/dist/vue-markdown.js
index 86d17d6..440ddb2 100644
--- a/dist/vue-markdown.js
+++ b/dist/vue-markdown.js
@@ -1,5 +1,5 @@
/**
- * vue-markdown v2.2.4
+ * vue-markdown v2.2.5
* https://github.com/miaolz123/vue-markdown
* MIT License
*/
@@ -271,6 +271,10 @@ return /******/ (function(modules) { // webpackBootstrap
default: function _default(htmlData) {
return htmlData;
}
+ },
+ updatePrism: {
+ type: Boolean,
+ default: true
}
},
@@ -343,6 +347,13 @@ return /******/ (function(modules) { // webpackBootstrap
outHtml = this.postrender(outHtml);
this.$emit('rendered', outHtml);
+
+ if (this.updatePrism && window.Prism) {
+ this.$nextTick(function () {
+ Prism.highlightAllUnder(_this.$el);
+ });
+ }
+
return createElement('div', {
domProps: {
innerHTML: outHtml
@@ -407,53 +418,61 @@ return /******/ (function(modules) { // webpackBootstrap
__webpack_require__(50);
module.exports = __webpack_require__(52);
+
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(5);
- var global = __webpack_require__(16)
- , hide = __webpack_require__(20)
- , Iterators = __webpack_require__(8)
- , TO_STRING_TAG = __webpack_require__(47)('toStringTag');
-
- for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype;
- if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ var global = __webpack_require__(16);
+ var hide = __webpack_require__(20);
+ var Iterators = __webpack_require__(8);
+ var TO_STRING_TAG = __webpack_require__(47)('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;
}
+
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var addToUnscopables = __webpack_require__(6)
- , step = __webpack_require__(7)
- , Iterators = __webpack_require__(8)
- , toIObject = __webpack_require__(9);
+ var addToUnscopables = __webpack_require__(6);
+ var step = __webpack_require__(7);
+ var Iterators = __webpack_require__(8);
+ var toIObject = __webpack_require__(9);
// 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__(13)(Array, 'Array', function(iterated, kind){
+ module.exports = __webpack_require__(13)(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
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
+ }, 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]);
+ if (kind == 'keys') return step(0, index);
+ if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
@@ -464,174 +483,185 @@ return /******/ (function(modules) { // webpackBootstrap
addToUnscopables('values');
addToUnscopables('entries');
+
/***/ }),
/* 6 */
/***/ (function(module, exports) {
- module.exports = function(){ /* empty */ };
+ module.exports = function () { /* empty */ };
+
/***/ }),
/* 7 */
/***/ (function(module, exports) {
- module.exports = function(done, value){
- return {value: value, done: !!done};
+ module.exports = function (done, value) {
+ return { value: value, done: !!done };
};
+
/***/ }),
/* 8 */
/***/ (function(module, exports) {
module.exports = {};
+
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(10)
- , defined = __webpack_require__(12);
- module.exports = function(it){
+ var IObject = __webpack_require__(10);
+ var defined = __webpack_require__(12);
+ module.exports = function (it) {
return IObject(defined(it));
};
+
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(11);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ // eslint-disable-next-line no-prototype-builtins
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
+
/***/ }),
/* 11 */
/***/ (function(module, exports) {
var toString = {}.toString;
- module.exports = function(it){
+ module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
+
/***/ }),
/* 12 */
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
- module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
+ module.exports = function (it) {
+ if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
+
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(14)
- , $export = __webpack_require__(15)
- , redefine = __webpack_require__(30)
- , hide = __webpack_require__(20)
- , has = __webpack_require__(31)
- , Iterators = __webpack_require__(8)
- , $iterCreate = __webpack_require__(32)
- , setToStringTag = __webpack_require__(46)
- , getPrototypeOf = __webpack_require__(48)
- , ITERATOR = __webpack_require__(47)('iterator')
- , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
- , FF_ITERATOR = '@@iterator'
- , KEYS = 'keys'
- , VALUES = 'values';
-
- var returnThis = function(){ return this; };
-
- module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ var LIBRARY = __webpack_require__(14);
+ var $export = __webpack_require__(15);
+ var redefine = __webpack_require__(31);
+ var hide = __webpack_require__(20);
+ var Iterators = __webpack_require__(8);
+ var $iterCreate = __webpack_require__(32);
+ var setToStringTag = __webpack_require__(46);
+ var getPrototypeOf = __webpack_require__(48);
+ var ITERATOR = __webpack_require__(47)('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 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'
- , DEF_VALUES = DEFAULT == VALUES
- , VALUES_BUG = false
- , proto = Base.prototype
- , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
- , $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
+ 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){
+ 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 && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ 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){
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
+ $default = function values() { return $native.call(this); };
}
// Define iterator
- if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if(DEFAULT){
+ Iterators[TAG] = returnThis;
+ if (DEFAULT) {
methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
+ 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]);
+ 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;
};
+
/***/ }),
/* 14 */
/***/ (function(module, exports) {
module.exports = true;
+
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16)
- , core = __webpack_require__(17)
- , ctx = __webpack_require__(18)
- , hide = __webpack_require__(20)
- , PROTOTYPE = 'prototype';
-
- var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , IS_WRAP = type & $export.W
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE]
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
- , key, own, out;
- if(IS_GLOBAL)source = name;
- for(key in source){
+ var global = __webpack_require__(16);
+ var core = __webpack_require__(17);
+ var ctx = __webpack_require__(18);
+ var hide = __webpack_require__(20);
+ var has = __webpack_require__(30);
+ 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 && key in exports)continue;
+ if (own && has(exports, key)) continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
@@ -639,11 +669,11 @@ return /******/ (function(modules) { // webpackBootstrap
// 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;
+ : 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);
@@ -654,10 +684,10 @@ return /******/ (function(modules) { // webpackBootstrap
// 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){
+ 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);
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
}
}
};
@@ -669,24 +699,29 @@ return /******/ (function(modules) { // webpackBootstrap
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
+ $export.R = 128; // real proto method for `library`
module.exports = $export;
+
/***/ }),
/* 16 */
/***/ (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 : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+ ? 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
+
/***/ }),
/* 17 */
/***/ (function(module, exports) {
- var core = module.exports = {version: '2.4.0'};
- if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+ var core = module.exports = { version: '2.5.7' };
+ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
+
/***/ }),
/* 18 */
@@ -694,127 +729,137 @@ return /******/ (function(modules) { // webpackBootstrap
// optional / simple context binding
var aFunction = __webpack_require__(19);
- module.exports = function(fn, that, length){
+ module.exports = function (fn, that, length) {
aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
+ if (that === undefined) return fn;
+ switch (length) {
+ case 1: return function (a) {
return fn.call(that, a);
};
- case 2: return function(a, b){
+ case 2: return function (a, b) {
return fn.call(that, a, b);
};
- case 3: return function(a, b, c){
+ case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
- return function(/* ...args */){
+ return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
+
/***/ }),
/* 19 */
/***/ (function(module, exports) {
- module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ module.exports = function (it) {
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
+
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21)
- , createDesc = __webpack_require__(29);
- module.exports = __webpack_require__(25) ? function(object, key, value){
+ var dP = __webpack_require__(21);
+ var createDesc = __webpack_require__(29);
+ module.exports = __webpack_require__(25) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
- } : function(object, key, value){
+ } : function (object, key, value) {
object[key] = value;
return object;
};
+
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22)
- , IE8_DOM_DEFINE = __webpack_require__(24)
- , toPrimitive = __webpack_require__(28)
- , dP = Object.defineProperty;
+ var anObject = __webpack_require__(22);
+ var IE8_DOM_DEFINE = __webpack_require__(24);
+ var toPrimitive = __webpack_require__(28);
+ var dP = Object.defineProperty;
- exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes){
+ exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
+ 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;
+ } 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;
};
+
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(23);
- module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
+ module.exports = function (it) {
+ if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
+
/***/ }),
/* 23 */
/***/ (function(module, exports) {
- module.exports = function(it){
+ module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
+
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function(){
- return Object.defineProperty(__webpack_require__(27)('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function () {
+ return Object.defineProperty(__webpack_require__(27)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
+
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(26)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ module.exports = !__webpack_require__(26)(function () {
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
+
/***/ }),
/* 26 */
/***/ (function(module, exports) {
- module.exports = function(exec){
+ module.exports = function (exec) {
try {
return !!exec();
- } catch(e){
+ } catch (e) {
return true;
}
};
+
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(23)
- , document = __webpack_require__(16).document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
- module.exports = function(it){
+ var isObject = __webpack_require__(23);
+ var document = __webpack_require__(16).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) : {};
};
+
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
@@ -823,81 +868,86 @@ return /******/ (function(modules) { // webpackBootstrap
var isObject = __webpack_require__(23);
// 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;
+ 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;
+ 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");
};
+
/***/ }),
/* 29 */
/***/ (function(module, exports) {
- module.exports = function(bitmap, value){
+ module.exports = function (bitmap, value) {
return {
- enumerable : !(bitmap & 1),
+ enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
+ writable: !(bitmap & 4),
+ value: value
};
};
-/***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(20);
/***/ }),
-/* 31 */
+/* 30 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
+ module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(20);
+
+
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var create = __webpack_require__(33)
- , descriptor = __webpack_require__(29)
- , setToStringTag = __webpack_require__(46)
- , IteratorPrototype = {};
+ var create = __webpack_require__(33);
+ var descriptor = __webpack_require__(29);
+ var setToStringTag = __webpack_require__(46);
+ var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(20)(IteratorPrototype, __webpack_require__(47)('iterator'), function(){ return this; });
+ __webpack_require__(20)(IteratorPrototype, __webpack_require__(47)('iterator'), function () { return this; });
- module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ module.exports = function (Constructor, NAME, next) {
+ Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
+
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(22)
- , dPs = __webpack_require__(34)
- , enumBugKeys = __webpack_require__(44)
- , IE_PROTO = __webpack_require__(41)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
+ var anObject = __webpack_require__(22);
+ var dPs = __webpack_require__(34);
+ var enumBugKeys = __webpack_require__(44);
+ var IE_PROTO = __webpack_require__(41)('IE_PROTO');
+ var Empty = function () { /* empty */ };
+ var PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function(){
+ var createDict = function () {
// Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(27)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
+ var iframe = __webpack_require__(27)('iframe');
+ var i = enumBugKeys.length;
+ var lt = '<';
+ var gt = '>';
+ var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(45).appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
@@ -908,15 +958,15 @@ return /******/ (function(modules) { // webpackBootstrap
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
+ while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
- module.exports = Object.create || function create(O, Properties){
+ module.exports = Object.create || function create(O, Properties) {
var result;
- if(O !== null){
+ if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
+ result = new Empty();
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
@@ -929,145 +979,163 @@ return /******/ (function(modules) { // webpackBootstrap
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21)
- , anObject = __webpack_require__(22)
- , getKeys = __webpack_require__(35);
+ var dP = __webpack_require__(21);
+ var anObject = __webpack_require__(22);
+ var getKeys = __webpack_require__(35);
- module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties){
+ module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
+ 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;
};
+
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(36)
- , enumBugKeys = __webpack_require__(44);
+ var $keys = __webpack_require__(36);
+ var enumBugKeys = __webpack_require__(44);
- module.exports = Object.keys || function keys(O){
+ module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
+
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
- var has = __webpack_require__(31)
- , toIObject = __webpack_require__(9)
- , arrayIndexOf = __webpack_require__(37)(false)
- , IE_PROTO = __webpack_require__(41)('IE_PROTO');
-
- module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ var has = __webpack_require__(30);
+ var toIObject = __webpack_require__(9);
+ var arrayIndexOf = __webpack_require__(37)(false);
+ var IE_PROTO = __webpack_require__(41)('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++])){
+ while (names.length > i) if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
+
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
- var toIObject = __webpack_require__(9)
- , toLength = __webpack_require__(38)
- , toIndex = __webpack_require__(40);
- module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
+ var toIObject = __webpack_require__(9);
+ var toLength = __webpack_require__(38);
+ var toAbsoluteIndex = __webpack_require__(40);
+ 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
- if(IS_INCLUDES && el != el)while(length > index){
+ // eslint-disable-next-line no-self-compare
+ if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
- if(value != value)return true;
- // Array#toIndex 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;
+ // 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;
};
};
+
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
- var toInteger = __webpack_require__(39)
- , min = Math.min;
- module.exports = function(it){
+ var toInteger = __webpack_require__(39);
+ var min = Math.min;
+ module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
+
/***/ }),
/* 39 */
/***/ (function(module, exports) {
// 7.1.4 ToInteger
- var ceil = Math.ceil
- , floor = Math.floor;
- module.exports = function(it){
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ module.exports = function (it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
+
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(39)
- , max = Math.max
- , min = Math.min;
- module.exports = function(index, length){
+ var toInteger = __webpack_require__(39);
+ 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);
};
+
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
- var shared = __webpack_require__(42)('keys')
- , uid = __webpack_require__(43);
- module.exports = function(key){
+ var shared = __webpack_require__(42)('keys');
+ var uid = __webpack_require__(43);
+ module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
+
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
- };
+ var core = __webpack_require__(17);
+ var global = __webpack_require__(16);
+ 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__(14) ? 'pure' : 'global',
+ copyright: 'ยฉ 2018 Denis Pushkarev (zloirock.ru)'
+ });
+
/***/ }),
/* 43 */
/***/ (function(module, exports) {
- var id = 0
- , px = Math.random();
- module.exports = function(key){
+ var id = 0;
+ var px = Math.random();
+ module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
+
/***/ }),
/* 44 */
/***/ (function(module, exports) {
@@ -1077,105 +1145,113 @@ return /******/ (function(modules) { // webpackBootstrap
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
+
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(16).document && document.documentElement;
+ var document = __webpack_require__(16).document;
+ module.exports = document && document.documentElement;
+
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
- var def = __webpack_require__(21).f
- , has = __webpack_require__(31)
- , TAG = __webpack_require__(47)('toStringTag');
+ var def = __webpack_require__(21).f;
+ var has = __webpack_require__(30);
+ var TAG = __webpack_require__(47)('toStringTag');
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ module.exports = function (it, tag, stat) {
+ if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
+
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__(42)('wks')
- , uid = __webpack_require__(43)
- , Symbol = __webpack_require__(16).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
+ var store = __webpack_require__(42)('wks');
+ var uid = __webpack_require__(43);
+ var Symbol = __webpack_require__(16).Symbol;
+ var USE_SYMBOL = typeof Symbol == 'function';
- var $exports = module.exports = function(name){
+ var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
+
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(31)
- , toObject = __webpack_require__(49)
- , IE_PROTO = __webpack_require__(41)('IE_PROTO')
- , ObjectProto = Object.prototype;
+ var has = __webpack_require__(30);
+ var toObject = __webpack_require__(49);
+ var IE_PROTO = __webpack_require__(41)('IE_PROTO');
+ var ObjectProto = Object.prototype;
- module.exports = Object.getPrototypeOf || function(O){
+ 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){
+ 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;
};
+
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(12);
- module.exports = function(it){
+ module.exports = function (it) {
return Object(defined(it));
};
+
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var $at = __webpack_require__(51)(true);
+ var $at = __webpack_require__(51)(true);
// 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(13)(String, 'String', function(iterated){
+ __webpack_require__(13)(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
- , index = this._i
- , point;
- if(index >= O.length)return {value: undefined, done: true};
+ }, 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};
+ return { value: point, done: false };
});
+
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(39)
- , defined = __webpack_require__(12);
+ var toInteger = __webpack_require__(39);
+ var defined = __webpack_require__(12);
// true -> String#at
// false -> String#codePointAt
- module.exports = function(TO_STRING){
- return function(that, pos){
- var s = String(defined(that))
- , i = toInteger(pos)
- , l = s.length
- , a, b;
- if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ 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
@@ -1183,49 +1259,52 @@ return /******/ (function(modules) { // webpackBootstrap
};
};
+
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22)
- , get = __webpack_require__(53);
- module.exports = __webpack_require__(17).getIterator = function(it){
+ var anObject = __webpack_require__(22);
+ var get = __webpack_require__(53);
+ module.exports = __webpack_require__(17).getIterator = function (it) {
var iterFn = get(it);
- if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
+ if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
+
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(54)
- , ITERATOR = __webpack_require__(47)('iterator')
- , Iterators = __webpack_require__(8);
- module.exports = __webpack_require__(17).getIteratorMethod = function(it){
- if(it != undefined)return it[ITERATOR]
+ var classof = __webpack_require__(54);
+ var ITERATOR = __webpack_require__(47)('iterator');
+ var Iterators = __webpack_require__(8);
+ module.exports = __webpack_require__(17).getIteratorMethod = function (it) {
+ if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
+
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(11)
- , TAG = __webpack_require__(47)('toStringTag')
- // ES3 wrong here
- , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+ var cof = __webpack_require__(11);
+ var TAG = __webpack_require__(47)('toStringTag');
+ // ES3 wrong here
+ var ARG = cof(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
- var tryGet = function(it, key){
+ var tryGet = function (it, key) {
try {
return it[key];
- } catch(e){ /* empty */ }
+ } catch (e) { /* empty */ }
};
- module.exports = function(it){
+ module.exports = function (it) {
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
@@ -1236,6 +1315,7 @@ return /******/ (function(modules) { // webpackBootstrap
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
+
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
@@ -1249,35 +1329,38 @@ return /******/ (function(modules) { // webpackBootstrap
__webpack_require__(57);
module.exports = __webpack_require__(17).Object.keys;
+
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(49)
- , $keys = __webpack_require__(35);
+ var toObject = __webpack_require__(49);
+ var $keys = __webpack_require__(35);
- __webpack_require__(58)('keys', function(){
- return function keys(it){
+ __webpack_require__(58)('keys', function () {
+ return function keys(it) {
return $keys(toObject(it));
};
});
+
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(15)
- , core = __webpack_require__(17)
- , fails = __webpack_require__(26);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
+ var $export = __webpack_require__(15);
+ var core = __webpack_require__(17);
+ var fails = __webpack_require__(26);
+ 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);
+ $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
};
+
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
@@ -2174,7 +2257,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 64 */
/***/ (function(module, exports) {
- module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
+ module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
/***/ }),
/* 65 */
@@ -11046,7 +11129,13 @@ return /******/ (function(modules) { // webpackBootstrap
} else if (clone.__isDate(parent)) {
child = new Date(parent.getTime());
} else if (useBuffer && Buffer.isBuffer(parent)) {
- child = new Buffer(parent.length);
+ 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)) {
@@ -13010,68 +13099,102 @@ return /******/ (function(modules) { // webpackBootstrap
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 placeHoldersCount (b64) {
+ function getLens (b64) {
var len = b64.length
+
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
- // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
- return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
+ // 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) {
- // base64 is 4/3 + up to two characters of the original data
- return (b64.length * 3 / 4) - placeHoldersCount(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 i, l, tmp, placeHolders, arr
- var len = b64.length
- placeHolders = placeHoldersCount(b64)
+ var tmp
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
- arr = new Arr((len * 3 / 4) - placeHolders)
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+ var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
- l = placeHolders > 0 ? len - 4 : len
+ var len = placeHoldersLen > 0
+ ? validLen - 4
+ : validLen
- var L = 0
+ for (var 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
+ }
- for (i = 0; i < l; 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[L++] = (tmp >> 16) & 0xFF
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = tmp & 0xFF
+ if (placeHoldersLen === 2) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 2) |
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[curByte++] = tmp & 0xFF
}
- if (placeHolders === 2) {
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[L++] = tmp & 0xFF
- } else if (placeHolders === 1) {
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = 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]
+ 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) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ tmp =
+ ((uint8[i] << 16) & 0xFF0000) +
+ ((uint8[i + 1] << 8) & 0xFF00) +
+ (uint8[i + 2] & 0xFF)
output.push(tripletToBase64(tmp))
}
return output.join('')
@@ -13081,31 +13204,34 @@ return /******/ (function(modules) { // webpackBootstrap
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var output = ''
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)))
+ 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]
- output += lookup[tmp >> 2]
- output += lookup[(tmp << 4) & 0x3F]
- output += '=='
+ parts.push(
+ lookup[tmp >> 2] +
+ lookup[(tmp << 4) & 0x3F] +
+ '=='
+ )
} else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
- output += lookup[tmp >> 10]
- output += lookup[(tmp >> 4) & 0x3F]
- output += lookup[(tmp << 2) & 0x3F]
- output += '='
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 10] +
+ lookup[(tmp >> 4) & 0x3F] +
+ lookup[(tmp << 2) & 0x3F] +
+ '='
+ )
}
- parts.push(output)
-
return parts.join('')
}
@@ -13116,7 +13242,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
- var eLen = nBytes * 8 - mLen - 1
+ var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
@@ -13129,12 +13255,12 @@ return /******/ (function(modules) { // webpackBootstrap
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+ 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) {}
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
@@ -13149,7 +13275,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
- var eLen = nBytes * 8 - mLen - 1
+ 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)
@@ -13182,7 +13308,7 @@ return /******/ (function(modules) { // webpackBootstrap
m = 0
e = eMax
} else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen)
+ m = ((value * c) - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
@@ -22295,20 +22421,16 @@ return /******/ (function(modules) { // webpackBootstrap
/* 176 */
/***/ (function(module, exports) {
- /** @flow */
-
- "use strict";
-
function getRelocatable(re) {
// In the future, this could use a WeakMap instead of an expando.
if (!re.__matchAtRelocatable) {
// Disjunctions are the lowest-precedence operator, so we can make any
// pattern match the empty string by appending `|()` to it:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-patterns
- var source = re.source + "|()";
+ var source = re.source + '|()';
// We always make the new regex global.
- var flags = "g" + (re.ignoreCase ? "i" : "") + (re.multiline ? "m" : "") + (re.unicode ? "u" : "")
+ var flags = 'g' + (re.ignoreCase ? 'i' : '') + (re.multiline ? 'm' : '') + (re.unicode ? 'u' : '')
// sticky (/.../y) doesn't make sense in conjunction with our relocation
// logic, so we ignore it here.
;
@@ -22320,7 +22442,7 @@ return /******/ (function(modules) { // webpackBootstrap
function matchAt(re, str, pos) {
if (re.global || re.sticky) {
- throw new Error("matchAt(...): Only non-global regexes are supported");
+ throw new Error('matchAt(...): Only non-global regexes are supported');
}
var reloc = getRelocatable(re);
reloc.lastIndex = pos;
@@ -22349,11 +22471,13 @@ return /******/ (function(modules) { // webpackBootstrap
var disableCheckboxes = true;
var useLabelWrapper = false;
+ var useLabelAfter = false;
module.exports = function(md, options) {
if (options) {
disableCheckboxes = !options.enabled;
useLabelWrapper = !!options.label;
+ useLabelAfter = !!options.labelAfter;
}
md.core.ruler.after('inline', 'github-task-lists', function(state) {
@@ -22402,8 +22526,17 @@ return /******/ (function(modules) { // webpackBootstrap
token.content = token.content.slice(3);
if (useLabelWrapper) {
- token.children.unshift(beginLabel(TokenConstructor));
- token.children.push(endLabel(TokenConstructor));
+ if (useLabelAfter) {
+ token.children.pop();
+
+ // Use large random number as id property of the checkbox.
+ var id = 'task-item-' + Math.ceil(Math.random() * (10000 * 1000) - 1000);
+ token.children[0].content = token.children[0].content.slice(0, -1) + ' id="' + id + '">';
+ token.children.push(afterLabel(token.content, id, TokenConstructor));
+ } else {
+ token.children.unshift(beginLabel(TokenConstructor));
+ token.children.push(endLabel(TokenConstructor));
+ }
}
}
@@ -22432,6 +22565,13 @@ return /******/ (function(modules) { // webpackBootstrap
return token;
}
+ function afterLabel(content, id, TokenConstructor) {
+ var token = new TokenConstructor('html_inline', '', 0);
+ token.content = '';
+ token.attrs = [{for: id}];
+ return token;
+ }
+
function isInline(token) { return token.type === 'inline'; }
function isParagraph(token) { return token.type === 'paragraph_open'; }
function isListItem(token) { return token.type === 'list_item_open'; }
diff --git a/src/VueMarkdown.js b/src/VueMarkdown.js
index 16ec570..43669d3 100644
--- a/src/VueMarkdown.js
+++ b/src/VueMarkdown.js
@@ -128,7 +128,11 @@ export default {
postrender: {
type: Function,
default: (htmlData) => { return htmlData }
- }
+ },
+ updatePrism: {
+ type: Boolean,
+ default: true,
+ },
},
computed: {
@@ -209,6 +213,13 @@ export default {
outHtml = this.postrender(outHtml);
this.$emit('rendered', outHtml)
+
+ if (this.updatePrism && window.Prism){
+ this.$nextTick(() => {
+ Prism.highlightAllUnder(this.$el)
+ })
+ }
+
return createElement(
'div', {
domProps: {