Last active
February 22, 2018 15:33
-
-
Save thheller/7f43caf785f1846ef6d0cd05a7bcbabc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shadow$provide.module$node_modules$quill$dist$quill = function($global$$, $require$$, $module$jscomp$0$$, $exports$jscomp$0$$) { | |
(function($root$$, $factory$$) { | |
"object" === typeof $exports$jscomp$0$$ && "object" === typeof $module$jscomp$0$$ ? $module$jscomp$0$$.exports = $factory$$() : "function" === typeof define && define.amd ? define([], $factory$$) : "object" === typeof $exports$jscomp$0$$ ? $exports$jscomp$0$$.Quill = $factory$$() : $root$$.Quill = $factory$$(); | |
})(this, function() { | |
return function($modules$$) { | |
function $__webpack_require__$$($moduleId$$) { | |
if ($installedModules$$[$moduleId$$]) { | |
return $installedModules$$[$moduleId$$].exports; | |
} | |
var $module$$ = $installedModules$$[$moduleId$$] = {i:$moduleId$$, l:!1, exports:{}}; | |
$modules$$[$moduleId$$].call($module$$.exports, $module$$, $module$$.exports, $__webpack_require__$$); | |
$module$$.l = !0; | |
return $module$$.exports; | |
} | |
var $installedModules$$ = {}; | |
$__webpack_require__$$.m = $modules$$; | |
$__webpack_require__$$.c = $installedModules$$; | |
$__webpack_require__$$.d = function($modules$$, $installedModules$$, $getter$$) { | |
$__webpack_require__$$.o($modules$$, $installedModules$$) || Object.defineProperty($modules$$, $installedModules$$, {configurable:!1, enumerable:!0, get:$getter$$}); | |
}; | |
$__webpack_require__$$.n = function($modules$$) { | |
var $installedModules$$ = $modules$$ && $modules$$.__esModule ? function() { | |
return $modules$$["default"]; | |
} : function() { | |
return $modules$$; | |
}; | |
$__webpack_require__$$.d($installedModules$$, "a", $installedModules$$); | |
return $installedModules$$; | |
}; | |
$__webpack_require__$$.o = function($modules$$, $installedModules$$) { | |
return Object.prototype.hasOwnProperty.call($modules$$, $installedModules$$); | |
}; | |
$__webpack_require__$$.p = ""; | |
return $__webpack_require__$$($__webpack_require__$$.s = 109); | |
}([function($container_1_module$$, $exports$$, $Registry___webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$container_1_module$$ = $Registry___webpack_require__$$(17); | |
var $format_1$$ = $Registry___webpack_require__$$(18), $leaf_1$$ = $Registry___webpack_require__$$(19), $scroll_1$$ = $Registry___webpack_require__$$(45), $inline_1$$ = $Registry___webpack_require__$$(46), $block_1$$ = $Registry___webpack_require__$$(47), $embed_1$$ = $Registry___webpack_require__$$(48), $text_1$$ = $Registry___webpack_require__$$(49), $attributor_1$$ = $Registry___webpack_require__$$(12), $class_1$$ = $Registry___webpack_require__$$(31), $style_1$$ = $Registry___webpack_require__$$(32), | |
$store_1$$ = $Registry___webpack_require__$$(30); | |
$Registry___webpack_require__$$ = $Registry___webpack_require__$$(1); | |
$exports$$.default = {Scope:$Registry___webpack_require__$$.Scope, create:$Registry___webpack_require__$$.create, find:$Registry___webpack_require__$$.find, query:$Registry___webpack_require__$$.query, register:$Registry___webpack_require__$$.register, Container:$container_1_module$$.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}}; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
function $find$$($classes$$, $attributes$$) { | |
void 0 === $attributes$$ && ($attributes$$ = !1); | |
return null == $classes$$ ? null : null != $classes$$[$exports$$.DATA_KEY] ? $classes$$[$exports$$.DATA_KEY].blot : $attributes$$ ? $find$$($classes$$.parentNode, $attributes$$) : null; | |
} | |
function $query$jscomp$0$$($ParchmentError$$, $module$$) { | |
void 0 === $module$$ && ($module$$ = $Scope$$.ANY); | |
if ("string" === typeof $ParchmentError$$) { | |
var $query$$ = $types$$[$ParchmentError$$] || $attributes$$[$ParchmentError$$]; | |
} else { | |
if ($ParchmentError$$ instanceof Text || $ParchmentError$$.nodeType === Node.TEXT_NODE) { | |
$query$$ = $types$$.text; | |
} else { | |
if ("number" === typeof $ParchmentError$$) { | |
$ParchmentError$$ & $Scope$$.LEVEL & $Scope$$.BLOCK ? $query$$ = $types$$.block : $ParchmentError$$ & $Scope$$.LEVEL & $Scope$$.INLINE && ($query$$ = $types$$.inline); | |
} else { | |
if ($ParchmentError$$ instanceof HTMLElement) { | |
var $__webpack_require__$$ = ($ParchmentError$$.getAttribute("class") || "").split(/\s+/), $scope$$; | |
for ($scope$$ in $__webpack_require__$$) { | |
if ($query$$ = $classes$$[$__webpack_require__$$[$scope$$]]) { | |
break; | |
} | |
} | |
$query$$ = $query$$ || $tags$$[$ParchmentError$$.tagName]; | |
} | |
} | |
} | |
} | |
return null == $query$$ ? null : $module$$ & $Scope$$.LEVEL & $query$$.scope && $module$$ & $Scope$$.TYPE & $query$$.scope ? $query$$ : null; | |
} | |
function $register$$() { | |
for (var $Scope$$ = [], $module$$ = 0; $module$$ < arguments.length; $module$$++) { | |
$Scope$$[$module$$] = arguments[$module$$]; | |
} | |
if (1 < $Scope$$.length) { | |
return $Scope$$.map(function($classes$$) { | |
return $register$$($classes$$); | |
}); | |
} | |
var $__webpack_require__$$ = $Scope$$[0]; | |
if ("string" !== typeof $__webpack_require__$$.blotName && "string" !== typeof $__webpack_require__$$.attrName) { | |
throw new $ParchmentError$$("Invalid definition"); | |
} | |
if ("abstract" === $__webpack_require__$$.blotName) { | |
throw new $ParchmentError$$("Cannot register abstract class"); | |
} | |
$types$$[$__webpack_require__$$.blotName || $__webpack_require__$$.attrName] = $__webpack_require__$$; | |
"string" === typeof $__webpack_require__$$.keyName ? $attributes$$[$__webpack_require__$$.keyName] = $__webpack_require__$$ : (null != $__webpack_require__$$.className && ($classes$$[$__webpack_require__$$.className] = $__webpack_require__$$), null != $__webpack_require__$$.tagName && (Array.isArray($__webpack_require__$$.tagName) ? $__webpack_require__$$.tagName = $__webpack_require__$$.tagName.map(function($classes$$) { | |
return $classes$$.toUpperCase(); | |
}) : $__webpack_require__$$.tagName = $__webpack_require__$$.tagName.toUpperCase(), (Array.isArray($__webpack_require__$$.tagName) ? $__webpack_require__$$.tagName : [$__webpack_require__$$.tagName]).forEach(function($classes$$) { | |
if (null == $tags$$[$classes$$] || null == $__webpack_require__$$.className) { | |
$tags$$[$classes$$] = $__webpack_require__$$; | |
} | |
}))); | |
return $__webpack_require__$$; | |
} | |
var $__extends$$ = this && this.__extends || function() { | |
var $classes$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($classes$$, $attributes$$) { | |
$classes$$.__proto__ = $attributes$$; | |
} || function($classes$$, $attributes$$) { | |
for (var $tags$$ in $attributes$$) { | |
$attributes$$.hasOwnProperty($tags$$) && ($classes$$[$tags$$] = $attributes$$[$tags$$]); | |
} | |
}; | |
return function($attributes$$, $tags$$) { | |
function $ParchmentError$$() { | |
this.constructor = $attributes$$; | |
} | |
$classes$$($attributes$$, $tags$$); | |
$attributes$$.prototype = null === $tags$$ ? Object.create($tags$$) : ($ParchmentError$$.prototype = $tags$$.prototype, new $ParchmentError$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $ParchmentError$$ = function($classes$$) { | |
function $attributes$$($attributes$$) { | |
$attributes$$ = "[Parchment] " + $attributes$$; | |
var $tags$$ = $classes$$.call(this, $attributes$$) || this; | |
$tags$$.message = $attributes$$; | |
$tags$$.name = $tags$$.constructor.name; | |
return $tags$$; | |
} | |
$__extends$$($attributes$$, $classes$$); | |
return $attributes$$; | |
}(Error); | |
$exports$$.ParchmentError = $ParchmentError$$; | |
var $attributes$$ = {}, $classes$$ = {}, $tags$$ = {}, $types$$ = {}; | |
$exports$$.DATA_KEY = "__blot"; | |
var $Scope$$; | |
(function($classes$$) { | |
$classes$$[$classes$$.TYPE = 3] = "TYPE"; | |
$classes$$[$classes$$.LEVEL = 12] = "LEVEL"; | |
$classes$$[$classes$$.ATTRIBUTE = 13] = "ATTRIBUTE"; | |
$classes$$[$classes$$.BLOT = 14] = "BLOT"; | |
$classes$$[$classes$$.INLINE = 7] = "INLINE"; | |
$classes$$[$classes$$.BLOCK = 11] = "BLOCK"; | |
$classes$$[$classes$$.BLOCK_BLOT = 10] = "BLOCK_BLOT"; | |
$classes$$[$classes$$.INLINE_BLOT = 6] = "INLINE_BLOT"; | |
$classes$$[$classes$$.BLOCK_ATTRIBUTE = 9] = "BLOCK_ATTRIBUTE"; | |
$classes$$[$classes$$.INLINE_ATTRIBUTE = 5] = "INLINE_ATTRIBUTE"; | |
$classes$$[$classes$$.ANY = 15] = "ANY"; | |
})($Scope$$ = $exports$$.Scope || ($exports$$.Scope = {})); | |
$exports$$.create = function($classes$$, $attributes$$) { | |
var $tags$$ = $query$jscomp$0$$($classes$$); | |
if (null == $tags$$) { | |
throw new $ParchmentError$$("Unable to create " + $classes$$ + " blot"); | |
} | |
$classes$$ = $classes$$ instanceof Node || $classes$$.nodeType === Node.TEXT_NODE ? $classes$$ : $tags$$.create($attributes$$); | |
return new $tags$$($classes$$, $attributes$$); | |
}; | |
$exports$$.find = $find$$; | |
$exports$$.query = $query$jscomp$0$$; | |
$exports$$.register = $register$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
var $diff$$ = $__webpack_require__$$(51), $equal$$ = $__webpack_require__$$(11), $extend$$ = $__webpack_require__$$(3), $op$$ = $__webpack_require__$$(20), $NULL_CHARACTER$$ = String.fromCharCode(0), $Delta$$ = function($ops$$) { | |
Array.isArray($ops$$) ? this.ops = $ops$$ : null != $ops$$ && Array.isArray($ops$$.ops) ? this.ops = $ops$$.ops : this.ops = []; | |
}; | |
$Delta$$.prototype.insert = function($text$$, $Delta$$) { | |
var $attributes$$ = {}; | |
if (0 === $text$$.length) { | |
return this; | |
} | |
$attributes$$.insert = $text$$; | |
null != $Delta$$ && "object" === typeof $Delta$$ && 0 < Object.keys($Delta$$).length && ($attributes$$.attributes = $Delta$$); | |
return this.push($attributes$$); | |
}; | |
$Delta$$.prototype["delete"] = function($length$$) { | |
return 0 >= $length$$ ? this : this.push({"delete":$length$$}); | |
}; | |
$Delta$$.prototype.retain = function($length$jscomp$17_newOp$$, $Delta$$) { | |
if (0 >= $length$jscomp$17_newOp$$) { | |
return this; | |
} | |
$length$jscomp$17_newOp$$ = {retain:$length$jscomp$17_newOp$$}; | |
null != $Delta$$ && "object" === typeof $Delta$$ && 0 < Object.keys($Delta$$).length && ($length$jscomp$17_newOp$$.attributes = $Delta$$); | |
return this.push($length$jscomp$17_newOp$$); | |
}; | |
$Delta$$.prototype.push = function($newOp$$) { | |
var $Delta$$ = this.ops.length, $NULL_CHARACTER$$ = this.ops[$Delta$$ - 1]; | |
$newOp$$ = $extend$$(!0, {}, $newOp$$); | |
if ("object" === typeof $NULL_CHARACTER$$) { | |
if ("number" === typeof $newOp$$["delete"] && "number" === typeof $NULL_CHARACTER$$["delete"]) { | |
return this.ops[$Delta$$ - 1] = {"delete":$NULL_CHARACTER$$["delete"] + $newOp$$["delete"]}, this; | |
} | |
if ("number" === typeof $NULL_CHARACTER$$["delete"] && null != $newOp$$.insert && (--$Delta$$, $NULL_CHARACTER$$ = this.ops[$Delta$$ - 1], "object" !== typeof $NULL_CHARACTER$$)) { | |
return this.ops.unshift($newOp$$), this; | |
} | |
if ($equal$$($newOp$$.attributes, $NULL_CHARACTER$$.attributes)) { | |
if ("string" === typeof $newOp$$.insert && "string" === typeof $NULL_CHARACTER$$.insert) { | |
return this.ops[$Delta$$ - 1] = {insert:$NULL_CHARACTER$$.insert + $newOp$$.insert}, "object" === typeof $newOp$$.attributes && (this.ops[$Delta$$ - 1].attributes = $newOp$$.attributes), this; | |
} | |
if ("number" === typeof $newOp$$.retain && "number" === typeof $NULL_CHARACTER$$.retain) { | |
return this.ops[$Delta$$ - 1] = {retain:$NULL_CHARACTER$$.retain + $newOp$$.retain}, "object" === typeof $newOp$$.attributes && (this.ops[$Delta$$ - 1].attributes = $newOp$$.attributes), this; | |
} | |
} | |
} | |
$Delta$$ === this.ops.length ? this.ops.push($newOp$$) : this.ops.splice($Delta$$, 0, $newOp$$); | |
return this; | |
}; | |
$Delta$$.prototype.chop = function() { | |
var $lastOp$$ = this.ops[this.ops.length - 1]; | |
$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 $Delta$$ = [], $NULL_CHARACTER$$ = []; | |
this.forEach(function($passed$$) { | |
($predicate$$($passed$$) ? $Delta$$ : $NULL_CHARACTER$$).push($passed$$); | |
}); | |
return [$Delta$$, $NULL_CHARACTER$$]; | |
}; | |
$Delta$$.prototype.reduce = function($predicate$$, $Delta$$) { | |
return this.ops.reduce($predicate$$, $Delta$$); | |
}; | |
$Delta$$.prototype.changeLength = function() { | |
return this.reduce(function($length$$, $Delta$$) { | |
return $Delta$$.insert ? $length$$ + $op$$.length($Delta$$) : $Delta$$.delete ? $length$$ - $Delta$$.delete : $length$$; | |
}, 0); | |
}; | |
$Delta$$.prototype.length = function() { | |
return this.reduce(function($length$$, $Delta$$) { | |
return $length$$ + $op$$.length($Delta$$); | |
}, 0); | |
}; | |
$Delta$$.prototype.slice = function($start$$, $end$$) { | |
$start$$ = $start$$ || 0; | |
"number" !== typeof $end$$ && ($end$$ = Infinity); | |
for (var $NULL_CHARACTER$$ = [], $iter$$ = $op$$.iterator(this.ops), $__webpack_require__$$ = 0; $__webpack_require__$$ < $end$$ && $iter$$.hasNext();) { | |
if ($__webpack_require__$$ < $start$$) { | |
var $module$$ = $iter$$.next($start$$ - $__webpack_require__$$); | |
} else { | |
$module$$ = $iter$$.next($end$$ - $__webpack_require__$$), $NULL_CHARACTER$$.push($module$$); | |
} | |
$__webpack_require__$$ += $op$$.length($module$$); | |
} | |
return new $Delta$$($NULL_CHARACTER$$); | |
}; | |
$Delta$$.prototype.compose = function($other$$) { | |
var $thisIter$$ = $op$$.iterator(this.ops); | |
$other$$ = $op$$.iterator($other$$.ops); | |
for (var $NULL_CHARACTER$$ = new $Delta$$; $thisIter$$.hasNext() || $other$$.hasNext();) { | |
if ("insert" === $other$$.peekType()) { | |
$NULL_CHARACTER$$.push($other$$.next()); | |
} else { | |
if ("delete" === $thisIter$$.peekType()) { | |
$NULL_CHARACTER$$.push($thisIter$$.next()); | |
} else { | |
var $attributes$jscomp$4_length$$ = Math.min($thisIter$$.peekLength(), $other$$.peekLength()), $__webpack_require__$$ = $thisIter$$.next($attributes$jscomp$4_length$$), $module$$ = $other$$.next($attributes$jscomp$4_length$$); | |
if ("number" === typeof $module$$.retain) { | |
var $extend$$ = {}; | |
"number" === typeof $__webpack_require__$$.retain ? $extend$$.retain = $attributes$jscomp$4_length$$ : $extend$$.insert = $__webpack_require__$$.insert; | |
if ($attributes$jscomp$4_length$$ = $op$$.attributes.compose($__webpack_require__$$.attributes, $module$$.attributes, "number" === typeof $__webpack_require__$$.retain)) { | |
$extend$$.attributes = $attributes$jscomp$4_length$$; | |
} | |
$NULL_CHARACTER$$.push($extend$$); | |
} else { | |
"number" === typeof $module$$["delete"] && "number" === typeof $__webpack_require__$$.retain && $NULL_CHARACTER$$.push($module$$); | |
} | |
} | |
} | |
} | |
return $NULL_CHARACTER$$.chop(); | |
}; | |
$Delta$$.prototype.concat = function($other$$) { | |
var $delta$$ = new $Delta$$(this.ops.slice()); | |
0 < $other$$.ops.length && ($delta$$.push($other$$.ops[0]), $delta$$.ops = $delta$$.ops.concat($other$$.ops.slice(1))); | |
return $delta$$; | |
}; | |
$Delta$$.prototype.diff = function($other$$, $diffResult_index$$) { | |
if (this.ops === $other$$.ops) { | |
return new $Delta$$; | |
} | |
var $__webpack_require__$$ = [this, $other$$].map(function($Delta$$) { | |
return $Delta$$.map(function($diffResult_index$$) { | |
if (null != $diffResult_index$$.insert) { | |
return "string" === typeof $diffResult_index$$.insert ? $diffResult_index$$.insert : $NULL_CHARACTER$$; | |
} | |
throw Error("diff() called " + ($Delta$$ === $other$$ ? "on" : "with") + " non-document"); | |
}).join(""); | |
}), $delta$jscomp$0$$ = new $Delta$$; | |
$diffResult_index$$ = $diff$$($__webpack_require__$$[0], $__webpack_require__$$[1], $diffResult_index$$); | |
var $module$$ = $op$$.iterator(this.ops), $otherIter$$ = $op$$.iterator($other$$.ops); | |
$diffResult_index$$.forEach(function($other$$) { | |
for (var $Delta$$ = $other$$[1].length; 0 < $Delta$$;) { | |
var $diffResult_index$$ = 0; | |
switch($other$$[0]) { | |
case $diff$$.INSERT: | |
$diffResult_index$$ = Math.min($otherIter$$.peekLength(), $Delta$$); | |
$delta$jscomp$0$$.push($otherIter$$.next($diffResult_index$$)); | |
break; | |
case $diff$$.DELETE: | |
$diffResult_index$$ = Math.min($Delta$$, $module$$.peekLength()); | |
$module$$.next($diffResult_index$$); | |
$delta$jscomp$0$$["delete"]($diffResult_index$$); | |
break; | |
case $diff$$.EQUAL: | |
$diffResult_index$$ = Math.min($module$$.peekLength(), $otherIter$$.peekLength(), $Delta$$); | |
var $NULL_CHARACTER$$ = $module$$.next($diffResult_index$$), $__webpack_require__$$ = $otherIter$$.next($diffResult_index$$); | |
if ($equal$$($NULL_CHARACTER$$.insert, $__webpack_require__$$.insert)) { | |
$delta$jscomp$0$$.retain($diffResult_index$$, $op$$.attributes.diff($NULL_CHARACTER$$.attributes, $__webpack_require__$$.attributes)); | |
} else { | |
$delta$jscomp$0$$.push($__webpack_require__$$)["delete"]($diffResult_index$$); | |
} | |
} | |
$Delta$$ -= $diffResult_index$$; | |
} | |
}); | |
return $delta$jscomp$0$$.chop(); | |
}; | |
$Delta$$.prototype.eachLine = function($predicate$$, $newline$$) { | |
$newline$$ = $newline$$ || "\n"; | |
for (var $NULL_CHARACTER$$ = $op$$.iterator(this.ops), $line$$ = new $Delta$$, $__webpack_require__$$ = 0; $NULL_CHARACTER$$.hasNext();) { | |
if ("insert" !== $NULL_CHARACTER$$.peekType()) { | |
return; | |
} | |
var $module$$ = $NULL_CHARACTER$$.peek(), $extend$$ = $op$$.length($module$$) - $NULL_CHARACTER$$.peekLength(); | |
$module$$ = "string" === typeof $module$$.insert ? $module$$.insert.indexOf($newline$$, $extend$$) - $extend$$ : -1; | |
if (0 > $module$$) { | |
$line$$.push($NULL_CHARACTER$$.next()); | |
} else { | |
if (0 < $module$$) { | |
$line$$.push($NULL_CHARACTER$$.next($module$$)); | |
} else { | |
if (!1 === $predicate$$($line$$, $NULL_CHARACTER$$.next(1).attributes || {}, $__webpack_require__$$)) { | |
return; | |
} | |
$__webpack_require__$$ += 1; | |
$line$$ = new $Delta$$; | |
} | |
} | |
} | |
0 < $line$$.length() && $predicate$$($line$$, {}, $__webpack_require__$$); | |
}; | |
$Delta$$.prototype.transform = function($other$jscomp$6_otherIter$$, $priority$$) { | |
$priority$$ = !!$priority$$; | |
if ("number" === typeof $other$jscomp$6_otherIter$$) { | |
return this.transformPosition($other$jscomp$6_otherIter$$, $priority$$); | |
} | |
var $NULL_CHARACTER$$ = $op$$.iterator(this.ops); | |
$other$jscomp$6_otherIter$$ = $op$$.iterator($other$jscomp$6_otherIter$$.ops); | |
for (var $delta$$ = new $Delta$$; $NULL_CHARACTER$$.hasNext() || $other$jscomp$6_otherIter$$.hasNext();) { | |
if ("insert" !== $NULL_CHARACTER$$.peekType() || !$priority$$ && "insert" === $other$jscomp$6_otherIter$$.peekType()) { | |
if ("insert" === $other$jscomp$6_otherIter$$.peekType()) { | |
$delta$$.push($other$jscomp$6_otherIter$$.next()); | |
} else { | |
var $__webpack_require__$$ = Math.min($NULL_CHARACTER$$.peekLength(), $other$jscomp$6_otherIter$$.peekLength()), $module$$ = $NULL_CHARACTER$$.next($__webpack_require__$$), $extend$$ = $other$jscomp$6_otherIter$$.next($__webpack_require__$$); | |
$module$$["delete"] || ($extend$$["delete"] ? $delta$$.push($extend$$) : $delta$$.retain($__webpack_require__$$, $op$$.attributes.transform($module$$.attributes, $extend$$.attributes, $priority$$))); | |
} | |
} else { | |
$delta$$.retain($op$$.length($NULL_CHARACTER$$.next())); | |
} | |
} | |
return $delta$$.chop(); | |
}; | |
$Delta$$.prototype.transformPosition = function($index$$, $Delta$$) { | |
$Delta$$ = !!$Delta$$; | |
for (var $NULL_CHARACTER$$ = $op$$.iterator(this.ops), $priority$$ = 0; $NULL_CHARACTER$$.hasNext() && $priority$$ <= $index$$;) { | |
var $__webpack_require__$$ = $NULL_CHARACTER$$.peekLength(), $module$$ = $NULL_CHARACTER$$.peekType(); | |
$NULL_CHARACTER$$.next(); | |
"delete" === $module$$ ? $index$$ -= Math.min($__webpack_require__$$, $index$$ - $priority$$) : ("insert" === $module$$ && ($priority$$ < $index$$ || !$Delta$$) && ($index$$ += $__webpack_require__$$), $priority$$ += $__webpack_require__$$); | |
} | |
return $index$$; | |
}; | |
$module$$.exports = $Delta$$; | |
}, function($module$$, $exports$$) { | |
var $hasOwn$$ = Object.prototype.hasOwnProperty, $toStr$$ = Object.prototype.toString, $isArray$$ = function($hasOwn$$) { | |
return "function" === typeof Array.isArray ? Array.isArray($hasOwn$$) : "[object Array]" === $toStr$$.call($hasOwn$$); | |
}, $isPlainObject$$ = function($module$$) { | |
if (!$module$$ || "[object Object]" !== $toStr$$.call($module$$)) { | |
return !1; | |
} | |
var $hasOwnConstructor$$ = $hasOwn$$.call($module$$, "constructor"), $hasIsPrototypeOf$$ = $module$$.constructor && $module$$.constructor.prototype && $hasOwn$$.call($module$$.constructor.prototype, "isPrototypeOf"); | |
if ($module$$.constructor && !$hasOwnConstructor$$ && !$hasIsPrototypeOf$$) { | |
return !1; | |
} | |
for (var $key$$ in $module$$) { | |
} | |
return "undefined" === typeof $key$$ || $hasOwn$$.call($module$$, $key$$); | |
}; | |
$module$$.exports = function $extend$$() { | |
var $name$$, $copyIsArray$$, $target$$ = arguments[0], $hasOwn$$ = 1, $module$$ = arguments.length, $deep$$ = !1; | |
"boolean" === typeof $target$$ && ($deep$$ = $target$$, $target$$ = arguments[1] || {}, $hasOwn$$ = 2); | |
if (null == $target$$ || "object" !== typeof $target$$ && "function" !== typeof $target$$) { | |
$target$$ = {}; | |
} | |
for (; $hasOwn$$ < $module$$; ++$hasOwn$$) { | |
var $options$$ = arguments[$hasOwn$$]; | |
if (null != $options$$) { | |
for ($name$$ in $options$$) { | |
var $clone_src$$ = $target$$[$name$$]; | |
var $copy$$ = $options$$[$name$$]; | |
$target$$ !== $copy$$ && ($deep$$ && $copy$$ && ($isPlainObject$$($copy$$) || ($copyIsArray$$ = $isArray$$($copy$$))) ? ($copyIsArray$$ ? ($copyIsArray$$ = !1, $clone_src$$ = $clone_src$$ && $isArray$$($clone_src$$) ? $clone_src$$ : []) : $clone_src$$ = $clone_src$$ && $isPlainObject$$($clone_src$$) ? $clone_src$$ : {}, $target$$[$name$$] = $extend$$($deep$$, $clone_src$$, $copy$$)) : "undefined" !== typeof $copy$$ && ($target$$[$name$$] = $copy$$)); | |
} | |
} | |
} | |
return $target$$; | |
}; | |
}, function($_break__extend__inline__inline2__parchment__quillDelta_module$$, $exports$$, $__webpack_require__$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_createClass$$) { | |
if (!($_get$$ instanceof $_createClass$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_createClass$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_createClass$$ || "object" !== typeof $_createClass$$ && "function" !== typeof $_createClass$$ ? $_get$$ : $_createClass$$; | |
} | |
function $_inherits$$($_get$$, $_createClass$$) { | |
if ("function" !== typeof $_createClass$$ && null !== $_createClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_createClass$$); | |
} | |
$_get$$.prototype = Object.create($_createClass$$ && $_createClass$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_createClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_createClass$$) : $_get$$.__proto__ = $_createClass$$); | |
} | |
function $bubbleFormats$$($_get$$) { | |
var $_createClass$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; | |
if (null == $_get$$) { | |
return $_createClass$$; | |
} | |
"function" === typeof $_get$$.formats && ($_createClass$$ = (0, $_extend2$$.default)($_createClass$$, $_get$$.formats())); | |
return null == $_get$$.parent || "scroll" == $_get$$.parent.blotName || $_get$$.parent.statics.scope !== $_get$$.statics.scope ? $_createClass$$ : $bubbleFormats$$($_get$$.parent, $_createClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.BlockEmbed = $exports$$.bubbleFormats = void 0; | |
var $_createClass$$ = function() { | |
function $_get$$($_get$$, $_createClass$$) { | |
for (var $bubbleFormats$$ = 0; $bubbleFormats$$ < $_createClass$$.length; $bubbleFormats$$++) { | |
var $_extend2$$ = $_createClass$$[$bubbleFormats$$]; | |
$_extend2$$.enumerable = $_extend2$$.enumerable || !1; | |
$_extend2$$.configurable = !0; | |
"value" in $_extend2$$ && ($_extend2$$.writable = !0); | |
Object.defineProperty($_get$$, $_extend2$$.key, $_extend2$$); | |
} | |
} | |
return function($_createClass$$, $bubbleFormats$$, $_extend2$$) { | |
$bubbleFormats$$ && $_get$$($_createClass$$.prototype, $bubbleFormats$$); | |
$_extend2$$ && $_get$$($_createClass$$, $_extend2$$); | |
return $_createClass$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_createClass$$, $bubbleFormats$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_extend2$$ = Object.getOwnPropertyDescriptor($_get$$, $_createClass$$); | |
if (void 0 === $_extend2$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_createClass$$, $bubbleFormats$$); | |
} | |
} else { | |
if ("value" in $_extend2$$) { | |
return $_extend2$$.value; | |
} | |
$_createClass$$ = $_extend2$$.get; | |
return void 0 === $_createClass$$ ? void 0 : $_createClass$$.call($bubbleFormats$$); | |
} | |
}; | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $__webpack_require__$$(3); | |
var $_extend2$$ = $_interopRequireDefault$$($_break__extend__inline__inline2__parchment__quillDelta_module$$); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $__webpack_require__$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_break__extend__inline__inline2__parchment__quillDelta_module$$); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $__webpack_require__$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_break__extend__inline__inline2__parchment__quillDelta_module$$); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $__webpack_require__$$(16); | |
var $_break2$$ = $_interopRequireDefault$$($_break__extend__inline__inline2__parchment__quillDelta_module$$); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $__webpack_require__$$(6); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $_interopRequireDefault$$($_break__extend__inline__inline2__parchment__quillDelta_module$$); | |
$__webpack_require__$$ = $__webpack_require__$$(7); | |
$__webpack_require__$$ = $_interopRequireDefault$$($__webpack_require__$$); | |
var $BlockEmbed$$ = function($bubbleFormats$$) { | |
function $__webpack_require__$$() { | |
$_classCallCheck$$(this, $__webpack_require__$$); | |
return $_possibleConstructorReturn$$(this, ($__webpack_require__$$.__proto__ || Object.getPrototypeOf($__webpack_require__$$)).apply(this, arguments)); | |
} | |
$_inherits$$($__webpack_require__$$, $bubbleFormats$$); | |
$_createClass$$($__webpack_require__$$, [{key:"attach", value:function() { | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "attach", this).call(this); | |
this.attributes = new $_parchment2$$.default.Attributor.Store(this.domNode); | |
}}, {key:"delta", value:function() { | |
return (new $_quillDelta2$$.default).insert(this.value(), (0, $_extend2$$.default)(this.formats(), this.attributes.values())); | |
}}, {key:"format", value:function($_get$$, $_createClass$$) { | |
$_get$$ = $_parchment2$$.default.query($_get$$, $_parchment2$$.default.Scope.BLOCK_ATTRIBUTE); | |
null != $_get$$ && this.attributes.attribute($_get$$, $_createClass$$); | |
}}, {key:"formatAt", value:function($_get$$, $_createClass$$, $bubbleFormats$$, $_extend2$$) { | |
this.format($bubbleFormats$$, $_extend2$$); | |
}}, {key:"insertAt", value:function($_createClass$$, $bubbleFormats$$, $_extend2$$) { | |
"string" === typeof $bubbleFormats$$ && $bubbleFormats$$.endsWith("\n") ? ($_extend2$$ = $_parchment2$$.default.create($Block$$.blotName), this.parent.insertBefore($_extend2$$, 0 === $_createClass$$ ? this : this.next), $_extend2$$.insertAt(0, $bubbleFormats$$.slice(0, -1))) : $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "insertAt", this).call(this, $_createClass$$, $bubbleFormats$$, $_extend2$$); | |
}}]); | |
return $__webpack_require__$$; | |
}($_parchment2$$.default.Embed); | |
$BlockEmbed$$.scope = $_parchment2$$.default.Scope.BLOCK_BLOT; | |
var $Block$$ = function($_extend2$$) { | |
function $__webpack_require__$$($_get$$) { | |
$_classCallCheck$$(this, $__webpack_require__$$); | |
$_get$$ = $_possibleConstructorReturn$$(this, ($__webpack_require__$$.__proto__ || Object.getPrototypeOf($__webpack_require__$$)).call(this, $_get$$)); | |
$_get$$.cache = {}; | |
return $_get$$; | |
} | |
$_inherits$$($__webpack_require__$$, $_extend2$$); | |
$_createClass$$($__webpack_require__$$, [{key:"delta", value:function() { | |
null == this.cache.delta && (this.cache.delta = this.descendants($_parchment2$$.default.Leaf).reduce(function($_get$$, $_createClass$$) { | |
return 0 === $_createClass$$.length() ? $_get$$ : $_get$$.insert($_createClass$$.value(), $bubbleFormats$$($_createClass$$)); | |
}, new $_quillDelta2$$.default).insert("\n", $bubbleFormats$$(this))); | |
return this.cache.delta; | |
}}, {key:"deleteAt", value:function($_createClass$$, $_extend2$$) { | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "deleteAt", this).call(this, $_createClass$$, $_extend2$$); | |
this.cache = {}; | |
}}, {key:"formatAt", value:function($_createClass$$, $_extend2$$, $bubbleFormats$$, $_break__extend__inline__inline2__parchment__quillDelta_module$$) { | |
0 >= $_extend2$$ || ($_parchment2$$.default.query($bubbleFormats$$, $_parchment2$$.default.Scope.BLOCK) ? $_createClass$$ + $_extend2$$ === this.length() && this.format($bubbleFormats$$, $_break__extend__inline__inline2__parchment__quillDelta_module$$) : $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "formatAt", this).call(this, $_createClass$$, Math.min($_extend2$$, this.length() - $_createClass$$ - 1), $bubbleFormats$$, $_break__extend__inline__inline2__parchment__quillDelta_module$$), | |
this.cache = {}); | |
}}, {key:"insertAt", value:function($_createClass$$, $_extend2$$, $bubbleFormats$$) { | |
if (null != $bubbleFormats$$) { | |
return $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "insertAt", this).call(this, $_createClass$$, $_extend2$$, $bubbleFormats$$); | |
} | |
if (0 !== $_extend2$$.length) { | |
$_extend2$$ = $_extend2$$.split("\n"); | |
$bubbleFormats$$ = $_extend2$$.shift(); | |
0 < $bubbleFormats$$.length && ($_createClass$$ < this.length() - 1 || null == this.children.tail ? $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "insertAt", this).call(this, Math.min($_createClass$$, this.length() - 1), $bubbleFormats$$) : this.children.tail.insertAt(this.children.tail.length(), $bubbleFormats$$), this.cache = {}); | |
var $_break__extend__inline__inline2__parchment__quillDelta_module$$ = this; | |
$_extend2$$.reduce(function($_get$$, $_createClass$$) { | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$ = $_break__extend__inline__inline2__parchment__quillDelta_module$$.split($_get$$, !0); | |
$_break__extend__inline__inline2__parchment__quillDelta_module$$.insertAt(0, $_createClass$$); | |
return $_createClass$$.length; | |
}, $_createClass$$ + $bubbleFormats$$.length); | |
} | |
}}, {key:"insertBefore", value:function($_createClass$$, $_extend2$$) { | |
var $bubbleFormats$$ = this.children.head; | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "insertBefore", this).call(this, $_createClass$$, $_extend2$$); | |
$bubbleFormats$$ instanceof $_break2$$.default && $bubbleFormats$$.remove(); | |
this.cache = {}; | |
}}, {key:"length", value:function() { | |
null == this.cache.length && (this.cache.length = $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "length", this).call(this) + 1); | |
return this.cache.length; | |
}}, {key:"moveChildren", value:function($_createClass$$, $_extend2$$) { | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "moveChildren", this).call(this, $_createClass$$, $_extend2$$); | |
this.cache = {}; | |
}}, {key:"optimize", value:function($_createClass$$) { | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "optimize", this).call(this, $_createClass$$); | |
this.cache = {}; | |
}}, {key:"path", value:function($_createClass$$) { | |
return $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "path", this).call(this, $_createClass$$, !0); | |
}}, {key:"removeChild", value:function($_createClass$$) { | |
$_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "removeChild", this).call(this, $_createClass$$); | |
this.cache = {}; | |
}}, {key:"split", value:function($_createClass$$) { | |
var $_extend2$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1; | |
if ($_extend2$$ && (0 === $_createClass$$ || $_createClass$$ >= this.length() - 1)) { | |
$_extend2$$ = this.clone(); | |
if (0 === $_createClass$$) { | |
return this.parent.insertBefore($_extend2$$, this), this; | |
} | |
this.parent.insertBefore($_extend2$$, this.next); | |
return $_extend2$$; | |
} | |
$_extend2$$ = $_get$$($__webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($__webpack_require__$$.prototype), "split", this).call(this, $_createClass$$, $_extend2$$); | |
this.cache = {}; | |
return $_extend2$$; | |
}}]); | |
return $__webpack_require__$$; | |
}($_parchment2$$.default.Block); | |
$Block$$.blotName = "block"; | |
$Block$$.tagName = "P"; | |
$Block$$.defaultChild = "break"; | |
$Block$$.allowedChildren = [$_break__extend__inline__inline2__parchment__quillDelta_module$$.default, $_parchment2$$.default.Embed, $__webpack_require__$$.default]; | |
$exports$$.bubbleFormats = $bubbleFormats$$; | |
$exports$$.BlockEmbed = $BlockEmbed$$; | |
$exports$$.default = $Block$$; | |
}, function($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $exports$$, $__webpack_require__$$) { | |
function $_interopRequireDefault$$($_typeof$$) { | |
return $_typeof$$ && $_typeof$$.__esModule ? $_typeof$$ : {default:$_typeof$$}; | |
} | |
function $_defineProperty$$($_typeof$$, $shiftRange$$, $_slicedToArray$$) { | |
$shiftRange$$ in $_typeof$$ ? Object.defineProperty($_typeof$$, $shiftRange$$, {value:$_slicedToArray$$, enumerable:!0, configurable:!0, writable:!0}) : $_typeof$$[$shiftRange$$] = $_slicedToArray$$; | |
return $_typeof$$; | |
} | |
function $expandConfig$$($_typeof$$, $shiftRange$$) { | |
$shiftRange$$ = (0, $_extend2$$.default)(!0, {container:$_typeof$$, modules:{clipboard:!0, keyboard:!0, history:!0}}, $shiftRange$$); | |
if ($shiftRange$$.theme && $shiftRange$$.theme !== $Quill$$.DEFAULTS.theme) { | |
if ($shiftRange$$.theme = $Quill$$.import("themes/" + $shiftRange$$.theme), null == $shiftRange$$.theme) { | |
throw Error("Invalid theme " + $shiftRange$$.theme + ". Did you register it?"); | |
} | |
} else { | |
$shiftRange$$.theme = $_theme2$$.default; | |
} | |
$_typeof$$ = (0, $_extend2$$.default)(!0, {}, $shiftRange$$.theme.DEFAULTS); | |
[$_typeof$$, $shiftRange$$].forEach(function($_typeof$$) { | |
$_typeof$$.modules = $_typeof$$.modules || {}; | |
Object.keys($_typeof$$.modules).forEach(function($shiftRange$$) { | |
!0 === $_typeof$$.modules[$shiftRange$$] && ($_typeof$$.modules[$shiftRange$$] = {}); | |
}); | |
}); | |
var $_slicedToArray$$ = Object.keys($_typeof$$.modules).concat(Object.keys($shiftRange$$.modules)).reduce(function($_typeof$$, $shiftRange$$) { | |
var $_slicedToArray$$ = $Quill$$.import("modules/" + $shiftRange$$); | |
null == $_slicedToArray$$ ? $debug$$.error("Cannot load " + $shiftRange$$ + " module. Are you sure you registered it?") : $_typeof$$[$shiftRange$$] = $_slicedToArray$$.DEFAULTS || {}; | |
return $_typeof$$; | |
}, {}); | |
null != $shiftRange$$.modules && $shiftRange$$.modules.toolbar && $shiftRange$$.modules.toolbar.constructor !== Object && ($shiftRange$$.modules.toolbar = {container:$shiftRange$$.modules.toolbar}); | |
$shiftRange$$ = (0, $_extend2$$.default)(!0, {}, $Quill$$.DEFAULTS, {modules:$_slicedToArray$$}, $_typeof$$, $shiftRange$$); | |
["bounds", "container", "scrollingContainer"].forEach(function($_typeof$$) { | |
"string" === typeof $shiftRange$$[$_typeof$$] && ($shiftRange$$[$_typeof$$] = document.querySelector($shiftRange$$[$_typeof$$])); | |
}); | |
$shiftRange$$.modules = Object.keys($shiftRange$$.modules).reduce(function($_typeof$$, $_slicedToArray$$) { | |
$shiftRange$$.modules[$_slicedToArray$$] && ($_typeof$$[$_slicedToArray$$] = $shiftRange$$.modules[$_slicedToArray$$]); | |
return $_typeof$$; | |
}, {}); | |
return $shiftRange$$; | |
} | |
function $modify$$($_typeof$$, $_slicedToArray$$, $overload$$, $__webpack_require__$$) { | |
if (this.options.strict && !this.isEnabled() && $_slicedToArray$$ === $_emitter4$$.default.sources.USER) { | |
return new $_quillDelta2$$.default; | |
} | |
var $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = null == $overload$$ ? null : this.getSelection(), $_editor2$$ = this.editor.delta; | |
$_typeof$$ = $_typeof$$(); | |
null != $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ && (!0 === $overload$$ && ($overload$$ = $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$.index), null == $__webpack_require__$$ ? $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $shiftRange$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_typeof$$, $_slicedToArray$$) : 0 !== $__webpack_require__$$ && ($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = | |
$shiftRange$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $overload$$, $__webpack_require__$$, $_slicedToArray$$)), this.setSelection($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_emitter4$$.default.sources.SILENT)); | |
if (0 < $_typeof$$.length()) { | |
var $modify$$; | |
$overload$$ = [$_emitter4$$.default.events.TEXT_CHANGE, $_typeof$$, $_editor2$$, $_slicedToArray$$]; | |
($modify$$ = this.emitter).emit.apply($modify$$, [$_emitter4$$.default.events.EDITOR_CHANGE].concat($overload$$)); | |
if ($_slicedToArray$$ !== $_emitter4$$.default.sources.SILENT) { | |
var $_createClass$$; | |
($_createClass$$ = this.emitter).emit.apply($_createClass$$, $overload$$); | |
} | |
} | |
return $_typeof$$; | |
} | |
function $overload$$($shiftRange$$, $_slicedToArray$$, $overload$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$) { | |
var $_quillDelta2$$ = {}; | |
"number" === typeof $shiftRange$$.index && "number" === typeof $shiftRange$$.length ? ("number" !== typeof $_slicedToArray$$ ? ($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$, $__webpack_require__$$ = $overload$$, $overload$$ = $_slicedToArray$$, $_slicedToArray$$ = $shiftRange$$.length) : $_slicedToArray$$ = $shiftRange$$.length, $shiftRange$$ = $shiftRange$$.index) : "number" !== typeof $_slicedToArray$$ && ($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = | |
$__webpack_require__$$, $__webpack_require__$$ = $overload$$, $overload$$ = $_slicedToArray$$, $_slicedToArray$$ = 0); | |
"object" === ("undefined" === typeof $overload$$ ? "undefined" : $_typeof$$($overload$$)) ? ($_quillDelta2$$ = $overload$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$) : "string" === typeof $overload$$ && (null != $__webpack_require__$$ ? $_quillDelta2$$[$overload$$] = $__webpack_require__$$ : $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $overload$$); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ || $_emitter4$$.default.sources.API; | |
return [$shiftRange$$, $_slicedToArray$$, $_quillDelta2$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$]; | |
} | |
function $shiftRange$$($_typeof$$, $shiftRange$$, $overload$$, $__webpack_require__$$) { | |
if (null == $_typeof$$) { | |
return null; | |
} | |
var $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = void 0, $_editor2$$ = void 0; | |
$shiftRange$$ instanceof $_quillDelta2$$.default ? ($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = [$_typeof$$.index, $_typeof$$.index + $_typeof$$.length].map(function($_typeof$$) { | |
return $shiftRange$$.transformPosition($_typeof$$, $__webpack_require__$$ !== $_emitter4$$.default.sources.USER); | |
}), $_typeof$$ = $_slicedToArray$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, 2), $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_typeof$$[0], $_editor2$$ = $_typeof$$[1]) : ($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = [$_typeof$$.index, $_typeof$$.index + $_typeof$$.length].map(function($_typeof$$) { | |
return $_typeof$$ < $shiftRange$$ || $_typeof$$ === $shiftRange$$ && $__webpack_require__$$ === $_emitter4$$.default.sources.USER ? $_typeof$$ : 0 <= $overload$$ ? $_typeof$$ + $overload$$ : Math.max($shiftRange$$, $_typeof$$ + $overload$$); | |
}), $_typeof$$ = $_slicedToArray$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, 2), $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_typeof$$[0], $_editor2$$ = $_typeof$$[1]); | |
return new $_selection$$.Range($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_editor2$$ - $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.overload = $exports$$.expandConfig = void 0; | |
var $_typeof$$ = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function($_typeof$$) { | |
return typeof $_typeof$$; | |
} : function($_typeof$$) { | |
return $_typeof$$ && "function" === typeof Symbol && $_typeof$$.constructor === Symbol && $_typeof$$ !== Symbol.prototype ? "symbol" : typeof $_typeof$$; | |
}, $_slicedToArray$$ = function() { | |
return function($_typeof$$, $shiftRange$$) { | |
if (Array.isArray($_typeof$$)) { | |
return $_typeof$$; | |
} | |
if (Symbol.iterator in Object($_typeof$$)) { | |
var $_slicedToArray$$ = [], $overload$$ = !0, $__webpack_require__$$ = !1, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = void 0; | |
try { | |
for (var $_quillDelta2$$ = $_typeof$$[Symbol.iterator](), $_editor2$$; !($overload$$ = ($_editor2$$ = $_quillDelta2$$.next()).done) && ($_slicedToArray$$.push($_editor2$$.value), !$shiftRange$$ || $_slicedToArray$$.length !== $shiftRange$$); $overload$$ = !0) { | |
} | |
} catch ($err$$) { | |
$__webpack_require__$$ = !0, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$overload$$ && $_quillDelta2$$["return"]) { | |
$_quillDelta2$$["return"](); | |
} | |
} finally { | |
if ($__webpack_require__$$) { | |
throw $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$; | |
} | |
} | |
} | |
return $_slicedToArray$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $_typeof$$($_typeof$$, $shiftRange$$) { | |
for (var $_slicedToArray$$ = 0; $_slicedToArray$$ < $shiftRange$$.length; $_slicedToArray$$++) { | |
var $overload$$ = $shiftRange$$[$_slicedToArray$$]; | |
$overload$$.enumerable = $overload$$.enumerable || !1; | |
$overload$$.configurable = !0; | |
"value" in $overload$$ && ($overload$$.writable = !0); | |
Object.defineProperty($_typeof$$, $overload$$.key, $overload$$); | |
} | |
} | |
return function($shiftRange$$, $_slicedToArray$$, $overload$$) { | |
$_slicedToArray$$ && $_typeof$$($shiftRange$$.prototype, $_slicedToArray$$); | |
$overload$$ && $_typeof$$($shiftRange$$, $overload$$); | |
return $shiftRange$$; | |
}; | |
}(); | |
$__webpack_require__$$(50); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$(14); | |
var $_editor2$$ = $_interopRequireDefault$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$(8); | |
var $_emitter4$$ = $_interopRequireDefault$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $__webpack_require__$$(9); | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_interopRequireDefault$$($_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$); | |
var $_extend$jscomp$1__logger__parchment$$ = $__webpack_require__$$(0), $_parchment2$$ = $_interopRequireDefault$$($_extend$jscomp$1__logger__parchment$$), $_selection$$ = $__webpack_require__$$(15), $_selection2$$ = $_interopRequireDefault$$($_selection$$); | |
$_extend$jscomp$1__logger__parchment$$ = $__webpack_require__$$(3); | |
var $_extend2$$ = $_interopRequireDefault$$($_extend$jscomp$1__logger__parchment$$); | |
$_extend$jscomp$1__logger__parchment$$ = $__webpack_require__$$(10); | |
var $_logger2$$ = $_interopRequireDefault$$($_extend$jscomp$1__logger__parchment$$); | |
$__webpack_require__$$ = $__webpack_require__$$(33); | |
var $_theme2$$ = $_interopRequireDefault$$($__webpack_require__$$), $debug$$ = (0, $_logger2$$.default)("quill"), $Quill$$ = function() { | |
function $_typeof$$($shiftRange$$) { | |
var $_slicedToArray$$ = this, $overload$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; | |
if (!(this instanceof $_typeof$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
this.options = $expandConfig$$($shiftRange$$, $overload$$); | |
this.container = this.options.container; | |
if (null == this.container) { | |
return $debug$$.error("Invalid Quill container", $shiftRange$$); | |
} | |
this.options.debug && $_typeof$$.debug(this.options.debug); | |
$overload$$ = 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", !1); | |
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($_typeof$$) { | |
$_typeof$$ === $_emitter4$$.default.events.TEXT_CHANGE && $_slicedToArray$$.root.classList.toggle("ql-blank", $_slicedToArray$$.editor.isBlank()); | |
}); | |
this.emitter.on($_emitter4$$.default.events.SCROLL_UPDATE, function($_typeof$$, $shiftRange$$) { | |
var $overload$$ = $_slicedToArray$$.selection.lastRange, $__webpack_require__$$ = $overload$$ && 0 === $overload$$.length ? $overload$$.index : void 0; | |
$modify$$.call($_slicedToArray$$, function() { | |
return $_slicedToArray$$.editor.update(null, $shiftRange$$, $__webpack_require__$$); | |
}, $_typeof$$); | |
}); | |
$overload$$ = this.clipboard.convert("\x3cdiv class\x3d'ql-editor' style\x3d\"white-space: normal;\"\x3e" + $overload$$ + "\x3cp\x3e\x3cbr\x3e\x3c/p\x3e\x3c/div\x3e"); | |
this.setContents($overload$$); | |
this.history.clear(); | |
this.options.placeholder && this.root.setAttribute("data-placeholder", this.options.placeholder); | |
this.options.readOnly && this.disable(); | |
} | |
$_createClass$$($_typeof$$, null, [{key:"debug", value:function($_typeof$$) { | |
!0 === $_typeof$$ && ($_typeof$$ = "log"); | |
$_logger2$$.default.level($_typeof$$); | |
}}, {key:"find", value:function($_typeof$$) { | |
return $_typeof$$.__quill || $_parchment2$$.default.find($_typeof$$); | |
}}, {key:"import", value:function($_typeof$$) { | |
null == this.imports[$_typeof$$] && $debug$$.error("Cannot import " + $_typeof$$ + ". Are you sure it was registered?"); | |
return this.imports[$_typeof$$]; | |
}}, {key:"register", value:function($_typeof$$, $shiftRange$$) { | |
var $_slicedToArray$$ = this, $overload$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1; | |
"string" !== typeof $_typeof$$ ? ($overload$$ = $_typeof$$.attrName || $_typeof$$.blotName, "string" === typeof $overload$$ ? this.register("formats/" + $overload$$, $_typeof$$, $shiftRange$$) : Object.keys($_typeof$$).forEach(function($overload$$) { | |
$_slicedToArray$$.register($overload$$, $_typeof$$[$overload$$], $shiftRange$$); | |
})) : (null == this.imports[$_typeof$$] || $overload$$ || $debug$$.warn("Overwriting " + $_typeof$$ + " with", $shiftRange$$), this.imports[$_typeof$$] = $shiftRange$$, ($_typeof$$.startsWith("blots/") || $_typeof$$.startsWith("formats/")) && "abstract" !== $shiftRange$$.blotName ? $_parchment2$$.default.register($shiftRange$$) : $_typeof$$.startsWith("modules") && "function" === typeof $shiftRange$$.register && $shiftRange$$.register()); | |
}}]); | |
$_createClass$$($_typeof$$, [{key:"addContainer", value:function($_typeof$$) { | |
var $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null; | |
if ("string" === typeof $_typeof$$) { | |
var $_slicedToArray$$ = $_typeof$$; | |
$_typeof$$ = document.createElement("div"); | |
$_typeof$$.classList.add($_slicedToArray$$); | |
} | |
this.container.insertBefore($_typeof$$, $shiftRange$$); | |
return $_typeof$$; | |
}}, {key:"blur", value:function() { | |
this.selection.setRange(null); | |
}}, {key:"deleteText", value:function($_typeof$$, $shiftRange$$, $__webpack_require__$$) { | |
var $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = this; | |
$__webpack_require__$$ = $overload$$($_typeof$$, $shiftRange$$, $__webpack_require__$$); | |
$__webpack_require__$$ = $_slicedToArray$$($__webpack_require__$$, 4); | |
$_typeof$$ = $__webpack_require__$$[0]; | |
$shiftRange$$ = $__webpack_require__$$[1]; | |
$__webpack_require__$$ = $__webpack_require__$$[3]; | |
return $modify$$.call(this, function() { | |
return $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$.editor.deleteText($_typeof$$, $shiftRange$$); | |
}, $__webpack_require__$$, $_typeof$$, -1 * $shiftRange$$); | |
}}, {key:"disable", value:function() { | |
this.enable(!1); | |
}}, {key:"enable", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0; | |
this.scroll.enable($_typeof$$); | |
this.container.classList.toggle("ql-disabled", !$_typeof$$); | |
}}, {key:"focus", value:function() { | |
var $_typeof$$ = this.scrollingContainer.scrollTop; | |
this.selection.focus(); | |
this.scrollingContainer.scrollTop = $_typeof$$; | |
this.scrollIntoView(); | |
}}, {key:"format", value:function($_typeof$$, $shiftRange$$) { | |
var $_slicedToArray$$ = this; | |
return $modify$$.call(this, function() { | |
var $overload$$ = $_slicedToArray$$.getSelection(!0), $__webpack_require__$$ = new $_quillDelta2$$.default; | |
if (null == $overload$$) { | |
return $__webpack_require__$$; | |
} | |
if ($_parchment2$$.default.query($_typeof$$, $_parchment2$$.default.Scope.BLOCK)) { | |
$__webpack_require__$$ = $_slicedToArray$$.editor.formatLine($overload$$.index, $overload$$.length, $_defineProperty$$({}, $_typeof$$, $shiftRange$$)); | |
} else { | |
if (0 === $overload$$.length) { | |
return $_slicedToArray$$.selection.format($_typeof$$, $shiftRange$$), $__webpack_require__$$; | |
} | |
$__webpack_require__$$ = $_slicedToArray$$.editor.formatText($overload$$.index, $overload$$.length, $_defineProperty$$({}, $_typeof$$, $shiftRange$$)); | |
} | |
$_slicedToArray$$.setSelection($overload$$, $_emitter4$$.default.sources.SILENT); | |
return $__webpack_require__$$; | |
}, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : $_emitter4$$.default.sources.API); | |
}}, {key:"formatLine", value:function($_typeof$$, $shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$) { | |
var $_editor2$$ = this, $_createClass$$ = void 0; | |
$__webpack_require__$$ = $overload$$($_typeof$$, $shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$); | |
$__webpack_require__$$ = $_slicedToArray$$($__webpack_require__$$, 4); | |
$_typeof$$ = $__webpack_require__$$[0]; | |
$shiftRange$$ = $__webpack_require__$$[1]; | |
$_createClass$$ = $__webpack_require__$$[2]; | |
$_quillDelta2$$ = $__webpack_require__$$[3]; | |
return $modify$$.call(this, function() { | |
return $_editor2$$.editor.formatLine($_typeof$$, $shiftRange$$, $_createClass$$); | |
}, $_quillDelta2$$, $_typeof$$, 0); | |
}}, {key:"formatText", value:function($_typeof$$, $shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$) { | |
var $_editor2$$ = this, $_createClass$$ = void 0; | |
$__webpack_require__$$ = $overload$$($_typeof$$, $shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$); | |
$__webpack_require__$$ = $_slicedToArray$$($__webpack_require__$$, 4); | |
$_typeof$$ = $__webpack_require__$$[0]; | |
$shiftRange$$ = $__webpack_require__$$[1]; | |
$_createClass$$ = $__webpack_require__$$[2]; | |
$_quillDelta2$$ = $__webpack_require__$$[3]; | |
return $modify$$.call(this, function() { | |
return $_editor2$$.editor.formatText($_typeof$$, $shiftRange$$, $_createClass$$); | |
}, $_quillDelta2$$, $_typeof$$, 0); | |
}}, {key:"getBounds", value:function($_typeof$$) { | |
var $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0; | |
$shiftRange$$ = "number" === typeof $_typeof$$ ? this.selection.getBounds($_typeof$$, $shiftRange$$) : this.selection.getBounds($_typeof$$.index, $_typeof$$.length); | |
var $_slicedToArray$$ = this.container.getBoundingClientRect(); | |
return {bottom:$shiftRange$$.bottom - $_slicedToArray$$.top, height:$shiftRange$$.height, left:$shiftRange$$.left - $_slicedToArray$$.left, right:$shiftRange$$.right - $_slicedToArray$$.left, top:$shiftRange$$.top - $_slicedToArray$$.top, width:$shiftRange$$.width}; | |
}}, {key:"getContents", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.getLength() - $_typeof$$; | |
$_typeof$$ = $overload$$($_typeof$$, $shiftRange$$); | |
$shiftRange$$ = $_slicedToArray$$($_typeof$$, 2); | |
$_typeof$$ = $shiftRange$$[0]; | |
$shiftRange$$ = $shiftRange$$[1]; | |
return this.editor.getContents($_typeof$$, $shiftRange$$); | |
}}, {key:"getFormat", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.getSelection(!0), $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0; | |
return "number" === typeof $_typeof$$ ? this.editor.getFormat($_typeof$$, $shiftRange$$) : this.editor.getFormat($_typeof$$.index, $_typeof$$.length); | |
}}, {key:"getIndex", value:function($_typeof$$) { | |
return $_typeof$$.offset(this.scroll); | |
}}, {key:"getLength", value:function() { | |
return this.scroll.length(); | |
}}, {key:"getLeaf", value:function($_typeof$$) { | |
return this.scroll.leaf($_typeof$$); | |
}}, {key:"getLine", value:function($_typeof$$) { | |
return this.scroll.line($_typeof$$); | |
}}, {key:"getLines", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : Number.MAX_VALUE; | |
return "number" !== typeof $_typeof$$ ? this.scroll.lines($_typeof$$.index, $_typeof$$.length) : this.scroll.lines($_typeof$$, $shiftRange$$); | |
}}, {key:"getModule", value:function($_typeof$$) { | |
return this.theme.modules[$_typeof$$]; | |
}}, {key:"getSelection", value:function() { | |
0 < arguments.length && void 0 !== arguments[0] && arguments[0] && this.focus(); | |
this.update(); | |
return this.selection.getRange()[0]; | |
}}, {key:"getText", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.getLength() - $_typeof$$; | |
$_typeof$$ = $overload$$($_typeof$$, $shiftRange$$); | |
$shiftRange$$ = $_slicedToArray$$($_typeof$$, 2); | |
$_typeof$$ = $shiftRange$$[0]; | |
$shiftRange$$ = $shiftRange$$[1]; | |
return this.editor.getText($_typeof$$, $shiftRange$$); | |
}}, {key:"hasFocus", value:function() { | |
return this.selection.hasFocus(); | |
}}, {key:"insertEmbed", value:function($shiftRange$$, $_slicedToArray$$, $overload$$) { | |
var $__webpack_require__$$ = this; | |
return $modify$$.call(this, function() { | |
return $__webpack_require__$$.editor.insertEmbed($shiftRange$$, $_slicedToArray$$, $overload$$); | |
}, 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : $_typeof$$.sources.API, $shiftRange$$); | |
}}, {key:"insertText", value:function($_typeof$$, $shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$) { | |
var $_editor2$$ = this, $_createClass$$ = void 0; | |
$__webpack_require__$$ = $overload$$($_typeof$$, 0, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$, $_quillDelta2$$); | |
$__webpack_require__$$ = $_slicedToArray$$($__webpack_require__$$, 4); | |
$_typeof$$ = $__webpack_require__$$[0]; | |
$_createClass$$ = $__webpack_require__$$[2]; | |
$_quillDelta2$$ = $__webpack_require__$$[3]; | |
return $modify$$.call(this, function() { | |
return $_editor2$$.editor.insertText($_typeof$$, $shiftRange$$, $_createClass$$); | |
}, $_quillDelta2$$, $_typeof$$, $shiftRange$$.length); | |
}}, {key:"isEnabled", value:function() { | |
return !this.container.classList.contains("ql-disabled"); | |
}}, {key:"off", value:function() { | |
return this.emitter.off.apply(this.emitter, arguments); | |
}}, {key:"on", value:function() { | |
return this.emitter.on.apply(this.emitter, arguments); | |
}}, {key:"once", value:function() { | |
return this.emitter.once.apply(this.emitter, arguments); | |
}}, {key:"pasteHTML", value:function($_typeof$$, $shiftRange$$, $_slicedToArray$$) { | |
this.clipboard.dangerouslyPasteHTML($_typeof$$, $shiftRange$$, $_slicedToArray$$); | |
}}, {key:"removeFormat", value:function($_typeof$$, $shiftRange$$, $__webpack_require__$$) { | |
var $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = this; | |
$__webpack_require__$$ = $overload$$($_typeof$$, $shiftRange$$, $__webpack_require__$$); | |
$__webpack_require__$$ = $_slicedToArray$$($__webpack_require__$$, 4); | |
$_typeof$$ = $__webpack_require__$$[0]; | |
$shiftRange$$ = $__webpack_require__$$[1]; | |
$__webpack_require__$$ = $__webpack_require__$$[3]; | |
return $modify$$.call(this, function() { | |
return $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$.editor.removeFormat($_typeof$$, $shiftRange$$); | |
}, $__webpack_require__$$, $_typeof$$); | |
}}, {key:"scrollIntoView", value:function() { | |
this.selection.scrollIntoView(this.scrollingContainer); | |
}}, {key:"setContents", value:function($_typeof$$) { | |
var $shiftRange$$ = this; | |
return $modify$$.call(this, function() { | |
$_typeof$$ = new $_quillDelta2$$.default($_typeof$$); | |
var $_slicedToArray$$ = $shiftRange$$.getLength(); | |
$_slicedToArray$$ = $shiftRange$$.editor.deleteText(0, $_slicedToArray$$); | |
var $overload$$ = $shiftRange$$.editor.applyDelta($_typeof$$), $__webpack_require__$$ = $overload$$.ops[$overload$$.ops.length - 1]; | |
null != $__webpack_require__$$ && "string" === typeof $__webpack_require__$$.insert && "\n" === $__webpack_require__$$.insert[$__webpack_require__$$.insert.length - 1] && ($shiftRange$$.editor.deleteText($shiftRange$$.getLength() - 1, 1), $overload$$.delete(1)); | |
return $_slicedToArray$$.compose($overload$$); | |
}, 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : $_emitter4$$.default.sources.API); | |
}}, {key:"setSelection", value:function($shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$) { | |
null == $shiftRange$$ ? this.selection.setRange(null, $__webpack_require__$$ || $_typeof$$.sources.API) : ($shiftRange$$ = $overload$$($shiftRange$$, $__webpack_require__$$, $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$), $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_slicedToArray$$($shiftRange$$, 4), $shiftRange$$ = $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$[0], $__webpack_require__$$ = $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$[1], | |
$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ = $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$[3], this.selection.setRange(new $_selection$$.Range($shiftRange$$, $__webpack_require__$$), $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$), $_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$ !== $_emitter4$$.default.sources.SILENT && this.selection.scrollIntoView(this.scrollingContainer)); | |
}}, {key:"setText", value:function($_typeof$$) { | |
var $shiftRange$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : $_emitter4$$.default.sources.API, $_slicedToArray$$ = (new $_quillDelta2$$.default).insert($_typeof$$); | |
return this.setContents($_slicedToArray$$, $shiftRange$$); | |
}}, {key:"update", value:function() { | |
var $_typeof$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : $_emitter4$$.default.sources.USER, $shiftRange$$ = this.scroll.update($_typeof$$); | |
this.selection.update($_typeof$$); | |
return $shiftRange$$; | |
}}, {key:"updateContents", value:function($_typeof$$) { | |
var $shiftRange$$ = this, $_slicedToArray$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : $_emitter4$$.default.sources.API; | |
return $modify$$.call(this, function() { | |
$_typeof$$ = new $_quillDelta2$$.default($_typeof$$); | |
return $shiftRange$$.editor.applyDelta($_typeof$$, $_slicedToArray$$); | |
}, $_slicedToArray$$, !0); | |
}}]); | |
return $_typeof$$; | |
}(); | |
$Quill$$.DEFAULTS = {bounds:null, formats:null, modules:{}, placeholder:"", readOnly:!1, scrollingContainer:null, strict:!0, theme:"default"}; | |
$Quill$$.events = $_emitter4$$.default.events; | |
$Quill$$.sources = $_emitter4$$.default.sources; | |
$Quill$$.version = "1.3.5"; | |
$Quill$$.imports = {delta:$_quillDelta2$$.default, parchment:$_parchment2$$.default, "core/module":$_editor__emitter3__module__module2__quillDelta$jscomp$1_module$$.default, "core/theme":$_theme2$$.default}; | |
$exports$$.expandConfig = $expandConfig$$; | |
$exports$$.overload = $overload$$; | |
$exports$$.default = $Quill$$; | |
}, function($_text$jscomp$1__text2$jscomp$1_module$$, $exports$$, $Inline___webpack_require__$jscomp$6__parchment$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $defineProperties$$($target$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $defineProperties$$ = $props$$[$i$$]; | |
$defineProperties$$.enumerable = $defineProperties$$.enumerable || !1; | |
$defineProperties$$.configurable = !0; | |
"value" in $defineProperties$$ && ($defineProperties$$.writable = !0); | |
Object.defineProperty($target$$, $defineProperties$$.key, $defineProperties$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $defineProperties$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $defineProperties$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$2_parent$$, $getter$jscomp$3_property$$, $receiver$$) { | |
null === $object$jscomp$2_parent$$ && ($object$jscomp$2_parent$$ = Function.prototype); | |
var $Inline___webpack_require__$jscomp$6__parchment$$ = Object.getOwnPropertyDescriptor($object$jscomp$2_parent$$, $getter$jscomp$3_property$$); | |
if (void 0 === $Inline___webpack_require__$jscomp$6__parchment$$) { | |
if ($object$jscomp$2_parent$$ = Object.getPrototypeOf($object$jscomp$2_parent$$), null !== $object$jscomp$2_parent$$) { | |
return $get$$($object$jscomp$2_parent$$, $getter$jscomp$3_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $Inline___webpack_require__$jscomp$6__parchment$$) { | |
return $Inline___webpack_require__$jscomp$6__parchment$$.value; | |
} | |
$getter$jscomp$3_property$$ = $Inline___webpack_require__$jscomp$6__parchment$$.get; | |
return void 0 === $getter$jscomp$3_property$$ ? void 0 : $getter$jscomp$3_property$$.call($receiver$$); | |
} | |
}; | |
$_text$jscomp$1__text2$jscomp$1_module$$ = ($_text$jscomp$1__text2$jscomp$1_module$$ = $Inline___webpack_require__$jscomp$6__parchment$$(7)) && $_text$jscomp$1__text2$jscomp$1_module$$.__esModule ? $_text$jscomp$1__text2$jscomp$1_module$$ : {default:$_text$jscomp$1__text2$jscomp$1_module$$}; | |
var $_parchment2$$ = ($Inline___webpack_require__$jscomp$6__parchment$$ = $Inline___webpack_require__$jscomp$6__parchment$$(0)) && $Inline___webpack_require__$jscomp$6__parchment$$.__esModule ? $Inline___webpack_require__$jscomp$6__parchment$$ : {default:$Inline___webpack_require__$jscomp$6__parchment$$}; | |
$Inline___webpack_require__$jscomp$6__parchment$$ = function($_Parchment$Inline$$) { | |
function $Inline$$() { | |
if (!(this instanceof $Inline$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_Parchment$Inline$$ = ($Inline$$.__proto__ || Object.getPrototypeOf($Inline$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_Parchment$Inline$$ || "object" !== typeof $_Parchment$Inline$$ && "function" !== typeof $_Parchment$Inline$$ ? this : $_Parchment$Inline$$; | |
} | |
$_inherits$$($Inline$$, $_Parchment$Inline$$); | |
$_createClass$$($Inline$$, [{key:"formatAt", value:function($_Parchment$Inline$$, $Inline___webpack_require__$jscomp$6__parchment$$, $_text$jscomp$1__text2$jscomp$1_module$$, $value$$) { | |
0 > $Inline$$.compare(this.statics.blotName, $_text$jscomp$1__text2$jscomp$1_module$$) && $_parchment2$$.default.query($_text$jscomp$1__text2$jscomp$1_module$$, $_parchment2$$.default.Scope.BLOT) ? ($_Parchment$Inline$$ = this.isolate($_Parchment$Inline$$, $Inline___webpack_require__$jscomp$6__parchment$$), $value$$ && $_Parchment$Inline$$.wrap($_text$jscomp$1__text2$jscomp$1_module$$, $value$$)) : $_get$$($Inline$$.prototype.__proto__ || Object.getPrototypeOf($Inline$$.prototype), "formatAt", | |
this).call(this, $_Parchment$Inline$$, $Inline___webpack_require__$jscomp$6__parchment$$, $_text$jscomp$1__text2$jscomp$1_module$$, $value$$); | |
}}, {key:"optimize", value:function($_Parchment$Inline$$) { | |
$_get$$($Inline$$.prototype.__proto__ || Object.getPrototypeOf($Inline$$.prototype), "optimize", this).call(this, $_Parchment$Inline$$); | |
this.parent instanceof $Inline$$ && 0 < $Inline$$.compare(this.statics.blotName, this.parent.statics.blotName) && ($_Parchment$Inline$$ = this.parent.isolate(this.offset(), this.length()), this.moveChildren($_Parchment$Inline$$), $_Parchment$Inline$$.wrap(this)); | |
}}], [{key:"compare", value:function($_Parchment$Inline$$, $Inline___webpack_require__$jscomp$6__parchment$$) { | |
var $self$$ = $Inline$$.order.indexOf($_Parchment$Inline$$), $_text$jscomp$1__text2$jscomp$1_module$$ = $Inline$$.order.indexOf($Inline___webpack_require__$jscomp$6__parchment$$); | |
return 0 <= $self$$ || 0 <= $_text$jscomp$1__text2$jscomp$1_module$$ ? $self$$ - $_text$jscomp$1__text2$jscomp$1_module$$ : $_Parchment$Inline$$ === $Inline___webpack_require__$jscomp$6__parchment$$ ? 0 : $_Parchment$Inline$$ < $Inline___webpack_require__$jscomp$6__parchment$$ ? -1 : 1; | |
}}]); | |
return $Inline$$; | |
}($_parchment2$$.default.Inline); | |
$Inline___webpack_require__$jscomp$6__parchment$$.allowedChildren = [$Inline___webpack_require__$jscomp$6__parchment$$, $_parchment2$$.default.Embed, $_text$jscomp$1__text2$jscomp$1_module$$.default]; | |
$Inline___webpack_require__$jscomp$6__parchment$$.order = "cursor inline underline strike italic bold script link code".split(" "); | |
$exports$$.default = $Inline___webpack_require__$jscomp$6__parchment$$; | |
}, function($TextBlot__parchment$jscomp$3_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $TextBlot__parchment$jscomp$3_module$$) { | |
if ("function" !== typeof $TextBlot__parchment$jscomp$3_module$$ && null !== $TextBlot__parchment$jscomp$3_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $TextBlot__parchment$jscomp$3_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($TextBlot__parchment$jscomp$3_module$$ && $TextBlot__parchment$jscomp$3_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$TextBlot__parchment$jscomp$3_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $TextBlot__parchment$jscomp$3_module$$) : $__webpack_require__$$.__proto__ = $TextBlot__parchment$jscomp$3_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$TextBlot__parchment$jscomp$3_module$$ = $__webpack_require__$$(0); | |
$TextBlot__parchment$jscomp$3_module$$ = function($__webpack_require__$$) { | |
function $TextBlot__parchment$jscomp$3_module$$() { | |
if (!(this instanceof $TextBlot__parchment$jscomp$3_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($TextBlot__parchment$jscomp$3_module$$.__proto__ || Object.getPrototypeOf($TextBlot__parchment$jscomp$3_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($TextBlot__parchment$jscomp$3_module$$, $__webpack_require__$$); | |
return $TextBlot__parchment$jscomp$3_module$$; | |
}(($TextBlot__parchment$jscomp$3_module$$ && $TextBlot__parchment$jscomp$3_module$$.__esModule ? $TextBlot__parchment$jscomp$3_module$$ : {default:$TextBlot__parchment$jscomp$3_module$$}).default.Text); | |
$exports$$.default = $TextBlot__parchment$jscomp$3_module$$; | |
}, function($_eventemitter__eventemitter2_module$$, $exports$$, $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $defineProperties$$($target$$, $props$$) { | |
for (var $defineProperties$$ = 0; $defineProperties$$ < $props$$.length; $defineProperties$$++) { | |
var $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = $props$$[$defineProperties$$]; | |
$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.enumerable = $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.enumerable || !1; | |
$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.configurable = !0; | |
"value" in $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ && ($Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.writable = !0); | |
Object.defineProperty($target$$, $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.key, $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $defineProperties$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $defineProperties$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$3_parent$$, $getter$jscomp$4_property$$, $receiver$$) { | |
null === $object$jscomp$3_parent$$ && ($object$jscomp$3_parent$$ = Function.prototype); | |
var $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = Object.getOwnPropertyDescriptor($object$jscomp$3_parent$$, $getter$jscomp$4_property$$); | |
if (void 0 === $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$) { | |
if ($object$jscomp$3_parent$$ = Object.getPrototypeOf($object$jscomp$3_parent$$), null !== $object$jscomp$3_parent$$) { | |
return $get$$($object$jscomp$3_parent$$, $getter$jscomp$4_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$) { | |
return $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.value; | |
} | |
$getter$jscomp$4_property$$ = $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.get; | |
return void 0 === $getter$jscomp$4_property$$ ? void 0 : $getter$jscomp$4_property$$.call($receiver$$); | |
} | |
}; | |
$_eventemitter__eventemitter2_module$$ = ($_eventemitter__eventemitter2_module$$ = $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$(54)) && $_eventemitter__eventemitter2_module$$.__esModule ? $_eventemitter__eventemitter2_module$$ : {default:$_eventemitter__eventemitter2_module$$}; | |
$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = ($Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$(10)) && $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.__esModule ? $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ : {default:$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$}; | |
var $debug$$ = (0, $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.default)("quill:events"); | |
["selectionchange", "mousedown", "mouseup", "click"].forEach(function($eventName$$) { | |
document.addEventListener($eventName$$, function() { | |
for (var $_len$$ = arguments.length, $eventName$$ = Array($_len$$), $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = 0; $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ < $_len$$; $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$++) { | |
$eventName$$[$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$] = arguments[$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$]; | |
} | |
[].slice.call(document.querySelectorAll(".ql-container")).forEach(function($_len$$) { | |
if ($_len$$.__quill && $_len$$.__quill.emitter) { | |
var $args$$; | |
($args$$ = $_len$$.__quill.emitter).handleDOM.apply($args$$, $eventName$$); | |
} | |
}); | |
}); | |
}); | |
$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = function($_EventEmitter$$) { | |
function $Emitter$$() { | |
if (!(this instanceof $Emitter$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_EventEmitter$$ = ($Emitter$$.__proto__ || Object.getPrototypeOf($Emitter$$)).call(this); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
$_EventEmitter$$ = !$_EventEmitter$$ || "object" !== typeof $_EventEmitter$$ && "function" !== typeof $_EventEmitter$$ ? this : $_EventEmitter$$; | |
$_EventEmitter$$.listeners = {}; | |
$_EventEmitter$$.on("error", $debug$$.error); | |
return $_EventEmitter$$; | |
} | |
$_inherits$$($Emitter$$, $_EventEmitter$$); | |
$_createClass$$($Emitter$$, [{key:"emit", value:function() { | |
$debug$$.log.apply($debug$$, arguments); | |
$_get$$($Emitter$$.prototype.__proto__ || Object.getPrototypeOf($Emitter$$.prototype), "emit", this).apply(this, arguments); | |
}}, {key:"handleDOM", value:function($Emitter$$) { | |
for (var $_EventEmitter$$ = arguments.length, $event$$ = Array(1 < $_EventEmitter$$ ? $_EventEmitter$$ - 1 : 0), $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = 1; $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ < $_EventEmitter$$; $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$++) { | |
$event$$[$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ - 1] = arguments[$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$]; | |
} | |
(this.listeners[$Emitter$$.type] || []).forEach(function($_EventEmitter$$) { | |
var $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ = $_EventEmitter$$.node; | |
$_EventEmitter$$ = $_EventEmitter$$.handler; | |
($Emitter$$.target === $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$ || $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.contains($Emitter$$.target)) && $_EventEmitter$$.apply(void 0, [$Emitter$$].concat($event$$)); | |
}); | |
}}, {key:"listenDOM", value:function($Emitter$$, $_EventEmitter$$, $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$) { | |
this.listeners[$Emitter$$] || (this.listeners[$Emitter$$] = []); | |
this.listeners[$Emitter$$].push({node:$_EventEmitter$$, handler:$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$}); | |
}}]); | |
return $Emitter$$; | |
}($_eventemitter__eventemitter2_module$$.default); | |
$Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.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___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$.sources = {API:"api", SILENT:"silent", USER:"user"}; | |
$exports$$.default = $Emitter___webpack_require__$jscomp$8__logger$jscomp$1__logger2$$; | |
}, function($Module_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Module_module$$ = function($__webpack_require__$$) { | |
throw new TypeError("Cannot call a class as a function"); | |
}; | |
$Module_module$$.DEFAULTS = {}; | |
$exports$$.default = $Module_module$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
function $debug$$($method$$) { | |
if ($levels$$.indexOf($method$$) <= $levels$$.indexOf($level$$)) { | |
for (var $_console$$, $_len$$ = arguments.length, $args$$ = Array(1 < $_len$$ ? $_len$$ - 1 : 0), $__webpack_require__$$ = 1; $__webpack_require__$$ < $_len$$; $__webpack_require__$$++) { | |
$args$$[$__webpack_require__$$ - 1] = arguments[$__webpack_require__$$]; | |
} | |
($_console$$ = console)[$method$$].apply($_console$$, $args$$); | |
} | |
} | |
function $namespace$$($ns$$) { | |
return $levels$$.reduce(function($logger$$, $method$$) { | |
$logger$$[$method$$] = $debug$$.bind(console, $method$$, $ns$$); | |
return $logger$$; | |
}, {}); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $levels$$ = ["error", "warn", "log", "info"], $level$$ = "warn"; | |
$debug$$.level = $namespace$$.level = function($newLevel$$) { | |
$level$$ = $newLevel$$; | |
}; | |
$exports$$.default = $namespace$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
function $isBuffer$$($x$$) { | |
return !$x$$ || "object" !== typeof $x$$ || "number" !== typeof $x$$.length || "function" !== typeof $x$$.copy || "function" !== typeof $x$$.slice || 0 < $x$$.length && "number" !== typeof $x$$[0] ? !1 : !0; | |
} | |
function $objEquiv$$($a$$, $b$$, $__webpack_require__$$) { | |
var $module$$; | |
if (null === $a$$ || void 0 === $a$$ || null === $b$$ || void 0 === $b$$ || $a$$.prototype !== $b$$.prototype) { | |
return !1; | |
} | |
if ($isArguments$$($a$$)) { | |
if (!$isArguments$$($b$$)) { | |
return !1; | |
} | |
$a$$ = $pSlice$$.call($a$$); | |
$b$$ = $pSlice$$.call($b$$); | |
return $deepEqual$$($a$$, $b$$, $__webpack_require__$$); | |
} | |
if ($isBuffer$$($a$$)) { | |
if (!$isBuffer$$($b$$) || $a$$.length !== $b$$.length) { | |
return !1; | |
} | |
for ($module$$ = 0; $module$$ < $a$$.length; $module$$++) { | |
if ($a$$[$module$$] !== $b$$[$module$$]) { | |
return !1; | |
} | |
} | |
return !0; | |
} | |
try { | |
var $ka$$ = $objectKeys$$($a$$); | |
var $kb_key$$ = $objectKeys$$($b$$); | |
} catch ($e$$) { | |
return !1; | |
} | |
if ($ka$$.length != $kb_key$$.length) { | |
return !1; | |
} | |
$ka$$.sort(); | |
$kb_key$$.sort(); | |
for ($module$$ = $ka$$.length - 1; 0 <= $module$$; $module$$--) { | |
if ($ka$$[$module$$] != $kb_key$$[$module$$]) { | |
return !1; | |
} | |
} | |
for ($module$$ = $ka$$.length - 1; 0 <= $module$$; $module$$--) { | |
if ($kb_key$$ = $ka$$[$module$$], !$deepEqual$$($a$$[$kb_key$$], $b$$[$kb_key$$], $__webpack_require__$$)) { | |
return !1; | |
} | |
} | |
return typeof $a$$ === typeof $b$$; | |
} | |
var $pSlice$$ = Array.prototype.slice, $objectKeys$$ = $__webpack_require__$$(52), $isArguments$$ = $__webpack_require__$$(53), $deepEqual$$ = $module$$.exports = function($actual$$, $deepEqual$$, $isArguments$$) { | |
$isArguments$$ || ($isArguments$$ = {}); | |
return $actual$$ === $deepEqual$$ ? !0 : $actual$$ instanceof Date && $deepEqual$$ instanceof Date ? $actual$$.getTime() === $deepEqual$$.getTime() : !$actual$$ || !$deepEqual$$ || "object" != typeof $actual$$ && "object" != typeof $deepEqual$$ ? $isArguments$$.strict ? $actual$$ === $deepEqual$$ : $actual$$ == $deepEqual$$ : $objEquiv$$($actual$$, $deepEqual$$, $isArguments$$); | |
}; | |
}, function($Attributor_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $Registry$$ = $__webpack_require__$$(1); | |
$Attributor_module$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $Attributor_module$$, $options$$) { | |
void 0 === $options$$ && ($options$$ = {}); | |
this.attrName = $__webpack_require__$$; | |
this.keyName = $Attributor_module$$; | |
$__webpack_require__$$ = $Registry$$.Scope.TYPE & $Registry$$.Scope.ATTRIBUTE; | |
this.scope = null != $options$$.scope ? $options$$.scope & $Registry$$.Scope.LEVEL | $__webpack_require__$$ : $Registry$$.Scope.ATTRIBUTE; | |
null != $options$$.whitelist && (this.whitelist = $options$$.whitelist); | |
} | |
$__webpack_require__$$.keys = function($__webpack_require__$$) { | |
return [].map.call($__webpack_require__$$.attributes, function($__webpack_require__$$) { | |
return $__webpack_require__$$.name; | |
}); | |
}; | |
$__webpack_require__$$.prototype.add = function($__webpack_require__$$, $Attributor_module$$) { | |
if (!this.canAdd($__webpack_require__$$, $Attributor_module$$)) { | |
return !1; | |
} | |
$__webpack_require__$$.setAttribute(this.keyName, $Attributor_module$$); | |
return !0; | |
}; | |
$__webpack_require__$$.prototype.canAdd = function($__webpack_require__$$, $Attributor_module$$) { | |
return null == $Registry$$.query($__webpack_require__$$, $Registry$$.Scope.BLOT & (this.scope | $Registry$$.Scope.TYPE)) ? !1 : null == this.whitelist ? !0 : "string" === typeof $Attributor_module$$ ? -1 < this.whitelist.indexOf($Attributor_module$$.replace(/["']/g, "")) : -1 < this.whitelist.indexOf($Attributor_module$$); | |
}; | |
$__webpack_require__$$.prototype.remove = function($__webpack_require__$$) { | |
$__webpack_require__$$.removeAttribute(this.keyName); | |
}; | |
$__webpack_require__$$.prototype.value = function($__webpack_require__$$) { | |
var $Attributor_module$$ = $__webpack_require__$$.getAttribute(this.keyName); | |
return this.canAdd($__webpack_require__$$, $Attributor_module$$) && $Attributor_module$$ ? $Attributor_module$$ : ""; | |
}; | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $Attributor_module$$; | |
}, function($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$, $exports$$, $Code___webpack_require__$jscomp$13__text$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_createClass$$) { | |
if (!($_get$$ instanceof $_createClass$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_createClass$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_createClass$$ || "object" !== typeof $_createClass$$ && "function" !== typeof $_createClass$$ ? $_get$$ : $_createClass$$; | |
} | |
function $_inherits$$($_get$$, $_createClass$$) { | |
if ("function" !== typeof $_createClass$$ && null !== $_createClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_createClass$$); | |
} | |
$_get$$.prototype = Object.create($_createClass$$ && $_createClass$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_createClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_createClass$$) : $_get$$.__proto__ = $_createClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.Code = void 0; | |
var $_slicedToArray$$ = function() { | |
return function($_get$$, $_createClass$$) { | |
if (Array.isArray($_get$$)) { | |
return $_get$$; | |
} | |
if (Symbol.iterator in Object($_get$$)) { | |
var $_slicedToArray$$ = [], $_quillDelta2$$ = !0, $Code___webpack_require__$jscomp$13__text$$ = !1, $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = void 0; | |
try { | |
for (var $_inline$jscomp$1__inline2$$ = $_get$$[Symbol.iterator](), $_text2$$; !($_quillDelta2$$ = ($_text2$$ = $_inline$jscomp$1__inline2$$.next()).done) && ($_slicedToArray$$.push($_text2$$.value), !$_createClass$$ || $_slicedToArray$$.length !== $_createClass$$); $_quillDelta2$$ = !0) { | |
} | |
} catch ($err$$) { | |
$Code___webpack_require__$jscomp$13__text$$ = !0, $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$_quillDelta2$$ && $_inline$jscomp$1__inline2$$["return"]) { | |
$_inline$jscomp$1__inline2$$["return"](); | |
} | |
} finally { | |
if ($Code___webpack_require__$jscomp$13__text$$) { | |
throw $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$; | |
} | |
} | |
} | |
return $_slicedToArray$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $_get$$($_get$$, $_createClass$$) { | |
for (var $_slicedToArray$$ = 0; $_slicedToArray$$ < $_createClass$$.length; $_slicedToArray$$++) { | |
var $_quillDelta2$$ = $_createClass$$[$_slicedToArray$$]; | |
$_quillDelta2$$.enumerable = $_quillDelta2$$.enumerable || !1; | |
$_quillDelta2$$.configurable = !0; | |
"value" in $_quillDelta2$$ && ($_quillDelta2$$.writable = !0); | |
Object.defineProperty($_get$$, $_quillDelta2$$.key, $_quillDelta2$$); | |
} | |
} | |
return function($_createClass$$, $_slicedToArray$$, $_quillDelta2$$) { | |
$_slicedToArray$$ && $_get$$($_createClass$$.prototype, $_slicedToArray$$); | |
$_quillDelta2$$ && $_get$$($_createClass$$, $_quillDelta2$$); | |
return $_createClass$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_createClass$$, $_slicedToArray$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_quillDelta2$$ = Object.getOwnPropertyDescriptor($_get$$, $_createClass$$); | |
if (void 0 === $_quillDelta2$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_createClass$$, $_slicedToArray$$); | |
} | |
} else { | |
if ("value" in $_quillDelta2$$) { | |
return $_quillDelta2$$.value; | |
} | |
$_createClass$$ = $_quillDelta2$$.get; | |
return void 0 === $_createClass$$ ? void 0 : $_createClass$$.call($_slicedToArray$$); | |
} | |
}; | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = $Code___webpack_require__$jscomp$13__text$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$); | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = $Code___webpack_require__$jscomp$13__text$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$); | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = $Code___webpack_require__$jscomp$13__text$$(4); | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = $_interopRequireDefault$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$); | |
var $_inline$jscomp$1__inline2$$ = $Code___webpack_require__$jscomp$13__text$$(6); | |
$_inline$jscomp$1__inline2$$ = $_interopRequireDefault$$($_inline$jscomp$1__inline2$$); | |
$Code___webpack_require__$jscomp$13__text$$ = $Code___webpack_require__$jscomp$13__text$$(7); | |
var $_text2$$ = $_interopRequireDefault$$($Code___webpack_require__$jscomp$13__text$$); | |
$Code___webpack_require__$jscomp$13__text$$ = function($_get$$) { | |
function $_createClass$$() { | |
$_classCallCheck$$(this, $_createClass$$); | |
return $_possibleConstructorReturn$$(this, ($_createClass$$.__proto__ || Object.getPrototypeOf($_createClass$$)).apply(this, arguments)); | |
} | |
$_inherits$$($_createClass$$, $_get$$); | |
return $_createClass$$; | |
}($_inline$jscomp$1__inline2$$.default); | |
$Code___webpack_require__$jscomp$13__text$$.blotName = "code"; | |
$Code___webpack_require__$jscomp$13__text$$.tagName = "CODE"; | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ = function($Code___webpack_require__$jscomp$13__text$$) { | |
function $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$() { | |
$_classCallCheck$$(this, $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$); | |
return $_possibleConstructorReturn$$(this, ($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.__proto__ || Object.getPrototypeOf($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$)).apply(this, arguments)); | |
} | |
$_inherits$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$, $Code___webpack_require__$jscomp$13__text$$); | |
$_createClass$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$, [{key:"delta", value:function() { | |
var $_get$$ = this, $_createClass$$ = this.domNode.textContent; | |
$_createClass$$.endsWith("\n") && ($_createClass$$ = $_createClass$$.slice(0, -1)); | |
return $_createClass$$.split("\n").reduce(function($_createClass$$, $_slicedToArray$$) { | |
return $_createClass$$.insert($_slicedToArray$$).insert("\n", $_get$$.formats()); | |
}, new $_quillDelta2$$.default); | |
}}, {key:"format", value:function($_createClass$$, $_quillDelta2$$) { | |
if ($_createClass$$ !== this.statics.blotName || !$_quillDelta2$$) { | |
var $Code___webpack_require__$jscomp$13__text$$ = this.descendant($_text2$$.default, this.length() - 1); | |
$Code___webpack_require__$jscomp$13__text$$ = $_slicedToArray$$($Code___webpack_require__$jscomp$13__text$$, 1)[0]; | |
null != $Code___webpack_require__$jscomp$13__text$$ && $Code___webpack_require__$jscomp$13__text$$.deleteAt($Code___webpack_require__$jscomp$13__text$$.length() - 1, 1); | |
$_get$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype.__proto__ || Object.getPrototypeOf($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype), "format", this).call(this, $_createClass$$, $_quillDelta2$$); | |
} | |
}}, {key:"formatAt", value:function($_get$$, $_createClass$$, $_slicedToArray$$, $_quillDelta2$$) { | |
if (0 !== $_createClass$$ && null != $_parchment2$$.default.query($_slicedToArray$$, $_parchment2$$.default.Scope.BLOCK) && ($_slicedToArray$$ !== this.statics.blotName || $_quillDelta2$$ !== this.statics.formats(this.domNode))) { | |
var $Code___webpack_require__$jscomp$13__text$$ = this.newlineIndex($_get$$); | |
if (!(0 > $Code___webpack_require__$jscomp$13__text$$ || $Code___webpack_require__$jscomp$13__text$$ >= $_get$$ + $_createClass$$)) { | |
var $_inline$jscomp$1__inline2$$ = this.newlineIndex($_get$$, !0) + 1; | |
$Code___webpack_require__$jscomp$13__text$$ = $Code___webpack_require__$jscomp$13__text$$ - $_inline$jscomp$1__inline2$$ + 1; | |
var $_text2$$ = this.isolate($_inline$jscomp$1__inline2$$, $Code___webpack_require__$jscomp$13__text$$), $_inherits$$ = $_text2$$.next; | |
$_text2$$.format($_slicedToArray$$, $_quillDelta2$$); | |
$_inherits$$ instanceof $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$ && $_inherits$$.formatAt(0, $_get$$ - $_inline$jscomp$1__inline2$$ + $_createClass$$ - $Code___webpack_require__$jscomp$13__text$$, $_slicedToArray$$, $_quillDelta2$$); | |
} | |
} | |
}}, {key:"insertAt", value:function($_get$$, $_createClass$$, $_quillDelta2$$) { | |
null == $_quillDelta2$$ && ($_get$$ = this.descendant($_text2$$.default, $_get$$), $_get$$ = $_slicedToArray$$($_get$$, 2), $_get$$[0].insertAt($_get$$[1], $_createClass$$)); | |
}}, {key:"length", value:function() { | |
var $_get$$ = this.domNode.textContent.length; | |
return this.domNode.textContent.endsWith("\n") ? $_get$$ : $_get$$ + 1; | |
}}, {key:"newlineIndex", value:function($_get$$) { | |
if (1 < arguments.length && void 0 !== arguments[1] && arguments[1]) { | |
return this.domNode.textContent.slice(0, $_get$$).lastIndexOf("\n"); | |
} | |
var $_createClass$$ = this.domNode.textContent.slice($_get$$).indexOf("\n"); | |
return -1 < $_createClass$$ ? $_get$$ + $_createClass$$ : -1; | |
}}, {key:"optimize", value:function($_createClass$$) { | |
this.domNode.textContent.endsWith("\n") || this.appendChild($_parchment2$$.default.create("text", "\n")); | |
$_get$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype.__proto__ || Object.getPrototypeOf($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype), "optimize", this).call(this, $_createClass$$); | |
var $_slicedToArray$$ = this.next; | |
null != $_slicedToArray$$ && $_slicedToArray$$.prev === this && $_slicedToArray$$.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === $_slicedToArray$$.statics.formats($_slicedToArray$$.domNode) && ($_slicedToArray$$.optimize($_createClass$$), $_slicedToArray$$.moveChildren(this), $_slicedToArray$$.remove()); | |
}}, {key:"replace", value:function($_createClass$$) { | |
$_get$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype.__proto__ || Object.getPrototypeOf($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.prototype), "replace", this).call(this, $_createClass$$); | |
[].slice.call(this.domNode.querySelectorAll("*")).forEach(function($_get$$) { | |
var $_createClass$$ = $_parchment2$$.default.find($_get$$); | |
null == $_createClass$$ ? $_get$$.parentNode.removeChild($_get$$) : $_createClass$$ instanceof $_parchment2$$.default.Embed ? $_createClass$$.remove() : $_createClass$$.unwrap(); | |
}); | |
}}], [{key:"create", value:function($_createClass$$) { | |
$_createClass$$ = $_get$$($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.__proto__ || Object.getPrototypeOf($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$), "create", this).call(this, $_createClass$$); | |
$_createClass$$.setAttribute("spellcheck", !1); | |
return $_createClass$$; | |
}}, {key:"formats", value:function() { | |
return !0; | |
}}]); | |
return $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$; | |
}($CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.default); | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.blotName = "code-block"; | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.tagName = "PRE"; | |
$CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$.TAB = " "; | |
$exports$$.Code = $Code___webpack_require__$jscomp$13__text$$; | |
$exports$$.default = $CodeBlock__block__block2__parchment$jscomp$4__quillDelta$jscomp$2_module$$; | |
}, function($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$, $exports$$, $Editor___webpack_require__$jscomp$14__extend$$) { | |
function $_interopRequireDefault$$($_createClass$$) { | |
return $_createClass$$ && $_createClass$$.__esModule ? $_createClass$$ : {default:$_createClass$$}; | |
} | |
function $_defineProperty$$($_createClass$$, $_slicedToArray$$, $_typeof$$) { | |
$_slicedToArray$$ in $_createClass$$ ? Object.defineProperty($_createClass$$, $_slicedToArray$$, {value:$_typeof$$, enumerable:!0, configurable:!0, writable:!0}) : $_createClass$$[$_slicedToArray$$] = $_typeof$$; | |
return $_createClass$$; | |
} | |
function $combineFormats$$($_createClass$$, $_slicedToArray$$) { | |
return Object.keys($_slicedToArray$$).reduce(function($_typeof$$, $_quillDelta2$$) { | |
if (null == $_createClass$$[$_quillDelta2$$]) { | |
return $_typeof$$; | |
} | |
$_slicedToArray$$[$_quillDelta2$$] === $_createClass$$[$_quillDelta2$$] ? $_typeof$$[$_quillDelta2$$] = $_slicedToArray$$[$_quillDelta2$$] : Array.isArray($_slicedToArray$$[$_quillDelta2$$]) ? 0 > $_slicedToArray$$[$_quillDelta2$$].indexOf($_createClass$$[$_quillDelta2$$]) && ($_typeof$$[$_quillDelta2$$] = $_slicedToArray$$[$_quillDelta2$$].concat([$_createClass$$[$_quillDelta2$$]])) : $_typeof$$[$_quillDelta2$$] = [$_slicedToArray$$[$_quillDelta2$$], $_createClass$$[$_quillDelta2$$]]; | |
return $_typeof$$; | |
}, {}); | |
} | |
function $normalizeDelta$$($_createClass$$) { | |
return $_createClass$$.reduce(function($_createClass$$, $_slicedToArray$$) { | |
if (1 === $_slicedToArray$$.insert) { | |
var $_typeof$$ = (0, $_clone2$$.default)($_slicedToArray$$.attributes); | |
delete $_typeof$$.image; | |
return $_createClass$$.insert({image:$_slicedToArray$$.attributes.image}, $_typeof$$); | |
} | |
null == $_slicedToArray$$.attributes || !0 !== $_slicedToArray$$.attributes.list && !0 !== $_slicedToArray$$.attributes.bullet || ($_slicedToArray$$ = (0, $_clone2$$.default)($_slicedToArray$$), $_slicedToArray$$.attributes.list ? $_slicedToArray$$.attributes.list = "ordered" : ($_slicedToArray$$.attributes.list = "bullet", delete $_slicedToArray$$.attributes.bullet)); | |
return "string" === typeof $_slicedToArray$$.insert ? ($_typeof$$ = $_slicedToArray$$.insert.replace(/\r\n/g, "\n").replace(/\r/g, "\n"), $_createClass$$.insert($_typeof$$, $_slicedToArray$$.attributes)) : $_createClass$$.push($_slicedToArray$$); | |
}, new $_quillDelta2$$.default); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_typeof$$ = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function($_createClass$$) { | |
return typeof $_createClass$$; | |
} : function($_createClass$$) { | |
return $_createClass$$ && "function" === typeof Symbol && $_createClass$$.constructor === Symbol && $_createClass$$ !== Symbol.prototype ? "symbol" : typeof $_createClass$$; | |
}, $_slicedToArray$$ = function() { | |
return function($_createClass$$, $_slicedToArray$$) { | |
if (Array.isArray($_createClass$$)) { | |
return $_createClass$$; | |
} | |
if (Symbol.iterator in Object($_createClass$$)) { | |
var $_typeof$$ = [], $_quillDelta2$$ = !0, $Editor___webpack_require__$jscomp$14__extend$$ = !1, $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = void 0; | |
try { | |
for (var $_parchment2$$ = $_createClass$$[Symbol.iterator](), $_code2$$; !($_quillDelta2$$ = ($_code2$$ = $_parchment2$$.next()).done) && ($_typeof$$.push($_code2$$.value), !$_slicedToArray$$ || $_typeof$$.length !== $_slicedToArray$$); $_quillDelta2$$ = !0) { | |
} | |
} catch ($err$$) { | |
$Editor___webpack_require__$jscomp$14__extend$$ = !0, $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$_quillDelta2$$ && $_parchment2$$["return"]) { | |
$_parchment2$$["return"](); | |
} | |
} finally { | |
if ($Editor___webpack_require__$jscomp$14__extend$$) { | |
throw $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$; | |
} | |
} | |
} | |
return $_typeof$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $_createClass$$($_createClass$$, $_slicedToArray$$) { | |
for (var $_typeof$$ = 0; $_typeof$$ < $_slicedToArray$$.length; $_typeof$$++) { | |
var $_quillDelta2$$ = $_slicedToArray$$[$_typeof$$]; | |
$_quillDelta2$$.enumerable = $_quillDelta2$$.enumerable || !1; | |
$_quillDelta2$$.configurable = !0; | |
"value" in $_quillDelta2$$ && ($_quillDelta2$$.writable = !0); | |
Object.defineProperty($_createClass$$, $_quillDelta2$$.key, $_quillDelta2$$); | |
} | |
} | |
return function($_slicedToArray$$, $_typeof$$, $_quillDelta2$$) { | |
$_typeof$$ && $_createClass$$($_slicedToArray$$.prototype, $_typeof$$); | |
$_quillDelta2$$ && $_createClass$$($_slicedToArray$$, $_quillDelta2$$); | |
return $_slicedToArray$$; | |
}; | |
}(); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(20); | |
var $_op2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(13); | |
var $_code2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(23); | |
var $_cursor2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$), $_block$$ = $Editor___webpack_require__$jscomp$14__extend$$(4), $_block2$$ = $_interopRequireDefault$$($_block$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(16); | |
var $_break2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(21); | |
var $_clone2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $Editor___webpack_require__$jscomp$14__extend$$(11); | |
var $_deepEqual2$$ = $_interopRequireDefault$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$); | |
$Editor___webpack_require__$jscomp$14__extend$$ = $Editor___webpack_require__$jscomp$14__extend$$(3); | |
var $_extend2$$ = $_interopRequireDefault$$($Editor___webpack_require__$jscomp$14__extend$$), $ASCII$$ = /^[ -~]*$/; | |
$Editor___webpack_require__$jscomp$14__extend$$ = function() { | |
function $Editor___webpack_require__$jscomp$14__extend$$($_createClass$$) { | |
if (!(this instanceof $Editor___webpack_require__$jscomp$14__extend$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
this.scroll = $_createClass$$; | |
this.delta = this.getDelta(); | |
} | |
$_createClass$$($Editor___webpack_require__$jscomp$14__extend$$, [{key:"applyDelta", value:function($_createClass$$) { | |
var $_quillDelta2$$ = this, $Editor___webpack_require__$jscomp$14__extend$$ = !1; | |
this.scroll.update(); | |
var $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = this.scroll.length(); | |
this.scroll.batchStart(); | |
$_createClass$$ = $normalizeDelta$$($_createClass$$); | |
$_createClass$$.reduce(function($_createClass$$, $_code2$$) { | |
var $normalizeDelta$$ = $_code2$$.retain || $_code2$$.delete || $_code2$$.insert.length || 1, $combineFormats$$ = $_code2$$.attributes || {}; | |
if (null != $_code2$$.insert) { | |
if ("string" === typeof $_code2$$.insert) { | |
$_code2$$ = $_code2$$.insert; | |
$_code2$$.endsWith("\n") && $Editor___webpack_require__$jscomp$14__extend$$ && ($Editor___webpack_require__$jscomp$14__extend$$ = !1, $_code2$$ = $_code2$$.slice(0, -1)); | |
$_createClass$$ >= $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ && !$_code2$$.endsWith("\n") && ($Editor___webpack_require__$jscomp$14__extend$$ = !0); | |
$_quillDelta2$$.scroll.insertAt($_createClass$$, $_code2$$); | |
$_code2$$ = $_quillDelta2$$.scroll.line($_createClass$$); | |
$_code2$$ = $_slicedToArray$$($_code2$$, 2); | |
var $_cursor2$$ = $_code2$$[0], $_break2$$ = $_code2$$[1]; | |
$_code2$$ = (0, $_extend2$$.default)({}, (0, $_block$$.bubbleFormats)($_cursor2$$)); | |
$_cursor2$$ instanceof $_block2$$.default && ($_cursor2$$ = $_cursor2$$.descendant($_parchment2$$.default.Leaf, $_break2$$), $_cursor2$$ = $_slicedToArray$$($_cursor2$$, 1)[0], $_code2$$ = (0, $_extend2$$.default)($_code2$$, (0, $_block$$.bubbleFormats)($_cursor2$$))); | |
$combineFormats$$ = $_op2$$.default.attributes.diff($_code2$$, $combineFormats$$) || {}; | |
} else { | |
if ("object" === $_typeof$$($_code2$$.insert)) { | |
$_cursor2$$ = Object.keys($_code2$$.insert)[0]; | |
if (null == $_cursor2$$) { | |
return $_createClass$$; | |
} | |
$_quillDelta2$$.scroll.insertAt($_createClass$$, $_cursor2$$, $_code2$$.insert[$_cursor2$$]); | |
} | |
} | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ += $normalizeDelta$$; | |
} | |
Object.keys($combineFormats$$).forEach(function($_slicedToArray$$) { | |
$_quillDelta2$$.scroll.formatAt($_createClass$$, $normalizeDelta$$, $_slicedToArray$$, $combineFormats$$[$_slicedToArray$$]); | |
}); | |
return $_createClass$$ + $normalizeDelta$$; | |
}, 0); | |
$_createClass$$.reduce(function($_createClass$$, $_slicedToArray$$) { | |
return "number" === typeof $_slicedToArray$$.delete ? ($_quillDelta2$$.scroll.deleteAt($_createClass$$, $_slicedToArray$$.delete), $_createClass$$) : $_createClass$$ + ($_slicedToArray$$.retain || $_slicedToArray$$.insert.length || 1); | |
}, 0); | |
this.scroll.batchEnd(); | |
return this.update($_createClass$$); | |
}}, {key:"deleteText", value:function($_createClass$$, $_slicedToArray$$) { | |
this.scroll.deleteAt($_createClass$$, $_slicedToArray$$); | |
return this.update((new $_quillDelta2$$.default).retain($_createClass$$).delete($_slicedToArray$$)); | |
}}, {key:"formatLine", value:function($_createClass$$, $_slicedToArray$$) { | |
var $_typeof$$ = this, $Editor___webpack_require__$jscomp$14__extend$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; | |
this.scroll.update(); | |
Object.keys($Editor___webpack_require__$jscomp$14__extend$$).forEach(function($_quillDelta2$$) { | |
if (null == $_typeof$$.scroll.whitelist || $_typeof$$.scroll.whitelist[$_quillDelta2$$]) { | |
var $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $_typeof$$.scroll.lines($_createClass$$, Math.max($_slicedToArray$$, 1)), $_parchment2$$ = $_slicedToArray$$; | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.forEach(function($_slicedToArray$$) { | |
var $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $_slicedToArray$$.length(); | |
if ($_slicedToArray$$ instanceof $_code2$$.default) { | |
var $normalizeDelta$$ = $_createClass$$ - $_slicedToArray$$.offset($_typeof$$.scroll), $combineFormats$$ = $_slicedToArray$$.newlineIndex($normalizeDelta$$ + $_parchment2$$) - $normalizeDelta$$ + 1; | |
$_slicedToArray$$.formatAt($normalizeDelta$$, $combineFormats$$, $_quillDelta2$$, $Editor___webpack_require__$jscomp$14__extend$$[$_quillDelta2$$]); | |
} else { | |
$_slicedToArray$$.format($_quillDelta2$$, $Editor___webpack_require__$jscomp$14__extend$$[$_quillDelta2$$]); | |
} | |
$_parchment2$$ -= $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$; | |
}); | |
} | |
}); | |
this.scroll.optimize(); | |
return this.update((new $_quillDelta2$$.default).retain($_createClass$$).retain($_slicedToArray$$, (0, $_clone2$$.default)($Editor___webpack_require__$jscomp$14__extend$$))); | |
}}, {key:"formatText", value:function($_createClass$$, $_slicedToArray$$) { | |
var $_typeof$$ = this, $Editor___webpack_require__$jscomp$14__extend$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; | |
Object.keys($Editor___webpack_require__$jscomp$14__extend$$).forEach(function($_quillDelta2$$) { | |
$_typeof$$.scroll.formatAt($_createClass$$, $_slicedToArray$$, $_quillDelta2$$, $Editor___webpack_require__$jscomp$14__extend$$[$_quillDelta2$$]); | |
}); | |
return this.update((new $_quillDelta2$$.default).retain($_createClass$$).retain($_slicedToArray$$, (0, $_clone2$$.default)($Editor___webpack_require__$jscomp$14__extend$$))); | |
}}, {key:"getContents", value:function($_createClass$$, $_slicedToArray$$) { | |
return this.delta.slice($_createClass$$, $_createClass$$ + $_slicedToArray$$); | |
}}, {key:"getDelta", value:function() { | |
return this.scroll.lines().reduce(function($_createClass$$, $_slicedToArray$$) { | |
return $_createClass$$.concat($_slicedToArray$$.delta()); | |
}, new $_quillDelta2$$.default); | |
}}, {key:"getFormat", value:function($_createClass$$) { | |
var $_typeof$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, $_quillDelta2$$ = [], $Editor___webpack_require__$jscomp$14__extend$$ = []; | |
0 === $_typeof$$ ? this.scroll.path($_createClass$$).forEach(function($_createClass$$) { | |
$_createClass$$ = $_slicedToArray$$($_createClass$$, 1)[0]; | |
$_createClass$$ instanceof $_block2$$.default ? $_quillDelta2$$.push($_createClass$$) : $_createClass$$ instanceof $_parchment2$$.default.Leaf && $Editor___webpack_require__$jscomp$14__extend$$.push($_createClass$$); | |
}) : ($_quillDelta2$$ = this.scroll.lines($_createClass$$, $_typeof$$), $Editor___webpack_require__$jscomp$14__extend$$ = this.scroll.descendants($_parchment2$$.default.Leaf, $_createClass$$, $_typeof$$)); | |
$_typeof$$ = [$_quillDelta2$$, $Editor___webpack_require__$jscomp$14__extend$$].map(function($_createClass$$) { | |
if (0 === $_createClass$$.length) { | |
return {}; | |
} | |
for (var $_slicedToArray$$ = (0, $_block$$.bubbleFormats)($_createClass$$.shift()); 0 < Object.keys($_slicedToArray$$).length;) { | |
var $_typeof$$ = $_createClass$$.shift(); | |
if (null == $_typeof$$) { | |
break; | |
} | |
$_slicedToArray$$ = $combineFormats$$((0, $_block$$.bubbleFormats)($_typeof$$), $_slicedToArray$$); | |
} | |
return $_slicedToArray$$; | |
}); | |
return $_extend2$$.default.apply($_extend2$$.default, $_typeof$$); | |
}}, {key:"getText", value:function($_createClass$$, $_slicedToArray$$) { | |
return this.getContents($_createClass$$, $_slicedToArray$$).filter(function($_createClass$$) { | |
return "string" === typeof $_createClass$$.insert; | |
}).map(function($_createClass$$) { | |
return $_createClass$$.insert; | |
}).join(""); | |
}}, {key:"insertEmbed", value:function($_createClass$$, $_slicedToArray$$, $_typeof$$) { | |
this.scroll.insertAt($_createClass$$, $_slicedToArray$$, $_typeof$$); | |
return this.update((new $_quillDelta2$$.default).retain($_createClass$$).insert($_defineProperty$$({}, $_slicedToArray$$, $_typeof$$))); | |
}}, {key:"insertText", value:function($_createClass$$, $_slicedToArray$$) { | |
var $_typeof$$ = this, $Editor___webpack_require__$jscomp$14__extend$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; | |
$_slicedToArray$$ = $_slicedToArray$$.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); | |
this.scroll.insertAt($_createClass$$, $_slicedToArray$$); | |
Object.keys($Editor___webpack_require__$jscomp$14__extend$$).forEach(function($_quillDelta2$$) { | |
$_typeof$$.scroll.formatAt($_createClass$$, $_slicedToArray$$.length, $_quillDelta2$$, $Editor___webpack_require__$jscomp$14__extend$$[$_quillDelta2$$]); | |
}); | |
return this.update((new $_quillDelta2$$.default).retain($_createClass$$).insert($_slicedToArray$$, (0, $_clone2$$.default)($Editor___webpack_require__$jscomp$14__extend$$))); | |
}}, {key:"isBlank", value:function() { | |
if (0 == this.scroll.children.length) { | |
return !0; | |
} | |
if (1 < this.scroll.children.length) { | |
return !1; | |
} | |
var $_createClass$$ = this.scroll.children.head; | |
return $_createClass$$.statics.blotName !== $_block2$$.default.blotName || 1 < $_createClass$$.children.length ? !1 : $_createClass$$.children.head instanceof $_break2$$.default; | |
}}, {key:"removeFormat", value:function($_createClass$$, $_typeof$$) { | |
var $Editor___webpack_require__$jscomp$14__extend$$ = this.getText($_createClass$$, $_typeof$$), $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = this.scroll.line($_createClass$$ + $_typeof$$), $_parchment2$$ = $_slicedToArray$$($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$, 2); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $_parchment2$$[0]; | |
$_parchment2$$ = $_parchment2$$[1]; | |
var $normalizeDelta$$ = 0, $combineFormats$$ = new $_quillDelta2$$.default; | |
null != $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ && ($normalizeDelta$$ = $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ instanceof $_code2$$.default ? $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.newlineIndex($_parchment2$$) - $_parchment2$$ + 1 : $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.length() - | |
$_parchment2$$, $combineFormats$$ = $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.delta().slice($_parchment2$$, $_parchment2$$ + $normalizeDelta$$ - 1).insert("\n")); | |
$_typeof$$ = this.getContents($_createClass$$, $_typeof$$ + $normalizeDelta$$).diff((new $_quillDelta2$$.default).insert($Editor___webpack_require__$jscomp$14__extend$$).concat($combineFormats$$)); | |
$_createClass$$ = (new $_quillDelta2$$.default).retain($_createClass$$).concat($_typeof$$); | |
return this.applyDelta($_createClass$$); | |
}}, {key:"update", value:function($_createClass$$) { | |
var $_slicedToArray$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [], $_typeof$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0, $Editor___webpack_require__$jscomp$14__extend$$ = this.delta; | |
if (1 === $_slicedToArray$$.length && "characterData" === $_slicedToArray$$[0].type && $_slicedToArray$$[0].target.data.match($ASCII$$) && $_parchment2$$.default.find($_slicedToArray$$[0].target)) { | |
var $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = $_parchment2$$.default.find($_slicedToArray$$[0].target), $_code2$$ = (0, $_block$$.bubbleFormats)($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$), $normalizeDelta$$ = $_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.offset(this.scroll); | |
$_slicedToArray$$ = $_slicedToArray$$[0].oldValue.replace($_cursor2$$.default.CONTENTS, ""); | |
$_slicedToArray$$ = (new $_quillDelta2$$.default).insert($_slicedToArray$$); | |
$_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$ = (new $_quillDelta2$$.default).insert($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$.value()); | |
$_createClass$$ = (new $_quillDelta2$$.default).retain($normalizeDelta$$).concat($_slicedToArray$$.diff($_break$jscomp$1__clone__code__cursor__deepEqual__op__parchment$jscomp$5__quillDelta$jscomp$3_module$$, $_typeof$$)).reduce(function($_createClass$$, $_slicedToArray$$) { | |
return $_slicedToArray$$.insert ? $_createClass$$.insert($_slicedToArray$$.insert, $_code2$$) : $_createClass$$.push($_slicedToArray$$); | |
}, new $_quillDelta2$$.default); | |
this.delta = $Editor___webpack_require__$jscomp$14__extend$$.compose($_createClass$$); | |
} else { | |
this.delta = this.getDelta(), $_createClass$$ && (0, $_deepEqual2$$.default)($Editor___webpack_require__$jscomp$14__extend$$.compose($_createClass$$), this.delta) || ($_createClass$$ = $Editor___webpack_require__$jscomp$14__extend$$.diff(this.delta, $_typeof$$)); | |
} | |
return $_createClass$$; | |
}}]); | |
return $Editor___webpack_require__$jscomp$14__extend$$; | |
}(); | |
$exports$$.default = $Editor___webpack_require__$jscomp$14__extend$$; | |
}, function($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, $exports$$, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$) { | |
function $_interopRequireDefault$$($_parchment2$$) { | |
return $_parchment2$$ && $_parchment2$$.__esModule ? $_parchment2$$ : {default:$_parchment2$$}; | |
} | |
function $_toConsumableArray$$($_parchment2$$) { | |
if (Array.isArray($_parchment2$$)) { | |
for (var $_createClass$$ = 0, $_slicedToArray$$ = Array($_parchment2$$.length); $_createClass$$ < $_parchment2$$.length; $_createClass$$++) { | |
$_slicedToArray$$[$_createClass$$] = $_parchment2$$[$_createClass$$]; | |
} | |
return $_slicedToArray$$; | |
} | |
return Array.from($_parchment2$$); | |
} | |
function $_classCallCheck$$($_parchment2$$, $_createClass$$) { | |
if (!($_parchment2$$ instanceof $_createClass$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $contains$$($_parchment2$$, $_createClass$$) { | |
try { | |
$_createClass$$.parentNode; | |
} catch ($e$$) { | |
return !1; | |
} | |
$_createClass$$ instanceof Text && ($_createClass$$ = $_createClass$$.parentNode); | |
return $_parchment2$$.contains($_createClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.Range = void 0; | |
var $_slicedToArray$$ = function() { | |
return function($_parchment2$$, $_createClass$$) { | |
if (Array.isArray($_parchment2$$)) { | |
return $_parchment2$$; | |
} | |
if (Symbol.iterator in Object($_parchment2$$)) { | |
var $_slicedToArray$$ = [], $_clone2$$ = !0, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = !1, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = void 0; | |
try { | |
for (var $_emitter4$$ = $_parchment2$$[Symbol.iterator](), $debug$$; !($_clone2$$ = ($debug$$ = $_emitter4$$.next()).done) && ($_slicedToArray$$.push($debug$$.value), !$_createClass$$ || $_slicedToArray$$.length !== $_createClass$$); $_clone2$$ = !0) { | |
} | |
} catch ($err$$) { | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = !0, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$_clone2$$ && $_emitter4$$["return"]) { | |
$_emitter4$$["return"](); | |
} | |
} finally { | |
if ($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$) { | |
throw $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$; | |
} | |
} | |
} | |
return $_slicedToArray$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $_parchment2$$($_parchment2$$, $_createClass$$) { | |
for (var $_slicedToArray$$ = 0; $_slicedToArray$$ < $_createClass$$.length; $_slicedToArray$$++) { | |
var $_clone2$$ = $_createClass$$[$_slicedToArray$$]; | |
$_clone2$$.enumerable = $_clone2$$.enumerable || !1; | |
$_clone2$$.configurable = !0; | |
"value" in $_clone2$$ && ($_clone2$$.writable = !0); | |
Object.defineProperty($_parchment2$$, $_clone2$$.key, $_clone2$$); | |
} | |
} | |
return function($_createClass$$, $_slicedToArray$$, $_clone2$$) { | |
$_slicedToArray$$ && $_parchment2$$($_createClass$$.prototype, $_slicedToArray$$); | |
$_clone2$$ && $_parchment2$$($_createClass$$, $_clone2$$); | |
return $_createClass$$; | |
}; | |
}(); | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$(21); | |
var $_clone2$$ = $_interopRequireDefault$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$(11); | |
var $_deepEqual2$$ = $_interopRequireDefault$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$(8); | |
var $_emitter4$$ = $_interopRequireDefault$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$(10); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_interopRequireDefault$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$); | |
var $debug$$ = (0, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.default)("quill:selection"), $Range$jscomp$0$$ = function $Range$$($_parchment2$$) { | |
var $_createClass$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0; | |
$_classCallCheck$$(this, $Range$$); | |
this.index = $_parchment2$$; | |
this.length = $_createClass$$; | |
}; | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = function() { | |
function $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$($_createClass$$, $_slicedToArray$$) { | |
var $_clone2$$ = this; | |
$_classCallCheck$$(this, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$); | |
this.emitter = $_slicedToArray$$; | |
this.scroll = $_createClass$$; | |
this.mouseDown = this.composing = !1; | |
this.root = this.scroll.domNode; | |
this.cursor = $_parchment2$$.default.create("cursor", this); | |
this.lastRange = this.savedRange = new $Range$jscomp$0$$(0, 0); | |
this.handleComposition(); | |
this.handleDragging(); | |
this.emitter.listenDOM("selectionchange", document, function() { | |
$_clone2$$.mouseDown || setTimeout($_clone2$$.update.bind($_clone2$$, $_emitter4$$.default.sources.USER), 1); | |
}); | |
this.emitter.on($_emitter4$$.default.events.EDITOR_CHANGE, function($_parchment2$$, $_createClass$$) { | |
$_parchment2$$ === $_emitter4$$.default.events.TEXT_CHANGE && 0 < $_createClass$$.length() && $_clone2$$.update($_emitter4$$.default.sources.SILENT); | |
}); | |
this.emitter.on($_emitter4$$.default.events.SCROLL_BEFORE_UPDATE, function() { | |
if ($_clone2$$.hasFocus()) { | |
var $_parchment2$$ = $_clone2$$.getNativeRange(); | |
if (null != $_parchment2$$ && $_parchment2$$.start.node !== $_clone2$$.cursor.textNode) { | |
$_clone2$$.emitter.once($_emitter4$$.default.events.SCROLL_UPDATE, function() { | |
try { | |
$_clone2$$.setNativeRange($_parchment2$$.start.node, $_parchment2$$.start.offset, $_parchment2$$.end.node, $_parchment2$$.end.offset); | |
} catch ($ignored$$) { | |
} | |
}); | |
} | |
} | |
}); | |
this.emitter.on($_emitter4$$.default.events.SCROLL_OPTIMIZE, function($_parchment2$$, $_createClass$$) { | |
$_createClass$$.range && ($_parchment2$$ = $_createClass$$.range, $_clone2$$.setNativeRange($_parchment2$$.startNode, $_parchment2$$.startOffset, $_parchment2$$.endNode, $_parchment2$$.endOffset)); | |
}); | |
this.update($_emitter4$$.default.sources.SILENT); | |
} | |
$_createClass$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$, [{key:"handleComposition", value:function() { | |
var $_parchment2$$ = this; | |
this.root.addEventListener("compositionstart", function() { | |
$_parchment2$$.composing = !0; | |
}); | |
this.root.addEventListener("compositionend", function() { | |
$_parchment2$$.composing = !1; | |
if ($_parchment2$$.cursor.parent) { | |
var $_createClass$$ = $_parchment2$$.cursor.restore(); | |
$_createClass$$ && setTimeout(function() { | |
$_parchment2$$.setNativeRange($_createClass$$.startNode, $_createClass$$.startOffset, $_createClass$$.endNode, $_createClass$$.endOffset); | |
}, 1); | |
} | |
}); | |
}}, {key:"handleDragging", value:function() { | |
var $_parchment2$$ = this; | |
this.emitter.listenDOM("mousedown", document.body, function() { | |
$_parchment2$$.mouseDown = !0; | |
}); | |
this.emitter.listenDOM("mouseup", document.body, function() { | |
$_parchment2$$.mouseDown = !1; | |
$_parchment2$$.update($_emitter4$$.default.sources.USER); | |
}); | |
}}, {key:"focus", value:function() { | |
this.hasFocus() || (this.root.focus(), this.setRange(this.savedRange)); | |
}}, {key:"format", value:function($_createClass$$, $_slicedToArray$$) { | |
if (null == this.scroll.whitelist || this.scroll.whitelist[$_createClass$$]) { | |
this.scroll.update(); | |
var $_clone2$$ = this.getNativeRange(); | |
if (null != $_clone2$$ && $_clone2$$.native.collapsed && !$_parchment2$$.default.query($_createClass$$, $_parchment2$$.default.Scope.BLOCK)) { | |
if ($_clone2$$.start.node !== this.cursor.textNode) { | |
var $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_parchment2$$.default.find($_clone2$$.start.node, !1); | |
if (null == $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$) { | |
return; | |
} | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ instanceof $_parchment2$$.default.Leaf ? ($_clone2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.split($_clone2$$.start.offset), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.parent.insertBefore(this.cursor, $_clone2$$)) : $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.insertBefore(this.cursor, $_clone2$$.start.node); | |
this.cursor.attach(); | |
} | |
this.cursor.format($_createClass$$, $_slicedToArray$$); | |
this.scroll.optimize(); | |
this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length); | |
this.update(); | |
} | |
} | |
}}, {key:"getBounds", value:function($_parchment2$$) { | |
var $_createClass$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, $_clone2$$ = this.scroll.length(); | |
$_parchment2$$ = Math.min($_parchment2$$, $_clone2$$ - 1); | |
$_createClass$$ = Math.min($_parchment2$$ + $_createClass$$, $_clone2$$ - 1) - $_parchment2$$; | |
$_clone2$$ = this.scroll.leaf($_parchment2$$); | |
var $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_slicedToArray$$($_clone2$$, 2); | |
$_clone2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[0]; | |
var $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[1]; | |
if (null == $_clone2$$) { | |
return null; | |
} | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_clone2$$.position($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, !0); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_slicedToArray$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$, 2); | |
var $_emitter4$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[0]; | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[1]; | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = document.createRange(); | |
if (0 < $_createClass$$) { | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setStart($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$_createClass$$ = this.scroll.leaf($_parchment2$$ + $_createClass$$); | |
$_createClass$$ = $_slicedToArray$$($_createClass$$, 2); | |
$_clone2$$ = $_createClass$$[0]; | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_createClass$$[1]; | |
if (null == $_clone2$$) { | |
return null; | |
} | |
$_createClass$$ = $_clone2$$.position($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, !0); | |
$_createClass$$ = $_slicedToArray$$($_createClass$$, 2); | |
$_emitter4$$ = $_createClass$$[0]; | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_createClass$$[1]; | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setEnd($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
return $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.getBoundingClientRect(); | |
} | |
$_createClass$$ = "left"; | |
$_emitter4$$ instanceof Text ? ($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ < $_emitter4$$.data.length ? ($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setStart($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setEnd($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ + | |
1)) : ($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setStart($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ - 1), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setEnd($_emitter4$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$), $_createClass$$ = "right"), $_clone2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.getBoundingClientRect()) : | |
($_clone2$$ = $_clone2$$.domNode.getBoundingClientRect(), 0 < $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ && ($_createClass$$ = "right")); | |
return {bottom:$_clone2$$.top + $_clone2$$.height, height:$_clone2$$.height, left:$_clone2$$[$_createClass$$], right:$_clone2$$[$_createClass$$], top:$_clone2$$.top, width:0}; | |
}}, {key:"getNativeRange", value:function() { | |
var $_parchment2$$ = document.getSelection(); | |
if (null == $_parchment2$$ || 0 >= $_parchment2$$.rangeCount) { | |
return null; | |
} | |
$_parchment2$$ = $_parchment2$$.getRangeAt(0); | |
if (null == $_parchment2$$) { | |
return null; | |
} | |
$_parchment2$$ = this.normalizeNative($_parchment2$$); | |
$debug$$.info("getNativeRange", $_parchment2$$); | |
return $_parchment2$$; | |
}}, {key:"getRange", value:function() { | |
var $_parchment2$$ = this.getNativeRange(); | |
return null == $_parchment2$$ ? [null, null] : [this.normalizedToRange($_parchment2$$), $_parchment2$$]; | |
}}, {key:"hasFocus", value:function() { | |
return document.activeElement === this.root; | |
}}, {key:"normalizedToRange", value:function($_createClass$$) { | |
var $_clone2$$ = this, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = [[$_createClass$$.start.node, $_createClass$$.start.offset]]; | |
$_createClass$$.native.collapsed || $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.push([$_createClass$$.end.node, $_createClass$$.end.offset]); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.map(function($_createClass$$) { | |
var $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_slicedToArray$$($_createClass$$, 2); | |
$_createClass$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[0]; | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[1]; | |
var $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_parchment2$$.default.find($_createClass$$, !0), $_emitter4$$ = $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.offset($_clone2$$.scroll); | |
return 0 === $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ ? $_emitter4$$ : $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ instanceof $_parchment2$$.default.Container ? $_emitter4$$ + $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.length() : $_emitter4$$ + $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.index($_createClass$$, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$); | |
}); | |
$_createClass$$ = Math.min(Math.max.apply(Math, $_toConsumableArray$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$)), this.scroll.length() - 1); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = Math.min.apply(Math, [$_createClass$$].concat($_toConsumableArray$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$))); | |
return new $Range$jscomp$0$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$, $_createClass$$ - $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$); | |
}}, {key:"normalizeNative", value:function($_parchment2$$) { | |
if (!$contains$$(this.root, $_parchment2$$.startContainer) || !$_parchment2$$.collapsed && !$contains$$(this.root, $_parchment2$$.endContainer)) { | |
return null; | |
} | |
$_parchment2$$ = {start:{node:$_parchment2$$.startContainer, offset:$_parchment2$$.startOffset}, end:{node:$_parchment2$$.endContainer, offset:$_parchment2$$.endOffset}, native:$_parchment2$$}; | |
[$_parchment2$$.start, $_parchment2$$.end].forEach(function($_parchment2$$) { | |
for (var $_createClass$$ = $_parchment2$$.node, $_slicedToArray$$ = $_parchment2$$.offset; !($_createClass$$ instanceof Text) && 0 < $_createClass$$.childNodes.length;) { | |
if ($_createClass$$.childNodes.length > $_slicedToArray$$) { | |
$_createClass$$ = $_createClass$$.childNodes[$_slicedToArray$$], $_slicedToArray$$ = 0; | |
} else { | |
if ($_createClass$$.childNodes.length === $_slicedToArray$$) { | |
$_createClass$$ = $_createClass$$.lastChild, $_slicedToArray$$ = $_createClass$$ instanceof Text ? $_createClass$$.data.length : $_createClass$$.childNodes.length + 1; | |
} else { | |
break; | |
} | |
} | |
} | |
$_parchment2$$.node = $_createClass$$; | |
$_parchment2$$.offset = $_slicedToArray$$; | |
}); | |
return $_parchment2$$; | |
}}, {key:"rangeToNative", value:function($_parchment2$$) { | |
var $_createClass$$ = this; | |
$_parchment2$$ = $_parchment2$$.collapsed ? [$_parchment2$$.index] : [$_parchment2$$.index, $_parchment2$$.index + $_parchment2$$.length]; | |
var $_clone2$$ = [], $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = this.scroll.length(); | |
$_parchment2$$.forEach(function($_parchment2$$, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$) { | |
$_parchment2$$ = Math.min($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ - 1, $_parchment2$$); | |
$_parchment2$$ = $_createClass$$.scroll.leaf($_parchment2$$); | |
var $_emitter4$$ = $_slicedToArray$$($_parchment2$$, 2); | |
$_parchment2$$ = $_emitter4$$[1]; | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_emitter4$$[0].position($_parchment2$$, 0 !== $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$); | |
$_parchment2$$ = $_slicedToArray$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, 2); | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_parchment2$$[0]; | |
$_parchment2$$ = $_parchment2$$[1]; | |
$_clone2$$.push($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, $_parchment2$$); | |
}); | |
2 > $_clone2$$.length && ($_clone2$$ = $_clone2$$.concat($_clone2$$)); | |
return $_clone2$$; | |
}}, {key:"scrollIntoView", value:function($_parchment2$$) { | |
var $_createClass$$ = this.lastRange; | |
if (null != $_createClass$$) { | |
var $_clone2$$ = this.getBounds($_createClass$$.index, $_createClass$$.length); | |
if (null != $_clone2$$) { | |
var $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = this.scroll.length() - 1, $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = this.scroll.line(Math.min($_createClass$$.index, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$)), $_emitter4$$ = $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $_slicedToArray$$($_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$, | |
1)[0]; | |
0 < $_createClass$$.length && ($_createClass$$ = this.scroll.line(Math.min($_createClass$$.index + $_createClass$$.length, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$)), $_emitter4$$ = $_slicedToArray$$($_createClass$$, 1)[0]); | |
null != $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ && null != $_emitter4$$ && ($_createClass$$ = $_parchment2$$.getBoundingClientRect(), $_clone2$$.top < $_createClass$$.top ? $_parchment2$$.scrollTop -= $_createClass$$.top - $_clone2$$.top : $_clone2$$.bottom > $_createClass$$.bottom && ($_parchment2$$.scrollTop += $_clone2$$.bottom - $_createClass$$.bottom)); | |
} | |
} | |
}}, {key:"setNativeRange", value:function($_parchment2$$, $_createClass$$) { | |
var $_slicedToArray$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : $_parchment2$$, $_clone2$$ = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : $_createClass$$, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : !1; | |
$debug$$.info("setNativeRange", $_parchment2$$, $_createClass$$, $_slicedToArray$$, $_clone2$$); | |
if (null == $_parchment2$$ || null != this.root.parentNode && null != $_parchment2$$.parentNode && null != $_slicedToArray$$.parentNode) { | |
var $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = document.getSelection(); | |
if (null != $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$) { | |
if (null != $_parchment2$$) { | |
this.hasFocus() || this.root.focus(); | |
var $_emitter4$$ = (this.getNativeRange() || {}).native; | |
if (null == $_emitter4$$ || $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ || $_parchment2$$ !== $_emitter4$$.startContainer || $_createClass$$ !== $_emitter4$$.startOffset || $_slicedToArray$$ !== $_emitter4$$.endContainer || $_clone2$$ !== $_emitter4$$.endOffset) { | |
"BR" == $_parchment2$$.tagName && ($_createClass$$ = [].indexOf.call($_parchment2$$.parentNode.childNodes, $_parchment2$$), $_parchment2$$ = $_parchment2$$.parentNode), "BR" == $_slicedToArray$$.tagName && ($_clone2$$ = [].indexOf.call($_slicedToArray$$.parentNode.childNodes, $_slicedToArray$$), $_slicedToArray$$ = $_slicedToArray$$.parentNode), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = document.createRange(), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setStart($_parchment2$$, | |
$_createClass$$), $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$.setEnd($_slicedToArray$$, $_clone2$$), $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.removeAllRanges(), $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.addRange($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$); | |
} | |
} else { | |
$_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.removeAllRanges(), this.root.blur(), document.body.focus(); | |
} | |
} | |
} | |
}}, {key:"setRange", value:function($_parchment2$$) { | |
var $_createClass$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1, $_slicedToArray$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : $_emitter4$$.default.sources.API; | |
"string" === typeof $_createClass$$ && ($_slicedToArray$$ = $_createClass$$, $_createClass$$ = !1); | |
$debug$$.info("setRange", $_parchment2$$); | |
if (null != $_parchment2$$) { | |
var $_clone2$$ = this.rangeToNative($_parchment2$$); | |
this.setNativeRange.apply(this, $_toConsumableArray$$($_clone2$$).concat([$_createClass$$])); | |
} else { | |
this.setNativeRange(null); | |
} | |
this.update($_slicedToArray$$); | |
}}, {key:"update", value:function() { | |
var $_parchment2$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : $_emitter4$$.default.sources.USER, $_createClass$$ = this.lastRange, $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = this.getRange(); | |
$Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$ = $_slicedToArray$$($Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$, 2); | |
var $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[1]; | |
this.lastRange = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$[0]; | |
null != this.lastRange && (this.savedRange = this.lastRange); | |
if (!(0, $_deepEqual2$$.default)($_createClass$$, this.lastRange)) { | |
var $debug$$; | |
!this.composing && null != $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$ && $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.native.collapsed && $_clone$jscomp$1__deepEqual$jscomp$1__emitter3$jscomp$1__parchment$jscomp$6_module$$.start.node !== this.cursor.textNode && this.cursor.restore(); | |
$_createClass$$ = [$_emitter4$$.default.events.SELECTION_CHANGE, (0, $_clone2$$.default)(this.lastRange), (0, $_clone2$$.default)($_createClass$$), $_parchment2$$]; | |
($debug$$ = this.emitter).emit.apply($debug$$, [$_emitter4$$.default.events.EDITOR_CHANGE].concat($_createClass$$)); | |
if ($_parchment2$$ !== $_emitter4$$.default.sources.SILENT) { | |
var $contains$$; | |
($contains$$ = this.emitter).emit.apply($contains$$, $_createClass$$); | |
} | |
} | |
}}]); | |
return $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$; | |
}(); | |
$exports$$.Range = $Range$jscomp$0$$; | |
$exports$$.default = $Selection$jscomp$1___webpack_require__$jscomp$15__logger$jscomp$2__logger2$$; | |
}, function($Break__parchment$jscomp$7_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $superClass$$) : $__webpack_require__$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($target$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $descriptor$$ = $props$$[$i$$]; | |
$descriptor$$.enumerable = $descriptor$$.enumerable || !1; | |
$descriptor$$.configurable = !0; | |
"value" in $descriptor$$ && ($descriptor$$.writable = !0); | |
Object.defineProperty($target$$, $descriptor$$.key, $descriptor$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$5_parent$$, $getter$jscomp$6_property$$, $receiver$$) { | |
null === $object$jscomp$5_parent$$ && ($object$jscomp$5_parent$$ = Function.prototype); | |
var $__webpack_require__$$ = Object.getOwnPropertyDescriptor($object$jscomp$5_parent$$, $getter$jscomp$6_property$$); | |
if (void 0 === $__webpack_require__$$) { | |
if ($object$jscomp$5_parent$$ = Object.getPrototypeOf($object$jscomp$5_parent$$), null !== $object$jscomp$5_parent$$) { | |
return $get$$($object$jscomp$5_parent$$, $getter$jscomp$6_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $__webpack_require__$$) { | |
return $__webpack_require__$$.value; | |
} | |
$getter$jscomp$6_property$$ = $__webpack_require__$$.get; | |
return void 0 === $getter$jscomp$6_property$$ ? void 0 : $getter$jscomp$6_property$$.call($receiver$$); | |
} | |
}; | |
$Break__parchment$jscomp$7_module$$ = $__webpack_require__$$(0); | |
$Break__parchment$jscomp$7_module$$ = function($_Parchment$Embed$$) { | |
function $Break$$() { | |
if (!(this instanceof $Break$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $call$$ = ($Break$$.__proto__ || Object.getPrototypeOf($Break$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? this : $call$$; | |
} | |
$_inherits$$($Break$$, $_Parchment$Embed$$); | |
$_createClass$$($Break$$, [{key:"insertInto", value:function($parent$$, $_Parchment$Embed$$) { | |
0 === $parent$$.children.length ? $_get$$($Break$$.prototype.__proto__ || Object.getPrototypeOf($Break$$.prototype), "insertInto", this).call(this, $parent$$, $_Parchment$Embed$$) : this.remove(); | |
}}, {key:"length", value:function() { | |
return 0; | |
}}, {key:"value", value:function() { | |
return ""; | |
}}], [{key:"value", value:function() { | |
}}]); | |
return $Break$$; | |
}(($Break__parchment$jscomp$7_module$$ && $Break__parchment$jscomp$7_module$$.__esModule ? $Break__parchment$jscomp$7_module$$ : {default:$Break__parchment$jscomp$7_module$$}).default.Embed); | |
$Break__parchment$jscomp$7_module$$.blotName = "break"; | |
$Break__parchment$jscomp$7_module$$.tagName = "BR"; | |
$exports$$.default = $Break__parchment$jscomp$7_module$$; | |
}, function($module$$, $exports$$, $ContainerBlot___webpack_require__$$) { | |
function $makeBlot$$($node$$) { | |
var $blot$$ = $Registry$$.find($node$$); | |
if (null == $blot$$) { | |
try { | |
$blot$$ = $Registry$$.create($node$$); | |
} catch ($e$$) { | |
$blot$$ = $Registry$$.create($Registry$$.Scope.INLINE), [].slice.call($node$$.childNodes).forEach(function($e$$) { | |
$blot$$.domNode.appendChild($e$$); | |
}), $node$$.parentNode && $node$$.parentNode.replaceChild($blot$$.domNode, $node$$), $blot$$.attach(); | |
} | |
} | |
return $blot$$; | |
} | |
var $__extends$$ = this && this.__extends || function() { | |
var $extendStatics$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($d$$, $b$$) { | |
$d$$.__proto__ = $b$$; | |
} || function($d$$, $b$$) { | |
for (var $extendStatics$$ in $b$$) { | |
$b$$.hasOwnProperty($extendStatics$$) && ($d$$[$extendStatics$$] = $b$$[$extendStatics$$]); | |
} | |
}; | |
return function($d$$, $b$$) { | |
function $__$$() { | |
this.constructor = $d$$; | |
} | |
$extendStatics$$($d$$, $b$$); | |
$d$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $linked_list_1$$ = $ContainerBlot___webpack_require__$$(44); | |
$module$$ = $ContainerBlot___webpack_require__$$(29); | |
var $Registry$$ = $ContainerBlot___webpack_require__$$(1); | |
$ContainerBlot___webpack_require__$$ = function($_super$$) { | |
function $ContainerBlot$$($_this$jscomp$5_domNode$$) { | |
$_this$jscomp$5_domNode$$ = $_super$$.call(this, $_this$jscomp$5_domNode$$) || this; | |
$_this$jscomp$5_domNode$$.build(); | |
return $_this$jscomp$5_domNode$$; | |
} | |
$__extends$$($ContainerBlot$$, $_super$$); | |
$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; | |
[].slice.call(this.domNode.childNodes).reverse().forEach(function($ContainerBlot$$) { | |
try { | |
var $_super$$ = $makeBlot$$($ContainerBlot$$); | |
$_this$$.insertBefore($_super$$, $_this$$.children.head || void 0); | |
} catch ($err$$) { | |
if (!($err$$ instanceof $Registry$$.ParchmentError)) { | |
throw $err$$; | |
} | |
} | |
}); | |
}; | |
$ContainerBlot$$.prototype.deleteAt = function($index$$, $ContainerBlot$$) { | |
if (0 === $index$$ && $ContainerBlot$$ === this.length()) { | |
return this.remove(); | |
} | |
this.children.forEachAt($index$$, $ContainerBlot$$, function($index$$, $ContainerBlot$$, $_super$$) { | |
$index$$.deleteAt($ContainerBlot$$, $_super$$); | |
}); | |
}; | |
$ContainerBlot$$.prototype.descendant = function($criteria$$, $_super$$) { | |
var $child$jscomp$5_index$$ = this.children.find($_super$$); | |
$_super$$ = $child$jscomp$5_index$$[0]; | |
$child$jscomp$5_index$$ = $child$jscomp$5_index$$[1]; | |
return null == $criteria$$.blotName && $criteria$$($_super$$) || null != $criteria$$.blotName && $_super$$ instanceof $criteria$$ ? [$_super$$, $child$jscomp$5_index$$] : $_super$$ instanceof $ContainerBlot$$ ? $_super$$.descendant($criteria$$, $child$jscomp$5_index$$) : [null, -1]; | |
}; | |
$ContainerBlot$$.prototype.descendants = function($criteria$$, $_super$$, $ContainerBlot___webpack_require__$$) { | |
void 0 === $_super$$ && ($_super$$ = 0); | |
void 0 === $ContainerBlot___webpack_require__$$ && ($ContainerBlot___webpack_require__$$ = Number.MAX_VALUE); | |
var $index$jscomp$0$$ = [], $module$$ = $ContainerBlot___webpack_require__$$; | |
this.children.forEachAt($_super$$, $ContainerBlot___webpack_require__$$, function($_super$$, $ContainerBlot___webpack_require__$$, $descendants$$) { | |
(null == $criteria$$.blotName && $criteria$$($_super$$) || null != $criteria$$.blotName && $_super$$ instanceof $criteria$$) && $index$jscomp$0$$.push($_super$$); | |
$_super$$ instanceof $ContainerBlot$$ && ($index$jscomp$0$$ = $index$jscomp$0$$.concat($_super$$.descendants($criteria$$, $ContainerBlot___webpack_require__$$, $module$$))); | |
$module$$ -= $descendants$$; | |
}); | |
return $index$jscomp$0$$; | |
}; | |
$ContainerBlot$$.prototype.detach = function() { | |
this.children.forEach(function($child$$) { | |
$child$$.detach(); | |
}); | |
$_super$$.prototype.detach.call(this); | |
}; | |
$ContainerBlot$$.prototype.formatAt = function($index$$, $ContainerBlot$$, $_super$$, $ContainerBlot___webpack_require__$$) { | |
this.children.forEachAt($index$$, $ContainerBlot$$, function($index$$, $ContainerBlot$$, $length$jscomp$0$$) { | |
$index$$.formatAt($ContainerBlot$$, $length$jscomp$0$$, $_super$$, $ContainerBlot___webpack_require__$$); | |
}); | |
}; | |
$ContainerBlot$$.prototype.insertAt = function($child$jscomp$9_index$$, $ContainerBlot$$, $_super$$) { | |
var $blot$jscomp$11_value$$ = this.children.find($child$jscomp$9_index$$); | |
$child$jscomp$9_index$$ = $blot$jscomp$11_value$$[0]; | |
$blot$jscomp$11_value$$ = $blot$jscomp$11_value$$[1]; | |
$child$jscomp$9_index$$ ? $child$jscomp$9_index$$.insertAt($blot$jscomp$11_value$$, $ContainerBlot$$, $_super$$) : ($ContainerBlot$$ = null == $_super$$ ? $Registry$$.create("text", $ContainerBlot$$) : $Registry$$.create($ContainerBlot$$, $_super$$), this.appendChild($ContainerBlot$$)); | |
}; | |
$ContainerBlot$$.prototype.insertBefore = function($childBlot$$, $ContainerBlot$$) { | |
if (null != this.statics.allowedChildren && !this.statics.allowedChildren.some(function($ContainerBlot$$) { | |
return $childBlot$$ instanceof $ContainerBlot$$; | |
})) { | |
throw new $Registry$$.ParchmentError("Cannot insert " + $childBlot$$.statics.blotName + " into " + this.statics.blotName); | |
} | |
$childBlot$$.insertInto(this, $ContainerBlot$$); | |
}; | |
$ContainerBlot$$.prototype.length = function() { | |
return this.children.reduce(function($memo$$, $ContainerBlot$$) { | |
return $memo$$ + $ContainerBlot$$.length(); | |
}, 0); | |
}; | |
$ContainerBlot$$.prototype.moveChildren = function($targetParent$$, $ContainerBlot$$) { | |
this.children.forEach(function($_super$$) { | |
$targetParent$$.insertBefore($_super$$, $ContainerBlot$$); | |
}); | |
}; | |
$ContainerBlot$$.prototype.optimize = function($context$$) { | |
$_super$$.prototype.optimize.call(this, $context$$); | |
if (0 === this.children.length) { | |
if (null != this.statics.defaultChild) { | |
var $ContainerBlot$$ = $Registry$$.create(this.statics.defaultChild); | |
this.appendChild($ContainerBlot$$); | |
$ContainerBlot$$.optimize($context$$); | |
} else { | |
this.remove(); | |
} | |
} | |
}; | |
$ContainerBlot$$.prototype.path = function($index$jscomp$111_position$$, $_super$$) { | |
void 0 === $_super$$ && ($_super$$ = !1); | |
var $inclusive$$ = this.children.find($index$jscomp$111_position$$, $_super$$), $ContainerBlot___webpack_require__$$ = $inclusive$$[0]; | |
$inclusive$$ = $inclusive$$[1]; | |
$index$jscomp$111_position$$ = [[this, $index$jscomp$111_position$$]]; | |
if ($ContainerBlot___webpack_require__$$ instanceof $ContainerBlot$$) { | |
return $index$jscomp$111_position$$.concat($ContainerBlot___webpack_require__$$.path($inclusive$$, $_super$$)); | |
} | |
null != $ContainerBlot___webpack_require__$$ && $index$jscomp$111_position$$.push([$ContainerBlot___webpack_require__$$, $inclusive$$]); | |
return $index$jscomp$111_position$$; | |
}; | |
$ContainerBlot$$.prototype.removeChild = function($child$$) { | |
this.children.remove($child$$); | |
}; | |
$ContainerBlot$$.prototype.replace = function($target$$) { | |
$target$$ instanceof $ContainerBlot$$ && $target$$.moveChildren(this); | |
$_super$$.prototype.replace.call(this, $target$$); | |
}; | |
$ContainerBlot$$.prototype.split = function($index$$, $ContainerBlot$$) { | |
void 0 === $ContainerBlot$$ && ($ContainerBlot$$ = !1); | |
if (!$ContainerBlot$$) { | |
if (0 === $index$$) { | |
return this; | |
} | |
if ($index$$ === this.length()) { | |
return this.next; | |
} | |
} | |
var $_super$$ = this.clone(); | |
this.parent.insertBefore($_super$$, this.next); | |
this.children.forEachAt($index$$, this.length(), function($index$$, $force$$, $ContainerBlot___webpack_require__$$) { | |
$index$$ = $index$$.split($force$$, $ContainerBlot$$); | |
$_super$$.appendChild($index$$); | |
}); | |
return $_super$$; | |
}; | |
$ContainerBlot$$.prototype.unwrap = function() { | |
this.moveChildren(this.parent, this.next); | |
this.remove(); | |
}; | |
$ContainerBlot$$.prototype.update = function($mutations$$, $ContainerBlot$$) { | |
var $_super$$ = this, $context$$ = [], $ContainerBlot___webpack_require__$$ = []; | |
$mutations$$.forEach(function($mutations$$) { | |
$mutations$$.target === $_super$$.domNode && "childList" === $mutations$$.type && ($context$$.push.apply($context$$, $mutations$$.addedNodes), $ContainerBlot___webpack_require__$$.push.apply($ContainerBlot___webpack_require__$$, $mutations$$.removedNodes)); | |
}); | |
$ContainerBlot___webpack_require__$$.forEach(function($mutations$$) { | |
null != $mutations$$.parentNode && "IFRAME" !== $mutations$$.tagName && document.body.compareDocumentPosition($mutations$$) & Node.DOCUMENT_POSITION_CONTAINED_BY || ($mutations$$ = $Registry$$.find($mutations$$), null != $mutations$$ && (null != $mutations$$.domNode.parentNode && $mutations$$.domNode.parentNode !== $_super$$.domNode || $mutations$$.detach())); | |
}); | |
$context$$.filter(function($mutations$$) { | |
return $mutations$$.parentNode == $_super$$.domNode; | |
}).sort(function($mutations$$, $ContainerBlot$$) { | |
return $mutations$$ === $ContainerBlot$$ ? 0 : $mutations$$.compareDocumentPosition($ContainerBlot$$) & Node.DOCUMENT_POSITION_FOLLOWING ? 1 : -1; | |
}).forEach(function($mutations$$) { | |
var $ContainerBlot$$ = null; | |
null != $mutations$$.nextSibling && ($ContainerBlot$$ = $Registry$$.find($mutations$$.nextSibling)); | |
$mutations$$ = $makeBlot$$($mutations$$); | |
if ($mutations$$.next != $ContainerBlot$$ || null == $mutations$$.next) { | |
null != $mutations$$.parent && $mutations$$.parent.removeChild($_super$$), $_super$$.insertBefore($mutations$$, $ContainerBlot$$ || void 0); | |
} | |
}); | |
}; | |
return $ContainerBlot$$; | |
}($module$$.default); | |
$exports$$.default = $ContainerBlot___webpack_require__$$; | |
}, function($container_1$jscomp$1_module$$, $exports$$, $FormatBlot___webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $extendStatics$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($d$$, $b$$) { | |
$d$$.__proto__ = $b$$; | |
} || function($d$$, $b$$) { | |
for (var $extendStatics$$ in $b$$) { | |
$b$$.hasOwnProperty($extendStatics$$) && ($d$$[$extendStatics$$] = $b$$[$extendStatics$$]); | |
} | |
}; | |
return function($d$$, $b$$) { | |
function $__$$() { | |
this.constructor = $d$$; | |
} | |
$extendStatics$$($d$$, $b$$); | |
$d$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $attributor_1$$ = $FormatBlot___webpack_require__$$(12), $store_1$$ = $FormatBlot___webpack_require__$$(30); | |
$container_1$jscomp$1_module$$ = $FormatBlot___webpack_require__$$(17); | |
var $Registry$$ = $FormatBlot___webpack_require__$$(1); | |
$FormatBlot___webpack_require__$$ = function($_super$$) { | |
function $FormatBlot$$($_this$jscomp$8_domNode$$) { | |
$_this$jscomp$8_domNode$$ = $_super$$.call(this, $_this$jscomp$8_domNode$$) || this; | |
$_this$jscomp$8_domNode$$.attributes = new $store_1$$.default($_this$jscomp$8_domNode$$.domNode); | |
return $_this$jscomp$8_domNode$$; | |
} | |
$__extends$$($FormatBlot$$, $_super$$); | |
$FormatBlot$$.formats = function($domNode$$) { | |
if ("string" === typeof this.tagName) { | |
return !0; | |
} | |
if (Array.isArray(this.tagName)) { | |
return $domNode$$.tagName.toLowerCase(); | |
} | |
}; | |
$FormatBlot$$.prototype.format = function($name$$, $FormatBlot$$) { | |
var $_super$$ = $Registry$$.query($name$$); | |
$_super$$ instanceof $attributor_1$$.default ? this.attributes.attribute($_super$$, $FormatBlot$$) : $FormatBlot$$ && (null == $_super$$ || $name$$ === this.statics.blotName && this.formats()[$name$$] === $FormatBlot$$ || this.replaceWith($name$$, $FormatBlot$$)); | |
}; | |
$FormatBlot$$.prototype.formats = function() { | |
var $formats$$ = this.attributes.values(), $FormatBlot$$ = this.statics.formats(this.domNode); | |
null != $FormatBlot$$ && ($formats$$[this.statics.blotName] = $FormatBlot$$); | |
return $formats$$; | |
}; | |
$FormatBlot$$.prototype.replaceWith = function($name$jscomp$86_replacement$$, $FormatBlot$$) { | |
$name$jscomp$86_replacement$$ = $_super$$.prototype.replaceWith.call(this, $name$jscomp$86_replacement$$, $FormatBlot$$); | |
this.attributes.copy($name$jscomp$86_replacement$$); | |
return $name$jscomp$86_replacement$$; | |
}; | |
$FormatBlot$$.prototype.update = function($mutations$$, $FormatBlot$$) { | |
var $FormatBlot___webpack_require__$$ = this; | |
$_super$$.prototype.update.call(this, $mutations$$, $FormatBlot$$); | |
$mutations$$.some(function($mutations$$) { | |
return $mutations$$.target === $FormatBlot___webpack_require__$$.domNode && "attributes" === $mutations$$.type; | |
}) && this.attributes.build(); | |
}; | |
$FormatBlot$$.prototype.wrap = function($name$$, $FormatBlot___webpack_require__$$) { | |
$name$$ = $_super$$.prototype.wrap.call(this, $name$$, $FormatBlot___webpack_require__$$); | |
$name$$ instanceof $FormatBlot$$ && $name$$.statics.scope === this.statics.scope && this.attributes.move($name$$); | |
return $name$$; | |
}; | |
return $FormatBlot$$; | |
}($container_1$jscomp$1_module$$.default); | |
$exports$$.default = $FormatBlot___webpack_require__$$; | |
}, function($module$jscomp$24_shadow_1$$, $exports$$, $LeafBlot___webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $LeafBlot___webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($LeafBlot___webpack_require__$$, $b$$) { | |
$LeafBlot___webpack_require__$$.__proto__ = $b$$; | |
} || function($LeafBlot___webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($LeafBlot___webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($module$jscomp$24_shadow_1$$, $b$$) { | |
function $__$$() { | |
this.constructor = $module$jscomp$24_shadow_1$$; | |
} | |
$LeafBlot___webpack_require__$$($module$jscomp$24_shadow_1$$, $b$$); | |
$module$jscomp$24_shadow_1$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$module$jscomp$24_shadow_1$$ = $LeafBlot___webpack_require__$$(29); | |
var $Registry$$ = $LeafBlot___webpack_require__$$(1); | |
$LeafBlot___webpack_require__$$ = function($LeafBlot___webpack_require__$$) { | |
function $module$jscomp$24_shadow_1$$() { | |
return null !== $LeafBlot___webpack_require__$$ && $LeafBlot___webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($module$jscomp$24_shadow_1$$, $LeafBlot___webpack_require__$$); | |
$module$jscomp$24_shadow_1$$.value = function($domNode$$) { | |
return !0; | |
}; | |
$module$jscomp$24_shadow_1$$.prototype.index = function($node$$, $offset$$) { | |
return this.domNode === $node$$ || this.domNode.compareDocumentPosition($node$$) & Node.DOCUMENT_POSITION_CONTAINED_BY ? Math.min($offset$$, 1) : -1; | |
}; | |
$module$jscomp$24_shadow_1$$.prototype.position = function($index$$, $inclusive$jscomp$1_offset$$) { | |
$inclusive$jscomp$1_offset$$ = [].indexOf.call(this.parent.domNode.childNodes, this.domNode); | |
0 < $index$$ && ($inclusive$jscomp$1_offset$$ += 1); | |
return [this.parent.domNode, $inclusive$jscomp$1_offset$$]; | |
}; | |
$module$jscomp$24_shadow_1$$.prototype.value = function() { | |
return $_a$$ = {}, $_a$$[this.statics.blotName] = this.statics.value(this.domNode) || !0, $_a$$; | |
var $_a$$; | |
}; | |
$module$jscomp$24_shadow_1$$.scope = $Registry$$.Scope.INLINE_BLOT; | |
return $module$jscomp$24_shadow_1$$; | |
}($module$jscomp$24_shadow_1$$.default); | |
$exports$$.default = $LeafBlot___webpack_require__$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
function $Iterator$$($ops$$) { | |
this.ops = $ops$$; | |
this.offset = this.index = 0; | |
} | |
var $equal$$ = $__webpack_require__$$(11), $extend$$ = $__webpack_require__$$(3), $lib$$ = {attributes:{compose:function($a$$, $b$$, $keepNull$$) { | |
"object" !== typeof $a$$ && ($a$$ = {}); | |
"object" !== typeof $b$$ && ($b$$ = {}); | |
var $__webpack_require__$$ = $extend$$(!0, {}, $b$$); | |
$keepNull$$ || ($__webpack_require__$$ = Object.keys($__webpack_require__$$).reduce(function($keepNull$$, $b$$) { | |
null != $__webpack_require__$$[$b$$] && ($keepNull$$[$b$$] = $__webpack_require__$$[$b$$]); | |
return $keepNull$$; | |
}, {})); | |
for (var $module$$ in $a$$) { | |
void 0 !== $a$$[$module$$] && void 0 === $b$$[$module$$] && ($__webpack_require__$$[$module$$] = $a$$[$module$$]); | |
} | |
return 0 < Object.keys($__webpack_require__$$).length ? $__webpack_require__$$ : void 0; | |
}, diff:function($a$$, $b$$) { | |
"object" !== typeof $a$$ && ($a$$ = {}); | |
"object" !== typeof $b$$ && ($b$$ = {}); | |
var $attributes$jscomp$0$$ = Object.keys($a$$).concat(Object.keys($b$$)).reduce(function($attributes$jscomp$0$$, $__webpack_require__$$) { | |
$equal$$($a$$[$__webpack_require__$$], $b$$[$__webpack_require__$$]) || ($attributes$jscomp$0$$[$__webpack_require__$$] = void 0 === $b$$[$__webpack_require__$$] ? null : $b$$[$__webpack_require__$$]); | |
return $attributes$jscomp$0$$; | |
}, {}); | |
return 0 < Object.keys($attributes$jscomp$0$$).length ? $attributes$jscomp$0$$ : void 0; | |
}, transform:function($a$$, $b$$, $attributes$jscomp$10_priority$$) { | |
if ("object" !== typeof $a$$) { | |
return $b$$; | |
} | |
if ("object" === typeof $b$$) { | |
if (!$attributes$jscomp$10_priority$$) { | |
return $b$$; | |
} | |
$attributes$jscomp$10_priority$$ = Object.keys($b$$).reduce(function($attributes$jscomp$10_priority$$, $__webpack_require__$$) { | |
void 0 === $a$$[$__webpack_require__$$] && ($attributes$jscomp$10_priority$$[$__webpack_require__$$] = $b$$[$__webpack_require__$$]); | |
return $attributes$jscomp$10_priority$$; | |
}, {}); | |
return 0 < Object.keys($attributes$jscomp$10_priority$$).length ? $attributes$jscomp$10_priority$$ : void 0; | |
} | |
}}, iterator:function($ops$$) { | |
return new $Iterator$$($ops$$); | |
}, length:function($op$$) { | |
return "number" === typeof $op$$["delete"] ? $op$$["delete"] : "number" === typeof $op$$.retain ? $op$$.retain : "string" === typeof $op$$.insert ? $op$$.insert.length : 1; | |
}}; | |
$Iterator$$.prototype.hasNext = function() { | |
return Infinity > this.peekLength(); | |
}; | |
$Iterator$$.prototype.next = function($length$$) { | |
$length$$ || ($length$$ = Infinity); | |
var $nextOp$$ = this.ops[this.index]; | |
if ($nextOp$$) { | |
var $offset$$ = this.offset, $__webpack_require__$$ = $lib$$.length($nextOp$$); | |
$length$$ >= $__webpack_require__$$ - $offset$$ ? ($length$$ = $__webpack_require__$$ - $offset$$, this.index += 1, this.offset = 0) : this.offset += $length$$; | |
if ("number" === typeof $nextOp$$["delete"]) { | |
return {"delete":$length$$}; | |
} | |
$__webpack_require__$$ = {}; | |
$nextOp$$.attributes && ($__webpack_require__$$.attributes = $nextOp$$.attributes); | |
"number" === typeof $nextOp$$.retain ? $__webpack_require__$$.retain = $length$$ : $__webpack_require__$$.insert = "string" === typeof $nextOp$$.insert ? $nextOp$$.insert.substr($offset$$, $length$$) : $nextOp$$.insert; | |
return $__webpack_require__$$; | |
} | |
return {retain:Infinity}; | |
}; | |
$Iterator$$.prototype.peek = function() { | |
return this.ops[this.index]; | |
}; | |
$Iterator$$.prototype.peekLength = function() { | |
return this.ops[this.index] ? $lib$$.length(this.ops[this.index]) - this.offset : Infinity; | |
}; | |
$Iterator$$.prototype.peekType = function() { | |
if (this.ops[this.index]) { | |
if ("number" === typeof this.ops[this.index]["delete"]) { | |
return "delete"; | |
} | |
if ("number" !== typeof this.ops[this.index].retain) { | |
return "insert"; | |
} | |
} | |
return "retain"; | |
}; | |
$module$$.exports = $lib$$; | |
}, function($module$$, $clone$jscomp$2_exports$$) { | |
$clone$jscomp$2_exports$$ = function() { | |
function $_instanceof$$($obj$$, $nativePromise$$) { | |
return null != $nativePromise$$ && $obj$$ instanceof $nativePromise$$; | |
} | |
function $module$$($parent$jscomp$0$$, $circular$$, $depth$jscomp$0$$, $prototype$$, $includeNonEnumerable$$) { | |
function $_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$) { | |
if (null === $parent$jscomp$0$$) { | |
return null; | |
} | |
if (0 === $depth$jscomp$0$$ || "object" != typeof $parent$jscomp$0$$) { | |
return $parent$jscomp$0$$; | |
} | |
if ($_instanceof$$($parent$jscomp$0$$, $nativeMap$$)) { | |
var $allParents$$ = new $nativeMap$$; | |
} else { | |
if ($_instanceof$$($parent$jscomp$0$$, $nativeSet$$)) { | |
$allParents$$ = new $nativeSet$$; | |
} else { | |
if ($_instanceof$$($parent$jscomp$0$$, $nativePromise$$)) { | |
$allParents$$ = new $nativePromise$$(function($nativePromise$$, $nativeSet$$) { | |
$parent$jscomp$0$$.then(function($parent$jscomp$0$$) { | |
$nativePromise$$($_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$ - 1)); | |
}, function($parent$jscomp$0$$) { | |
$nativeSet$$($_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$ - 1)); | |
}); | |
}); | |
} else { | |
if ($module$$.__isArray($parent$jscomp$0$$)) { | |
$allParents$$ = []; | |
} else { | |
if ($module$$.__isRegExp($parent$jscomp$0$$)) { | |
$allParents$$ = new RegExp($parent$jscomp$0$$.source, $__getRegExpFlags$$($parent$jscomp$0$$)), $parent$jscomp$0$$.lastIndex && ($allParents$$.lastIndex = $parent$jscomp$0$$.lastIndex); | |
} else { | |
if ($module$$.__isDate($parent$jscomp$0$$)) { | |
$allParents$$ = new Date($parent$jscomp$0$$.getTime()); | |
} else { | |
if ($__objToStr$$ && Buffer.isBuffer($parent$jscomp$0$$)) { | |
return $allParents$$ = new Buffer($parent$jscomp$0$$.length), $parent$jscomp$0$$.copy($allParents$$), $allParents$$; | |
} | |
if ($_instanceof$$($parent$jscomp$0$$, Error)) { | |
$allParents$$ = Object.create($parent$jscomp$0$$); | |
} else { | |
if ("undefined" == typeof $prototype$$) { | |
var $clone$$ = Object.getPrototypeOf($parent$jscomp$0$$); | |
$allParents$$ = Object.create($clone$$); | |
} else { | |
$allParents$$ = Object.create($prototype$$), $clone$$ = $prototype$$; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
if ($circular$$) { | |
var $useBuffer$$ = $clone$jscomp$2_exports$$.indexOf($parent$jscomp$0$$); | |
if (-1 != $useBuffer$$) { | |
return $allChildren$$[$useBuffer$$]; | |
} | |
$clone$jscomp$2_exports$$.push($parent$jscomp$0$$); | |
$allChildren$$.push($allParents$$); | |
} | |
$_instanceof$$($parent$jscomp$0$$, $nativeMap$$) && $parent$jscomp$0$$.forEach(function($parent$jscomp$0$$, $nativePromise$$) { | |
$nativePromise$$ = $_clone$$($nativePromise$$, $depth$jscomp$0$$ - 1); | |
$parent$jscomp$0$$ = $_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$ - 1); | |
$allParents$$.set($nativePromise$$, $parent$jscomp$0$$); | |
}); | |
$_instanceof$$($parent$jscomp$0$$, $nativeSet$$) && $parent$jscomp$0$$.forEach(function($parent$jscomp$0$$) { | |
$parent$jscomp$0$$ = $_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$ - 1); | |
$allParents$$.add($parent$jscomp$0$$); | |
}); | |
for (var $depth$$ in $parent$jscomp$0$$) { | |
var $parent$$; | |
$clone$$ && ($parent$$ = Object.getOwnPropertyDescriptor($clone$$, $depth$$)); | |
$parent$$ && null == $parent$$.set || ($allParents$$[$depth$$] = $_clone$$($parent$jscomp$0$$[$depth$$], $depth$jscomp$0$$ - 1)); | |
} | |
if (Object.getOwnPropertySymbols) { | |
for ($useBuffer$$ = Object.getOwnPropertySymbols($parent$jscomp$0$$), $depth$$ = 0; $depth$$ < $useBuffer$$.length; $depth$$++) { | |
if ($parent$$ = $useBuffer$$[$depth$$], $clone$$ = Object.getOwnPropertyDescriptor($parent$jscomp$0$$, $parent$$), !$clone$$ || $clone$$.enumerable || $includeNonEnumerable$$) { | |
$allParents$$[$parent$$] = $_clone$$($parent$jscomp$0$$[$parent$$], $depth$jscomp$0$$ - 1), $clone$$.enumerable || Object.defineProperty($allParents$$, $parent$$, {enumerable:!1}); | |
} | |
} | |
} | |
if ($includeNonEnumerable$$) { | |
for ($useBuffer$$ = Object.getOwnPropertyNames($parent$jscomp$0$$), $depth$$ = 0; $depth$$ < $useBuffer$$.length; $depth$$++) { | |
$parent$$ = $useBuffer$$[$depth$$], $clone$$ = Object.getOwnPropertyDescriptor($parent$jscomp$0$$, $parent$$), $clone$$ && $clone$$.enumerable || ($allParents$$[$parent$$] = $_clone$$($parent$jscomp$0$$[$parent$$], $depth$jscomp$0$$ - 1), Object.defineProperty($allParents$$, $parent$$, {enumerable:!1})); | |
} | |
} | |
return $allParents$$; | |
} | |
"object" === typeof $circular$$ && ($depth$jscomp$0$$ = $circular$$.depth, $prototype$$ = $circular$$.prototype, $includeNonEnumerable$$ = $circular$$.includeNonEnumerable, $circular$$ = $circular$$.circular); | |
var $clone$jscomp$2_exports$$ = [], $allChildren$$ = [], $__objToStr$$ = "undefined" != typeof Buffer; | |
"undefined" == typeof $circular$$ && ($circular$$ = !0); | |
"undefined" == typeof $depth$jscomp$0$$ && ($depth$jscomp$0$$ = Infinity); | |
return $_clone$$($parent$jscomp$0$$, $depth$jscomp$0$$); | |
} | |
function $clone$jscomp$2_exports$$($o$$) { | |
return Object.prototype.toString.call($o$$); | |
} | |
function $__getRegExpFlags$$($re$$) { | |
var $nativePromise$$ = ""; | |
$re$$.global && ($nativePromise$$ += "g"); | |
$re$$.ignoreCase && ($nativePromise$$ += "i"); | |
$re$$.multiline && ($nativePromise$$ += "m"); | |
return $nativePromise$$; | |
} | |
try { | |
var $nativeMap$$ = Map; | |
} catch ($_$$) { | |
$nativeMap$$ = function() { | |
}; | |
} | |
try { | |
var $nativeSet$$ = Set; | |
} catch ($_$0$$) { | |
$nativeSet$$ = function() { | |
}; | |
} | |
try { | |
var $nativePromise$$ = Promise; | |
} catch ($_$1$$) { | |
$nativePromise$$ = function() { | |
}; | |
} | |
$module$$.clonePrototype = function($parent$$) { | |
if (null === $parent$$) { | |
return null; | |
} | |
var $nativePromise$$ = function() { | |
}; | |
$nativePromise$$.prototype = $parent$$; | |
return new $nativePromise$$; | |
}; | |
$module$$.__objToStr = $clone$jscomp$2_exports$$; | |
$module$$.__isDate = function($o$$) { | |
return "object" === typeof $o$$ && "[object Date]" === $clone$jscomp$2_exports$$($o$$); | |
}; | |
$module$$.__isArray = function($o$$) { | |
return "object" === typeof $o$$ && "[object Array]" === $clone$jscomp$2_exports$$($o$$); | |
}; | |
$module$$.__isRegExp = function($o$$) { | |
return "object" === typeof $o$$ && "[object RegExp]" === $clone$jscomp$2_exports$$($o$$); | |
}; | |
$module$$.__getRegExpFlags = $__getRegExpFlags$$; | |
return $module$$; | |
}(); | |
"object" === typeof $module$$ && $module$$.exports && ($module$$.exports = $clone$jscomp$2_exports$$); | |
}, function($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$, $exports$$, $__webpack_require__$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_createClass$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_createClass$$ || "object" !== typeof $_createClass$$ && "function" !== typeof $_createClass$$ ? $_get$$ : $_createClass$$; | |
} | |
function $_inherits$$($_get$$, $_createClass$$) { | |
if ("function" !== typeof $_createClass$$ && null !== $_createClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_createClass$$); | |
} | |
$_get$$.prototype = Object.create($_createClass$$ && $_createClass$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_createClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_createClass$$) : $_get$$.__proto__ = $_createClass$$); | |
} | |
function $isLine$$($_get$$) { | |
return $_get$$ instanceof $_block2$$.default || $_get$$ instanceof $_block$$.BlockEmbed; | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_slicedToArray$$ = function() { | |
return function($_get$$, $_createClass$$) { | |
if (Array.isArray($_get$$)) { | |
return $_get$$; | |
} | |
if (Symbol.iterator in Object($_get$$)) { | |
var $_slicedToArray$$ = [], $__webpack_require__$$ = !0, $_parchment2$$ = !1, $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = void 0; | |
try { | |
for (var $_block$$ = $_get$$[Symbol.iterator](), $_block2$$; !($__webpack_require__$$ = ($_block2$$ = $_block$$.next()).done) && ($_slicedToArray$$.push($_block2$$.value), !$_createClass$$ || $_slicedToArray$$.length !== $_createClass$$); $__webpack_require__$$ = !0) { | |
} | |
} catch ($err$$) { | |
$_parchment2$$ = !0, $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$__webpack_require__$$ && $_block$$["return"]) { | |
$_block$$["return"](); | |
} | |
} finally { | |
if ($_parchment2$$) { | |
throw $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$; | |
} | |
} | |
} | |
return $_slicedToArray$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $_get$$($_get$$, $_createClass$$) { | |
for (var $_slicedToArray$$ = 0; $_slicedToArray$$ < $_createClass$$.length; $_slicedToArray$$++) { | |
var $__webpack_require__$$ = $_createClass$$[$_slicedToArray$$]; | |
$__webpack_require__$$.enumerable = $__webpack_require__$$.enumerable || !1; | |
$__webpack_require__$$.configurable = !0; | |
"value" in $__webpack_require__$$ && ($__webpack_require__$$.writable = !0); | |
Object.defineProperty($_get$$, $__webpack_require__$$.key, $__webpack_require__$$); | |
} | |
} | |
return function($_createClass$$, $_slicedToArray$$, $__webpack_require__$$) { | |
$_slicedToArray$$ && $_get$$($_createClass$$.prototype, $_slicedToArray$$); | |
$__webpack_require__$$ && $_get$$($_createClass$$, $__webpack_require__$$); | |
return $_createClass$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_createClass$$, $_slicedToArray$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $__webpack_require__$$ = Object.getOwnPropertyDescriptor($_get$$, $_createClass$$); | |
if (void 0 === $__webpack_require__$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_createClass$$, $_slicedToArray$$); | |
} | |
} else { | |
if ("value" in $__webpack_require__$$) { | |
return $__webpack_require__$$.value; | |
} | |
$_createClass$$ = $__webpack_require__$$.get; | |
return void 0 === $_createClass$$ ? void 0 : $_createClass$$.call($_slicedToArray$$); | |
} | |
}; | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $__webpack_require__$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $__webpack_require__$$(8); | |
var $_emitter2$$ = $_interopRequireDefault$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$), $_block$$ = $__webpack_require__$$(4), $_block2$$ = $_interopRequireDefault$$($_block$$); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $__webpack_require__$$(16); | |
var $_break2$$ = $_interopRequireDefault$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $__webpack_require__$$(13); | |
var $_code2$$ = $_interopRequireDefault$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$); | |
$__webpack_require__$$ = $__webpack_require__$$(24); | |
$__webpack_require__$$ = $_interopRequireDefault$$($__webpack_require__$$); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = function($__webpack_require__$$) { | |
function $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$($_get$$, $_createClass$$) { | |
if (!(this instanceof $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
$_get$$ = $_possibleConstructorReturn$$(this, ($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$)).call(this, $_get$$)); | |
$_get$$.emitter = $_createClass$$.emitter; | |
Array.isArray($_createClass$$.whitelist) && ($_get$$.whitelist = $_createClass$$.whitelist.reduce(function($_get$$, $_createClass$$) { | |
$_get$$[$_createClass$$] = !0; | |
return $_get$$; | |
}, {})); | |
$_get$$.domNode.addEventListener("DOMNodeInserted", function() { | |
}); | |
$_get$$.optimize(); | |
$_get$$.enable(); | |
return $_get$$; | |
} | |
$_inherits$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$, $__webpack_require__$$); | |
$_createClass$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$, [{key:"batchStart", value:function() { | |
this.batch = !0; | |
}}, {key:"batchEnd", value:function() { | |
this.batch = !1; | |
this.optimize(); | |
}}, {key:"deleteAt", value:function($_createClass$$, $__webpack_require__$$) { | |
var $_parchment2$$ = this.line($_createClass$$), $_block2$$ = $_slicedToArray$$($_parchment2$$, 2); | |
$_parchment2$$ = $_block2$$[0]; | |
var $isLine$$ = $_block2$$[1]; | |
$_block2$$ = this.line($_createClass$$ + $__webpack_require__$$); | |
$_block2$$ = $_slicedToArray$$($_block2$$, 1)[0]; | |
$_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "deleteAt", this).call(this, $_createClass$$, $__webpack_require__$$); | |
if (null != $_block2$$ && $_parchment2$$ !== $_block2$$ && 0 < $isLine$$) { | |
if ($_parchment2$$ instanceof $_block$$.BlockEmbed || $_block2$$ instanceof $_block$$.BlockEmbed) { | |
this.optimize(); | |
return; | |
} | |
if ($_parchment2$$ instanceof $_code2$$.default) { | |
if ($_createClass$$ = $_parchment2$$.newlineIndex($_parchment2$$.length(), !0), -1 < $_createClass$$ && ($_parchment2$$ = $_parchment2$$.split($_createClass$$ + 1), $_parchment2$$ === $_block2$$)) { | |
this.optimize(); | |
return; | |
} | |
} else { | |
$_block2$$ instanceof $_code2$$.default && ($_createClass$$ = $_block2$$.newlineIndex(0), -1 < $_createClass$$ && $_block2$$.split($_createClass$$ + 1)); | |
} | |
$_parchment2$$.moveChildren($_block2$$, $_block2$$.children.head instanceof $_break2$$.default ? null : $_block2$$.children.head); | |
$_parchment2$$.remove(); | |
} | |
this.optimize(); | |
}}, {key:"enable", value:function() { | |
this.domNode.setAttribute("contenteditable", 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0); | |
}}, {key:"formatAt", value:function($_createClass$$, $_slicedToArray$$, $__webpack_require__$$, $_parchment2$$) { | |
if (null == this.whitelist || this.whitelist[$__webpack_require__$$]) { | |
$_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "formatAt", this).call(this, $_createClass$$, $_slicedToArray$$, $__webpack_require__$$, $_parchment2$$), this.optimize(); | |
} | |
}}, {key:"insertAt", value:function($_createClass$$, $_slicedToArray$$, $__webpack_require__$$) { | |
if (null == $__webpack_require__$$ || null == this.whitelist || this.whitelist[$_slicedToArray$$]) { | |
$_createClass$$ >= this.length() ? null == $__webpack_require__$$ || null == $_parchment2$$.default.query($_slicedToArray$$, $_parchment2$$.default.Scope.BLOCK) ? ($_createClass$$ = $_parchment2$$.default.create(this.statics.defaultChild), this.appendChild($_createClass$$), null == $__webpack_require__$$ && $_slicedToArray$$.endsWith("\n") && ($_slicedToArray$$ = $_slicedToArray$$.slice(0, -1)), $_createClass$$.insertAt(0, $_slicedToArray$$, $__webpack_require__$$)) : ($_slicedToArray$$ = | |
$_parchment2$$.default.create($_slicedToArray$$, $__webpack_require__$$), this.appendChild($_slicedToArray$$)) : $_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "insertAt", this).call(this, $_createClass$$, $_slicedToArray$$, $__webpack_require__$$), this.optimize(); | |
} | |
}}, {key:"insertBefore", value:function($_createClass$$, $_slicedToArray$$) { | |
if ($_createClass$$.statics.scope === $_parchment2$$.default.Scope.INLINE_BLOT) { | |
var $__webpack_require__$$ = $_parchment2$$.default.create(this.statics.defaultChild); | |
$__webpack_require__$$.appendChild($_createClass$$); | |
$_createClass$$ = $__webpack_require__$$; | |
} | |
$_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "insertBefore", this).call(this, $_createClass$$, $_slicedToArray$$); | |
}}, {key:"leaf", value:function($_get$$) { | |
return this.path($_get$$).pop() || [null, -1]; | |
}}, {key:"line", value:function($_get$$) { | |
return $_get$$ === this.length() ? this.line($_get$$ - 1) : this.descendant($isLine$$, $_get$$); | |
}}, {key:"lines", value:function() { | |
return function $getLines$$($_get$$, $_createClass$$, $_slicedToArray$$) { | |
var $__webpack_require__$$ = [], $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ = $_slicedToArray$$; | |
$_get$$.children.forEachAt($_createClass$$, $_slicedToArray$$, function($_get$$, $_createClass$$, $_slicedToArray$$) { | |
$isLine$$($_get$$) ? $__webpack_require__$$.push($_get$$) : $_get$$ instanceof $_parchment2$$.default.Container && ($__webpack_require__$$ = $__webpack_require__$$.concat($getLines$$($_get$$, $_createClass$$, $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$))); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$ -= $_slicedToArray$$; | |
}); | |
return $__webpack_require__$$; | |
}(this, 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : Number.MAX_VALUE); | |
}}, {key:"optimize", value:function() { | |
var $_createClass$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [], $_slicedToArray$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; | |
!0 !== this.batch && ($_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "optimize", this).call(this, $_createClass$$, $_slicedToArray$$), 0 < $_createClass$$.length && this.emitter.emit($_emitter2$$.default.events.SCROLL_OPTIMIZE, $_createClass$$, $_slicedToArray$$)); | |
}}, {key:"path", value:function($_createClass$$) { | |
return $_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "path", this).call(this, $_createClass$$).slice(1); | |
}}, {key:"update", value:function($_createClass$$) { | |
if (!0 !== this.batch) { | |
var $_slicedToArray$$ = $_emitter2$$.default.sources.USER; | |
"string" === typeof $_createClass$$ && ($_slicedToArray$$ = $_createClass$$); | |
Array.isArray($_createClass$$) || ($_createClass$$ = this.observer.takeRecords()); | |
0 < $_createClass$$.length && this.emitter.emit($_emitter2$$.default.events.SCROLL_BEFORE_UPDATE, $_slicedToArray$$, $_createClass$$); | |
$_get$$($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype.__proto__ || Object.getPrototypeOf($Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.prototype), "update", this).call(this, $_createClass$$.concat([])); | |
0 < $_createClass$$.length && this.emitter.emit($_emitter2$$.default.events.SCROLL_UPDATE, $_slicedToArray$$, $_createClass$$); | |
} | |
}}]); | |
return $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$; | |
}($_parchment2$$.default.Scroll); | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.blotName = "scroll"; | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.className = "ql-editor"; | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.tagName = "DIV"; | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.defaultChild = "block"; | |
$Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$.allowedChildren = [$_block2$$.default, $_block$$.BlockEmbed, $__webpack_require__$$.default]; | |
$exports$$.default = $Scroll__break$jscomp$2__code$jscomp$1__emitter$jscomp$2__parchment$jscomp$8_module$$; | |
}, function($_parchment$jscomp$9_module$$, $exports$$, $Cursor___webpack_require__$jscomp$22__text$$) { | |
function $_inherits$$($subClass$$, $_text2$$) { | |
if ("function" !== typeof $_text2$$ && null !== $_text2$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_text2$$); | |
} | |
$subClass$$.prototype = Object.create($_text2$$ && $_text2$$.prototype, {constructor:{value:$subClass$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_text2$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $_text2$$) : $subClass$$.__proto__ = $_text2$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_slicedToArray$$ = function() { | |
return function($arr$$, $_text2$$) { | |
if (Array.isArray($arr$$)) { | |
return $arr$$; | |
} | |
if (Symbol.iterator in Object($arr$$)) { | |
var $_parchment2$$ = [], $Cursor___webpack_require__$jscomp$22__text$$ = !0, $i$$ = !1, $_parchment$jscomp$9_module$$ = void 0; | |
try { | |
for (var $_createClass$$ = $arr$$[Symbol.iterator](), $_get$$; !($Cursor___webpack_require__$jscomp$22__text$$ = ($_get$$ = $_createClass$$.next()).done) && ($_parchment2$$.push($_get$$.value), !$_text2$$ || $_parchment2$$.length !== $_text2$$); $Cursor___webpack_require__$jscomp$22__text$$ = !0) { | |
} | |
} catch ($err$$) { | |
$i$$ = !0, $_parchment$jscomp$9_module$$ = $err$$; | |
} finally { | |
try { | |
if (!$Cursor___webpack_require__$jscomp$22__text$$ && $_createClass$$["return"]) { | |
$_createClass$$["return"](); | |
} | |
} finally { | |
if ($i$$) { | |
throw $_parchment$jscomp$9_module$$; | |
} | |
} | |
} | |
return $_parchment2$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_get$$ = function $get$$($_text2$$, $_parchment2$$, $Cursor___webpack_require__$jscomp$22__text$$) { | |
null === $_text2$$ && ($_text2$$ = Function.prototype); | |
var $object$jscomp$7_parent$$ = Object.getOwnPropertyDescriptor($_text2$$, $_parchment2$$); | |
if (void 0 === $object$jscomp$7_parent$$) { | |
if ($_text2$$ = Object.getPrototypeOf($_text2$$), null !== $_text2$$) { | |
return $get$$($_text2$$, $_parchment2$$, $Cursor___webpack_require__$jscomp$22__text$$); | |
} | |
} else { | |
if ("value" in $object$jscomp$7_parent$$) { | |
return $object$jscomp$7_parent$$.value; | |
} | |
$_parchment2$$ = $object$jscomp$7_parent$$.get; | |
return void 0 === $_parchment2$$ ? void 0 : $_parchment2$$.call($Cursor___webpack_require__$jscomp$22__text$$); | |
} | |
}, $_createClass$$ = function() { | |
function $_text2$$($_text2$$, $_parchment2$$) { | |
for (var $Cursor___webpack_require__$jscomp$22__text$$ = 0; $Cursor___webpack_require__$jscomp$22__text$$ < $_parchment2$$.length; $Cursor___webpack_require__$jscomp$22__text$$++) { | |
var $defineProperties$$ = $_parchment2$$[$Cursor___webpack_require__$jscomp$22__text$$]; | |
$defineProperties$$.enumerable = $defineProperties$$.enumerable || !1; | |
$defineProperties$$.configurable = !0; | |
"value" in $defineProperties$$ && ($defineProperties$$.writable = !0); | |
Object.defineProperty($_text2$$, $defineProperties$$.key, $defineProperties$$); | |
} | |
} | |
return function($_parchment2$$, $Cursor___webpack_require__$jscomp$22__text$$, $defineProperties$$) { | |
$Cursor___webpack_require__$jscomp$22__text$$ && $_text2$$($_parchment2$$.prototype, $Cursor___webpack_require__$jscomp$22__text$$); | |
$defineProperties$$ && $_text2$$($_parchment2$$, $defineProperties$$); | |
return $_parchment2$$; | |
}; | |
}(), $_parchment2$$ = ($_parchment$jscomp$9_module$$ = $Cursor___webpack_require__$jscomp$22__text$$(0)) && $_parchment$jscomp$9_module$$.__esModule ? $_parchment$jscomp$9_module$$ : {default:$_parchment$jscomp$9_module$$}, $_text2$$ = ($Cursor___webpack_require__$jscomp$22__text$$ = $Cursor___webpack_require__$jscomp$22__text$$(7)) && $Cursor___webpack_require__$jscomp$22__text$$.__esModule ? $Cursor___webpack_require__$jscomp$22__text$$ : {default:$Cursor___webpack_require__$jscomp$22__text$$}; | |
$Cursor___webpack_require__$jscomp$22__text$$ = function($Cursor___webpack_require__$jscomp$22__text$$) { | |
function $_Parchment$Embed$$($_text2$$, $_parchment2$$) { | |
if (!(this instanceof $_Parchment$Embed$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
$_text2$$ = ($_Parchment$Embed$$.__proto__ || Object.getPrototypeOf($_Parchment$Embed$$)).call(this, $_text2$$); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
$_text2$$ = !$_text2$$ || "object" !== typeof $_text2$$ && "function" !== typeof $_text2$$ ? this : $_text2$$; | |
$_text2$$.selection = $_parchment2$$; | |
$_text2$$.textNode = document.createTextNode($_Parchment$Embed$$.CONTENTS); | |
$_text2$$.domNode.appendChild($_text2$$.textNode); | |
$_text2$$._length = 0; | |
return $_text2$$; | |
} | |
$_inherits$$($_Parchment$Embed$$, $Cursor___webpack_require__$jscomp$22__text$$); | |
$_createClass$$($_Parchment$Embed$$, null, [{key:"value", value:function() { | |
}}]); | |
$_createClass$$($_Parchment$Embed$$, [{key:"detach", value:function() { | |
null != this.parent && this.parent.removeChild(this); | |
}}, {key:"format", value:function($_text2$$, $Cursor___webpack_require__$jscomp$22__text$$) { | |
if (0 !== this._length) { | |
return $_get$$($_Parchment$Embed$$.prototype.__proto__ || Object.getPrototypeOf($_Parchment$Embed$$.prototype), "format", this).call(this, $_text2$$, $Cursor___webpack_require__$jscomp$22__text$$); | |
} | |
for (var $_parchment$jscomp$9_module$$ = this, $name$$ = 0; null != $_parchment$jscomp$9_module$$ && $_parchment$jscomp$9_module$$.statics.scope !== $_parchment2$$.default.Scope.BLOCK_BLOT;) { | |
$name$$ += $_parchment$jscomp$9_module$$.offset($_parchment$jscomp$9_module$$.parent), $_parchment$jscomp$9_module$$ = $_parchment$jscomp$9_module$$.parent; | |
} | |
null != $_parchment$jscomp$9_module$$ && (this._length = $_Parchment$Embed$$.CONTENTS.length, $_parchment$jscomp$9_module$$.optimize(), $_parchment$jscomp$9_module$$.formatAt($name$$, $_Parchment$Embed$$.CONTENTS.length, $_text2$$, $Cursor___webpack_require__$jscomp$22__text$$), this._length = 0); | |
}}, {key:"index", value:function($_text2$$, $_parchment2$$) { | |
return $_text2$$ === this.textNode ? 0 : $_get$$($_Parchment$Embed$$.prototype.__proto__ || Object.getPrototypeOf($_Parchment$Embed$$.prototype), "index", this).call(this, $_text2$$, $_parchment2$$); | |
}}, {key:"length", value:function() { | |
return this._length; | |
}}, {key:"position", value:function() { | |
return [this.textNode, this.textNode.data.length]; | |
}}, {key:"remove", value:function() { | |
$_get$$($_Parchment$Embed$$.prototype.__proto__ || Object.getPrototypeOf($_Parchment$Embed$$.prototype), "remove", this).call(this); | |
this.parent = null; | |
}}, {key:"restore", value:function() { | |
if (!this.selection.composing && null != this.parent) { | |
var $Cursor___webpack_require__$jscomp$22__text$$ = this.textNode, $_parchment$jscomp$9_module$$ = this.selection.getNativeRange(), $_createClass$$ = void 0, $_get$$ = void 0, $exports$$ = void 0; | |
null != $_parchment$jscomp$9_module$$ && $_parchment$jscomp$9_module$$.start.node === $Cursor___webpack_require__$jscomp$22__text$$ && $_parchment$jscomp$9_module$$.end.node === $Cursor___webpack_require__$jscomp$22__text$$ && ($exports$$ = [$Cursor___webpack_require__$jscomp$22__text$$, $_parchment$jscomp$9_module$$.start.offset, $_parchment$jscomp$9_module$$.end.offset], $_createClass$$ = $exports$$[0], $_get$$ = $exports$$[1], $exports$$ = $exports$$[2]); | |
for (; null != this.domNode.lastChild && this.domNode.lastChild !== this.textNode;) { | |
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode); | |
} | |
this.textNode.data !== $_Parchment$Embed$$.CONTENTS && ($Cursor___webpack_require__$jscomp$22__text$$ = this.textNode.data.split($_Parchment$Embed$$.CONTENTS).join(""), this.next instanceof $_text2$$.default ? ($_createClass$$ = this.next.domNode, this.next.insertAt(0, $Cursor___webpack_require__$jscomp$22__text$$), this.textNode.data = $_Parchment$Embed$$.CONTENTS) : (this.textNode.data = $Cursor___webpack_require__$jscomp$22__text$$, this.parent.insertBefore($_parchment2$$.default.create(this.textNode), | |
this), this.textNode = document.createTextNode($_Parchment$Embed$$.CONTENTS), this.domNode.appendChild(this.textNode))); | |
this.remove(); | |
if (null != $_get$$) { | |
return $_get$$ = [$_get$$, $exports$$].map(function($_text2$$) { | |
return Math.max(0, Math.min($_createClass$$.data.length, $_text2$$ - 1)); | |
}), $exports$$ = $_slicedToArray$$($_get$$, 2), $_get$$ = $exports$$[0], $exports$$ = $exports$$[1], {startNode:$_createClass$$, startOffset:$_get$$, endNode:$_createClass$$, endOffset:$exports$$}; | |
} | |
} | |
}}, {key:"update", value:function($_text2$$, $_parchment2$$) { | |
var $Cursor___webpack_require__$jscomp$22__text$$ = this; | |
$_text2$$.some(function($_text2$$) { | |
return "characterData" === $_text2$$.type && $_text2$$.target === $Cursor___webpack_require__$jscomp$22__text$$.textNode; | |
}) && ($_text2$$ = this.restore()) && ($_parchment2$$.range = $_text2$$); | |
}}, {key:"value", value:function() { | |
return ""; | |
}}]); | |
return $_Parchment$Embed$$; | |
}($_parchment2$$.default.Embed); | |
$Cursor___webpack_require__$jscomp$22__text$$.blotName = "cursor"; | |
$Cursor___webpack_require__$jscomp$22__text$$.className = "ql-cursor"; | |
$Cursor___webpack_require__$jscomp$22__text$$.tagName = "span"; | |
$Cursor___webpack_require__$jscomp$22__text$$.CONTENTS = ""; | |
$exports$$.default = $Cursor___webpack_require__$jscomp$22__text$$; | |
}, function($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$, $exports$$, $__webpack_require__$jscomp$23__block$$) { | |
function $_inherits$$($__webpack_require__$jscomp$23__block$$, $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$) { | |
if ("function" !== typeof $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ && null !== $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$); | |
} | |
$__webpack_require__$jscomp$23__block$$.prototype = Object.create($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ && $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$.prototype, {constructor:{value:$__webpack_require__$jscomp$23__block$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$jscomp$23__block$$, $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$) : $__webpack_require__$jscomp$23__block$$.__proto__ = $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ = ($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ = $__webpack_require__$jscomp$23__block$$(0)) && $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$.__esModule ? $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ : {default:$Container__parchment$jscomp$10__parchment2$jscomp$10_module$$}; | |
var $_block2$$ = ($__webpack_require__$jscomp$23__block$$ = $__webpack_require__$jscomp$23__block$$(4)) && $__webpack_require__$jscomp$23__block$$.__esModule ? $__webpack_require__$jscomp$23__block$$ : {default:$__webpack_require__$jscomp$23__block$$}; | |
$Container__parchment$jscomp$10__parchment2$jscomp$10_module$$ = function($__webpack_require__$jscomp$23__block$$) { | |
function $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$() { | |
if (!(this instanceof $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $call$$ = ($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$.__proto__ || Object.getPrototypeOf($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? this : $call$$; | |
} | |
$_inherits$$($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$, $__webpack_require__$jscomp$23__block$$); | |
return $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$; | |
}($Container__parchment$jscomp$10__parchment2$jscomp$10_module$$.default.Container); | |
$Container__parchment$jscomp$10__parchment2$jscomp$10_module$$.allowedChildren = [$_block2$$.default, $__webpack_require__$jscomp$23__block$$.BlockEmbed, $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$]; | |
$exports$$.default = $Container__parchment$jscomp$10__parchment2$jscomp$10_module$$; | |
}, function($ColorAttributor__parchment$jscomp$11_module$$, $exports$$, $ColorClass___webpack_require__$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.ColorStyle = $exports$$.ColorClass = $exports$$.ColorAttributor = void 0; | |
var $_createClass$$ = function() { | |
function $defineProperties$$($target$$, $props$$) { | |
for (var $defineProperties$$ = 0; $defineProperties$$ < $props$$.length; $defineProperties$$++) { | |
var $ColorClass___webpack_require__$$ = $props$$[$defineProperties$$]; | |
$ColorClass___webpack_require__$$.enumerable = $ColorClass___webpack_require__$$.enumerable || !1; | |
$ColorClass___webpack_require__$$.configurable = !0; | |
"value" in $ColorClass___webpack_require__$$ && ($ColorClass___webpack_require__$$.writable = !0); | |
Object.defineProperty($target$$, $ColorClass___webpack_require__$$.key, $ColorClass___webpack_require__$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $ColorClass___webpack_require__$$) { | |
$protoProps$$ && $defineProperties$$($Constructor$$.prototype, $protoProps$$); | |
$ColorClass___webpack_require__$$ && $defineProperties$$($Constructor$$, $ColorClass___webpack_require__$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$8_parent$$, $getter$jscomp$9_property$$, $ColorClass___webpack_require__$$) { | |
null === $object$jscomp$8_parent$$ && ($object$jscomp$8_parent$$ = Function.prototype); | |
var $receiver$$ = Object.getOwnPropertyDescriptor($object$jscomp$8_parent$$, $getter$jscomp$9_property$$); | |
if (void 0 === $receiver$$) { | |
if ($object$jscomp$8_parent$$ = Object.getPrototypeOf($object$jscomp$8_parent$$), null !== $object$jscomp$8_parent$$) { | |
return $get$$($object$jscomp$8_parent$$, $getter$jscomp$9_property$$, $ColorClass___webpack_require__$$); | |
} | |
} else { | |
if ("value" in $receiver$$) { | |
return $receiver$$.value; | |
} | |
$getter$jscomp$9_property$$ = $receiver$$.get; | |
return void 0 === $getter$jscomp$9_property$$ ? void 0 : $getter$jscomp$9_property$$.call($ColorClass___webpack_require__$$); | |
} | |
}, $ColorStyle__parchment2$$ = ($ColorAttributor__parchment$jscomp$11_module$$ = $ColorClass___webpack_require__$$(0)) && $ColorAttributor__parchment$jscomp$11_module$$.__esModule ? $ColorAttributor__parchment$jscomp$11_module$$ : {default:$ColorAttributor__parchment$jscomp$11_module$$}; | |
$ColorAttributor__parchment$jscomp$11_module$$ = function($_Parchment$Attributor$$) { | |
function $ColorAttributor$$() { | |
if (!(this instanceof $ColorAttributor$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_Parchment$Attributor$$ = ($ColorAttributor$$.__proto__ || Object.getPrototypeOf($ColorAttributor$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_Parchment$Attributor$$ || "object" !== typeof $_Parchment$Attributor$$ && "function" !== typeof $_Parchment$Attributor$$ ? this : $_Parchment$Attributor$$; | |
} | |
$_inherits$$($ColorAttributor$$, $_Parchment$Attributor$$); | |
$_createClass$$($ColorAttributor$$, [{key:"value", value:function($_Parchment$Attributor$$) { | |
$_Parchment$Attributor$$ = $_get$$($ColorAttributor$$.prototype.__proto__ || Object.getPrototypeOf($ColorAttributor$$.prototype), "value", this).call(this, $_Parchment$Attributor$$); | |
if (!$_Parchment$Attributor$$.startsWith("rgb(")) { | |
return $_Parchment$Attributor$$; | |
} | |
$_Parchment$Attributor$$ = $_Parchment$Attributor$$.replace(/^[^\d]+/, "").replace(/[^\d]+$/, ""); | |
return "#" + $_Parchment$Attributor$$.split(",").map(function($ColorAttributor$$) { | |
return ("00" + parseInt($ColorAttributor$$).toString(16)).slice(-2); | |
}).join(""); | |
}}]); | |
return $ColorAttributor$$; | |
}($ColorStyle__parchment2$$.default.Attributor.Style); | |
$ColorClass___webpack_require__$$ = new $ColorStyle__parchment2$$.default.Attributor.Class("color", "ql-color", {scope:$ColorStyle__parchment2$$.default.Scope.INLINE}); | |
$ColorStyle__parchment2$$ = new $ColorAttributor__parchment$jscomp$11_module$$("color", "color", {scope:$ColorStyle__parchment2$$.default.Scope.INLINE}); | |
$exports$$.ColorAttributor = $ColorAttributor__parchment$jscomp$11_module$$; | |
$exports$$.ColorClass = $ColorClass___webpack_require__$$; | |
$exports$$.ColorStyle = $ColorStyle__parchment2$$; | |
}, function($Link__inline$jscomp$2_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
function $_sanitize$$($protocol$jscomp$1_url$$, $protocols$$) { | |
var $anchor$$ = document.createElement("a"); | |
$anchor$$.href = $protocol$jscomp$1_url$$; | |
$protocol$jscomp$1_url$$ = $anchor$$.href.slice(0, $anchor$$.href.indexOf(":")); | |
return -1 < $protocols$$.indexOf($protocol$jscomp$1_url$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.sanitize = $exports$$.default = void 0; | |
var $_createClass$$ = function() { | |
function $defineProperties$$($target$$, $props$$) { | |
for (var $defineProperties$$ = 0; $defineProperties$$ < $props$$.length; $defineProperties$$++) { | |
var $__webpack_require__$$ = $props$$[$defineProperties$$]; | |
$__webpack_require__$$.enumerable = $__webpack_require__$$.enumerable || !1; | |
$__webpack_require__$$.configurable = !0; | |
"value" in $__webpack_require__$$ && ($__webpack_require__$$.writable = !0); | |
Object.defineProperty($target$$, $__webpack_require__$$.key, $__webpack_require__$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $__webpack_require__$$) { | |
$protoProps$$ && $defineProperties$$($Constructor$$.prototype, $protoProps$$); | |
$__webpack_require__$$ && $defineProperties$$($Constructor$$, $__webpack_require__$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$9_parent$$, $getter$jscomp$10_property$$, $__webpack_require__$$) { | |
null === $object$jscomp$9_parent$$ && ($object$jscomp$9_parent$$ = Function.prototype); | |
var $receiver$$ = Object.getOwnPropertyDescriptor($object$jscomp$9_parent$$, $getter$jscomp$10_property$$); | |
if (void 0 === $receiver$$) { | |
if ($object$jscomp$9_parent$$ = Object.getPrototypeOf($object$jscomp$9_parent$$), null !== $object$jscomp$9_parent$$) { | |
return $get$$($object$jscomp$9_parent$$, $getter$jscomp$10_property$$, $__webpack_require__$$); | |
} | |
} else { | |
if ("value" in $receiver$$) { | |
return $receiver$$.value; | |
} | |
$getter$jscomp$10_property$$ = $receiver$$.get; | |
return void 0 === $getter$jscomp$10_property$$ ? void 0 : $getter$jscomp$10_property$$.call($__webpack_require__$$); | |
} | |
}; | |
$Link__inline$jscomp$2_module$$ = $__webpack_require__$$(6); | |
$Link__inline$jscomp$2_module$$ = function($_Inline$$) { | |
function $Link$$() { | |
if (!(this instanceof $Link$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_Inline$$ = ($Link$$.__proto__ || Object.getPrototypeOf($Link$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_Inline$$ || "object" !== typeof $_Inline$$ && "function" !== typeof $_Inline$$ ? this : $_Inline$$; | |
} | |
$_inherits$$($Link$$, $_Inline$$); | |
$_createClass$$($Link$$, [{key:"format", value:function($_Inline$$, $__webpack_require__$$) { | |
if ($_Inline$$ !== this.statics.blotName || !$__webpack_require__$$) { | |
return $_get$$($Link$$.prototype.__proto__ || Object.getPrototypeOf($Link$$.prototype), "format", this).call(this, $_Inline$$, $__webpack_require__$$); | |
} | |
$__webpack_require__$$ = this.constructor.sanitize($__webpack_require__$$); | |
this.domNode.setAttribute("href", $__webpack_require__$$); | |
}}], [{key:"create", value:function($_Inline$$) { | |
var $__webpack_require__$$ = $_get$$($Link$$.__proto__ || Object.getPrototypeOf($Link$$), "create", this).call(this, $_Inline$$); | |
$_Inline$$ = this.sanitize($_Inline$$); | |
$__webpack_require__$$.setAttribute("href", $_Inline$$); | |
$__webpack_require__$$.setAttribute("target", "_blank"); | |
return $__webpack_require__$$; | |
}}, {key:"formats", value:function($Link$$) { | |
return $Link$$.getAttribute("href"); | |
}}, {key:"sanitize", value:function($Link$$) { | |
return $_sanitize$$($Link$$, this.PROTOCOL_WHITELIST) ? $Link$$ : this.SANITIZED_URL; | |
}}]); | |
return $Link$$; | |
}(($Link__inline$jscomp$2_module$$ && $Link__inline$jscomp$2_module$$.__esModule ? $Link__inline$jscomp$2_module$$ : {default:$Link__inline$jscomp$2_module$$}).default); | |
$Link__inline$jscomp$2_module$$.blotName = "link"; | |
$Link__inline$jscomp$2_module$$.tagName = "A"; | |
$Link__inline$jscomp$2_module$$.SANITIZED_URL = "about:blank"; | |
$Link__inline$jscomp$2_module$$.PROTOCOL_WHITELIST = ["http", "https", "mailto", "tel"]; | |
$exports$$.default = $Link__inline$jscomp$2_module$$; | |
$exports$$.sanitize = $_sanitize$$; | |
}, function($Picker__dropdown_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_typeof$$ = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function($__webpack_require__$$) { | |
return typeof $__webpack_require__$$; | |
} : function($__webpack_require__$$) { | |
return $__webpack_require__$$ && "function" === typeof Symbol && $__webpack_require__$$.constructor === Symbol && $__webpack_require__$$ !== Symbol.prototype ? "symbol" : typeof $__webpack_require__$$; | |
}, $_createClass$$ = function() { | |
function $__webpack_require__$$($target$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $__webpack_require__$$ = $props$$[$i$$]; | |
$__webpack_require__$$.enumerable = $__webpack_require__$$.enumerable || !1; | |
$__webpack_require__$$.configurable = !0; | |
"value" in $__webpack_require__$$ && ($__webpack_require__$$.writable = !0); | |
Object.defineProperty($target$$, $__webpack_require__$$.key, $__webpack_require__$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_dropdown2$$ = ($Picker__dropdown_module$$ = $__webpack_require__$$(107)) && $Picker__dropdown_module$$.__esModule ? $Picker__dropdown_module$$ : {default:$Picker__dropdown_module$$}; | |
$Picker__dropdown_module$$ = function() { | |
function $__webpack_require__$$($select$$) { | |
var $_this$$ = this; | |
if (!(this instanceof $__webpack_require__$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
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$$.container.classList.toggle("ql-expanded"); | |
}); | |
this.select.addEventListener("change", this.update.bind(this)); | |
} | |
$_createClass$$($__webpack_require__$$, [{key:"buildItem", value:function($option$$) { | |
var $_this2$$ = this, $item$$ = document.createElement("span"); | |
$item$$.classList.add("ql-picker-item"); | |
$option$$.hasAttribute("value") && $item$$.setAttribute("data-value", $option$$.getAttribute("value")); | |
$option$$.textContent && $item$$.setAttribute("data-label", $option$$.textContent); | |
$item$$.addEventListener("click", function() { | |
$_this2$$.selectItem($item$$, !0); | |
}); | |
return $item$$; | |
}}, {key:"buildLabel", value:function() { | |
var $label$$ = document.createElement("span"); | |
$label$$.classList.add("ql-picker-label"); | |
$label$$.innerHTML = $_dropdown2$$.default; | |
this.container.appendChild($label$$); | |
return $label$$; | |
}}, {key:"buildOptions", value:function() { | |
var $_this3$$ = this, $options$$ = document.createElement("span"); | |
$options$$.classList.add("ql-picker-options"); | |
[].slice.call(this.select.options).forEach(function($option$$) { | |
var $__webpack_require__$$ = $_this3$$.buildItem($option$$); | |
$options$$.appendChild($__webpack_require__$$); | |
!0 === $option$$.selected && $_this3$$.selectItem($__webpack_require__$$); | |
}); | |
this.container.appendChild($options$$); | |
}}, {key:"buildPicker", value:function() { | |
var $__webpack_require__$$ = this; | |
[].slice.call(this.select.attributes).forEach(function($item$$) { | |
$__webpack_require__$$.container.setAttribute($item$$.name, $item$$.value); | |
}); | |
this.container.classList.add("ql-picker"); | |
this.label = this.buildLabel(); | |
this.buildOptions(); | |
}}, {key:"close", value:function() { | |
this.container.classList.remove("ql-expanded"); | |
}}, {key:"selectItem", value:function($__webpack_require__$$) { | |
var $event$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1, $selected$$ = this.container.querySelector(".ql-selected"); | |
$__webpack_require__$$ !== $selected$$ && (null != $selected$$ && $selected$$.classList.remove("ql-selected"), null != $__webpack_require__$$ && ($__webpack_require__$$.classList.add("ql-selected"), this.select.selectedIndex = [].indexOf.call($__webpack_require__$$.parentNode.children, $__webpack_require__$$), $__webpack_require__$$.hasAttribute("data-value") ? this.label.setAttribute("data-value", $__webpack_require__$$.getAttribute("data-value")) : this.label.removeAttribute("data-value"), | |
$__webpack_require__$$.hasAttribute("data-label") ? this.label.setAttribute("data-label", $__webpack_require__$$.getAttribute("data-label")) : this.label.removeAttribute("data-label"), $event$$ && ("function" === typeof Event ? this.select.dispatchEvent(new Event("change")) : "object" === ("undefined" === typeof Event ? "undefined" : $_typeof$$(Event)) && ($event$$ = document.createEvent("Event"), $event$$.initEvent("change", !0, !0), this.select.dispatchEvent($event$$)), this.close()))); | |
}}, {key:"update", value:function() { | |
var $__webpack_require__$$ = void 0; | |
if (-1 < this.select.selectedIndex) { | |
var $item$$ = this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex]; | |
$__webpack_require__$$ = this.select.options[this.select.selectedIndex]; | |
this.selectItem($item$$); | |
} else { | |
this.selectItem(null); | |
} | |
$__webpack_require__$$ = null != $__webpack_require__$$ && $__webpack_require__$$ !== this.select.querySelector("option[selected]"); | |
this.label.classList.toggle("ql-active", $__webpack_require__$$); | |
}}]); | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $Picker__dropdown_module$$; | |
}, function($_parchment$jscomp$12__parchment2$jscomp$12_module$$, $exports$$, $__webpack_require__$$) { | |
function $_interopRequireDefault$$($_cursor$jscomp$1__cursor2$$) { | |
return $_cursor$jscomp$1__cursor2$$ && $_cursor$jscomp$1__cursor2$$.__esModule ? $_cursor$jscomp$1__cursor2$$ : {default:$_cursor$jscomp$1__cursor2$$}; | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$_parchment$jscomp$12__parchment2$jscomp$12_module$$ = $__webpack_require__$$(0); | |
$_parchment$jscomp$12__parchment2$jscomp$12_module$$ = $_interopRequireDefault$$($_parchment$jscomp$12__parchment2$jscomp$12_module$$); | |
var $_quill__quill2$$ = $__webpack_require__$$(5); | |
$_quill__quill2$$ = $_interopRequireDefault$$($_quill__quill2$$); | |
var $_block$$ = $__webpack_require__$$(4), $_block2$$ = $_interopRequireDefault$$($_block$$), $_break$jscomp$3__break2$$ = $__webpack_require__$$(16); | |
$_break$jscomp$3__break2$$ = $_interopRequireDefault$$($_break$jscomp$3__break2$$); | |
var $_container$jscomp$1__container2$$ = $__webpack_require__$$(24); | |
$_container$jscomp$1__container2$$ = $_interopRequireDefault$$($_container$jscomp$1__container2$$); | |
var $_cursor$jscomp$1__cursor2$$ = $__webpack_require__$$(23); | |
$_cursor$jscomp$1__cursor2$$ = $_interopRequireDefault$$($_cursor$jscomp$1__cursor2$$); | |
var $_embed__embed2$$ = $__webpack_require__$$(35); | |
$_embed__embed2$$ = $_interopRequireDefault$$($_embed__embed2$$); | |
var $_inline$jscomp$3__inline2$$ = $__webpack_require__$$(6); | |
$_inline$jscomp$3__inline2$$ = $_interopRequireDefault$$($_inline$jscomp$3__inline2$$); | |
var $_scroll__scroll2$$ = $__webpack_require__$$(22); | |
$_scroll__scroll2$$ = $_interopRequireDefault$$($_scroll__scroll2$$); | |
var $_text$jscomp$4__text2$$ = $__webpack_require__$$(7); | |
$_text$jscomp$4__text2$$ = $_interopRequireDefault$$($_text$jscomp$4__text2$$); | |
var $_clipboard__clipboard2$$ = $__webpack_require__$$(55); | |
$_clipboard__clipboard2$$ = $_interopRequireDefault$$($_clipboard__clipboard2$$); | |
var $_history__history2$$ = $__webpack_require__$$(42); | |
$_history__history2$$ = $_interopRequireDefault$$($_history__history2$$); | |
$__webpack_require__$$ = $__webpack_require__$$(34); | |
$__webpack_require__$$ = $_interopRequireDefault$$($__webpack_require__$$); | |
$_quill__quill2$$.default.register({"blots/block":$_block2$$.default, "blots/block/embed":$_block$$.BlockEmbed, "blots/break":$_break$jscomp$3__break2$$.default, "blots/container":$_container$jscomp$1__container2$$.default, "blots/cursor":$_cursor$jscomp$1__cursor2$$.default, "blots/embed":$_embed__embed2$$.default, "blots/inline":$_inline$jscomp$3__inline2$$.default, "blots/scroll":$_scroll__scroll2$$.default, "blots/text":$_text$jscomp$4__text2$$.default, "modules/clipboard":$_clipboard__clipboard2$$.default, | |
"modules/history":$_history__history2$$.default, "modules/keyboard":$__webpack_require__$$.default}); | |
$_parchment$jscomp$12__parchment2$jscomp$12_module$$.default.register($_block2$$.default, $_break$jscomp$3__break2$$.default, $_cursor$jscomp$1__cursor2$$.default, $_inline$jscomp$3__inline2$$.default, $_scroll__scroll2$$.default, $_text$jscomp$4__text2$$.default); | |
$exports$$.default = $_quill__quill2$$.default; | |
}, function($ShadowBlot_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $Registry$$ = $__webpack_require__$$(1); | |
$ShadowBlot_module$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$) { | |
this.domNode = $__webpack_require__$$; | |
this.domNode[$Registry$$.DATA_KEY] = {blot:this}; | |
} | |
Object.defineProperty($__webpack_require__$$.prototype, "statics", {get:function() { | |
return this.constructor; | |
}, enumerable:!0, configurable:!0}); | |
$__webpack_require__$$.create = function($__webpack_require__$$) { | |
if (null == this.tagName) { | |
throw new $Registry$$.ParchmentError("Blot definition missing tagName"); | |
} | |
Array.isArray(this.tagName) ? ("string" === typeof $__webpack_require__$$ && ($__webpack_require__$$ = $__webpack_require__$$.toUpperCase(), parseInt($__webpack_require__$$).toString() === $__webpack_require__$$ && ($__webpack_require__$$ = parseInt($__webpack_require__$$))), $__webpack_require__$$ = "number" === typeof $__webpack_require__$$ ? document.createElement(this.tagName[$__webpack_require__$$ - 1]) : -1 < this.tagName.indexOf($__webpack_require__$$) ? document.createElement($__webpack_require__$$) : | |
document.createElement(this.tagName[0])) : $__webpack_require__$$ = document.createElement(this.tagName); | |
this.className && $__webpack_require__$$.classList.add(this.className); | |
return $__webpack_require__$$; | |
}; | |
$__webpack_require__$$.prototype.attach = function() { | |
null != this.parent && (this.scroll = this.parent.scroll); | |
}; | |
$__webpack_require__$$.prototype.clone = function() { | |
var $__webpack_require__$$ = this.domNode.cloneNode(!1); | |
return $Registry$$.create($__webpack_require__$$); | |
}; | |
$__webpack_require__$$.prototype.detach = function() { | |
null != this.parent && this.parent.removeChild(this); | |
delete this.domNode[$Registry$$.DATA_KEY]; | |
}; | |
$__webpack_require__$$.prototype.deleteAt = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
this.isolate($__webpack_require__$$, $ShadowBlot_module$$).remove(); | |
}; | |
$__webpack_require__$$.prototype.formatAt = function($__webpack_require__$$, $ShadowBlot_module$$, $name$$, $value$$) { | |
$__webpack_require__$$ = this.isolate($__webpack_require__$$, $ShadowBlot_module$$); | |
null != $Registry$$.query($name$$, $Registry$$.Scope.BLOT) && $value$$ ? $__webpack_require__$$.wrap($name$$, $value$$) : null != $Registry$$.query($name$$, $Registry$$.Scope.ATTRIBUTE) && ($ShadowBlot_module$$ = $Registry$$.create(this.statics.scope), $__webpack_require__$$.wrap($ShadowBlot_module$$), $ShadowBlot_module$$.format($name$$, $value$$)); | |
}; | |
$__webpack_require__$$.prototype.insertAt = function($__webpack_require__$$, $ShadowBlot_module$$, $def$$) { | |
$ShadowBlot_module$$ = null == $def$$ ? $Registry$$.create("text", $ShadowBlot_module$$) : $Registry$$.create($ShadowBlot_module$$, $def$$); | |
$__webpack_require__$$ = this.split($__webpack_require__$$); | |
this.parent.insertBefore($ShadowBlot_module$$, $__webpack_require__$$); | |
}; | |
$__webpack_require__$$.prototype.insertInto = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
void 0 === $ShadowBlot_module$$ && ($ShadowBlot_module$$ = null); | |
null != this.parent && this.parent.children.remove(this); | |
var $refDomNode$$ = null; | |
$__webpack_require__$$.children.insertBefore(this, $ShadowBlot_module$$); | |
null != $ShadowBlot_module$$ && ($refDomNode$$ = $ShadowBlot_module$$.domNode); | |
null != this.next && this.domNode.nextSibling == $refDomNode$$ || $__webpack_require__$$.domNode.insertBefore(this.domNode, $refDomNode$$); | |
this.parent = $__webpack_require__$$; | |
this.attach(); | |
}; | |
$__webpack_require__$$.prototype.isolate = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
$__webpack_require__$$ = this.split($__webpack_require__$$); | |
$__webpack_require__$$.split($ShadowBlot_module$$); | |
return $__webpack_require__$$; | |
}; | |
$__webpack_require__$$.prototype.length = function() { | |
return 1; | |
}; | |
$__webpack_require__$$.prototype.offset = function($__webpack_require__$$) { | |
void 0 === $__webpack_require__$$ && ($__webpack_require__$$ = this.parent); | |
return null == this.parent || this == $__webpack_require__$$ ? 0 : this.parent.children.offset(this) + this.parent.offset($__webpack_require__$$); | |
}; | |
$__webpack_require__$$.prototype.optimize = function($__webpack_require__$$) { | |
null != this.domNode[$Registry$$.DATA_KEY] && delete this.domNode[$Registry$$.DATA_KEY].mutations; | |
}; | |
$__webpack_require__$$.prototype.remove = function() { | |
null != this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode); | |
this.detach(); | |
}; | |
$__webpack_require__$$.prototype.replace = function($__webpack_require__$$) { | |
null != $__webpack_require__$$.parent && ($__webpack_require__$$.parent.insertBefore(this, $__webpack_require__$$.next), $__webpack_require__$$.remove()); | |
}; | |
$__webpack_require__$$.prototype.replaceWith = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
$__webpack_require__$$ = "string" === typeof $__webpack_require__$$ ? $Registry$$.create($__webpack_require__$$, $ShadowBlot_module$$) : $__webpack_require__$$; | |
$__webpack_require__$$.replace(this); | |
return $__webpack_require__$$; | |
}; | |
$__webpack_require__$$.prototype.split = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
return 0 === $__webpack_require__$$ ? this : this.next; | |
}; | |
$__webpack_require__$$.prototype.update = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
}; | |
$__webpack_require__$$.prototype.wrap = function($__webpack_require__$$, $ShadowBlot_module$$) { | |
$__webpack_require__$$ = "string" === typeof $__webpack_require__$$ ? $Registry$$.create($__webpack_require__$$, $ShadowBlot_module$$) : $__webpack_require__$$; | |
null != this.parent && this.parent.insertBefore($__webpack_require__$$, this.next); | |
$__webpack_require__$$.appendChild(this); | |
return $__webpack_require__$$; | |
}; | |
$__webpack_require__$$.blotName = "abstract"; | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $ShadowBlot_module$$; | |
}, function($AttributorStore_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $attributor_1$$ = $__webpack_require__$$(12), $class_1$$ = $__webpack_require__$$(31), $style_1$$ = $__webpack_require__$$(32), $Registry$$ = $__webpack_require__$$(1); | |
$AttributorStore_module$$ = function() { | |
function $__webpack_require__$$($domNode$$) { | |
this.attributes = {}; | |
this.domNode = $domNode$$; | |
this.build(); | |
} | |
$__webpack_require__$$.prototype.attribute = function($attribute$$, $value$$) { | |
$value$$ ? $attribute$$.add(this.domNode, $value$$) && (null != $attribute$$.value(this.domNode) ? this.attributes[$attribute$$.attrName] = $attribute$$ : delete this.attributes[$attribute$$.attrName]) : ($attribute$$.remove(this.domNode), delete this.attributes[$attribute$$.attrName]); | |
}; | |
$__webpack_require__$$.prototype.build = function() { | |
var $_this$$ = this; | |
this.attributes = {}; | |
var $attributes$$ = $attributor_1$$.default.keys(this.domNode), $__webpack_require__$$ = $class_1$$.default.keys(this.domNode), $AttributorStore$$ = $style_1$$.default.keys(this.domNode); | |
$attributes$$.concat($__webpack_require__$$).concat($AttributorStore$$).forEach(function($attributes$$) { | |
$attributes$$ = $Registry$$.query($attributes$$, $Registry$$.Scope.ATTRIBUTE); | |
$attributes$$ instanceof $attributor_1$$.default && ($_this$$.attributes[$attributes$$.attrName] = $attributes$$); | |
}); | |
}; | |
$__webpack_require__$$.prototype.copy = function($target$$) { | |
var $_this$$ = this; | |
Object.keys(this.attributes).forEach(function($__webpack_require__$$) { | |
var $AttributorStore$$ = $_this$$.attributes[$__webpack_require__$$].value($_this$$.domNode); | |
$target$$.format($__webpack_require__$$, $AttributorStore$$); | |
}); | |
}; | |
$__webpack_require__$$.prototype.move = function($target$$) { | |
var $_this$$ = this; | |
this.copy($target$$); | |
Object.keys(this.attributes).forEach(function($target$$) { | |
$_this$$.attributes[$target$$].remove($_this$$.domNode); | |
}); | |
this.attributes = {}; | |
}; | |
$__webpack_require__$$.prototype.values = function() { | |
var $_this$$ = this; | |
return Object.keys(this.attributes).reduce(function($attributes$$, $__webpack_require__$$) { | |
$attributes$$[$__webpack_require__$$] = $_this$$.attributes[$__webpack_require__$$].value($_this$$.domNode); | |
return $attributes$$; | |
}, {}); | |
}; | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $AttributorStore_module$$; | |
}, function($ClassAttributor_module$$, $exports$$, $__webpack_require__$$) { | |
function $match$$($__webpack_require__$$, $ClassAttributor_module$$) { | |
return ($__webpack_require__$$.getAttribute("class") || "").split(/\s+/).filter(function($__webpack_require__$$) { | |
return 0 === $__webpack_require__$$.indexOf($ClassAttributor_module$$ + "-"); | |
}); | |
} | |
var $__extends$$ = this && this.__extends || function() { | |
var $__webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($__webpack_require__$$, $b$$) { | |
$__webpack_require__$$.__proto__ = $b$$; | |
} || function($__webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($__webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($ClassAttributor_module$$, $b$$) { | |
function $__$$() { | |
this.constructor = $ClassAttributor_module$$; | |
} | |
$__webpack_require__$$($ClassAttributor_module$$, $b$$); | |
$ClassAttributor_module$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$ClassAttributor_module$$ = function($__webpack_require__$$) { | |
function $ClassAttributor_module$$() { | |
return null !== $__webpack_require__$$ && $__webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($ClassAttributor_module$$, $__webpack_require__$$); | |
$ClassAttributor_module$$.keys = function($__webpack_require__$$) { | |
return ($__webpack_require__$$.getAttribute("class") || "").split(/\s+/).map(function($name$$) { | |
return $name$$.split("-").slice(0, -1).join("-"); | |
}); | |
}; | |
$ClassAttributor_module$$.prototype.add = function($__webpack_require__$$, $value$$) { | |
if (!this.canAdd($__webpack_require__$$, $value$$)) { | |
return !1; | |
} | |
this.remove($__webpack_require__$$); | |
$__webpack_require__$$.classList.add(this.keyName + "-" + $value$$); | |
return !0; | |
}; | |
$ClassAttributor_module$$.prototype.remove = function($__webpack_require__$$) { | |
$match$$($__webpack_require__$$, this.keyName).forEach(function($name$$) { | |
$__webpack_require__$$.classList.remove($name$$); | |
}); | |
0 === $__webpack_require__$$.classList.length && $__webpack_require__$$.removeAttribute("class"); | |
}; | |
$ClassAttributor_module$$.prototype.value = function($__webpack_require__$$) { | |
var $value$$ = ($match$$($__webpack_require__$$, this.keyName)[0] || "").slice(this.keyName.length + 1); | |
return this.canAdd($__webpack_require__$$, $value$$) ? $value$$ : ""; | |
}; | |
return $ClassAttributor_module$$; | |
}($__webpack_require__$$(12).default); | |
$exports$$.default = $ClassAttributor_module$$; | |
}, function($StyleAttributor_module$$, $exports$$, $__webpack_require__$$) { | |
function $camelize$$($__webpack_require__$$) { | |
$__webpack_require__$$ = $__webpack_require__$$.split("-"); | |
var $StyleAttributor_module$$ = $__webpack_require__$$.slice(1).map(function($__webpack_require__$$) { | |
return $__webpack_require__$$[0].toUpperCase() + $__webpack_require__$$.slice(1); | |
}).join(""); | |
return $__webpack_require__$$[0] + $StyleAttributor_module$$; | |
} | |
var $__extends$$ = this && this.__extends || function() { | |
var $__webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($__webpack_require__$$, $b$$) { | |
$__webpack_require__$$.__proto__ = $b$$; | |
} || function($__webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($__webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($StyleAttributor_module$$, $b$$) { | |
function $__$$() { | |
this.constructor = $StyleAttributor_module$$; | |
} | |
$__webpack_require__$$($StyleAttributor_module$$, $b$$); | |
$StyleAttributor_module$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$StyleAttributor_module$$ = function($__webpack_require__$$) { | |
function $StyleAttributor_module$$() { | |
return null !== $__webpack_require__$$ && $__webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($StyleAttributor_module$$, $__webpack_require__$$); | |
$StyleAttributor_module$$.keys = function($__webpack_require__$$) { | |
return ($__webpack_require__$$.getAttribute("style") || "").split(";").map(function($value$$) { | |
return $value$$.split(":")[0].trim(); | |
}); | |
}; | |
$StyleAttributor_module$$.prototype.add = function($__webpack_require__$$, $value$$) { | |
if (!this.canAdd($__webpack_require__$$, $value$$)) { | |
return !1; | |
} | |
$__webpack_require__$$.style[$camelize$$(this.keyName)] = $value$$; | |
return !0; | |
}; | |
$StyleAttributor_module$$.prototype.remove = function($__webpack_require__$$) { | |
$__webpack_require__$$.style[$camelize$$(this.keyName)] = ""; | |
$__webpack_require__$$.getAttribute("style") || $__webpack_require__$$.removeAttribute("style"); | |
}; | |
$StyleAttributor_module$$.prototype.value = function($__webpack_require__$$) { | |
var $value$$ = $__webpack_require__$$.style[$camelize$$(this.keyName)]; | |
return this.canAdd($__webpack_require__$$, $value$$) ? $value$$ : ""; | |
}; | |
return $StyleAttributor_module$$; | |
}($__webpack_require__$$(12).default); | |
$exports$$.default = $StyleAttributor_module$$; | |
}, function($Theme_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $Theme_module$$) { | |
for (var $i$$ = 0; $i$$ < $Theme_module$$.length; $i$$++) { | |
var $descriptor$$ = $Theme_module$$[$i$$]; | |
$descriptor$$.enumerable = $descriptor$$.enumerable || !1; | |
$descriptor$$.configurable = !0; | |
"value" in $descriptor$$ && ($descriptor$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $descriptor$$.key, $descriptor$$); | |
} | |
} | |
return function($Theme_module$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Theme_module$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Theme_module$$, $staticProps$$); | |
return $Theme_module$$; | |
}; | |
}(); | |
$Theme_module$$ = function() { | |
function $__webpack_require__$$($Theme_module$$, $options$$) { | |
if (!(this instanceof $__webpack_require__$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
this.quill = $Theme_module$$; | |
this.options = $options$$; | |
this.modules = {}; | |
} | |
$_createClass$$($__webpack_require__$$, [{key:"init", value:function() { | |
var $__webpack_require__$$ = this; | |
Object.keys(this.options.modules).forEach(function($Theme_module$$) { | |
null == $__webpack_require__$$.modules[$Theme_module$$] && $__webpack_require__$$.addModule($Theme_module$$); | |
}); | |
}}, {key:"addModule", value:function($__webpack_require__$$) { | |
var $Theme_module$$ = this.quill.constructor.import("modules/" + $__webpack_require__$$); | |
this.modules[$__webpack_require__$$] = new $Theme_module$$(this.quill, this.options.modules[$__webpack_require__$$] || {}); | |
return this.modules[$__webpack_require__$$]; | |
}}]); | |
return $__webpack_require__$$; | |
}(); | |
$Theme_module$$.DEFAULTS = {modules:{}}; | |
$Theme_module$$.themes = {"default":$Theme_module$$}; | |
$exports$$.default = $Theme_module$$; | |
}, function($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$, $exports$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
function $_interopRequireDefault$$($handleDelete$$) { | |
return $handleDelete$$ && $handleDelete$$.__esModule ? $handleDelete$$ : {default:$handleDelete$$}; | |
} | |
function $_defineProperty$$($handleDelete$$, $handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
$handleBackspace$$ in $handleDelete$$ ? Object.defineProperty($handleDelete$$, $handleBackspace$$, {value:$__webpack_require__$jscomp$33__module$jscomp$1__module2$$, enumerable:!0, configurable:!0, writable:!0}) : $handleDelete$$[$handleBackspace$$] = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$; | |
return $handleDelete$$; | |
} | |
function $_possibleConstructorReturn$$($handleDelete$$, $handleBackspace$$) { | |
if (!$handleDelete$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$handleBackspace$$ || "object" !== typeof $handleBackspace$$ && "function" !== typeof $handleBackspace$$ ? $handleDelete$$ : $handleBackspace$$; | |
} | |
function $_inherits$$($handleDelete$$, $handleBackspace$$) { | |
if ("function" !== typeof $handleBackspace$$ && null !== $handleBackspace$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $handleBackspace$$); | |
} | |
$handleDelete$$.prototype = Object.create($handleBackspace$$ && $handleBackspace$$.prototype, {constructor:{value:$handleDelete$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$handleBackspace$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($handleDelete$$, $handleBackspace$$) : $handleDelete$$.__proto__ = $handleBackspace$$); | |
} | |
function $makeEmbedArrowHandler$$($handleDelete$$, $handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$ = $handleDelete$$ === $Keyboard$$.keys.LEFT ? "prefix" : "suffix"; | |
return $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = {key:$handleDelete$$, shiftKey:$handleBackspace$$, altKey:null}, $_defineProperty$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$, /^$/), $_defineProperty$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, "handler", function($__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
var $makeEmbedArrowHandler$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.index; | |
$handleDelete$$ === $Keyboard$$.keys.RIGHT && ($makeEmbedArrowHandler$$ += $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length + 1); | |
$makeEmbedArrowHandler$$ = this.quill.getLeaf($makeEmbedArrowHandler$$); | |
if (!($_slicedToArray$$($makeEmbedArrowHandler$$, 1)[0] instanceof $_parchment2$$.default.Embed)) { | |
return !0; | |
} | |
$handleDelete$$ === $Keyboard$$.keys.LEFT ? $handleBackspace$$ ? this.quill.setSelection($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.index - 1, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length + 1, $_quill2$$.default.sources.USER) : this.quill.setSelection($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.index - 1, $_quill2$$.default.sources.USER) : $handleBackspace$$ ? this.quill.setSelection($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.index, | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length + 1, $_quill2$$.default.sources.USER) : this.quill.setSelection($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.index + $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length + 1, $_quill2$$.default.sources.USER); | |
return !1; | |
}), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$; | |
} | |
function $handleBackspace$$($handleDelete$$, $handleBackspace$$) { | |
if (!(0 === $handleDelete$$.index || 1 >= this.quill.getLength())) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = this.quill.getLine($handleDelete$$.index), $makeEmbedArrowHandler$$ = $_slicedToArray$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, 1)[0]; | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = {}; | |
if (0 === $handleBackspace$$.offset) { | |
var $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = this.quill.getLine($handleDelete$$.index - 1); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $_slicedToArray$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$, 1)[0]; | |
null != $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ && 1 < $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.length() && ($__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $makeEmbedArrowHandler$$.formats(), $makeEmbedArrowHandler$$ = | |
this.quill.getFormat($handleDelete$$.index - 1, 1), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_op2$$.default.attributes.diff($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$) || {}); | |
} | |
$handleBackspace$$ = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test($handleBackspace$$.prefix) ? 2 : 1; | |
this.quill.deleteText($handleDelete$$.index - $handleBackspace$$, $handleBackspace$$, $_quill2$$.default.sources.USER); | |
0 < Object.keys($__webpack_require__$jscomp$33__module$jscomp$1__module2$$).length && this.quill.formatLine($handleDelete$$.index - $handleBackspace$$, $handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_quill2$$.default.sources.USER); | |
this.quill.focus(); | |
} | |
} | |
function $handleDelete$$($handleDelete$$, $handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test($handleBackspace$$.suffix) ? 2 : 1; | |
if (!($handleDelete$$.index >= this.quill.getLength() - $__webpack_require__$jscomp$33__module$jscomp$1__module2$$)) { | |
var $makeEmbedArrowHandler$$ = {}, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = 0, $handleDeleteRange$$ = this.quill.getLine($handleDelete$$.index); | |
$handleDeleteRange$$ = $_slicedToArray$$($handleDeleteRange$$, 1)[0]; | |
$handleBackspace$$.offset >= $handleDeleteRange$$.length() - 1 && ($handleBackspace$$ = this.quill.getLine($handleDelete$$.index + 1), $handleBackspace$$ = $_slicedToArray$$($handleBackspace$$, 1)[0]) && ($makeEmbedArrowHandler$$ = $handleDeleteRange$$.formats(), $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = this.quill.getFormat($handleDelete$$.index, 1), $makeEmbedArrowHandler$$ = | |
$_op2$$.default.attributes.diff($makeEmbedArrowHandler$$, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$) || {}, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $handleBackspace$$.length()); | |
this.quill.deleteText($handleDelete$$.index, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_quill2$$.default.sources.USER); | |
0 < Object.keys($makeEmbedArrowHandler$$).length && this.quill.formatLine($handleDelete$$.index + $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ - 1, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$, $_quill2$$.default.sources.USER); | |
} | |
} | |
function $handleDeleteRange$$($handleDelete$$) { | |
var $handleBackspace$$ = this.quill.getLines($handleDelete$$), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = {}; | |
1 < $handleBackspace$$.length && ($__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $handleBackspace$$[0].formats(), $handleBackspace$$ = $handleBackspace$$[$handleBackspace$$.length - 1].formats(), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_op2$$.default.attributes.diff($handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) || {}); | |
this.quill.deleteText($handleDelete$$, $_quill2$$.default.sources.USER); | |
0 < Object.keys($__webpack_require__$jscomp$33__module$jscomp$1__module2$$).length && this.quill.formatLine($handleDelete$$.index, 1, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_quill2$$.default.sources.USER); | |
this.quill.setSelection($handleDelete$$.index, $_quill2$$.default.sources.SILENT); | |
this.quill.focus(); | |
} | |
function $handleEnter$$($handleDelete$$, $handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = this; | |
0 < $handleDelete$$.length && this.quill.scroll.deleteAt($handleDelete$$.index, $handleDelete$$.length); | |
var $makeEmbedArrowHandler$$ = Object.keys($handleBackspace$$.format).reduce(function($handleDelete$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
$_parchment2$$.default.query($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_parchment2$$.default.Scope.BLOCK) && !Array.isArray($handleBackspace$$.format[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$]) && ($handleDelete$$[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$] = $handleBackspace$$.format[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$]); | |
return $handleDelete$$; | |
}, {}); | |
this.quill.insertText($handleDelete$$.index, "\n", $makeEmbedArrowHandler$$, $_quill2$$.default.sources.USER); | |
this.quill.setSelection($handleDelete$$.index + 1, $_quill2$$.default.sources.SILENT); | |
this.quill.focus(); | |
Object.keys($handleBackspace$$.format).forEach(function($handleDelete$$) { | |
null == $makeEmbedArrowHandler$$[$handleDelete$$] && (Array.isArray($handleBackspace$$.format[$handleDelete$$]) || "link" !== $handleDelete$$ && $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.quill.format($handleDelete$$, $handleBackspace$$.format[$handleDelete$$], $_quill2$$.default.sources.USER)); | |
}); | |
} | |
function $makeCodeBlockHandler$$($handleDelete$$) { | |
return {key:$Keyboard$$.keys.TAB, shiftKey:!$handleDelete$$, format:{"code-block":!0}, handler:function($handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_parchment2$$.default.query("code-block"), $makeEmbedArrowHandler$$ = $handleBackspace$$.index, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $handleBackspace$$.length; | |
$handleBackspace$$ = this.quill.scroll.descendant($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$); | |
$handleBackspace$$ = $_slicedToArray$$($handleBackspace$$, 2); | |
var $handleDeleteRange$$ = $handleBackspace$$[0], $makeCodeBlockHandler$$ = $handleBackspace$$[1]; | |
if (null != $handleDeleteRange$$) { | |
$handleBackspace$$ = this.quill.getIndex($handleDeleteRange$$); | |
var $makeFormatHandler$$ = $handleDeleteRange$$.newlineIndex($makeCodeBlockHandler$$, !0) + 1; | |
$handleBackspace$$ = $handleDeleteRange$$.newlineIndex($handleBackspace$$ + $makeCodeBlockHandler$$ + $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$handleBackspace$$ = $handleDeleteRange$$.domNode.textContent.slice($makeFormatHandler$$, $handleBackspace$$).split("\n"); | |
$makeCodeBlockHandler$$ = 0; | |
$handleBackspace$$.forEach(function($handleBackspace$$, $_inherits$$) { | |
$handleDelete$$ ? ($handleDeleteRange$$.insertAt($makeFormatHandler$$ + $makeCodeBlockHandler$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB), $makeCodeBlockHandler$$ += $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length, 0 === $_inherits$$ ? $makeEmbedArrowHandler$$ += $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length : $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ += | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length) : $handleBackspace$$.startsWith($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB) && ($handleDeleteRange$$.deleteAt($makeFormatHandler$$ + $makeCodeBlockHandler$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length), $makeCodeBlockHandler$$ -= $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length, 0 === $_inherits$$ ? $makeEmbedArrowHandler$$ -= $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length : | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ -= $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.TAB.length); | |
$makeCodeBlockHandler$$ += $handleBackspace$$.length + 1; | |
}); | |
this.quill.update($_quill2$$.default.sources.USER); | |
this.quill.setSelection($makeEmbedArrowHandler$$, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$, $_quill2$$.default.sources.SILENT); | |
} | |
}}; | |
} | |
function $makeFormatHandler$$($handleDelete$$) { | |
return {key:$handleDelete$$[0].toUpperCase(), shortKey:!0, handler:function($handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
this.quill.format($handleDelete$$, !$__webpack_require__$jscomp$33__module$jscomp$1__module2$$.format[$handleDelete$$], $_quill2$$.default.sources.USER); | |
}}; | |
} | |
function $normalize$$($handleDelete$$) { | |
if ("string" === typeof $handleDelete$$ || "number" === typeof $handleDelete$$) { | |
return $normalize$$({key:$handleDelete$$}); | |
} | |
"object" === ("undefined" === typeof $handleDelete$$ ? "undefined" : $_typeof$$($handleDelete$$)) && ($handleDelete$$ = (0, $_clone2$$.default)($handleDelete$$, !1)); | |
if ("string" === typeof $handleDelete$$.key) { | |
if (null != $Keyboard$$.keys[$handleDelete$$.key.toUpperCase()]) { | |
$handleDelete$$.key = $Keyboard$$.keys[$handleDelete$$.key.toUpperCase()]; | |
} else { | |
if (1 === $handleDelete$$.key.length) { | |
$handleDelete$$.key = $handleDelete$$.key.toUpperCase().charCodeAt(0); | |
} else { | |
return null; | |
} | |
} | |
} | |
$handleDelete$$.shortKey && ($handleDelete$$[$SHORTKEY$$] = $handleDelete$$.shortKey, delete $handleDelete$$.shortKey); | |
return $handleDelete$$; | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.SHORTKEY = $exports$$.default = void 0; | |
var $_typeof$$ = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function($handleDelete$$) { | |
return typeof $handleDelete$$; | |
} : function($handleDelete$$) { | |
return $handleDelete$$ && "function" === typeof Symbol && $handleDelete$$.constructor === Symbol && $handleDelete$$ !== Symbol.prototype ? "symbol" : typeof $handleDelete$$; | |
}, $_slicedToArray$$ = function() { | |
return function($handleDelete$$, $handleBackspace$$) { | |
if (Array.isArray($handleDelete$$)) { | |
return $handleDelete$$; | |
} | |
if (Symbol.iterator in Object($handleDelete$$)) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = [], $makeEmbedArrowHandler$$ = !0, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = !1, $handleDeleteRange$$ = void 0; | |
try { | |
for (var $makeCodeBlockHandler$$ = $handleDelete$$[Symbol.iterator](), $makeFormatHandler$$; !($makeEmbedArrowHandler$$ = ($makeFormatHandler$$ = $makeCodeBlockHandler$$.next()).done) && ($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.push($makeFormatHandler$$.value), !$handleBackspace$$ || $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length !== $handleBackspace$$); $makeEmbedArrowHandler$$ = !0) { | |
} | |
} catch ($err$$) { | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = !0, $handleDeleteRange$$ = $err$$; | |
} finally { | |
try { | |
if (!$makeEmbedArrowHandler$$ && $makeCodeBlockHandler$$["return"]) { | |
$makeCodeBlockHandler$$["return"](); | |
} | |
} finally { | |
if ($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$) { | |
throw $handleDeleteRange$$; | |
} | |
} | |
} | |
return $__webpack_require__$jscomp$33__module$jscomp$1__module2$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $handleDelete$$($handleDelete$$, $handleBackspace$$) { | |
for (var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = 0; $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ < $handleBackspace$$.length; $__webpack_require__$jscomp$33__module$jscomp$1__module2$$++) { | |
var $makeEmbedArrowHandler$$ = $handleBackspace$$[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$]; | |
$makeEmbedArrowHandler$$.enumerable = $makeEmbedArrowHandler$$.enumerable || !1; | |
$makeEmbedArrowHandler$$.configurable = !0; | |
"value" in $makeEmbedArrowHandler$$ && ($makeEmbedArrowHandler$$.writable = !0); | |
Object.defineProperty($handleDelete$$, $makeEmbedArrowHandler$$.key, $makeEmbedArrowHandler$$); | |
} | |
} | |
return function($handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $makeEmbedArrowHandler$$) { | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ && $handleDelete$$($handleBackspace$$.prototype, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$); | |
$makeEmbedArrowHandler$$ && $handleDelete$$($handleBackspace$$, $makeEmbedArrowHandler$$); | |
return $handleBackspace$$; | |
}; | |
}(); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(21); | |
var $_clone2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(11); | |
var $_deepEqual2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(3); | |
var $_extend2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(20); | |
var $_op2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(5); | |
var $_quill2$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(10); | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $_interopRequireDefault$$($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$); | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$(9); | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_interopRequireDefault$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$); | |
var $debug$$ = (0, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.default)("quill:keyboard"), $SHORTKEY$$ = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey", $Keyboard$$ = function($__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
function $makeEmbedArrowHandler$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$) { | |
if (!(this instanceof $makeEmbedArrowHandler$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $makeCodeBlockHandler$$ = $_possibleConstructorReturn$$(this, ($makeEmbedArrowHandler$$.__proto__ || Object.getPrototypeOf($makeEmbedArrowHandler$$)).call(this, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$)); | |
$makeCodeBlockHandler$$.bindings = {}; | |
Object.keys($makeCodeBlockHandler$$.options.bindings).forEach(function($handleDelete$$) { | |
("list autofill" !== $handleDelete$$ || null == $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.scroll.whitelist || $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.scroll.whitelist.list) && $makeCodeBlockHandler$$.options.bindings[$handleDelete$$] && $makeCodeBlockHandler$$.addBinding($makeCodeBlockHandler$$.options.bindings[$handleDelete$$]); | |
}); | |
$makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.ENTER, shiftKey:null}, $handleEnter$$); | |
$makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.ENTER, metaKey:null, ctrlKey:null, altKey:null}, function() { | |
}); | |
/Firefox/i.test(navigator.userAgent) ? ($makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.BACKSPACE}, {collapsed:!0}, $handleBackspace$$), $makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.DELETE}, {collapsed:!0}, $handleDelete$$)) : ($makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.BACKSPACE}, {collapsed:!0, prefix:/^.?$/}, $handleBackspace$$), $makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.DELETE}, {collapsed:!0, | |
suffix:/^.?$/}, $handleDelete$$)); | |
$makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.BACKSPACE}, {collapsed:!1}, $handleDeleteRange$$); | |
$makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.DELETE}, {collapsed:!1}, $handleDeleteRange$$); | |
$makeCodeBlockHandler$$.addBinding({key:$makeEmbedArrowHandler$$.keys.BACKSPACE, altKey:null, ctrlKey:null, metaKey:null, shiftKey:null}, {collapsed:!0, offset:0}, $handleBackspace$$); | |
$makeCodeBlockHandler$$.listen(); | |
return $makeCodeBlockHandler$$; | |
} | |
$_inherits$$($makeEmbedArrowHandler$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$); | |
$_createClass$$($makeEmbedArrowHandler$$, null, [{key:"match", value:function($handleDelete$$, $handleBackspace$$) { | |
$handleBackspace$$ = $normalize$$($handleBackspace$$); | |
return ["altKey", "ctrlKey", "metaKey", "shiftKey"].some(function($__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
return !!$handleBackspace$$[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$] !== $handleDelete$$[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$] && null !== $handleBackspace$$[$__webpack_require__$jscomp$33__module$jscomp$1__module2$$]; | |
}) ? !1 : $handleBackspace$$.key === ($handleDelete$$.which || $handleDelete$$.keyCode); | |
}}]); | |
$_createClass$$($makeEmbedArrowHandler$$, [{key:"addBinding", value:function($handleDelete$$) { | |
var $handleBackspace$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}, $makeEmbedArrowHandler$$ = $normalize$$($handleDelete$$); | |
if (null == $makeEmbedArrowHandler$$ || null == $makeEmbedArrowHandler$$.key) { | |
return $debug$$.warn("Attempted to add invalid keyboard binding", $makeEmbedArrowHandler$$); | |
} | |
"function" === typeof $handleBackspace$$ && ($handleBackspace$$ = {handler:$handleBackspace$$}); | |
"function" === typeof $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ && ($__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = {handler:$__webpack_require__$jscomp$33__module$jscomp$1__module2$$}); | |
$makeEmbedArrowHandler$$ = (0, $_extend2$$.default)($makeEmbedArrowHandler$$, $handleBackspace$$, $__webpack_require__$jscomp$33__module$jscomp$1__module2$$); | |
this.bindings[$makeEmbedArrowHandler$$.key] = this.bindings[$makeEmbedArrowHandler$$.key] || []; | |
this.bindings[$makeEmbedArrowHandler$$.key].push($makeEmbedArrowHandler$$); | |
}}, {key:"listen", value:function() { | |
var $handleDelete$$ = this; | |
this.quill.root.addEventListener("keydown", function($handleBackspace$$) { | |
if (!$handleBackspace$$.defaultPrevented) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = ($handleDelete$$.bindings[$handleBackspace$$.which || $handleBackspace$$.keyCode] || []).filter(function($handleDelete$$) { | |
return $makeEmbedArrowHandler$$.match($handleBackspace$$, $handleDelete$$); | |
}); | |
if (0 !== $__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length) { | |
var $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $handleDelete$$.quill.getSelection(); | |
if (null != $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ && $handleDelete$$.quill.hasFocus()) { | |
var $handleDeleteRange$$ = $handleDelete$$.quill.getLine($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.index), $makeCodeBlockHandler$$ = $_slicedToArray$$($handleDeleteRange$$, 2); | |
$handleDeleteRange$$ = $makeCodeBlockHandler$$[0]; | |
$makeCodeBlockHandler$$ = $makeCodeBlockHandler$$[1]; | |
var $makeFormatHandler$$ = $handleDelete$$.quill.getLeaf($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.index), $_inherits$$ = $_slicedToArray$$($makeFormatHandler$$, 2); | |
$makeFormatHandler$$ = $_inherits$$[0]; | |
$_inherits$$ = $_inherits$$[1]; | |
var $normalize$$ = 0 === $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.length ? [$makeFormatHandler$$, $_inherits$$] : $handleDelete$$.quill.getLeaf($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.index + $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.length), | |
$exports$$ = $_slicedToArray$$($normalize$$, 2); | |
$normalize$$ = $exports$$[0]; | |
$exports$$ = $exports$$[1]; | |
$makeFormatHandler$$ = $makeFormatHandler$$ instanceof $_parchment2$$.default.Text ? $makeFormatHandler$$.value().slice(0, $_inherits$$) : ""; | |
$_inherits$$ = $normalize$$ instanceof $_parchment2$$.default.Text ? $normalize$$.value().slice($exports$$) : ""; | |
var $_possibleConstructorReturn$$ = {collapsed:0 === $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.length, empty:0 === $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$.length && 1 >= $handleDeleteRange$$.length(), format:$handleDelete$$.quill.getFormat($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$), | |
offset:$makeCodeBlockHandler$$, prefix:$makeFormatHandler$$, suffix:$_inherits$$}; | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$.some(function($handleBackspace$$) { | |
if (null != $handleBackspace$$.collapsed && $handleBackspace$$.collapsed !== $_possibleConstructorReturn$$.collapsed || null != $handleBackspace$$.empty && $handleBackspace$$.empty !== $_possibleConstructorReturn$$.empty || null != $handleBackspace$$.offset && $handleBackspace$$.offset !== $_possibleConstructorReturn$$.offset) { | |
return !1; | |
} | |
if (Array.isArray($handleBackspace$$.format)) { | |
if ($handleBackspace$$.format.every(function($handleDelete$$) { | |
return null == $_possibleConstructorReturn$$.format[$handleDelete$$]; | |
})) { | |
return !1; | |
} | |
} else { | |
if ("object" === $_typeof$$($handleBackspace$$.format) && !Object.keys($handleBackspace$$.format).every(function($handleDelete$$) { | |
return !0 === $handleBackspace$$.format[$handleDelete$$] ? null != $_possibleConstructorReturn$$.format[$handleDelete$$] : !1 === $handleBackspace$$.format[$handleDelete$$] ? null == $_possibleConstructorReturn$$.format[$handleDelete$$] : (0, $_deepEqual2$$.default)($handleBackspace$$.format[$handleDelete$$], $_possibleConstructorReturn$$.format[$handleDelete$$]); | |
})) { | |
return !1; | |
} | |
} | |
return null != $handleBackspace$$.prefix && !$handleBackspace$$.prefix.test($_possibleConstructorReturn$$.prefix) || null != $handleBackspace$$.suffix && !$handleBackspace$$.suffix.test($_possibleConstructorReturn$$.suffix) ? !1 : !0 !== $handleBackspace$$.handler.call($handleDelete$$, $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$, $_possibleConstructorReturn$$); | |
}) && $handleBackspace$$.preventDefault(); | |
} | |
} | |
} | |
}); | |
}}]); | |
return $makeEmbedArrowHandler$$; | |
}($__webpack_require__$jscomp$33__module$jscomp$1__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:{key:$Keyboard$$.keys.TAB, format:["blockquote", "indent", "list"], handler:function($handleDelete$$, $handleBackspace$$) { | |
if ($handleBackspace$$.collapsed && 0 !== $handleBackspace$$.offset) { | |
return !0; | |
} | |
this.quill.format("indent", "+1", $_quill2$$.default.sources.USER); | |
}}, outdent:{key:$Keyboard$$.keys.TAB, shiftKey:!0, format:["blockquote", "indent", "list"], handler:function($handleDelete$$, $handleBackspace$$) { | |
if ($handleBackspace$$.collapsed && 0 !== $handleBackspace$$.offset) { | |
return !0; | |
} | |
this.quill.format("indent", "-1", $_quill2$$.default.sources.USER); | |
}}, "outdent backspace":{key:$Keyboard$$.keys.BACKSPACE, collapsed:!0, shiftKey:null, metaKey:null, ctrlKey:null, altKey:null, format:["indent", "list"], offset:0, handler:function($handleDelete$$, $handleBackspace$$) { | |
null != $handleBackspace$$.format.indent ? this.quill.format("indent", "-1", $_quill2$$.default.sources.USER) : null != $handleBackspace$$.format.list && this.quill.format("list", !1, $_quill2$$.default.sources.USER); | |
}}, "indent code-block":$makeCodeBlockHandler$$(!0), "outdent code-block":$makeCodeBlockHandler$$(!1), "remove tab":{key:$Keyboard$$.keys.TAB, shiftKey:!0, collapsed:!0, prefix:/\t$/, handler:function($handleDelete$$) { | |
this.quill.deleteText($handleDelete$$.index - 1, 1, $_quill2$$.default.sources.USER); | |
}}, tab:{key:$Keyboard$$.keys.TAB, handler:function($handleDelete$$) { | |
this.quill.history.cutoff(); | |
var $handleBackspace$$ = (new $_quillDelta2$$.default).retain($handleDelete$$.index).delete($handleDelete$$.length).insert("\t"); | |
this.quill.updateContents($handleBackspace$$, $_quill2$$.default.sources.USER); | |
this.quill.history.cutoff(); | |
this.quill.setSelection($handleDelete$$.index + 1, $_quill2$$.default.sources.SILENT); | |
}}, "list empty enter":{key:$Keyboard$$.keys.ENTER, collapsed:!0, format:["list"], empty:!0, handler:function($handleDelete$$, $handleBackspace$$) { | |
this.quill.format("list", !1, $_quill2$$.default.sources.USER); | |
$handleBackspace$$.format.indent && this.quill.format("indent", !1, $_quill2$$.default.sources.USER); | |
}}, "checklist enter":{key:$Keyboard$$.keys.ENTER, collapsed:!0, format:{list:"checked"}, handler:function($handleDelete$$) { | |
var $handleBackspace$$ = this.quill.getLine($handleDelete$$.index), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_slicedToArray$$($handleBackspace$$, 2); | |
$handleBackspace$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$[0]; | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$[1]; | |
var $makeEmbedArrowHandler$$ = (0, $_extend2$$.default)({}, $handleBackspace$$.formats(), {list:"checked"}); | |
$handleBackspace$$ = (new $_quillDelta2$$.default).retain($handleDelete$$.index).insert("\n", $makeEmbedArrowHandler$$).retain($handleBackspace$$.length() - $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ - 1).retain(1, {list:"unchecked"}); | |
this.quill.updateContents($handleBackspace$$, $_quill2$$.default.sources.USER); | |
this.quill.setSelection($handleDelete$$.index + 1, $_quill2$$.default.sources.SILENT); | |
this.quill.scrollIntoView(); | |
}}, "header enter":{key:$Keyboard$$.keys.ENTER, collapsed:!0, format:["header"], suffix:/^$/, handler:function($handleDelete$$, $handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = this.quill.getLine($handleDelete$$.index), $makeEmbedArrowHandler$$ = $_slicedToArray$$($__webpack_require__$jscomp$33__module$jscomp$1__module2$$, 2); | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $makeEmbedArrowHandler$$[0]; | |
$makeEmbedArrowHandler$$ = $makeEmbedArrowHandler$$[1]; | |
$handleBackspace$$ = (new $_quillDelta2$$.default).retain($handleDelete$$.index).insert("\n", $handleBackspace$$.format).retain($__webpack_require__$jscomp$33__module$jscomp$1__module2$$.length() - $makeEmbedArrowHandler$$ - 1).retain(1, {header:null}); | |
this.quill.updateContents($handleBackspace$$, $_quill2$$.default.sources.USER); | |
this.quill.setSelection($handleDelete$$.index + 1, $_quill2$$.default.sources.SILENT); | |
this.quill.scrollIntoView(); | |
}}, "list autofill":{key:" ", collapsed:!0, format:{list:!1}, prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/, handler:function($handleDelete$$, $handleBackspace$$) { | |
var $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $handleBackspace$$.prefix.length, $makeEmbedArrowHandler$$ = this.quill.getLine($handleDelete$$.index), $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $_slicedToArray$$($makeEmbedArrowHandler$$, 2); | |
$makeEmbedArrowHandler$$ = $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$[0]; | |
$_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ = $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$[1]; | |
if ($_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$ > $__webpack_require__$jscomp$33__module$jscomp$1__module2$$) { | |
return !0; | |
} | |
switch($handleBackspace$$.prefix.trim()) { | |
case "[]": | |
case "[ ]": | |
$handleBackspace$$ = "unchecked"; | |
break; | |
case "[x]": | |
$handleBackspace$$ = "checked"; | |
break; | |
case "-": | |
case "*": | |
$handleBackspace$$ = "bullet"; | |
break; | |
default: | |
$handleBackspace$$ = "ordered"; | |
} | |
this.quill.insertText($handleDelete$$.index, " ", $_quill2$$.default.sources.USER); | |
this.quill.history.cutoff(); | |
$handleBackspace$$ = (new $_quillDelta2$$.default).retain($handleDelete$$.index - $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$).delete($__webpack_require__$jscomp$33__module$jscomp$1__module2$$ + 1).retain($makeEmbedArrowHandler$$.length() - 2 - $_clone$jscomp$3__deepEqual$jscomp$2__extend$jscomp$3__logger$jscomp$3__logger2$jscomp$3__op$jscomp$1__parchment$jscomp$13__quill$jscomp$1__quillDelta$jscomp$4_module$$).retain(1, | |
{list:$handleBackspace$$}); | |
this.quill.updateContents($handleBackspace$$, $_quill2$$.default.sources.USER); | |
this.quill.history.cutoff(); | |
this.quill.setSelection($handleDelete$$.index - $__webpack_require__$jscomp$33__module$jscomp$1__module2$$, $_quill2$$.default.sources.SILENT); | |
}}, "code exit":{key:$Keyboard$$.keys.ENTER, collapsed:!0, format:["code-block"], prefix:/\n\n$/, suffix:/^\s+$/, handler:function($handleDelete$$) { | |
var $handleBackspace$$ = this.quill.getLine($handleDelete$$.index), $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $_slicedToArray$$($handleBackspace$$, 2); | |
$handleBackspace$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$[0]; | |
$__webpack_require__$jscomp$33__module$jscomp$1__module2$$ = $__webpack_require__$jscomp$33__module$jscomp$1__module2$$[1]; | |
$handleDelete$$ = (new $_quillDelta2$$.default).retain($handleDelete$$.index + $handleBackspace$$.length() - $__webpack_require__$jscomp$33__module$jscomp$1__module2$$ - 2).retain(1, {"code-block":null}).delete(1); | |
this.quill.updateContents($handleDelete$$, $_quill2$$.default.sources.USER); | |
}}, "embed left":$makeEmbedArrowHandler$$($Keyboard$$.keys.LEFT, !1), "embed left shift":$makeEmbedArrowHandler$$($Keyboard$$.keys.LEFT, !0), "embed right":$makeEmbedArrowHandler$$($Keyboard$$.keys.RIGHT, !1), "embed right shift":$makeEmbedArrowHandler$$($Keyboard$$.keys.RIGHT, !0)}}; | |
$exports$$.default = $Keyboard$$; | |
$exports$$.SHORTKEY = $SHORTKEY$$; | |
}, function($_parchment$jscomp$14_module$$, $exports$$, $Embed___webpack_require__$jscomp$34__text$$) { | |
function $_possibleConstructorReturn$$($self$$, $_text2$$) { | |
if (!$self$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_text2$$ || "object" !== typeof $_text2$$ && "function" !== typeof $_text2$$ ? $self$$ : $_text2$$; | |
} | |
function $_inherits$$($subClass$$, $_text2$$) { | |
if ("function" !== typeof $_text2$$ && null !== $_text2$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_text2$$); | |
} | |
$subClass$$.prototype = Object.create($_text2$$ && $_text2$$.prototype, {constructor:{value:$subClass$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_text2$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $_text2$$) : $subClass$$.__proto__ = $_text2$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $defineProperties$$($defineProperties$$, $_text2$$) { | |
for (var $Embed___webpack_require__$jscomp$34__text$$ = 0; $Embed___webpack_require__$jscomp$34__text$$ < $_text2$$.length; $Embed___webpack_require__$jscomp$34__text$$++) { | |
var $_parchment2$$ = $_text2$$[$Embed___webpack_require__$jscomp$34__text$$]; | |
$_parchment2$$.enumerable = $_parchment2$$.enumerable || !1; | |
$_parchment2$$.configurable = !0; | |
"value" in $_parchment2$$ && ($_parchment2$$.writable = !0); | |
Object.defineProperty($defineProperties$$, $_parchment2$$.key, $_parchment2$$); | |
} | |
} | |
return function($_text2$$, $Embed___webpack_require__$jscomp$34__text$$, $_parchment2$$) { | |
$Embed___webpack_require__$jscomp$34__text$$ && $defineProperties$$($_text2$$.prototype, $Embed___webpack_require__$jscomp$34__text$$); | |
$_parchment2$$ && $defineProperties$$($_text2$$, $_parchment2$$); | |
return $_text2$$; | |
}; | |
}(), $_get$$ = function $get$$($_text2$$, $Embed___webpack_require__$jscomp$34__text$$, $_parchment2$$) { | |
null === $_text2$$ && ($_text2$$ = Function.prototype); | |
var $_parchment$jscomp$14_module$$ = Object.getOwnPropertyDescriptor($_text2$$, $Embed___webpack_require__$jscomp$34__text$$); | |
if (void 0 === $_parchment$jscomp$14_module$$) { | |
if ($_text2$$ = Object.getPrototypeOf($_text2$$), null !== $_text2$$) { | |
return $get$$($_text2$$, $Embed___webpack_require__$jscomp$34__text$$, $_parchment2$$); | |
} | |
} else { | |
if ("value" in $_parchment$jscomp$14_module$$) { | |
return $_parchment$jscomp$14_module$$.value; | |
} | |
$Embed___webpack_require__$jscomp$34__text$$ = $_parchment$jscomp$14_module$$.get; | |
return void 0 === $Embed___webpack_require__$jscomp$34__text$$ ? void 0 : $Embed___webpack_require__$jscomp$34__text$$.call($_parchment2$$); | |
} | |
}, $_parchment2$$ = ($_parchment$jscomp$14_module$$ = $Embed___webpack_require__$jscomp$34__text$$(0)) && $_parchment$jscomp$14_module$$.__esModule ? $_parchment$jscomp$14_module$$ : {default:$_parchment$jscomp$14_module$$}, $_text2$$ = ($Embed___webpack_require__$jscomp$34__text$$ = $Embed___webpack_require__$jscomp$34__text$$(7)) && $Embed___webpack_require__$jscomp$34__text$$.__esModule ? $Embed___webpack_require__$jscomp$34__text$$ : {default:$Embed___webpack_require__$jscomp$34__text$$}; | |
$Embed___webpack_require__$jscomp$34__text$$ = function($Embed___webpack_require__$jscomp$34__text$$) { | |
function $_parchment$jscomp$14_module$$($_text2$$) { | |
if (!(this instanceof $_parchment$jscomp$14_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $Embed___webpack_require__$jscomp$34__text$$ = $_possibleConstructorReturn$$(this, ($_parchment$jscomp$14_module$$.__proto__ || Object.getPrototypeOf($_parchment$jscomp$14_module$$)).call(this, $_text2$$)); | |
$Embed___webpack_require__$jscomp$34__text$$.contentNode = document.createElement("span"); | |
$Embed___webpack_require__$jscomp$34__text$$.contentNode.setAttribute("contenteditable", !1); | |
[].slice.call($Embed___webpack_require__$jscomp$34__text$$.domNode.childNodes).forEach(function($_text2$$) { | |
$Embed___webpack_require__$jscomp$34__text$$.contentNode.appendChild($_text2$$); | |
}); | |
$Embed___webpack_require__$jscomp$34__text$$.leftGuard = document.createTextNode(""); | |
$Embed___webpack_require__$jscomp$34__text$$.rightGuard = document.createTextNode(""); | |
$Embed___webpack_require__$jscomp$34__text$$.domNode.appendChild($Embed___webpack_require__$jscomp$34__text$$.leftGuard); | |
$Embed___webpack_require__$jscomp$34__text$$.domNode.appendChild($Embed___webpack_require__$jscomp$34__text$$.contentNode); | |
$Embed___webpack_require__$jscomp$34__text$$.domNode.appendChild($Embed___webpack_require__$jscomp$34__text$$.rightGuard); | |
return $Embed___webpack_require__$jscomp$34__text$$; | |
} | |
$_inherits$$($_parchment$jscomp$14_module$$, $Embed___webpack_require__$jscomp$34__text$$); | |
$_createClass$$($_parchment$jscomp$14_module$$, [{key:"index", value:function($_text2$$, $Embed___webpack_require__$jscomp$34__text$$) { | |
return $_text2$$ === this.leftGuard ? 0 : $_text2$$ === this.rightGuard ? 1 : $_get$$($_parchment$jscomp$14_module$$.prototype.__proto__ || Object.getPrototypeOf($_parchment$jscomp$14_module$$.prototype), "index", this).call(this, $_text2$$, $Embed___webpack_require__$jscomp$34__text$$); | |
}}, {key:"restore", value:function($Embed___webpack_require__$jscomp$34__text$$) { | |
var $_parchment$jscomp$14_module$$ = void 0, $_Parchment$Embed$$ = $Embed___webpack_require__$jscomp$34__text$$.data.split("").join(""); | |
$Embed___webpack_require__$jscomp$34__text$$ === this.leftGuard ? this.prev instanceof $_text2$$.default ? ($_parchment$jscomp$14_module$$ = this.prev.length(), this.prev.insertAt($_parchment$jscomp$14_module$$, $_Parchment$Embed$$), $_parchment$jscomp$14_module$$ = {startNode:this.prev.domNode, startOffset:$_parchment$jscomp$14_module$$ + $_Parchment$Embed$$.length}) : ($_parchment$jscomp$14_module$$ = document.createTextNode($_Parchment$Embed$$), this.parent.insertBefore($_parchment2$$.default.create($_parchment$jscomp$14_module$$), | |
this), $_parchment$jscomp$14_module$$ = {startNode:$_parchment$jscomp$14_module$$, startOffset:$_Parchment$Embed$$.length}) : $Embed___webpack_require__$jscomp$34__text$$ === this.rightGuard && (this.next instanceof $_text2$$.default ? (this.next.insertAt(0, $_Parchment$Embed$$), $_parchment$jscomp$14_module$$ = {startNode:this.next.domNode, startOffset:$_Parchment$Embed$$.length}) : ($_parchment$jscomp$14_module$$ = document.createTextNode($_Parchment$Embed$$), this.parent.insertBefore($_parchment2$$.default.create($_parchment$jscomp$14_module$$), | |
this.next), $_parchment$jscomp$14_module$$ = {startNode:$_parchment$jscomp$14_module$$, startOffset:$_Parchment$Embed$$.length})); | |
$Embed___webpack_require__$jscomp$34__text$$.data = ""; | |
return $_parchment$jscomp$14_module$$; | |
}}, {key:"update", value:function($_text2$$, $Embed___webpack_require__$jscomp$34__text$$) { | |
var $_parchment2$$ = this; | |
$_text2$$.forEach(function($_text2$$) { | |
"characterData" !== $_text2$$.type || $_text2$$.target !== $_parchment2$$.leftGuard && $_text2$$.target !== $_parchment2$$.rightGuard || !($_text2$$ = $_parchment2$$.restore($_text2$$.target)) || ($Embed___webpack_require__$jscomp$34__text$$.range = $_text2$$); | |
}); | |
}}]); | |
return $_parchment$jscomp$14_module$$; | |
}($_parchment2$$.default.Embed); | |
$exports$$.default = $Embed___webpack_require__$jscomp$34__text$$; | |
}, function($AlignAttribute__parchment$jscomp$15_module$$, $exports$$, $AlignClass___webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.AlignStyle = $exports$$.AlignClass = $exports$$.AlignAttribute = void 0; | |
var $AlignStyle__parchment2$$ = ($AlignAttribute__parchment$jscomp$15_module$$ = $AlignClass___webpack_require__$$(0)) && $AlignAttribute__parchment$jscomp$15_module$$.__esModule ? $AlignAttribute__parchment$jscomp$15_module$$ : {default:$AlignAttribute__parchment$jscomp$15_module$$}, $config$$ = {scope:$AlignStyle__parchment2$$.default.Scope.BLOCK, whitelist:["right", "center", "justify"]}; | |
$AlignAttribute__parchment$jscomp$15_module$$ = new $AlignStyle__parchment2$$.default.Attributor.Attribute("align", "align", $config$$); | |
$AlignClass___webpack_require__$$ = new $AlignStyle__parchment2$$.default.Attributor.Class("align", "ql-align", $config$$); | |
$AlignStyle__parchment2$$ = new $AlignStyle__parchment2$$.default.Attributor.Style("align", "text-align", $config$$); | |
$exports$$.AlignAttribute = $AlignAttribute__parchment$jscomp$15_module$$; | |
$exports$$.AlignClass = $AlignClass___webpack_require__$$; | |
$exports$$.AlignStyle = $AlignStyle__parchment2$$; | |
}, function($BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$, $exports$$, $BackgroundClass___webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.BackgroundStyle = $exports$$.BackgroundClass = void 0; | |
$BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$ = ($BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$ = $BackgroundClass___webpack_require__$$(0)) && $BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$.__esModule ? $BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$ : {default:$BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$}; | |
var $_color$$ = $BackgroundClass___webpack_require__$$(25); | |
$BackgroundClass___webpack_require__$$ = new $BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$.default.Attributor.Class("background", "ql-bg", {scope:$BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$.default.Scope.INLINE}); | |
$BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$ = new $_color$$.ColorAttributor("background", "background-color", {scope:$BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$.default.Scope.INLINE}); | |
$exports$$.BackgroundClass = $BackgroundClass___webpack_require__$$; | |
$exports$$.BackgroundStyle = $BackgroundStyle__parchment$jscomp$16__parchment2$jscomp$16_module$$; | |
}, function($DirectionAttribute__parchment$jscomp$17_module$$, $exports$$, $DirectionClass___webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.DirectionStyle = $exports$$.DirectionClass = $exports$$.DirectionAttribute = void 0; | |
var $DirectionStyle__parchment2$$ = ($DirectionAttribute__parchment$jscomp$17_module$$ = $DirectionClass___webpack_require__$$(0)) && $DirectionAttribute__parchment$jscomp$17_module$$.__esModule ? $DirectionAttribute__parchment$jscomp$17_module$$ : {default:$DirectionAttribute__parchment$jscomp$17_module$$}, $config$$ = {scope:$DirectionStyle__parchment2$$.default.Scope.BLOCK, whitelist:["rtl"]}; | |
$DirectionAttribute__parchment$jscomp$17_module$$ = new $DirectionStyle__parchment2$$.default.Attributor.Attribute("direction", "dir", $config$$); | |
$DirectionClass___webpack_require__$$ = new $DirectionStyle__parchment2$$.default.Attributor.Class("direction", "ql-direction", $config$$); | |
$DirectionStyle__parchment2$$ = new $DirectionStyle__parchment2$$.default.Attributor.Style("direction", "direction", $config$$); | |
$exports$$.DirectionAttribute = $DirectionAttribute__parchment$jscomp$17_module$$; | |
$exports$$.DirectionClass = $DirectionClass___webpack_require__$$; | |
$exports$$.DirectionStyle = $DirectionStyle__parchment2$$; | |
}, function($FontClass__parchment$jscomp$18_module$$, $exports$$, $FontStyle___webpack_require__$jscomp$38__parchment2$$) { | |
function $_inherits$$($FontStyle___webpack_require__$jscomp$38__parchment2$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$FontStyle___webpack_require__$jscomp$38__parchment2$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$FontStyle___webpack_require__$jscomp$38__parchment2$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($FontStyle___webpack_require__$jscomp$38__parchment2$$, $superClass$$) : $FontStyle___webpack_require__$jscomp$38__parchment2$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.FontClass = $exports$$.FontStyle = void 0; | |
var $_createClass$$ = function() { | |
function $FontStyle___webpack_require__$jscomp$38__parchment2$$($target$$, $props$$) { | |
for (var $FontStyle___webpack_require__$jscomp$38__parchment2$$ = 0; $FontStyle___webpack_require__$jscomp$38__parchment2$$ < $props$$.length; $FontStyle___webpack_require__$jscomp$38__parchment2$$++) { | |
var $defineProperties$$ = $props$$[$FontStyle___webpack_require__$jscomp$38__parchment2$$]; | |
$defineProperties$$.enumerable = $defineProperties$$.enumerable || !1; | |
$defineProperties$$.configurable = !0; | |
"value" in $defineProperties$$ && ($defineProperties$$.writable = !0); | |
Object.defineProperty($target$$, $defineProperties$$.key, $defineProperties$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $defineProperties$$) { | |
$protoProps$$ && $FontStyle___webpack_require__$jscomp$38__parchment2$$($Constructor$$.prototype, $protoProps$$); | |
$defineProperties$$ && $FontStyle___webpack_require__$jscomp$38__parchment2$$($Constructor$$, $defineProperties$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$11_parent$$, $getter$jscomp$12_property$$, $FontStyle___webpack_require__$jscomp$38__parchment2$$) { | |
null === $object$jscomp$11_parent$$ && ($object$jscomp$11_parent$$ = Function.prototype); | |
var $FontClass__parchment$jscomp$18_module$$ = Object.getOwnPropertyDescriptor($object$jscomp$11_parent$$, $getter$jscomp$12_property$$); | |
if (void 0 === $FontClass__parchment$jscomp$18_module$$) { | |
if ($object$jscomp$11_parent$$ = Object.getPrototypeOf($object$jscomp$11_parent$$), null !== $object$jscomp$11_parent$$) { | |
return $get$$($object$jscomp$11_parent$$, $getter$jscomp$12_property$$, $FontStyle___webpack_require__$jscomp$38__parchment2$$); | |
} | |
} else { | |
if ("value" in $FontClass__parchment$jscomp$18_module$$) { | |
return $FontClass__parchment$jscomp$18_module$$.value; | |
} | |
$getter$jscomp$12_property$$ = $FontClass__parchment$jscomp$18_module$$.get; | |
return void 0 === $getter$jscomp$12_property$$ ? void 0 : $getter$jscomp$12_property$$.call($FontStyle___webpack_require__$jscomp$38__parchment2$$); | |
} | |
}; | |
$FontStyle___webpack_require__$jscomp$38__parchment2$$ = ($FontClass__parchment$jscomp$18_module$$ = $FontStyle___webpack_require__$jscomp$38__parchment2$$(0)) && $FontClass__parchment$jscomp$18_module$$.__esModule ? $FontClass__parchment$jscomp$18_module$$ : {default:$FontClass__parchment$jscomp$18_module$$}; | |
var $config$$ = {scope:$FontStyle___webpack_require__$jscomp$38__parchment2$$.default.Scope.INLINE, whitelist:["serif", "monospace"]}; | |
$FontClass__parchment$jscomp$18_module$$ = new $FontStyle___webpack_require__$jscomp$38__parchment2$$.default.Attributor.Class("font", "ql-font", $config$$); | |
$FontStyle___webpack_require__$jscomp$38__parchment2$$ = new (function($_Parchment$Attributor$$) { | |
function $FontStyleAttributor$$() { | |
if (!(this instanceof $FontStyleAttributor$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_Parchment$Attributor$$ = ($FontStyleAttributor$$.__proto__ || Object.getPrototypeOf($FontStyleAttributor$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_Parchment$Attributor$$ || "object" !== typeof $_Parchment$Attributor$$ && "function" !== typeof $_Parchment$Attributor$$ ? this : $_Parchment$Attributor$$; | |
} | |
$_inherits$$($FontStyleAttributor$$, $_Parchment$Attributor$$); | |
$_createClass$$($FontStyleAttributor$$, [{key:"value", value:function($_Parchment$Attributor$$) { | |
return $_get$$($FontStyleAttributor$$.prototype.__proto__ || Object.getPrototypeOf($FontStyleAttributor$$.prototype), "value", this).call(this, $_Parchment$Attributor$$).replace(/["']/g, ""); | |
}}]); | |
return $FontStyleAttributor$$; | |
}($FontStyle___webpack_require__$jscomp$38__parchment2$$.default.Attributor.Style))("font", "font-family", $config$$); | |
$exports$$.FontStyle = $FontStyle___webpack_require__$jscomp$38__parchment2$$; | |
$exports$$.FontClass = $FontClass__parchment$jscomp$18_module$$; | |
}, function($SizeClass__parchment$jscomp$19_module$$, $exports$$, $SizeStyle___webpack_require__$jscomp$39__parchment2$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.SizeStyle = $exports$$.SizeClass = void 0; | |
$SizeStyle___webpack_require__$jscomp$39__parchment2$$ = ($SizeClass__parchment$jscomp$19_module$$ = $SizeStyle___webpack_require__$jscomp$39__parchment2$$(0)) && $SizeClass__parchment$jscomp$19_module$$.__esModule ? $SizeClass__parchment$jscomp$19_module$$ : {default:$SizeClass__parchment$jscomp$19_module$$}; | |
$SizeClass__parchment$jscomp$19_module$$ = new $SizeStyle___webpack_require__$jscomp$39__parchment2$$.default.Attributor.Class("size", "ql-size", {scope:$SizeStyle___webpack_require__$jscomp$39__parchment2$$.default.Scope.INLINE, whitelist:["small", "large", "huge"]}); | |
$SizeStyle___webpack_require__$jscomp$39__parchment2$$ = new $SizeStyle___webpack_require__$jscomp$39__parchment2$$.default.Attributor.Style("size", "font-size", {scope:$SizeStyle___webpack_require__$jscomp$39__parchment2$$.default.Scope.INLINE, whitelist:["10px", "18px", "32px"]}); | |
$exports$$.SizeClass = $SizeClass__parchment$jscomp$19_module$$; | |
$exports$$.SizeStyle = $SizeStyle___webpack_require__$jscomp$39__parchment2$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
$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)}; | |
}, function($_parchment$jscomp$20__quill$jscomp$2_module$$, $exports$$, $History$jscomp$1___webpack_require__$jscomp$41__module$$) { | |
function $_interopRequireDefault$$($_createClass$$) { | |
return $_createClass$$ && $_createClass$$.__esModule ? $_createClass$$ : {default:$_createClass$$}; | |
} | |
function $_possibleConstructorReturn$$($_createClass$$, $_parchment2$$) { | |
if (!$_createClass$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_parchment2$$ || "object" !== typeof $_parchment2$$ && "function" !== typeof $_parchment2$$ ? $_createClass$$ : $_parchment2$$; | |
} | |
function $_inherits$$($_createClass$$, $_parchment2$$) { | |
if ("function" !== typeof $_parchment2$$ && null !== $_parchment2$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_parchment2$$); | |
} | |
$_createClass$$.prototype = Object.create($_parchment2$$ && $_parchment2$$.prototype, {constructor:{value:$_createClass$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_parchment2$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_createClass$$, $_parchment2$$) : $_createClass$$.__proto__ = $_parchment2$$); | |
} | |
function $endsWithNewlineChange$$($_createClass$$) { | |
$_createClass$$ = $_createClass$$.ops[$_createClass$$.ops.length - 1]; | |
return null == $_createClass$$ ? !1 : null != $_createClass$$.insert ? "string" === typeof $_createClass$$.insert && $_createClass$$.insert.endsWith("\n") : null != $_createClass$$.attributes ? Object.keys($_createClass$$.attributes).some(function($_createClass$$) { | |
return null != $_parchment2$$.default.query($_createClass$$, $_parchment2$$.default.Scope.BLOCK); | |
}) : !1; | |
} | |
function $getLastChangeIndex$$($_createClass$$) { | |
var $_parchment2$$ = $_createClass$$.reduce(function($_createClass$$, $_parchment2$$) { | |
return $_createClass$$ += $_parchment2$$.delete || 0; | |
}, 0); | |
$_parchment2$$ = $_createClass$$.length() - $_parchment2$$; | |
$endsWithNewlineChange$$($_createClass$$) && --$_parchment2$$; | |
return $_parchment2$$; | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.getLastChangeIndex = $exports$$.default = void 0; | |
var $_createClass$$ = function() { | |
function $_createClass$$($_createClass$$, $_parchment2$$) { | |
for (var $History$jscomp$1___webpack_require__$jscomp$41__module$$ = 0; $History$jscomp$1___webpack_require__$jscomp$41__module$$ < $_parchment2$$.length; $History$jscomp$1___webpack_require__$jscomp$41__module$$++) { | |
var $getLastChangeIndex$$ = $_parchment2$$[$History$jscomp$1___webpack_require__$jscomp$41__module$$]; | |
$getLastChangeIndex$$.enumerable = $getLastChangeIndex$$.enumerable || !1; | |
$getLastChangeIndex$$.configurable = !0; | |
"value" in $getLastChangeIndex$$ && ($getLastChangeIndex$$.writable = !0); | |
Object.defineProperty($_createClass$$, $getLastChangeIndex$$.key, $getLastChangeIndex$$); | |
} | |
} | |
return function($_parchment2$$, $History$jscomp$1___webpack_require__$jscomp$41__module$$, $getLastChangeIndex$$) { | |
$History$jscomp$1___webpack_require__$jscomp$41__module$$ && $_createClass$$($_parchment2$$.prototype, $History$jscomp$1___webpack_require__$jscomp$41__module$$); | |
$getLastChangeIndex$$ && $_createClass$$($_parchment2$$, $getLastChangeIndex$$); | |
return $_parchment2$$; | |
}; | |
}(); | |
$_parchment$jscomp$20__quill$jscomp$2_module$$ = $History$jscomp$1___webpack_require__$jscomp$41__module$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_parchment$jscomp$20__quill$jscomp$2_module$$); | |
$_parchment$jscomp$20__quill$jscomp$2_module$$ = $History$jscomp$1___webpack_require__$jscomp$41__module$$(5); | |
var $_quill2$$ = $_interopRequireDefault$$($_parchment$jscomp$20__quill$jscomp$2_module$$); | |
$History$jscomp$1___webpack_require__$jscomp$41__module$$ = $History$jscomp$1___webpack_require__$jscomp$41__module$$(9); | |
$History$jscomp$1___webpack_require__$jscomp$41__module$$ = function($_parchment2$$) { | |
function $History$jscomp$1___webpack_require__$jscomp$41__module$$($_createClass$$, $_parchment2$$) { | |
if (!(this instanceof $History$jscomp$1___webpack_require__$jscomp$41__module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $getLastChangeIndex$$ = $_possibleConstructorReturn$$(this, ($History$jscomp$1___webpack_require__$jscomp$41__module$$.__proto__ || Object.getPrototypeOf($History$jscomp$1___webpack_require__$jscomp$41__module$$)).call(this, $_createClass$$, $_parchment2$$)); | |
$getLastChangeIndex$$.lastRecorded = 0; | |
$getLastChangeIndex$$.ignoreChange = !1; | |
$getLastChangeIndex$$.clear(); | |
$getLastChangeIndex$$.quill.on($_quill2$$.default.events.EDITOR_CHANGE, function($_createClass$$, $_parchment2$$, $History$jscomp$1___webpack_require__$jscomp$41__module$$, $_parchment$jscomp$20__quill$jscomp$2_module$$) { | |
$_createClass$$ !== $_quill2$$.default.events.TEXT_CHANGE || $getLastChangeIndex$$.ignoreChange || ($getLastChangeIndex$$.options.userOnly && $_parchment$jscomp$20__quill$jscomp$2_module$$ !== $_quill2$$.default.sources.USER ? $getLastChangeIndex$$.transform($_parchment2$$) : $getLastChangeIndex$$.record($_parchment2$$, $History$jscomp$1___webpack_require__$jscomp$41__module$$)); | |
}); | |
$getLastChangeIndex$$.quill.keyboard.addBinding({key:"Z", shortKey:!0}, $getLastChangeIndex$$.undo.bind($getLastChangeIndex$$)); | |
$getLastChangeIndex$$.quill.keyboard.addBinding({key:"Z", shortKey:!0, shiftKey:!0}, $getLastChangeIndex$$.redo.bind($getLastChangeIndex$$)); | |
/Win/i.test(navigator.platform) && $getLastChangeIndex$$.quill.keyboard.addBinding({key:"Y", shortKey:!0}, $getLastChangeIndex$$.redo.bind($getLastChangeIndex$$)); | |
return $getLastChangeIndex$$; | |
} | |
$_inherits$$($History$jscomp$1___webpack_require__$jscomp$41__module$$, $_parchment2$$); | |
$_createClass$$($History$jscomp$1___webpack_require__$jscomp$41__module$$, [{key:"change", value:function($_createClass$$, $_parchment2$$) { | |
if (0 !== this.stack[$_createClass$$].length) { | |
var $History$jscomp$1___webpack_require__$jscomp$41__module$$ = this.stack[$_createClass$$].pop(); | |
this.stack[$_parchment2$$].push($History$jscomp$1___webpack_require__$jscomp$41__module$$); | |
this.lastRecorded = 0; | |
this.ignoreChange = !0; | |
this.quill.updateContents($History$jscomp$1___webpack_require__$jscomp$41__module$$[$_createClass$$], $_quill2$$.default.sources.USER); | |
this.ignoreChange = !1; | |
$_createClass$$ = $getLastChangeIndex$$($History$jscomp$1___webpack_require__$jscomp$41__module$$[$_createClass$$]); | |
this.quill.setSelection($_createClass$$); | |
} | |
}}, {key:"clear", value:function() { | |
this.stack = {undo:[], redo:[]}; | |
}}, {key:"cutoff", value:function() { | |
this.lastRecorded = 0; | |
}}, {key:"record", value:function($_createClass$$, $_parchment2$$) { | |
if (0 !== $_createClass$$.ops.length) { | |
this.stack.redo = []; | |
$_parchment2$$ = this.quill.getContents().diff($_parchment2$$); | |
var $History$jscomp$1___webpack_require__$jscomp$41__module$$ = Date.now(); | |
this.lastRecorded + this.options.delay > $History$jscomp$1___webpack_require__$jscomp$41__module$$ && 0 < this.stack.undo.length ? ($History$jscomp$1___webpack_require__$jscomp$41__module$$ = this.stack.undo.pop(), $_parchment2$$ = $_parchment2$$.compose($History$jscomp$1___webpack_require__$jscomp$41__module$$.undo), $_createClass$$ = $History$jscomp$1___webpack_require__$jscomp$41__module$$.redo.compose($_createClass$$)) : this.lastRecorded = $History$jscomp$1___webpack_require__$jscomp$41__module$$; | |
this.stack.undo.push({redo:$_createClass$$, undo:$_parchment2$$}); | |
this.stack.undo.length > this.options.maxStack && this.stack.undo.shift(); | |
} | |
}}, {key:"redo", value:function() { | |
this.change("redo", "undo"); | |
}}, {key:"transform", value:function($_createClass$$) { | |
this.stack.undo.forEach(function($_parchment2$$) { | |
$_parchment2$$.undo = $_createClass$$.transform($_parchment2$$.undo, !0); | |
$_parchment2$$.redo = $_createClass$$.transform($_parchment2$$.redo, !0); | |
}); | |
this.stack.redo.forEach(function($_parchment2$$) { | |
$_parchment2$$.undo = $_createClass$$.transform($_parchment2$$.undo, !0); | |
$_parchment2$$.redo = $_createClass$$.transform($_parchment2$$.redo, !0); | |
}); | |
}}, {key:"undo", value:function() { | |
this.change("undo", "redo"); | |
}}]); | |
return $History$jscomp$1___webpack_require__$jscomp$41__module$$; | |
}($_interopRequireDefault$$($History$jscomp$1___webpack_require__$jscomp$41__module$$).default); | |
$History$jscomp$1___webpack_require__$jscomp$41__module$$.DEFAULTS = {delay:1000, maxStack:100, userOnly:!1}; | |
$exports$$.default = $History$jscomp$1___webpack_require__$jscomp$41__module$$; | |
$exports$$.getLastChangeIndex = $getLastChangeIndex$$; | |
}, function($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$, $exports$$, $BaseTheme___webpack_require__$$) { | |
function $_interopRequireDefault$$($_createClass$$) { | |
return $_createClass$$ && $_createClass$$.__esModule ? $_createClass$$ : {default:$_createClass$$}; | |
} | |
function $_classCallCheck$$($_createClass$$, $_get$$) { | |
if (!($_createClass$$ instanceof $_get$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_createClass$$, $_get$$) { | |
if (!$_createClass$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_get$$ || "object" !== typeof $_get$$ && "function" !== typeof $_get$$ ? $_createClass$$ : $_get$$; | |
} | |
function $_inherits$$($_createClass$$, $_get$$) { | |
if ("function" !== typeof $_get$$ && null !== $_get$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_get$$); | |
} | |
$_createClass$$.prototype = Object.create($_get$$ && $_get$$.prototype, {constructor:{value:$_createClass$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_get$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_createClass$$, $_get$$) : $_createClass$$.__proto__ = $_get$$); | |
} | |
function $fillSelect$$($_createClass$$, $_get$$) { | |
var $BaseTheme___webpack_require__$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1; | |
$_get$$.forEach(function($_get$$) { | |
var $fillSelect$$ = document.createElement("option"); | |
$_get$$ === $BaseTheme___webpack_require__$$ ? $fillSelect$$.setAttribute("selected", "selected") : $fillSelect$$.setAttribute("value", $_get$$); | |
$_createClass$$.appendChild($fillSelect$$); | |
}); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.BaseTooltip = void 0; | |
var $_createClass$$ = function() { | |
function $_createClass$$($_createClass$$, $_get$$) { | |
for (var $BaseTheme___webpack_require__$$ = 0; $BaseTheme___webpack_require__$$ < $_get$$.length; $BaseTheme___webpack_require__$$++) { | |
var $fillSelect$$ = $_get$$[$BaseTheme___webpack_require__$$]; | |
$fillSelect$$.enumerable = $fillSelect$$.enumerable || !1; | |
$fillSelect$$.configurable = !0; | |
"value" in $fillSelect$$ && ($fillSelect$$.writable = !0); | |
Object.defineProperty($_createClass$$, $fillSelect$$.key, $fillSelect$$); | |
} | |
} | |
return function($_get$$, $BaseTheme___webpack_require__$$, $fillSelect$$) { | |
$BaseTheme___webpack_require__$$ && $_createClass$$($_get$$.prototype, $BaseTheme___webpack_require__$$); | |
$fillSelect$$ && $_createClass$$($_get$$, $fillSelect$$); | |
return $_get$$; | |
}; | |
}(), $_get$$ = function $get$$($_createClass$$, $_get$$, $BaseTheme___webpack_require__$$) { | |
null === $_createClass$$ && ($_createClass$$ = Function.prototype); | |
var $fillSelect$$ = Object.getOwnPropertyDescriptor($_createClass$$, $_get$$); | |
if (void 0 === $fillSelect$$) { | |
if ($_createClass$$ = Object.getPrototypeOf($_createClass$$), null !== $_createClass$$) { | |
return $get$$($_createClass$$, $_get$$, $BaseTheme___webpack_require__$$); | |
} | |
} else { | |
if ("value" in $fillSelect$$) { | |
return $fillSelect$$.value; | |
} | |
$_get$$ = $fillSelect$$.get; | |
return void 0 === $_get$$ ? void 0 : $_get$$.call($BaseTheme___webpack_require__$$); | |
} | |
}; | |
$BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$ = $BaseTheme___webpack_require__$$(3); | |
$BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$ = $_interopRequireDefault$$($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$); | |
var $_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$ = $BaseTheme___webpack_require__$$(2), $_quillDelta2$$ = $_interopRequireDefault$$($_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$); | |
$_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$ = $BaseTheme___webpack_require__$$(8); | |
var $_emitter2$$ = $_interopRequireDefault$$($_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$); | |
$_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$ = $BaseTheme___webpack_require__$$(34); | |
var $_keyboard2$$ = $_interopRequireDefault$$($_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$); | |
$_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$ = $BaseTheme___webpack_require__$$(33); | |
$_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$ = $_interopRequireDefault$$($_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$); | |
var $_colorPicker__iconPicker__picker__tooltip2$$ = $BaseTheme___webpack_require__$$(59), $_colorPicker2$$ = $_interopRequireDefault$$($_colorPicker__iconPicker__picker__tooltip2$$); | |
$_colorPicker__iconPicker__picker__tooltip2$$ = $BaseTheme___webpack_require__$$(60); | |
var $_iconPicker2$$ = $_interopRequireDefault$$($_colorPicker__iconPicker__picker__tooltip2$$); | |
$_colorPicker__iconPicker__picker__tooltip2$$ = $BaseTheme___webpack_require__$$(27); | |
var $_picker2$$ = $_interopRequireDefault$$($_colorPicker__iconPicker__picker__tooltip2$$); | |
$BaseTheme___webpack_require__$$ = $BaseTheme___webpack_require__$$(61); | |
$_colorPicker__iconPicker__picker__tooltip2$$ = $_interopRequireDefault$$($BaseTheme___webpack_require__$$); | |
var $ALIGNS$$ = [!1, "center", "right", "justify"], $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".split(" "), $FONTS$$ = [!1, "serif", "monospace"], $HEADERS$$ = ["1", "2", "3", !1], $SIZES$$ = ["small", !1, "large", "huge"]; | |
$BaseTheme___webpack_require__$$ = function($BaseTheme___webpack_require__$$) { | |
function $BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$($_createClass$$, $_get$$) { | |
$_classCallCheck$$(this, $BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$); | |
var $BaseTheme___webpack_require__$$ = $_possibleConstructorReturn$$(this, ($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$.__proto__ || Object.getPrototypeOf($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$)).call(this, $_createClass$$, $_get$$)); | |
$_createClass$$.emitter.listenDOM("click", document.body, function $listener$$($_get$$) { | |
if (!document.body.contains($_createClass$$.root)) { | |
return document.body.removeEventListener("click", $listener$$); | |
} | |
null == $BaseTheme___webpack_require__$$.tooltip || $BaseTheme___webpack_require__$$.tooltip.root.contains($_get$$.target) || document.activeElement === $BaseTheme___webpack_require__$$.tooltip.textbox || $BaseTheme___webpack_require__$$.quill.hasFocus() || $BaseTheme___webpack_require__$$.tooltip.hide(); | |
null != $BaseTheme___webpack_require__$$.pickers && $BaseTheme___webpack_require__$$.pickers.forEach(function($_createClass$$) { | |
$_createClass$$.container.contains($_get$$.target) || $_createClass$$.close(); | |
}); | |
}); | |
return $BaseTheme___webpack_require__$$; | |
} | |
$_inherits$$($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$, $BaseTheme___webpack_require__$$); | |
$_createClass$$($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$, [{key:"addModule", value:function($_createClass$$) { | |
var $BaseTheme___webpack_require__$$ = $_get$$($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$.prototype.__proto__ || Object.getPrototypeOf($BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$.prototype), "addModule", this).call(this, $_createClass$$); | |
"toolbar" === $_createClass$$ && this.extendToolbar($BaseTheme___webpack_require__$$); | |
return $BaseTheme___webpack_require__$$; | |
}}, {key:"buildButtons", value:function($_createClass$$, $_get$$) { | |
$_createClass$$.forEach(function($_createClass$$) { | |
($_createClass$$.getAttribute("class") || "").split(/\s+/).forEach(function($BaseTheme___webpack_require__$$) { | |
if ($BaseTheme___webpack_require__$$.startsWith("ql-") && ($BaseTheme___webpack_require__$$ = $BaseTheme___webpack_require__$$.slice(3), null != $_get$$[$BaseTheme___webpack_require__$$])) { | |
if ("direction" === $BaseTheme___webpack_require__$$) { | |
$_createClass$$.innerHTML = $_get$$[$BaseTheme___webpack_require__$$][""] + $_get$$[$BaseTheme___webpack_require__$$].rtl; | |
} else { | |
if ("string" === typeof $_get$$[$BaseTheme___webpack_require__$$]) { | |
$_createClass$$.innerHTML = $_get$$[$BaseTheme___webpack_require__$$]; | |
} else { | |
var $fillSelect$$ = $_createClass$$.value || ""; | |
null != $fillSelect$$ && $_get$$[$BaseTheme___webpack_require__$$][$fillSelect$$] && ($_createClass$$.innerHTML = $_get$$[$BaseTheme___webpack_require__$$][$fillSelect$$]); | |
} | |
} | |
} | |
}); | |
}); | |
}}, {key:"buildPickers", value:function($_createClass$$, $_get$$) { | |
var $BaseTheme___webpack_require__$$ = this; | |
this.pickers = $_createClass$$.map(function($_createClass$$) { | |
if ($_createClass$$.classList.contains("ql-align")) { | |
return null == $_createClass$$.querySelector("option") && $fillSelect$$($_createClass$$, $ALIGNS$$), new $_iconPicker2$$.default($_createClass$$, $_get$$.align); | |
} | |
if ($_createClass$$.classList.contains("ql-background") || $_createClass$$.classList.contains("ql-color")) { | |
var $BaseTheme___webpack_require__$$ = $_createClass$$.classList.contains("ql-background") ? "background" : "color"; | |
null == $_createClass$$.querySelector("option") && $fillSelect$$($_createClass$$, $COLORS$$, "background" === $BaseTheme___webpack_require__$$ ? "#ffffff" : "#000000"); | |
return new $_colorPicker2$$.default($_createClass$$, $_get$$[$BaseTheme___webpack_require__$$]); | |
} | |
null == $_createClass$$.querySelector("option") && ($_createClass$$.classList.contains("ql-font") ? $fillSelect$$($_createClass$$, $FONTS$$) : $_createClass$$.classList.contains("ql-header") ? $fillSelect$$($_createClass$$, $HEADERS$$) : $_createClass$$.classList.contains("ql-size") && $fillSelect$$($_createClass$$, $SIZES$$)); | |
return new $_picker2$$.default($_createClass$$); | |
}); | |
this.quill.on($_emitter2$$.default.events.EDITOR_CHANGE, function() { | |
$BaseTheme___webpack_require__$$.pickers.forEach(function($_createClass$$) { | |
$_createClass$$.update(); | |
}); | |
}); | |
}}]); | |
return $BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$; | |
}($_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$.default); | |
$BaseTheme___webpack_require__$$.DEFAULTS = (0, $BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$.default)(!0, {}, $_emitter$jscomp$3__keyboard$jscomp$1__quillDelta$jscomp$5__theme$jscomp$1__theme2$$.default.DEFAULTS, {modules:{toolbar:{handlers:{formula:function() { | |
this.quill.theme.tooltip.edit("formula"); | |
}, image:function() { | |
var $_createClass$$ = this, $_get$$ = this.container.querySelector("input.ql-image[type\x3dfile]"); | |
null == $_get$$ && ($_get$$ = document.createElement("input"), $_get$$.setAttribute("type", "file"), $_get$$.setAttribute("accept", "image/png, image/gif, image/jpeg, image/bmp, image/x-icon"), $_get$$.classList.add("ql-image"), $_get$$.addEventListener("change", function() { | |
if (null != $_get$$.files && null != $_get$$.files[0]) { | |
var $BaseTheme___webpack_require__$$ = new FileReader; | |
$BaseTheme___webpack_require__$$.onload = function($BaseTheme___webpack_require__$$) { | |
var $fillSelect$$ = $_createClass$$.quill.getSelection(!0); | |
$_createClass$$.quill.updateContents((new $_quillDelta2$$.default).retain($fillSelect$$.index).delete($fillSelect$$.length).insert({image:$BaseTheme___webpack_require__$$.target.result}), $_emitter2$$.default.sources.USER); | |
$_createClass$$.quill.setSelection($fillSelect$$.index + 1, $_emitter2$$.default.sources.SILENT); | |
$_get$$.value = ""; | |
}; | |
$BaseTheme___webpack_require__$$.readAsDataURL($_get$$.files[0]); | |
} | |
}), this.container.appendChild($_get$$)); | |
$_get$$.click(); | |
}, video:function() { | |
this.quill.theme.tooltip.edit("video"); | |
}}}}}); | |
$BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$ = function($_get$$) { | |
function $BaseTheme___webpack_require__$$($_createClass$$, $_get$$) { | |
$_classCallCheck$$(this, $BaseTheme___webpack_require__$$); | |
$_createClass$$ = $_possibleConstructorReturn$$(this, ($BaseTheme___webpack_require__$$.__proto__ || Object.getPrototypeOf($BaseTheme___webpack_require__$$)).call(this, $_createClass$$, $_get$$)); | |
$_createClass$$.textbox = $_createClass$$.root.querySelector('input[type\x3d"text"]'); | |
$_createClass$$.listen(); | |
return $_createClass$$; | |
} | |
$_inherits$$($BaseTheme___webpack_require__$$, $_get$$); | |
$_createClass$$($BaseTheme___webpack_require__$$, [{key:"listen", value:function() { | |
var $_createClass$$ = this; | |
this.textbox.addEventListener("keydown", function($_get$$) { | |
$_keyboard2$$.default.match($_get$$, "enter") ? ($_createClass$$.save(), $_get$$.preventDefault()) : $_keyboard2$$.default.match($_get$$, "escape") && ($_createClass$$.cancel(), $_get$$.preventDefault()); | |
}); | |
}}, {key:"cancel", value:function() { | |
this.hide(); | |
}}, {key:"edit", value:function() { | |
var $_createClass$$ = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "link", $_get$$ = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null; | |
this.root.classList.remove("ql-hidden"); | |
this.root.classList.add("ql-editing"); | |
null != $_get$$ ? this.textbox.value = $_get$$ : $_createClass$$ !== 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-" + $_createClass$$) || ""); | |
this.root.setAttribute("data-mode", $_createClass$$); | |
}}, {key:"restoreFocus", value:function() { | |
var $_createClass$$ = this.quill.scrollingContainer.scrollTop; | |
this.quill.focus(); | |
this.quill.scrollingContainer.scrollTop = $_createClass$$; | |
}}, {key:"save", value:function() { | |
var $_createClass$$ = this.textbox.value; | |
switch(this.root.getAttribute("data-mode")) { | |
case "link": | |
var $_get$$ = this.quill.root.scrollTop; | |
this.linkRange ? (this.quill.formatText(this.linkRange, "link", $_createClass$$, $_emitter2$$.default.sources.USER), delete this.linkRange) : (this.restoreFocus(), this.quill.format("link", $_createClass$$, $_emitter2$$.default.sources.USER)); | |
this.quill.root.scrollTop = $_get$$; | |
break; | |
case "video": | |
$_createClass$$ = ($_get$$ = $_createClass$$.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || $_createClass$$.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/)) ? ($_get$$[1] || "https") + "://www.youtube.com/embed/" + $_get$$[2] + "?showinfo\x3d0" : ($_get$$ = $_createClass$$.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) ? ($_get$$[1] || "https") + "://player.vimeo.com/video/" + $_get$$[2] + "/" : $_createClass$$; | |
case "formula": | |
$_createClass$$ && ($_get$$ = this.quill.getSelection(!0), null != $_get$$ && ($_get$$ = $_get$$.index + $_get$$.length, this.quill.insertEmbed($_get$$, this.root.getAttribute("data-mode"), $_createClass$$, $_emitter2$$.default.sources.USER), "formula" === this.root.getAttribute("data-mode") && this.quill.insertText($_get$$ + 1, " ", $_emitter2$$.default.sources.USER), this.quill.setSelection($_get$$ + 2, $_emitter2$$.default.sources.USER))); | |
} | |
this.textbox.value = ""; | |
this.hide(); | |
}}]); | |
return $BaseTheme___webpack_require__$$; | |
}($_colorPicker__iconPicker__picker__tooltip2$$.default); | |
$exports$$.BaseTooltip = $BaseTooltip__extend$jscomp$4__extend2$jscomp$4_module$$; | |
$exports$$.default = $BaseTheme___webpack_require__$$; | |
}, function($LinkedList_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$LinkedList_module$$ = function() { | |
function $__webpack_require__$$() { | |
this.head = this.tail = null; | |
this.length = 0; | |
} | |
$__webpack_require__$$.prototype.append = function() { | |
for (var $__webpack_require__$$ = [], $LinkedList_module$$ = 0; $LinkedList_module$$ < arguments.length; $LinkedList_module$$++) { | |
$__webpack_require__$$[$LinkedList_module$$] = arguments[$LinkedList_module$$]; | |
} | |
this.insertBefore($__webpack_require__$$[0], null); | |
1 < $__webpack_require__$$.length && this.append.apply(this, $__webpack_require__$$.slice(1)); | |
}; | |
$__webpack_require__$$.prototype.contains = function($__webpack_require__$$) { | |
for (var $LinkedList_module$$, $next$$ = this.iterator(); $LinkedList_module$$ = $next$$();) { | |
if ($LinkedList_module$$ === $__webpack_require__$$) { | |
return !0; | |
} | |
} | |
return !1; | |
}; | |
$__webpack_require__$$.prototype.insertBefore = function($__webpack_require__$$, $LinkedList_module$$) { | |
$__webpack_require__$$ && ($__webpack_require__$$.next = $LinkedList_module$$, null != $LinkedList_module$$ ? ($__webpack_require__$$.prev = $LinkedList_module$$.prev, null != $LinkedList_module$$.prev && ($LinkedList_module$$.prev.next = $__webpack_require__$$), $LinkedList_module$$.prev = $__webpack_require__$$, $LinkedList_module$$ === this.head && (this.head = $__webpack_require__$$)) : null != this.tail ? (this.tail.next = $__webpack_require__$$, $__webpack_require__$$.prev = this.tail, | |
this.tail = $__webpack_require__$$) : ($__webpack_require__$$.prev = null, this.head = this.tail = $__webpack_require__$$), this.length += 1); | |
}; | |
$__webpack_require__$$.prototype.offset = function($__webpack_require__$$) { | |
for (var $LinkedList_module$$ = 0, $cur$$ = this.head; null != $cur$$;) { | |
if ($cur$$ === $__webpack_require__$$) { | |
return $LinkedList_module$$; | |
} | |
$LinkedList_module$$ += $cur$$.length(); | |
$cur$$ = $cur$$.next; | |
} | |
return -1; | |
}; | |
$__webpack_require__$$.prototype.remove = function($__webpack_require__$$) { | |
this.contains($__webpack_require__$$) && (null != $__webpack_require__$$.prev && ($__webpack_require__$$.prev.next = $__webpack_require__$$.next), null != $__webpack_require__$$.next && ($__webpack_require__$$.next.prev = $__webpack_require__$$.prev), $__webpack_require__$$ === this.head && (this.head = $__webpack_require__$$.next), $__webpack_require__$$ === this.tail && (this.tail = $__webpack_require__$$.prev), --this.length); | |
}; | |
$__webpack_require__$$.prototype.iterator = function($__webpack_require__$$) { | |
void 0 === $__webpack_require__$$ && ($__webpack_require__$$ = this.head); | |
return function() { | |
var $LinkedList_module$$ = $__webpack_require__$$; | |
null != $__webpack_require__$$ && ($__webpack_require__$$ = $__webpack_require__$$.next); | |
return $LinkedList_module$$; | |
}; | |
}; | |
$__webpack_require__$$.prototype.find = function($__webpack_require__$$, $LinkedList_module$$) { | |
void 0 === $LinkedList_module$$ && ($LinkedList_module$$ = !1); | |
for (var $cur$$, $next$$ = this.iterator(); $cur$$ = $next$$();) { | |
var $length$$ = $cur$$.length(); | |
if ($__webpack_require__$$ < $length$$ || $LinkedList_module$$ && $__webpack_require__$$ === $length$$ && (null == $cur$$.next || 0 !== $cur$$.next.length())) { | |
return [$cur$$, $__webpack_require__$$]; | |
} | |
$__webpack_require__$$ -= $length$$; | |
} | |
return [null, 0]; | |
}; | |
$__webpack_require__$$.prototype.forEach = function($__webpack_require__$$) { | |
for (var $LinkedList_module$$, $next$$ = this.iterator(); $LinkedList_module$$ = $next$$();) { | |
$__webpack_require__$$($LinkedList_module$$); | |
} | |
}; | |
$__webpack_require__$$.prototype.forEachAt = function($__webpack_require__$$, $LinkedList_module$$, $callback$$) { | |
if (!(0 >= $LinkedList_module$$)) { | |
for (var $_a$jscomp$4_cur$$ = this.find($__webpack_require__$$), $curIndex$$ = $__webpack_require__$$ - $_a$jscomp$4_cur$$[1], $next$$ = this.iterator($_a$jscomp$4_cur$$[0]); ($_a$jscomp$4_cur$$ = $next$$()) && $curIndex$$ < $__webpack_require__$$ + $LinkedList_module$$;) { | |
var $curLength$$ = $_a$jscomp$4_cur$$.length(); | |
$__webpack_require__$$ > $curIndex$$ ? $callback$$($_a$jscomp$4_cur$$, $__webpack_require__$$ - $curIndex$$, Math.min($LinkedList_module$$, $curIndex$$ + $curLength$$ - $__webpack_require__$$)) : $callback$$($_a$jscomp$4_cur$$, 0, Math.min($curLength$$, $__webpack_require__$$ + $LinkedList_module$$ - $curIndex$$)); | |
$curIndex$$ += $curLength$$; | |
} | |
} | |
}; | |
$__webpack_require__$$.prototype.map = function($__webpack_require__$$) { | |
return this.reduce(function($LinkedList_module$$, $cur$$) { | |
$LinkedList_module$$.push($__webpack_require__$$($cur$$)); | |
return $LinkedList_module$$; | |
}, []); | |
}; | |
$__webpack_require__$$.prototype.reduce = function($__webpack_require__$$, $LinkedList_module$$) { | |
for (var $cur$$, $next$$ = this.iterator(); $cur$$ = $next$$();) { | |
$LinkedList_module$$ = $__webpack_require__$$($LinkedList_module$$, $cur$$); | |
} | |
return $LinkedList_module$$; | |
}; | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $LinkedList_module$$; | |
}, function($ScrollBlot_module$$, $exports$$, $__webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $__webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($d$$, $b$$) { | |
$d$$.__proto__ = $b$$; | |
} || function($d$$, $b$$) { | |
for (var $__webpack_require__$$ in $b$$) { | |
$b$$.hasOwnProperty($__webpack_require__$$) && ($d$$[$__webpack_require__$$] = $b$$[$__webpack_require__$$]); | |
} | |
}; | |
return function($d$$, $b$$) { | |
function $extendStatics$$() { | |
this.constructor = $d$$; | |
} | |
$__webpack_require__$$($d$$, $b$$); | |
$d$$.prototype = null === $b$$ ? Object.create($b$$) : ($extendStatics$$.prototype = $b$$.prototype, new $extendStatics$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $container_1$$ = $__webpack_require__$$(17), $Registry$$ = $__webpack_require__$$(1), $OBSERVER_CONFIG$$ = {attributes:!0, characterData:!0, characterDataOldValue:!0, childList:!0, subtree:!0}; | |
$ScrollBlot_module$$ = function($__webpack_require__$$) { | |
function $ScrollBlot$$($ScrollBlot$$) { | |
var $node$$ = $__webpack_require__$$.call(this, $ScrollBlot$$) || this; | |
$node$$.scroll = $node$$; | |
$node$$.observer = new MutationObserver(function($ScrollBlot$$) { | |
$node$$.update($ScrollBlot$$); | |
}); | |
$node$$.observer.observe($node$$.domNode, $OBSERVER_CONFIG$$); | |
$node$$.attach(); | |
return $node$$; | |
} | |
$__extends$$($ScrollBlot$$, $__webpack_require__$$); | |
$ScrollBlot$$.prototype.detach = function() { | |
$__webpack_require__$$.prototype.detach.call(this); | |
this.observer.disconnect(); | |
}; | |
$ScrollBlot$$.prototype.deleteAt = function($ScrollBlot$$, $_super$$) { | |
this.update(); | |
0 === $ScrollBlot$$ && $_super$$ === this.length() ? this.children.forEach(function($ScrollBlot$$) { | |
$ScrollBlot$$.remove(); | |
}) : $__webpack_require__$$.prototype.deleteAt.call(this, $ScrollBlot$$, $_super$$); | |
}; | |
$ScrollBlot$$.prototype.formatAt = function($ScrollBlot$$, $_super$$, $ScrollBlot_module$$, $value$$) { | |
this.update(); | |
$__webpack_require__$$.prototype.formatAt.call(this, $ScrollBlot$$, $_super$$, $ScrollBlot_module$$, $value$$); | |
}; | |
$ScrollBlot$$.prototype.insertAt = function($ScrollBlot$$, $_super$$, $ScrollBlot_module$$) { | |
this.update(); | |
$__webpack_require__$$.prototype.insertAt.call(this, $ScrollBlot$$, $_super$$, $ScrollBlot_module$$); | |
}; | |
$ScrollBlot$$.prototype.optimize = function($ScrollBlot$$, $_super$$) { | |
var $mutations$$ = this; | |
void 0 === $ScrollBlot$$ && ($ScrollBlot$$ = []); | |
void 0 === $_super$$ && ($_super$$ = {}); | |
$__webpack_require__$$.prototype.optimize.call(this, $_super$$); | |
for (var $ScrollBlot_module$$ = [].slice.call(this.observer.takeRecords()); 0 < $ScrollBlot_module$$.length;) { | |
$ScrollBlot$$.push($ScrollBlot_module$$.pop()); | |
} | |
for (var $context$$ = function($ScrollBlot$$, $__webpack_require__$$) { | |
void 0 === $__webpack_require__$$ && ($__webpack_require__$$ = !0); | |
null != $ScrollBlot$$ && $ScrollBlot$$ !== $mutations$$ && null != $ScrollBlot$$.domNode.parentNode && (null == $ScrollBlot$$.domNode[$Registry$$.DATA_KEY].mutations && ($ScrollBlot$$.domNode[$Registry$$.DATA_KEY].mutations = []), $__webpack_require__$$ && $context$$($ScrollBlot$$.parent)); | |
}, $OBSERVER_CONFIG$$ = function($ScrollBlot$$) { | |
null != $ScrollBlot$$.domNode[$Registry$$.DATA_KEY] && null != $ScrollBlot$$.domNode[$Registry$$.DATA_KEY].mutations && ($ScrollBlot$$ instanceof $container_1$$.default && $ScrollBlot$$.children.forEach($OBSERVER_CONFIG$$), $ScrollBlot$$.optimize($_super$$)); | |
}, $exports$$ = $ScrollBlot$$, $__extends$$ = 0; 0 < $exports$$.length; $__extends$$ += 1) { | |
if (100 <= $__extends$$) { | |
throw Error("[Parchment] Maximum optimize iterations reached"); | |
} | |
$exports$$.forEach(function($ScrollBlot$$) { | |
var $mutations$$ = $Registry$$.find($ScrollBlot$$.target, !0); | |
null != $mutations$$ && ($mutations$$.domNode === $ScrollBlot$$.target && ("childList" === $ScrollBlot$$.type ? ($context$$($Registry$$.find($ScrollBlot$$.previousSibling, !1)), [].forEach.call($ScrollBlot$$.addedNodes, function($ScrollBlot$$) { | |
$ScrollBlot$$ = $Registry$$.find($ScrollBlot$$, !1); | |
$context$$($ScrollBlot$$, !1); | |
$ScrollBlot$$ instanceof $container_1$$.default && $ScrollBlot$$.children.forEach(function($ScrollBlot$$) { | |
$context$$($ScrollBlot$$, !1); | |
}); | |
})) : "attributes" === $ScrollBlot$$.type && $context$$($mutations$$.prev)), $context$$($mutations$$)); | |
}); | |
this.children.forEach($OBSERVER_CONFIG$$); | |
$exports$$ = [].slice.call(this.observer.takeRecords()); | |
for ($ScrollBlot_module$$ = $exports$$.slice(); 0 < $ScrollBlot_module$$.length;) { | |
$ScrollBlot$$.push($ScrollBlot_module$$.pop()); | |
} | |
} | |
}; | |
$ScrollBlot$$.prototype.update = function($ScrollBlot$$, $_super$$) { | |
var $mutations$$ = this; | |
void 0 === $_super$$ && ($_super$$ = {}); | |
$ScrollBlot$$ = $ScrollBlot$$ || this.observer.takeRecords(); | |
$ScrollBlot$$.map(function($ScrollBlot$$) { | |
var $mutations$$ = $Registry$$.find($ScrollBlot$$.target, !0); | |
if (null == $mutations$$) { | |
return null; | |
} | |
if (null == $mutations$$.domNode[$Registry$$.DATA_KEY].mutations) { | |
return $mutations$$.domNode[$Registry$$.DATA_KEY].mutations = [$ScrollBlot$$], $mutations$$; | |
} | |
$mutations$$.domNode[$Registry$$.DATA_KEY].mutations.push($ScrollBlot$$); | |
return null; | |
}).forEach(function($ScrollBlot$$) { | |
null != $ScrollBlot$$ && $ScrollBlot$$ !== $mutations$$ && null != $ScrollBlot$$.domNode[$Registry$$.DATA_KEY] && $ScrollBlot$$.update($ScrollBlot$$.domNode[$Registry$$.DATA_KEY].mutations || [], $_super$$); | |
}); | |
null != this.domNode[$Registry$$.DATA_KEY].mutations && $__webpack_require__$$.prototype.update.call(this, this.domNode[$Registry$$.DATA_KEY].mutations, $_super$$); | |
this.optimize($ScrollBlot$$, $_super$$); | |
}; | |
$ScrollBlot$$.blotName = "scroll"; | |
$ScrollBlot$$.defaultChild = "block"; | |
$ScrollBlot$$.scope = $Registry$$.Scope.BLOCK_BLOT; | |
$ScrollBlot$$.tagName = "DIV"; | |
return $ScrollBlot$$; | |
}($container_1$$.default); | |
$exports$$.default = $ScrollBlot_module$$; | |
}, function($InlineBlot_module$$, $exports$$, $__webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $__webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($__webpack_require__$$, $b$$) { | |
$__webpack_require__$$.__proto__ = $b$$; | |
} || function($__webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($__webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($d$$, $b$$) { | |
function $__$$() { | |
this.constructor = $d$$; | |
} | |
$__webpack_require__$$($d$$, $b$$); | |
$d$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $format_1$$ = $__webpack_require__$$(18), $Registry$$ = $__webpack_require__$$(1); | |
$InlineBlot_module$$ = function($__webpack_require__$$) { | |
function $InlineBlot$$() { | |
return null !== $__webpack_require__$$ && $__webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($InlineBlot$$, $__webpack_require__$$); | |
$InlineBlot$$.formats = function($domNode$$) { | |
if ($domNode$$.tagName !== $InlineBlot$$.tagName) { | |
return $__webpack_require__$$.formats.call(this, $domNode$$); | |
} | |
}; | |
$InlineBlot$$.prototype.format = function($name$$, $value$$) { | |
var $InlineBlot_module$$ = this; | |
$name$$ !== this.statics.blotName || $value$$ ? $__webpack_require__$$.prototype.format.call(this, $name$$, $value$$) : (this.children.forEach(function($name$$) { | |
$name$$ instanceof $format_1$$.default || ($name$$ = $name$$.wrap($InlineBlot$$.blotName, !0)); | |
$InlineBlot_module$$.attributes.copy($name$$); | |
}), this.unwrap()); | |
}; | |
$InlineBlot$$.prototype.formatAt = function($index$$, $length$$, $InlineBlot$$, $InlineBlot_module$$) { | |
null != this.formats()[$InlineBlot$$] || $Registry$$.query($InlineBlot$$, $Registry$$.Scope.ATTRIBUTE) ? this.isolate($index$$, $length$$).format($InlineBlot$$, $InlineBlot_module$$) : $__webpack_require__$$.prototype.formatAt.call(this, $index$$, $length$$, $InlineBlot$$, $InlineBlot_module$$); | |
}; | |
$InlineBlot$$.prototype.optimize = function($context$jscomp$25_formats$$) { | |
$__webpack_require__$$.prototype.optimize.call(this, $context$jscomp$25_formats$$); | |
$context$jscomp$25_formats$$ = this.formats(); | |
if (0 === Object.keys($context$jscomp$25_formats$$).length) { | |
return this.unwrap(); | |
} | |
var $next$$ = this.next, $InlineBlot_module$$; | |
if ($InlineBlot_module$$ = $next$$ instanceof $InlineBlot$$ && $next$$.prev === this) { | |
a: { | |
if ($InlineBlot_module$$ = $next$$.formats(), Object.keys($context$jscomp$25_formats$$).length !== Object.keys($InlineBlot_module$$).length) { | |
$InlineBlot_module$$ = !1; | |
} else { | |
for (var $_super$$ in $context$jscomp$25_formats$$) { | |
if ($context$jscomp$25_formats$$[$_super$$] !== $InlineBlot_module$$[$_super$$]) { | |
$InlineBlot_module$$ = !1; | |
break a; | |
} | |
} | |
$InlineBlot_module$$ = !0; | |
} | |
} | |
} | |
$InlineBlot_module$$ && ($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_module$$; | |
}, function($format_1$jscomp$2_module$$, $exports$$, $BlockBlot___webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $BlockBlot___webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($BlockBlot___webpack_require__$$, $b$$) { | |
$BlockBlot___webpack_require__$$.__proto__ = $b$$; | |
} || function($BlockBlot___webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($BlockBlot___webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($format_1$jscomp$2_module$$, $b$$) { | |
function $__$$() { | |
this.constructor = $format_1$jscomp$2_module$$; | |
} | |
$BlockBlot___webpack_require__$$($format_1$jscomp$2_module$$, $b$$); | |
$format_1$jscomp$2_module$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$format_1$jscomp$2_module$$ = $BlockBlot___webpack_require__$$(18); | |
var $Registry$$ = $BlockBlot___webpack_require__$$(1); | |
$BlockBlot___webpack_require__$$ = function($BlockBlot___webpack_require__$$) { | |
function $format_1$jscomp$2_module$$() { | |
return null !== $BlockBlot___webpack_require__$$ && $BlockBlot___webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($format_1$jscomp$2_module$$, $BlockBlot___webpack_require__$$); | |
$format_1$jscomp$2_module$$.formats = function($domNode$$) { | |
var $tagName$$ = $Registry$$.query($format_1$jscomp$2_module$$.blotName).tagName; | |
if ($domNode$$.tagName !== $tagName$$) { | |
return $BlockBlot___webpack_require__$$.formats.call(this, $domNode$$); | |
} | |
}; | |
$format_1$jscomp$2_module$$.prototype.format = function($name$$, $value$$) { | |
null != $Registry$$.query($name$$, $Registry$$.Scope.BLOCK) && ($name$$ !== this.statics.blotName || $value$$ ? $BlockBlot___webpack_require__$$.prototype.format.call(this, $name$$, $value$$) : this.replaceWith($format_1$jscomp$2_module$$.blotName)); | |
}; | |
$format_1$jscomp$2_module$$.prototype.formatAt = function($index$$, $length$$, $name$$, $format_1$jscomp$2_module$$) { | |
null != $Registry$$.query($name$$, $Registry$$.Scope.BLOCK) ? this.format($name$$, $format_1$jscomp$2_module$$) : $BlockBlot___webpack_require__$$.prototype.formatAt.call(this, $index$$, $length$$, $name$$, $format_1$jscomp$2_module$$); | |
}; | |
$format_1$jscomp$2_module$$.prototype.insertAt = function($after$jscomp$2_index$$, $blot$jscomp$27_value$$, $def$$) { | |
null == $def$$ || null != $Registry$$.query($blot$jscomp$27_value$$, $Registry$$.Scope.INLINE) ? $BlockBlot___webpack_require__$$.prototype.insertAt.call(this, $after$jscomp$2_index$$, $blot$jscomp$27_value$$, $def$$) : ($after$jscomp$2_index$$ = this.split($after$jscomp$2_index$$), $blot$jscomp$27_value$$ = $Registry$$.create($blot$jscomp$27_value$$, $def$$), $after$jscomp$2_index$$.parent.insertBefore($blot$jscomp$27_value$$, $after$jscomp$2_index$$)); | |
}; | |
$format_1$jscomp$2_module$$.prototype.update = function($mutations$$, $context$$) { | |
navigator.userAgent.match(/Trident/) ? this.build() : $BlockBlot___webpack_require__$$.prototype.update.call(this, $mutations$$, $context$$); | |
}; | |
$format_1$jscomp$2_module$$.blotName = "block"; | |
$format_1$jscomp$2_module$$.scope = $Registry$$.Scope.BLOCK_BLOT; | |
$format_1$jscomp$2_module$$.tagName = "P"; | |
return $format_1$jscomp$2_module$$; | |
}($format_1$jscomp$2_module$$.default); | |
$exports$$.default = $BlockBlot___webpack_require__$$; | |
}, function($EmbedBlot_module$$, $exports$$, $__webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $__webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($__webpack_require__$$, $EmbedBlot_module$$) { | |
$__webpack_require__$$.__proto__ = $EmbedBlot_module$$; | |
} || function($__webpack_require__$$, $EmbedBlot_module$$) { | |
for (var $p$$ in $EmbedBlot_module$$) { | |
$EmbedBlot_module$$.hasOwnProperty($p$$) && ($__webpack_require__$$[$p$$] = $EmbedBlot_module$$[$p$$]); | |
} | |
}; | |
return function($EmbedBlot_module$$, $exports$$) { | |
function $__$$() { | |
this.constructor = $EmbedBlot_module$$; | |
} | |
$__webpack_require__$$($EmbedBlot_module$$, $exports$$); | |
$EmbedBlot_module$$.prototype = null === $exports$$ ? Object.create($exports$$) : ($__$$.prototype = $exports$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$EmbedBlot_module$$ = function($__webpack_require__$$) { | |
function $EmbedBlot_module$$() { | |
return null !== $__webpack_require__$$ && $__webpack_require__$$.apply(this, arguments) || this; | |
} | |
$__extends$$($EmbedBlot_module$$, $__webpack_require__$$); | |
$EmbedBlot_module$$.formats = function($__webpack_require__$$) { | |
}; | |
$EmbedBlot_module$$.prototype.format = function($EmbedBlot_module$$, $value$$) { | |
$__webpack_require__$$.prototype.formatAt.call(this, 0, this.length(), $EmbedBlot_module$$, $value$$); | |
}; | |
$EmbedBlot_module$$.prototype.formatAt = function($EmbedBlot_module$$, $length$$, $name$$, $value$$) { | |
0 === $EmbedBlot_module$$ && $length$$ === this.length() ? this.format($name$$, $value$$) : $__webpack_require__$$.prototype.formatAt.call(this, $EmbedBlot_module$$, $length$$, $name$$, $value$$); | |
}; | |
$EmbedBlot_module$$.prototype.formats = function() { | |
return this.statics.formats(this.domNode); | |
}; | |
return $EmbedBlot_module$$; | |
}($__webpack_require__$$(19).default); | |
$exports$$.default = $EmbedBlot_module$$; | |
}, function($leaf_1$jscomp$2_module$$, $exports$$, $TextBlot$jscomp$2___webpack_require__$$) { | |
var $__extends$$ = this && this.__extends || function() { | |
var $TextBlot$jscomp$2___webpack_require__$$ = Object.setPrototypeOf || {__proto__:[]} instanceof Array && function($TextBlot$jscomp$2___webpack_require__$$, $b$$) { | |
$TextBlot$jscomp$2___webpack_require__$$.__proto__ = $b$$; | |
} || function($TextBlot$jscomp$2___webpack_require__$$, $b$$) { | |
for (var $p$$ in $b$$) { | |
$b$$.hasOwnProperty($p$$) && ($TextBlot$jscomp$2___webpack_require__$$[$p$$] = $b$$[$p$$]); | |
} | |
}; | |
return function($leaf_1$jscomp$2_module$$, $b$$) { | |
function $__$$() { | |
this.constructor = $leaf_1$jscomp$2_module$$; | |
} | |
$TextBlot$jscomp$2___webpack_require__$$($leaf_1$jscomp$2_module$$, $b$$); | |
$leaf_1$jscomp$2_module$$.prototype = null === $b$$ ? Object.create($b$$) : ($__$$.prototype = $b$$.prototype, new $__$$); | |
}; | |
}(); | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$leaf_1$jscomp$2_module$$ = $TextBlot$jscomp$2___webpack_require__$$(19); | |
var $Registry$$ = $TextBlot$jscomp$2___webpack_require__$$(1); | |
$TextBlot$jscomp$2___webpack_require__$$ = function($TextBlot$jscomp$2___webpack_require__$$) { | |
function $leaf_1$jscomp$2_module$$($_this$jscomp$26_node$$) { | |
$_this$jscomp$26_node$$ = $TextBlot$jscomp$2___webpack_require__$$.call(this, $_this$jscomp$26_node$$) || this; | |
$_this$jscomp$26_node$$.text = $_this$jscomp$26_node$$.statics.value($_this$jscomp$26_node$$.domNode); | |
return $_this$jscomp$26_node$$; | |
} | |
$__extends$$($leaf_1$jscomp$2_module$$, $TextBlot$jscomp$2___webpack_require__$$); | |
$leaf_1$jscomp$2_module$$.create = function($TextBlot$jscomp$2___webpack_require__$$) { | |
return document.createTextNode($TextBlot$jscomp$2___webpack_require__$$); | |
}; | |
$leaf_1$jscomp$2_module$$.value = function($TextBlot$jscomp$2___webpack_require__$$) { | |
$TextBlot$jscomp$2___webpack_require__$$ = $TextBlot$jscomp$2___webpack_require__$$.data; | |
$TextBlot$jscomp$2___webpack_require__$$.normalize && ($TextBlot$jscomp$2___webpack_require__$$ = $TextBlot$jscomp$2___webpack_require__$$.normalize()); | |
return $TextBlot$jscomp$2___webpack_require__$$; | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.deleteAt = function($TextBlot$jscomp$2___webpack_require__$$, $length$$) { | |
this.domNode.data = this.text = this.text.slice(0, $TextBlot$jscomp$2___webpack_require__$$) + this.text.slice($TextBlot$jscomp$2___webpack_require__$$ + $length$$); | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.index = function($TextBlot$jscomp$2___webpack_require__$$, $offset$$) { | |
return this.domNode === $TextBlot$jscomp$2___webpack_require__$$ ? $offset$$ : -1; | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.insertAt = function($index$$, $value$$, $def$$) { | |
null == $def$$ ? (this.text = this.text.slice(0, $index$$) + $value$$ + this.text.slice($index$$), this.domNode.data = this.text) : $TextBlot$jscomp$2___webpack_require__$$.prototype.insertAt.call(this, $index$$, $value$$, $def$$); | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.length = function() { | |
return this.text.length; | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.optimize = function($context$$) { | |
$TextBlot$jscomp$2___webpack_require__$$.prototype.optimize.call(this, $context$$); | |
this.text = this.statics.value(this.domNode); | |
0 === this.text.length ? this.remove() : this.next instanceof $leaf_1$jscomp$2_module$$ && this.next.prev === this && (this.insertAt(this.length(), this.next.value()), this.next.remove()); | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.position = function($TextBlot$jscomp$2___webpack_require__$$, $inclusive$$) { | |
return [this.domNode, $TextBlot$jscomp$2___webpack_require__$$]; | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.split = function($TextBlot$jscomp$2___webpack_require__$$, $force$$) { | |
void 0 === $force$$ && ($force$$ = !1); | |
if (!$force$$) { | |
if (0 === $TextBlot$jscomp$2___webpack_require__$$) { | |
return this; | |
} | |
if ($TextBlot$jscomp$2___webpack_require__$$ === this.length()) { | |
return this.next; | |
} | |
} | |
$TextBlot$jscomp$2___webpack_require__$$ = $Registry$$.create(this.domNode.splitText($TextBlot$jscomp$2___webpack_require__$$)); | |
this.parent.insertBefore($TextBlot$jscomp$2___webpack_require__$$, this.next); | |
this.text = this.statics.value(this.domNode); | |
return $TextBlot$jscomp$2___webpack_require__$$; | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.update = function($TextBlot$jscomp$2___webpack_require__$$, $context$$) { | |
var $_this$$ = this; | |
$TextBlot$jscomp$2___webpack_require__$$.some(function($context$$) { | |
return "characterData" === $context$$.type && $context$$.target === $_this$$.domNode; | |
}) && (this.text = this.statics.value(this.domNode)); | |
}; | |
$leaf_1$jscomp$2_module$$.prototype.value = function() { | |
return this.text; | |
}; | |
$leaf_1$jscomp$2_module$$.blotName = "text"; | |
$leaf_1$jscomp$2_module$$.scope = $Registry$$.Scope.INLINE_BLOT; | |
return $leaf_1$jscomp$2_module$$; | |
}($leaf_1$jscomp$2_module$$.default); | |
$exports$$.default = $TextBlot$jscomp$2___webpack_require__$$; | |
}, function($elem$jscomp$3_module$$, $exports$$, $__webpack_require__$$) { | |
$elem$jscomp$3_module$$ = document.createElement("div"); | |
$elem$jscomp$3_module$$.classList.toggle("test-class", !1); | |
if ($elem$jscomp$3_module$$.classList.contains("test-class")) { | |
var $_toggle$$ = DOMTokenList.prototype.toggle; | |
DOMTokenList.prototype.toggle = function($__webpack_require__$$, $elem$jscomp$3_module$$) { | |
return 1 < arguments.length && !this.contains($__webpack_require__$$) === !$elem$jscomp$3_module$$ ? $elem$jscomp$3_module$$ : $_toggle$$.call(this, $__webpack_require__$$); | |
}; | |
} | |
String.prototype.startsWith || (String.prototype.startsWith = function($__webpack_require__$$, $elem$jscomp$3_module$$) { | |
return this.substr($elem$jscomp$3_module$$ || 0, $__webpack_require__$$.length) === $__webpack_require__$$; | |
}); | |
String.prototype.endsWith || (String.prototype.endsWith = function($__webpack_require__$$, $elem$jscomp$3_module$$) { | |
var $exports$$ = this.toString(); | |
if ("number" !== typeof $elem$jscomp$3_module$$ || !isFinite($elem$jscomp$3_module$$) || Math.floor($elem$jscomp$3_module$$) !== $elem$jscomp$3_module$$ || $elem$jscomp$3_module$$ > $exports$$.length) { | |
$elem$jscomp$3_module$$ = $exports$$.length; | |
} | |
$elem$jscomp$3_module$$ -= $__webpack_require__$$.length; | |
$__webpack_require__$$ = $exports$$.indexOf($__webpack_require__$$, $elem$jscomp$3_module$$); | |
return -1 !== $__webpack_require__$$ && $__webpack_require__$$ === $elem$jscomp$3_module$$; | |
}); | |
Array.prototype.find || Object.defineProperty(Array.prototype, "find", {value:function($__webpack_require__$$, $elem$jscomp$3_module$$) { | |
if (null === this) { | |
throw new TypeError("Array.prototype.find called on null or undefined"); | |
} | |
if ("function" !== typeof $__webpack_require__$$) { | |
throw new TypeError("predicate must be a function"); | |
} | |
for (var $exports$$ = Object(this), $length$$ = $exports$$.length >>> 0, $value$$, $i$$ = 0; $i$$ < $length$$; $i$$++) { | |
if ($value$$ = $exports$$[$i$$], $__webpack_require__$$.call($elem$jscomp$3_module$$, $value$$, $i$$, $exports$$)) { | |
return $value$$; | |
} | |
} | |
}}); | |
document.addEventListener("DOMContentLoaded", function() { | |
document.execCommand("enableObjectResizing", !1, !1); | |
document.execCommand("autoUrlDetect", !1, !1); | |
}); | |
}, function($module$$, $exports$$) { | |
function $diff_main$$($diff_main$$, $diff_halfMatch_$$, $module$$) { | |
if ($diff_main$$ == $diff_halfMatch_$$) { | |
return $diff_main$$ ? [[0, $diff_main$$]] : []; | |
} | |
if (0 > $module$$ || $diff_main$$.length < $module$$) { | |
$module$$ = null; | |
} | |
var $diffs_text1$$ = $diff_commonPrefix$$($diff_main$$, $diff_halfMatch_$$), $text2$$ = $diff_main$$.substring(0, $diffs_text1$$); | |
$diff_main$$ = $diff_main$$.substring($diffs_text1$$); | |
$diff_halfMatch_$$ = $diff_halfMatch_$$.substring($diffs_text1$$); | |
$diffs_text1$$ = $diff_commonSuffix$$($diff_main$$, $diff_halfMatch_$$); | |
var $exports$$ = $diff_main$$.substring($diff_main$$.length - $diffs_text1$$); | |
$diff_main$$ = $diff_main$$.substring(0, $diff_main$$.length - $diffs_text1$$); | |
$diff_halfMatch_$$ = $diff_halfMatch_$$.substring(0, $diff_halfMatch_$$.length - $diffs_text1$$); | |
$diff_main$$ = $diff_compute_$$($diff_main$$, $diff_halfMatch_$$); | |
$text2$$ && $diff_main$$.unshift([0, $text2$$]); | |
$exports$$ && $diff_main$$.push([0, $exports$$]); | |
$diff_cleanupMerge$$($diff_main$$); | |
null != $module$$ && ($diff_main$$ = $fix_cursor$$($diff_main$$, $module$$)); | |
return $diff_main$$ = $fix_emoji$$($diff_main$$); | |
} | |
function $diff_compute_$$($diff_cleanupMerge$$, $fix_cursor$$) { | |
if (!$diff_cleanupMerge$$) { | |
return [[1, $fix_cursor$$]]; | |
} | |
if (!$fix_cursor$$) { | |
return [[-1, $diff_cleanupMerge$$]]; | |
} | |
var $module$$ = $diff_cleanupMerge$$.length > $fix_cursor$$.length ? $diff_cleanupMerge$$ : $fix_cursor$$; | |
var $fix_emoji$$ = $diff_cleanupMerge$$.length > $fix_cursor$$.length ? $fix_cursor$$ : $diff_cleanupMerge$$, $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ = $module$$.indexOf($fix_emoji$$); | |
if (-1 != $JSCompiler_inline_result$jscomp$17_mid_common_text1$$) { | |
return $module$$ = [[1, $module$$.substring(0, $JSCompiler_inline_result$jscomp$17_mid_common_text1$$)], [0, $fix_emoji$$], [1, $module$$.substring($JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + $fix_emoji$$.length)]], $diff_cleanupMerge$$.length > $fix_cursor$$.length && ($module$$[0][0] = $module$$[2][0] = -1), $module$$; | |
} | |
if (1 == $fix_emoji$$.length) { | |
return [[-1, $diff_cleanupMerge$$], [1, $fix_cursor$$]]; | |
} | |
if ($module$$ = $diff_halfMatch_$$($diff_cleanupMerge$$, $fix_cursor$$)) { | |
return $fix_cursor$$ = $module$$[1], $fix_emoji$$ = $module$$[3], $diff_cleanupMerge$$ = $module$$[4], $module$$ = $diff_main$$($module$$[0], $module$$[2]), $fix_cursor$$ = $diff_main$$($fix_cursor$$, $fix_emoji$$), $module$$.concat([[0, $diff_cleanupMerge$$]], $fix_cursor$$); | |
} | |
a: { | |
$module$$ = $diff_cleanupMerge$$.length; | |
$fix_emoji$$ = $fix_cursor$$.length; | |
$JSCompiler_inline_result$jscomp$17_mid_common_text1$$ = Math.ceil(($module$$ + $fix_emoji$$) / 2); | |
for (var $diffs_b_text1_b_text2$$ = 2 * $JSCompiler_inline_result$jscomp$17_mid_common_text1$$, $exports$$ = Array($diffs_b_text1_b_text2$$), $diff_commonSuffix$$ = Array($diffs_b_text1_b_text2$$), $diff_compute_$$ = 0; $diff_compute_$$ < $diffs_b_text1_b_text2$$; $diff_compute_$$++) { | |
$exports$$[$diff_compute_$$] = -1, $diff_commonSuffix$$[$diff_compute_$$] = -1; | |
} | |
$exports$$[$JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + 1] = 0; | |
$diff_commonSuffix$$[$JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + 1] = 0; | |
$diff_compute_$$ = $module$$ - $fix_emoji$$; | |
for (var $diff_commonPrefix$$ = 0 != $diff_compute_$$ % 2, $merge_tuples$$ = 0, $k1end$$ = 0, $k2start$$ = 0, $k2end$$ = 0, $d$$ = 0; $d$$ < $JSCompiler_inline_result$jscomp$17_mid_common_text1$$; $d$$++) { | |
for (var $k1$jscomp$inline_207_k2$$ = -$d$$ + $merge_tuples$$; $k1$jscomp$inline_207_k2$$ <= $d$$ - $k1end$$; $k1$jscomp$inline_207_k2$$ += 2) { | |
var $k1_offset$jscomp$inline_208_k2_offset$$ = $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + $k1$jscomp$inline_207_k2$$; | |
var $x1$jscomp$inline_209_y2$$ = $k1$jscomp$inline_207_k2$$ == -$d$$ || $k1$jscomp$inline_207_k2$$ != $d$$ && $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$ - 1] < $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$ + 1] ? $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$ + 1] : $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$ - 1] + 1; | |
for (var $y1$$ = $x1$jscomp$inline_209_y2$$ - $k1$jscomp$inline_207_k2$$; $x1$jscomp$inline_209_y2$$ < $module$$ && $y1$$ < $fix_emoji$$ && $diff_cleanupMerge$$.charAt($x1$jscomp$inline_209_y2$$) == $fix_cursor$$.charAt($y1$$);) { | |
$x1$jscomp$inline_209_y2$$++, $y1$$++; | |
} | |
$exports$$[$k1_offset$jscomp$inline_208_k2_offset$$] = $x1$jscomp$inline_209_y2$$; | |
if ($x1$jscomp$inline_209_y2$$ > $module$$) { | |
$k1end$$ += 2; | |
} else { | |
if ($y1$$ > $fix_emoji$$) { | |
$merge_tuples$$ += 2; | |
} else { | |
if ($diff_commonPrefix$$ && ($k1_offset$jscomp$inline_208_k2_offset$$ = $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + $diff_compute_$$ - $k1$jscomp$inline_207_k2$$, 0 <= $k1_offset$jscomp$inline_208_k2_offset$$ && $k1_offset$jscomp$inline_208_k2_offset$$ < $diffs_b_text1_b_text2$$ && -1 != $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$])) { | |
var $x2$$ = $module$$ - $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$]; | |
if ($x1$jscomp$inline_209_y2$$ >= $x2$$) { | |
$diff_cleanupMerge$$ = $diff_bisectSplit_$$($diff_cleanupMerge$$, $fix_cursor$$, $x1$jscomp$inline_209_y2$$, $y1$$); | |
break a; | |
} | |
} | |
} | |
} | |
} | |
for ($k1$jscomp$inline_207_k2$$ = -$d$$ + $k2start$$; $k1$jscomp$inline_207_k2$$ <= $d$$ - $k2end$$; $k1$jscomp$inline_207_k2$$ += 2) { | |
$k1_offset$jscomp$inline_208_k2_offset$$ = $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + $k1$jscomp$inline_207_k2$$; | |
$x2$$ = $k1$jscomp$inline_207_k2$$ == -$d$$ || $k1$jscomp$inline_207_k2$$ != $d$$ && $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$ - 1] < $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$ + 1] ? $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$ + 1] : $diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$ - 1] + 1; | |
for ($x1$jscomp$inline_209_y2$$ = $x2$$ - $k1$jscomp$inline_207_k2$$; $x2$$ < $module$$ && $x1$jscomp$inline_209_y2$$ < $fix_emoji$$ && $diff_cleanupMerge$$.charAt($module$$ - $x2$$ - 1) == $fix_cursor$$.charAt($fix_emoji$$ - $x1$jscomp$inline_209_y2$$ - 1);) { | |
$x2$$++, $x1$jscomp$inline_209_y2$$++; | |
} | |
$diff_commonSuffix$$[$k1_offset$jscomp$inline_208_k2_offset$$] = $x2$$; | |
if ($x2$$ > $module$$) { | |
$k2end$$ += 2; | |
} else { | |
if ($x1$jscomp$inline_209_y2$$ > $fix_emoji$$) { | |
$k2start$$ += 2; | |
} else { | |
if (!$diff_commonPrefix$$ && ($k1_offset$jscomp$inline_208_k2_offset$$ = $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + $diff_compute_$$ - $k1$jscomp$inline_207_k2$$, 0 <= $k1_offset$jscomp$inline_208_k2_offset$$ && $k1_offset$jscomp$inline_208_k2_offset$$ < $diffs_b_text1_b_text2$$ && -1 != $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$] && ($x1$jscomp$inline_209_y2$$ = $exports$$[$k1_offset$jscomp$inline_208_k2_offset$$], $y1$$ = $JSCompiler_inline_result$jscomp$17_mid_common_text1$$ + | |
$x1$jscomp$inline_209_y2$$ - $k1_offset$jscomp$inline_208_k2_offset$$, $x2$$ = $module$$ - $x2$$, $x1$jscomp$inline_209_y2$$ >= $x2$$))) { | |
$diff_cleanupMerge$$ = $diff_bisectSplit_$$($diff_cleanupMerge$$, $fix_cursor$$, $x1$jscomp$inline_209_y2$$, $y1$$); | |
break a; | |
} | |
} | |
} | |
} | |
} | |
$diff_cleanupMerge$$ = [[-1, $diff_cleanupMerge$$], [1, $fix_cursor$$]]; | |
} | |
return $diff_cleanupMerge$$; | |
} | |
function $diff_bisectSplit_$$($diff_cleanupMerge$$, $fix_cursor$$, $diff_halfMatch_$$, $module$$) { | |
var $fix_emoji$$ = $diff_cleanupMerge$$.substring(0, $diff_halfMatch_$$), $text1$$ = $fix_cursor$$.substring(0, $module$$); | |
$diff_cleanupMerge$$ = $diff_cleanupMerge$$.substring($diff_halfMatch_$$); | |
$fix_cursor$$ = $fix_cursor$$.substring($module$$); | |
$fix_emoji$$ = $diff_main$$($fix_emoji$$, $text1$$); | |
$text1$$ = $diff_main$$($diff_cleanupMerge$$, $fix_cursor$$); | |
return $fix_emoji$$.concat($text1$$); | |
} | |
function $diff_commonPrefix$$($diff_cleanupMerge$$, $fix_cursor$$) { | |
if (!$diff_cleanupMerge$$ || !$fix_cursor$$ || $diff_cleanupMerge$$.charAt(0) != $fix_cursor$$.charAt(0)) { | |
return 0; | |
} | |
for (var $diff_main$$ = 0, $diff_halfMatch_$$ = Math.min($diff_cleanupMerge$$.length, $fix_cursor$$.length), $module$$ = $diff_halfMatch_$$, $fix_emoji$$ = 0; $diff_main$$ < $module$$;) { | |
$diff_cleanupMerge$$.substring($fix_emoji$$, $module$$) == $fix_cursor$$.substring($fix_emoji$$, $module$$) ? $fix_emoji$$ = $diff_main$$ = $module$$ : $diff_halfMatch_$$ = $module$$, $module$$ = Math.floor(($diff_halfMatch_$$ - $diff_main$$) / 2 + $diff_main$$); | |
} | |
return $module$$; | |
} | |
function $diff_commonSuffix$$($diff_cleanupMerge$$, $fix_cursor$$) { | |
if (!$diff_cleanupMerge$$ || !$fix_cursor$$ || $diff_cleanupMerge$$.charAt($diff_cleanupMerge$$.length - 1) != $fix_cursor$$.charAt($fix_cursor$$.length - 1)) { | |
return 0; | |
} | |
for (var $diff_main$$ = 0, $diff_halfMatch_$$ = Math.min($diff_cleanupMerge$$.length, $fix_cursor$$.length), $module$$ = $diff_halfMatch_$$, $fix_emoji$$ = 0; $diff_main$$ < $module$$;) { | |
$diff_cleanupMerge$$.substring($diff_cleanupMerge$$.length - $module$$, $diff_cleanupMerge$$.length - $fix_emoji$$) == $fix_cursor$$.substring($fix_cursor$$.length - $module$$, $fix_cursor$$.length - $fix_emoji$$) ? $fix_emoji$$ = $diff_main$$ = $module$$ : $diff_halfMatch_$$ = $module$$, $module$$ = Math.floor(($diff_halfMatch_$$ - $diff_main$$) / 2 + $diff_main$$); | |
} | |
return $module$$; | |
} | |
function $diff_halfMatch_$$($diff_cleanupMerge$$, $fix_cursor$$) { | |
function $diff_main$$($diff_cleanupMerge$$, $fix_cursor$$, $diff_main$$) { | |
for (var $diff_halfMatch_$$ = $diff_cleanupMerge$$.substring($diff_main$$, $diff_main$$ + Math.floor($diff_cleanupMerge$$.length / 4)), $module$$ = -1, $fix_emoji$$ = "", $text1$jscomp$6_text1_a$$, $exports$$, $text1_b$jscomp$1_text2$$, $diff_compute_$$; -1 != ($module$$ = $fix_cursor$$.indexOf($diff_halfMatch_$$, $module$$ + 1));) { | |
var $diff_halfMatchI_$$ = $diff_commonPrefix$$($diff_cleanupMerge$$.substring($diff_main$$), $fix_cursor$$.substring($module$$)), $shorttext$jscomp$1_text2_b$$ = $diff_commonSuffix$$($diff_cleanupMerge$$.substring(0, $diff_main$$), $fix_cursor$$.substring(0, $module$$)); | |
$fix_emoji$$.length < $shorttext$jscomp$1_text2_b$$ + $diff_halfMatchI_$$ && ($fix_emoji$$ = $fix_cursor$$.substring($module$$ - $shorttext$jscomp$1_text2_b$$, $module$$) + $fix_cursor$$.substring($module$$, $module$$ + $diff_halfMatchI_$$), $text1$jscomp$6_text1_a$$ = $diff_cleanupMerge$$.substring(0, $diff_main$$ - $shorttext$jscomp$1_text2_b$$), $exports$$ = $diff_cleanupMerge$$.substring($diff_main$$ + $diff_halfMatchI_$$), $text1_b$jscomp$1_text2$$ = $fix_cursor$$.substring(0, $module$$ - | |
$shorttext$jscomp$1_text2_b$$), $diff_compute_$$ = $fix_cursor$$.substring($module$$ + $diff_halfMatchI_$$)); | |
} | |
return 2 * $fix_emoji$$.length >= $diff_cleanupMerge$$.length ? [$text1$jscomp$6_text1_a$$, $exports$$, $text1_b$jscomp$1_text2$$, $diff_compute_$$, $fix_emoji$$] : null; | |
} | |
var $diff_halfMatch_$$ = $diff_cleanupMerge$$.length > $fix_cursor$$.length ? $diff_cleanupMerge$$ : $fix_cursor$$, $module$$ = $diff_cleanupMerge$$.length > $fix_cursor$$.length ? $fix_cursor$$ : $diff_cleanupMerge$$; | |
if (4 > $diff_halfMatch_$$.length || 2 * $module$$.length < $diff_halfMatch_$$.length) { | |
return null; | |
} | |
var $fix_emoji$$ = $diff_main$$($diff_halfMatch_$$, $module$$, Math.ceil($diff_halfMatch_$$.length / 4)); | |
$diff_halfMatch_$$ = $diff_main$$($diff_halfMatch_$$, $module$$, Math.ceil($diff_halfMatch_$$.length / 2)); | |
if ($fix_emoji$$ || $diff_halfMatch_$$) { | |
$fix_emoji$$ = $diff_halfMatch_$$ ? $fix_emoji$$ ? $fix_emoji$$[4].length > $diff_halfMatch_$$[4].length ? $fix_emoji$$ : $diff_halfMatch_$$ : $diff_halfMatch_$$ : $fix_emoji$$; | |
} else { | |
return null; | |
} | |
$diff_cleanupMerge$$.length > $fix_cursor$$.length ? ($diff_cleanupMerge$$ = $fix_emoji$$[0], $fix_cursor$$ = $fix_emoji$$[1], $diff_halfMatch_$$ = $fix_emoji$$[2], $module$$ = $fix_emoji$$[3]) : ($diff_halfMatch_$$ = $fix_emoji$$[0], $module$$ = $fix_emoji$$[1], $diff_cleanupMerge$$ = $fix_emoji$$[2], $fix_cursor$$ = $fix_emoji$$[3]); | |
return [$diff_cleanupMerge$$, $fix_cursor$$, $diff_halfMatch_$$, $module$$, $fix_emoji$$[4]]; | |
} | |
function $diff_cleanupMerge$$($fix_cursor$$) { | |
$fix_cursor$$.push([0, ""]); | |
for (var $diff_main$$ = 0, $diff_halfMatch_$$ = 0, $module$$ = 0, $fix_emoji$$ = "", $diffs$$ = "", $exports$$; $diff_main$$ < $fix_cursor$$.length;) { | |
switch($fix_cursor$$[$diff_main$$][0]) { | |
case 1: | |
$module$$++; | |
$diffs$$ += $fix_cursor$$[$diff_main$$][1]; | |
$diff_main$$++; | |
break; | |
case -1: | |
$diff_halfMatch_$$++; | |
$fix_emoji$$ += $fix_cursor$$[$diff_main$$][1]; | |
$diff_main$$++; | |
break; | |
case 0: | |
1 < $diff_halfMatch_$$ + $module$$ ? (0 !== $diff_halfMatch_$$ && 0 !== $module$$ && ($exports$$ = $diff_commonPrefix$$($diffs$$, $fix_emoji$$), 0 !== $exports$$ && (0 < $diff_main$$ - $diff_halfMatch_$$ - $module$$ && 0 == $fix_cursor$$[$diff_main$$ - $diff_halfMatch_$$ - $module$$ - 1][0] ? $fix_cursor$$[$diff_main$$ - $diff_halfMatch_$$ - $module$$ - 1][1] += $diffs$$.substring(0, $exports$$) : ($fix_cursor$$.splice(0, 0, [0, $diffs$$.substring(0, $exports$$)]), $diff_main$$++), | |
$diffs$$ = $diffs$$.substring($exports$$), $fix_emoji$$ = $fix_emoji$$.substring($exports$$)), $exports$$ = $diff_commonSuffix$$($diffs$$, $fix_emoji$$), 0 !== $exports$$ && ($fix_cursor$$[$diff_main$$][1] = $diffs$$.substring($diffs$$.length - $exports$$) + $fix_cursor$$[$diff_main$$][1], $diffs$$ = $diffs$$.substring(0, $diffs$$.length - $exports$$), $fix_emoji$$ = $fix_emoji$$.substring(0, $fix_emoji$$.length - $exports$$))), 0 === $diff_halfMatch_$$ ? $fix_cursor$$.splice($diff_main$$ - | |
$module$$, $diff_halfMatch_$$ + $module$$, [1, $diffs$$]) : 0 === $module$$ ? $fix_cursor$$.splice($diff_main$$ - $diff_halfMatch_$$, $diff_halfMatch_$$ + $module$$, [-1, $fix_emoji$$]) : $fix_cursor$$.splice($diff_main$$ - $diff_halfMatch_$$ - $module$$, $diff_halfMatch_$$ + $module$$, [-1, $fix_emoji$$], [1, $diffs$$]), $diff_main$$ = $diff_main$$ - $diff_halfMatch_$$ - $module$$ + ($diff_halfMatch_$$ ? 1 : 0) + ($module$$ ? 1 : 0) + 1) : 0 !== $diff_main$$ && 0 == $fix_cursor$$[$diff_main$$ - | |
1][0] ? ($fix_cursor$$[$diff_main$$ - 1][1] += $fix_cursor$$[$diff_main$$][1], $fix_cursor$$.splice($diff_main$$, 1)) : $diff_main$$++, $diff_halfMatch_$$ = $module$$ = 0, $diffs$$ = $fix_emoji$$ = ""; | |
} | |
} | |
"" === $fix_cursor$$[$fix_cursor$$.length - 1][1] && $fix_cursor$$.pop(); | |
$diff_halfMatch_$$ = !1; | |
for ($diff_main$$ = 1; $diff_main$$ < $fix_cursor$$.length - 1;) { | |
0 == $fix_cursor$$[$diff_main$$ - 1][0] && 0 == $fix_cursor$$[$diff_main$$ + 1][0] && ($fix_cursor$$[$diff_main$$][1].substring($fix_cursor$$[$diff_main$$][1].length - $fix_cursor$$[$diff_main$$ - 1][1].length) == $fix_cursor$$[$diff_main$$ - 1][1] ? ($fix_cursor$$[$diff_main$$][1] = $fix_cursor$$[$diff_main$$ - 1][1] + $fix_cursor$$[$diff_main$$][1].substring(0, $fix_cursor$$[$diff_main$$][1].length - $fix_cursor$$[$diff_main$$ - 1][1].length), $fix_cursor$$[$diff_main$$ + 1][1] = $fix_cursor$$[$diff_main$$ - | |
1][1] + $fix_cursor$$[$diff_main$$ + 1][1], $fix_cursor$$.splice($diff_main$$ - 1, 1), $diff_halfMatch_$$ = !0) : $fix_cursor$$[$diff_main$$][1].substring(0, $fix_cursor$$[$diff_main$$ + 1][1].length) == $fix_cursor$$[$diff_main$$ + 1][1] && ($fix_cursor$$[$diff_main$$ - 1][1] += $fix_cursor$$[$diff_main$$ + 1][1], $fix_cursor$$[$diff_main$$][1] = $fix_cursor$$[$diff_main$$][1].substring($fix_cursor$$[$diff_main$$ + 1][1].length) + $fix_cursor$$[$diff_main$$ + 1][1], $fix_cursor$$.splice($diff_main$$ + | |
1, 1), $diff_halfMatch_$$ = !0)), $diff_main$$++; | |
} | |
$diff_halfMatch_$$ && $diff_cleanupMerge$$($fix_cursor$$); | |
} | |
function $fix_cursor$$($diff_cleanupMerge$$, $fix_cursor$$) { | |
a: { | |
var $diff_main$$ = $diff_cleanupMerge$$; | |
if (0 === $fix_cursor$$) { | |
var $diff_halfMatch_$$ = [0, $diff_main$$]; | |
} else { | |
var $module$$ = 0; | |
for ($diff_halfMatch_$$ = 0; $diff_halfMatch_$$ < $diff_main$$.length; $diff_halfMatch_$$++) { | |
var $fix_emoji$$ = $diff_main$$[$diff_halfMatch_$$]; | |
if (-1 === $fix_emoji$$[0] || 0 === $fix_emoji$$[0]) { | |
var $diffs$jscomp$5_suffix$$ = $module$$ + $fix_emoji$$[1].length; | |
if ($fix_cursor$$ === $diffs$jscomp$5_suffix$$) { | |
$diff_halfMatch_$$ = [$diff_halfMatch_$$ + 1, $diff_main$$]; | |
break a; | |
} else { | |
if ($fix_cursor$$ < $diffs$jscomp$5_suffix$$) { | |
$diff_main$$ = $diff_main$$.slice(); | |
$module$$ = $fix_cursor$$ - $module$$; | |
$fix_cursor$$ = [$fix_emoji$$[0], $fix_emoji$$[1].slice(0, $module$$)]; | |
$fix_emoji$$ = [$fix_emoji$$[0], $fix_emoji$$[1].slice($module$$)]; | |
$diff_main$$.splice($diff_halfMatch_$$, 1, $fix_cursor$$, $fix_emoji$$); | |
$diff_halfMatch_$$ = [$diff_halfMatch_$$ + 1, $diff_main$$]; | |
break a; | |
} else { | |
$module$$ = $diffs$jscomp$5_suffix$$; | |
} | |
} | |
} | |
} | |
throw Error("cursor_pos is out of bounds!"); | |
} | |
} | |
$diff_main$$ = $diff_halfMatch_$$[1]; | |
$diff_halfMatch_$$ = $diff_halfMatch_$$[0]; | |
$fix_cursor$$ = $diff_main$$[$diff_halfMatch_$$]; | |
$fix_emoji$$ = $diff_main$$[$diff_halfMatch_$$ + 1]; | |
return null == $fix_cursor$$ || 0 !== $fix_cursor$$[0] ? $diff_cleanupMerge$$ : null != $fix_emoji$$ && $fix_cursor$$[1] + $fix_emoji$$[1] === $fix_emoji$$[1] + $fix_cursor$$[1] ? ($diff_main$$.splice($diff_halfMatch_$$, 2, $fix_emoji$$, $fix_cursor$$), $merge_tuples$$($diff_main$$, $diff_halfMatch_$$, 2)) : null != $fix_emoji$$ && 0 === $fix_emoji$$[1].indexOf($fix_cursor$$[1]) ? ($diff_main$$.splice($diff_halfMatch_$$, 2, [$fix_emoji$$[0], $fix_cursor$$[1]], [0, $fix_cursor$$[1]]), $diff_cleanupMerge$$ = | |
$fix_emoji$$[1].slice($fix_cursor$$[1].length), 0 < $diff_cleanupMerge$$.length && $diff_main$$.splice($diff_halfMatch_$$ + 2, 0, [$fix_emoji$$[0], $diff_cleanupMerge$$]), $merge_tuples$$($diff_main$$, $diff_halfMatch_$$, 3)) : $diff_cleanupMerge$$; | |
} | |
function $fix_emoji$$($diff_cleanupMerge$$) { | |
for (var $fix_cursor$$ = !1, $diff_main$$ = function($diff_cleanupMerge$$) { | |
return 56320 <= $diff_cleanupMerge$$.charCodeAt(0) && 57343 >= $diff_cleanupMerge$$.charCodeAt(0); | |
}, $diff_halfMatch_$$ = function($diff_cleanupMerge$$) { | |
return 55296 <= $diff_cleanupMerge$$.charCodeAt($diff_cleanupMerge$$.length - 1) && 56319 >= $diff_cleanupMerge$$.charCodeAt($diff_cleanupMerge$$.length - 1); | |
}, $module$$ = 2; $module$$ < $diff_cleanupMerge$$.length; $module$$ += 1) { | |
0 === $diff_cleanupMerge$$[$module$$ - 2][0] && $diff_halfMatch_$$($diff_cleanupMerge$$[$module$$ - 2][1]) && -1 === $diff_cleanupMerge$$[$module$$ - 1][0] && $diff_main$$($diff_cleanupMerge$$[$module$$ - 1][1]) && 1 === $diff_cleanupMerge$$[$module$$][0] && $diff_main$$($diff_cleanupMerge$$[$module$$][1]) && ($fix_cursor$$ = !0, $diff_cleanupMerge$$[$module$$ - 1][1] = $diff_cleanupMerge$$[$module$$ - 2][1].slice(-1) + $diff_cleanupMerge$$[$module$$ - 1][1], $diff_cleanupMerge$$[$module$$][1] = | |
$diff_cleanupMerge$$[$module$$ - 2][1].slice(-1) + $diff_cleanupMerge$$[$module$$][1], $diff_cleanupMerge$$[$module$$ - 2][1] = $diff_cleanupMerge$$[$module$$ - 2][1].slice(0, -1)); | |
} | |
if (!$fix_cursor$$) { | |
return $diff_cleanupMerge$$; | |
} | |
$fix_cursor$$ = []; | |
for ($module$$ = 0; $module$$ < $diff_cleanupMerge$$.length; $module$$ += 1) { | |
0 < $diff_cleanupMerge$$[$module$$][1].length && $fix_cursor$$.push($diff_cleanupMerge$$[$module$$]); | |
} | |
return $fix_cursor$$; | |
} | |
function $merge_tuples$$($diff_cleanupMerge$$, $fix_cursor$$, $diff_main$$) { | |
for ($diff_main$$ = $fix_cursor$$ + $diff_main$$ - 1; 0 <= $diff_main$$ && $diff_main$$ >= $fix_cursor$$ - 1; $diff_main$$--) { | |
if ($diff_main$$ + 1 < $diff_cleanupMerge$$.length) { | |
var $diff_halfMatch_$$ = $diff_cleanupMerge$$[$diff_main$$], $module$$ = $diff_cleanupMerge$$[$diff_main$$ + 1]; | |
$diff_halfMatch_$$[0] === $module$$[1] && $diff_cleanupMerge$$.splice($diff_main$$, 2, [$diff_halfMatch_$$[0], $diff_halfMatch_$$[1] + $module$$[1]]); | |
} | |
} | |
return $diff_cleanupMerge$$; | |
} | |
$diff_main$$.INSERT = 1; | |
$diff_main$$.DELETE = -1; | |
$diff_main$$.EQUAL = 0; | |
$module$$.exports = $diff_main$$; | |
}, function($module$$, $exports$$) { | |
function $shim$$($shim$$) { | |
var $module$$ = [], $exports$$; | |
for ($exports$$ in $shim$$) { | |
$module$$.push($exports$$); | |
} | |
return $module$$; | |
} | |
$exports$$ = $module$$.exports = "function" === typeof Object.keys ? Object.keys : $shim$$; | |
$exports$$.shim = $shim$$; | |
}, function($module$$, $exports$$) { | |
function $supported$$($supported$$) { | |
return "[object Arguments]" == Object.prototype.toString.call($supported$$); | |
} | |
function $unsupported$$($supported$$) { | |
return $supported$$ && "object" == typeof $supported$$ && "number" == typeof $supported$$.length && Object.prototype.hasOwnProperty.call($supported$$, "callee") && !Object.prototype.propertyIsEnumerable.call($supported$$, "callee") || !1; | |
} | |
$exports$$ = "[object Arguments]" == function() { | |
return Object.prototype.toString.call(arguments); | |
}(); | |
$exports$$ = $module$$.exports = $exports$$ ? $supported$$ : $unsupported$$; | |
$exports$$.supported = $supported$$; | |
$exports$$.unsupported = $unsupported$$; | |
}, function($module$$, $exports$$) { | |
function $Events$$() { | |
} | |
function $EE$$($Events$$, $context$$, $once$$) { | |
this.fn = $Events$$; | |
this.context = $context$$; | |
this.once = $once$$ || !1; | |
} | |
function $EventEmitter$$() { | |
this._events = new $Events$$; | |
this._eventsCount = 0; | |
} | |
var $has$$ = Object.prototype.hasOwnProperty, $prefix$$ = "~"; | |
Object.create && ($Events$$.prototype = Object.create(null), (new $Events$$).__proto__ || ($prefix$$ = !1)); | |
$EventEmitter$$.prototype.eventNames = function() { | |
var $Events$$ = [], $events$$, $name$$; | |
if (0 === this._eventsCount) { | |
return $Events$$; | |
} | |
for ($name$$ in $events$$ = this._events) { | |
$has$$.call($events$$, $name$$) && $Events$$.push($prefix$$ ? $name$$.slice(1) : $name$$); | |
} | |
return Object.getOwnPropertySymbols ? $Events$$.concat(Object.getOwnPropertySymbols($events$$)) : $Events$$; | |
}; | |
$EventEmitter$$.prototype.listeners = function($Events$$, $exists_i$$) { | |
$Events$$ = this._events[$prefix$$ ? $prefix$$ + $Events$$ : $Events$$]; | |
if ($exists_i$$) { | |
return !!$Events$$; | |
} | |
if (!$Events$$) { | |
return []; | |
} | |
if ($Events$$.fn) { | |
return [$Events$$.fn]; | |
} | |
$exists_i$$ = 0; | |
for (var $l$$ = $Events$$.length, $available_event$$ = Array($l$$); $exists_i$$ < $l$$; $exists_i$$++) { | |
$available_event$$[$exists_i$$] = $Events$$[$exists_i$$].fn; | |
} | |
return $available_event$$; | |
}; | |
$EventEmitter$$.prototype.emit = function($Events$$, $a1$$, $a2$$, $module$$, $exports$$, $a5$$) { | |
var $event$$ = $prefix$$ ? $prefix$$ + $Events$$ : $Events$$; | |
if (!this._events[$event$$]) { | |
return !1; | |
} | |
$event$$ = this._events[$event$$]; | |
var $a3$$ = arguments.length, $EE$$; | |
if ($event$$.fn) { | |
$event$$.once && this.removeListener($Events$$, $event$$.fn, void 0, !0); | |
switch($a3$$) { | |
case 1: | |
return $event$$.fn.call($event$$.context), !0; | |
case 2: | |
return $event$$.fn.call($event$$.context, $a1$$), !0; | |
case 3: | |
return $event$$.fn.call($event$$.context, $a1$$, $a2$$), !0; | |
case 4: | |
return $event$$.fn.call($event$$.context, $a1$$, $a2$$, $module$$), !0; | |
case 5: | |
return $event$$.fn.call($event$$.context, $a1$$, $a2$$, $module$$, $exports$$), !0; | |
case 6: | |
return $event$$.fn.call($event$$.context, $a1$$, $a2$$, $module$$, $exports$$, $a5$$), !0; | |
} | |
var $has$$ = 1; | |
for ($EE$$ = Array($a3$$ - 1); $has$$ < $a3$$; $has$$++) { | |
$EE$$[$has$$ - 1] = arguments[$has$$]; | |
} | |
$event$$.fn.apply($event$$.context, $EE$$); | |
} else { | |
var $a4$$ = $event$$.length; | |
for ($has$$ = 0; $has$$ < $a4$$; $has$$++) { | |
switch($event$$[$has$$].once && this.removeListener($Events$$, $event$$[$has$$].fn, void 0, !0), $a3$$) { | |
case 1: | |
$event$$[$has$$].fn.call($event$$[$has$$].context); | |
break; | |
case 2: | |
$event$$[$has$$].fn.call($event$$[$has$$].context, $a1$$); | |
break; | |
case 3: | |
$event$$[$has$$].fn.call($event$$[$has$$].context, $a1$$, $a2$$); | |
break; | |
case 4: | |
$event$$[$has$$].fn.call($event$$[$has$$].context, $a1$$, $a2$$, $module$$); | |
break; | |
default: | |
if (!$EE$$) { | |
var $EventEmitter$$ = 1; | |
for ($EE$$ = Array($a3$$ - 1); $EventEmitter$$ < $a3$$; $EventEmitter$$++) { | |
$EE$$[$EventEmitter$$ - 1] = arguments[$EventEmitter$$]; | |
} | |
} | |
$event$$[$has$$].fn.apply($event$$[$has$$].context, $EE$$); | |
} | |
} | |
} | |
return !0; | |
}; | |
$EventEmitter$$.prototype.on = function($Events$$, $fn$jscomp$1_listener$$, $context$$) { | |
$fn$jscomp$1_listener$$ = new $EE$$($fn$jscomp$1_listener$$, $context$$ || this); | |
$Events$$ = $prefix$$ ? $prefix$$ + $Events$$ : $Events$$; | |
this._events[$Events$$] ? this._events[$Events$$].fn ? this._events[$Events$$] = [this._events[$Events$$], $fn$jscomp$1_listener$$] : this._events[$Events$$].push($fn$jscomp$1_listener$$) : (this._events[$Events$$] = $fn$jscomp$1_listener$$, this._eventsCount++); | |
return this; | |
}; | |
$EventEmitter$$.prototype.once = function($Events$$, $fn$jscomp$2_listener$$, $context$$) { | |
$fn$jscomp$2_listener$$ = new $EE$$($fn$jscomp$2_listener$$, $context$$ || this, !0); | |
$Events$$ = $prefix$$ ? $prefix$$ + $Events$$ : $Events$$; | |
this._events[$Events$$] ? this._events[$Events$$].fn ? this._events[$Events$$] = [this._events[$Events$$], $fn$jscomp$2_listener$$] : this._events[$Events$$].push($fn$jscomp$2_listener$$) : (this._events[$Events$$] = $fn$jscomp$2_listener$$, this._eventsCount++); | |
return this; | |
}; | |
$EventEmitter$$.prototype.removeListener = function($event$jscomp$7_evt$$, $fn$$, $context$$, $module$$) { | |
$event$jscomp$7_evt$$ = $prefix$$ ? $prefix$$ + $event$jscomp$7_evt$$ : $event$jscomp$7_evt$$; | |
if (!this._events[$event$jscomp$7_evt$$]) { | |
return this; | |
} | |
if (!$fn$$) { | |
return 0 === --this._eventsCount ? this._events = new $Events$$ : delete this._events[$event$jscomp$7_evt$$], this; | |
} | |
var $once$$ = this._events[$event$jscomp$7_evt$$]; | |
if ($once$$.fn) { | |
$once$$.fn !== $fn$$ || $module$$ && !$once$$.once || $context$$ && $once$$.context !== $context$$ || (0 === --this._eventsCount ? this._events = new $Events$$ : delete this._events[$event$jscomp$7_evt$$]); | |
} else { | |
for (var $exports$$ = 0, $EE$$ = [], $has$$ = $once$$.length; $exports$$ < $has$$; $exports$$++) { | |
($once$$[$exports$$].fn !== $fn$$ || $module$$ && !$once$$[$exports$$].once || $context$$ && $once$$[$exports$$].context !== $context$$) && $EE$$.push($once$$[$exports$$]); | |
} | |
$EE$$.length ? this._events[$event$jscomp$7_evt$$] = 1 === $EE$$.length ? $EE$$[0] : $EE$$ : 0 === --this._eventsCount ? this._events = new $Events$$ : delete this._events[$event$jscomp$7_evt$$]; | |
} | |
return this; | |
}; | |
$EventEmitter$$.prototype.removeAllListeners = function($event$jscomp$8_evt$$) { | |
$event$jscomp$8_evt$$ ? ($event$jscomp$8_evt$$ = $prefix$$ ? $prefix$$ + $event$jscomp$8_evt$$ : $event$jscomp$8_evt$$, this._events[$event$jscomp$8_evt$$] && (0 === --this._eventsCount ? this._events = new $Events$$ : delete this._events[$event$jscomp$8_evt$$])) : (this._events = new $Events$$, this._eventsCount = 0); | |
return this; | |
}; | |
$EventEmitter$$.prototype.off = $EventEmitter$$.prototype.removeListener; | |
$EventEmitter$$.prototype.addListener = $EventEmitter$$.prototype.on; | |
$EventEmitter$$.prototype.setMaxListeners = function() { | |
return this; | |
}; | |
$EventEmitter$$.prefixed = $prefix$$; | |
$EventEmitter$$.EventEmitter = $EventEmitter$$; | |
"undefined" !== typeof $module$$ && ($module$$.exports = $EventEmitter$$); | |
}, function($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, $exports$$, $Clipboard___webpack_require__$$) { | |
function $_interopRequireDefault$$($computeStyle$$) { | |
return $computeStyle$$ && $computeStyle$$.__esModule ? $computeStyle$$ : {default:$computeStyle$$}; | |
} | |
function $_defineProperty$$($computeStyle$$, $deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
$deltaEndsWith$$ in $computeStyle$$ ? Object.defineProperty($computeStyle$$, $deltaEndsWith$$, {value:$Clipboard___webpack_require__$$, enumerable:!0, configurable:!0, writable:!0}) : $computeStyle$$[$deltaEndsWith$$] = $Clipboard___webpack_require__$$; | |
return $computeStyle$$; | |
} | |
function $_possibleConstructorReturn$$($computeStyle$$, $deltaEndsWith$$) { | |
if (!$computeStyle$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$deltaEndsWith$$ || "object" !== typeof $deltaEndsWith$$ && "function" !== typeof $deltaEndsWith$$ ? $computeStyle$$ : $deltaEndsWith$$; | |
} | |
function $_inherits$$($computeStyle$$, $deltaEndsWith$$) { | |
if ("function" !== typeof $deltaEndsWith$$ && null !== $deltaEndsWith$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $deltaEndsWith$$); | |
} | |
$computeStyle$$.prototype = Object.create($deltaEndsWith$$ && $deltaEndsWith$$.prototype, {constructor:{value:$computeStyle$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$deltaEndsWith$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($computeStyle$$, $deltaEndsWith$$) : $computeStyle$$.__proto__ = $deltaEndsWith$$); | |
} | |
function $applyFormat$$($computeStyle$$, $deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
return "object" === ("undefined" === typeof $deltaEndsWith$$ ? "undefined" : $_typeof$$($deltaEndsWith$$)) ? Object.keys($deltaEndsWith$$).reduce(function($computeStyle$$, $Clipboard___webpack_require__$$) { | |
return $applyFormat$$($computeStyle$$, $Clipboard___webpack_require__$$, $deltaEndsWith$$[$Clipboard___webpack_require__$$]); | |
}, $computeStyle$$) : $computeStyle$$.reduce(function($computeStyle$$, $applyFormat$$) { | |
return $applyFormat$$.attributes && $applyFormat$$.attributes[$deltaEndsWith$$] ? $computeStyle$$.push($applyFormat$$) : $computeStyle$$.insert($applyFormat$$.insert, (0, $_extend3$$.default)({}, $_defineProperty$$({}, $deltaEndsWith$$, $Clipboard___webpack_require__$$), $applyFormat$$.attributes)); | |
}, new $_quillDelta2$$.default); | |
} | |
function $computeStyle$$($computeStyle$$) { | |
return $computeStyle$$.nodeType !== Node.ELEMENT_NODE ? {} : $computeStyle$$["__ql-computed-style"] || ($computeStyle$$["__ql-computed-style"] = window.getComputedStyle($computeStyle$$)); | |
} | |
function $deltaEndsWith$$($computeStyle$$, $deltaEndsWith$$) { | |
for (var $Clipboard___webpack_require__$$ = "", $applyFormat$$ = $computeStyle$$.ops.length - 1; 0 <= $applyFormat$$ && $Clipboard___webpack_require__$$.length < $deltaEndsWith$$.length; --$applyFormat$$) { | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $computeStyle$$.ops[$applyFormat$$]; | |
if ("string" !== typeof $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.insert) { | |
break; | |
} | |
$Clipboard___webpack_require__$$ = $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.insert + $Clipboard___webpack_require__$$; | |
} | |
return $Clipboard___webpack_require__$$.slice(-1 * $deltaEndsWith$$.length) === $deltaEndsWith$$; | |
} | |
function $isLine$$($deltaEndsWith$$) { | |
if (0 === $deltaEndsWith$$.childNodes.length) { | |
return !1; | |
} | |
$deltaEndsWith$$ = $computeStyle$$($deltaEndsWith$$); | |
return -1 < ["block", "list-item"].indexOf($deltaEndsWith$$.display); | |
} | |
function $traverse$$($computeStyle$$, $deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
return $computeStyle$$.nodeType === $computeStyle$$.TEXT_NODE ? $Clipboard___webpack_require__$$.reduce(function($deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
return $Clipboard___webpack_require__$$($computeStyle$$, $deltaEndsWith$$); | |
}, new $_quillDelta2$$.default) : $computeStyle$$.nodeType === $computeStyle$$.ELEMENT_NODE ? [].reduce.call($computeStyle$$.childNodes || [], function($applyFormat$$, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$) { | |
var $isLine$$ = $traverse$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, $deltaEndsWith$$, $Clipboard___webpack_require__$$); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.nodeType === $computeStyle$$.ELEMENT_NODE && ($isLine$$ = $deltaEndsWith$$.reduce(function($computeStyle$$, $deltaEndsWith$$) { | |
return $deltaEndsWith$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, $computeStyle$$); | |
}, $isLine$$), $isLine$$ = ($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$["__ql-matcher"] || []).reduce(function($computeStyle$$, $deltaEndsWith$$) { | |
return $deltaEndsWith$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, $computeStyle$$); | |
}, $isLine$$)); | |
return $applyFormat$$.concat($isLine$$); | |
}, new $_quillDelta2$$.default) : new $_quillDelta2$$.default; | |
} | |
function $matchAlias$$($computeStyle$$, $deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
return $applyFormat$$($Clipboard___webpack_require__$$, $computeStyle$$, !0); | |
} | |
function $matchAttributor$$($computeStyle$$, $deltaEndsWith$$) { | |
var $Clipboard___webpack_require__$$ = $_parchment2$$.default.Attributor.Attribute.keys($computeStyle$$), $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $_parchment2$$.default.Attributor.Class.keys($computeStyle$$), $isLine$$ = $_parchment2$$.default.Attributor.Style.keys($computeStyle$$), $exports$$ = {}; | |
$Clipboard___webpack_require__$$.concat($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$).concat($isLine$$).forEach(function($deltaEndsWith$$) { | |
var $Clipboard___webpack_require__$$ = $_parchment2$$.default.query($deltaEndsWith$$, $_parchment2$$.default.Scope.ATTRIBUTE); | |
if (null != $Clipboard___webpack_require__$$ && ($exports$$[$Clipboard___webpack_require__$$.attrName] = $Clipboard___webpack_require__$$.value($computeStyle$$), $exports$$[$Clipboard___webpack_require__$$.attrName])) { | |
return; | |
} | |
$Clipboard___webpack_require__$$ = $ATTRIBUTE_ATTRIBUTORS$$[$deltaEndsWith$$]; | |
null == $Clipboard___webpack_require__$$ || $Clipboard___webpack_require__$$.attrName !== $deltaEndsWith$$ && $Clipboard___webpack_require__$$.keyName !== $deltaEndsWith$$ || ($exports$$[$Clipboard___webpack_require__$$.attrName] = $Clipboard___webpack_require__$$.value($computeStyle$$) || void 0); | |
$Clipboard___webpack_require__$$ = $module$jscomp$0$$[$deltaEndsWith$$]; | |
null == $Clipboard___webpack_require__$$ || $Clipboard___webpack_require__$$.attrName !== $deltaEndsWith$$ && $Clipboard___webpack_require__$$.keyName !== $deltaEndsWith$$ || ($Clipboard___webpack_require__$$ = $module$jscomp$0$$[$deltaEndsWith$$], $exports$$[$Clipboard___webpack_require__$$.attrName] = $Clipboard___webpack_require__$$.value($computeStyle$$) || void 0); | |
}); | |
0 < Object.keys($exports$$).length && ($deltaEndsWith$$ = $applyFormat$$($deltaEndsWith$$, $exports$$)); | |
return $deltaEndsWith$$; | |
} | |
function $matchBlot$$($computeStyle$$, $deltaEndsWith$$) { | |
var $Clipboard___webpack_require__$$ = $_parchment2$$.default.query($computeStyle$$); | |
if (null == $Clipboard___webpack_require__$$) { | |
return $deltaEndsWith$$; | |
} | |
if ($Clipboard___webpack_require__$$.prototype instanceof $_parchment2$$.default.Embed) { | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = {}, $isLine$$ = $Clipboard___webpack_require__$$.value($computeStyle$$); | |
null != $isLine$$ && ($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$[$Clipboard___webpack_require__$$.blotName] = $isLine$$, $deltaEndsWith$$ = (new $_quillDelta2$$.default).insert($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, $Clipboard___webpack_require__$$.formats($computeStyle$$))); | |
} else { | |
"function" === typeof $Clipboard___webpack_require__$$.formats && ($deltaEndsWith$$ = $applyFormat$$($deltaEndsWith$$, $Clipboard___webpack_require__$$.blotName, $Clipboard___webpack_require__$$.formats($computeStyle$$))); | |
} | |
return $deltaEndsWith$$; | |
} | |
function $matchNewline$$($computeStyle$$, $Clipboard___webpack_require__$$) { | |
$deltaEndsWith$$($Clipboard___webpack_require__$$, "\n") || ($isLine$$($computeStyle$$) || 0 < $Clipboard___webpack_require__$$.length() && $computeStyle$$.nextSibling && $isLine$$($computeStyle$$.nextSibling)) && $Clipboard___webpack_require__$$.insert("\n"); | |
return $Clipboard___webpack_require__$$; | |
} | |
function $matchSpacing$$($Clipboard___webpack_require__$$, $applyFormat$$) { | |
if ($isLine$$($Clipboard___webpack_require__$$) && null != $Clipboard___webpack_require__$$.nextElementSibling && !$deltaEndsWith$$($applyFormat$$, "\n\n")) { | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$.offsetHeight + parseFloat($computeStyle$$($Clipboard___webpack_require__$$).marginTop) + parseFloat($computeStyle$$($Clipboard___webpack_require__$$).marginBottom); | |
$Clipboard___webpack_require__$$.nextElementSibling.offsetTop > $Clipboard___webpack_require__$$.offsetTop + 1.5 * $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ && $applyFormat$$.insert("\n"); | |
} | |
return $applyFormat$$; | |
} | |
function $matchText$$($deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
var $applyFormat$$ = $deltaEndsWith$$.data; | |
if ("O:P" === $deltaEndsWith$$.parentNode.tagName) { | |
return $Clipboard___webpack_require__$$.insert($applyFormat$$.trim()); | |
} | |
if (0 === $applyFormat$$.trim().length && $deltaEndsWith$$.parentNode.classList.contains("ql-clipboard")) { | |
return $Clipboard___webpack_require__$$; | |
} | |
if (!$computeStyle$$($deltaEndsWith$$.parentNode).whiteSpace.startsWith("pre")) { | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = function($computeStyle$$, $deltaEndsWith$$) { | |
$deltaEndsWith$$ = $deltaEndsWith$$.replace(/[^\u00a0]/g, ""); | |
return 1 > $deltaEndsWith$$.length && $computeStyle$$ ? " " : $deltaEndsWith$$; | |
}; | |
$applyFormat$$ = $applyFormat$$.replace(/\r\n/g, " ").replace(/\n/g, " "); | |
$applyFormat$$ = $applyFormat$$.replace(/\s\s+/g, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.bind($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, !0)); | |
if (null == $deltaEndsWith$$.previousSibling && $isLine$$($deltaEndsWith$$.parentNode) || null != $deltaEndsWith$$.previousSibling && $isLine$$($deltaEndsWith$$.previousSibling)) { | |
$applyFormat$$ = $applyFormat$$.replace(/^\s+/, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.bind($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, !1)); | |
} | |
if (null == $deltaEndsWith$$.nextSibling && $isLine$$($deltaEndsWith$$.parentNode) || null != $deltaEndsWith$$.nextSibling && $isLine$$($deltaEndsWith$$.nextSibling)) { | |
$applyFormat$$ = $applyFormat$$.replace(/\s+$/, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.bind($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$, !1)); | |
} | |
} | |
return $Clipboard___webpack_require__$$.insert($applyFormat$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.matchText = $exports$$.matchSpacing = $exports$$.matchNewline = $exports$$.matchBlot = $exports$$.matchAttributor = $exports$$.default = void 0; | |
var $_typeof$$ = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function($computeStyle$$) { | |
return typeof $computeStyle$$; | |
} : function($computeStyle$$) { | |
return $computeStyle$$ && "function" === typeof Symbol && $computeStyle$$.constructor === Symbol && $computeStyle$$ !== Symbol.prototype ? "symbol" : typeof $computeStyle$$; | |
}, $_slicedToArray$$ = function() { | |
return function($computeStyle$$, $deltaEndsWith$$) { | |
if (Array.isArray($computeStyle$$)) { | |
return $computeStyle$$; | |
} | |
if (Symbol.iterator in Object($computeStyle$$)) { | |
var $Clipboard___webpack_require__$$ = [], $applyFormat$$ = !0, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = !1, $isLine$$ = void 0; | |
try { | |
for (var $exports$$ = $computeStyle$$[Symbol.iterator](), $matchAlias$$; !($applyFormat$$ = ($matchAlias$$ = $exports$$.next()).done) && ($Clipboard___webpack_require__$$.push($matchAlias$$.value), !$deltaEndsWith$$ || $Clipboard___webpack_require__$$.length !== $deltaEndsWith$$); $applyFormat$$ = !0) { | |
} | |
} catch ($err$$) { | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = !0, $isLine$$ = $err$$; | |
} finally { | |
try { | |
if (!$applyFormat$$ && $exports$$["return"]) { | |
$exports$$["return"](); | |
} | |
} finally { | |
if ($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$) { | |
throw $isLine$$; | |
} | |
} | |
} | |
return $Clipboard___webpack_require__$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $computeStyle$$($computeStyle$$, $deltaEndsWith$$) { | |
for (var $Clipboard___webpack_require__$$ = 0; $Clipboard___webpack_require__$$ < $deltaEndsWith$$.length; $Clipboard___webpack_require__$$++) { | |
var $applyFormat$$ = $deltaEndsWith$$[$Clipboard___webpack_require__$$]; | |
$applyFormat$$.enumerable = $applyFormat$$.enumerable || !1; | |
$applyFormat$$.configurable = !0; | |
"value" in $applyFormat$$ && ($applyFormat$$.writable = !0); | |
Object.defineProperty($computeStyle$$, $applyFormat$$.key, $applyFormat$$); | |
} | |
} | |
return function($deltaEndsWith$$, $Clipboard___webpack_require__$$, $applyFormat$$) { | |
$Clipboard___webpack_require__$$ && $computeStyle$$($deltaEndsWith$$.prototype, $Clipboard___webpack_require__$$); | |
$applyFormat$$ && $computeStyle$$($deltaEndsWith$$, $applyFormat$$); | |
return $deltaEndsWith$$; | |
}; | |
}(); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$(3); | |
var $_extend3$$ = $_interopRequireDefault$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$(5); | |
var $_quill2$$ = $_interopRequireDefault$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $Clipboard___webpack_require__$$(10); | |
$_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $_interopRequireDefault$$($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$); | |
var $_module$jscomp$3__module2$$ = $Clipboard___webpack_require__$$(9); | |
$_module$jscomp$3__module2$$ = $_interopRequireDefault$$($_module$jscomp$3__module2$$); | |
var $_align$$ = $Clipboard___webpack_require__$$(36), $_background$$ = $Clipboard___webpack_require__$$(37), $_code$jscomp$2__color$$ = $Clipboard___webpack_require__$$(13), $_code2$$ = $_interopRequireDefault$$($_code$jscomp$2__color$$); | |
$_code$jscomp$2__color$$ = $Clipboard___webpack_require__$$(25); | |
var $_direction$$ = $Clipboard___webpack_require__$$(38), $_font$$ = $Clipboard___webpack_require__$$(39); | |
$Clipboard___webpack_require__$$ = $Clipboard___webpack_require__$$(40); | |
var $debug$$ = (0, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.default)("quill:clipboard"), $CLIPBOARD_CONFIG$$ = [[Node.TEXT_NODE, $matchText$$], [Node.TEXT_NODE, $matchNewline$$], ["br", function($computeStyle$$, $Clipboard___webpack_require__$$) { | |
$deltaEndsWith$$($Clipboard___webpack_require__$$, "\n") || $Clipboard___webpack_require__$$.insert("\n"); | |
return $Clipboard___webpack_require__$$; | |
}], [Node.ELEMENT_NODE, $matchNewline$$], [Node.ELEMENT_NODE, $matchBlot$$], [Node.ELEMENT_NODE, $matchSpacing$$], [Node.ELEMENT_NODE, $matchAttributor$$], [Node.ELEMENT_NODE, function($deltaEndsWith$$, $Clipboard___webpack_require__$$) { | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = {}, $isLine$$ = $deltaEndsWith$$.style || {}; | |
$isLine$$.fontStyle && "italic" === $computeStyle$$($deltaEndsWith$$).fontStyle && ($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.italic = !0); | |
$isLine$$.fontWeight && ($computeStyle$$($deltaEndsWith$$).fontWeight.startsWith("bold") || 700 <= parseInt($computeStyle$$($deltaEndsWith$$).fontWeight)) && ($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$.bold = !0); | |
0 < Object.keys($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$).length && ($Clipboard___webpack_require__$$ = $applyFormat$$($Clipboard___webpack_require__$$, $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$)); | |
0 < parseFloat($isLine$$.textIndent || 0) && ($Clipboard___webpack_require__$$ = (new $_quillDelta2$$.default).insert("\t").concat($Clipboard___webpack_require__$$)); | |
return $Clipboard___webpack_require__$$; | |
}], ["li", function($computeStyle$$, $Clipboard___webpack_require__$$) { | |
var $applyFormat$$ = $_parchment2$$.default.query($computeStyle$$); | |
if (null == $applyFormat$$ || "list-item" !== $applyFormat$$.blotName || !$deltaEndsWith$$($Clipboard___webpack_require__$$, "\n")) { | |
return $Clipboard___webpack_require__$$; | |
} | |
$applyFormat$$ = -1; | |
for ($computeStyle$$ = $computeStyle$$.parentNode; !$computeStyle$$.classList.contains("ql-clipboard");) { | |
"list" === ($_parchment2$$.default.query($computeStyle$$) || {}).blotName && ($applyFormat$$ += 1), $computeStyle$$ = $computeStyle$$.parentNode; | |
} | |
return 0 >= $applyFormat$$ ? $Clipboard___webpack_require__$$ : $Clipboard___webpack_require__$$.compose((new $_quillDelta2$$.default).retain($Clipboard___webpack_require__$$.length() - 1).retain(1, {indent:$applyFormat$$})); | |
}], ["b", $matchAlias$$.bind($matchAlias$$, "bold")], ["i", $matchAlias$$.bind($matchAlias$$, "italic")], ["style", function() { | |
return new $_quillDelta2$$.default; | |
}]], $ATTRIBUTE_ATTRIBUTORS$$ = [$_align$$.AlignAttribute, $_direction$$.DirectionAttribute].reduce(function($computeStyle$$, $deltaEndsWith$$) { | |
$computeStyle$$[$deltaEndsWith$$.keyName] = $deltaEndsWith$$; | |
return $computeStyle$$; | |
}, {}), $module$jscomp$0$$ = [$_align$$.AlignStyle, $_background$$.BackgroundStyle, $_code$jscomp$2__color$$.ColorStyle, $_direction$$.DirectionStyle, $_font$$.FontStyle, $Clipboard___webpack_require__$$.SizeStyle].reduce(function($computeStyle$$, $deltaEndsWith$$) { | |
$computeStyle$$[$deltaEndsWith$$.keyName] = $deltaEndsWith$$; | |
return $computeStyle$$; | |
}, {}); | |
$Clipboard___webpack_require__$$ = function($computeStyle$$) { | |
function $Clipboard___webpack_require__$$($computeStyle$$, $deltaEndsWith$$) { | |
if (!(this instanceof $Clipboard___webpack_require__$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $applyFormat$$ = $_possibleConstructorReturn$$(this, ($Clipboard___webpack_require__$$.__proto__ || Object.getPrototypeOf($Clipboard___webpack_require__$$)).call(this, $computeStyle$$, $deltaEndsWith$$)); | |
$applyFormat$$.quill.root.addEventListener("paste", $applyFormat$$.onPaste.bind($applyFormat$$)); | |
$applyFormat$$.container = $applyFormat$$.quill.addContainer("ql-clipboard"); | |
$applyFormat$$.container.setAttribute("contenteditable", !0); | |
$applyFormat$$.container.setAttribute("tabindex", -1); | |
$applyFormat$$.matchers = []; | |
$CLIPBOARD_CONFIG$$.concat($applyFormat$$.options.matchers).forEach(function($computeStyle$$) { | |
$computeStyle$$ = $_slicedToArray$$($computeStyle$$, 2); | |
var $Clipboard___webpack_require__$$ = $computeStyle$$[1]; | |
($deltaEndsWith$$.matchVisual || $Clipboard___webpack_require__$$ !== $matchSpacing$$) && $applyFormat$$.addMatcher($computeStyle$$[0], $Clipboard___webpack_require__$$); | |
}); | |
return $applyFormat$$; | |
} | |
$_inherits$$($Clipboard___webpack_require__$$, $computeStyle$$); | |
$_createClass$$($Clipboard___webpack_require__$$, [{key:"addMatcher", value:function($computeStyle$$, $deltaEndsWith$$) { | |
this.matchers.push([$computeStyle$$, $deltaEndsWith$$]); | |
}}, {key:"convert", value:function($computeStyle$$) { | |
if ("string" === typeof $computeStyle$$) { | |
return this.container.innerHTML = $computeStyle$$.replace(/>\r?\n +</g, "\x3e\x3c"), this.convert(); | |
} | |
$computeStyle$$ = this.quill.getFormat(this.quill.selection.savedRange.index); | |
if ($computeStyle$$[$_code2$$.default.blotName]) { | |
var $Clipboard___webpack_require__$$ = this.container.innerText; | |
this.container.innerHTML = ""; | |
return (new $_quillDelta2$$.default).insert($Clipboard___webpack_require__$$, $_defineProperty$$({}, $_code2$$.default.blotName, $computeStyle$$[$_code2$$.default.blotName])); | |
} | |
$computeStyle$$ = this.prepareMatching(); | |
$computeStyle$$ = $_slicedToArray$$($computeStyle$$, 2); | |
$computeStyle$$ = $traverse$$(this.container, $computeStyle$$[0], $computeStyle$$[1]); | |
$deltaEndsWith$$($computeStyle$$, "\n") && null == $computeStyle$$.ops[$computeStyle$$.ops.length - 1].attributes && ($computeStyle$$ = $computeStyle$$.compose((new $_quillDelta2$$.default).retain($computeStyle$$.length() - 1).delete(1))); | |
$debug$$.log("convert", this.container.innerHTML, $computeStyle$$); | |
this.container.innerHTML = ""; | |
return $computeStyle$$; | |
}}, {key:"dangerouslyPasteHTML", value:function($computeStyle$$, $deltaEndsWith$$) { | |
var $Clipboard___webpack_require__$$ = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : $_quill2$$.default.sources.API; | |
if ("string" === typeof $computeStyle$$) { | |
this.quill.setContents(this.convert($computeStyle$$), $deltaEndsWith$$), this.quill.setSelection(0, $_quill2$$.default.sources.SILENT); | |
} else { | |
var $applyFormat$$ = this.convert($deltaEndsWith$$); | |
this.quill.updateContents((new $_quillDelta2$$.default).retain($computeStyle$$).concat($applyFormat$$), $Clipboard___webpack_require__$$); | |
this.quill.setSelection($computeStyle$$ + $applyFormat$$.length(), $_quill2$$.default.sources.SILENT); | |
} | |
}}, {key:"onPaste", value:function($computeStyle$$) { | |
var $deltaEndsWith$$ = this; | |
if (!$computeStyle$$.defaultPrevented && this.quill.isEnabled()) { | |
var $Clipboard___webpack_require__$$ = this.quill.getSelection(), $applyFormat$$ = (new $_quillDelta2$$.default).retain($Clipboard___webpack_require__$$.index), $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = this.quill.scrollingContainer.scrollTop; | |
this.container.focus(); | |
this.quill.selection.update($_quill2$$.default.sources.SILENT); | |
setTimeout(function() { | |
$applyFormat$$ = $applyFormat$$.concat($deltaEndsWith$$.convert()).delete($Clipboard___webpack_require__$$.length); | |
$deltaEndsWith$$.quill.updateContents($applyFormat$$, $_quill2$$.default.sources.USER); | |
$deltaEndsWith$$.quill.setSelection($applyFormat$$.length() - $Clipboard___webpack_require__$$.length, $_quill2$$.default.sources.SILENT); | |
$deltaEndsWith$$.quill.scrollingContainer.scrollTop = $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$; | |
$deltaEndsWith$$.quill.focus(); | |
}, 1); | |
} | |
}}, {key:"prepareMatching", value:function() { | |
var $computeStyle$$ = this, $deltaEndsWith$$ = [], $Clipboard___webpack_require__$$ = []; | |
this.matchers.forEach(function($applyFormat$$) { | |
$applyFormat$$ = $_slicedToArray$$($applyFormat$$, 2); | |
var $_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$ = $applyFormat$$[0], $isLine$$ = $applyFormat$$[1]; | |
switch($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$) { | |
case Node.TEXT_NODE: | |
$Clipboard___webpack_require__$$.push($isLine$$); | |
break; | |
case Node.ELEMENT_NODE: | |
$deltaEndsWith$$.push($isLine$$); | |
break; | |
default: | |
[].forEach.call($computeStyle$$.container.querySelectorAll($_extend2$jscomp$5__logger$jscomp$4__logger2$jscomp$4__parchment$jscomp$21__quill$jscomp$3__quillDelta$jscomp$6_module$$), function($computeStyle$$) { | |
$computeStyle$$["__ql-matcher"] = $computeStyle$$["__ql-matcher"] || []; | |
$computeStyle$$["__ql-matcher"].push($isLine$$); | |
}); | |
} | |
}); | |
return [$deltaEndsWith$$, $Clipboard___webpack_require__$$]; | |
}}]); | |
return $Clipboard___webpack_require__$$; | |
}($_module$jscomp$3__module2$$.default); | |
$Clipboard___webpack_require__$$.DEFAULTS = {matchers:[], matchVisual:!0}; | |
$exports$$.default = $Clipboard___webpack_require__$$; | |
$exports$$.matchAttributor = $matchAttributor$$; | |
$exports$$.matchBlot = $matchBlot$$; | |
$exports$$.matchNewline = $matchNewline$$; | |
$exports$$.matchSpacing = $matchSpacing$$; | |
$exports$$.matchText = $matchText$$; | |
}, function($Bold__inline$jscomp$4_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $superClass$$) : $__webpack_require__$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $target$$ = $props$$[$i$$]; | |
$target$$.enumerable = $target$$.enumerable || !1; | |
$target$$.configurable = !0; | |
"value" in $target$$ && ($target$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $target$$.key, $target$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($__webpack_require__$$, $getter$jscomp$14_property$$, $receiver$$) { | |
null === $__webpack_require__$$ && ($__webpack_require__$$ = Function.prototype); | |
var $object$jscomp$15_parent$$ = Object.getOwnPropertyDescriptor($__webpack_require__$$, $getter$jscomp$14_property$$); | |
if (void 0 === $object$jscomp$15_parent$$) { | |
if ($__webpack_require__$$ = Object.getPrototypeOf($__webpack_require__$$), null !== $__webpack_require__$$) { | |
return $get$$($__webpack_require__$$, $getter$jscomp$14_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $object$jscomp$15_parent$$) { | |
return $object$jscomp$15_parent$$.value; | |
} | |
$getter$jscomp$14_property$$ = $object$jscomp$15_parent$$.get; | |
return void 0 === $getter$jscomp$14_property$$ ? void 0 : $getter$jscomp$14_property$$.call($receiver$$); | |
} | |
}; | |
$Bold__inline$jscomp$4_module$$ = $__webpack_require__$$(6); | |
$Bold__inline$jscomp$4_module$$ = function($__webpack_require__$$) { | |
function $Bold$$() { | |
if (!(this instanceof $Bold$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $call$$ = ($Bold$$.__proto__ || Object.getPrototypeOf($Bold$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? this : $call$$; | |
} | |
$_inherits$$($Bold$$, $__webpack_require__$$); | |
$_createClass$$($Bold$$, [{key:"optimize", value:function($context$$) { | |
$_get$$($Bold$$.prototype.__proto__ || Object.getPrototypeOf($Bold$$.prototype), "optimize", this).call(this, $context$$); | |
this.domNode.tagName !== this.statics.tagName[0] && this.replaceWith(this.statics.blotName); | |
}}], [{key:"create", value:function() { | |
return $_get$$($Bold$$.__proto__ || Object.getPrototypeOf($Bold$$), "create", this).call(this); | |
}}, {key:"formats", value:function() { | |
return !0; | |
}}]); | |
return $Bold$$; | |
}(($Bold__inline$jscomp$4_module$$ && $Bold__inline$jscomp$4_module$$.__esModule ? $Bold__inline$jscomp$4_module$$ : {default:$Bold__inline$jscomp$4_module$$}).default); | |
$Bold__inline$jscomp$4_module$$.blotName = "bold"; | |
$Bold__inline$jscomp$4_module$$.tagName = ["STRONG", "B"]; | |
$exports$$.default = $Bold__inline$jscomp$4_module$$; | |
}, function($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $exports$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
function $_interopRequireDefault$$($addControls$$) { | |
return $addControls$$ && $addControls$$.__esModule ? $addControls$$ : {default:$addControls$$}; | |
} | |
function $_defineProperty$$($addControls$$, $addSelect$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
$addSelect$$ in $addControls$$ ? Object.defineProperty($addControls$$, $addSelect$$, {value:$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, enumerable:!0, configurable:!0, writable:!0}) : $addControls$$[$addSelect$$] = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$; | |
return $addControls$$; | |
} | |
function $_possibleConstructorReturn$$($addControls$$, $addSelect$$) { | |
if (!$addControls$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$addSelect$$ || "object" !== typeof $addSelect$$ && "function" !== typeof $addSelect$$ ? $addControls$$ : $addSelect$$; | |
} | |
function $_inherits$$($addControls$$, $addSelect$$) { | |
if ("function" !== typeof $addSelect$$ && null !== $addSelect$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $addSelect$$); | |
} | |
$addControls$$.prototype = Object.create($addSelect$$ && $addSelect$$.prototype, {constructor:{value:$addControls$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$addSelect$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($addControls$$, $addSelect$$) : $addControls$$.__proto__ = $addSelect$$); | |
} | |
function $addButton$$($addControls$$, $addSelect$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
var $addButton$$ = document.createElement("button"); | |
$addButton$$.setAttribute("type", "button"); | |
$addButton$$.classList.add("ql-" + $addSelect$$); | |
null != $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ && ($addButton$$.value = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$); | |
$addControls$$.appendChild($addButton$$); | |
} | |
function $addControls$$($addControls$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
Array.isArray($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$[0]) || ($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = [$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.forEach(function($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
var $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = document.createElement("span"); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.classList.add("ql-formats"); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.forEach(function($addControls$$) { | |
if ("string" === typeof $addControls$$) { | |
$addButton$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $addControls$$); | |
} else { | |
var $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = Object.keys($addControls$$)[0]; | |
$addControls$$ = $addControls$$[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]; | |
Array.isArray($addControls$$) ? $addSelect$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addControls$$) : $addButton$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addControls$$); | |
} | |
}); | |
$addControls$$.appendChild($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
}); | |
} | |
function $addSelect$$($addControls$$, $addSelect$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
var $addButton$$ = document.createElement("select"); | |
$addButton$$.classList.add("ql-" + $addSelect$$); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.forEach(function($addControls$$) { | |
var $addSelect$$ = document.createElement("option"); | |
!1 !== $addControls$$ ? $addSelect$$.setAttribute("value", $addControls$$) : $addSelect$$.setAttribute("selected", "selected"); | |
$addButton$$.appendChild($addSelect$$); | |
}); | |
$addControls$$.appendChild($addButton$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.addControls = $exports$$.default = void 0; | |
var $_slicedToArray$$ = function() { | |
return function($addControls$$, $addSelect$$) { | |
if (Array.isArray($addControls$$)) { | |
return $addControls$$; | |
} | |
if (Symbol.iterator in Object($addControls$$)) { | |
var $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = [], $addButton$$ = !0, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = !1, $_slicedToArray$$ = void 0; | |
try { | |
for (var $exports$$ = $addControls$$[Symbol.iterator](), $_quillDelta2$$; !($addButton$$ = ($_quillDelta2$$ = $exports$$.next()).done) && ($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.push($_quillDelta2$$.value), !$addSelect$$ || $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.length !== $addSelect$$); $addButton$$ = !0) { | |
} | |
} catch ($err$$) { | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = !0, $_slicedToArray$$ = $err$$; | |
} finally { | |
try { | |
if (!$addButton$$ && $exports$$["return"]) { | |
$exports$$["return"](); | |
} | |
} finally { | |
if ($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$) { | |
throw $_slicedToArray$$; | |
} | |
} | |
} | |
return $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_createClass$$ = function() { | |
function $addControls$$($addControls$$, $addSelect$$) { | |
for (var $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = 0; $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ < $addSelect$$.length; $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$++) { | |
var $addButton$$ = $addSelect$$[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]; | |
$addButton$$.enumerable = $addButton$$.enumerable || !1; | |
$addButton$$.configurable = !0; | |
"value" in $addButton$$ && ($addButton$$.writable = !0); | |
Object.defineProperty($addControls$$, $addButton$$.key, $addButton$$); | |
} | |
} | |
return function($addSelect$$, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addButton$$) { | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ && $addControls$$($addSelect$$.prototype, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$); | |
$addButton$$ && $addControls$$($addSelect$$, $addButton$$); | |
return $addSelect$$; | |
}; | |
}(); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$(2); | |
var $_quillDelta2$$ = $_interopRequireDefault$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$(5); | |
var $_quill2$$ = $_interopRequireDefault$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$(10); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $_interopRequireDefault$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$(9); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = $_interopRequireDefault$$($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$); | |
var $debug$$ = (0, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.default)("quill:toolbar"); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = function($addSelect$$) { | |
function $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$($addSelect$$, $addButton$$) { | |
if (!(this instanceof $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $_possibleConstructorReturn$$(this, ($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.__proto__ || Object.getPrototypeOf($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$)).call(this, $addSelect$$, $addButton$$)); | |
Array.isArray($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.container) ? ($addButton$$ = document.createElement("div"), $addControls$$($addButton$$, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.container), $addSelect$$.container.parentNode.insertBefore($addButton$$, $addSelect$$.container), $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.container = | |
$addButton$$) : $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.container = "string" === typeof $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.container ? document.querySelector($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.container) : $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.container; | |
if (!($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.container instanceof HTMLElement)) { | |
var $exports$$; | |
return $exports$$ = $debug$$.error("Container required for toolbar", $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options), $_possibleConstructorReturn$$($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $exports$$); | |
} | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.container.classList.add("ql-toolbar"); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.controls = []; | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.handlers = {}; | |
Object.keys($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.handlers).forEach(function($addControls$$) { | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.addHandler($addControls$$, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.options.handlers[$addControls$$]); | |
}); | |
[].forEach.call($_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.container.querySelectorAll("button, select"), function($addControls$$) { | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.attach($addControls$$); | |
}); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.quill.on($_quill2$$.default.events.EDITOR_CHANGE, function($addControls$$, $addSelect$$) { | |
$addControls$$ === $_quill2$$.default.events.SELECTION_CHANGE && $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.update($addSelect$$); | |
}); | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.quill.on($_quill2$$.default.events.SCROLL_OPTIMIZE, function() { | |
var $addControls$$ = $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.quill.selection.getRange(); | |
$addControls$$ = $_slicedToArray$$($addControls$$, 1)[0]; | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.update($addControls$$); | |
}); | |
return $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$; | |
} | |
$_inherits$$($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addSelect$$); | |
$_createClass$$($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, [{key:"addHandler", value:function($addControls$$, $addSelect$$) { | |
this.handlers[$addControls$$] = $addSelect$$; | |
}}, {key:"attach", value:function($addControls$$) { | |
var $addSelect$$ = this, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = [].find.call($addControls$$.classList, function($addControls$$) { | |
return 0 === $addControls$$.indexOf("ql-"); | |
}); | |
if ($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.slice(3); | |
"BUTTON" === $addControls$$.tagName && $addControls$$.setAttribute("type", "button"); | |
if (null == this.handlers[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]) { | |
if (null != this.quill.scroll.whitelist && null == this.quill.scroll.whitelist[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]) { | |
$debug$$.warn("ignoring attaching to disabled format", $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addControls$$); | |
return; | |
} | |
if (null == $_parchment2$$.default.query($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$)) { | |
$debug$$.warn("ignoring attaching to nonexistent format", $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addControls$$); | |
return; | |
} | |
} | |
$addControls$$.addEventListener("SELECT" === $addControls$$.tagName ? "change" : "click", function($addButton$$) { | |
if ("SELECT" === $addControls$$.tagName) { | |
if (0 > $addControls$$.selectedIndex) { | |
return; | |
} | |
var $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $addControls$$.options[$addControls$$.selectedIndex]; | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.hasAttribute("selected") ? !1 : $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.value || !1; | |
} else { | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $addControls$$.classList.contains("ql-active") ? !1 : $addControls$$.value || !$addControls$$.hasAttribute("value"), $addButton$$.preventDefault(); | |
} | |
$addSelect$$.quill.focus(); | |
$addButton$$ = $addSelect$$.quill.selection.getRange(); | |
$addButton$$ = $_slicedToArray$$($addButton$$, 1)[0]; | |
if (null != $addSelect$$.handlers[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$]) { | |
$addSelect$$.handlers[$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$].call($addSelect$$, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$); | |
} else { | |
if ($_parchment2$$.default.query($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$).prototype instanceof $_parchment2$$.default.Embed) { | |
$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = prompt("Enter " + $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$); | |
if (!$_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$) { | |
return; | |
} | |
$addSelect$$.quill.updateContents((new $_quillDelta2$$.default).retain($addButton$$.index).delete($addButton$$.length).insert($_defineProperty$$({}, $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$)), $_quill2$$.default.sources.USER); | |
} else { | |
$addSelect$$.quill.format($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$, $_quill2$$.default.sources.USER); | |
} | |
} | |
$addSelect$$.update($addButton$$); | |
}); | |
this.controls.push([$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, $addControls$$]); | |
} | |
}}, {key:"update", value:function($addControls$$) { | |
var $addSelect$$ = null == $addControls$$ ? {} : this.quill.getFormat($addControls$$); | |
this.controls.forEach(function($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$) { | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = $_slicedToArray$$($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$, 2); | |
var $addButton$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$[0]; | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$[1]; | |
if ("SELECT" === $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.tagName) { | |
var $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = void 0; | |
null == $addControls$$ ? $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = null : null == $addSelect$$[$addButton$$] ? $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.querySelector("option[selected]") : Array.isArray($addSelect$$[$addButton$$]) || ($addButton$$ = $addSelect$$[$addButton$$], "string" === typeof $addButton$$ && | |
($addButton$$ = $addButton$$.replace(/"/g, '\\"')), $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.querySelector('option[value\x3d"' + $addButton$$ + '"]')); | |
null == $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$ ? ($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.value = "", $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.selectedIndex = -1) : $_logger$jscomp$5__logger2$jscomp$5__parchment$jscomp$22__quill$jscomp$4__quillDelta$jscomp$7_module$$.selected = !0; | |
} else { | |
null == $addControls$$ ? $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.classList.remove("ql-active") : $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.hasAttribute("value") ? ($addButton$$ = $addSelect$$[$addButton$$] === $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.getAttribute("value") || null != $addSelect$$[$addButton$$] && $addSelect$$[$addButton$$].toString() === $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.getAttribute("value") || | |
null == $addSelect$$[$addButton$$] && !$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.getAttribute("value"), $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.classList.toggle("ql-active", $addButton$$)) : $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.classList.toggle("ql-active", null != $addSelect$$[$addButton$$]); | |
} | |
}); | |
}}]); | |
return $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$; | |
}($Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.default); | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.DEFAULTS = {}; | |
$Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$.DEFAULTS = {container:null, handlers:{clean:function() { | |
var $addControls$$ = this, $addSelect$$ = this.quill.getSelection(); | |
null != $addSelect$$ && (0 == $addSelect$$.length ? ($addSelect$$ = this.quill.getFormat(), Object.keys($addSelect$$).forEach(function($addSelect$$) { | |
null != $_parchment2$$.default.query($addSelect$$, $_parchment2$$.default.Scope.INLINE) && $addControls$$.quill.format($addSelect$$, !1); | |
})) : this.quill.removeFormat($addSelect$$, $_quill2$$.default.sources.USER)); | |
}, direction:function($addControls$$) { | |
var $addSelect$$ = this.quill.getFormat().align; | |
"rtl" === $addControls$$ && null == $addSelect$$ ? this.quill.format("align", "right", $_quill2$$.default.sources.USER) : $addControls$$ || "right" !== $addSelect$$ || this.quill.format("align", !1, $_quill2$$.default.sources.USER); | |
this.quill.format("direction", $addControls$$, $_quill2$$.default.sources.USER); | |
}, indent:function($addControls$$) { | |
var $addSelect$$ = this.quill.getSelection(); | |
$addSelect$$ = this.quill.getFormat($addSelect$$); | |
var $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ = parseInt($addSelect$$.indent || 0); | |
if ("+1" === $addControls$$ || "-1" === $addControls$$) { | |
$addControls$$ = "+1" === $addControls$$ ? 1 : -1, "rtl" === $addSelect$$.direction && ($addControls$$ *= -1), this.quill.format("indent", $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$ + $addControls$$, $_quill2$$.default.sources.USER); | |
} | |
}, link:function($addControls$$) { | |
!0 === $addControls$$ && ($addControls$$ = prompt("Enter link URL:")); | |
this.quill.format("link", $addControls$$, $_quill2$$.default.sources.USER); | |
}, list:function($addControls$$) { | |
var $addSelect$$ = this.quill.getSelection(); | |
$addSelect$$ = this.quill.getFormat($addSelect$$); | |
"check" === $addControls$$ ? "checked" === $addSelect$$.list || "unchecked" === $addSelect$$.list ? this.quill.format("list", !1, $_quill2$$.default.sources.USER) : this.quill.format("list", "unchecked", $_quill2$$.default.sources.USER) : this.quill.format("list", $addControls$$, $_quill2$$.default.sources.USER); | |
}}}; | |
$exports$$.default = $Toolbar___webpack_require__$jscomp$52__module$jscomp$4__module2$$; | |
$exports$$.addControls = $addControls$$; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpolyline class\x3d"ql-even ql-stroke" points\x3d"5 7 3 9 5 11"\x3e\x3c/polyline\x3e \x3cpolyline class\x3d"ql-even ql-stroke" points\x3d"13 7 15 9 13 11"\x3e\x3c/polyline\x3e \x3cline class\x3dql-stroke x1\x3d10 x2\x3d8 y1\x3d5 y2\x3d13\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($ColorPicker__picker$jscomp$1_module$$, $exports$$, $__webpack_require__$$) { | |
function $_possibleConstructorReturn$$($__webpack_require__$$, $call$$) { | |
if (!$__webpack_require__$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? $__webpack_require__$$ : $call$$; | |
} | |
function $_inherits$$($__webpack_require__$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $superClass$$) : $__webpack_require__$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($target$$, $props$$) { | |
for (var $__webpack_require__$$ = 0; $__webpack_require__$$ < $props$$.length; $__webpack_require__$$++) { | |
var $defineProperties$$ = $props$$[$__webpack_require__$$]; | |
$defineProperties$$.enumerable = $defineProperties$$.enumerable || !1; | |
$defineProperties$$.configurable = !0; | |
"value" in $defineProperties$$ && ($defineProperties$$.writable = !0); | |
Object.defineProperty($target$$, $defineProperties$$.key, $defineProperties$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $defineProperties$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$defineProperties$$ && $__webpack_require__$$($Constructor$$, $defineProperties$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$16_parent$$, $getter$jscomp$15_property$$, $__webpack_require__$$) { | |
null === $object$jscomp$16_parent$$ && ($object$jscomp$16_parent$$ = Function.prototype); | |
var $ColorPicker__picker$jscomp$1_module$$ = Object.getOwnPropertyDescriptor($object$jscomp$16_parent$$, $getter$jscomp$15_property$$); | |
if (void 0 === $ColorPicker__picker$jscomp$1_module$$) { | |
if ($object$jscomp$16_parent$$ = Object.getPrototypeOf($object$jscomp$16_parent$$), null !== $object$jscomp$16_parent$$) { | |
return $get$$($object$jscomp$16_parent$$, $getter$jscomp$15_property$$, $__webpack_require__$$); | |
} | |
} else { | |
if ("value" in $ColorPicker__picker$jscomp$1_module$$) { | |
return $ColorPicker__picker$jscomp$1_module$$.value; | |
} | |
$getter$jscomp$15_property$$ = $ColorPicker__picker$jscomp$1_module$$.get; | |
return void 0 === $getter$jscomp$15_property$$ ? void 0 : $getter$jscomp$15_property$$.call($__webpack_require__$$); | |
} | |
}; | |
$ColorPicker__picker$jscomp$1_module$$ = $__webpack_require__$$(27); | |
$ColorPicker__picker$jscomp$1_module$$ = function($_Picker$$) { | |
function $ColorPicker$$($_Picker$$, $__webpack_require__$$) { | |
if (!(this instanceof $ColorPicker$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
$_Picker$$ = $_possibleConstructorReturn$$(this, ($ColorPicker$$.__proto__ || Object.getPrototypeOf($ColorPicker$$)).call(this, $_Picker$$)); | |
$_Picker$$.label.innerHTML = $__webpack_require__$$; | |
$_Picker$$.container.classList.add("ql-color-picker"); | |
[].slice.call($_Picker$$.container.querySelectorAll(".ql-picker-item"), 0, 7).forEach(function($_Picker$$) { | |
$_Picker$$.classList.add("ql-primary"); | |
}); | |
return $_Picker$$; | |
} | |
$_inherits$$($ColorPicker$$, $_Picker$$); | |
$_createClass$$($ColorPicker$$, [{key:"buildItem", value:function($_Picker$$) { | |
var $__webpack_require__$$ = $_get$$($ColorPicker$$.prototype.__proto__ || Object.getPrototypeOf($ColorPicker$$.prototype), "buildItem", this).call(this, $_Picker$$); | |
$__webpack_require__$$.style.backgroundColor = $_Picker$$.getAttribute("value") || ""; | |
return $__webpack_require__$$; | |
}}, {key:"selectItem", value:function($_Picker$$, $__webpack_require__$$) { | |
$_get$$($ColorPicker$$.prototype.__proto__ || Object.getPrototypeOf($ColorPicker$$.prototype), "selectItem", this).call(this, $_Picker$$, $__webpack_require__$$); | |
$__webpack_require__$$ = this.label.querySelector(".ql-color-label"); | |
$_Picker$$ = $_Picker$$ ? $_Picker$$.getAttribute("data-value") || "" : ""; | |
$__webpack_require__$$ && ("line" === $__webpack_require__$$.tagName ? $__webpack_require__$$.style.stroke = $_Picker$$ : $__webpack_require__$$.style.fill = $_Picker$$); | |
}}]); | |
return $ColorPicker$$; | |
}(($ColorPicker__picker$jscomp$1_module$$ && $ColorPicker__picker$jscomp$1_module$$.__esModule ? $ColorPicker__picker$jscomp$1_module$$ : {default:$ColorPicker__picker$jscomp$1_module$$}).default); | |
$exports$$.default = $ColorPicker__picker$jscomp$1_module$$; | |
}, function($IconPicker__picker$jscomp$2_module$$, $exports$$, $__webpack_require__$$) { | |
function $_possibleConstructorReturn$$($__webpack_require__$$, $call$$) { | |
if (!$__webpack_require__$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? $__webpack_require__$$ : $call$$; | |
} | |
function $_inherits$$($__webpack_require__$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $superClass$$) : $__webpack_require__$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($target$$, $props$$) { | |
for (var $__webpack_require__$$ = 0; $__webpack_require__$$ < $props$$.length; $__webpack_require__$$++) { | |
var $defineProperties$$ = $props$$[$__webpack_require__$$]; | |
$defineProperties$$.enumerable = $defineProperties$$.enumerable || !1; | |
$defineProperties$$.configurable = !0; | |
"value" in $defineProperties$$ && ($defineProperties$$.writable = !0); | |
Object.defineProperty($target$$, $defineProperties$$.key, $defineProperties$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $defineProperties$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$defineProperties$$ && $__webpack_require__$$($Constructor$$, $defineProperties$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$17_parent$$, $getter$jscomp$16_property$$, $__webpack_require__$$) { | |
null === $object$jscomp$17_parent$$ && ($object$jscomp$17_parent$$ = Function.prototype); | |
var $IconPicker__picker$jscomp$2_module$$ = Object.getOwnPropertyDescriptor($object$jscomp$17_parent$$, $getter$jscomp$16_property$$); | |
if (void 0 === $IconPicker__picker$jscomp$2_module$$) { | |
if ($object$jscomp$17_parent$$ = Object.getPrototypeOf($object$jscomp$17_parent$$), null !== $object$jscomp$17_parent$$) { | |
return $get$$($object$jscomp$17_parent$$, $getter$jscomp$16_property$$, $__webpack_require__$$); | |
} | |
} else { | |
if ("value" in $IconPicker__picker$jscomp$2_module$$) { | |
return $IconPicker__picker$jscomp$2_module$$.value; | |
} | |
$getter$jscomp$16_property$$ = $IconPicker__picker$jscomp$2_module$$.get; | |
return void 0 === $getter$jscomp$16_property$$ ? void 0 : $getter$jscomp$16_property$$.call($__webpack_require__$$); | |
} | |
}; | |
$IconPicker__picker$jscomp$2_module$$ = $__webpack_require__$$(27); | |
$IconPicker__picker$jscomp$2_module$$ = function($_Picker$$) { | |
function $IconPicker$$($_Picker$$, $__webpack_require__$$) { | |
if (!(this instanceof $IconPicker$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
$_Picker$$ = $_possibleConstructorReturn$$(this, ($IconPicker$$.__proto__ || Object.getPrototypeOf($IconPicker$$)).call(this, $_Picker$$)); | |
$_Picker$$.container.classList.add("ql-icon-picker"); | |
[].forEach.call($_Picker$$.container.querySelectorAll(".ql-picker-item"), function($_Picker$$) { | |
$_Picker$$.innerHTML = $__webpack_require__$$[$_Picker$$.getAttribute("data-value") || ""]; | |
}); | |
$_Picker$$.defaultItem = $_Picker$$.container.querySelector(".ql-selected"); | |
$_Picker$$.selectItem($_Picker$$.defaultItem); | |
return $_Picker$$; | |
} | |
$_inherits$$($IconPicker$$, $_Picker$$); | |
$_createClass$$($IconPicker$$, [{key:"selectItem", value:function($_Picker$$, $__webpack_require__$$) { | |
$_get$$($IconPicker$$.prototype.__proto__ || Object.getPrototypeOf($IconPicker$$.prototype), "selectItem", this).call(this, $_Picker$$, $__webpack_require__$$); | |
$_Picker$$ = $_Picker$$ || this.defaultItem; | |
this.label.innerHTML = $_Picker$$.innerHTML; | |
}}]); | |
return $IconPicker$$; | |
}(($IconPicker__picker$jscomp$2_module$$ && $IconPicker__picker$jscomp$2_module$$.__esModule ? $IconPicker__picker$jscomp$2_module$$ : {default:$IconPicker__picker$jscomp$2_module$$}).default); | |
$exports$$.default = $IconPicker__picker$jscomp$2_module$$; | |
}, function($Tooltip_module$$, $exports$$, $__webpack_require__$$) { | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $Tooltip_module$$) { | |
for (var $i$$ = 0; $i$$ < $Tooltip_module$$.length; $i$$++) { | |
var $descriptor$$ = $Tooltip_module$$[$i$$]; | |
$descriptor$$.enumerable = $descriptor$$.enumerable || !1; | |
$descriptor$$.configurable = !0; | |
"value" in $descriptor$$ && ($descriptor$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $descriptor$$.key, $descriptor$$); | |
} | |
} | |
return function($Tooltip_module$$, $exports$$, $staticProps$$) { | |
$exports$$ && $__webpack_require__$$($Tooltip_module$$.prototype, $exports$$); | |
$staticProps$$ && $__webpack_require__$$($Tooltip_module$$, $staticProps$$); | |
return $Tooltip_module$$; | |
}; | |
}(); | |
$Tooltip_module$$ = function() { | |
function $__webpack_require__$$($Tooltip_module$$, $exports$$) { | |
var $_this$$ = this; | |
if (!(this instanceof $__webpack_require__$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
this.quill = $Tooltip_module$$; | |
this.boundsContainer = $exports$$ || document.body; | |
this.root = $Tooltip_module$$.addContainer("ql-tooltip"); | |
this.root.innerHTML = this.constructor.TEMPLATE; | |
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$$($__webpack_require__$$, [{key:"hide", value:function() { | |
this.root.classList.add("ql-hidden"); | |
}}, {key:"position", value:function($__webpack_require__$$) { | |
var $Tooltip_module$$ = $__webpack_require__$$.left + $__webpack_require__$$.width / 2 - this.root.offsetWidth / 2, $top$$ = $__webpack_require__$$.bottom + this.quill.root.scrollTop; | |
this.root.style.left = $Tooltip_module$$ + "px"; | |
this.root.style.top = $top$$ + "px"; | |
this.root.classList.remove("ql-flip"); | |
var $containerBounds$$ = this.boundsContainer.getBoundingClientRect(), $rootBounds$$ = this.root.getBoundingClientRect(), $shift$$ = 0; | |
$rootBounds$$.right > $containerBounds$$.right && ($shift$$ = $containerBounds$$.right - $rootBounds$$.right, this.root.style.left = $Tooltip_module$$ + $shift$$ + "px"); | |
$rootBounds$$.left < $containerBounds$$.left && ($shift$$ = $containerBounds$$.left - $rootBounds$$.left, this.root.style.left = $Tooltip_module$$ + $shift$$ + "px"); | |
$rootBounds$$.bottom > $containerBounds$$.bottom && (this.root.style.top = $top$$ - ($__webpack_require__$$.bottom - $__webpack_require__$$.top + ($rootBounds$$.bottom - $rootBounds$$.top)) + "px", this.root.classList.add("ql-flip")); | |
return $shift$$; | |
}}, {key:"show", value:function() { | |
this.root.classList.remove("ql-editing"); | |
this.root.classList.remove("ql-hidden"); | |
}}]); | |
return $__webpack_require__$$; | |
}(); | |
$exports$$.default = $Tooltip_module$$; | |
}, function($_extend$jscomp$5__extend2$jscomp$6_module$$, $exports$$, $SnowTheme___webpack_require__$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_createClass$$) { | |
if (!($_get$$ instanceof $_createClass$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_createClass$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_createClass$$ || "object" !== typeof $_createClass$$ && "function" !== typeof $_createClass$$ ? $_get$$ : $_createClass$$; | |
} | |
function $_inherits$$($_get$$, $_createClass$$) { | |
if ("function" !== typeof $_createClass$$ && null !== $_createClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_createClass$$); | |
} | |
$_get$$.prototype = Object.create($_createClass$$ && $_createClass$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_createClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_createClass$$) : $_get$$.__proto__ = $_createClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_slicedToArray$$ = function() { | |
return function($_get$$, $_createClass$$) { | |
if (Array.isArray($_get$$)) { | |
return $_get$$; | |
} | |
if (Symbol.iterator in Object($_get$$)) { | |
var $SnowTheme___webpack_require__$$ = [], $_slicedToArray$$ = !0, $_extend$jscomp$5__extend2$jscomp$6_module$$ = !1, $_base__emitter$$ = void 0; | |
try { | |
for (var $exports$$ = $_get$$[Symbol.iterator](), $_base2$$; !($_slicedToArray$$ = ($_base2$$ = $exports$$.next()).done) && ($SnowTheme___webpack_require__$$.push($_base2$$.value), !$_createClass$$ || $SnowTheme___webpack_require__$$.length !== $_createClass$$); $_slicedToArray$$ = !0) { | |
} | |
} catch ($err$$) { | |
$_extend$jscomp$5__extend2$jscomp$6_module$$ = !0, $_base__emitter$$ = $err$$; | |
} finally { | |
try { | |
if (!$_slicedToArray$$ && $exports$$["return"]) { | |
$exports$$["return"](); | |
} | |
} finally { | |
if ($_extend$jscomp$5__extend2$jscomp$6_module$$) { | |
throw $_base__emitter$$; | |
} | |
} | |
} | |
return $SnowTheme___webpack_require__$$; | |
} | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_createClass$$, $SnowTheme___webpack_require__$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_slicedToArray$$ = Object.getOwnPropertyDescriptor($_get$$, $_createClass$$); | |
if (void 0 === $_slicedToArray$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_createClass$$, $SnowTheme___webpack_require__$$); | |
} | |
} else { | |
if ("value" in $_slicedToArray$$) { | |
return $_slicedToArray$$.value; | |
} | |
$_createClass$$ = $_slicedToArray$$.get; | |
return void 0 === $_createClass$$ ? void 0 : $_createClass$$.call($SnowTheme___webpack_require__$$); | |
} | |
}, $_createClass$$ = function() { | |
function $_get$$($_get$$, $_createClass$$) { | |
for (var $SnowTheme___webpack_require__$$ = 0; $SnowTheme___webpack_require__$$ < $_createClass$$.length; $SnowTheme___webpack_require__$$++) { | |
var $_slicedToArray$$ = $_createClass$$[$SnowTheme___webpack_require__$$]; | |
$_slicedToArray$$.enumerable = $_slicedToArray$$.enumerable || !1; | |
$_slicedToArray$$.configurable = !0; | |
"value" in $_slicedToArray$$ && ($_slicedToArray$$.writable = !0); | |
Object.defineProperty($_get$$, $_slicedToArray$$.key, $_slicedToArray$$); | |
} | |
} | |
return function($_createClass$$, $SnowTheme___webpack_require__$$, $_slicedToArray$$) { | |
$SnowTheme___webpack_require__$$ && $_get$$($_createClass$$.prototype, $SnowTheme___webpack_require__$$); | |
$_slicedToArray$$ && $_get$$($_createClass$$, $_slicedToArray$$); | |
return $_createClass$$; | |
}; | |
}(); | |
$_extend$jscomp$5__extend2$jscomp$6_module$$ = $SnowTheme___webpack_require__$$(3); | |
$_extend$jscomp$5__extend2$jscomp$6_module$$ = $_interopRequireDefault$$($_extend$jscomp$5__extend2$jscomp$6_module$$); | |
var $_base__emitter$$ = $SnowTheme___webpack_require__$$(8), $_emitter2$$ = $_interopRequireDefault$$($_base__emitter$$); | |
$_base__emitter$$ = $SnowTheme___webpack_require__$$(43); | |
var $_base2$$ = $_interopRequireDefault$$($_base__emitter$$), $_link$$ = $SnowTheme___webpack_require__$$(26), $_link2$$ = $_interopRequireDefault$$($_link$$), $_selection$$ = $SnowTheme___webpack_require__$$(15); | |
$SnowTheme___webpack_require__$$ = $SnowTheme___webpack_require__$$(41); | |
var $_icons2$$ = $_interopRequireDefault$$($SnowTheme___webpack_require__$$), $TOOLBAR_CONFIG$$ = [[{header:["1", "2", "3", !1]}], ["bold", "italic", "underline", "link"], [{list:"ordered"}, {list:"bullet"}], ["clean"]]; | |
$SnowTheme___webpack_require__$$ = function($_get$$) { | |
function $SnowTheme___webpack_require__$$($_get$$, $_createClass$$) { | |
$_classCallCheck$$(this, $SnowTheme___webpack_require__$$); | |
null != $_createClass$$.modules.toolbar && null == $_createClass$$.modules.toolbar.container && ($_createClass$$.modules.toolbar.container = $TOOLBAR_CONFIG$$); | |
$_get$$ = $_possibleConstructorReturn$$(this, ($SnowTheme___webpack_require__$$.__proto__ || Object.getPrototypeOf($SnowTheme___webpack_require__$$)).call(this, $_get$$, $_createClass$$)); | |
$_get$$.quill.container.classList.add("ql-snow"); | |
return $_get$$; | |
} | |
$_inherits$$($SnowTheme___webpack_require__$$, $_get$$); | |
$_createClass$$($SnowTheme___webpack_require__$$, [{key:"extendToolbar", value:function($_get$$) { | |
$_get$$.container.classList.add("ql-snow"); | |
this.buildButtons([].slice.call($_get$$.container.querySelectorAll("button")), $_icons2$$.default); | |
this.buildPickers([].slice.call($_get$$.container.querySelectorAll("select")), $_icons2$$.default); | |
this.tooltip = new $SnowTooltip$$(this.quill, this.options.bounds); | |
$_get$$.container.querySelector(".ql-link") && this.quill.keyboard.addBinding({key:"K", shortKey:!0}, function($_createClass$$, $SnowTheme___webpack_require__$$) { | |
$_get$$.handlers.link.call($_get$$, !$SnowTheme___webpack_require__$$.format.link); | |
}); | |
}}]); | |
return $SnowTheme___webpack_require__$$; | |
}($_base2$$.default); | |
$SnowTheme___webpack_require__$$.DEFAULTS = (0, $_extend$jscomp$5__extend2$jscomp$6_module$$.default)(!0, {}, $_base2$$.default.DEFAULTS, {modules:{toolbar:{handlers:{link:function($_get$$) { | |
$_get$$ ? ($_get$$ = this.quill.getSelection(), null != $_get$$ && 0 != $_get$$.length && ($_get$$ = this.quill.getText($_get$$), /^\S+@\S+\.\S+$/.test($_get$$) && 0 !== $_get$$.indexOf("mailto:") && ($_get$$ = "mailto:" + $_get$$), this.quill.theme.tooltip.edit("link", $_get$$))) : this.quill.format("link", !1); | |
}}}}}); | |
var $SnowTooltip$$ = function($SnowTheme___webpack_require__$$) { | |
function $_extend$jscomp$5__extend2$jscomp$6_module$$($_get$$, $_createClass$$) { | |
$_classCallCheck$$(this, $_extend$jscomp$5__extend2$jscomp$6_module$$); | |
$_get$$ = $_possibleConstructorReturn$$(this, ($_extend$jscomp$5__extend2$jscomp$6_module$$.__proto__ || Object.getPrototypeOf($_extend$jscomp$5__extend2$jscomp$6_module$$)).call(this, $_get$$, $_createClass$$)); | |
$_get$$.preview = $_get$$.root.querySelector("a.ql-preview"); | |
return $_get$$; | |
} | |
$_inherits$$($_extend$jscomp$5__extend2$jscomp$6_module$$, $SnowTheme___webpack_require__$$); | |
$_createClass$$($_extend$jscomp$5__extend2$jscomp$6_module$$, [{key:"listen", value:function() { | |
var $_createClass$$ = this; | |
$_get$$($_extend$jscomp$5__extend2$jscomp$6_module$$.prototype.__proto__ || Object.getPrototypeOf($_extend$jscomp$5__extend2$jscomp$6_module$$.prototype), "listen", this).call(this); | |
this.root.querySelector("a.ql-action").addEventListener("click", function($_get$$) { | |
$_createClass$$.root.classList.contains("ql-editing") ? $_createClass$$.save() : $_createClass$$.edit("link", $_createClass$$.preview.textContent); | |
$_get$$.preventDefault(); | |
}); | |
this.root.querySelector("a.ql-remove").addEventListener("click", function($_get$$) { | |
if (null != $_createClass$$.linkRange) { | |
var $SnowTheme___webpack_require__$$ = $_createClass$$.linkRange; | |
$_createClass$$.restoreFocus(); | |
$_createClass$$.quill.formatText($SnowTheme___webpack_require__$$, "link", !1, $_emitter2$$.default.sources.USER); | |
delete $_createClass$$.linkRange; | |
} | |
$_get$$.preventDefault(); | |
$_createClass$$.hide(); | |
}); | |
this.quill.on($_emitter2$$.default.events.SELECTION_CHANGE, function($_get$$, $SnowTheme___webpack_require__$$, $_extend$jscomp$5__extend2$jscomp$6_module$$) { | |
if (null != $_get$$) { | |
if (0 === $_get$$.length && $_extend$jscomp$5__extend2$jscomp$6_module$$ === $_emitter2$$.default.sources.USER) { | |
if ($SnowTheme___webpack_require__$$ = $_createClass$$.quill.scroll.descendant($_link2$$.default, $_get$$.index), $_extend$jscomp$5__extend2$jscomp$6_module$$ = $_slicedToArray$$($SnowTheme___webpack_require__$$, 2), $SnowTheme___webpack_require__$$ = $_extend$jscomp$5__extend2$jscomp$6_module$$[0], $_extend$jscomp$5__extend2$jscomp$6_module$$ = $_extend$jscomp$5__extend2$jscomp$6_module$$[1], null != $SnowTheme___webpack_require__$$) { | |
$_createClass$$.linkRange = new $_selection$$.Range($_get$$.index - $_extend$jscomp$5__extend2$jscomp$6_module$$, $SnowTheme___webpack_require__$$.length()); | |
$_get$$ = $_link2$$.default.formats($SnowTheme___webpack_require__$$.domNode); | |
$_createClass$$.preview.textContent = $_get$$; | |
$_createClass$$.preview.setAttribute("href", $_get$$); | |
$_createClass$$.show(); | |
$_createClass$$.position($_createClass$$.quill.getBounds($_createClass$$.linkRange)); | |
return; | |
} | |
} else { | |
delete $_createClass$$.linkRange; | |
} | |
$_createClass$$.hide(); | |
} | |
}); | |
}}, {key:"show", value:function() { | |
$_get$$($_extend$jscomp$5__extend2$jscomp$6_module$$.prototype.__proto__ || Object.getPrototypeOf($_extend$jscomp$5__extend2$jscomp$6_module$$.prototype), "show", this).call(this); | |
this.root.removeAttribute("data-mode"); | |
}}]); | |
return $_extend$jscomp$5__extend2$jscomp$6_module$$; | |
}($_base__emitter$$.BaseTooltip); | |
$SnowTooltip$$.TEMPLATE = '\x3ca class\x3d"ql-preview" target\x3d"_blank" href\x3d"about:blank"\x3e\x3c/a\x3e\x3cinput type\x3d"text" data-formula\x3d"e\x3dmc^2" data-link\x3d"https://quilljs.com" data-video\x3d"Embed URL"\x3e\x3ca class\x3d"ql-action"\x3e\x3c/a\x3e\x3ca class\x3d"ql-remove"\x3e\x3c/a\x3e'; | |
$exports$$.default = $SnowTheme___webpack_require__$$; | |
}, function($_core__core2_module$$, $exports$$, $__webpack_require__$$) { | |
function $_interopRequireDefault$$($_header__header2$$) { | |
return $_header__header2$$ && $_header__header2$$.__esModule ? $_header__header2$$ : {default:$_header__header2$$}; | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$_core__core2_module$$ = $__webpack_require__$$(28); | |
$_core__core2_module$$ = $_interopRequireDefault$$($_core__core2_module$$); | |
var $_align$$ = $__webpack_require__$$(36), $_direction$$ = $__webpack_require__$$(38), $_indent$$ = $__webpack_require__$$(64), $_blockquote__blockquote2$$ = $__webpack_require__$$(65); | |
$_blockquote__blockquote2$$ = $_interopRequireDefault$$($_blockquote__blockquote2$$); | |
var $_header__header2$$ = $__webpack_require__$$(66); | |
$_header__header2$$ = $_interopRequireDefault$$($_header__header2$$); | |
var $_list$$ = $__webpack_require__$$(67), $_list2$$ = $_interopRequireDefault$$($_list$$), $_background$$ = $__webpack_require__$$(37), $_color$$ = $__webpack_require__$$(25), $_font$$ = $__webpack_require__$$(39), $_size$$ = $__webpack_require__$$(40), $_bold__bold2$$ = $__webpack_require__$$(56); | |
$_bold__bold2$$ = $_interopRequireDefault$$($_bold__bold2$$); | |
var $_italic__italic2$$ = $__webpack_require__$$(68); | |
$_italic__italic2$$ = $_interopRequireDefault$$($_italic__italic2$$); | |
var $_link$jscomp$1__link2$$ = $__webpack_require__$$(26); | |
$_link$jscomp$1__link2$$ = $_interopRequireDefault$$($_link$jscomp$1__link2$$); | |
var $_script__script2$$ = $__webpack_require__$$(69); | |
$_script__script2$$ = $_interopRequireDefault$$($_script__script2$$); | |
var $_strike__strike2$$ = $__webpack_require__$$(70); | |
$_strike__strike2$$ = $_interopRequireDefault$$($_strike__strike2$$); | |
var $_underline__underline2$$ = $__webpack_require__$$(71); | |
$_underline__underline2$$ = $_interopRequireDefault$$($_underline__underline2$$); | |
var $_image__image2$$ = $__webpack_require__$$(72); | |
$_image__image2$$ = $_interopRequireDefault$$($_image__image2$$); | |
var $_video__video2$$ = $__webpack_require__$$(73); | |
$_video__video2$$ = $_interopRequireDefault$$($_video__video2$$); | |
var $_code$$ = $__webpack_require__$$(13), $_code2$$ = $_interopRequireDefault$$($_code$$), $_formula__formula2$$ = $__webpack_require__$$(74); | |
$_formula__formula2$$ = $_interopRequireDefault$$($_formula__formula2$$); | |
var $_syntax__syntax2$$ = $__webpack_require__$$(75); | |
$_syntax__syntax2$$ = $_interopRequireDefault$$($_syntax__syntax2$$); | |
var $_toolbar__toolbar2$$ = $__webpack_require__$$(57); | |
$_toolbar__toolbar2$$ = $_interopRequireDefault$$($_toolbar__toolbar2$$); | |
var $_icons$jscomp$1__icons2$$ = $__webpack_require__$$(41); | |
$_icons$jscomp$1__icons2$$ = $_interopRequireDefault$$($_icons$jscomp$1__icons2$$); | |
var $_picker$jscomp$3__picker2$$ = $__webpack_require__$$(27); | |
$_picker$jscomp$3__picker2$$ = $_interopRequireDefault$$($_picker$jscomp$3__picker2$$); | |
var $_colorPicker$jscomp$1__colorPicker2$$ = $__webpack_require__$$(59); | |
$_colorPicker$jscomp$1__colorPicker2$$ = $_interopRequireDefault$$($_colorPicker$jscomp$1__colorPicker2$$); | |
var $_iconPicker$jscomp$1__iconPicker2$$ = $__webpack_require__$$(60); | |
$_iconPicker$jscomp$1__iconPicker2$$ = $_interopRequireDefault$$($_iconPicker$jscomp$1__iconPicker2$$); | |
var $module$jscomp$0$$ = $__webpack_require__$$(61); | |
$module$jscomp$0$$ = $_interopRequireDefault$$($module$jscomp$0$$); | |
var $_bubble__bubble2$$ = $__webpack_require__$$(108); | |
$_bubble__bubble2$$ = $_interopRequireDefault$$($_bubble__bubble2$$); | |
$__webpack_require__$$ = $__webpack_require__$$(62); | |
$__webpack_require__$$ = $_interopRequireDefault$$($__webpack_require__$$); | |
$_core__core2_module$$.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}, !0); | |
$_core__core2_module$$.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":$_blockquote__blockquote2$$.default, "formats/code-block":$_code2$$.default, "formats/header":$_header__header2$$.default, "formats/list":$_list2$$.default, | |
"formats/bold":$_bold__bold2$$.default, "formats/code":$_code$$.Code, "formats/italic":$_italic__italic2$$.default, "formats/link":$_link$jscomp$1__link2$$.default, "formats/script":$_script__script2$$.default, "formats/strike":$_strike__strike2$$.default, "formats/underline":$_underline__underline2$$.default, "formats/image":$_image__image2$$.default, "formats/video":$_video__video2$$.default, "formats/list/item":$_list$$.ListItem, "modules/formula":$_formula__formula2$$.default, "modules/syntax":$_syntax__syntax2$$.default, | |
"modules/toolbar":$_toolbar__toolbar2$$.default, "themes/bubble":$_bubble__bubble2$$.default, "themes/snow":$__webpack_require__$$.default, "ui/icons":$_icons$jscomp$1__icons2$$.default, "ui/picker":$_picker$jscomp$3__picker2$$.default, "ui/icon-picker":$_iconPicker$jscomp$1__iconPicker2$$.default, "ui/color-picker":$_colorPicker$jscomp$1__colorPicker2$$.default, "ui/tooltip":$module$jscomp$0$$.default}, !0); | |
$exports$$.default = $_core__core2_module$$.default; | |
}, function($IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $superClass$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($superClass$$ && $superClass$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $superClass$$) : $__webpack_require__$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.IndentClass = void 0; | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $target$$ = $props$$[$i$$]; | |
$target$$.enumerable = $target$$.enumerable || !1; | |
$target$$.configurable = !0; | |
"value" in $target$$ && ($target$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $target$$.key, $target$$); | |
} | |
} | |
return function($Constructor$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Constructor$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Constructor$$, $staticProps$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($__webpack_require__$$, $getter$jscomp$18_property$$, $receiver$$) { | |
null === $__webpack_require__$$ && ($__webpack_require__$$ = Function.prototype); | |
var $object$jscomp$19_parent$$ = Object.getOwnPropertyDescriptor($__webpack_require__$$, $getter$jscomp$18_property$$); | |
if (void 0 === $object$jscomp$19_parent$$) { | |
if ($__webpack_require__$$ = Object.getPrototypeOf($__webpack_require__$$), null !== $__webpack_require__$$) { | |
return $get$$($__webpack_require__$$, $getter$jscomp$18_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $object$jscomp$19_parent$$) { | |
return $object$jscomp$19_parent$$.value; | |
} | |
$getter$jscomp$18_property$$ = $object$jscomp$19_parent$$.get; | |
return void 0 === $getter$jscomp$18_property$$ ? void 0 : $getter$jscomp$18_property$$.call($receiver$$); | |
} | |
}; | |
$IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$ = ($IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$ = $__webpack_require__$$(0)) && $IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$.__esModule ? $IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$ : {default:$IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$}; | |
$IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$ = new (function($__webpack_require__$$) { | |
function $IdentAttributor$$() { | |
if (!(this instanceof $IdentAttributor$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $call$$ = ($IdentAttributor$$.__proto__ || Object.getPrototypeOf($IdentAttributor$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? this : $call$$; | |
} | |
$_inherits$$($IdentAttributor$$, $__webpack_require__$$); | |
$_createClass$$($IdentAttributor$$, [{key:"add", value:function($node$$, $__webpack_require__$$) { | |
if ("+1" === $__webpack_require__$$ || "-1" === $__webpack_require__$$) { | |
var $_Parchment$Attributor$$ = this.value($node$$) || 0; | |
$__webpack_require__$$ = "+1" === $__webpack_require__$$ ? $_Parchment$Attributor$$ + 1 : $_Parchment$Attributor$$ - 1; | |
} | |
return 0 === $__webpack_require__$$ ? (this.remove($node$$), !0) : $_get$$($IdentAttributor$$.prototype.__proto__ || Object.getPrototypeOf($IdentAttributor$$.prototype), "add", this).call(this, $node$$, $__webpack_require__$$); | |
}}, {key:"canAdd", value:function($node$$, $__webpack_require__$$) { | |
return $_get$$($IdentAttributor$$.prototype.__proto__ || Object.getPrototypeOf($IdentAttributor$$.prototype), "canAdd", this).call(this, $node$$, $__webpack_require__$$) || $_get$$($IdentAttributor$$.prototype.__proto__ || Object.getPrototypeOf($IdentAttributor$$.prototype), "canAdd", this).call(this, $node$$, parseInt($__webpack_require__$$)); | |
}}, {key:"value", value:function($node$$) { | |
return parseInt($_get$$($IdentAttributor$$.prototype.__proto__ || Object.getPrototypeOf($IdentAttributor$$.prototype), "value", this).call(this, $node$$)) || void 0; | |
}}]); | |
return $IdentAttributor$$; | |
}($IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$.default.Attributor.Class))("indent", "ql-indent", {scope:$IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$.default.Scope.BLOCK, whitelist:[1, 2, 3, 4, 5, 6, 7, 8]}); | |
$exports$$.IndentClass = $IndentClass__parchment$jscomp$23__parchment2$jscomp$23_module$$; | |
}, function($Blockquote__block$jscomp$5_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Blockquote__block$jscomp$5_module$$) { | |
if ("function" !== typeof $Blockquote__block$jscomp$5_module$$ && null !== $Blockquote__block$jscomp$5_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Blockquote__block$jscomp$5_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Blockquote__block$jscomp$5_module$$ && $Blockquote__block$jscomp$5_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Blockquote__block$jscomp$5_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Blockquote__block$jscomp$5_module$$) : $__webpack_require__$$.__proto__ = $Blockquote__block$jscomp$5_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Blockquote__block$jscomp$5_module$$ = $__webpack_require__$$(4); | |
$Blockquote__block$jscomp$5_module$$ = function($__webpack_require__$$) { | |
function $Blockquote__block$jscomp$5_module$$() { | |
if (!(this instanceof $Blockquote__block$jscomp$5_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($Blockquote__block$jscomp$5_module$$.__proto__ || Object.getPrototypeOf($Blockquote__block$jscomp$5_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($Blockquote__block$jscomp$5_module$$, $__webpack_require__$$); | |
return $Blockquote__block$jscomp$5_module$$; | |
}(($Blockquote__block$jscomp$5_module$$ && $Blockquote__block$jscomp$5_module$$.__esModule ? $Blockquote__block$jscomp$5_module$$ : {default:$Blockquote__block$jscomp$5_module$$}).default); | |
$Blockquote__block$jscomp$5_module$$.blotName = "blockquote"; | |
$Blockquote__block$jscomp$5_module$$.tagName = "blockquote"; | |
$exports$$.default = $Blockquote__block$jscomp$5_module$$; | |
}, function($Header__block$jscomp$6_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Header__block$jscomp$6_module$$) { | |
if ("function" !== typeof $Header__block$jscomp$6_module$$ && null !== $Header__block$jscomp$6_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Header__block$jscomp$6_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Header__block$jscomp$6_module$$ && $Header__block$jscomp$6_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Header__block$jscomp$6_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Header__block$jscomp$6_module$$) : $__webpack_require__$$.__proto__ = $Header__block$jscomp$6_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $descriptor$$ = $props$$[$i$$]; | |
$descriptor$$.enumerable = $descriptor$$.enumerable || !1; | |
$descriptor$$.configurable = !0; | |
"value" in $descriptor$$ && ($descriptor$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $descriptor$$.key, $descriptor$$); | |
} | |
} | |
return function($Header__block$jscomp$6_module$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Header__block$jscomp$6_module$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Header__block$jscomp$6_module$$, $staticProps$$); | |
return $Header__block$jscomp$6_module$$; | |
}; | |
}(); | |
$Header__block$jscomp$6_module$$ = $__webpack_require__$$(4); | |
$Header__block$jscomp$6_module$$ = function($__webpack_require__$$) { | |
function $Header__block$jscomp$6_module$$() { | |
if (!(this instanceof $Header__block$jscomp$6_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($Header__block$jscomp$6_module$$.__proto__ || Object.getPrototypeOf($Header__block$jscomp$6_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($Header__block$jscomp$6_module$$, $__webpack_require__$$); | |
$_createClass$$($Header__block$jscomp$6_module$$, null, [{key:"formats", value:function($__webpack_require__$$) { | |
return this.tagName.indexOf($__webpack_require__$$.tagName) + 1; | |
}}]); | |
return $Header__block$jscomp$6_module$$; | |
}(($Header__block$jscomp$6_module$$ && $Header__block$jscomp$6_module$$.__esModule ? $Header__block$jscomp$6_module$$ : {default:$Header__block$jscomp$6_module$$}).default); | |
$Header__block$jscomp$6_module$$.blotName = "header"; | |
$Header__block$jscomp$6_module$$.tagName = "H1 H2 H3 H4 H5 H6".split(" "); | |
$exports$$.default = $Header__block$jscomp$6_module$$; | |
}, function($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, $exports$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_parchment2$$) { | |
if (!($_get$$ instanceof $_parchment2$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_parchment2$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_parchment2$$ || "object" !== typeof $_parchment2$$ && "function" !== typeof $_parchment2$$ ? $_get$$ : $_parchment2$$; | |
} | |
function $_inherits$$($_get$$, $_parchment2$$) { | |
if ("function" !== typeof $_parchment2$$ && null !== $_parchment2$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_parchment2$$); | |
} | |
$_get$$.prototype = Object.create($_parchment2$$ && $_parchment2$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_parchment2$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_parchment2$$) : $_get$$.__proto__ = $_parchment2$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.ListItem = void 0; | |
var $_createClass$$ = function() { | |
function $_get$$($_get$$, $_parchment2$$) { | |
for (var $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = 0; $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ < $_parchment2$$.length; $__webpack_require__$jscomp$61__container$jscomp$2__container2$$++) { | |
var $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = $_parchment2$$[$__webpack_require__$jscomp$61__container$jscomp$2__container2$$]; | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.enumerable = $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.enumerable || !1; | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.configurable = !0; | |
"value" in $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ && ($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.writable = !0); | |
Object.defineProperty($_get$$, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.key, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
} | |
} | |
return function($_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$) { | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$ && $_get$$($_parchment2$$.prototype, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ && $_get$$($_parchment2$$, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
return $_parchment2$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = Object.getOwnPropertyDescriptor($_get$$, $_parchment2$$); | |
if (void 0 === $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
} | |
} else { | |
if ("value" in $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$) { | |
return $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.value; | |
} | |
$_parchment2$$ = $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.get; | |
return void 0 === $_parchment2$$ ? void 0 : $_parchment2$$.call($__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
} | |
}; | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = $__webpack_require__$jscomp$61__container$jscomp$2__container2$$(0); | |
var $_parchment2$$ = $_interopRequireDefault$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = $__webpack_require__$jscomp$61__container$jscomp$2__container2$$(4); | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = $_interopRequireDefault$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = $__webpack_require__$jscomp$61__container$jscomp$2__container2$$(24); | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = $_interopRequireDefault$$($__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
var $ListItem$$ = function($__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
function $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$() { | |
$_classCallCheck$$(this, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
return $_possibleConstructorReturn$$(this, ($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$)).apply(this, arguments)); | |
} | |
$_inherits$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
$_createClass$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, [{key:"format", value:function($__webpack_require__$jscomp$61__container$jscomp$2__container2$$, $_createClass$$) { | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$ !== $List$$.blotName || $_createClass$$ ? $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "format", this).call(this, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$, $_createClass$$) : this.replaceWith($_parchment2$$.default.create(this.statics.scope)); | |
}}, {key:"remove", value:function() { | |
null == this.prev && null == this.next ? this.parent.remove() : $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "remove", this).call(this); | |
}}, {key:"replaceWith", value:function($_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
this.parent.isolate(this.offset(this.parent), this.length()); | |
if ($_parchment2$$ === this.parent.statics.blotName) { | |
return this.parent.replaceWith($_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$), this; | |
} | |
this.parent.unwrap(); | |
return $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "replaceWith", this).call(this, $_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
}}], [{key:"formats", value:function($_parchment2$$) { | |
return $_parchment2$$.tagName === this.tagName ? void 0 : $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$), "formats", this).call(this, $_parchment2$$); | |
}}]); | |
return $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$; | |
}($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.default); | |
$ListItem$$.blotName = "list-item"; | |
$ListItem$$.tagName = "LI"; | |
var $List$$ = function($__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
function $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$($_get$$) { | |
$_classCallCheck$$(this, $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$); | |
var $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = $_possibleConstructorReturn$$(this, ($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$)).call(this, $_get$$)), $_createClass$$ = function($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$) { | |
if ($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.target.parentNode === $_get$$) { | |
var $_createClass$$ = $__webpack_require__$jscomp$61__container$jscomp$2__container2$$.statics.formats($_get$$); | |
$_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$ = $_parchment2$$.default.find($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.target); | |
"checked" === $_createClass$$ ? $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.format("list", "unchecked") : "unchecked" === $_createClass$$ && $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.format("list", "checked"); | |
} | |
}; | |
$_get$$.addEventListener("touchstart", $_createClass$$); | |
$_get$$.addEventListener("mousedown", $_createClass$$); | |
return $__webpack_require__$jscomp$61__container$jscomp$2__container2$$; | |
} | |
$_inherits$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
$_createClass$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, null, [{key:"create", value:function($_parchment2$$) { | |
var $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = "ordered" === $_parchment2$$ ? "OL" : "UL"; | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$), "create", this).call(this, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
"checked" !== $_parchment2$$ && "unchecked" !== $_parchment2$$ || $__webpack_require__$jscomp$61__container$jscomp$2__container2$$.setAttribute("data-checked", "checked" === $_parchment2$$); | |
return $__webpack_require__$jscomp$61__container$jscomp$2__container2$$; | |
}}, {key:"formats", value:function($_get$$) { | |
if ("OL" === $_get$$.tagName) { | |
return "ordered"; | |
} | |
if ("UL" === $_get$$.tagName) { | |
return $_get$$.hasAttribute("data-checked") ? "true" === $_get$$.getAttribute("data-checked") ? "checked" : "unchecked" : "bullet"; | |
} | |
}}]); | |
$_createClass$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$, [{key:"format", value:function($_get$$, $_parchment2$$) { | |
0 < this.children.length && this.children.tail.format($_get$$, $_parchment2$$); | |
}}, {key:"formats", value:function() { | |
var $_get$$ = {}, $_parchment2$$ = this.statics.blotName, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = this.statics.formats(this.domNode); | |
$_parchment2$$ in $_get$$ ? Object.defineProperty($_get$$, $_parchment2$$, {value:$__webpack_require__$jscomp$61__container$jscomp$2__container2$$, enumerable:!0, configurable:!0, writable:!0}) : $_get$$[$_parchment2$$] = $__webpack_require__$jscomp$61__container$jscomp$2__container2$$; | |
return $_get$$; | |
}}, {key:"insertBefore", value:function($_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
$_parchment2$$ instanceof $ListItem$$ ? $_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "insertBefore", this).call(this, $_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$) : ($__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = null == $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ ? | |
this.length() : $__webpack_require__$jscomp$61__container$jscomp$2__container2$$.offset(this), $__webpack_require__$jscomp$61__container$jscomp$2__container2$$ = this.split($__webpack_require__$jscomp$61__container$jscomp$2__container2$$), $__webpack_require__$jscomp$61__container$jscomp$2__container2$$.parent.insertBefore($_parchment2$$, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$)); | |
}}, {key:"optimize", value:function($_parchment2$$) { | |
$_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "optimize", this).call(this, $_parchment2$$); | |
$_parchment2$$ = this.next; | |
null != $_parchment2$$ && $_parchment2$$.prev === this && $_parchment2$$.statics.blotName === this.statics.blotName && $_parchment2$$.domNode.tagName === this.domNode.tagName && $_parchment2$$.domNode.getAttribute("data-checked") === this.domNode.getAttribute("data-checked") && ($_parchment2$$.moveChildren(this), $_parchment2$$.remove()); | |
}}, {key:"replace", value:function($__webpack_require__$jscomp$61__container$jscomp$2__container2$$) { | |
if ($__webpack_require__$jscomp$61__container$jscomp$2__container2$$.statics.blotName !== this.statics.blotName) { | |
var $_createClass$$ = $_parchment2$$.default.create(this.statics.defaultChild); | |
$__webpack_require__$jscomp$61__container$jscomp$2__container2$$.moveChildren($_createClass$$); | |
this.appendChild($_createClass$$); | |
} | |
$_get$$($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype.__proto__ || Object.getPrototypeOf($_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$.prototype), "replace", this).call(this, $__webpack_require__$jscomp$61__container$jscomp$2__container2$$); | |
}}]); | |
return $_block$jscomp$7__block2$jscomp$7__parchment$jscomp$24_module$$; | |
}($__webpack_require__$jscomp$61__container$jscomp$2__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$$; | |
}, function($Italic__bold$jscomp$1_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Italic__bold$jscomp$1_module$$) { | |
if ("function" !== typeof $Italic__bold$jscomp$1_module$$ && null !== $Italic__bold$jscomp$1_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Italic__bold$jscomp$1_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Italic__bold$jscomp$1_module$$ && $Italic__bold$jscomp$1_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Italic__bold$jscomp$1_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Italic__bold$jscomp$1_module$$) : $__webpack_require__$$.__proto__ = $Italic__bold$jscomp$1_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Italic__bold$jscomp$1_module$$ = $__webpack_require__$$(56); | |
$Italic__bold$jscomp$1_module$$ = function($__webpack_require__$$) { | |
function $Italic__bold$jscomp$1_module$$() { | |
if (!(this instanceof $Italic__bold$jscomp$1_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($Italic__bold$jscomp$1_module$$.__proto__ || Object.getPrototypeOf($Italic__bold$jscomp$1_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($Italic__bold$jscomp$1_module$$, $__webpack_require__$$); | |
return $Italic__bold$jscomp$1_module$$; | |
}(($Italic__bold$jscomp$1_module$$ && $Italic__bold$jscomp$1_module$$.__esModule ? $Italic__bold$jscomp$1_module$$ : {default:$Italic__bold$jscomp$1_module$$}).default); | |
$Italic__bold$jscomp$1_module$$.blotName = "italic"; | |
$Italic__bold$jscomp$1_module$$.tagName = ["EM", "I"]; | |
$exports$$.default = $Italic__bold$jscomp$1_module$$; | |
}, function($Script__inline$jscomp$5_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Script__inline$jscomp$5_module$$) { | |
if ("function" !== typeof $Script__inline$jscomp$5_module$$ && null !== $Script__inline$jscomp$5_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Script__inline$jscomp$5_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Script__inline$jscomp$5_module$$ && $Script__inline$jscomp$5_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Script__inline$jscomp$5_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Script__inline$jscomp$5_module$$) : $__webpack_require__$$.__proto__ = $Script__inline$jscomp$5_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $__webpack_require__$$($__webpack_require__$$, $props$$) { | |
for (var $i$$ = 0; $i$$ < $props$$.length; $i$$++) { | |
var $Script__inline$jscomp$5_module$$ = $props$$[$i$$]; | |
$Script__inline$jscomp$5_module$$.enumerable = $Script__inline$jscomp$5_module$$.enumerable || !1; | |
$Script__inline$jscomp$5_module$$.configurable = !0; | |
"value" in $Script__inline$jscomp$5_module$$ && ($Script__inline$jscomp$5_module$$.writable = !0); | |
Object.defineProperty($__webpack_require__$$, $Script__inline$jscomp$5_module$$.key, $Script__inline$jscomp$5_module$$); | |
} | |
} | |
return function($Script__inline$jscomp$5_module$$, $protoProps$$, $staticProps$$) { | |
$protoProps$$ && $__webpack_require__$$($Script__inline$jscomp$5_module$$.prototype, $protoProps$$); | |
$staticProps$$ && $__webpack_require__$$($Script__inline$jscomp$5_module$$, $staticProps$$); | |
return $Script__inline$jscomp$5_module$$; | |
}; | |
}(), $_get$$ = function $get$$($__webpack_require__$$, $getter$jscomp$20_property$$, $receiver$$) { | |
null === $__webpack_require__$$ && ($__webpack_require__$$ = Function.prototype); | |
var $Script__inline$jscomp$5_module$$ = Object.getOwnPropertyDescriptor($__webpack_require__$$, $getter$jscomp$20_property$$); | |
if (void 0 === $Script__inline$jscomp$5_module$$) { | |
if ($__webpack_require__$$ = Object.getPrototypeOf($__webpack_require__$$), null !== $__webpack_require__$$) { | |
return $get$$($__webpack_require__$$, $getter$jscomp$20_property$$, $receiver$$); | |
} | |
} else { | |
if ("value" in $Script__inline$jscomp$5_module$$) { | |
return $Script__inline$jscomp$5_module$$.value; | |
} | |
$getter$jscomp$20_property$$ = $Script__inline$jscomp$5_module$$.get; | |
return void 0 === $getter$jscomp$20_property$$ ? void 0 : $getter$jscomp$20_property$$.call($receiver$$); | |
} | |
}; | |
$Script__inline$jscomp$5_module$$ = $__webpack_require__$$(6); | |
$Script__inline$jscomp$5_module$$ = function($__webpack_require__$$) { | |
function $Script$$() { | |
if (!(this instanceof $Script$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $call$$ = ($Script$$.__proto__ || Object.getPrototypeOf($Script$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$call$$ || "object" !== typeof $call$$ && "function" !== typeof $call$$ ? this : $call$$; | |
} | |
$_inherits$$($Script$$, $__webpack_require__$$); | |
$_createClass$$($Script$$, null, [{key:"create", value:function($value$$) { | |
return "super" === $value$$ ? document.createElement("sup") : "sub" === $value$$ ? document.createElement("sub") : $_get$$($Script$$.__proto__ || Object.getPrototypeOf($Script$$), "create", this).call(this, $value$$); | |
}}, {key:"formats", value:function($Script$$) { | |
if ("SUB" === $Script$$.tagName) { | |
return "sub"; | |
} | |
if ("SUP" === $Script$$.tagName) { | |
return "super"; | |
} | |
}}]); | |
return $Script$$; | |
}(($Script__inline$jscomp$5_module$$ && $Script__inline$jscomp$5_module$$.__esModule ? $Script__inline$jscomp$5_module$$ : {default:$Script__inline$jscomp$5_module$$}).default); | |
$Script__inline$jscomp$5_module$$.blotName = "script"; | |
$Script__inline$jscomp$5_module$$.tagName = ["SUB", "SUP"]; | |
$exports$$.default = $Script__inline$jscomp$5_module$$; | |
}, function($Strike__inline$jscomp$6_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Strike__inline$jscomp$6_module$$) { | |
if ("function" !== typeof $Strike__inline$jscomp$6_module$$ && null !== $Strike__inline$jscomp$6_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Strike__inline$jscomp$6_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Strike__inline$jscomp$6_module$$ && $Strike__inline$jscomp$6_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Strike__inline$jscomp$6_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Strike__inline$jscomp$6_module$$) : $__webpack_require__$$.__proto__ = $Strike__inline$jscomp$6_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Strike__inline$jscomp$6_module$$ = $__webpack_require__$$(6); | |
$Strike__inline$jscomp$6_module$$ = function($__webpack_require__$$) { | |
function $Strike__inline$jscomp$6_module$$() { | |
if (!(this instanceof $Strike__inline$jscomp$6_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($Strike__inline$jscomp$6_module$$.__proto__ || Object.getPrototypeOf($Strike__inline$jscomp$6_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($Strike__inline$jscomp$6_module$$, $__webpack_require__$$); | |
return $Strike__inline$jscomp$6_module$$; | |
}(($Strike__inline$jscomp$6_module$$ && $Strike__inline$jscomp$6_module$$.__esModule ? $Strike__inline$jscomp$6_module$$ : {default:$Strike__inline$jscomp$6_module$$}).default); | |
$Strike__inline$jscomp$6_module$$.blotName = "strike"; | |
$Strike__inline$jscomp$6_module$$.tagName = "S"; | |
$exports$$.default = $Strike__inline$jscomp$6_module$$; | |
}, function($Underline__inline$jscomp$7_module$$, $exports$$, $__webpack_require__$$) { | |
function $_inherits$$($__webpack_require__$$, $Underline__inline$jscomp$7_module$$) { | |
if ("function" !== typeof $Underline__inline$jscomp$7_module$$ && null !== $Underline__inline$jscomp$7_module$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $Underline__inline$jscomp$7_module$$); | |
} | |
$__webpack_require__$$.prototype = Object.create($Underline__inline$jscomp$7_module$$ && $Underline__inline$jscomp$7_module$$.prototype, {constructor:{value:$__webpack_require__$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$Underline__inline$jscomp$7_module$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($__webpack_require__$$, $Underline__inline$jscomp$7_module$$) : $__webpack_require__$$.__proto__ = $Underline__inline$jscomp$7_module$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$Underline__inline$jscomp$7_module$$ = $__webpack_require__$$(6); | |
$Underline__inline$jscomp$7_module$$ = function($__webpack_require__$$) { | |
function $Underline__inline$jscomp$7_module$$() { | |
if (!(this instanceof $Underline__inline$jscomp$7_module$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $__webpack_require__$$ = ($Underline__inline$jscomp$7_module$$.__proto__ || Object.getPrototypeOf($Underline__inline$jscomp$7_module$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$__webpack_require__$$ || "object" !== typeof $__webpack_require__$$ && "function" !== typeof $__webpack_require__$$ ? this : $__webpack_require__$$; | |
} | |
$_inherits$$($Underline__inline$jscomp$7_module$$, $__webpack_require__$$); | |
return $Underline__inline$jscomp$7_module$$; | |
}(($Underline__inline$jscomp$7_module$$ && $Underline__inline$jscomp$7_module$$.__esModule ? $Underline__inline$jscomp$7_module$$ : {default:$Underline__inline$jscomp$7_module$$}).default); | |
$Underline__inline$jscomp$7_module$$.blotName = "underline"; | |
$Underline__inline$jscomp$7_module$$.tagName = "U"; | |
$exports$$.default = $Underline__inline$jscomp$7_module$$; | |
}, function($_parchment$jscomp$25__parchment2$jscomp$25_module$$, $exports$$, $Image$jscomp$1___webpack_require__$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $defineProperties$$($defineProperties$$, $Image$jscomp$1___webpack_require__$$) { | |
for (var $target$$ = 0; $target$$ < $Image$jscomp$1___webpack_require__$$.length; $target$$++) { | |
var $_parchment$jscomp$25__parchment2$jscomp$25_module$$ = $Image$jscomp$1___webpack_require__$$[$target$$]; | |
$_parchment$jscomp$25__parchment2$jscomp$25_module$$.enumerable = $_parchment$jscomp$25__parchment2$jscomp$25_module$$.enumerable || !1; | |
$_parchment$jscomp$25__parchment2$jscomp$25_module$$.configurable = !0; | |
"value" in $_parchment$jscomp$25__parchment2$jscomp$25_module$$ && ($_parchment$jscomp$25__parchment2$jscomp$25_module$$.writable = !0); | |
Object.defineProperty($defineProperties$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$.key, $_parchment$jscomp$25__parchment2$jscomp$25_module$$); | |
} | |
} | |
return function($Constructor$$, $Image$jscomp$1___webpack_require__$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$) { | |
$Image$jscomp$1___webpack_require__$$ && $defineProperties$$($Constructor$$.prototype, $Image$jscomp$1___webpack_require__$$); | |
$_parchment$jscomp$25__parchment2$jscomp$25_module$$ && $defineProperties$$($Constructor$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$22_parent$$, $Image$jscomp$1___webpack_require__$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$) { | |
null === $object$jscomp$22_parent$$ && ($object$jscomp$22_parent$$ = Function.prototype); | |
var $ATTRIBUTES$$ = Object.getOwnPropertyDescriptor($object$jscomp$22_parent$$, $Image$jscomp$1___webpack_require__$$); | |
if (void 0 === $ATTRIBUTES$$) { | |
if ($object$jscomp$22_parent$$ = Object.getPrototypeOf($object$jscomp$22_parent$$), null !== $object$jscomp$22_parent$$) { | |
return $get$$($object$jscomp$22_parent$$, $Image$jscomp$1___webpack_require__$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$); | |
} | |
} else { | |
if ("value" in $ATTRIBUTES$$) { | |
return $ATTRIBUTES$$.value; | |
} | |
$Image$jscomp$1___webpack_require__$$ = $ATTRIBUTES$$.get; | |
return void 0 === $Image$jscomp$1___webpack_require__$$ ? void 0 : $Image$jscomp$1___webpack_require__$$.call($_parchment$jscomp$25__parchment2$jscomp$25_module$$); | |
} | |
}; | |
$_parchment$jscomp$25__parchment2$jscomp$25_module$$ = ($_parchment$jscomp$25__parchment2$jscomp$25_module$$ = $Image$jscomp$1___webpack_require__$$(0)) && $_parchment$jscomp$25__parchment2$jscomp$25_module$$.__esModule ? $_parchment$jscomp$25__parchment2$jscomp$25_module$$ : {default:$_parchment$jscomp$25__parchment2$jscomp$25_module$$}; | |
var $_link$$ = $Image$jscomp$1___webpack_require__$$(26), $ATTRIBUTES$$ = ["alt", "height", "width"]; | |
$Image$jscomp$1___webpack_require__$$ = function($_Parchment$Embed$$) { | |
function $Image$jscomp$1___webpack_require__$$() { | |
if (!(this instanceof $Image$jscomp$1___webpack_require__$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_Parchment$Embed$$ = ($Image$jscomp$1___webpack_require__$$.__proto__ || Object.getPrototypeOf($Image$jscomp$1___webpack_require__$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_Parchment$Embed$$ || "object" !== typeof $_Parchment$Embed$$ && "function" !== typeof $_Parchment$Embed$$ ? this : $_Parchment$Embed$$; | |
} | |
$_inherits$$($Image$jscomp$1___webpack_require__$$, $_Parchment$Embed$$); | |
$_createClass$$($Image$jscomp$1___webpack_require__$$, [{key:"format", value:function($_Parchment$Embed$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$) { | |
-1 < $ATTRIBUTES$$.indexOf($_Parchment$Embed$$) ? $_parchment$jscomp$25__parchment2$jscomp$25_module$$ ? this.domNode.setAttribute($_Parchment$Embed$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$) : this.domNode.removeAttribute($_Parchment$Embed$$) : $_get$$($Image$jscomp$1___webpack_require__$$.prototype.__proto__ || Object.getPrototypeOf($Image$jscomp$1___webpack_require__$$.prototype), "format", this).call(this, $_Parchment$Embed$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$); | |
}}], [{key:"create", value:function($_Parchment$Embed$$) { | |
var $_parchment$jscomp$25__parchment2$jscomp$25_module$$ = $_get$$($Image$jscomp$1___webpack_require__$$.__proto__ || Object.getPrototypeOf($Image$jscomp$1___webpack_require__$$), "create", this).call(this, $_Parchment$Embed$$); | |
"string" === typeof $_Parchment$Embed$$ && $_parchment$jscomp$25__parchment2$jscomp$25_module$$.setAttribute("src", this.sanitize($_Parchment$Embed$$)); | |
return $_parchment$jscomp$25__parchment2$jscomp$25_module$$; | |
}}, {key:"formats", value:function($_Parchment$Embed$$) { | |
return $ATTRIBUTES$$.reduce(function($Image$jscomp$1___webpack_require__$$, $_parchment$jscomp$25__parchment2$jscomp$25_module$$) { | |
$_Parchment$Embed$$.hasAttribute($_parchment$jscomp$25__parchment2$jscomp$25_module$$) && ($Image$jscomp$1___webpack_require__$$[$_parchment$jscomp$25__parchment2$jscomp$25_module$$] = $_Parchment$Embed$$.getAttribute($_parchment$jscomp$25__parchment2$jscomp$25_module$$)); | |
return $Image$jscomp$1___webpack_require__$$; | |
}, {}); | |
}}, {key:"match", value:function($_Parchment$Embed$$) { | |
return /\.(jpe?g|gif|png)$/.test($_Parchment$Embed$$) || /^data:image\/.+;base64/.test($_Parchment$Embed$$); | |
}}, {key:"sanitize", value:function($_Parchment$Embed$$) { | |
return (0, $_link$$.sanitize)($_Parchment$Embed$$, ["http", "https", "data"]) ? $_Parchment$Embed$$ : "//:0"; | |
}}, {key:"value", value:function($_Parchment$Embed$$) { | |
return $_Parchment$Embed$$.getAttribute("src"); | |
}}]); | |
return $Image$jscomp$1___webpack_require__$$; | |
}($_parchment$jscomp$25__parchment2$jscomp$25_module$$.default.Embed); | |
$Image$jscomp$1___webpack_require__$$.blotName = "image"; | |
$Image$jscomp$1___webpack_require__$$.tagName = "IMG"; | |
$exports$$.default = $Image$jscomp$1___webpack_require__$$; | |
}, function($_block$jscomp$8_module$$, $exports$$, $Video___webpack_require__$jscomp$67__link$$) { | |
function $_inherits$$($subClass$$, $superClass$$) { | |
if ("function" !== typeof $superClass$$ && null !== $superClass$$) { | |
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:!1, writable:!0, configurable:!0}}); | |
$superClass$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($subClass$$, $superClass$$) : $subClass$$.__proto__ = $superClass$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
var $_createClass$$ = function() { | |
function $defineProperties$$($defineProperties$$, $Video___webpack_require__$jscomp$67__link$$) { | |
for (var $target$$ = 0; $target$$ < $Video___webpack_require__$jscomp$67__link$$.length; $target$$++) { | |
var $_block$jscomp$8_module$$ = $Video___webpack_require__$jscomp$67__link$$[$target$$]; | |
$_block$jscomp$8_module$$.enumerable = $_block$jscomp$8_module$$.enumerable || !1; | |
$_block$jscomp$8_module$$.configurable = !0; | |
"value" in $_block$jscomp$8_module$$ && ($_block$jscomp$8_module$$.writable = !0); | |
Object.defineProperty($defineProperties$$, $_block$jscomp$8_module$$.key, $_block$jscomp$8_module$$); | |
} | |
} | |
return function($Constructor$$, $Video___webpack_require__$jscomp$67__link$$, $_block$jscomp$8_module$$) { | |
$Video___webpack_require__$jscomp$67__link$$ && $defineProperties$$($Constructor$$.prototype, $Video___webpack_require__$jscomp$67__link$$); | |
$_block$jscomp$8_module$$ && $defineProperties$$($Constructor$$, $_block$jscomp$8_module$$); | |
return $Constructor$$; | |
}; | |
}(), $_get$$ = function $get$$($object$jscomp$23_parent$$, $Video___webpack_require__$jscomp$67__link$$, $_block$jscomp$8_module$$) { | |
null === $object$jscomp$23_parent$$ && ($object$jscomp$23_parent$$ = Function.prototype); | |
var $ATTRIBUTES$$ = Object.getOwnPropertyDescriptor($object$jscomp$23_parent$$, $Video___webpack_require__$jscomp$67__link$$); | |
if (void 0 === $ATTRIBUTES$$) { | |
if ($object$jscomp$23_parent$$ = Object.getPrototypeOf($object$jscomp$23_parent$$), null !== $object$jscomp$23_parent$$) { | |
return $get$$($object$jscomp$23_parent$$, $Video___webpack_require__$jscomp$67__link$$, $_block$jscomp$8_module$$); | |
} | |
} else { | |
if ("value" in $ATTRIBUTES$$) { | |
return $ATTRIBUTES$$.value; | |
} | |
$Video___webpack_require__$jscomp$67__link$$ = $ATTRIBUTES$$.get; | |
return void 0 === $Video___webpack_require__$jscomp$67__link$$ ? void 0 : $Video___webpack_require__$jscomp$67__link$$.call($_block$jscomp$8_module$$); | |
} | |
}; | |
$_block$jscomp$8_module$$ = $Video___webpack_require__$jscomp$67__link$$(4); | |
var $_link2$$ = ($Video___webpack_require__$jscomp$67__link$$ = $Video___webpack_require__$jscomp$67__link$$(26)) && $Video___webpack_require__$jscomp$67__link$$.__esModule ? $Video___webpack_require__$jscomp$67__link$$ : {default:$Video___webpack_require__$jscomp$67__link$$}, $ATTRIBUTES$$ = ["height", "width"]; | |
$Video___webpack_require__$jscomp$67__link$$ = function($_BlockEmbed$$) { | |
function $Video___webpack_require__$jscomp$67__link$$() { | |
if (!(this instanceof $Video___webpack_require__$jscomp$67__link$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
var $_BlockEmbed$$ = ($Video___webpack_require__$jscomp$67__link$$.__proto__ || Object.getPrototypeOf($Video___webpack_require__$jscomp$67__link$$)).apply(this, arguments); | |
if (!this) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_BlockEmbed$$ || "object" !== typeof $_BlockEmbed$$ && "function" !== typeof $_BlockEmbed$$ ? this : $_BlockEmbed$$; | |
} | |
$_inherits$$($Video___webpack_require__$jscomp$67__link$$, $_BlockEmbed$$); | |
$_createClass$$($Video___webpack_require__$jscomp$67__link$$, [{key:"format", value:function($_BlockEmbed$$, $_block$jscomp$8_module$$) { | |
-1 < $ATTRIBUTES$$.indexOf($_BlockEmbed$$) ? $_block$jscomp$8_module$$ ? this.domNode.setAttribute($_BlockEmbed$$, $_block$jscomp$8_module$$) : this.domNode.removeAttribute($_BlockEmbed$$) : $_get$$($Video___webpack_require__$jscomp$67__link$$.prototype.__proto__ || Object.getPrototypeOf($Video___webpack_require__$jscomp$67__link$$.prototype), "format", this).call(this, $_BlockEmbed$$, $_block$jscomp$8_module$$); | |
}}], [{key:"create", value:function($_BlockEmbed$$) { | |
var $_block$jscomp$8_module$$ = $_get$$($Video___webpack_require__$jscomp$67__link$$.__proto__ || Object.getPrototypeOf($Video___webpack_require__$jscomp$67__link$$), "create", this).call(this, $_BlockEmbed$$); | |
$_block$jscomp$8_module$$.setAttribute("frameborder", "0"); | |
$_block$jscomp$8_module$$.setAttribute("allowfullscreen", !0); | |
$_block$jscomp$8_module$$.setAttribute("src", this.sanitize($_BlockEmbed$$)); | |
return $_block$jscomp$8_module$$; | |
}}, {key:"formats", value:function($_BlockEmbed$$) { | |
return $ATTRIBUTES$$.reduce(function($Video___webpack_require__$jscomp$67__link$$, $_block$jscomp$8_module$$) { | |
$_BlockEmbed$$.hasAttribute($_block$jscomp$8_module$$) && ($Video___webpack_require__$jscomp$67__link$$[$_block$jscomp$8_module$$] = $_BlockEmbed$$.getAttribute($_block$jscomp$8_module$$)); | |
return $Video___webpack_require__$jscomp$67__link$$; | |
}, {}); | |
}}, {key:"sanitize", value:function($_BlockEmbed$$) { | |
return $_link2$$.default.sanitize($_BlockEmbed$$); | |
}}, {key:"value", value:function($_BlockEmbed$$) { | |
return $_BlockEmbed$$.getAttribute("src"); | |
}}]); | |
return $Video___webpack_require__$jscomp$67__link$$; | |
}($_block$jscomp$8_module$$.BlockEmbed); | |
$Video___webpack_require__$jscomp$67__link$$.blotName = "video"; | |
$Video___webpack_require__$jscomp$67__link$$.className = "ql-video"; | |
$Video___webpack_require__$jscomp$67__link$$.tagName = "IFRAME"; | |
$exports$$.default = $Video___webpack_require__$jscomp$67__link$$; | |
}, function($_embed$jscomp$1__embed2$jscomp$1_module$$, $exports$$, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_quill$$) { | |
if (!($_get$$ instanceof $_quill$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_quill$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_quill$$ || "object" !== typeof $_quill$$ && "function" !== typeof $_quill$$ ? $_get$$ : $_quill$$; | |
} | |
function $_inherits$$($_get$$, $_quill$$) { | |
if ("function" !== typeof $_quill$$ && null !== $_quill$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_quill$$); | |
} | |
$_get$$.prototype = Object.create($_quill$$ && $_quill$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_quill$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_quill$$) : $_get$$.__proto__ = $_quill$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.FormulaBlot = void 0; | |
var $_createClass$$ = function() { | |
function $_get$$($_get$$, $_quill$$) { | |
for (var $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ = 0; $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ < $_quill$$.length; $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$++) { | |
var $_embed$jscomp$1__embed2$jscomp$1_module$$ = $_quill$$[$Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$]; | |
$_embed$jscomp$1__embed2$jscomp$1_module$$.enumerable = $_embed$jscomp$1__embed2$jscomp$1_module$$.enumerable || !1; | |
$_embed$jscomp$1__embed2$jscomp$1_module$$.configurable = !0; | |
"value" in $_embed$jscomp$1__embed2$jscomp$1_module$$ && ($_embed$jscomp$1__embed2$jscomp$1_module$$.writable = !0); | |
Object.defineProperty($_get$$, $_embed$jscomp$1__embed2$jscomp$1_module$$.key, $_embed$jscomp$1__embed2$jscomp$1_module$$); | |
} | |
} | |
return function($_quill$$, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$, $_embed$jscomp$1__embed2$jscomp$1_module$$) { | |
$Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ && $_get$$($_quill$$.prototype, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$); | |
$_embed$jscomp$1__embed2$jscomp$1_module$$ && $_get$$($_quill$$, $_embed$jscomp$1__embed2$jscomp$1_module$$); | |
return $_quill$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_quill$$, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_embed$jscomp$1__embed2$jscomp$1_module$$ = Object.getOwnPropertyDescriptor($_get$$, $_quill$$); | |
if (void 0 === $_embed$jscomp$1__embed2$jscomp$1_module$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_quill$$, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$); | |
} | |
} else { | |
if ("value" in $_embed$jscomp$1__embed2$jscomp$1_module$$) { | |
return $_embed$jscomp$1__embed2$jscomp$1_module$$.value; | |
} | |
$_quill$$ = $_embed$jscomp$1__embed2$jscomp$1_module$$.get; | |
return void 0 === $_quill$$ ? void 0 : $_quill$$.call($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$); | |
} | |
}; | |
$_embed$jscomp$1__embed2$jscomp$1_module$$ = $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$(35); | |
$_embed$jscomp$1__embed2$jscomp$1_module$$ = $_interopRequireDefault$$($_embed$jscomp$1__embed2$jscomp$1_module$$); | |
var $_quill$$ = $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$(5), $_quill2$$ = $_interopRequireDefault$$($_quill$$); | |
$Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ = $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$(9); | |
$Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ = $_interopRequireDefault$$($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$); | |
var $FormulaBlot$$ = function($_quill$$) { | |
function $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$() { | |
$_classCallCheck$$(this, $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$); | |
return $_possibleConstructorReturn$$(this, ($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$.__proto__ || Object.getPrototypeOf($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$)).apply(this, arguments)); | |
} | |
$_inherits$$($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$, $_quill$$); | |
$_createClass$$($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$, null, [{key:"create", value:function($_quill$$) { | |
var $_embed$jscomp$1__embed2$jscomp$1_module$$ = $_get$$($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$.__proto__ || Object.getPrototypeOf($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$), "create", this).call(this, $_quill$$); | |
"string" === typeof $_quill$$ && (window.katex.render($_quill$$, $_embed$jscomp$1__embed2$jscomp$1_module$$, {throwOnError:!1, errorColor:"#f00"}), $_embed$jscomp$1__embed2$jscomp$1_module$$.setAttribute("data-value", $_quill$$)); | |
return $_embed$jscomp$1__embed2$jscomp$1_module$$; | |
}}, {key:"value", value:function($_get$$) { | |
return $_get$$.getAttribute("data-value"); | |
}}]); | |
return $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$; | |
}($_embed$jscomp$1__embed2$jscomp$1_module$$.default); | |
$FormulaBlot$$.blotName = "formula"; | |
$FormulaBlot$$.className = "ql-formula"; | |
$FormulaBlot$$.tagName = "SPAN"; | |
$Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$ = function($_get$$) { | |
function $_quill$$() { | |
$_classCallCheck$$(this, $_quill$$); | |
var $_get$$ = $_possibleConstructorReturn$$(this, ($_quill$$.__proto__ || Object.getPrototypeOf($_quill$$)).call(this)); | |
if (null == window.katex) { | |
throw Error("Formula module requires KaTeX."); | |
} | |
return $_get$$; | |
} | |
$_inherits$$($_quill$$, $_get$$); | |
$_createClass$$($_quill$$, null, [{key:"register", value:function() { | |
$_quill2$$.default.register($FormulaBlot$$, !0); | |
}}]); | |
return $_quill$$; | |
}($Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$.default); | |
$exports$$.FormulaBlot = $FormulaBlot$$; | |
$exports$$.default = $Formula___webpack_require__$jscomp$68__module$jscomp$5__module2$$; | |
}, function($_parchment$jscomp$26__parchment2$jscomp$26_module$$, $exports$$, $Syntax___webpack_require__$jscomp$69__code$$) { | |
function $_interopRequireDefault$$($_get$$) { | |
return $_get$$ && $_get$$.__esModule ? $_get$$ : {default:$_get$$}; | |
} | |
function $_classCallCheck$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
if (!($_get$$ instanceof $_module$jscomp$6__module2$jscomp$6__quill$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
if (!$_get$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_module$jscomp$6__module2$jscomp$6__quill$$ || "object" !== typeof $_module$jscomp$6__module2$jscomp$6__quill$$ && "function" !== typeof $_module$jscomp$6__module2$jscomp$6__quill$$ ? $_get$$ : $_module$jscomp$6__module2$jscomp$6__quill$$; | |
} | |
function $_inherits$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
if ("function" !== typeof $_module$jscomp$6__module2$jscomp$6__quill$$ && null !== $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_module$jscomp$6__module2$jscomp$6__quill$$); | |
} | |
$_get$$.prototype = Object.create($_module$jscomp$6__module2$jscomp$6__quill$$ && $_module$jscomp$6__module2$jscomp$6__quill$$.prototype, {constructor:{value:$_get$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_module$jscomp$6__module2$jscomp$6__quill$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$) : $_get$$.__proto__ = $_module$jscomp$6__module2$jscomp$6__quill$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.CodeToken = $exports$$.CodeBlock = void 0; | |
var $_createClass$$ = function() { | |
function $_get$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
for (var $Syntax___webpack_require__$jscomp$69__code$$ = 0; $Syntax___webpack_require__$jscomp$69__code$$ < $_module$jscomp$6__module2$jscomp$6__quill$$.length; $Syntax___webpack_require__$jscomp$69__code$$++) { | |
var $_parchment$jscomp$26__parchment2$jscomp$26_module$$ = $_module$jscomp$6__module2$jscomp$6__quill$$[$Syntax___webpack_require__$jscomp$69__code$$]; | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$.enumerable = $_parchment$jscomp$26__parchment2$jscomp$26_module$$.enumerable || !1; | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$.configurable = !0; | |
"value" in $_parchment$jscomp$26__parchment2$jscomp$26_module$$ && ($_parchment$jscomp$26__parchment2$jscomp$26_module$$.writable = !0); | |
Object.defineProperty($_get$$, $_parchment$jscomp$26__parchment2$jscomp$26_module$$.key, $_parchment$jscomp$26__parchment2$jscomp$26_module$$); | |
} | |
} | |
return function($_module$jscomp$6__module2$jscomp$6__quill$$, $Syntax___webpack_require__$jscomp$69__code$$, $_parchment$jscomp$26__parchment2$jscomp$26_module$$) { | |
$Syntax___webpack_require__$jscomp$69__code$$ && $_get$$($_module$jscomp$6__module2$jscomp$6__quill$$.prototype, $Syntax___webpack_require__$jscomp$69__code$$); | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$ && $_get$$($_module$jscomp$6__module2$jscomp$6__quill$$, $_parchment$jscomp$26__parchment2$jscomp$26_module$$); | |
return $_module$jscomp$6__module2$jscomp$6__quill$$; | |
}; | |
}(), $_get$$ = function $get$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$, $Syntax___webpack_require__$jscomp$69__code$$) { | |
null === $_get$$ && ($_get$$ = Function.prototype); | |
var $_parchment$jscomp$26__parchment2$jscomp$26_module$$ = Object.getOwnPropertyDescriptor($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$); | |
if (void 0 === $_parchment$jscomp$26__parchment2$jscomp$26_module$$) { | |
if ($_get$$ = Object.getPrototypeOf($_get$$), null !== $_get$$) { | |
return $get$$($_get$$, $_module$jscomp$6__module2$jscomp$6__quill$$, $Syntax___webpack_require__$jscomp$69__code$$); | |
} | |
} else { | |
if ("value" in $_parchment$jscomp$26__parchment2$jscomp$26_module$$) { | |
return $_parchment$jscomp$26__parchment2$jscomp$26_module$$.value; | |
} | |
$_module$jscomp$6__module2$jscomp$6__quill$$ = $_parchment$jscomp$26__parchment2$jscomp$26_module$$.get; | |
return void 0 === $_module$jscomp$6__module2$jscomp$6__quill$$ ? void 0 : $_module$jscomp$6__module2$jscomp$6__quill$$.call($Syntax___webpack_require__$jscomp$69__code$$); | |
} | |
}; | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$ = $Syntax___webpack_require__$jscomp$69__code$$(0); | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$ = $_interopRequireDefault$$($_parchment$jscomp$26__parchment2$jscomp$26_module$$); | |
var $_module$jscomp$6__module2$jscomp$6__quill$$ = $Syntax___webpack_require__$jscomp$69__code$$(5), $_quill2$$ = $_interopRequireDefault$$($_module$jscomp$6__module2$jscomp$6__quill$$); | |
$_module$jscomp$6__module2$jscomp$6__quill$$ = $Syntax___webpack_require__$jscomp$69__code$$(9); | |
$_module$jscomp$6__module2$jscomp$6__quill$$ = $_interopRequireDefault$$($_module$jscomp$6__module2$jscomp$6__quill$$); | |
$Syntax___webpack_require__$jscomp$69__code$$ = $Syntax___webpack_require__$jscomp$69__code$$(13); | |
var $SyntaxCodeBlock$$ = function($_module$jscomp$6__module2$jscomp$6__quill$$) { | |
function $Syntax___webpack_require__$jscomp$69__code$$() { | |
$_classCallCheck$$(this, $Syntax___webpack_require__$jscomp$69__code$$); | |
return $_possibleConstructorReturn$$(this, ($Syntax___webpack_require__$jscomp$69__code$$.__proto__ || Object.getPrototypeOf($Syntax___webpack_require__$jscomp$69__code$$)).apply(this, arguments)); | |
} | |
$_inherits$$($Syntax___webpack_require__$jscomp$69__code$$, $_module$jscomp$6__module2$jscomp$6__quill$$); | |
$_createClass$$($Syntax___webpack_require__$jscomp$69__code$$, [{key:"replaceWith", value:function($_module$jscomp$6__module2$jscomp$6__quill$$) { | |
this.domNode.textContent = this.domNode.textContent; | |
this.attach(); | |
$_get$$($Syntax___webpack_require__$jscomp$69__code$$.prototype.__proto__ || Object.getPrototypeOf($Syntax___webpack_require__$jscomp$69__code$$.prototype), "replaceWith", this).call(this, $_module$jscomp$6__module2$jscomp$6__quill$$); | |
}}, {key:"highlight", value:function($_get$$) { | |
var $_module$jscomp$6__module2$jscomp$6__quill$$ = this.domNode.textContent; | |
if (this.cachedText !== $_module$jscomp$6__module2$jscomp$6__quill$$) { | |
if (0 < $_module$jscomp$6__module2$jscomp$6__quill$$.trim().length || null == this.cachedText) { | |
this.domNode.innerHTML = $_get$$($_module$jscomp$6__module2$jscomp$6__quill$$), this.domNode.normalize(), this.attach(); | |
} | |
this.cachedText = $_module$jscomp$6__module2$jscomp$6__quill$$; | |
} | |
}}]); | |
return $Syntax___webpack_require__$jscomp$69__code$$; | |
}($_interopRequireDefault$$($Syntax___webpack_require__$jscomp$69__code$$).default); | |
$SyntaxCodeBlock$$.className = "ql-syntax"; | |
var $CodeToken$$ = new $_parchment$jscomp$26__parchment2$jscomp$26_module$$.default.Attributor.Class("token", "hljs", {scope:$_parchment$jscomp$26__parchment2$jscomp$26_module$$.default.Scope.INLINE}); | |
$Syntax___webpack_require__$jscomp$69__code$$ = function($_get$$) { | |
function $_module$jscomp$6__module2$jscomp$6__quill$$($_get$$, $Syntax___webpack_require__$jscomp$69__code$$) { | |
$_classCallCheck$$(this, $_module$jscomp$6__module2$jscomp$6__quill$$); | |
var $_parchment$jscomp$26__parchment2$jscomp$26_module$$ = $_possibleConstructorReturn$$(this, ($_module$jscomp$6__module2$jscomp$6__quill$$.__proto__ || Object.getPrototypeOf($_module$jscomp$6__module2$jscomp$6__quill$$)).call(this, $_get$$, $Syntax___webpack_require__$jscomp$69__code$$)); | |
if ("function" !== typeof $_parchment$jscomp$26__parchment2$jscomp$26_module$$.options.highlight) { | |
throw Error("Syntax module requires highlight.js. Please include the library on the page before Quill."); | |
} | |
var $_createClass$$ = null; | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$.quill.on($_quill2$$.default.events.SCROLL_OPTIMIZE, function() { | |
clearTimeout($_createClass$$); | |
$_createClass$$ = setTimeout(function() { | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$.highlight(); | |
$_createClass$$ = null; | |
}, $_parchment$jscomp$26__parchment2$jscomp$26_module$$.options.interval); | |
}); | |
$_parchment$jscomp$26__parchment2$jscomp$26_module$$.highlight(); | |
return $_parchment$jscomp$26__parchment2$jscomp$26_module$$; | |
} | |
$_inherits$$($_module$jscomp$6__module2$jscomp$6__quill$$, $_get$$); | |
$_createClass$$($_module$jscomp$6__module2$jscomp$6__quill$$, null, [{key:"register", value:function() { | |
$_quill2$$.default.register($CodeToken$$, !0); | |
$_quill2$$.default.register($SyntaxCodeBlock$$, !0); | |
}}]); | |
$_createClass$$($_module$jscomp$6__module2$jscomp$6__quill$$, [{key:"highlight", value:function() { | |
var $_get$$ = this; | |
if (!this.quill.selection.composing) { | |
this.quill.update($_quill2$$.default.sources.USER); | |
var $_module$jscomp$6__module2$jscomp$6__quill$$ = this.quill.getSelection(); | |
this.quill.scroll.descendants($SyntaxCodeBlock$$).forEach(function($_module$jscomp$6__module2$jscomp$6__quill$$) { | |
$_module$jscomp$6__module2$jscomp$6__quill$$.highlight($_get$$.options.highlight); | |
}); | |
this.quill.update($_quill2$$.default.sources.SILENT); | |
null != $_module$jscomp$6__module2$jscomp$6__quill$$ && this.quill.setSelection($_module$jscomp$6__module2$jscomp$6__quill$$, $_quill2$$.default.sources.SILENT); | |
} | |
}}]); | |
return $_module$jscomp$6__module2$jscomp$6__quill$$; | |
}($_module$jscomp$6__module2$jscomp$6__quill$$.default); | |
$Syntax___webpack_require__$jscomp$69__code$$.DEFAULTS = {highlight:function() { | |
return null == window.hljs ? null : function($_get$$) { | |
return window.hljs.highlightAuto($_get$$).value; | |
}; | |
}(), interval:1000}; | |
$exports$$.CodeBlock = $SyntaxCodeBlock$$; | |
$exports$$.CodeToken = $CodeToken$$; | |
$exports$$.default = $Syntax___webpack_require__$jscomp$69__code$$; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d13 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d9 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d3 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d14 x2\x3d4 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d12 x2\x3d6 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d3 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d5 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d9 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d3 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d3 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d3 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cg class\x3d"ql-fill ql-color-label"\x3e \x3cpolygon points\x3d"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d4 y\x3d4\x3e\x3c/rect\x3e \x3cpolygon points\x3d"6.817 5 6 5 6 6 6.38 6 6.817 5"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d2 y\x3d6\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d3 y\x3d5\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d4 y\x3d7\x3e\x3c/rect\x3e \x3cpolygon points\x3d"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d2 y\x3d12\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d2 y\x3d9\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d2 y\x3d15\x3e\x3c/rect\x3e \x3cpolygon points\x3d"4.63 10 4 10 4 11 4.192 11 4.63 10"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d3 y\x3d8\x3e\x3c/rect\x3e \x3cpath d\x3dM10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z\x3e\x3c/path\x3e \x3cpath d\x3dM7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z\x3e\x3c/path\x3e \x3cpath d\x3dM8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d12 y\x3d2\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d11 y\x3d3\x3e\x3c/rect\x3e \x3cpath d\x3dM9,3H8V3.282A1.985,1.985,0,0,1,9,3Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d2 y\x3d3\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d6 y\x3d2\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d3 y\x3d2\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d5 y\x3d3\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d9 y\x3d2\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d15 y\x3d14\x3e\x3c/rect\x3e \x3cpolygon points\x3d"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"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d13 y\x3d7\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d15 y\x3d5\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d14 y\x3d6\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d15 y\x3d8\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d14 y\x3d9\x3e\x3c/rect\x3e \x3cpath d\x3dM3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d14 y\x3d3\x3e\x3c/rect\x3e \x3cpolygon points\x3d"12 6.868 12 6 11.62 6 12 6.868"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d15 y\x3d2\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d12 y\x3d5\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d13 y\x3d4\x3e\x3c/rect\x3e \x3cpolygon points\x3d"12.933 9 13 9 13 8 12.495 8 12.933 9"\x3e\x3c/polygon\x3e \x3crect height\x3d1 width\x3d1 x\x3d9 y\x3d14\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d8 y\x3d15\x3e\x3c/rect\x3e \x3cpath d\x3dM6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d5 y\x3d15\x3e\x3c/rect\x3e \x3cpath d\x3dM10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d11 y\x3d15\x3e\x3c/rect\x3e \x3cpath d\x3dM14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z\x3e\x3c/path\x3e \x3crect height\x3d1 width\x3d1 x\x3d14 y\x3d15\x3e\x3c/rect\x3e \x3crect height\x3d1 width\x3d1 x\x3d15 y\x3d11\x3e\x3c/rect\x3e \x3c/g\x3e \x3cpolyline class\x3dql-stroke points\x3d"5.5 13 9 5 12.5 13"\x3e\x3c/polyline\x3e \x3cline class\x3dql-stroke x1\x3d11.63 x2\x3d6.38 y1\x3d11 y2\x3d11\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3crect class\x3d"ql-fill ql-stroke" height\x3d3 width\x3d3 x\x3d4 y\x3d5\x3e\x3c/rect\x3e \x3crect class\x3d"ql-fill ql-stroke" height\x3d3 width\x3d3 x\x3d11 y\x3d5\x3e\x3c/rect\x3e \x3cpath class\x3d"ql-even ql-fill ql-stroke" d\x3dM7,8c0,4.031-3,5-3,5\x3e\x3c/path\x3e \x3cpath class\x3d"ql-even ql-fill ql-stroke" d\x3dM14,8c0,4.031-3,5-3,5\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-stroke d\x3dM5,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\x3e\x3c/path\x3e \x3cpath class\x3dql-stroke d\x3dM5,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\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg class\x3d"" viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d5 x2\x3d13 y1\x3d3 y2\x3d3\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d6 x2\x3d9.35 y1\x3d12 y2\x3d3\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d11 x2\x3d15 y1\x3d11 y2\x3d15\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d15 x2\x3d11 y1\x3d11 y2\x3d15\x3e\x3c/line\x3e \x3crect class\x3dql-fill height\x3d1 rx\x3d0.5 ry\x3d0.5 width\x3d7 x\x3d2 y\x3d14\x3e\x3c/rect\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3d"ql-color-label ql-stroke ql-transparent" x1\x3d3 x2\x3d15 y1\x3d15 y2\x3d15\x3e\x3c/line\x3e \x3cpolyline class\x3dql-stroke points\x3d"5.5 11 9 3 12.5 11"\x3e\x3c/polyline\x3e \x3cline class\x3dql-stroke x1\x3d11.63 x2\x3d6.38 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpolygon class\x3d"ql-stroke ql-fill" points\x3d"3 11 5 9 3 7 3 11"\x3e\x3c/polygon\x3e \x3cline class\x3d"ql-stroke ql-fill" x1\x3d15 x2\x3d11 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cpath class\x3dql-fill d\x3dM11,3a3,3,0,0,0,0,6h1V3H11Z\x3e\x3c/path\x3e \x3crect class\x3dql-fill height\x3d11 width\x3d1 x\x3d11 y\x3d4\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d11 width\x3d1 x\x3d13 y\x3d4\x3e\x3c/rect\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpolygon class\x3d"ql-stroke ql-fill" points\x3d"15 12 13 10 15 8 15 12"\x3e\x3c/polygon\x3e \x3cline class\x3d"ql-stroke ql-fill" x1\x3d9 x2\x3d5 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cpath class\x3dql-fill d\x3dM5,3A3,3,0,0,0,5,9H6V3H5Z\x3e\x3c/path\x3e \x3crect class\x3dql-fill height\x3d11 width\x3d1 x\x3d5 y\x3d4\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d11 width\x3d1 x\x3d7 y\x3d4\x3e\x3c/rect\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /\x3e \x3cpath class\x3dql-fill d\x3dM14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /\x3e \x3crect class\x3dql-fill x\x3d3 y\x3d6 width\x3d12 height\x3d6 rx\x3d1 ry\x3d1 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /\x3e \x3cpath class\x3dql-fill d\x3dM13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /\x3e \x3crect class\x3dql-fill x\x3d2 y\x3d6 width\x3d14 height\x3d6 rx\x3d1 ry\x3d1 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /\x3e \x3cpath class\x3dql-fill d\x3dM15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /\x3e \x3cpath class\x3dql-fill d\x3dM15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /\x3e \x3cpath class\x3dql-fill d\x3dM15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /\x3e \x3crect class\x3dql-fill x\x3d2 y\x3d6 width\x3d8 height\x3d6 rx\x3d1 ry\x3d1 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /\x3e \x3cpath class\x3dql-fill d\x3dM5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /\x3e \x3cpath class\x3dql-fill d\x3dM13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /\x3e \x3cpath class\x3dql-fill d\x3dM13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /\x3e \x3crect class\x3dql-fill x\x3d8 y\x3d6 width\x3d8 height\x3d6 rx\x3d1 ry\x3d1 transform\x3d"translate(24 18) rotate(-180)"/\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM11.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\x3e\x3c/path\x3e \x3crect class\x3dql-fill height\x3d1.6 rx\x3d0.8 ry\x3d0.8 width\x3d5 x\x3d5.15 y\x3d6.2\x3e\x3c/rect\x3e \x3cpath class\x3dql-fill d\x3dM13.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\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewBox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM10,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 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewBox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM16.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 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d7 x2\x3d13 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d5 x2\x3d11 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d8 x2\x3d10 y1\x3d14 y2\x3d4\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3crect class\x3dql-stroke height\x3d10 width\x3d12 x\x3d3 y\x3d4\x3e\x3c/rect\x3e \x3ccircle class\x3dql-fill cx\x3d6 cy\x3d7 r\x3d1\x3e\x3c/circle\x3e \x3cpolyline class\x3d"ql-even ql-fill" points\x3d"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"\x3e\x3c/polyline\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d15 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d15 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d9 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cpolyline class\x3d"ql-fill ql-stroke" points\x3d"3 7 3 11 5 9 3 7"\x3e\x3c/polyline\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d15 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d15 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d9 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cpolyline class\x3dql-stroke points\x3d"5 7 5 11 3 9 5 7"\x3e\x3c/polyline\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d7 x2\x3d11 y1\x3d7 y2\x3d11\x3e\x3c/line\x3e \x3cpath class\x3d"ql-even ql-stroke" d\x3dM8.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\x3e\x3c/path\x3e \x3cpath class\x3d"ql-even ql-stroke" d\x3dM13.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\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d7 x2\x3d15 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d7 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d7 x2\x3d15 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3d"ql-stroke ql-thin" x1\x3d2.5 x2\x3d4.5 y1\x3d5.5 y2\x3d5.5\x3e\x3c/line\x3e \x3cpath class\x3dql-fill d\x3dM3.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\x3e\x3c/path\x3e \x3cpath class\x3d"ql-stroke ql-thin" d\x3dM4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156\x3e\x3c/path\x3e \x3cpath class\x3d"ql-stroke ql-thin" d\x3dM2.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\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d6 x2\x3d15 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d6 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d6 x2\x3d15 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d3 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d3 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cline class\x3dql-stroke x1\x3d3 x2\x3d3 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg class\x3d"" viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3dql-stroke x1\x3d9 x2\x3d15 y1\x3d4 y2\x3d4\x3e\x3c/line\x3e \x3cpolyline class\x3dql-stroke points\x3d"3 4 4 5 6 3"\x3e\x3c/polyline\x3e \x3cline class\x3dql-stroke x1\x3d9 x2\x3d15 y1\x3d14 y2\x3d14\x3e\x3c/line\x3e \x3cpolyline class\x3dql-stroke points\x3d"3 14 4 15 6 13"\x3e\x3c/polyline\x3e \x3cline class\x3dql-stroke x1\x3d9 x2\x3d15 y1\x3d9 y2\x3d9\x3e\x3c/line\x3e \x3cpolyline class\x3dql-stroke points\x3d"3 9 4 10 6 8"\x3e\x3c/polyline\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM15.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 /\x3e \x3cpath class\x3dql-fill d\x3dM9.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 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-fill d\x3dM15.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 /\x3e \x3cpath class\x3dql-fill d\x3dM9.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 /\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cline class\x3d"ql-stroke ql-thin" x1\x3d15.5 x2\x3d2.5 y1\x3d8.5 y2\x3d9.5\x3e\x3c/line\x3e \x3cpath class\x3dql-fill d\x3dM9.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\x3e\x3c/path\x3e \x3cpath class\x3dql-fill d\x3dM8.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\x3e\x3c/path\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpath class\x3dql-stroke d\x3dM5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3\x3e\x3c/path\x3e \x3crect class\x3dql-fill height\x3d1 rx\x3d0.5 ry\x3d0.5 width\x3d12 x\x3d3 y\x3d15\x3e\x3c/rect\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3crect class\x3dql-stroke height\x3d12 width\x3d12 x\x3d3 y\x3d3\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d12 width\x3d1 x\x3d5 y\x3d3\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d12 width\x3d1 x\x3d12 y\x3d3\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d2 width\x3d8 x\x3d5 y\x3d8\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d3 y\x3d5\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d3 y\x3d7\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d3 y\x3d10\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d3 y\x3d12\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d12 y\x3d5\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d12 y\x3d7\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d12 y\x3d10\x3e\x3c/rect\x3e \x3crect class\x3dql-fill height\x3d1 width\x3d3 x\x3d12 y\x3d12\x3e\x3c/rect\x3e \x3c/svg\x3e'; | |
}, function($module$$, $exports$$) { | |
$module$$.exports = '\x3csvg viewbox\x3d"0 0 18 18"\x3e \x3cpolygon class\x3dql-stroke points\x3d"7 11 9 13 11 11 7 11"\x3e\x3c/polygon\x3e \x3cpolygon class\x3dql-stroke points\x3d"7 7 9 5 11 7 7 7"\x3e\x3c/polygon\x3e \x3c/svg\x3e'; | |
}, function($_extend$jscomp$6__extend2$jscomp$7_module$$, $exports$$, $BubbleTheme___webpack_require__$jscomp$70__icons$$) { | |
function $_interopRequireDefault$$($_createClass$$) { | |
return $_createClass$$ && $_createClass$$.__esModule ? $_createClass$$ : {default:$_createClass$$}; | |
} | |
function $_classCallCheck$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
if (!($_createClass$$ instanceof $_base$jscomp$1__emitter$$)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
function $_possibleConstructorReturn$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
if (!$_createClass$$) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return !$_base$jscomp$1__emitter$$ || "object" !== typeof $_base$jscomp$1__emitter$$ && "function" !== typeof $_base$jscomp$1__emitter$$ ? $_createClass$$ : $_base$jscomp$1__emitter$$; | |
} | |
function $_inherits$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
if ("function" !== typeof $_base$jscomp$1__emitter$$ && null !== $_base$jscomp$1__emitter$$) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof $_base$jscomp$1__emitter$$); | |
} | |
$_createClass$$.prototype = Object.create($_base$jscomp$1__emitter$$ && $_base$jscomp$1__emitter$$.prototype, {constructor:{value:$_createClass$$, enumerable:!1, writable:!0, configurable:!0}}); | |
$_base$jscomp$1__emitter$$ && (Object.setPrototypeOf ? Object.setPrototypeOf($_createClass$$, $_base$jscomp$1__emitter$$) : $_createClass$$.__proto__ = $_base$jscomp$1__emitter$$); | |
} | |
Object.defineProperty($exports$$, "__esModule", {value:!0}); | |
$exports$$.default = $exports$$.BubbleTooltip = void 0; | |
var $_get$$ = function $get$$($_createClass$$, $_base$jscomp$1__emitter$$, $BubbleTheme___webpack_require__$jscomp$70__icons$$) { | |
null === $_createClass$$ && ($_createClass$$ = Function.prototype); | |
var $_extend$jscomp$6__extend2$jscomp$7_module$$ = Object.getOwnPropertyDescriptor($_createClass$$, $_base$jscomp$1__emitter$$); | |
if (void 0 === $_extend$jscomp$6__extend2$jscomp$7_module$$) { | |
if ($_createClass$$ = Object.getPrototypeOf($_createClass$$), null !== $_createClass$$) { | |
return $get$$($_createClass$$, $_base$jscomp$1__emitter$$, $BubbleTheme___webpack_require__$jscomp$70__icons$$); | |
} | |
} else { | |
if ("value" in $_extend$jscomp$6__extend2$jscomp$7_module$$) { | |
return $_extend$jscomp$6__extend2$jscomp$7_module$$.value; | |
} | |
$_base$jscomp$1__emitter$$ = $_extend$jscomp$6__extend2$jscomp$7_module$$.get; | |
return void 0 === $_base$jscomp$1__emitter$$ ? void 0 : $_base$jscomp$1__emitter$$.call($BubbleTheme___webpack_require__$jscomp$70__icons$$); | |
} | |
}, $_createClass$$ = function() { | |
function $_createClass$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
for (var $BubbleTheme___webpack_require__$jscomp$70__icons$$ = 0; $BubbleTheme___webpack_require__$jscomp$70__icons$$ < $_base$jscomp$1__emitter$$.length; $BubbleTheme___webpack_require__$jscomp$70__icons$$++) { | |
var $_extend$jscomp$6__extend2$jscomp$7_module$$ = $_base$jscomp$1__emitter$$[$BubbleTheme___webpack_require__$jscomp$70__icons$$]; | |
$_extend$jscomp$6__extend2$jscomp$7_module$$.enumerable = $_extend$jscomp$6__extend2$jscomp$7_module$$.enumerable || !1; | |
$_extend$jscomp$6__extend2$jscomp$7_module$$.configurable = !0; | |
"value" in $_extend$jscomp$6__extend2$jscomp$7_module$$ && ($_extend$jscomp$6__extend2$jscomp$7_module$$.writable = !0); | |
Object.defineProperty($_createClass$$, $_extend$jscomp$6__extend2$jscomp$7_module$$.key, $_extend$jscomp$6__extend2$jscomp$7_module$$); | |
} | |
} | |
return function($_base$jscomp$1__emitter$$, $BubbleTheme___webpack_require__$jscomp$70__icons$$, $_extend$jscomp$6__extend2$jscomp$7_module$$) { | |
$BubbleTheme___webpack_require__$jscomp$70__icons$$ && $_createClass$$($_base$jscomp$1__emitter$$.prototype, $BubbleTheme___webpack_require__$jscomp$70__icons$$); | |
$_extend$jscomp$6__extend2$jscomp$7_module$$ && $_createClass$$($_base$jscomp$1__emitter$$, $_extend$jscomp$6__extend2$jscomp$7_module$$); | |
return $_base$jscomp$1__emitter$$; | |
}; | |
}(); | |
$_extend$jscomp$6__extend2$jscomp$7_module$$ = $BubbleTheme___webpack_require__$jscomp$70__icons$$(3); | |
$_extend$jscomp$6__extend2$jscomp$7_module$$ = $_interopRequireDefault$$($_extend$jscomp$6__extend2$jscomp$7_module$$); | |
var $_base$jscomp$1__emitter$$ = $BubbleTheme___webpack_require__$jscomp$70__icons$$(8), $_emitter2$$ = $_interopRequireDefault$$($_base$jscomp$1__emitter$$); | |
$_base$jscomp$1__emitter$$ = $BubbleTheme___webpack_require__$jscomp$70__icons$$(43); | |
var $_base2$$ = $_interopRequireDefault$$($_base$jscomp$1__emitter$$), $_selection$$ = $BubbleTheme___webpack_require__$jscomp$70__icons$$(15); | |
$BubbleTheme___webpack_require__$jscomp$70__icons$$ = $BubbleTheme___webpack_require__$jscomp$70__icons$$(41); | |
var $_icons2$$ = $_interopRequireDefault$$($BubbleTheme___webpack_require__$jscomp$70__icons$$), $TOOLBAR_CONFIG$$ = [["bold", "italic", "link"], [{header:1}, {header:2}, "blockquote"]]; | |
$BubbleTheme___webpack_require__$jscomp$70__icons$$ = function($_base$jscomp$1__emitter$$) { | |
function $BubbleTheme___webpack_require__$jscomp$70__icons$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
$_classCallCheck$$(this, $BubbleTheme___webpack_require__$jscomp$70__icons$$); | |
null != $_base$jscomp$1__emitter$$.modules.toolbar && null == $_base$jscomp$1__emitter$$.modules.toolbar.container && ($_base$jscomp$1__emitter$$.modules.toolbar.container = $TOOLBAR_CONFIG$$); | |
$_createClass$$ = $_possibleConstructorReturn$$(this, ($BubbleTheme___webpack_require__$jscomp$70__icons$$.__proto__ || Object.getPrototypeOf($BubbleTheme___webpack_require__$jscomp$70__icons$$)).call(this, $_createClass$$, $_base$jscomp$1__emitter$$)); | |
$_createClass$$.quill.container.classList.add("ql-bubble"); | |
return $_createClass$$; | |
} | |
$_inherits$$($BubbleTheme___webpack_require__$jscomp$70__icons$$, $_base$jscomp$1__emitter$$); | |
$_createClass$$($BubbleTheme___webpack_require__$jscomp$70__icons$$, [{key:"extendToolbar", value:function($_createClass$$) { | |
this.tooltip = new $BubbleTooltip$$(this.quill, this.options.bounds); | |
this.tooltip.root.appendChild($_createClass$$.container); | |
this.buildButtons([].slice.call($_createClass$$.container.querySelectorAll("button")), $_icons2$$.default); | |
this.buildPickers([].slice.call($_createClass$$.container.querySelectorAll("select")), $_icons2$$.default); | |
}}]); | |
return $BubbleTheme___webpack_require__$jscomp$70__icons$$; | |
}($_base2$$.default); | |
$BubbleTheme___webpack_require__$jscomp$70__icons$$.DEFAULTS = (0, $_extend$jscomp$6__extend2$jscomp$7_module$$.default)(!0, {}, $_base2$$.default.DEFAULTS, {modules:{toolbar:{handlers:{link:function($_createClass$$) { | |
$_createClass$$ ? this.quill.theme.tooltip.edit() : this.quill.format("link", !1); | |
}}}}}); | |
var $BubbleTooltip$$ = function($_base$jscomp$1__emitter$$) { | |
function $BubbleTheme___webpack_require__$jscomp$70__icons$$($_createClass$$, $_base$jscomp$1__emitter$$) { | |
$_classCallCheck$$(this, $BubbleTheme___webpack_require__$jscomp$70__icons$$); | |
var $_extend$jscomp$6__extend2$jscomp$7_module$$ = $_possibleConstructorReturn$$(this, ($BubbleTheme___webpack_require__$jscomp$70__icons$$.__proto__ || Object.getPrototypeOf($BubbleTheme___webpack_require__$jscomp$70__icons$$)).call(this, $_createClass$$, $_base$jscomp$1__emitter$$)); | |
$_extend$jscomp$6__extend2$jscomp$7_module$$.quill.on($_emitter2$$.default.events.EDITOR_CHANGE, function($_createClass$$, $_base$jscomp$1__emitter$$, $BubbleTheme___webpack_require__$jscomp$70__icons$$, $_get$$) { | |
$_createClass$$ === $_emitter2$$.default.events.SELECTION_CHANGE && (null != $_base$jscomp$1__emitter$$ && 0 < $_base$jscomp$1__emitter$$.length && $_get$$ === $_emitter2$$.default.sources.USER ? ($_extend$jscomp$6__extend2$jscomp$7_module$$.show(), $_extend$jscomp$6__extend2$jscomp$7_module$$.root.style.left = "0px", $_extend$jscomp$6__extend2$jscomp$7_module$$.root.style.width = "", $_extend$jscomp$6__extend2$jscomp$7_module$$.root.style.width = $_extend$jscomp$6__extend2$jscomp$7_module$$.root.offsetWidth + | |
"px", $_createClass$$ = $_extend$jscomp$6__extend2$jscomp$7_module$$.quill.getLines($_base$jscomp$1__emitter$$.index, $_base$jscomp$1__emitter$$.length), 1 === $_createClass$$.length ? $_extend$jscomp$6__extend2$jscomp$7_module$$.position($_extend$jscomp$6__extend2$jscomp$7_module$$.quill.getBounds($_base$jscomp$1__emitter$$)) : ($BubbleTheme___webpack_require__$jscomp$70__icons$$ = $_createClass$$[$_createClass$$.length - 1], $_createClass$$ = $_extend$jscomp$6__extend2$jscomp$7_module$$.quill.getIndex($BubbleTheme___webpack_require__$jscomp$70__icons$$), | |
$_base$jscomp$1__emitter$$ = Math.min($BubbleTheme___webpack_require__$jscomp$70__icons$$.length() - 1, $_base$jscomp$1__emitter$$.index + $_base$jscomp$1__emitter$$.length - $_createClass$$), $_base$jscomp$1__emitter$$ = $_extend$jscomp$6__extend2$jscomp$7_module$$.quill.getBounds(new $_selection$$.Range($_createClass$$, $_base$jscomp$1__emitter$$)), $_extend$jscomp$6__extend2$jscomp$7_module$$.position($_base$jscomp$1__emitter$$))) : document.activeElement !== $_extend$jscomp$6__extend2$jscomp$7_module$$.textbox && | |
$_extend$jscomp$6__extend2$jscomp$7_module$$.quill.hasFocus() && $_extend$jscomp$6__extend2$jscomp$7_module$$.hide()); | |
}); | |
return $_extend$jscomp$6__extend2$jscomp$7_module$$; | |
} | |
$_inherits$$($BubbleTheme___webpack_require__$jscomp$70__icons$$, $_base$jscomp$1__emitter$$); | |
$_createClass$$($BubbleTheme___webpack_require__$jscomp$70__icons$$, [{key:"listen", value:function() { | |
var $_createClass$$ = this; | |
$_get$$($BubbleTheme___webpack_require__$jscomp$70__icons$$.prototype.__proto__ || Object.getPrototypeOf($BubbleTheme___webpack_require__$jscomp$70__icons$$.prototype), "listen", this).call(this); | |
this.root.querySelector(".ql-close").addEventListener("click", function() { | |
$_createClass$$.root.classList.remove("ql-editing"); | |
}); | |
this.quill.on($_emitter2$$.default.events.SCROLL_OPTIMIZE, function() { | |
setTimeout(function() { | |
if (!$_createClass$$.root.classList.contains("ql-hidden")) { | |
var $_base$jscomp$1__emitter$$ = $_createClass$$.quill.getSelection(); | |
null != $_base$jscomp$1__emitter$$ && $_createClass$$.position($_createClass$$.quill.getBounds($_base$jscomp$1__emitter$$)); | |
} | |
}, 1); | |
}); | |
}}, {key:"cancel", value:function() { | |
this.show(); | |
}}, {key:"position", value:function($_createClass$$) { | |
$_createClass$$ = $_get$$($BubbleTheme___webpack_require__$jscomp$70__icons$$.prototype.__proto__ || Object.getPrototypeOf($BubbleTheme___webpack_require__$jscomp$70__icons$$.prototype), "position", this).call(this, $_createClass$$); | |
var $_base$jscomp$1__emitter$$ = this.root.querySelector(".ql-tooltip-arrow"); | |
$_base$jscomp$1__emitter$$.style.marginLeft = ""; | |
if (0 === $_createClass$$) { | |
return $_createClass$$; | |
} | |
$_base$jscomp$1__emitter$$.style.marginLeft = -1 * $_createClass$$ - $_base$jscomp$1__emitter$$.offsetWidth / 2 + "px"; | |
}}]); | |
return $BubbleTheme___webpack_require__$jscomp$70__icons$$; | |
}($_base$jscomp$1__emitter$$.BaseTooltip); | |
$BubbleTooltip$$.TEMPLATE = '\x3cspan class\x3d"ql-tooltip-arrow"\x3e\x3c/span\x3e\x3cdiv class\x3d"ql-tooltip-editor"\x3e\x3cinput type\x3d"text" data-formula\x3d"e\x3dmc^2" data-link\x3d"https://quilljs.com" data-video\x3d"Embed URL"\x3e\x3ca class\x3d"ql-close"\x3e\x3c/a\x3e\x3c/div\x3e'; | |
$exports$$.BubbleTooltip = $BubbleTooltip$$; | |
$exports$$.default = $BubbleTheme___webpack_require__$jscomp$70__icons$$; | |
}, function($module$$, $exports$$, $__webpack_require__$$) { | |
$module$$.exports = $__webpack_require__$$(63); | |
}])["default"]; | |
}); | |
}; | |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shadow$provide["module$node_modules$quill$dist$quill"] = function(global,require,module,exports) { | |
/*! | |
* Quill Editor v1.3.5 | |
* https://quilljs.com/ | |
* Copyright (c) 2014, Jason Chen | |
* Copyright (c) 2013, salesforce.com | |
*/ | |
(function webpackUniversalModuleDefinition(root, factory) { | |
if(typeof exports === 'object' && typeof module === 'object') | |
module.exports = factory(); | |
else if(typeof define === 'function' && define.amd) | |
define([], factory); | |
else if(typeof exports === 'object') | |
exports["Quill"] = factory(); | |
else | |
root["Quill"] = factory(); | |
})(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__(31); | |
var style_1 = __webpack_require__(32); | |
var store_1 = __webpack_require__(30); | |
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 delta = new Delta(); | |
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); | |
// 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 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); | |
}; | |
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 = target[name]; | |
copy = 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 | |
target[name] = extend(deep, clone, copy); | |
// Don't bring in undefined values | |
} else if (typeof copy !== 'undefined') { | |
target[name] = 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__(33); | |
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 ? 'dev' : "1.3.5"; | |
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__(23); | |
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__(29); | |
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__(30); | |
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__(29); | |
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 () { | |
return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a; | |
var _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'; | |
}; | |
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)) { | |
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__(24); | |
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 | |
}); | |
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; | |
/***/ }), | |
/* 24 */ | |
/***/ (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; | |
/***/ }), | |
/* 25 */ | |
/***/ (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; | |
/***/ }), | |
/* 26 */ | |
/***/ (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('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; | |
/***/ }), | |
/* 27 */ | |
/***/ (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 _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 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.container.classList.toggle('ql-expanded'); | |
}); | |
this.select.addEventListener('change', this.update.bind(this)); | |
} | |
_createClass(Picker, [{ | |
key: 'buildItem', | |
value: function buildItem(option) { | |
var _this2 = this; | |
var item = document.createElement('span'); | |
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); | |
}); | |
return item; | |
} | |
}, { | |
key: 'buildLabel', | |
value: function buildLabel() { | |
var label = document.createElement('span'); | |
label.classList.add('ql-picker-label'); | |
label.innerHTML = _dropdown2.default; | |
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'); | |
[].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: 'close', | |
value: function close() { | |
this.container.classList.remove('ql-expanded'); | |
} | |
}, { | |
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; | |
/***/ }), | |
/* 28 */ | |
/***/ (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__(24); | |
var _container2 = _interopRequireDefault(_container); | |
var _cursor = __webpack_require__(23); | |
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__(34); | |
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; | |
/***/ }), | |
/* 29 */ | |
/***/ (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.next == null || 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; | |
/***/ }), | |
/* 30 */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
var attributor_1 = __webpack_require__(12); | |
var class_1 = __webpack_require__(31); | |
var style_1 = __webpack_require__(32); | |
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; | |
/***/ }), | |
/* 31 */ | |
/***/ (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; | |
/***/ }), | |
/* 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 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; | |
/***/ }), | |
/* 33 */ | |
/***/ (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; | |
/***/ }), | |
/* 34 */ | |
/***/ (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; | |
/***/ }), | |
/* 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__(25); | |
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__(34); | |
var _keyboard2 = _interopRequireDefault(_keyboard); | |
var _theme = __webpack_require__(33); | |
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__(27); | |
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) { | |
// @ts-ignore | |
if (blot == null || blot === _this || 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 mo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment