travel/admin/node_modules/tui-editor/dist/tui-editor-Viewer-full.js

45859 lines
1.5 MiB
JavaScript
Raw Normal View History

2024-06-24 11:28:18 +08:00
/*!
* tui-editor
* @version 1.3.3
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
* @license MIT
*/
(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["Editor"] = factory();
else
root["tui"] = root["tui"] || {}, root["tui"]["Editor"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "dist/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 389);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Utilities
//
function _class(obj) { return Object.prototype.toString.call(obj); }
function isString(obj) { return _class(obj) === '[object String]'; }
var _hasOwnProperty = Object.prototype.hasOwnProperty;
function has(object, key) {
return _hasOwnProperty.call(object, key);
}
// Merge objects
//
function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
if (typeof source !== 'object') {
throw new TypeError(source + 'must be object');
}
Object.keys(source).forEach(function (key) {
obj[key] = source[key];
});
});
return obj;
}
// Remove element from array and put another array at those position.
// Useful for some operations with tokens
function arrayReplaceAt(src, pos, newElements) {
return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
}
////////////////////////////////////////////////////////////////////////////////
function isValidEntityCode(c) {
/*eslint no-bitwise:0*/
// broken sequence
if (c >= 0xD800 && c <= 0xDFFF) { return false; }
// never used
if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }
if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }
// control codes
if (c >= 0x00 && c <= 0x08) { return false; }
if (c === 0x0B) { return false; }
if (c >= 0x0E && c <= 0x1F) { return false; }
if (c >= 0x7F && c <= 0x9F) { return false; }
// out of range
if (c > 0x10FFFF) { return false; }
return true;
}
function fromCodePoint(c) {
/*eslint no-bitwise:0*/
if (c > 0xffff) {
c -= 0x10000;
var surrogate1 = 0xd800 + (c >> 10),
surrogate2 = 0xdc00 + (c & 0x3ff);
return String.fromCharCode(surrogate1, surrogate2);
}
return String.fromCharCode(c);
}
var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g;
var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
var entities = __webpack_require__(15);
function replaceEntityPattern(match, name) {
var code = 0;
if (has(entities, name)) {
return entities[name];
}
if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
code = name[1].toLowerCase() === 'x' ?
parseInt(name.slice(2), 16)
:
parseInt(name.slice(1), 10);
if (isValidEntityCode(code)) {
return fromCodePoint(code);
}
}
return match;
}
/*function replaceEntities(str) {
if (str.indexOf('&') < 0) { return str; }
return str.replace(ENTITY_RE, replaceEntityPattern);
}*/
function unescapeMd(str) {
if (str.indexOf('\\') < 0) { return str; }
return str.replace(UNESCAPE_MD_RE, '$1');
}
function unescapeAll(str) {
if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; }
return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {
if (escaped) { return escaped; }
return replaceEntityPattern(match, entity);
});
}
////////////////////////////////////////////////////////////////////////////////
var HTML_ESCAPE_TEST_RE = /[&<>"]/;
var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
var HTML_REPLACEMENTS = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;'
};
function replaceUnsafeChar(ch) {
return HTML_REPLACEMENTS[ch];
}
function escapeHtml(str) {
if (HTML_ESCAPE_TEST_RE.test(str)) {
return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
}
return str;
}
////////////////////////////////////////////////////////////////////////////////
var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
function escapeRE(str) {
return str.replace(REGEXP_ESCAPE_RE, '\\$&');
}
////////////////////////////////////////////////////////////////////////////////
function isSpace(code) {
switch (code) {
case 0x09:
case 0x20:
return true;
}
return false;
}
// Zs (unicode class) || [\t\f\v\r\n]
function isWhiteSpace(code) {
if (code >= 0x2000 && code <= 0x200A) { return true; }
switch (code) {
case 0x09: // \t
case 0x0A: // \n
case 0x0B: // \v
case 0x0C: // \f
case 0x0D: // \r
case 0x20:
case 0xA0:
case 0x1680:
case 0x202F:
case 0x205F:
case 0x3000:
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
/*eslint-disable max-len*/
var UNICODE_PUNCT_RE = __webpack_require__(8);
// Currently without astral characters support.
function isPunctChar(ch) {
return UNICODE_PUNCT_RE.test(ch);
}
// Markdown ASCII punctuation characters.
//
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
//
// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
//
function isMdAsciiPunct(ch) {
switch (ch) {
case 0x21/* ! */:
case 0x22/* " */:
case 0x23/* # */:
case 0x24/* $ */:
case 0x25/* % */:
case 0x26/* & */:
case 0x27/* ' */:
case 0x28/* ( */:
case 0x29/* ) */:
case 0x2A/* * */:
case 0x2B/* + */:
case 0x2C/* , */:
case 0x2D/* - */:
case 0x2E/* . */:
case 0x2F/* / */:
case 0x3A/* : */:
case 0x3B/* ; */:
case 0x3C/* < */:
case 0x3D/* = */:
case 0x3E/* > */:
case 0x3F/* ? */:
case 0x40/* @ */:
case 0x5B/* [ */:
case 0x5C/* \ */:
case 0x5D/* ] */:
case 0x5E/* ^ */:
case 0x5F/* _ */:
case 0x60/* ` */:
case 0x7B/* { */:
case 0x7C/* | */:
case 0x7D/* } */:
case 0x7E/* ~ */:
return true;
default:
return false;
}
}
// Hepler to unify [reference labels].
//
function normalizeReference(str) {
// use .toUpperCase() instead of .toLowerCase()
// here to avoid a conflict with Object.prototype
// members (most notably, `__proto__`)
return str.trim().replace(/\s+/g, ' ').toUpperCase();
}
////////////////////////////////////////////////////////////////////////////////
// Re-export libraries commonly used in both markdown-it and its plugins,
// so plugins won't have to depend on them explicitly, which reduces their
// bundled size (e.g. a browser build).
//
exports.lib = {};
exports.lib.mdurl = __webpack_require__(16);
exports.lib.ucmicro = __webpack_require__(42);
exports.assign = assign;
exports.isString = isString;
exports.has = has;
exports.unescapeMd = unescapeMd;
exports.unescapeAll = unescapeAll;
exports.isValidEntityCode = isValidEntityCode;
exports.fromCodePoint = fromCodePoint;
// exports.replaceEntities = replaceEntities;
exports.escapeHtml = escapeHtml;
exports.arrayReplaceAt = arrayReplaceAt;
exports.isSpace = isSpace;
exports.isWhiteSpace = isWhiteSpace;
exports.isMdAsciiPunct = isMdAsciiPunct;
exports.isPunctChar = isPunctChar;
exports.escapeRE = escapeRE;
exports.normalizeReference = normalizeReference;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
( function( global, factory ) {
"use strict";
if ( typeof module === "object" && typeof module.exports === "object" ) {
// For CommonJS and CommonJS-like environments where a proper `window`
// is present, execute the factory and get jQuery.
// For environments that do not have a `window` with a `document`
// (such as Node.js), expose a factory as module.exports.
// This accentuates the need for the creation of a real `window`.
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info.
module.exports = global.document ?
factory( global, true ) :
function( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a document" );
}
return factory( w );
};
} else {
factory( global );
}
// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
// enough that all such attempts are guarded in a try block.
"use strict";
var arr = [];
var document = window.document;
var getProto = Object.getPrototypeOf;
var slice = arr.slice;
var concat = arr.concat;
var push = arr.push;
var indexOf = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var fnToString = hasOwn.toString;
var ObjectFunctionString = fnToString.call( Object );
var support = {};
var isFunction = function isFunction( obj ) {
// Support: Chrome <=57, Firefox <=52
// In some browsers, typeof returns "function" for HTML <object> elements
// (i.e., `typeof document.createElement( "object" ) === "function"`).
// We don't want to classify *any* DOM node as a function.
return typeof obj === "function" && typeof obj.nodeType !== "number";
};
var isWindow = function isWindow( obj ) {
return obj != null && obj === obj.window;
};
var preservedScriptAttributes = {
type: true,
src: true,
noModule: true
};
function DOMEval( code, doc, node ) {
doc = doc || document;
var i,
script = doc.createElement( "script" );
script.text = code;
if ( node ) {
for ( i in preservedScriptAttributes ) {
if ( node[ i ] ) {
script[ i ] = node[ i ];
}
}
}
doc.head.appendChild( script ).parentNode.removeChild( script );
}
function toType( obj ) {
if ( obj == null ) {
return obj + "";
}
// Support: Android <=2.3 only (functionish RegExp)
return typeof obj === "object" || typeof obj === "function" ?
class2type[ toString.call( obj ) ] || "object" :
typeof obj;
}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module
var
version = "3.3.1",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
},
// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
jQuery.fn = jQuery.prototype = {
// The current version of jQuery being used
jquery: version,
constructor: jQuery,
// The default length of a jQuery object is 0
length: 0,
toArray: function() {
return slice.call( this );
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
// Return all the elements in a clean array
if ( num == null ) {
return slice.call( this );
}
// Return just the one element from the set
return num < 0 ? this[ num + this.length ] : this[ num ];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function( elems ) {
// Build a new jQuery matched element set
var ret = jQuery.merge( this.constructor(), elems );
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
// Return the newly-formed element set
return ret;
},
// Execute a callback for every element in the matched set.
each: function( callback ) {
return jQuery.each( this, callback );
},
map: function( callback ) {
return this.pushStack( jQuery.map( this, function( elem, i ) {
return callback.call( elem, i, elem );
} ) );
},
slice: function() {
return this.pushStack( slice.apply( this, arguments ) );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
eq: function( i ) {
var len = this.length,
j = +i + ( i < 0 ? len : 0 );
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
},
end: function() {
return this.prevObject || this.constructor();
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push: push,
sort: arr.sort,
splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
deep = target;
// Skip the boolean and the target
target = arguments[ i ] || {};
i++;
}
// Handle case when target is a string or something (possible in deep copy)
if ( typeof target !== "object" && !isFunction( target ) ) {
target = {};
}
// Extend jQuery itself if only one argument is passed
if ( i === length ) {
target = this;
i--;
}
for ( ; i < length; i++ ) {
// Only deal with non-null/undefined values
if ( ( options = arguments[ i ] ) != null ) {
// Extend the base object
for ( name in options ) {
src = target[ name ];
copy = options[ name ];
// Prevent never-ending loop
if ( target === copy ) {
continue;
}
// Recurse if we're merging plain objects or arrays
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
( copyIsArray = Array.isArray( copy ) ) ) ) {
if ( copyIsArray ) {
copyIsArray = false;
clone = src && Array.isArray( src ) ? src : [];
} else {
clone = src && jQuery.isPlainObject( src ) ? src : {};
}
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
// Don't bring in undefined values
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}
// Return the modified object
return target;
};
jQuery.extend( {
// Unique for each copy of jQuery on the page
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
// Assume jQuery is ready without the ready module
isReady: true,
error: function( msg ) {
throw new Error( msg );
},
noop: function() {},
isPlainObject: function( obj ) {
var proto, Ctor;
// Detect obvious negatives
// Use toString instead of jQuery.type to catch host objects
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
return false;
}
proto = getProto( obj );
// Objects with no prototype (e.g., `Object.create( null )`) are plain
if ( !proto ) {
return true;
}
// Objects with prototype are plain iff they were constructed by a global Object function
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
},
isEmptyObject: function( obj ) {
/* eslint-disable no-unused-vars */
// See https://github.com/eslint/eslint/issues/6125
var name;
for ( name in obj ) {
return false;
}
return true;
},
// Evaluates a script in a global context
globalEval: function( code ) {
DOMEval( code );
},
each: function( obj, callback ) {
var length, i = 0;
if ( isArrayLike( obj ) ) {
length = obj.length;
for ( ; i < length; i++ ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
} else {
for ( i in obj ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
}
return obj;
},
// Support: Android <=4.0 only
trim: function( text ) {
return text == null ?
"" :
( text + "" ).replace( rtrim, "" );
},
// results is for internal usage only
makeArray: function( arr, results ) {
var ret = results || [];
if ( arr != null ) {
if ( isArrayLike( Object( arr ) ) ) {
jQuery.merge( ret,
typeof arr === "string" ?
[ arr ] : arr
);
} else {
push.call( ret, arr );
}
}
return ret;
},
inArray: function( elem, arr, i ) {
return arr == null ? -1 : indexOf.call( arr, elem, i );
},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function( first, second ) {
var len = +second.length,
j = 0,
i = first.length;
for ( ; j < len; j++ ) {
first[ i++ ] = second[ j ];
}
first.length = i;
return first;
},
grep: function( elems, callback, invert ) {
var callbackInverse,
matches = [],
i = 0,
length = elems.length,
callbackExpect = !invert;
// Go through the array, only saving the items
// that pass the validator function
for ( ; i < length; i++ ) {
callbackInverse = !callback( elems[ i ], i );
if ( callbackInverse !== callbackExpect ) {
matches.push( elems[ i ] );
}
}
return matches;
},
// arg is for internal usage only
map: function( elems, callback, arg ) {
var length, value,
i = 0,
ret = [];
// Go through the array, translating each of the items to their new values
if ( isArrayLike( elems ) ) {
length = elems.length;
for ( ; i < length; i++ ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret.push( value );
}
}
// Go through every key on the object,
} else {
for ( i in elems ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret.push( value );
}
}
}
// Flatten any nested arrays
return concat.apply( [], ret );
},
// A global GUID counter for objects
guid: 1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support: support
} );
if ( typeof Symbol === "function" ) {
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}
// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
function( i, name ) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );
function isArrayLike( obj ) {
// Support: real iOS 8.2 only (not reproducible in simulator)
// `in` check used to prevent JIT error (gh-2145)
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
var length = !!obj && "length" in obj && obj.length,
type = toType( obj );
if ( isFunction( obj ) || isWindow( obj ) ) {
return false;
}
return type === "array" || length === 0 ||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/
(function( window ) {
var i,
support,
Expr,
getText,
isXML,
tokenize,
compile,
select,
outermostContext,
sortInput,
hasDuplicate,
// Local document vars
setDocument,
document,
docElem,
documentIsHTML,
rbuggyQSA,
rbuggyMatches,
matches,
contains,
// Instance-specific data
expando = "sizzle" + 1 * new Date(),
preferredDoc = window.document,
dirruns = 0,
done = 0,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
}
return 0;
},
// Instance methods
hasOwn = ({}).hasOwnProperty,
arr = [],
pop = arr.pop,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
// Use a stripped-down indexOf as it's faster than native
// https://jsperf.com/thor-indexof-vs-for/5
indexOf = function( list, elem ) {
var i = 0,
len = list.length;
for ( ; i < len; i++ ) {
if ( list[i] === elem ) {
return i;
}
}
return -1;
},
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
// Regular expressions
// http://www.w3.org/TR/css3-selectors/#whitespace
whitespace = "[\\x20\\t\\r\\n\\f]",
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
// Operator (capture 2)
"*([*^$|!~]?=)" + whitespace +
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
"*\\]",
pseudos = ":(" + identifier + ")(?:\\((" +
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
// 1. quoted (capture 3; capture 4 or capture 5)
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
// 2. simple (capture 6)
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
// 3. anything else (capture 2)
".*" +
")\\)|)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rwhitespace = new RegExp( whitespace + "+", "g" ),
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
rpseudo = new RegExp( pseudos ),
ridentifier = new RegExp( "^" + identifier + "$" ),
matchExpr = {
"ID": new RegExp( "^#(" + identifier + ")" ),
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,
rnative = /^[^{]+\{\s*\[native \w/,
// Easily-parseable/retrievable ID or TAG or CLASS selectors
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
// CSS escapes
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
funescape = function( _, escaped, escapedWhitespace ) {
var high = "0x" + escaped - 0x10000;
// NaN means non-codepoint
// Support: Firefox<24
// Workaround erroneous numeric interpretation of +"0x"
return high !== high || escapedWhitespace ?
escaped :
high < 0 ?
// BMP codepoint
String.fromCharCode( high + 0x10000 ) :
// Supplemental Plane codepoint (surrogate pair)
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
},
// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
fcssescape = function( ch, asCodePoint ) {
if ( asCodePoint ) {
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
if ( ch === "\0" ) {
return "\uFFFD";
}
// Control characters and (dependent upon position) numbers get escaped as code points
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
}
// Other potentially-special ASCII characters get backslash-escaped
return "\\" + ch;
},
// Used for iframes
// See setDocument()
// Removing the function wrapper causes a "Permission Denied"
// error in IE
unloadHandler = function() {
setDocument();
},
disabledAncestor = addCombinator(
function( elem ) {
return elem.disabled === true && ("form" in elem || "label" in elem);
},
{ dir: "parentNode", next: "legend" }
);
// Optimize for push.apply( _, NodeList )
try {
push.apply(
(arr = slice.call( preferredDoc.childNodes )),
preferredDoc.childNodes
);
// Support: Android<4.0
// Detect silently failing push.apply
arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
push = { apply: arr.length ?
// Leverage slice if possible
function( target, els ) {
push_native.apply( target, slice.call(els) );
} :
// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;
// Can't trust NodeList.length
while ( (target[j++] = els[i++]) ) {}
target.length = j - 1;
}
};
}
function Sizzle( selector, context, results, seed ) {
var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
nodeType = context ? context.nodeType : 9;
results = results || [];
// Return early from calls with invalid selector or context
if ( typeof selector !== "string" || !selector ||
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
return results;
}
// Try to shortcut find operations (as opposed to filters) in HTML documents
if ( !seed ) {
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
setDocument( context );
}
context = context || document;
if ( documentIsHTML ) {
// If the selector is sufficiently simple, try using a "get*By*" DOM method
// (excepting DocumentFragment context, where the methods don't exist)
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
// ID selector
if ( (m = match[1]) ) {
// Document context
if ( nodeType === 9 ) {
if ( (elem = context.getElementById( m )) ) {
// Support: IE, Opera, Webkit
// TODO: identify versions
// getElementById can match elements by name instead of ID
if ( elem.id === m ) {
results.push( elem );
return results;
}
} else {
return results;
}
// Element context
} else {
// Support: IE, Opera, Webkit
// TODO: identify versions
// getElementById can match elements by name instead of ID
if ( newContext && (elem = newContext.getElementById( m )) &&
contains( context, elem ) &&
elem.id === m ) {
results.push( elem );
return results;
}
}
// Type selector
} else if ( match[2] ) {
push.apply( results, context.getElementsByTagName( selector ) );
return results;
// Class selector
} else if ( (m = match[3]) && support.getElementsByClassName &&
context.getElementsByClassName ) {
push.apply( results, context.getElementsByClassName( m ) );
return results;
}
}
// Take advantage of querySelectorAll
if ( support.qsa &&
!compilerCache[ selector + " " ] &&
(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
if ( nodeType !== 1 ) {
newContext = context;
newSelector = selector;
// qSA looks outside Element context, which is not what we want
// Thanks to Andrew Dupont for this workaround technique
// Support: IE <=8
// Exclude object elements
} else if ( context.nodeName.toLowerCase() !== "object" ) {
// Capture the context ID, setting it first if necessary
if ( (nid = context.getAttribute( "id" )) ) {
nid = nid.replace( rcssescape, fcssescape );
} else {
context.setAttribute( "id", (nid = expando) );
}
// Prefix every selector in the list
groups = tokenize( selector );
i = groups.length;
while ( i-- ) {
groups[i] = "#" + nid + " " + toSelector( groups[i] );
}
newSelector = groups.join( "," );
// Expand context for sibling selectors
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
context;
}
if ( newSelector ) {
try {
push.apply( results,
newContext.querySelectorAll( newSelector )
);
return results;
} catch ( qsaError ) {
} finally {
if ( nid === expando ) {
context.removeAttribute( "id" );
}
}
}
}
}
}
// All others
return select( selector.replace( rtrim, "$1" ), context, results, seed );
}
/**
* Create key-value caches of limited size
* @returns {function(string, object)} Returns the Object data after storing it on itself with
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
* deleting the oldest entry
*/
function createCache() {
var keys = [];
function cache( key, value ) {
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
if ( keys.push( key + " " ) > Expr.cacheLength ) {
// Only keep the most recent entries
delete cache[ keys.shift() ];
}
return (cache[ key + " " ] = value);
}
return cache;
}
/**
* Mark a function for special use by Sizzle
* @param {Function} fn The function to mark
*/
function markFunction( fn ) {
fn[ expando ] = true;
return fn;
}
/**
* Support testing using an element
* @param {Function} fn Passed the created element and returns a boolean result
*/
function assert( fn ) {
var el = document.createElement("fieldset");
try {
return !!fn( el );
} catch (e) {
return false;
} finally {
// Remove from its parent by default
if ( el.parentNode ) {
el.parentNode.removeChild( el );
}
// release memory in IE
el = null;
}
}
/**
* Adds the same handler for all of the specified attrs
* @param {String} attrs Pipe-separated list of attributes
* @param {Function} handler The method that will be applied
*/
function addHandle( attrs, handler ) {
var arr = attrs.split("|"),
i = arr.length;
while ( i-- ) {
Expr.attrHandle[ arr[i] ] = handler;
}
}
/**
* Checks document order of two siblings
* @param {Element} a
* @param {Element} b
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
*/
function siblingCheck( a, b ) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
a.sourceIndex - b.sourceIndex;
// Use IE sourceIndex if available on both nodes
if ( diff ) {
return diff;
}
// Check if b follows a
if ( cur ) {
while ( (cur = cur.nextSibling) ) {
if ( cur === b ) {
return -1;
}
}
}
return a ? 1 : -1;
}
/**
* Returns a function to use in pseudos for input types
* @param {String} type
*/
function createInputPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === type;
};
}
/**
* Returns a function to use in pseudos for buttons
* @param {String} type
*/
function createButtonPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && elem.type === type;
};
}
/**
* Returns a function to use in pseudos for :enabled/:disabled
* @param {Boolean} disabled true for :disabled; false for :enabled
*/
function createDisabledPseudo( disabled ) {
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
return function( elem ) {
// Only certain elements can match :enabled or :disabled
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
if ( "form" in elem ) {
// Check for inherited disabledness on relevant non-disabled elements:
// * listed form-associated elements in a disabled fieldset
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
// * option elements in a disabled optgroup
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
// All such elements have a "form" property.
if ( elem.parentNode && elem.disabled === false ) {
// Option elements defer to a parent optgroup if present
if ( "label" in elem ) {
if ( "label" in elem.parentNode ) {
return elem.parentNode.disabled === disabled;
} else {
return elem.disabled === disabled;
}
}
// Support: IE 6 - 11
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
return elem.isDisabled === disabled ||
// Where there is no isDisabled, check manually
/* jshint -W018 */
elem.isDisabled !== !disabled &&
disabledAncestor( elem ) === disabled;
}
return elem.disabled === disabled;
// Try to winnow out elements that can't be disabled before trusting the disabled property.
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
// even exist on them, let alone have a boolean value.
} else if ( "label" in elem ) {
return elem.disabled === disabled;
}
// Remaining elements are neither :enabled nor :disabled
return false;
};
}
/**
* Returns a function to use in pseudos for positionals
* @param {Function} fn
*/
function createPositionalPseudo( fn ) {
return markFunction(function( argument ) {
argument = +argument;
return markFunction(function( seed, matches ) {
var j,
matchIndexes = fn( [], seed.length, argument ),
i = matchIndexes.length;
// Match elements found at the specified indexes
while ( i-- ) {
if ( seed[ (j = matchIndexes[i]) ] ) {
seed[j] = !(matches[j] = seed[j]);
}
}
});
});
}
/**
* Checks a node for validity as a Sizzle context
* @param {Element|Object=} context
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
*/
function testContext( context ) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
// Expose support vars for convenience
support = Sizzle.support = {};
/**
* Detects XML nodes
* @param {Element|Object} elem An element or a document
* @returns {Boolean} True iff elem is a non-HTML XML node
*/
isXML = Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
/**
* Sets document-related variables once based on the current document
* @param {Element|Object} [doc] An element or document object to use to set the document
* @returns {Object} Returns the current document
*/
setDocument = Sizzle.setDocument = function( node ) {
var hasCompare, subWindow,
doc = node ? node.ownerDocument || node : preferredDoc;
// Return early if doc is invalid or already selected
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
return document;
}
// Update global variables
document = doc;
docElem = document.documentElement;
documentIsHTML = !isXML( document );
// Support: IE 9-11, Edge
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
if ( preferredDoc !== document &&
(subWindow = document.defaultView) && subWindow.top !== subWindow ) {
// Support: IE 11, Edge
if ( subWindow.addEventListener ) {
subWindow.addEventListener( "unload", unloadHandler, false );
// Support: IE 9 - 10 only
} else if ( subWindow.attachEvent ) {
subWindow.attachEvent( "onunload", unloadHandler );
}
}
/* Attributes
---------------------------------------------------------------------- */
// Support: IE<8
// Verify that getAttribute really returns attributes and not properties
// (excepting IE8 booleans)
support.attributes = assert(function( el ) {
el.className = "i";
return !el.getAttribute("className");
});
/* getElement(s)By*
---------------------------------------------------------------------- */
// Check if getElementsByTagName("*") returns only elements
support.getElementsByTagName = assert(function( el ) {
el.appendChild( document.createComment("") );
return !el.getElementsByTagName("*").length;
});
// Support: IE<9
support.getElementsByClassName = rnative.test( document.getElementsByClassName );
// Support: IE<10
// Check if getElementById returns elements by name
// The broken getElementById methods don't pick up programmatically-set names,
// so use a roundabout getElementsByName test
support.getById = assert(function( el ) {
docElem.appendChild( el ).id = expando;
return !document.getElementsByName || !document.getElementsByName( expando ).length;
});
// ID filter and find
if ( support.getById ) {
Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
return elem.getAttribute("id") === attrId;
};
};
Expr.find["ID"] = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var elem = context.getElementById( id );
return elem ? [ elem ] : [];
}
};
} else {
Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
var node = typeof elem.getAttributeNode !== "undefined" &&
elem.getAttributeNode("id");
return node && node.value === attrId;
};
};
// Support: IE 6 - 7 only
// getElementById is not reliable as a find shortcut
Expr.find["ID"] = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var node, i, elems,
elem = context.getElementById( id );
if ( elem ) {
// Verify the id attribute
node = elem.getAttributeNode("id");
if ( node && node.value === id ) {
return [ elem ];
}
// Fall back on getElementsByName
elems = context.getElementsByName( id );
i = 0;
while ( (elem = elems[i++]) ) {
node = elem.getAttributeNode("id");
if ( node && node.value === id ) {
return [ elem ];
}
}
}
return [];
}
};
}
// Tag
Expr.find["TAG"] = support.getElementsByTagName ?
function( tag, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( tag );
// DocumentFragment nodes don't have gEBTN
} else if ( support.qsa ) {
return context.querySelectorAll( tag );
}
} :
function( tag, context ) {
var elem,
tmp = [],
i = 0,
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
results = context.getElementsByTagName( tag );
// Filter out possible comments
if ( tag === "*" ) {
while ( (elem = results[i++]) ) {
if ( elem.nodeType === 1 ) {
tmp.push( elem );
}
}
return tmp;
}
return results;
};
// Class
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
return context.getElementsByClassName( className );
}
};
/* QSA/matchesSelector
---------------------------------------------------------------------- */
// QSA and matchesSelector support
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
rbuggyMatches = [];
// qSa(:focus) reports false when true (Chrome 21)
// We allow this because of a bug in IE8/9 that throws an error
// whenever `document.activeElement` is accessed on an iframe
// So, we allow :focus to pass through QSA all the time to avoid the IE error
// See https://bugs.jquery.com/ticket/13378
rbuggyQSA = [];
if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
// Build QSA regex
// Regex strategy adopted from Diego Perini
assert(function( el ) {
// Select is set to empty string on purpose
// This is to test IE's treatment of not explicitly
// setting a boolean content attribute,
// since its presence should be enough
// https://bugs.jquery.com/ticket/12359
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
"<option selected=''></option></select>";
// Support: IE8, Opera 11-12.16
// Nothing should be selected when empty strings follow ^= or $= or *=
// The test attribute must be unknown in Opera but "safe" for WinRT
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
if ( el.querySelectorAll("[msallowcapture^='']").length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
}
// Support: IE8
// Boolean attributes and "value" are not treated correctly
if ( !el.querySelectorAll("[selected]").length ) {
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
}
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
rbuggyQSA.push("~=");
}
// Webkit/Opera - :checked should return selected option elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
// IE8 throws error here and will not see later tests
if ( !el.querySelectorAll(":checked").length ) {
rbuggyQSA.push(":checked");
}
// Support: Safari 8+, iOS 8+
// https://bugs.webkit.org/show_bug.cgi?id=136851
// In-page `selector#id sibling-combinator selector` fails
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
rbuggyQSA.push(".#.+[+~]");
}
});
assert(function( el ) {
el.innerHTML = "<a href='' disabled='disabled'></a>" +
"<select disabled='disabled'><option/></select>";
// Support: Windows 8 Native Apps
// The type and name attributes are restricted during .innerHTML assignment
var input = document.createElement("input");
input.setAttribute( "type", "hidden" );
el.appendChild( input ).setAttribute( "name", "D" );
// Support: IE8
// Enforce case-sensitivity of name attribute
if ( el.querySelectorAll("[name=d]").length ) {
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
}
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
// IE8 throws error here and will not see later tests
if ( el.querySelectorAll(":enabled").length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}
// Support: IE9-11+
// IE's :disabled selector does not pick up the children of disabled fieldsets
docElem.appendChild( el ).disabled = true;
if ( el.querySelectorAll(":disabled").length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}
// Opera 10-11 does not throw on post-comma invalid pseudos
el.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
});
}
if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector) )) ) {
assert(function( el ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call( el, "*" );
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( el, "[s!='']:x" );
rbuggyMatches.push( "!=", pseudos );
});
}
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
/* Contains
---------------------------------------------------------------------- */
hasCompare = rnative.test( docElem.compareDocumentPosition );
// Element contains another
// Purposefully self-exclusive
// As in, an element does not contain itself
contains = hasCompare || rnative.test( docElem.contains ) ?
function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && (
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
));
} :
function( a, b ) {
if ( b ) {
while ( (b = b.parentNode) ) {
if ( b === a ) {
return true;
}
}
}
return false;
};
/* Sorting
---------------------------------------------------------------------- */
// Document order sorting
sortOrder = hasCompare ?
function( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
hasDuplicate = true;
return 0;
}
// Sort on method existence if only one input has compareDocumentPosition
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if ( compare ) {
return compare;
}
// Calculate position if both inputs belong to the same document
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
a.compareDocumentPosition( b ) :
// Otherwise we know they are disconnected
1;
// Disconnected nodes
if ( compare & 1 ||
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
// Choose the first element that is related to our preferred document
if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
return -1;
}
if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
return 1;
}
// Maintain original order
return sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;
}
return compare & 4 ? -1 : 1;
} :
function( a, b ) {
// Exit early if the nodes are identical
if ( a === b ) {
hasDuplicate = true;
return 0;
}
var cur,
i = 0,
aup = a.parentNode,
bup = b.parentNode,
ap = [ a ],
bp = [ b ];
// Parentless nodes are either documents or disconnected
if ( !aup || !bup ) {
return a === document ? -1 :
b === document ? 1 :
aup ? -1 :
bup ? 1 :
sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;
// If the nodes are siblings, we can do a quick check
} else if ( aup === bup ) {
return siblingCheck( a, b );
}
// Otherwise we need full lists of their ancestors for comparison
cur = a;
while ( (cur = cur.parentNode) ) {
ap.unshift( cur );
}
cur = b;
while ( (cur = cur.parentNode) ) {
bp.unshift( cur );
}
// Walk down the tree looking for a discrepancy
while ( ap[i] === bp[i] ) {
i++;
}
return i ?
// Do a sibling check if the nodes have a common ancestor
siblingCheck( ap[i], bp[i] ) :
// Otherwise nodes in our document sort first
ap[i] === preferredDoc ? -1 :
bp[i] === preferredDoc ? 1 :
0;
};
return document;
};
Sizzle.matches = function( expr, elements ) {
return Sizzle( expr, null, null, elements );
};
Sizzle.matchesSelector = function( elem, expr ) {
// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}
// Make sure that attribute selectors are quoted
expr = expr.replace( rattributeQuotes, "='$1']" );
if ( support.matchesSelector && documentIsHTML &&
!compilerCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
try {
var ret = matches.call( elem, expr );
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || support.disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11 ) {
return ret;
}
} catch (e) {}
}
return Sizzle( expr, document, null, [ elem ] ).length > 0;
};
Sizzle.contains = function( context, elem ) {
// Set document vars if needed
if ( ( context.ownerDocument || context ) !== document ) {
setDocument( context );
}
return contains( context, elem );
};
Sizzle.attr = function( elem, name ) {
// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}
var fn = Expr.attrHandle[ name.toLowerCase() ],
// Don't get fooled by Object.prototype properties (jQuery #13807)
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
undefined;
return val !== undefined ?
val :
support.attributes || !documentIsHTML ?
elem.getAttribute( name ) :
(val = elem.getAttributeNode(name)) && val.specified ?
val.value :
null;
};
Sizzle.escape = function( sel ) {
return (sel + "").replace( rcssescape, fcssescape );
};
Sizzle.error = function( msg ) {
throw new Error( "Syntax error, unrecognized expression: " + msg );
};
/**
* Document sorting and removing duplicates
* @param {ArrayLike} results
*/
Sizzle.uniqueSort = function( results ) {
var elem,
duplicates = [],
j = 0,
i = 0;
// Unless we *know* we can detect duplicates, assume their presence
hasDuplicate = !support.detectDuplicates;
sortInput = !support.sortStable && results.slice( 0 );
results.sort( sortOrder );
if ( hasDuplicate ) {
while ( (elem = results[i++]) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
}
}
while ( j-- ) {
results.splice( duplicates[ j ], 1 );
}
}
// Clear input after sorting to release objects
// See https://github.com/jquery/sizzle/pull/225
sortInput = null;
return results;
};
/**
* Utility function for retrieving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
getText = Sizzle.getText = function( elem ) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;
if ( !nodeType ) {
// If no nodeType, this is expected to be an array
while ( (node = elem[i++]) ) {
// Do not traverse comment nodes
ret += getText( node );
}
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
// Use textContent for elements
// innerText usage removed for consistency of new lines (jQuery #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
} else {
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
// Do not include comment or processing instruction nodes
return ret;
};
Expr = Sizzle.selectors = {
// Can be adjusted by the user
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},
preFilter: {
"ATTR": function( match ) {
match[1] = match[1].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
if ( match[2] === "~=" ) {
match[3] = " " + match[3] + " ";
}
return match.slice( 0, 4 );
},
"CHILD": function( match ) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
4 xn-component of xn+y argument ([+-]?\d*n|)
5 sign of xn-component
6 x of xn-component
7 sign of y-component
8 y of y-component
*/
match[1] = match[1].toLowerCase();
if ( match[1].slice( 0, 3 ) === "nth" ) {
// nth-* requires argument
if ( !match[3] ) {
Sizzle.error( match[0] );
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
// other types prohibit arguments
} else if ( match[3] ) {
Sizzle.error( match[0] );
}
return match;
},
"PSEUDO": function( match ) {
var excess,
unquoted = !match[6] && match[2];
if ( matchExpr["CHILD"].test( match[0] ) ) {
return null;
}
// Accept quoted arguments as-is
if ( match[3] ) {
match[2] = match[4] || match[5] || "";
// Strip excess characters from unquoted arguments
} else if ( unquoted && rpseudo.test( unquoted ) &&
// Get excess from tokenize (recursively)
(excess = tokenize( unquoted, true )) &&
// advance to the next closing parenthesis
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
// excess is a negative index
match[0] = match[0].slice( 0, excess );
match[2] = unquoted.slice( 0, excess );
}
// Return only captures needed by the pseudo filter method (type and argument)
return match.slice( 0, 3 );
}
},
filter: {
"TAG": function( nodeNameSelector ) {
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
return nodeNameSelector === "*" ?
function() { return true; } :
function( elem ) {
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
};
},
"CLASS": function( className ) {
var pattern = classCache[ className + " " ];
return pattern ||
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
classCache( className, function( elem ) {
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
});
},
"ATTR": function( name, operator, check ) {
return function( elem ) {
var result = Sizzle.attr( elem, name );
if ( result == null ) {
return operator === "!=";
}
if ( !operator ) {
return true;
}
result += "";
return operator === "=" ? result === check :
operator === "!=" ? result !== check :
operator === "^=" ? check && result.indexOf( check ) === 0 :
operator === "*=" ? check && result.indexOf( check ) > -1 :
operator === "$=" ? check && result.slice( -check.length ) === check :
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
false;
};
},
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
return first === 1 && last === 0 ?
// Shortcut for :nth-*(n)
function( elem ) {
return !!elem.parentNode;
} :
function( elem, context, xml ) {
var cache, uniqueCache, outerCache, node, nodeIndex, start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
useCache = !xml && !ofType,
diff = false;
if ( parent ) {
// :(first|last|only)-(child|of-type)
if ( simple ) {
while ( dir ) {
node = elem;
while ( (node = node[ dir ]) ) {
if ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) {
return false;
}
}
// Reverse direction for :only-* (if we haven't yet done so)
start = dir = type === "only" && !start && "nextSibling";
}
return true;
}
start = [ forward ? parent.firstChild : parent.lastChild ];
// non-xml :nth-child(...) stores cache data on `parent`
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
// ...in a gzip-friendly way
node = parent;
outerCache = node[ expando ] || (node[ expando ] = {});
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
(outerCache[ node.uniqueID ] = {});
cache = uniqueCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
diff = nodeIndex && cache[ 2 ];
node = nodeIndex && parent.childNodes[ nodeIndex ];
while ( (node = ++nodeIndex && node && node[ dir ] ||
// Fallback to seeking `elem` from the start
(diff = nodeIndex = 0) || start.pop()) ) {
// When found, cache indexes on `parent` and break
if ( node.nodeType === 1 && ++diff && node === elem ) {
uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
break;
}
}
} else {
// Use previously-cached element index if available
if ( useCache ) {
// ...in a gzip-friendly way
node = elem;
outerCache = node[ expando ] || (node[ expando ] = {});
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
(outerCache[ node.uniqueID ] = {});
cache = uniqueCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
diff = nodeIndex;
}
// xml :nth-child(...)
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
if ( diff === false ) {
// Use the same loop as above to seek `elem` from the start
while ( (node = ++nodeIndex && node && node[ dir ] ||
(diff = nodeIndex = 0) || start.pop()) ) {
if ( ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) &&
++diff ) {
// Cache the index of each encountered element
if ( useCache ) {
outerCache = node[ expando ] || (node[ expando ] = {});
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
(outerCache[ node.uniqueID ] = {});
uniqueCache[ type ] = [ dirruns, diff ];
}
if ( node === elem ) {
break;
}
}
}
}
}
// Incorporate the offset, then check against cycle size
diff -= last;
return diff === first || ( diff % first === 0 && diff / first >= 0 );
}
};
},
"PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
Sizzle.error( "unsupported pseudo: " + pseudo );
// The user may use createPseudo to indicate that
// arguments are needed to create the filter function
// just as Sizzle does
if ( fn[ expando ] ) {
return fn( argument );
}
// But maintain support for old signatures
if ( fn.length > 1 ) {
args = [ pseudo, pseudo, "", argument ];
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
markFunction(function( seed, matches ) {
var idx,
matched = fn( seed, argument ),
i = matched.length;
while ( i-- ) {
idx = indexOf( seed, matched[i] );
seed[ idx ] = !( matches[ idx ] = matched[i] );
}
}) :
function( elem ) {
return fn( elem, 0, args );
};
}
return fn;
}
},
pseudos: {
// Potentially complex pseudos
"not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
var input = [],
results = [],
matcher = compile( selector.replace( rtrim, "$1" ) );
return matcher[ expando ] ?
markFunction(function( seed, matches, context, xml ) {
var elem,
unmatched = matcher( seed, null, xml, [] ),
i = seed.length;
// Match elements unmatched by `matcher`
while ( i-- ) {
if ( (elem = unmatched[i]) ) {
seed[i] = !(matches[i] = elem);
}
}
}) :
function( elem, context, xml ) {
input[0] = elem;
matcher( input, null, xml, results );
// Don't keep the element (issue #299)
input[0] = null;
return !results.pop();
};
}),
"has": markFunction(function( selector ) {
return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
}),
"contains": markFunction(function( text ) {
text = text.replace( runescape, funescape );
return function( elem ) {
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
};
}),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
"lang": markFunction( function( lang ) {
// lang value must be a valid identifier
if ( !ridentifier.test(lang || "") ) {
Sizzle.error( "unsupported lang: " + lang );
}
lang = lang.replace( runescape, funescape ).toLowerCase();
return function( elem ) {
var elemLang;
do {
if ( (elemLang = documentIsHTML ?
elem.lang :
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
}
} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
return false;
};
}),
// Miscellaneous
"target": function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},
"root": function( elem ) {
return elem === docElem;
},
"focus": function( elem ) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
"enabled": createDisabledPseudo( false ),
"disabled": createDisabledPseudo( true ),
"checked": function( elem ) {
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
},
"selected": function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
// nodeType < 6 works because attributes (2) do not appear as children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
if ( elem.nodeType < 6 ) {
return false;
}
}
return true;
},
"parent": function( elem ) {
return !Expr.pseudos["empty"]( elem );
},
// Element/input types
"header": function( elem ) {
return rheader.test( elem.nodeName );
},
"input": function( elem ) {
return rinputs.test( elem.nodeName );
},
"button": function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name === "button";
},
"text": function( elem ) {
var attr;
return elem.nodeName.toLowerCase() === "input" &&
elem.type === "text" &&
// Support: IE<8
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
},
// Position-in-collection
"first": createPositionalPseudo(function() {
return [ 0 ];
}),
"last": createPositionalPseudo(function( matchIndexes, length ) {
return [ length - 1 ];
}),
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
}),
"even": createPositionalPseudo(function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"odd": createPositionalPseudo(function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
}
return matchIndexes;
})
}
};
Expr.pseudos["nth"] = Expr.pseudos["eq"];
// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
Expr.pseudos[ i ] = createButtonPseudo( i );
}
// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
if ( cached ) {
return parseOnly ? 0 : cached.slice( 0 );
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while ( soFar ) {
// Comma and first run
if ( !matched || (match = rcomma.exec( soFar )) ) {
if ( match ) {
// Don't consume trailing commas as valid
soFar = soFar.slice( match[0].length ) || soFar;
}
groups.push( (tokens = []) );
}
matched = false;
// Combinators
if ( (match = rcombinators.exec( soFar )) ) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace( rtrim, " " )
});
soFar = soFar.slice( matched.length );
}
// Filters
for ( type in Expr.filter ) {
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
(match = preFilters[ type ]( match ))) ) {
matched = match.shift();
tokens.push({
value: matched,
type: type,
matches: match
});
soFar = soFar.slice( matched.length );
}
}
if ( !matched ) {
break;
}
}
// Return the length of the invalid excess
// if we're just parsing
// Otherwise, throw an error or return tokens
return parseOnly ?
soFar.length :
soFar ?
Sizzle.error( selector ) :
// Cache the tokens
tokenCache( selector, groups ).slice( 0 );
};
function toSelector( tokens ) {
var i = 0,
len = tokens.length,
selector = "";
for ( ; i < len; i++ ) {
selector += tokens[i].value;
}
return selector;
}
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
skip = combinator.next,
key = skip || dir,
checkNonElements = base && key === "parentNode",
doneName = done++;
return combinator.first ?
// Check against closest ancestor/preceding element
function( elem, context, xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
return matcher( elem, context, xml );
}
}
return false;
} :
// Check against all ancestor/preceding elements
function( elem, context, xml ) {
var oldCache, uniqueCache, outerCache,
newCache = [ dirruns, doneName ];
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
if ( xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
if ( matcher( elem, context, xml ) ) {
return true;
}
}
}
} else {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
outerCache = elem[ expando ] || (elem[ expando ] = {});
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
if ( skip && skip === elem.nodeName.toLowerCase() ) {
elem = elem[ dir ] || elem;
} else if ( (oldCache = uniqueCache[ key ]) &&
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
// Assign to newCache so results back-propagate to previous elements
return (newCache[ 2 ] = oldCache[ 2 ]);
} else {
// Reuse newcache so results back-propagate to previous elements
uniqueCache[ key ] = newCache;
// A match means we're done; a fail means we have to keep checking
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
return true;
}
}
}
}
}
return false;
};
}
function elementMatcher( matchers ) {
return matchers.length > 1 ?
function( elem, context, xml ) {
var i = matchers.length;
while ( i-- ) {
if ( !matchers[i]( elem, context, xml ) ) {
return false;
}
}
return true;
} :
matchers[0];
}
function multipleContexts( selector, contexts, results ) {
var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
Sizzle( selector, contexts[i], results );
}
return results;
}
function condense( unmatched, map, filter, context, xml ) {
var elem,
newUnmatched = [],
i = 0,
len = unmatched.length,
mapped = map != null;
for ( ; i < len; i++ ) {
if ( (elem = unmatched[i]) ) {
if ( !filter || filter( elem, context, xml ) ) {
newUnmatched.push( elem );
if ( mapped ) {
map.push( i );
}
}
}
}
return newUnmatched;
}
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
postFinder = setMatcher( postFinder, postSelector );
}
return markFunction(function( seed, results, context, xml ) {
var temp, i, elem,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
condense( elems, preMap, preFilter, context, xml ) :
elems,
matcherOut = matcher ?
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
// ...intermediate processing is necessary
[] :
// ...otherwise use results directly
results :
matcherIn;
// Find primary matches
if ( matcher ) {
matcher( matcherIn, matcherOut, context, xml );
}
// Apply postFilter
if ( postFilter ) {
temp = condense( matcherOut, postMap );
postFilter( temp, [], context, xml );
// Un-match failing elements by moving them back to matcherIn
i = temp.length;
while ( i-- ) {
if ( (elem = temp[i]) ) {
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
}
}
}
if ( seed ) {
if ( postFinder || preFilter ) {
if ( postFinder ) {
// Get the final matcherOut by condensing this intermediate into postFinder contexts
temp = [];
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) ) {
// Restore matcherIn since elem is not yet a final match
temp.push( (matcherIn[i] = elem) );
}
}
postFinder( null, (matcherOut = []), temp, xml );
}
// Move matched elements from seed to results to keep them synchronized
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) &&
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
seed[temp] = !(results[temp] = elem);
}
}
}
// Add elements to results, through postFinder if defined
} else {
matcherOut = condense(
matcherOut === results ?
matcherOut.splice( preexisting, matcherOut.length ) :
matcherOut
);
if ( postFinder ) {
postFinder( null, results, matcherOut, xml );
} else {
push.apply( results, matcherOut );
}
}
});
}
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
i = leadingRelative ? 1 : 0,
// The foundational matcher ensures that elements are reachable from top-level context(s)
matchContext = addCombinator( function( elem ) {
return elem === checkContext;
}, implicitRelative, true ),
matchAnyContext = addCombinator( function( elem ) {
return indexOf( checkContext, elem ) > -1;
}, implicitRelative, true ),
matchers = [ function( elem, context, xml ) {
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
(checkContext = context).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
// Avoid hanging onto element (issue #299)
checkContext = null;
return ret;
} ];
for ( ; i < len; i++ ) {
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
} else {
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
// Return special upon seeing a positional matcher
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
}
return setMatcher(
i > 1 && elementMatcher( matchers ),
i > 1 && toSelector(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
).replace( rtrim, "$1" ),
matcher,
i < j && matcherFromTokens( tokens.slice( i, j ) ),
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
j < len && toSelector( tokens )
);
}
matchers.push( matcher );
}
}
return elementMatcher( matchers );
}
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
// We must always have either seed elements or outermost context
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
// Use integer dirruns iff this is the outermost matcher
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
len = elems.length;
if ( outermost ) {
outermostContext = context === document || context || outermost;
}
// Add elements passing elementMatchers directly to results
// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
if ( !context && elem.ownerDocument !== document ) {
setDocument( elem );
xml = !documentIsHTML;
}
while ( (matcher = elementMatchers[j++]) ) {
if ( matcher( elem, context || document, xml) ) {
results.push( elem );
break;
}
}
if ( outermost ) {
dirruns = dirrunsUnique;
}
}
// Track unmatched elements for set filters
if ( bySet ) {
// They will have gone through all possible matchers
if ( (elem = !matcher && elem) ) {
matchedCount--;
}
// Lengthen the array for every element, matched or not
if ( seed ) {
unmatched.push( elem );
}
}
}
// `i` is now the count of elements visited above, and adding it to `matchedCount`
// makes the latter nonnegative.
matchedCount += i;
// Apply set filters to unmatched elements
// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
// no element matchers and no seed.
// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
// case, which will result in a "00" `matchedCount` that differs from `i` but is also
// numerically zero.
if ( bySet && i !== matchedCount ) {
j = 0;
while ( (matcher = setMatchers[j++]) ) {
matcher( unmatched, setMatched, context, xml );
}
if ( seed ) {
// Reintegrate element matches to eliminate the need for sorting
if ( matchedCount > 0 ) {
while ( i-- ) {
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
}
}
// Discard index placeholder values to get only actual matches
setMatched = condense( setMatched );
}
// Add matches to results
push.apply( results, setMatched );
// Seedless set matches succeeding multiple successful matchers stipulate sorting
if ( outermost && !seed && setMatched.length > 0 &&
( matchedCount + setMatchers.length ) > 1 ) {
Sizzle.uniqueSort( results );
}
}
// Override manipulation of globals by nested matchers
if ( outermost ) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ?
markFunction( superMatcher ) :
superMatcher;
}
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
var i,
setMatchers = [],
elementMatchers = [],
cached = compilerCache[ selector + " " ];
if ( !cached ) {
// Generate a function of recursive functions that can be used to check each element
if ( !match ) {
match = tokenize( selector );
}
i = match.length;
while ( i-- ) {
cached = matcherFromTokens( match[i] );
if ( cached[ expando ] ) {
setMatchers.push( cached );
} else {
elementMatchers.push( cached );
}
}
// Cache the compiled function
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
// Save selector and tokenization
cached.selector = selector;
}
return cached;
};
/**
* A low-level selection function that works with Sizzle's compiled
* selector functions
* @param {String|Function} selector A selector or a pre-compiled
* selector function built with Sizzle.compile
* @param {Element} context
* @param {Array} [results]
* @param {Array} [seed] A set of elements to match against
*/
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
results = results || [];
// Try to minimize operations if there is only one selector in the list and no seed
// (the latter of which guarantees us context)
if ( match.length === 1 ) {
// Reduce context if the leading compound selector is an ID
tokens = match[0] = match[0].slice( 0 );
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
if ( !context ) {
return results;
// Precompiled matchers will still verify ancestry, so step up a level
} else if ( compiled ) {
context = context.parentNode;
}
selector = selector.slice( tokens.shift().value.length );
}
// Fetch a seed set for right-to-left matching
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
while ( i-- ) {
token = tokens[i];
// Abort if we hit a combinator
if ( Expr.relative[ (type = token.type) ] ) {
break;
}
if ( (find = Expr.find[ type ]) ) {
// Search, expanding context for leading sibling combinators
if ( (seed = find(
token.matches[0].replace( runescape, funescape ),
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
)) ) {
// If seed is empty or no tokens remain, we can return early
tokens.splice( i, 1 );
selector = seed.length && toSelector( tokens );
if ( !selector ) {
push.apply( results, seed );
return results;
}
break;
}
}
}
}
// Compile and execute a filtering function if one is not provided
// Provide `match` to avoid retokenization if we modified the selector above
( compiled || compile( selector, match ) )(
seed,
context,
!documentIsHTML,
results,
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
);
return results;
};
// One-time assignments
// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;
// Initialize against the default document
setDocument();
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( el ) {
// Should return 1, but returns 4 (following)
return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
});
// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( el ) {
el.innerHTML = "<a href='#'></a>";
return el.firstChild.getAttribute("href") === "#" ;
}) ) {
addHandle( "type|href|height|width", function( elem, name, isXML ) {
if ( !isXML ) {
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
}
});
}
// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( el ) {
el.innerHTML = "<input/>";
el.firstChild.setAttribute( "value", "" );
return el.firstChild.getAttribute( "value" ) === "";
}) ) {
addHandle( "value", function( elem, name, isXML ) {
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
return elem.defaultValue;
}
});
}
// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( el ) {
return el.getAttribute("disabled") == null;
}) ) {
addHandle( booleans, function( elem, name, isXML ) {
var val;
if ( !isXML ) {
return elem[ name ] === true ? name.toLowerCase() :
(val = elem.getAttributeNode( name )) && val.specified ?
val.value :
null;
}
});
}
return Sizzle;
})( window );
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
jQuery.escapeSelector = Sizzle.escape;
var dir = function( elem, dir, until ) {
var matched = [],
truncate = until !== undefined;
while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
if ( elem.nodeType === 1 ) {
if ( truncate && jQuery( elem ).is( until ) ) {
break;
}
matched.push( elem );
}
}
return matched;
};
var siblings = function( n, elem ) {
var matched = [];
for ( ; n; n = n.nextSibling ) {
if ( n.nodeType === 1 && n !== elem ) {
matched.push( n );
}
}
return matched;
};
var rneedsContext = jQuery.expr.match.needsContext;
function nodeName( elem, name ) {
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
};
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
if ( isFunction( qualifier ) ) {
return jQuery.grep( elements, function( elem, i ) {
return !!qualifier.call( elem, i, elem ) !== not;
} );
}
// Single element
if ( qualifier.nodeType ) {
return jQuery.grep( elements, function( elem ) {
return ( elem === qualifier ) !== not;
} );
}
// Arraylike of elements (jQuery, arguments, Array)
if ( typeof qualifier !== "string" ) {
return jQuery.grep( elements, function( elem ) {
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
} );
}
// Filtered directly for both simple and complex selectors
return jQuery.filter( qualifier, elements, not );
}
jQuery.filter = function( expr, elems, not ) {
var elem = elems[ 0 ];
if ( not ) {
expr = ":not(" + expr + ")";
}
if ( elems.length === 1 && elem.nodeType === 1 ) {
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
}
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
return elem.nodeType === 1;
} ) );
};
jQuery.fn.extend( {
find: function( selector ) {
var i, ret,
len = this.length,
self = this;
if ( typeof selector !== "string" ) {
return this.pushStack( jQuery( selector ).filter( function() {
for ( i = 0; i < len; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
return true;
}
}
} ) );
}
ret = this.pushStack( [] );
for ( i = 0; i < len; i++ ) {
jQuery.find( selector, self[ i ], ret );
}
return len > 1 ? jQuery.uniqueSort( ret ) : ret;
},
filter: function( selector ) {
return this.pushStack( winnow( this, selector || [], false ) );
},
not: function( selector ) {
return this.pushStack( winnow( this, selector || [], true ) );
},
is: function( selector ) {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test( selector ) ?
jQuery( selector ) :
selector || [],
false
).length;
}
} );
// Initialize a jQuery object
// A central reference to the root jQuery(document)
var rootjQuery,
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
// Shortcut simple #id case for speed
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
init = jQuery.fn.init = function( selector, context, root ) {
var match, elem;
// HANDLE: $(""), $(null), $(undefined), $(false)
if ( !selector ) {
return this;
}
// Method init() accepts an alternate rootjQuery
// so migrate can support jQuery.sub (gh-2101)
root = root || rootjQuery;
// Handle HTML strings
if ( typeof selector === "string" ) {
if ( selector[ 0 ] === "<" &&
selector[ selector.length - 1 ] === ">" &&
selector.length >= 3 ) {
// Assume that strings that start and end with <> are HTML and skip the regex check
match = [ null, selector, null ];
} else {
match = rquickExpr.exec( selector );
}
// Match html or make sure no context is specified for #id
if ( match && ( match[ 1 ] || !context ) ) {
// HANDLE: $(html) -> $(array)
if ( match[ 1 ] ) {
context = context instanceof jQuery ? context[ 0 ] : context;
// Option to run scripts is true for back-compat
// Intentionally let the error be thrown if parseHTML is not present
jQuery.merge( this, jQuery.parseHTML(
match[ 1 ],
context && context.nodeType ? context.ownerDocument || context : document,
true
) );
// HANDLE: $(html, props)
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
for ( match in context ) {
// Properties of context are called as methods if possible
if ( isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
// ...and otherwise set as attributes
} else {
this.attr( match, context[ match ] );
}
}
}
return this;
// HANDLE: $(#id)
} else {
elem = document.getElementById( match[ 2 ] );
if ( elem ) {
// Inject the element directly into the jQuery object
this[ 0 ] = elem;
this.length = 1;
}
return this;
}
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
return ( context || root ).find( selector );
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
return this.constructor( context ).find( selector );
}
// HANDLE: $(DOMElement)
} else if ( selector.nodeType ) {
this[ 0 ] = selector;
this.length = 1;
return this;
// HANDLE: $(function)
// Shortcut for document ready
} else if ( isFunction( selector ) ) {
return root.ready !== undefined ?
root.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );
}
return jQuery.makeArray( selector, this );
};
// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;
// Initialize central reference
rootjQuery = jQuery( document );
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
// Methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.fn.extend( {
has: function( target ) {
var targets = jQuery( target, this ),
l = targets.length;
return this.filter( function() {
var i = 0;
for ( ; i < l; i++ ) {
if ( jQuery.contains( this, targets[ i ] ) ) {
return true;
}
}
} );
},
closest: function( selectors, context ) {
var cur,
i = 0,
l = this.length,
matched = [],
targets = typeof selectors !== "string" && jQuery( selectors );
// Positional selectors never match, since there's no _selection_ context
if ( !rneedsContext.test( selectors ) ) {
for ( ; i < l; i++ ) {
for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
// Always skip document fragments
if ( cur.nodeType < 11 && ( targets ?
targets.index( cur ) > -1 :
// Don't pass non-elements to Sizzle
cur.nodeType === 1 &&
jQuery.find.matchesSelector( cur, selectors ) ) ) {
matched.push( cur );
break;
}
}
}
}
return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
},
// Determine the position of an element within the set
index: function( elem ) {
// No argument, return index in parent
if ( !elem ) {
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
}
// Index in selector
if ( typeof elem === "string" ) {
return indexOf.call( jQuery( elem ), this[ 0 ] );
}
// Locate the position of the desired element
return indexOf.call( this,
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[ 0 ] : elem
);
},
add: function( selector, context ) {
return this.pushStack(
jQuery.uniqueSort(
jQuery.merge( this.get(), jQuery( selector, context ) )
)
);
},
addBack: function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
}
} );
function sibling( cur, dir ) {
while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
return cur;
}
jQuery.each( {
parent: function( elem ) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function( elem ) {
return dir( elem, "parentNode" );
},
parentsUntil: function( elem, i, until ) {
return dir( elem, "parentNode", until );
},
next: function( elem ) {
return sibling( elem, "nextSibling" );
},
prev: function( elem ) {
return sibling( elem, "previousSibling" );
},
nextAll: function( elem ) {
return dir( elem, "nextSibling" );
},
prevAll: function( elem ) {
return dir( elem, "previousSibling" );
},
nextUntil: function( elem, i, until ) {
return dir( elem, "nextSibling", until );
},
prevUntil: function( elem, i, until ) {
return dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return siblings( ( elem.parentNode || {} ).firstChild, elem );
},
children: function( elem ) {
return siblings( elem.firstChild );
},
contents: function( elem ) {
if ( nodeName( elem, "iframe" ) ) {
return elem.contentDocument;
}
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
// Treat the template element as a regular one in browsers that
// don't support it.
if ( nodeName( elem, "template" ) ) {
elem = elem.content || elem;
}
return jQuery.merge( [], elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var matched = jQuery.map( this, fn, until );
if ( name.slice( -5 ) !== "Until" ) {
selector = until;
}
if ( selector && typeof selector === "string" ) {
matched = jQuery.filter( selector, matched );
}
if ( this.length > 1 ) {
// Remove duplicates
if ( !guaranteedUnique[ name ] ) {
jQuery.uniqueSort( matched );
}
// Reverse order for parents* and prev-derivatives
if ( rparentsprev.test( name ) ) {
matched.reverse();
}
}
return this.pushStack( matched );
};
} );
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
var object = {};
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
object[ flag ] = true;
} );
return object;
}
/*
* Create a callback list using the following parameters:
*
* options: an optional list of space-separated options that will change how
* the callback list behaves or a more traditional option object
*
* By default a callback list will act like an event callback list and can be
* "fired" multiple times.
*
* Possible options:
*
* once: will ensure the callback list can only be fired once (like a Deferred)
*
* memory: will keep track of previous values and will call any callback added
* after the list has been fired right away with the latest "memorized"
* values (like a Deferred)
*
* unique: will ensure a callback can only be added once (no duplicate in the list)
*
* stopOnFalse: interrupt callings when a callback returns false
*
*/
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
createOptions( options ) :
jQuery.extend( {}, options );
var // Flag to know if list is currently firing
firing,
// Last fire value for non-forgettable lists
memory,
// Flag to know if list was already fired
fired,
// Flag to prevent firing
locked,
// Actual callback list
list = [],
// Queue of execution data for repeatable lists
queue = [],
// Index of currently firing callback (modified by add/remove as needed)
firingIndex = -1,
// Fire callbacks
fire = function() {
// Enforce single-firing
locked = locked || options.once;
// Execute callbacks for all pending executions,
// respecting firingIndex overrides and runtime changes
fired = firing = true;
for ( ; queue.length; firingIndex = -1 ) {
memory = queue.shift();
while ( ++firingIndex < list.length ) {
// Run callback and check for early termination
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
options.stopOnFalse ) {
// Jump to end and forget the data so .add doesn't re-fire
firingIndex = list.length;
memory = false;
}
}
}
// Forget the data if we're done with it
if ( !options.memory ) {
memory = false;
}
firing = false;
// Clean up if we're done firing for good
if ( locked ) {
// Keep an empty list if we have data for future add calls
if ( memory ) {
list = [];
// Otherwise, this object is spent
} else {
list = "";
}
}
},
// Actual Callbacks object
self = {
// Add a callback or a collection of callbacks to the list
add: function() {
if ( list ) {
// If we have memory from a past run, we should fire after adding
if ( memory && !firing ) {
firingIndex = list.length - 1;
queue.push( memory );
}
( function add( args ) {
jQuery.each( args, function( _, arg ) {
if ( isFunction( arg ) ) {
if ( !options.unique || !self.has( arg ) ) {
list.push( arg );
}
} else if ( arg && arg.length && toType( arg ) !== "string" ) {
// Inspect recursively
add( arg );
}
} );
} )( arguments );
if ( memory && !firing ) {
fire();
}
}
return this;
},
// Remove a callback from the list
remove: function() {
jQuery.each( arguments, function( _, arg ) {
var index;
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
list.splice( index, 1 );
// Handle firing indexes
if ( index <= firingIndex ) {
firingIndex--;
}
}
} );
return this;
},
// Check if a given callback is in the list.
// If no argument is given, return whether or not list has callbacks attached.
has: function( fn ) {
return fn ?
jQuery.inArray( fn, list ) > -1 :
list.length > 0;
},
// Remove all callbacks from the list
empty: function() {
if ( list ) {
list = [];
}
return this;
},
// Disable .fire and .add
// Abort any current/pending executions
// Clear all callbacks and values
disable: function() {
locked = queue = [];
list = memory = "";
return this;
},
disabled: function() {
return !list;
},
// Disable .fire
// Also disable .add unless we have memory (since it would have no effect)
// Abort any pending executions
lock: function() {
locked = queue = [];
if ( !memory && !firing ) {
list = memory = "";
}
return this;
},
locked: function() {
return !!locked;
},
// Call all callbacks with the given context and arguments
fireWith: function( context, args ) {
if ( !locked ) {
args = args || [];
args = [ context, args.slice ? args.slice() : args ];
queue.push( args );
if ( !firing ) {
fire();
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
self.fireWith( this, arguments );
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!fired;
}
};
return self;
};
function Identity( v ) {
return v;
}
function Thrower( ex ) {
throw ex;
}
function adoptValue( value, resolve, reject, noValue ) {
var method;
try {
// Check for promise aspect first to privilege synchronous behavior
if ( value && isFunction( ( method = value.promise ) ) ) {
method.call( value ).done( resolve ).fail( reject );
// Other thenables
} else if ( value && isFunction( ( method = value.then ) ) ) {
method.call( value, resolve, reject );
// Other non-thenables
} else {
// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
// * false: [ value ].slice( 0 ) => resolve( value )
// * true: [ value ].slice( 1 ) => resolve()
resolve.apply( undefined, [ value ].slice( noValue ) );
}
// For Promises/A+, convert exceptions into rejections
// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
// Deferred#then to conditionally suppress rejection.
} catch ( value ) {
// Support: Android 4.0 only
// Strict mode functions invoked without .call/.apply get global-object context
reject.apply( undefined, [ value ] );
}
}
jQuery.extend( {
Deferred: function( func ) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
[ "notify", "progress", jQuery.Callbacks( "memory" ),
jQuery.Callbacks( "memory" ), 2 ],
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), 0, "resolved" ],
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), 1, "rejected" ]
],
state = "pending",
promise = {
state: function() {
return state;
},
always: function() {
deferred.done( arguments ).fail( arguments );
return this;
},
"catch": function( fn ) {
return promise.then( null, fn );
},
// Keep pipe for back-compat
pipe: function( /* fnDone, fnFail, fnProgress */ ) {
var fns = arguments;
return jQuery.Deferred( function( newDefer ) {
jQuery.each( tuples, function( i, tuple ) {
// Map tuples (progress, done, fail) to arguments (done, fail, progress)
var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
// deferred.progress(function() { bind to newDefer or newDefer.notify })
// deferred.done(function() { bind to newDefer or newDefer.resolve })
// deferred.fail(function() { bind to newDefer or newDefer.reject })
deferred[ tuple[ 1 ] ]( function() {
var returned = fn && fn.apply( this, arguments );
if ( returned && isFunction( returned.promise ) ) {
returned.promise()
.progress( newDefer.notify )
.done( newDefer.resolve )
.fail( newDefer.reject );
} else {
newDefer[ tuple[ 0 ] + "With" ](
this,
fn ? [ returned ] : arguments
);
}
} );
} );
fns = null;
} ).promise();
},
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
args = arguments,
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
// Ignore double-resolution attempts
if ( depth < maxDepth ) {
return;
}
returned = handler.apply( that, args );
// Support: Promises/A+ section 2.3.1
// https://promisesaplus.com/#point-48
if ( returned === deferred.promise() ) {
throw new TypeError( "Thenable self-resolution" );
}
// Support: Promises/A+ sections 2.3.3.1, 3.5
// https://promisesaplus.com/#point-54
// https://promisesaplus.com/#point-75
// Retrieve `then` only once
then = returned &&
// Support: Promises/A+ section 2.3.4
// https://promisesaplus.com/#point-64
// Only check objects and functions for thenability
( typeof returned === "object" ||
typeof returned === "function" ) &&
returned.then;
// Handle a returned thenable
if ( isFunction( then ) ) {
// Special processors (notify) just wait for resolution
if ( special ) {
then.call(
returned,
resolve( maxDepth, deferred, Identity, special ),
resolve( maxDepth, deferred, Thrower, special )
);
// Normal processors (resolve) also hook into progress
} else {
// ...and disregard older resolution values
maxDepth++;
then.call(
returned,
resolve( maxDepth, deferred, Identity, special ),
resolve( maxDepth, deferred, Thrower, special ),
resolve( maxDepth, deferred, Identity,
deferred.notifyWith )
);
}
// Handle all other returned values
} else {
// Only substitute handlers pass on context
// and multiple values (non-spec behavior)
if ( handler !== Identity ) {
that = undefined;
args = [ returned ];
}
// Process the value(s)
// Default process is resolve
( special || deferred.resolveWith )( that, args );
}
},
// Only normal processors (resolve) catch and reject exceptions
process = special ?
mightThrow :
function() {
try {
mightThrow();
} catch ( e ) {
if ( jQuery.Deferred.exceptionHook ) {
jQuery.Deferred.exceptionHook( e,
process.stackTrace );
}
// Support: Promises/A+ section 2.3.3.3.4.1
// https://promisesaplus.com/#point-61
// Ignore post-resolution exceptions
if ( depth + 1 >= maxDepth ) {
// Only substitute handlers pass on context
// and multiple values (non-spec behavior)
if ( handler !== Thrower ) {
that = undefined;
args = [ e ];
}
deferred.rejectWith( that, args );
}
}
};
// Support: Promises/A+ section 2.3.3.3.1
// https://promisesaplus.com/#point-57
// Re-resolve promises immediately to dodge false rejection from
// subsequent errors
if ( depth ) {
process();
} else {
// Call an optional hook to record the stack, in case of exception
// since it's otherwise lost when execution goes async
if ( jQuery.Deferred.getStackHook ) {
process.stackTrace = jQuery.Deferred.getStackHook();
}
window.setTimeout( process );
}
};
}
return jQuery.Deferred( function( newDefer ) {
// progress_handlers.add( ... )
tuples[ 0 ][ 3 ].add(
resolve(
0,
newDefer,
isFunction( onProgress ) ?
onProgress :
Identity,
newDefer.notifyWith
)
);
// fulfilled_handlers.add( ... )
tuples[ 1 ][ 3 ].add(
resolve(
0,
newDefer,
isFunction( onFulfilled ) ?
onFulfilled :
Identity
)
);
// rejected_handlers.add( ... )
tuples[ 2 ][ 3 ].add(
resolve(
0,
newDefer,
isFunction( onRejected ) ?
onRejected :
Thrower
)
);
} ).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function( obj ) {
return obj != null ? jQuery.extend( obj, promise ) : promise;
}
},
deferred = {};
// Add list-specific methods
jQuery.each( tuples, function( i, tuple ) {
var list = tuple[ 2 ],
stateString = tuple[ 5 ];
// promise.progress = list.add
// promise.done = list.add
// promise.fail = list.add
promise[ tuple[ 1 ] ] = list.add;
// Handle state
if ( stateString ) {
list.add(
function() {
// state = "resolved" (i.e., fulfilled)
// state = "rejected"
state = stateString;
},
// rejected_callbacks.disable
// fulfilled_callbacks.disable
tuples[ 3 - i ][ 2 ].disable,
// rejected_handlers.disable
// fulfilled_handlers.disable
tuples[ 3 - i ][ 3 ].disable,
// progress_callbacks.lock
tuples[ 0 ][ 2 ].lock,
// progress_handlers.lock
tuples[ 0 ][ 3 ].lock
);
}
// progress_handlers.fire
// fulfilled_handlers.fire
// rejected_handlers.fire
list.add( tuple[ 3 ].fire );
// deferred.notify = function() { deferred.notifyWith(...) }
// deferred.resolve = function() { deferred.resolveWith(...) }
// deferred.reject = function() { deferred.rejectWith(...) }
deferred[ tuple[ 0 ] ] = function() {
deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
return this;
};
// deferred.notifyWith = list.fireWith
// deferred.resolveWith = list.fireWith
// deferred.rejectWith = list.fireWith
deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
} );
// Make the deferred a promise
promise.promise( deferred );
// Call given func if any
if ( func ) {
func.call( deferred, deferred );
}
// All done!
return deferred;
},
// Deferred helper
when: function( singleValue ) {
var
// count of uncompleted subordinates
remaining = arguments.length,
// count of unprocessed arguments
i = remaining,
// subordinate fulfillment data
resolveContexts = Array( i ),
resolveValues = slice.call( arguments ),
// the master Deferred
master = jQuery.Deferred(),
// subordinate callback factory
updateFunc = function( i ) {
return function( value ) {
resolveContexts[ i ] = this;
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
if ( !( --remaining ) ) {
master.resolveWith( resolveContexts, resolveValues );
}
};
};
// Single- and empty arguments are adopted like Promise.resolve
if ( remaining <= 1 ) {
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
!remaining );
// Use .then() to unwrap secondary thenables (cf. gh-3000)
if ( master.state() === "pending" ||
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
return master.then();
}
}
// Multiple arguments are aggregated like Promise.all array elements
while ( i-- ) {
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
}
return master.promise();
}
} );
// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
jQuery.Deferred.exceptionHook = function( error, stack ) {
// Support: IE 8 - 9 only
// Console exists when dev tools are open, which can happen at any time
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
}
};
jQuery.readyException = function( error ) {
window.setTimeout( function() {
throw error;
} );
};
// The deferred used on DOM ready
var readyList = jQuery.Deferred();
jQuery.fn.ready = function( fn ) {
readyList
.then( fn )
// Wrap jQuery.readyException in a function so that the lookup
// happens at the time of error handling instead of callback
// registration.
.catch( function( error ) {
jQuery.readyException( error );
} );
return this;
};
jQuery.extend( {
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,
// Handle when the DOM is ready
ready: function( wait ) {
// Abort if there are pending holds or we're already ready
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
return;
}
// Remember that the DOM is ready
jQuery.isReady = true;
// If a normal DOM Ready event fired, decrement, and wait if need be
if ( wait !== true && --jQuery.readyWait > 0 ) {
return;
}
// If there are functions bound, to execute
readyList.resolveWith( document, [ jQuery ] );
}
} );
jQuery.ready.then = readyList.then;
// The ready event handler and self cleanup method
function completed() {
document.removeEventListener( "DOMContentLoaded", completed );
window.removeEventListener( "load", completed );
jQuery.ready();
}
// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
window.setTimeout( jQuery.ready );
} else {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", completed );
// A fallback to window.onload, that will always work
window.addEventListener( "load", completed );
}
// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
len = elems.length,
bulk = key == null;
// Sets many values
if ( toType( key ) === "object" ) {
chainable = true;
for ( i in key ) {
access( elems, fn, i, key[ i ], true, emptyGet, raw );
}
// Sets one value
} else if ( value !== undefined ) {
chainable = true;
if ( !isFunction( value ) ) {
raw = true;
}
if ( bulk ) {
// Bulk operations run against the entire set
if ( raw ) {
fn.call( elems, value );
fn = null;
// ...except when executing function values
} else {
bulk = fn;
fn = function( elem, key, value ) {
return bulk.call( jQuery( elem ), value );
};
}
}
if ( fn ) {
for ( ; i < len; i++ ) {
fn(
elems[ i ], key, raw ?
value :
value.call( elems[ i ], i, fn( elems[ i ], key ) )
);
}
}
}
if ( chainable ) {
return elems;
}
// Gets
if ( bulk ) {
return fn.call( elems );
}
return len ? fn( elems[ 0 ], key ) : emptyGet;
};
// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/,
rdashAlpha = /-([a-z])/g;
// Used by camelCase as callback to replace()
function fcamelCase( all, letter ) {
return letter.toUpperCase();
}
// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (#9572)
function camelCase( string ) {
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
var acceptData = function( owner ) {
// Accepts only:
// - Node
// - Node.ELEMENT_NODE
// - Node.DOCUMENT_NODE
// - Object
// - Any
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};
function Data() {
this.expando = jQuery.expando + Data.uid++;
}
Data.uid = 1;
Data.prototype = {
cache: function( owner ) {
// Check if the owner object already has a cache
var value = owner[ this.expando ];
// If not, create one
if ( !value ) {
value = {};
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.
// Always return an empty object.
if ( acceptData( owner ) ) {
// If it is a node unlikely to be stringify-ed or looped over
// use plain assignment
if ( owner.nodeType ) {
owner[ this.expando ] = value;
// Otherwise secure it in a non-enumerable property
// configurable must be true to allow the property to be
// deleted when data is removed
} else {
Object.defineProperty( owner, this.expando, {
value: value,
configurable: true
} );
}
}
}
return value;
},
set: function( owner, data, value ) {
var prop,
cache = this.cache( owner );
// Handle: [ owner, key, value ] args
// Always use camelCase key (gh-2257)
if ( typeof data === "string" ) {
cache[ camelCase( data ) ] = value;
// Handle: [ owner, { properties } ] args
} else {
// Copy the properties one-by-one to the cache object
for ( prop in data ) {
cache[ camelCase( prop ) ] = data[ prop ];
}
}
return cache;
},
get: function( owner, key ) {
return key === undefined ?
this.cache( owner ) :
// Always use camelCase key (gh-2257)
owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
},
access: function( owner, key, value ) {
// In cases where either:
//
// 1. No key was specified
// 2. A string key was specified, but no value provided
//
// Take the "read" path and allow the get method to determine
// which value to return, respectively either:
//
// 1. The entire cache object
// 2. The data stored at the key
//
if ( key === undefined ||
( ( key && typeof key === "string" ) && value === undefined ) ) {
return this.get( owner, key );
}
// When the key is not a string, or both a key and value
// are specified, set or extend (existing objects) with either:
//
// 1. An object of properties
// 2. A key and value
//
this.set( owner, key, value );
// Since the "set" path can have two possible entry points
// return the expected data based on which path was taken[*]
return value !== undefined ? value : key;
},
remove: function( owner, key ) {
var i,
cache = owner[ this.expando ];
if ( cache === undefined ) {
return;
}
if ( key !== undefined ) {
// Support array or space separated string of keys
if ( Array.isArray( key ) ) {
// If key is an array of keys...
// We always set camelCase keys, so remove that.
key = key.map( camelCase );
} else {
key = camelCase( key );
// If a key with the spaces exists, use it.
// Otherwise, create an array by matching non-whitespace
key = key in cache ?
[ key ] :
( key.match( rnothtmlwhite ) || [] );
}
i = key.length;
while ( i-- ) {
delete cache[ key[ i ] ];
}
}
// Remove the expando if there's no more data
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
// Support: Chrome <=35 - 45
// Webkit & Blink performance suffers when deleting properties
// from DOM nodes, so set to undefined instead
// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
if ( owner.nodeType ) {
owner[ this.expando ] = undefined;
} else {
delete owner[ this.expando ];
}
}
},
hasData: function( owner ) {
var cache = owner[ this.expando ];
return cache !== undefined && !jQuery.isEmptyObject( cache );
}
};
var dataPriv = new Data();
var dataUser = new Data();
// Implementation Summary
//
// 1. Enforce API surface and semantic compatibility with 1.9.x branch
// 2. Improve the module's maintainability by reducing the storage
// paths to a single mechanism.
// 3. Use the same single mechanism to support "private" and "user" data.
// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
// 5. Avoid exposing implementation details on user objects (eg. expando properties)
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
rmultiDash = /[A-Z]/g;
function getData( data ) {
if ( data === "true" ) {
return true;
}
if ( data === "false" ) {
return false;
}
if ( data === "null" ) {
return null;
}
// Only convert to a number if it doesn't change the string
if ( data === +data + "" ) {
return +data;
}
if ( rbrace.test( data ) ) {
return JSON.parse( data );
}
return data;
}
function dataAttr( elem, key, data ) {
var name;
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if ( data === undefined && elem.nodeType === 1 ) {
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
data = elem.getAttribute( name );
if ( typeof data === "string" ) {
try {
data = getData( data );
} catch ( e ) {}
// Make sure we set the data so it isn't changed later
dataUser.set( elem, key, data );
} else {
data = undefined;
}
}
return data;
}
jQuery.extend( {
hasData: function( elem ) {
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
},
data: function( elem, name, data ) {
return dataUser.access( elem, name, data );
},
removeData: function( elem, name ) {
dataUser.remove( elem, name );
},
// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to dataPriv methods, these can be deprecated.
_data: function( elem, name, data ) {
return dataPriv.access( elem, name, data );
},
_removeData: function( elem, name ) {
dataPriv.remove( elem, name );
}
} );
jQuery.fn.extend( {
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
// Gets all values
if ( key === undefined ) {
if ( this.length ) {
data = dataUser.get( elem );
if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
i = attrs.length;
while ( i-- ) {
// Support: IE 11 only
// The attrs elements can be null (#14894)
if ( attrs[ i ] ) {
name = attrs[ i ].name;
if ( name.indexOf( "data-" ) === 0 ) {
name = camelCase( name.slice( 5 ) );
dataAttr( elem, name, data[ name ] );
}
}
}
dataPriv.set( elem, "hasDataAttrs", true );
}
}
return data;
}
// Sets multiple values
if ( typeof key === "object" ) {
return this.each( function() {
dataUser.set( this, key );
} );
}
return access( this, function( value ) {
var data;
// The calling jQuery object (element matches) is not empty
// (and therefore has an element appears at this[ 0 ]) and the
// `value` parameter was not undefined. An empty jQuery object
// will result in `undefined` for elem = this[ 0 ] which will
// throw an exception if an attempt to read a data cache is made.
if ( elem && value === undefined ) {
// Attempt to get data from the cache
// The key will always be camelCased in Data
data = dataUser.get( elem, key );
if ( data !== undefined ) {
return data;
}
// Attempt to "discover" the data in
// HTML5 custom data-* attrs
data = dataAttr( elem, key );
if ( data !== undefined ) {
return data;
}
// We tried really hard, but the data doesn't exist.
return;
}
// Set the data...
this.each( function() {
// We always store the camelCased key
dataUser.set( this, key, value );
} );
}, null, value, arguments.length > 1, null, true );
},
removeData: function( key ) {
return this.each( function() {
dataUser.remove( this, key );
} );
}
} );
jQuery.extend( {
queue: function( elem, type, data ) {
var queue;
if ( elem ) {
type = ( type || "fx" ) + "queue";
queue = dataPriv.get( elem, type );
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !queue || Array.isArray( data ) ) {
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
} else {
queue.push( data );
}
}
return queue || [];
}
},
dequeue: function( elem, type ) {
type = type || "fx";
var queue = jQuery.queue( elem, type ),
startLength = queue.length,
fn = queue.shift(),
hooks = jQuery._queueHooks( elem, type ),
next = function() {
jQuery.dequeue( elem, type );
};
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
fn = queue.shift();
startLength--;
}
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
if ( type === "fx" ) {
queue.unshift( "inprogress" );
}
// Clear up the last queue stop function
delete hooks.stop;
fn.call( elem, next, hooks );
}
if ( !startLength && hooks ) {
hooks.empty.fire();
}
},
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
empty: jQuery.Callbacks( "once memory" ).add( function() {
dataPriv.remove( elem, [ type + "queue", key ] );
} )
} );
}
} );
jQuery.fn.extend( {
queue: function( type, data ) {
var setter = 2;
if ( typeof type !== "string" ) {
data = type;
type = "fx";
setter--;
}
if ( arguments.length < setter ) {
return jQuery.queue( this[ 0 ], type );
}
return data === undefined ?
this :
this.each( function() {
var queue = jQuery.queue( this, type, data );
// Ensure a hooks for this queue
jQuery._queueHooks( this, type );
if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
jQuery.dequeue( this, type );
}
} );
},
dequeue: function( type ) {
return this.each( function() {
jQuery.dequeue( this, type );
} );
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function( type, obj ) {
var tmp,
count = 1,
defer = jQuery.Deferred(),
elements = this,
i = this.length,
resolve = function() {
if ( !( --count ) ) {
defer.resolveWith( elements, [ elements ] );
}
};
if ( typeof type !== "string" ) {
obj = type;
type = undefined;
}
type = type || "fx";
while ( i-- ) {
tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
if ( tmp && tmp.empty ) {
count++;
tmp.empty.add( resolve );
}
}
resolve();
return defer.promise( obj );
}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
var isHiddenWithinTree = function( elem, el ) {
// isHiddenWithinTree might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
// Inline style trumps all
return elem.style.display === "none" ||
elem.style.display === "" &&
// Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
jQuery.contains( elem.ownerDocument, elem ) &&
jQuery.css( elem, "display" ) === "none";
};
var swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.apply( elem, args || [] );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
};
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
return tween.cur();
} :
function() {
return jQuery.css( elem, prop, "" );
},
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
// Starting value computation is required for potential unit mismatches
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
rcssNum.exec( jQuery.css( elem, prop ) );
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Support: Firefox <=54
// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
initial = initial / 2;
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
// Iteratively approximate from a nonzero starting point
initialInUnit = +initial || 1;
while ( maxIterations-- ) {
// Evaluate and update our best guess (doubling guesses that zero out).
// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
jQuery.style( elem, prop, initialInUnit + unit );
if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
maxIterations = 0;
}
initialInUnit = initialInUnit / scale;
}
initialInUnit = initialInUnit * 2;
jQuery.style( elem, prop, initialInUnit + unit );
// Make sure we update the tween properties later on
valueParts = valueParts || [];
}
if ( valueParts ) {
initialInUnit = +initialInUnit || +initial || 0;
// Apply relative offset (+=/-=) if specified
adjusted = valueParts[ 1 ] ?
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+valueParts[ 2 ];
if ( tween ) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}
var defaultDisplayMap = {};
function getDefaultDisplay( elem ) {
var temp,
doc = elem.ownerDocument,
nodeName = elem.nodeName,
display = defaultDisplayMap[ nodeName ];
if ( display ) {
return display;
}
temp = doc.body.appendChild( doc.createElement( nodeName ) );
display = jQuery.css( temp, "display" );
temp.parentNode.removeChild( temp );
if ( display === "none" ) {
display = "block";
}
defaultDisplayMap[ nodeName ] = display;
return display;
}
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;
// Determine new display value for elements that need to change
for ( ; index < length; index++ ) {
elem = elements[ index ];
if ( !elem.style ) {
continue;
}
display = elem.style.display;
if ( show ) {
// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
// check is required in this first loop unless we have a nonempty display value (either
// inline or about-to-be-restored)
if ( display === "none" ) {
values[ index ] = dataPriv.get( elem, "display" ) || null;
if ( !values[ index ] ) {
elem.style.display = "";
}
}
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
values[ index ] = getDefaultDisplay( elem );
}
} else {
if ( display !== "none" ) {
values[ index ] = "none";
// Remember what we're overwriting
dataPriv.set( elem, "display", display );
}
}
}
// Set the display of the elements in a second loop to avoid constant reflow
for ( index = 0; index < length; index++ ) {
if ( values[ index ] != null ) {
elements[ index ].style.display = values[ index ];
}
}
return elements;
}
jQuery.fn.extend( {
show: function() {
return showHide( this, true );
},
hide: function() {
return showHide( this );
},
toggle: function( state ) {
if ( typeof state === "boolean" ) {
return state ? this.show() : this.hide();
}
return this.each( function() {
if ( isHiddenWithinTree( this ) ) {
jQuery( this ).show();
} else {
jQuery( this ).hide();
}
} );
}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );
var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
// We have to close these tags to support XHTML (#13200)
var wrapMap = {
// Support: IE <=9 only
option: [ 1, "<select multiple='multiple'>", "</select>" ],
// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
// this by omitting <tbody> or other required elements.
thead: [ 1, "<table>", "</table>" ],
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
_default: [ 0, "", "" ]
};
// Support: IE <=9 only
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
function getAll( context, tag ) {
// Support: IE <=9 - 11 only
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
var ret;
if ( typeof context.getElementsByTagName !== "undefined" ) {
ret = context.getElementsByTagName( tag || "*" );
} else if ( typeof context.querySelectorAll !== "undefined" ) {
ret = context.querySelectorAll( tag || "*" );
} else {
ret = [];
}
if ( tag === undefined || tag && nodeName( context, tag ) ) {
return jQuery.merge( [ context ], ret );
}
return ret;
}
// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
var i = 0,
l = elems.length;
for ( ; i < l; i++ ) {
dataPriv.set(
elems[ i ],
"globalEval",
!refElements || dataPriv.get( refElements[ i ], "globalEval" )
);
}
}
var rhtml = /<|&#?\w+;/;
function buildFragment( elems, context, scripts, selection, ignored ) {
var elem, tmp, tag, wrap, contains, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
l = elems.length;
for ( ; i < l; i++ ) {
elem = elems[ i ];
if ( elem || elem === 0 ) {
// Add nodes directly
if ( toType( elem ) === "object" ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
// Convert non-html into a text node
} else if ( !rhtml.test( elem ) ) {
nodes.push( context.createTextNode( elem ) );
// Convert html into DOM nodes
} else {
tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
// Deserialize a standard representation
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
wrap = wrapMap[ tag ] || wrapMap._default;
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
// Descend through wrappers to the right content
j = wrap[ 0 ];
while ( j-- ) {
tmp = tmp.lastChild;
}
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, tmp.childNodes );
// Remember the top-level container
tmp = fragment.firstChild;
// Ensure the created nodes are orphaned (#12392)
tmp.textContent = "";
}
}
}
// Remove wrapper from fragment
fragment.textContent = "";
i = 0;
while ( ( elem = nodes[ i++ ] ) ) {
// Skip elements already in the context collection (trac-4087)
if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
if ( ignored ) {
ignored.push( elem );
}
continue;
}
contains = jQuery.contains( elem.ownerDocument, elem );
// Append to fragment
tmp = getAll( fragment.appendChild( elem ), "script" );
// Preserve script evaluation history
if ( contains ) {
setGlobalEval( tmp );
}
// Capture executables
if ( scripts ) {
j = 0;
while ( ( elem = tmp[ j++ ] ) ) {
if ( rscriptType.test( elem.type || "" ) ) {
scripts.push( elem );
}
}
}
}
return fragment;
}
( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );
// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );
div.appendChild( input );
// Support: Android <=4.1 only
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
// Support: IE <=11 only
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
} )();
var documentElement = document.documentElement;
var
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
// Support: IE <=9 only
// See #13393 for more info
function safeActiveElement() {
try {
return document.activeElement;
} catch ( err ) { }
}
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
// ( types-Object, selector, data )
if ( typeof selector !== "string" ) {
// ( types-Object, data )
data = data || selector;
selector = undefined;
}
for ( type in types ) {
on( elem, type, selector, data, types[ type ], one );
}
return elem;
}
if ( data == null && fn == null ) {
// ( types, fn )
fn = selector;
data = selector = undefined;
} else if ( fn == null ) {
if ( typeof selector === "string" ) {
// ( types, selector, fn )
fn = data;
data = undefined;
} else {
// ( types, data, fn )
fn = data;
data = selector;
selector = undefined;
}
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return elem;
}
if ( one === 1 ) {
origFn = fn;
fn = function( event ) {
// Can use an empty set, since event contains the info
jQuery().off( event );
return origFn.apply( this, arguments );
};
// Use same guid so caller can remove using origFn
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
}
return elem.each( function() {
jQuery.event.add( this, types, fn, data, selector );
} );
}
/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
*/
jQuery.event = {
global: {},
add: function( elem, types, handler, data, selector ) {
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
elemData = dataPriv.get( elem );
// Don't attach events to noData or text/comment nodes (but allow plain objects)
if ( !elemData ) {
return;
}
// Caller can pass in an object of custom data in lieu of the handler
if ( handler.handler ) {
handleObjIn = handler;
handler = handleObjIn.handler;
selector = handleObjIn.selector;
}
// Ensure that invalid selectors throw exceptions at attach time
// Evaluate against documentElement in case elem is a non-element node (e.g., document)
if ( selector ) {
jQuery.find.matchesSelector( documentElement, selector );
}
// Make sure that the handler has a unique ID, used to find/remove it later
if ( !handler.guid ) {
handler.guid = jQuery.guid++;
}
// Init the element's event structure and main handler, if this is the first
if ( !( events = elemData.events ) ) {
events = elemData.events = {};
}
if ( !( eventHandle = elemData.handle ) ) {
eventHandle = elemData.handle = function( e ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
};
}
// Handle multiple events separated by a space
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
t = types.length;
while ( t-- ) {
tmp = rtypenamespace.exec( types[ t ] ) || [];
type = origType = tmp[ 1 ];
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
// There *must* be a type, no attaching namespace-only handlers
if ( !type ) {
continue;
}
// If event changes its type, use the special event handlers for the changed type
special = jQuery.event.special[ type ] || {};
// If selector defined, determine special event api type, otherwise given type
type = ( selector ? special.delegateType : special.bindType ) || type;
// Update special based on newly reset type
special = jQuery.event.special[ type ] || {};
// handleObj is passed to all event handlers
handleObj = jQuery.extend( {
type: type,
origType: origType,
data: data,
handler: handler,
guid: handler.guid,
selector: selector,
needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
namespace: namespaces.join( "." )
}, handleObjIn );
// Init the event handler queue if we're the first
if ( !( handlers = events[ type ] ) ) {
handlers = events[ type ] = [];
handlers.delegateCount = 0;
// Only use addEventListener if the special events handler returns false
if ( !special.setup ||
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
if ( elem.addEventListener ) {
elem.addEventListener( type, eventHandle );
}
}
}
if ( special.add ) {
special.add.call( elem, handleObj );
if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
}
}
// Add to the element's handler list, delegates in front
if ( selector ) {
handlers.splice( handlers.delegateCount++, 0, handleObj );
} else {
handlers.push( handleObj );
}
// Keep track of which events have ever been used, for event optimization
jQuery.event.global[ type ] = true;
}
},
// Detach an event or set of events from an element
remove: function( elem, types, handler, selector, mappedTypes ) {
var j, origCount, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
if ( !elemData || !( events = elemData.events ) ) {
return;
}
// Once for each type.namespace in types; type may be omitted
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
t = types.length;
while ( t-- ) {
tmp = rtypenamespace.exec( types[ t ] ) || [];
type = origType = tmp[ 1 ];
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
// Unbind all events (on this namespace, if provided) for the element
if ( !type ) {
for ( type in events ) {
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
}
continue;
}
special = jQuery.event.special[ type ] || {};
type = ( selector ? special.delegateType : special.bindType ) || type;
handlers = events[ type ] || [];
tmp = tmp[ 2 ] &&
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
// Remove matching events
origCount = j = handlers.length;
while ( j-- ) {
handleObj = handlers[ j ];
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
handlers.splice( j, 1 );
if ( handleObj.selector ) {
handlers.delegateCount--;
}
if ( special.remove ) {
special.remove.call( elem, handleObj );
}
}
}
// Remove generic event handler if we removed something and no more handlers exist
// (avoids potential for endless recursion during removal of special event handlers)
if ( origCount && !handlers.length ) {
if ( !special.teardown ||
special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
jQuery.removeEvent( elem, type, elemData.handle );
}
delete events[ type ];
}
}
// Remove data and the expando if it's no longer used
if ( jQuery.isEmptyObject( events ) ) {
dataPriv.remove( elem, "handle events" );
}
},
dispatch: function( nativeEvent ) {
// Make a writable jQuery.Event from the native event object
var event = jQuery.event.fix( nativeEvent );
var i, j, ret, matched, handleObj, handlerQueue,
args = new Array( arguments.length ),
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
special = jQuery.event.special[ event.type ] || {};
// Use the fix-ed jQuery.Event rather than the (read-only) native event
args[ 0 ] = event;
for ( i = 1; i < arguments.length; i++ ) {
args[ i ] = arguments[ i ];
}
event.delegateTarget = this;
// Call the preDispatch hook for the mapped type, and let it bail if desired
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
return;
}
// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers );
// Run delegates first; they may want to stop propagation beneath us
i = 0;
while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
event.currentTarget = matched.elem;
j = 0;
while ( ( handleObj = matched.handlers[ j++ ] ) &&
!event.isImmediatePropagationStopped() ) {
// Triggered event must either 1) have no namespace, or 2) have namespace(s)
// a subset or equal to those in the bound event (both can have no namespace).
if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
event.handleObj = handleObj;
event.data = handleObj.data;
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
handleObj.handler ).apply( matched.elem, args );
if ( ret !== undefined ) {
if ( ( event.result = ret ) === false ) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
// Call the postDispatch hook for the mapped type
if ( special.postDispatch ) {
special.postDispatch.call( this, event );
}
return event.result;
},
handlers: function( event, handlers ) {
var i, handleObj, sel, matchedHandlers, matchedSelectors,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
// Find delegate handlers
if ( delegateCount &&
// Support: IE <=9
// Black-hole SVG <use> instance trees (trac-13180)
cur.nodeType &&
// Support: Firefox <=42
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
// Support: IE 11 only
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
!( event.type === "click" && event.button >= 1 ) ) {
for ( ; cur !== this; cur = cur.parentNode || this ) {
// Don't check non-elements (#13208)
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
matchedHandlers = [];
matchedSelectors = {};
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];
// Don't conflict with Object.prototype properties (#13203)
sel = handleObj.selector + " ";
if ( matchedSelectors[ sel ] === undefined ) {
matchedSelectors[ sel ] = handleObj.needsContext ?
jQuery( sel, this ).index( cur ) > -1 :
jQuery.find( sel, this, null, [ cur ] ).length;
}
if ( matchedSelectors[ sel ] ) {
matchedHandlers.push( handleObj );
}
}
if ( matchedHandlers.length ) {
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
}
}
}
}
// Add the remaining (directly-bound) handlers
cur = this;
if ( delegateCount < handlers.length ) {
handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
}
return handlerQueue;
},
addProp: function( name, hook ) {
Object.defineProperty( jQuery.Event.prototype, name, {
enumerable: true,
configurable: true,
get: isFunction( hook ) ?
function() {
if ( this.originalEvent ) {
return hook( this.originalEvent );
}
} :
function() {
if ( this.originalEvent ) {
return this.originalEvent[ name ];
}
},
set: function( value ) {
Object.defineProperty( this, name, {
enumerable: true,
configurable: true,
writable: true,
value: value
} );
}
} );
},
fix: function( originalEvent ) {
return originalEvent[ jQuery.expando ] ?
originalEvent :
new jQuery.Event( originalEvent );
},
special: {
load: {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
focus: {
// Fire native event if possible so blur/focus sequence is correct
trigger: function() {
if ( this !== safeActiveElement() && this.focus ) {
this.focus();
return false;
}
},
delegateType: "focusin"
},
blur: {
trigger: function() {
if ( this === safeActiveElement() && this.blur ) {
this.blur();
return false;
}
},
delegateType: "focusout"
},
click: {
// For checkbox, fire native event so checked state will be right
trigger: function() {
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
this.click();
return false;
}
},
// For cross-browser consistency, don't fire native .click() on links
_default: function( event ) {
return nodeName( event.target, "a" );
}
},
beforeunload: {
postDispatch: function( event ) {
// Support: Firefox 20+
// Firefox doesn't alert if the returnValue field is not set.
if ( event.result !== undefined && event.originalEvent ) {
event.originalEvent.returnValue = event.result;
}
}
}
}
};
jQuery.removeEvent = function( elem, type, handle ) {
// This "if" is needed for plain objects
if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle );
}
};
jQuery.Event = function( src, props ) {
// Allow instantiation without the 'new' keyword
if ( !( this instanceof jQuery.Event ) ) {
return new jQuery.Event( src, props );
}
// Event object
if ( src && src.type ) {
this.originalEvent = src;
this.type = src.type;
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = src.defaultPrevented ||
src.defaultPrevented === undefined &&
// Support: Android <=2.3 only
src.returnValue === false ?
returnTrue :
returnFalse;
// Create target properties
// Support: Safari <=6 - 7 only
// Target should not be a text node (#504, #13143)
this.target = ( src.target && src.target.nodeType === 3 ) ?
src.target.parentNode :
src.target;
this.currentTarget = src.currentTarget;
this.relatedTarget = src.relatedTarget;
// Event type
} else {
this.type = src;
}
// Put explicitly provided properties onto the event object
if ( props ) {
jQuery.extend( this, props );
}
// Create a timestamp if incoming event doesn't have one
this.timeStamp = src && src.timeStamp || Date.now();
// Mark it as fixed
this[ jQuery.expando ] = true;
};
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
constructor: jQuery.Event,
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
isSimulated: false,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = returnTrue;
if ( e && !this.isSimulated ) {
e.preventDefault();
}
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = returnTrue;
if ( e && !this.isSimulated ) {
e.stopPropagation();
}
},
stopImmediatePropagation: function() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = returnTrue;
if ( e && !this.isSimulated ) {
e.stopImmediatePropagation();
}
this.stopPropagation();
}
};
// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
altKey: true,
bubbles: true,
cancelable: true,
changedTouches: true,
ctrlKey: true,
detail: true,
eventPhase: true,
metaKey: true,
pageX: true,
pageY: true,
shiftKey: true,
view: true,
"char": true,
charCode: true,
key: true,
keyCode: true,
button: true,
buttons: true,
clientX: true,
clientY: true,
offsetX: true,
offsetY: true,
pointerId: true,
pointerType: true,
screenX: true,
screenY: true,
targetTouches: true,
toElement: true,
touches: true,
which: function( event ) {
var button = event.button;
// Add which for key events
if ( event.which == null && rkeyEvent.test( event.type ) ) {
return event.charCode != null ? event.charCode : event.keyCode;
}
// Add which for click: 1 === left; 2 === middle; 3 === right
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
if ( button & 1 ) {
return 1;
}
if ( button & 2 ) {
return 3;
}
if ( button & 4 ) {
return 2;
}
return 0;
}
return event.which;
}
}, jQuery.event.addProp );
// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function( orig, fix ) {
jQuery.event.special[ orig ] = {
delegateType: fix,
bindType: fix,
handle: function( event ) {
var ret,
target = this,
related = event.relatedTarget,
handleObj = event.handleObj;
// For mouseenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
event.type = handleObj.origType;
ret = handleObj.handler.apply( this, arguments );
event.type = fix;
}
return ret;
}
};
} );
jQuery.fn.extend( {
on: function( types, selector, data, fn ) {
return on( this, types, selector, data, fn );
},
one: function( types, selector, data, fn ) {
return on( this, types, selector, data, fn, 1 );
},
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
handleObj = types.handleObj;
jQuery( types.delegateTarget ).off(
handleObj.namespace ?
handleObj.origType + "." + handleObj.namespace :
handleObj.origType,
handleObj.selector,
handleObj.handler
);
return this;
}
if ( typeof types === "object" ) {
// ( types-object [, selector] )
for ( type in types ) {
this.off( type, selector, types[ type ] );
}
return this;
}
if ( selector === false || typeof selector === "function" ) {
// ( types [, fn] )
fn = selector;
selector = undefined;
}
if ( fn === false ) {
fn = returnFalse;
}
return this.each( function() {
jQuery.event.remove( this, types, fn, selector );
} );
}
} );
var
/* eslint-disable max-len */
// See https://github.com/eslint/eslint/issues/3229
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
/* eslint-enable */
// Support: IE <=10 - 11, Edge 12 - 13 only
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
rnoInnerhtml = /<script|<style|<link/i,
// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
if ( nodeName( elem, "table" ) &&
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
}
return elem;
}
// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
return elem;
}
function restoreScript( elem ) {
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
elem.type = elem.type.slice( 5 );
} else {
elem.removeAttribute( "type" );
}
return elem;
}
function cloneCopyEvent( src, dest ) {
var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
if ( dest.nodeType !== 1 ) {
return;
}
// 1. Copy private data: events, handlers, etc.
if ( dataPriv.hasData( src ) ) {
pdataOld = dataPriv.access( src );
pdataCur = dataPriv.set( dest, pdataOld );
events = pdataOld.events;
if ( events ) {
delete pdataCur.handle;
pdataCur.events = {};
for ( type in events ) {
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
jQuery.event.add( dest, type, events[ type ][ i ] );
}
}
}
}
// 2. Copy user data
if ( dataUser.hasData( src ) ) {
udataOld = dataUser.access( src );
udataCur = jQuery.extend( {}, udataOld );
dataUser.set( dest, udataCur );
}
}
// Fix IE bugs, see support tests
function fixInput( src, dest ) {
var nodeName = dest.nodeName.toLowerCase();
// Fails to persist the checked state of a cloned checkbox or radio button.
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
dest.checked = src.checked;
// Fails to return the selected option to the default selected state when cloning options
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
}
}
function domManip( collection, args, callback, ignored ) {
// Flatten any nested arrays
args = concat.apply( [], args );
var fragment, first, scripts, hasScripts, node, doc,
i = 0,
l = collection.length,
iNoClone = l - 1,
value = args[ 0 ],
valueIsFunction = isFunction( value );
// We can't cloneNode fragments that contain checked, in WebKit
if ( valueIsFunction ||
( l > 1 && typeof value === "string" &&
!support.checkClone && rchecked.test( value ) ) ) {
return collection.each( function( index ) {
var self = collection.eq( index );
if ( valueIsFunction ) {
args[ 0 ] = value.call( this, index, self.html() );
}
domManip( self, args, callback, ignored );
} );
}
if ( l ) {
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
first = fragment.firstChild;
if ( fragment.childNodes.length === 1 ) {
fragment = first;
}
// Require either new content or an interest in ignored elements to invoke the callback
if ( first || ignored ) {
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
hasScripts = scripts.length;
// Use the original fragment for the last item
// instead of the first because it can end up
// being emptied incorrectly in certain situations (#8070).
for ( ; i < l; i++ ) {
node = fragment;
if ( i !== iNoClone ) {
node = jQuery.clone( node, true, true );
// Keep references to cloned scripts for later restoration
if ( hasScripts ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( scripts, getAll( node, "script" ) );
}
}
callback.call( collection[ i ], node, i );
}
if ( hasScripts ) {
doc = scripts[ scripts.length - 1 ].ownerDocument;
// Reenable scripts
jQuery.map( scripts, restoreScript );
// Evaluate executable scripts on first document insertion
for ( i = 0; i < hasScripts; i++ ) {
node = scripts[ i ];
if ( rscriptType.test( node.type || "" ) &&
!dataPriv.access( node, "globalEval" ) &&
jQuery.contains( doc, node ) ) {
if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
// Optional AJAX dependency, but won't run scripts if not present
if ( jQuery._evalUrl ) {
jQuery._evalUrl( node.src );
}
} else {
DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node );
}
}
}
}
}
}
return collection;
}
function remove( elem, selector, keepData ) {
var node,
nodes = selector ? jQuery.filter( selector, elem ) : elem,
i = 0;
for ( ; ( node = nodes[ i ] ) != null; i++ ) {
if ( !keepData && node.nodeType === 1 ) {
jQuery.cleanData( getAll( node ) );
}
if ( node.parentNode ) {
if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
setGlobalEval( getAll( node, "script" ) );
}
node.parentNode.removeChild( node );
}
}
return elem;
}
jQuery.extend( {
htmlPrefilter: function( html ) {
return html.replace( rxhtmlTag, "<$1></$2>" );
},
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );
// Fix IE cloning issues
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
!jQuery.isXMLDoc( elem ) ) {
// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
destElements = getAll( clone );
srcElements = getAll( elem );
for ( i = 0, l = srcElements.length; i < l; i++ ) {
fixInput( srcElements[ i ], destElements[ i ] );
}
}
// Copy the events from the original to the clone
if ( dataAndEvents ) {
if ( deepDataAndEvents ) {
srcElements = srcElements || getAll( elem );
destElements = destElements || getAll( clone );
for ( i = 0, l = srcElements.length; i < l; i++ ) {
cloneCopyEvent( srcElements[ i ], destElements[ i ] );
}
} else {
cloneCopyEvent( elem, clone );
}
}
// Preserve script evaluation history
destElements = getAll( clone, "script" );
if ( destElements.length > 0 ) {
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
}
// Return the cloned set
return clone;
},
cleanData: function( elems ) {
var data, elem, type,
special = jQuery.event.special,
i = 0;
for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
if ( acceptData( elem ) ) {
if ( ( data = elem[ dataPriv.expando ] ) ) {
if ( data.events ) {
for ( type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );
// This is a shortcut to avoid jQuery.event.remove's overhead
} else {
jQuery.removeEvent( elem, type, data.handle );
}
}
}
// Support: Chrome <=35 - 45+
// Assign undefined instead of using delete, see Data#remove
elem[ dataPriv.expando ] = undefined;
}
if ( elem[ dataUser.expando ] ) {
// Support: Chrome <=35 - 45+
// Assign undefined instead of using delete, see Data#remove
elem[ dataUser.expando ] = undefined;
}
}
}
}
} );
jQuery.fn.extend( {
detach: function( selector ) {
return remove( this, selector, true );
},
remove: function( selector ) {
return remove( this, selector );
},
text: function( value ) {
return access( this, function( value ) {
return value === undefined ?
jQuery.text( this ) :
this.empty().each( function() {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
this.textContent = value;
}
} );
}, null, value, arguments.length );
},
append: function() {
return domManip( this, arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
var target = manipulationTarget( this, elem );
target.appendChild( elem );
}
} );
},
prepend: function() {
return domManip( this, arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
var target = manipulationTarget( this, elem );
target.insertBefore( elem, target.firstChild );
}
} );
},
before: function() {
return domManip( this, arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this );
}
} );
},
after: function() {
return domManip( this, arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this.nextSibling );
}
} );
},
empty: function() {
var elem,
i = 0;
for ( ; ( elem = this[ i ] ) != null; i++ ) {
if ( elem.nodeType === 1 ) {
// Prevent memory leaks
jQuery.cleanData( getAll( elem, false ) );
// Remove any remaining nodes
elem.textContent = "";
}
}
return this;
},
clone: function( dataAndEvents, deepDataAndEvents ) {
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map( function() {
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
} );
},
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;
if ( value === undefined && elem.nodeType === 1 ) {
return elem.innerHTML;
}
// See if we can take a shortcut and just use innerHTML
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
value = jQuery.htmlPrefilter( value );
try {
for ( ; i < l; i++ ) {
elem = this[ i ] || {};
// Remove element nodes and prevent memory leaks
if ( elem.nodeType === 1 ) {
jQuery.cleanData( getAll( elem, false ) );
elem.innerHTML = value;
}
}
elem = 0;
// If using innerHTML throws an exception, use the fallback method
} catch ( e ) {}
}
if ( elem ) {
this.empty().append( value );
}
}, null, value, arguments.length );
},
replaceWith: function() {
var ignored = [];
// Make the changes, replacing each non-ignored context element with the new content
return domManip( this, arguments, function( elem ) {
var parent = this.parentNode;
if ( jQuery.inArray( this, ignored ) < 0 ) {
jQuery.cleanData( getAll( this ) );
if ( parent ) {
parent.replaceChild( elem, this );
}
}
// Force callback invocation
}, ignored );
}
} );
jQuery.each( {
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var elems,
ret = [],
insert = jQuery( selector ),
last = insert.length - 1,
i = 0;
for ( ; i <= last; i++ ) {
elems = i === last ? this : this.clone( true );
jQuery( insert[ i ] )[ original ]( elems );
// Support: Android <=4.0 only, PhantomJS 1 only
// .get() because push.apply(_, arraylike) throws on ancient WebKit
push.apply( ret, elems.get() );
}
return this.pushStack( ret );
};
} );
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
var getStyles = function( elem ) {
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
if ( !view || !view.opener ) {
view = window;
}
return view.getComputedStyle( elem );
};
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
( function() {
// Executing both pixelPosition & boxSizingReliable tests require only one layout
// so they're executed at the same time to save the second computation.
function computeStyleTests() {
// This is a singleton, we need to execute it only once
if ( !div ) {
return;
}
container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
"margin-top:1px;padding:0;border:0";
div.style.cssText =
"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
"margin:auto;border:1px;padding:1px;" +
"width:60%;top:1%";
documentElement.appendChild( container ).appendChild( div );
var divStyle = window.getComputedStyle( div );
pixelPositionVal = divStyle.top !== "1%";
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
// Some styles come back with percentage values, even though they shouldn't
div.style.right = "60%";
pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
// Support: IE 9 - 11 only
// Detect misreporting of content dimensions for box-sizing:border-box elements
boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
// Support: IE 9 only
// Detect overflow:scroll screwiness (gh-3699)
div.style.position = "absolute";
scrollboxSizeVal = div.offsetWidth === 36 || "absolute";
documentElement.removeChild( container );
// Nullify the div so it wouldn't be stored in the memory and
// it will also be a sign that checks already performed
div = null;
}
function roundPixelMeasures( measure ) {
return Math.round( parseFloat( measure ) );
}
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
reliableMarginLeftVal,
container = document.createElement( "div" ),
div = document.createElement( "div" );
// Finish early in limited (non-browser) environments
if ( !div.style ) {
return;
}
// Support: IE <=9 - 11 only
// Style of cloned element affects source element cloned (#8908)
div.style.backgroundClip = "content-box";
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
jQuery.extend( support, {
boxSizingReliable: function() {
computeStyleTests();
return boxSizingReliableVal;
},
pixelBoxStyles: function() {
computeStyleTests();
return pixelBoxStylesVal;
},
pixelPosition: function() {
computeStyleTests();
return pixelPositionVal;
},
reliableMarginLeft: function() {
computeStyleTests();
return reliableMarginLeftVal;
},
scrollboxSize: function() {
computeStyleTests();
return scrollboxSizeVal;
}
} );
} )();
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
// Support: Firefox 51+
// Retrieving style before computed somehow
// fixes an issue with getting wrong values
// on detached elements
style = elem.style;
computed = computed || getStyles( elem );
// getPropertyValue is needed for:
// .css('filter') (IE 9 only, #12537)
// .css('--customProperty) (#3144)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
// A tribute to the "awesome hack by Dean Edwards"
// Android Browser returns percentage for some values,
// but width seems to be reliably pixels.
// This is against the CSSOM draft spec:
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
// Remember the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
// Put in the new values to get a computed value out
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== undefined ?
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
ret + "" :
ret;
}
function addGetHookIf( conditionFn, hookFn ) {
// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {
// Hook not needed (or it's not possible to use it due
// to missing dependency), remove it.
delete this.get;
return;
}
// Hook needed; redefine it so that the support test is not executed again.
return ( this.get = hookFn ).apply( this, arguments );
}
};
}
var
// Swappable if display is none or starts with table
// except "table", "table-cell", or "table-caption"
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
rcustomProp = /^--/,
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssNormalTransform = {
letterSpacing: "0",
fontWeight: "400"
},
cssPrefixes = [ "Webkit", "Moz", "ms" ],
emptyStyle = document.createElement( "div" ).style;
// Return a css property mapped to a potentially vendor prefixed property
function vendorPropName( name ) {
// Shortcut for names that are not vendor prefixed
if ( name in emptyStyle ) {
return name;
}
// Check for vendor prefixed names
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
i = cssPrefixes.length;
while ( i-- ) {
name = cssPrefixes[ i ] + capName;
if ( name in emptyStyle ) {
return name;
}
}
}
// Return a property mapped along what jQuery.cssProps suggests or to
// a vendor prefixed property.
function finalPropName( name ) {
var ret = jQuery.cssProps[ name ];
if ( !ret ) {
ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
}
return ret;
}
function setPositiveNumber( elem, value, subtract ) {
// Any relative (+/-) values have already been
// normalized at this point
var matches = rcssNum.exec( value );
return matches ?
// Guard against undefined "subtract", e.g., when used as in cssHooks
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
value;
}
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
delta = 0;
// Adjustment may not be necessary
if ( box === ( isBorderBox ? "border" : "content" ) ) {
return 0;
}
for ( ; i < 4; i += 2 ) {
// Both box models exclude margin
if ( box === "margin" ) {
delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
}
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
if ( !isBorderBox ) {
// Add padding
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
// For "border" or "margin", add border
if ( box !== "padding" ) {
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
// But still keep track of it otherwise
} else {
extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
}
// If we get here with a border-box (content + padding + border), we're seeking "content" or
// "padding" or "margin"
} else {
// For "content", subtract padding
if ( box === "content" ) {
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
}
// For "content" or "padding", subtract border
if ( box !== "margin" ) {
delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
}
}
}
// Account for positive content-box scroll gutter when requested by providing computedVal
if ( !isBorderBox && computedVal >= 0 ) {
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
// Assuming integer scroll gutter, subtract the rest and round down
delta += Math.max( 0, Math.ceil(
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
computedVal -
delta -
extra -
0.5
) );
}
return delta;
}
function getWidthOrHeight( elem, dimension, extra ) {
// Start with computed style
var styles = getStyles( elem ),
val = curCSS( elem, dimension, styles ),
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
valueIsBorderBox = isBorderBox;
// Support: Firefox <=54
// Return a confounding non-pixel value or feign ignorance, as appropriate.
if ( rnumnonpx.test( val ) ) {
if ( !extra ) {
return val;
}
val = "auto";
}
// Check for style in case a browser which returns unreliable values
// for getComputedStyle silently falls back to the reliable elem.style
valueIsBorderBox = valueIsBorderBox &&
( support.boxSizingReliable() || val === elem.style[ dimension ] );
// Fall back to offsetWidth/offsetHeight when value is "auto"
// This happens for inline elements with no explicit setting (gh-3571)
// Support: Android <=4.1 - 4.3 only
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
if ( val === "auto" ||
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) {
val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ];
// offsetWidth/offsetHeight provide border-box values
valueIsBorderBox = true;
}
// Normalize "" and auto
val = parseFloat( val ) || 0;
// Adjust for the element's box model
return ( val +
boxModelAdjustment(
elem,
dimension,
extra || ( isBorderBox ? "border" : "content" ),
valueIsBorderBox,
styles,
// Provide the current computed size to request scroll gutter calculation (gh-3589)
val
)
) + "px";
}
jQuery.extend( {
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
get: function( elem, computed ) {
if ( computed ) {
// We should always get a number back from opacity
var ret = curCSS( elem, "opacity" );
return ret === "" ? "1" : ret;
}
}
}
},
// Don't automatically add "px" to these possibly-unitless properties
cssNumber: {
"animationIterationCount": true,
"columnCount": true,
"fillOpacity": true,
"flexGrow": true,
"flexShrink": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"order": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {},
// Get and set the style property on a DOM Node
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
}
// Make sure that we're working with the right name
var ret, type, hooks,
origName = camelCase( name ),
isCustomProp = rcustomProp.test( name ),
style = elem.style;
// Make sure that we're working with the right name. We don't
// want to query the value if it is a CSS custom property
// since they are user-defined.
if ( !isCustomProp ) {
name = finalPropName( origName );
}
// Gets hook for the prefixed version, then unprefixed version
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
// Check if we're setting a value
if ( value !== undefined ) {
type = typeof value;
// Convert "+=" or "-=" to relative numbers (#7345)
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
value = adjustCSS( elem, name, ret );
// Fixes bug #9237
type = "number";
}
// Make sure that null and NaN values aren't set (#7116)
if ( value == null || value !== value ) {
return;
}
// If a number was passed in, add the unit (except for certain CSS properties)
if ( type === "number" ) {
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
}
// background-* props affect original clone's values
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
style[ name ] = "inherit";
}
// If a hook was provided, use that value, otherwise just set the specified value
if ( !hooks || !( "set" in hooks ) ||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
if ( isCustomProp ) {
style.setProperty( name, value );
} else {
style[ name ] = value;
}
}
} else {
// If a hook was provided get the non-computed value from there
if ( hooks && "get" in hooks &&
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
return ret;
}
// Otherwise just get the value from the style object
return style[ name ];
}
},
css: function( elem, name, extra, styles ) {
var val, num, hooks,
origName = camelCase( name ),
isCustomProp = rcustomProp.test( name );
// Make sure that we're working with the right name. We don't
// want to modify the value if it is a CSS custom property
// since they are user-defined.
if ( !isCustomProp ) {
name = finalPropName( origName );
}
// Try prefixed name followed by the unprefixed name
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
// If a hook was provided get the computed value from there
if ( hooks && "get" in hooks ) {
val = hooks.get( elem, true, extra );
}
// Otherwise, if a way to get the computed value exists, use that
if ( val === undefined ) {
val = curCSS( elem, name, styles );
}
// Convert "normal" to computed value
if ( val === "normal" && name in cssNormalTransform ) {
val = cssNormalTransform[ name ];
}
// Make numeric if forced or a qualifier was provided and val looks numeric
if ( extra === "" || extra ) {
num = parseFloat( val );
return extra === true || isFinite( num ) ? num || 0 : val;
}
return val;
}
} );
jQuery.each( [ "height", "width" ], function( i, dimension ) {
jQuery.cssHooks[ dimension ] = {
get: function( elem, computed, extra ) {
if ( computed ) {
// Certain elements can have dimension info if we invisibly show them
// but it must have a current display style that would benefit
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
// Support: Safari 8+
// Table columns in Safari have non-zero offsetWidth & zero
// getBoundingClientRect().width unless display is changed.
// Support: IE <=11 only
// Running getBoundingClientRect on a disconnected node
// in IE throws an error.
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
swap( elem, cssShow, function() {
return getWidthOrHeight( elem, dimension, extra );
} ) :
getWidthOrHeight( elem, dimension, extra );
}
},
set: function( elem, value, extra ) {
var matches,
styles = getStyles( elem ),
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
subtract = extra && boxModelAdjustment(
elem,
dimension,
extra,
isBorderBox,
styles
);
// Account for unreliable border-box dimensions by comparing offset* to computed and
// faking a content-box to get border and padding (gh-3699)
if ( isBorderBox && support.scrollboxSize() === styles.position ) {
subtract -= Math.ceil(
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
parseFloat( styles[ dimension ] ) -
boxModelAdjustment( elem, dimension, "border", false, styles ) -
0.5
);
}
// Convert to pixels if value adjustment is needed
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
( matches[ 3 ] || "px" ) !== "px" ) {
elem.style[ dimension ] = value;
value = jQuery.css( elem, dimension );
}
return setPositiveNumber( elem, value, subtract );
}
};
} );
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
function( elem, computed ) {
if ( computed ) {
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
elem.getBoundingClientRect().left -
swap( elem, { marginLeft: 0 }, function() {
return elem.getBoundingClientRect().left;
} )
) + "px";
}
}
);
// These hooks are used by animate to expand properties
jQuery.each( {
margin: "",
padding: "",
border: "Width"
}, function( prefix, suffix ) {
jQuery.cssHooks[ prefix + suffix ] = {
expand: function( value ) {
var i = 0,
expanded = {},
// Assumes a single number if not a string
parts = typeof value === "string" ? value.split( " " ) : [ value ];
for ( ; i < 4; i++ ) {
expanded[ prefix + cssExpand[ i ] + suffix ] =
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
}
return expanded;
}
};
if ( prefix !== "margin" ) {
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
}
} );
jQuery.fn.extend( {
css: function( name, value ) {
return access( this, function( elem, name, value ) {
var styles, len,
map = {},
i = 0;
if ( Array.isArray( name ) ) {
styles = getStyles( elem );
len = name.length;
for ( ; i < len; i++ ) {
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
}
return map;
}
return value !== undefined ?
jQuery.style( elem, name, value ) :
jQuery.css( elem, name );
}, name, value, arguments.length > 1 );
}
} );
function Tween( elem, options, prop, end, easing ) {
return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function( elem, options, prop, end, easing, unit ) {
this.elem = elem;
this.prop = prop;
this.easing = easing || jQuery.easing._default;
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
},
cur: function() {
var hooks = Tween.propHooks[ this.prop ];
return hooks && hooks.get ?
hooks.get( this ) :
Tween.propHooks._default.get( this );
},
run: function( percent ) {
var eased,
hooks = Tween.propHooks[ this.prop ];
if ( this.options.duration ) {
this.pos = eased = jQuery.easing[ this.easing ](
percent, this.options.duration * percent, 0, 1, this.options.duration
);
} else {
this.pos = eased = percent;
}
this.now = ( this.end - this.start ) * eased + this.start;
if ( this.options.step ) {
this.options.step.call( this.elem, this.now, this );
}
if ( hooks && hooks.set ) {
hooks.set( this );
} else {
Tween.propHooks._default.set( this );
}
return this;
}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function( tween ) {
var result;
// Use a property on the element directly when it is not a DOM element,
// or when there is no matching style property that exists.
if ( tween.elem.nodeType !== 1 ||
tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
return tween.elem[ tween.prop ];
}
// Passing an empty string as a 3rd parameter to .css will automatically
// attempt a parseFloat and fallback to a string if the parse fails.
// Simple values such as "10px" are parsed to Float;
// complex values such as "rotate(1rad)" are returned as-is.
result = jQuery.css( tween.elem, tween.prop, "" );
// Empty strings, null, undefined and "auto" are converted to 0.
return !result || result === "auto" ? 0 : result;
},
set: function( tween ) {
// Use step hook for back compat.
// Use cssHook if its there.
// Use .style if available and use plain properties where available.
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
} else if ( tween.elem.nodeType === 1 &&
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
jQuery.cssHooks[ tween.prop ] ) ) {
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;
}
}
}
};
// Support: IE <=9 only
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
if ( tween.elem.nodeType && tween.elem.parentNode ) {
tween.elem[ tween.prop ] = tween.now;
}
}
};
jQuery.easing = {
linear: function( p ) {
return p;
},
swing: function( p ) {
return 0.5 - Math.cos( p * Math.PI ) / 2;
},
_default: "swing"
};
jQuery.fx = Tween.prototype.init;
// Back compat <1.8 extension point
jQuery.fx.step = {};
var
fxNow, inProgress,
rfxtypes = /^(?:toggle|show|hide)$/,
rrun = /queueHooks$/;
function schedule() {
if ( inProgress ) {
if ( document.hidden === false && window.requestAnimationFrame ) {
window.requestAnimationFrame( schedule );
} else {
window.setTimeout( schedule, jQuery.fx.interval );
}
jQuery.fx.tick();
}
}
// Animations created synchronously will run synchronously
function createFxNow() {
window.setTimeout( function() {
fxNow = undefined;
} );
return ( fxNow = Date.now() );
}
// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
var which,
i = 0,
attrs = { height: type };
// If we include width, step value is 1 to do all cssExpand values,
// otherwise step value is 2 to skip over Left and Right
includeWidth = includeWidth ? 1 : 0;
for ( ; i < 4; i += 2 - includeWidth ) {
which = cssExpand[ i ];
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
}
if ( includeWidth ) {
attrs.opacity = attrs.width = type;
}
return attrs;
}
function createTween( value, prop, animation ) {
var tween,
collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
index = 0,
length = collection.length;
for ( ; index < length; index++ ) {
if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
// We're done with this property
return tween;
}
}
}
function defaultPrefilter( elem, props, opts ) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
style = elem.style,
hidden = elem.nodeType && isHiddenWithinTree( elem ),
dataShow = dataPriv.get( elem, "fxshow" );
// Queue-skipping animations hijack the fx hooks
if ( !opts.queue ) {
hooks = jQuery._queueHooks( elem, "fx" );
if ( hooks.unqueued == null ) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function() {
if ( !hooks.unqueued ) {
oldfire();
}
};
}
hooks.unqueued++;
anim.always( function() {
// Ensure the complete handler is called before this completes
anim.always( function() {
hooks.unqueued--;
if ( !jQuery.queue( elem, "fx" ).length ) {
hooks.empty.fire();
}
} );
} );
}
// Detect show/hide animations
for ( prop in props ) {
value = props[ prop ];
if ( rfxtypes.test( value ) ) {
delete props[ prop ];
toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
// Pretend to be hidden if this is a "show" and
// there is still data from a stopped show/hide
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
hidden = true;
// Ignore all other no-op show/hide data
} else {
continue;
}
}
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
}
}
// Bail out if this is a no-op like .hide().hide()
propTween = !jQuery.isEmptyObject( props );
if ( !propTween && jQuery.isEmptyObject( orig ) ) {
return;
}
// Restrict "overflow" and "display" styles during box animations
if ( isBox && elem.nodeType === 1 ) {
// Support: IE <=9 - 11, Edge 12 - 15
// Record all 3 overflow attributes because IE does not infer the shorthand
// from identically-valued overflowX and overflowY and Edge just mirrors
// the overflowX value there.
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
// Identify a display type, preferring old show/hide data over the CSS cascade
restoreDisplay = dataShow && dataShow.display;
if ( restoreDisplay == null ) {
restoreDisplay = dataPriv.get( elem, "display" );
}
display = jQuery.css( elem, "display" );
if ( display === "none" ) {
if ( restoreDisplay ) {
display = restoreDisplay;
} else {
// Get nonempty value(s) by temporarily forcing visibility
showHide( [ elem ], true );
restoreDisplay = elem.style.display || restoreDisplay;
display = jQuery.css( elem, "display" );
showHide( [ elem ] );
}
}
// Animate inline elements as inline-block
if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
if ( jQuery.css( elem, "float" ) === "none" ) {
// Restore the original display value at the end of pure show/hide animations
if ( !propTween ) {
anim.done( function() {
style.display = restoreDisplay;
} );
if ( restoreDisplay == null ) {
display = style.display;
restoreDisplay = display === "none" ? "" : display;
}
}
style.display = "inline-block";
}
}
}
if ( opts.overflow ) {
style.overflow = "hidden";
anim.always( function() {
style.overflow = opts.overflow[ 0 ];
style.overflowX = opts.overflow[ 1 ];
style.overflowY = opts.overflow[ 2 ];
} );
}
// Implement show/hide animations
propTween = false;
for ( prop in orig ) {
// General show/hide setup for this element animation
if ( !propTween ) {
if ( dataShow ) {
if ( "hidden" in dataShow ) {
hidden = dataShow.hidden;
}
} else {
dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
}
// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
if ( toggle ) {
dataShow.hidden = !hidden;
}
// Show elements before animating them
if ( hidden ) {
showHide( [ elem ], true );
}
/* eslint-disable no-loop-func */
anim.done( function() {
/* eslint-enable no-loop-func */
// The final step of a "hide" animation is actually hiding the element
if ( !hidden ) {
showHide( [ elem ] );
}
dataPriv.remove( elem, "fxshow" );
for ( prop in orig ) {
jQuery.style( elem, prop, orig[ prop ] );
}
} );
}
// Per-property setup
propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
if ( !( prop in dataShow ) ) {
dataShow[ prop ] = propTween.start;
if ( hidden ) {
propTween.end = propTween.start;
propTween.start = 0;
}
}
}
}
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
name = camelCase( index );
easing = specialEasing[ name ];
value = props[ index ];
if ( Array.isArray( value ) ) {
easing = value[ 1 ];
value = props[ index ] = value[ 0 ];
}
if ( index !== name ) {
props[ name ] = value;
delete props[ index ];
}
hooks = jQuery.cssHooks[ name ];
if ( hooks && "expand" in hooks ) {
value = hooks.expand( value );
delete props[ name ];
// Not quite $.extend, this won't overwrite existing keys.
// Reusing 'index' because we have the correct "name"
for ( index in value ) {
if ( !( index in props ) ) {
props[ index ] = value[ index ];
specialEasing[ index ] = easing;
}
}
} else {
specialEasing[ name ] = easing;
}
}
}
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = Animation.prefilters.length,
deferred = jQuery.Deferred().always( function() {
// Don't match elem in the :animated selector
delete tick.elem;
} ),
tick = function() {
if ( stopped ) {
return false;
}
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
// Support: Android 2.3 only
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
temp = remaining / animation.duration || 0,
percent = 1 - temp,
index = 0,
length = animation.tweens.length;
for ( ; index < length; index++ ) {
animation.tweens[ index ].run( percent );
}
deferred.notifyWith( elem, [ animation, percent, remaining ] );
// If there's more to do, yield
if ( percent < 1 && length ) {
return remaining;
}
// If this was an empty animation, synthesize a final progress notification
if ( !length ) {
deferred.notifyWith( elem, [ animation, 1, 0 ] );
}
// Resolve the animation and report its conclusion
deferred.resolveWith( elem, [ animation ] );
return false;
},
animation = deferred.promise( {
elem: elem,
props: jQuery.extend( {}, properties ),
opts: jQuery.extend( true, {
specialEasing: {},
easing: jQuery.easing._default
}, options ),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [],
createTween: function( prop, end ) {
var tween = jQuery.Tween( elem, animation.opts, prop, end,
animation.opts.specialEasing[ prop ] || animation.opts.easing );
animation.tweens.push( tween );
return tween;
},
stop: function( gotoEnd ) {
var index = 0,
// If we are going to the end, we want to run all the tweens
// otherwise we skip this part
length = gotoEnd ? animation.tweens.length : 0;
if ( stopped ) {
return this;
}
stopped = true;
for ( ; index < length; index++ ) {
animation.tweens[ index ].run( 1 );
}
// Resolve when we played the last frame; otherwise, reject
if ( gotoEnd ) {
deferred.notifyWith( elem, [ animation, 1, 0 ] );
deferred.resolveWith( elem, [ animation, gotoEnd ] );
} else {
deferred.rejectWith( elem, [ animation, gotoEnd ] );
}
return this;
}
} ),
props = animation.props;
propFilter( props, animation.opts.specialEasing );
for ( ; index < length; index++ ) {
result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
if ( result ) {
if ( isFunction( result.stop ) ) {
jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
result.stop.bind( result );
}
return result;
}
}
jQuery.map( props, createTween, animation );
if ( isFunction( animation.opts.start ) ) {
animation.opts.start.call( elem, animation );
}
// Attach callbacks from options
animation
.progress( animation.opts.progress )
.done( animation.opts.done, animation.opts.complete )
.fail( animation.opts.fail )
.always( animation.opts.always );
jQuery.fx.timer(
jQuery.extend( tick, {
elem: elem,
anim: animation,
queue: animation.opts.queue
} )
);
return animation;
}
jQuery.Animation = jQuery.extend( Animation, {
tweeners: {
"*": [ function( prop, value ) {
var tween = this.createTween( prop, value );
adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
return tween;
} ]
},
tweener: function( props, callback ) {
if ( isFunction( props ) ) {
callback = props;
props = [ "*" ];
} else {
props = props.match( rnothtmlwhite );
}
var prop,
index = 0,
length = props.length;
for ( ; index < length; index++ ) {
prop = props[ index ];
Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
Animation.tweeners[ prop ].unshift( callback );
}
},
prefilters: [ defaultPrefilter ],
prefilter: function( callback, prepend ) {
if ( prepend ) {
Animation.prefilters.unshift( callback );
} else {
Animation.prefilters.push( callback );
}
}
} );
jQuery.speed = function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
isFunction( speed ) && speed,
duration: speed,
easing: fn && easing || easing && !isFunction( easing ) && easing
};
// Go to the end state if fx are off
if ( jQuery.fx.off ) {
opt.duration = 0;
} else {
if ( typeof opt.duration !== "number" ) {
if ( opt.duration in jQuery.fx.speeds ) {
opt.duration = jQuery.fx.speeds[ opt.duration ];
} else {
opt.duration = jQuery.fx.speeds._default;
}
}
}
// Normalize opt.queue - true/undefined/null -> "fx"
if ( opt.queue == null || opt.queue === true ) {
opt.queue = "fx";
}
// Queueing
opt.old = opt.complete;
opt.complete = function() {
if ( isFunction( opt.old ) ) {
opt.old.call( this );
}
if ( opt.queue ) {
jQuery.dequeue( this, opt.queue );
}
};
return opt;
};
jQuery.fn.extend( {
fadeTo: function( speed, to, easing, callback ) {
// Show any hidden elements after setting opacity to 0
return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
// Animate to the value specified
.end().animate( { opacity: to }, speed, easing, callback );
},
animate: function( prop, speed, easing, callback ) {
var empty = jQuery.isEmptyObject( prop ),
optall = jQuery.speed( speed, easing, callback ),
doAnimation = function() {
// Operate on a copy of prop so per-property easing won't be lost
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
// Empty animations, or finishing resolves immediately
if ( empty || dataPriv.get( this, "finish" ) ) {
anim.stop( true );
}
};
doAnimation.finish = doAnimation;
return empty || optall.queue === false ?
this.each( doAnimation ) :
this.queue( optall.queue, doAnimation );
},
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
};
if ( typeof type !== "string" ) {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if ( clearQueue && type !== false ) {
this.queue( type || "fx", [] );
}
return this.each( function() {
var dequeue = true,
index = type != null && type + "queueHooks",
timers = jQuery.timers,
data = dataPriv.get( this );
if ( index ) {
if ( data[ index ] && data[ index ].stop ) {
stopQueue( data[ index ] );
}
} else {
for ( index in data ) {
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
stopQueue( data[ index ] );
}
}
}
for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this &&
( type == null || timers[ index ].queue === type ) ) {
timers[ index ].anim.stop( gotoEnd );
dequeue = false;
timers.splice( index, 1 );
}
}
// Start the next in the queue if the last step wasn't forced.
// Timers currently will call their complete callbacks, which
// will dequeue but only if they were gotoEnd.
if ( dequeue || !gotoEnd ) {
jQuery.dequeue( this, type );
}
} );
},
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
var index,
data = dataPriv.get( this ),
queue = data[ type + "queue" ],
hooks = data[ type + "queueHooks" ],
timers = jQuery.timers,
length = queue ? queue.length : 0;
// Enable finishing flag on private data
data.finish = true;
// Empty the queue first
jQuery.queue( this, type, [] );
if ( hooks && hooks.stop ) {
hooks.stop.call( this, true );
}
// Look for any active animations, and finish them
for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
timers[ index ].anim.stop( true );
timers.splice( index, 1 );
}
}
// Look for any animations in the old queue and finish them
for ( index = 0; index < length; index++ ) {
if ( queue[ index ] && queue[ index ].finish ) {
queue[ index ].finish.call( this );
}
}
// Turn off finishing flag
delete data.finish;
} );
}
} );
jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
var cssFn = jQuery.fn[ name ];
jQuery.fn[ name ] = function( speed, easing, callback ) {
return speed == null || typeof speed === "boolean" ?
cssFn.apply( this, arguments ) :
this.animate( genFx( name, true ), speed, easing, callback );
};
} );
// Generate shortcuts for custom animations
jQuery.each( {
slideDown: genFx( "show" ),
slideUp: genFx( "hide" ),
slideToggle: genFx( "toggle" ),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
jQuery.fn[ name ] = function( speed, easing, callback ) {
return this.animate( props, speed, easing, callback );
};
} );
jQuery.timers = [];
jQuery.fx.tick = function() {
var timer,
i = 0,
timers = jQuery.timers;
fxNow = Date.now();
for ( ; i < timers.length; i++ ) {
timer = timers[ i ];
// Run the timer and safely remove it when done (allowing for external removal)
if ( !timer() && timers[ i ] === timer ) {
timers.splice( i--, 1 );
}
}
if ( !timers.length ) {
jQuery.fx.stop();
}
fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {
jQuery.timers.push( timer );
jQuery.fx.start();
};
jQuery.fx.interval = 13;
jQuery.fx.start = function() {
if ( inProgress ) {
return;
}
inProgress = true;
schedule();
};
jQuery.fx.stop = function() {
inProgress = null;
};
jQuery.fx.speeds = {
slow: 600,
fast: 200,
// Default speed
_default: 400
};
// Based off of the plugin by Clint Helfers, with permission.
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
type = type || "fx";
return this.queue( type, function( next, hooks ) {
var timeout = window.setTimeout( next, time );
hooks.stop = function() {
window.clearTimeout( timeout );
};
} );
};
( function() {
var input = document.createElement( "input" ),
select = document.createElement( "select" ),
opt = select.appendChild( document.createElement( "option" ) );
input.type = "checkbox";
// Support: Android <=4.3 only
// Default value for a checkbox should be "on"
support.checkOn = input.value !== "";
// Support: IE <=11 only
// Must access selectedIndex to make default options select
support.optSelected = opt.selected;
// Support: IE <=11 only
// An input loses its value after becoming a radio
input = document.createElement( "input" );
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
} )();
var boolHook,
attrHandle = jQuery.expr.attrHandle;
jQuery.fn.extend( {
attr: function( name, value ) {
return access( this, jQuery.attr, name, value, arguments.length > 1 );
},
removeAttr: function( name ) {
return this.each( function() {
jQuery.removeAttr( this, name );
} );
}
} );
jQuery.extend( {
attr: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;
// Don't get/set attributes on text, comment and attribute nodes
if ( nType === 3 || nType === 8 || nType === 2 ) {
return;
}
// Fallback to prop when attributes are not supported
if ( typeof elem.getAttribute === "undefined" ) {
return jQuery.prop( elem, name, value );
}
// Attribute hooks are determined by the lowercase version
// Grab necessary hook if one is defined
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
}
if ( value !== undefined ) {
if ( value === null ) {
jQuery.removeAttr( elem, name );
return;
}
if ( hooks && "set" in hooks &&
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
return ret;
}
elem.setAttribute( name, value + "" );
return value;
}
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
return ret;
}
ret = jQuery.find.attr( elem, name );
// Non-existent attributes return null, we normalize to undefined
return ret == null ? undefined : ret;
},
attrHooks: {
type: {
set: function( elem, value ) {
if ( !support.radioValue && value === "radio" &&
nodeName( elem, "input" ) ) {
var val = elem.value;
elem.setAttribute( "type", value );
if ( val ) {
elem.value = val;
}
return value;
}
}
}
},
removeAttr: function( elem, value ) {
var name,
i = 0,
// Attribute names can contain non-HTML whitespace characters
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
attrNames = value && value.match( rnothtmlwhite );
if ( attrNames && elem.nodeType === 1 ) {
while ( ( name = attrNames[ i++ ] ) ) {
elem.removeAttribute( name );
}
}
}
} );
// Hooks for boolean attributes
boolHook = {
set: function( elem, value, name ) {
if ( value === false ) {
// Remove boolean attributes when set to false
jQuery.removeAttr( elem, name );
} else {
elem.setAttribute( name, name );
}
return name;
}
};
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
var getter = attrHandle[ name ] || jQuery.find.attr;
attrHandle[ name ] = function( elem, name, isXML ) {
var ret, handle,
lowercaseName = name.toLowerCase();
if ( !isXML ) {
// Avoid an infinite loop by temporarily removing this function from the getter
handle = attrHandle[ lowercaseName ];
attrHandle[ lowercaseName ] = ret;
ret = getter( elem, name, isXML ) != null ?
lowercaseName :
null;
attrHandle[ lowercaseName ] = handle;
}
return ret;
};
} );
var rfocusable = /^(?:input|select|textarea|button)$/i,
rclickable = /^(?:a|area)$/i;
jQuery.fn.extend( {
prop: function( name, value ) {
return access( this, jQuery.prop, name, value, arguments.length > 1 );
},
removeProp: function( name ) {
return this.each( function() {
delete this[ jQuery.propFix[ name ] || name ];
} );
}
} );
jQuery.extend( {
prop: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;
// Don't get/set properties on text, comment and attribute nodes
if ( nType === 3 || nType === 8 || nType === 2 ) {
return;
}
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
// Fix name and attach hooks
name = jQuery.propFix[ name ] || name;
hooks = jQuery.propHooks[ name ];
}
if ( value !== undefined ) {
if ( hooks && "set" in hooks &&
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
return ret;
}
return ( elem[ name ] = value );
}
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
return ret;
}
return elem[ name ];
},
propHooks: {
tabIndex: {
get: function( elem ) {
// Support: IE <=9 - 11 only
// elem.tabIndex doesn't always return the
// correct value when it hasn't been explicitly set
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
// Use proper attribute retrieval(#12072)
var tabindex = jQuery.find.attr( elem, "tabindex" );
if ( tabindex ) {
return parseInt( tabindex, 10 );
}
if (
rfocusable.test( elem.nodeName ) ||
rclickable.test( elem.nodeName ) &&
elem.href
) {
return 0;
}
return -1;
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
}
} );
// Support: IE <=11 only
// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
// eslint rule "no-unused-expressions" is disabled for this code
// since it considers such accessions noop
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
/* eslint no-unused-expressions: "off" */
var parent = elem.parentNode;
if ( parent && parent.parentNode ) {
parent.parentNode.selectedIndex;
}
return null;
},
set: function( elem ) {
/* eslint no-unused-expressions: "off" */
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;
if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
}
}
}
};
}
jQuery.each( [
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
], function() {
jQuery.propFix[ this.toLowerCase() ] = this;
} );
// Strip and collapse whitespace according to HTML spec
// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
function stripAndCollapse( value ) {
var tokens = value.match( rnothtmlwhite ) || [];
return tokens.join( " " );
}
function getClass( elem ) {
return elem.getAttribute && elem.getAttribute( "class" ) || "";
}
function classesToArray( value ) {
if ( Array.isArray( value ) ) {
return value;
}
if ( typeof value === "string" ) {
return value.match( rnothtmlwhite ) || [];
}
return [];
}
jQuery.fn.extend( {
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( isFunction( value ) ) {
return this.each( function( j ) {
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
} );
}
classes = classesToArray( value );
if ( classes.length ) {
while ( ( elem = this[ i++ ] ) ) {
curValue = getClass( elem );
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
if ( cur ) {
j = 0;
while ( ( clazz = classes[ j++ ] ) ) {
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
cur += clazz + " ";
}
}
// Only assign if different to avoid unneeded rendering.
finalValue = stripAndCollapse( cur );
if ( curValue !== finalValue ) {
elem.setAttribute( "class", finalValue );
}
}
}
}
return this;
},
removeClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( isFunction( value ) ) {
return this.each( function( j ) {
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
} );
}
if ( !arguments.length ) {
return this.attr( "class", "" );
}
classes = classesToArray( value );
if ( classes.length ) {
while ( ( elem = this[ i++ ] ) ) {
curValue = getClass( elem );
// This expression is here for better compressibility (see addClass)
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
if ( cur ) {
j = 0;
while ( ( clazz = classes[ j++ ] ) ) {
// Remove *all* instances
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
cur = cur.replace( " " + clazz + " ", " " );
}
}
// Only assign if different to avoid unneeded rendering.
finalValue = stripAndCollapse( cur );
if ( curValue !== finalValue ) {
elem.setAttribute( "class", finalValue );
}
}
}
}
return this;
},
toggleClass: function( value, stateVal ) {
var type = typeof value,
isValidValue = type === "string" || Array.isArray( value );
if ( typeof stateVal === "boolean" && isValidValue ) {
return stateVal ? this.addClass( value ) : this.removeClass( value );
}
if ( isFunction( value ) ) {
return this.each( function( i ) {
jQuery( this ).toggleClass(
value.call( this, i, getClass( this ), stateVal ),
stateVal
);
} );
}
return this.each( function() {
var className, i, self, classNames;
if ( isValidValue ) {
// Toggle individual class names
i = 0;
self = jQuery( this );
classNames = classesToArray( value );
while ( ( className = classNames[ i++ ] ) ) {
// Check each className given, space separated list
if ( self.hasClass( className ) ) {
self.removeClass( className );
} else {
self.addClass( className );
}
}
// Toggle whole class name
} else if ( value === undefined || type === "boolean" ) {
className = getClass( this );
if ( className ) {
// Store className if set
dataPriv.set( this, "__className__", className );
}
// If the element has a class name or if we're passed `false`,
// then remove the whole classname (if there was one, the above saved it).
// Otherwise bring back whatever was previously saved (if anything),
// falling back to the empty string if nothing was stored.
if ( this.setAttribute ) {
this.setAttribute( "class",
className || value === false ?
"" :
dataPriv.get( this, "__className__" ) || ""
);
}
}
} );
},
hasClass: function( selector ) {
var className, elem,
i = 0;
className = " " + selector + " ";
while ( ( elem = this[ i++ ] ) ) {
if ( elem.nodeType === 1 &&
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
return true;
}
}
return false;
}
} );
var rreturn = /\r/g;
jQuery.fn.extend( {
val: function( value ) {
var hooks, ret, valueIsFunction,
elem = this[ 0 ];
if ( !arguments.length ) {
if ( elem ) {
hooks = jQuery.valHooks[ elem.type ] ||
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
if ( hooks &&
"get" in hooks &&
( ret = hooks.get( elem, "value" ) ) !== undefined
) {
return ret;
}
ret = elem.value;
// Handle most common string cases
if ( typeof ret === "string" ) {
return ret.replace( rreturn, "" );
}
// Handle cases where value is null/undef or number
return ret == null ? "" : ret;
}
return;
}
valueIsFunction = isFunction( value );
return this.each( function( i ) {
var val;
if ( this.nodeType !== 1 ) {
return;
}
if ( valueIsFunction ) {
val = value.call( this, i, jQuery( this ).val() );
} else {
val = value;
}
// Treat null/undefined as ""; convert numbers to string
if ( val == null ) {
val = "";
} else if ( typeof val === "number" ) {
val += "";
} else if ( Array.isArray( val ) ) {
val = jQuery.map( val, function( value ) {
return value == null ? "" : value + "";
} );
}
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
// If set returns undefined, fall back to normal setting
if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
this.value = val;
}
} );
}
} );
jQuery.extend( {
valHooks: {
option: {
get: function( elem ) {
var val = jQuery.find.attr( elem, "value" );
return val != null ?
val :
// Support: IE <=10 - 11 only
// option.text throws exceptions (#14686, #14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
stripAndCollapse( jQuery.text( elem ) );
}
},
select: {
get: function( elem ) {
var value, option, i,
options = elem.options,
index = elem.selectedIndex,
one = elem.type === "select-one",
values = one ? null : [],
max = one ? index + 1 : options.length;
if ( index < 0 ) {
i = max;
} else {
i = one ? index : 0;
}
// Loop through all the selected options
for ( ; i < max; i++ ) {
option = options[ i ];
// Support: IE <=9 only
// IE8-9 doesn't update selected after form reset (#2551)
if ( ( option.selected || i === index ) &&
// Don't return options that are disabled or in a disabled optgroup
!option.disabled &&
( !option.parentNode.disabled ||
!nodeName( option.parentNode, "optgroup" ) ) ) {
// Get the specific value for the option
value = jQuery( option ).val();
// We don't need an array for one selects
if ( one ) {
return value;
}
// Multi-Selects return an array
values.push( value );
}
}
return values;
},
set: function( elem, value ) {
var optionSet, option,
options = elem.options,
values = jQuery.makeArray( value ),
i = options.length;
while ( i-- ) {
option = options[ i ];
/* eslint-disable no-cond-assign */
if ( option.selected =
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
) {
optionSet = true;
}
/* eslint-enable no-cond-assign */
}
// Force browsers to behave consistently when non-matching value is set
if ( !optionSet ) {
elem.selectedIndex = -1;
}
return values;
}
}
}
} );
// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = {
set: function( elem, value ) {
if ( Array.isArray( value ) ) {
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
}
}
};
if ( !support.checkOn ) {
jQuery.valHooks[ this ].get = function( elem ) {
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
};
}
} );
// Return jQuery for attributes-only inclusion
support.focusin = "onfocusin" in window;
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
stopPropagationCallback = function( e ) {
e.stopPropagation();
};
jQuery.extend( jQuery.event, {
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
cur = lastElement = tmp = elem = elem || document;
// Don't do events on text and comment nodes
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
// focus/blur morphs to focusin/out; ensure we're not firing them right now
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
return;
}
if ( type.indexOf( "." ) > -1 ) {
// Namespaced trigger; create a regexp to match event type in handle()
namespaces = type.split( "." );
type = namespaces.shift();
namespaces.sort();
}
ontype = type.indexOf( ":" ) < 0 && "on" + type;
// Caller can pass in a jQuery.Event object, Object, or just an event type string
event = event[ jQuery.expando ] ?
event :
new jQuery.Event( type, typeof event === "object" && event );
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join( "." );
event.rnamespace = event.namespace ?
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
null;
// Clean up the event in case it is being reused
event.result = undefined;
if ( !event.target ) {
event.target = elem;
}
// Clone any incoming data and prepend the event, creating the handler arg list
data = data == null ?
[ event ] :
jQuery.makeArray( data, [ event ] );
// Allow special events to draw outside the lines
special = jQuery.event.special[ type ] || {};
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
return;
}
// Determine event propagation path in advance, per W3C events spec (#9951)
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
bubbleType = special.delegateType || type;
if ( !rfocusMorph.test( bubbleType + type ) ) {
cur = cur.parentNode;
}
for ( ; cur; cur = cur.parentNode ) {
eventPath.push( cur );
tmp = cur;
}
// Only add window if we got to document (e.g., not plain obj or detached DOM)
if ( tmp === ( elem.ownerDocument || document ) ) {
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
}
}
// Fire handlers on the event path
i = 0;
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
lastElement = cur;
event.type = i > 1 ?
bubbleType :
special.bindType || type;
// jQuery handler
handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
dataPriv.get( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
// Native handler
handle = ontype && cur[ ontype ];
if ( handle && handle.apply && acceptData( cur ) ) {
event.result = handle.apply( cur, data );
if ( event.result === false ) {
event.preventDefault();
}
}
}
event.type = type;
// If nobody prevented the default action, do it now
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
if ( ( !special._default ||
special._default.apply( eventPath.pop(), data ) === false ) &&
acceptData( elem ) ) {
// Call a native DOM method on the target with the same name as the event.
// Don't do default actions on window, that's where global variables be (#6170)
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
// Don't re-trigger an onFOO event when we call its FOO() method
tmp = elem[ ontype ];
if ( tmp ) {
elem[ ontype ] = null;
}
// Prevent re-triggering of the same event, since we already bubbled it above
jQuery.event.triggered = type;
if ( event.isPropagationStopped() ) {
lastElement.addEventListener( type, stopPropagationCallback );
}
elem[ type ]();
if ( event.isPropagationStopped() ) {
lastElement.removeEventListener( type, stopPropagationCallback );
}
jQuery.event.triggered = undefined;
if ( tmp ) {
elem[ ontype ] = tmp;
}
}
}
}
return event.result;
},
// Piggyback on a donor event to simulate a different one
// Used only for `focus(in | out)` events
simulate: function( type, elem, event ) {
var e = jQuery.extend(
new jQuery.Event(),
event,
{
type: type,
isSimulated: true
}
);
jQuery.event.trigger( e, null, elem );
}
} );
jQuery.fn.extend( {
trigger: function( type, data ) {
return this.each( function() {
jQuery.event.trigger( type, data, this );
} );
},
triggerHandler: function( type, data ) {
var elem = this[ 0 ];
if ( elem ) {
return jQuery.event.trigger( type, data, elem, true );
}
}
} );
// Support: Firefox <=44
// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
// Attach a single capturing handler on the document while someone wants focusin/focusout
var handler = function( event ) {
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
};
jQuery.event.special[ fix ] = {
setup: function() {
var doc = this.ownerDocument || this,
attaches = dataPriv.access( doc, fix );
if ( !attaches ) {
doc.addEventListener( orig, handler, true );
}
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
},
teardown: function() {
var doc = this.ownerDocument || this,
attaches = dataPriv.access( doc, fix ) - 1;
if ( !attaches ) {
doc.removeEventListener( orig, handler, true );
dataPriv.remove( doc, fix );
} else {
dataPriv.access( doc, fix, attaches );
}
}
};
} );
}
var location = window.location;
var nonce = Date.now();
var rquery = ( /\?/ );
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
var xml;
if ( !data || typeof data !== "string" ) {
return null;
}
// Support: IE 9 - 11 only
// IE throws on parseFromString with invalid input.
try {
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
} catch ( e ) {
xml = undefined;
}
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
jQuery.error( "Invalid XML: " + data );
}
return xml;
};
var
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams( prefix, obj, traditional, add ) {
var name;
if ( Array.isArray( obj ) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
if ( traditional || rbracket.test( prefix ) ) {
// Treat each array item as a scalar.
add( prefix, v );
} else {
// Item is non-scalar (array or object), encode its numeric index.
buildParams(
prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
v,
traditional,
add
);
}
} );
} else if ( !traditional && toType( obj ) === "object" ) {
// Serialize object item.
for ( name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
}
} else {
// Serialize scalar item.
add( prefix, obj );
}
}
// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
var prefix,
s = [],
add = function( key, valueOrFunction ) {
// If value is a function, invoke it and use its return value
var value = isFunction( valueOrFunction ) ?
valueOrFunction() :
valueOrFunction;
s[ s.length ] = encodeURIComponent( key ) + "=" +
encodeURIComponent( value == null ? "" : value );
};
// If an array was passed in, assume that it is an array of form elements.
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
} );
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( prefix in a ) {
buildParams( prefix, a[ prefix ], traditional, add );
}
}
// Return the resulting serialization
return s.join( "&" );
};
jQuery.fn.extend( {
serialize: function() {
return jQuery.param( this.serializeArray() );
},
serializeArray: function() {
return this.map( function() {
// Can add propHook for "elements" to filter or add form elements
var elements = jQuery.prop( this, "elements" );
return elements ? jQuery.makeArray( elements ) : this;
} )
.filter( function() {
var type = this.type;
// Use .is( ":disabled" ) so that fieldset[disabled] works
return this.name && !jQuery( this ).is( ":disabled" ) &&
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
( this.checked || !rcheckableType.test( type ) );
} )
.map( function( i, elem ) {
var val = jQuery( this ).val();
if ( val == null ) {
return null;
}
if ( Array.isArray( val ) ) {
return jQuery.map( val, function( val ) {
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
} );
}
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
} ).get();
}
} );
var
r20 = /%20/g,
rhash = /#.*$/,
rantiCache = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
// #7653, #8125, #8152: local protocol detection
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
/* Prefilters
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
* 2) These are called:
* - BEFORE asking for a transport
* - AFTER param serialization (s.data is a string if s.processData is true)
* 3) key is the dataType
* 4) the catchall symbol "*" can be used
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
*/
prefilters = {},
/* Transports bindings
* 1) key is the dataType
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if needed
*/
transports = {},
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
allTypes = "*/".concat( "*" ),
// Anchor tag for parsing the document origin
originAnchor = document.createElement( "a" );
originAnchor.href = location.href;
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
// dataTypeExpression is optional and defaults to "*"
return function( dataTypeExpression, func ) {
if ( typeof dataTypeExpression !== "string" ) {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType,
i = 0,
dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
if ( isFunction( func ) ) {
// For each dataType in the dataTypeExpression
while ( ( dataType = dataTypes[ i++ ] ) ) {
// Prepend if requested
if ( dataType[ 0 ] === "+" ) {
dataType = dataType.slice( 1 ) || "*";
( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
// Otherwise append
} else {
( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
}
}
}
};
}
// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
var inspected = {},
seekingTransport = ( structure === transports );
function inspect( dataType ) {
var selected;
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
if ( typeof dataTypeOrTransport === "string" &&
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
options.dataTypes.unshift( dataTypeOrTransport );
inspect( dataTypeOrTransport );
return false;
} else if ( seekingTransport ) {
return !( selected = dataTypeOrTransport );
}
} );
return selected;
}
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
var key, deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};
for ( key in src ) {
if ( src[ key ] !== undefined ) {
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
}
}
if ( deep ) {
jQuery.extend( true, target, deep );
}
return target;
}
/* Handles responses to an ajax request:
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
function ajaxHandleResponses( s, jqXHR, responses ) {
var ct, type, finalDataType, firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
// Remove auto dataType and get content-type in the process
while ( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
}
}
// Check if we're dealing with a known content-type
if ( ct ) {
for ( type in contents ) {
if ( contents[ type ] && contents[ type ].test( ct ) ) {
dataTypes.unshift( type );
break;
}
}
}
// Check to see if we have a response for the expected dataType
if ( dataTypes[ 0 ] in responses ) {
finalDataType = dataTypes[ 0 ];
} else {
// Try convertible dataTypes
for ( type in responses ) {
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
finalDataType = type;
break;
}
if ( !firstDataType ) {
firstDataType = type;
}
}
// Or just use first one
finalDataType = finalDataType || firstDataType;
}
// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if ( finalDataType ) {
if ( finalDataType !== dataTypes[ 0 ] ) {
dataTypes.unshift( finalDataType );
}
return responses[ finalDataType ];
}
}
/* Chain conversions given the request and the original response
* Also sets the responseXXX fields on the jqXHR instance
*/
function ajaxConvert( s, response, jqXHR, isSuccess ) {
var conv2, current, conv, tmp, prev,
converters = {},
// Work with a copy of dataTypes in case we need to modify it for conversion
dataTypes = s.dataTypes.slice();
// Create converters map with lowercased keys
if ( dataTypes[ 1 ] ) {
for ( conv in s.converters ) {
converters[ conv.toLowerCase() ] = s.converters[ conv ];
}
}
current = dataTypes.shift();
// Convert to each sequential dataType
while ( current ) {
if ( s.responseFields[ current ] ) {
jqXHR[ s.responseFields[ current ] ] = response;
}
// Apply the dataFilter if provided
if ( !prev && isSuccess && s.dataFilter ) {
response = s.dataFilter( response, s.dataType );
}
prev = current;
current = dataTypes.shift();
if ( current ) {
// There's only work to do if current dataType is non-auto
if ( current === "*" ) {
current = prev;
// Convert response if prev dataType is non-auto and differs from current
} else if ( prev !== "*" && prev !== current ) {
// Seek a direct converter
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
// If none found, seek a pair
if ( !conv ) {
for ( conv2 in converters ) {
// If conv2 outputs current
tmp = conv2.split( " " );
if ( tmp[ 1 ] === current ) {
// If prev can be converted to accepted input
conv = converters[ prev + " " + tmp[ 0 ] ] ||
converters[ "* " + tmp[ 0 ] ];
if ( conv ) {
// Condense equivalence converters
if ( conv === true ) {
conv = converters[ conv2 ];
// Otherwise, insert the intermediate dataType
} else if ( converters[ conv2 ] !== true ) {
current = tmp[ 0 ];
dataTypes.unshift( tmp[ 1 ] );
}
break;
}
}
}
}
// Apply converter (if not an equivalence)
if ( conv !== true ) {
// Unless errors are allowed to bubble, catch and return them
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
} catch ( e ) {
return {
state: "parsererror",
error: conv ? e : "No conversion from " + prev + " to " + current
};
}
}
}
}
}
}
return { state: "success", data: response };
}
jQuery.extend( {
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {},
ajaxSettings: {
url: location.href,
type: "GET",
isLocal: rlocalProtocol.test( location.protocol ),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
throws: false,
traditional: false,
headers: {},
*/
accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /\bxml\b/,
html: /\bhtml/,
json: /\bjson\b/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
// Data converters
// Keys separate source (or catchall "*") and destination types with a single space
converters: {
// Convert anything to text
"* text": String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
"text json": JSON.parse,
// Parse text as xml
"text xml": jQuery.parseXML
},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
url: true,
context: true
}
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup: function( target, settings ) {
return settings ?
// Building a settings object
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
// Extending ajaxSettings
ajaxExtend( jQuery.ajaxSettings, target );
},
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
ajaxTransport: addToPrefiltersOrTransports( transports ),
// Main method
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
url = undefined;
}
// Force options to be an object
options = options || {};
var transport,
// URL without anti-cache param
cacheURL,
// Response headers
responseHeadersString,
responseHeaders,
// timeout handle
timeoutTimer,
// Url cleanup var
urlAnchor,
// Request state (becomes false upon send and true upon completion)
completed,
// To know if global events are to be dispatched
fireGlobals,
// Loop variable
i,
// uncached part of the url
uncached,
// Create the final options object
s = jQuery.ajaxSetup( {}, options ),
// Callbacks context
callbackContext = s.context || s,
// Context for global events is callbackContext if it is a DOM node or jQuery collection
globalEventContext = s.context &&
( callbackContext.nodeType || callbackContext.jquery ) ?
jQuery( callbackContext ) :
jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks( "once memory" ),
// Status-dependent callbacks
statusCode = s.statusCode || {},
// Headers (they are sent all at once)
requestHeaders = {},
requestHeadersNames = {},
// Default abort message
strAbort = "canceled",
// Fake xhr
jqXHR = {
readyState: 0,
// Builds headers hashtable if needed
getResponseHeader: function( key ) {
var match;
if ( completed ) {
if ( !responseHeaders ) {
responseHeaders = {};
while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
}
}
match = responseHeaders[ key.toLowerCase() ];
}
return match == null ? null : match;
},
// Raw string
getAllResponseHeaders: function() {
return completed ? responseHeadersString : null;
},
// Caches the header
setRequestHeader: function( name, value ) {
if ( completed == null ) {
name = requestHeadersNames[ name.toLowerCase() ] =
requestHeadersNames[ name.toLowerCase() ] || name;
requestHeaders[ name ] = value;
}
return this;
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( completed == null ) {
s.mimeType = type;
}
return this;
},
// Status-dependent callbacks
statusCode: function( map ) {
var code;
if ( map ) {
if ( completed ) {
// Execute the appropriate callbacks
jqXHR.always( map[ jqXHR.status ] );
} else {
// Lazy-add the new callbacks in a way that preserves old ones
for ( code in map ) {
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
}
}
}
return this;
},
// Cancel the request
abort: function( statusText ) {
var finalText = statusText || strAbort;
if ( transport ) {
transport.abort( finalText );
}
done( 0, finalText );
return this;
}
};
// Attach deferreds
deferred.promise( jqXHR );
// Add protocol if not provided (prefilters might expect it)
// Handle falsy url in the settings object (#10093: consistency with old signature)
// We also use the url parameter if available
s.url = ( ( url || s.url || location.href ) + "" )
.replace( rprotocol, location.protocol + "//" );
// Alias method option to type as per ticket #12004
s.type = options.method || options.type || s.method || s.type;
// Extract dataTypes list
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
// A cross-domain request is in order when the origin doesn't match the current origin.
if ( s.crossDomain == null ) {
urlAnchor = document.createElement( "a" );
// Support: IE <=8 - 11, Edge 12 - 15
// IE throws exception on accessing the href property if url is malformed,
// e.g. http://example.com:80x/
try {
urlAnchor.href = s.url;
// Support: IE <=8 - 11 only
// Anchor's host property isn't correctly set when s.url is relative
urlAnchor.href = urlAnchor.href;
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
urlAnchor.protocol + "//" + urlAnchor.host;
} catch ( e ) {
// If there is an error parsing the URL, assume it is crossDomain,
// it can be rejected by the transport if it is invalid
s.crossDomain = true;
}
}
// Convert data if not already a string
if ( s.data && s.processData && typeof s.data !== "string" ) {
s.data = jQuery.param( s.data, s.traditional );
}
// Apply prefilters
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
// If request was aborted inside a prefilter, stop there
if ( completed ) {
return jqXHR;
}
// We can fire global events as of now if asked to
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
fireGlobals = jQuery.event && s.global;
// Watch for a new set of requests
if ( fireGlobals && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}
// Uppercase the type
s.type = s.type.toUpperCase();
// Determine if request has content
s.hasContent = !rnoContent.test( s.type );
// Save the URL in case we're toying with the If-Modified-Since
// and/or If-None-Match header later on
// Remove hash to simplify url manipulation
cacheURL = s.url.replace( rhash, "" );
// More options handling for requests with no content
if ( !s.hasContent ) {
// Remember the hash so we can put it back
uncached = s.url.slice( cacheURL.length );
// If data is available and should be processed, append data to url
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
// #9682: remove data so that it's not used in an eventual retry
delete s.data;
}
// Add or update anti-cache param if needed
if ( s.cache === false ) {
cacheURL = cacheURL.replace( rantiCache, "$1" );
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
}
// Put hash and anti-cache on the URL that will be requested (gh-1732)
s.url = cacheURL + uncached;
// Change '%20' to '+' if this is encoded form body content (gh-2658)
} else if ( s.data && s.processData &&
( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
s.data = s.data.replace( r20, "+" );
}
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
if ( jQuery.lastModified[ cacheURL ] ) {
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
}
if ( jQuery.etag[ cacheURL ] ) {
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
}
}
// Set the correct header, if data is being sent
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
jqXHR.setRequestHeader( "Content-Type", s.contentType );
}
// Set the Accepts header for the server, depending on the dataType
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
s.accepts[ s.dataTypes[ 0 ] ] +
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
s.accepts[ "*" ]
);
// Check for headers option
for ( i in s.headers ) {
jqXHR.setRequestHeader( i, s.headers[ i ] );
}
// Allow custom headers/mimetypes and early abort
if ( s.beforeSend &&
( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
// Abort if not done already and return
return jqXHR.abort();
}
// Aborting is no longer a cancellation
strAbort = "abort";
// Install callbacks on deferreds
completeDeferred.add( s.complete );
jqXHR.done( s.success );
jqXHR.fail( s.error );
// Get transport
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
// If no transport, we auto-abort
if ( !transport ) {
done( -1, "No Transport" );
} else {
jqXHR.readyState = 1;
// Send global event
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
}
// If request was aborted inside ajaxSend, stop there
if ( completed ) {
return jqXHR;
}
// Timeout
if ( s.async && s.timeout > 0 ) {
timeoutTimer = window.setTimeout( function() {
jqXHR.abort( "timeout" );
}, s.timeout );
}
try {
completed = false;
transport.send( requestHeaders, done );
} catch ( e ) {
// Rethrow post-completion exceptions
if ( completed ) {
throw e;
}
// Propagate others as results
done( -1, e );
}
}
// Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Ignore repeat invocations
if ( completed ) {
return;
}
completed = true;
// Clear timeout if it exists
if ( timeoutTimer ) {
window.clearTimeout( timeoutTimer );
}
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
transport = undefined;
// Cache response headers
responseHeadersString = headers || "";
// Set readyState
jqXHR.readyState = status > 0 ? 4 : 0;
// Determine if successful
isSuccess = status >= 200 && status < 300 || status === 304;
// Get response data
if ( responses ) {
response = ajaxHandleResponses( s, jqXHR, responses );
}
// Convert no matter what (that way responseXXX fields are always set)
response = ajaxConvert( s, response, jqXHR, isSuccess );
// If successful, handle type chaining
if ( isSuccess ) {
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
modified = jqXHR.getResponseHeader( "Last-Modified" );
if ( modified ) {
jQuery.lastModified[ cacheURL ] = modified;
}
modified = jqXHR.getResponseHeader( "etag" );
if ( modified ) {
jQuery.etag[ cacheURL ] = modified;
}
}
// if no content
if ( status === 204 || s.type === "HEAD" ) {
statusText = "nocontent";
// if not modified
} else if ( status === 304 ) {
statusText = "notmodified";
// If we have data, let's convert it
} else {
statusText = response.state;
success = response.data;
error = response.error;
isSuccess = !error;
}
} else {
// Extract error from statusText and normalize for non-aborts
error = statusText;
if ( status || !statusText ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
}
}
}
// Set data for the fake xhr object
jqXHR.status = status;
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
// Success/Error
if ( isSuccess ) {
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
} else {
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
}
// Status-dependent callbacks
jqXHR.statusCode( statusCode );
statusCode = undefined;
if ( fireGlobals ) {
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
[ jqXHR, s, isSuccess ? success : error ] );
}
// Complete
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
// Handle the global AJAX counter
if ( !( --jQuery.active ) ) {
jQuery.event.trigger( "ajaxStop" );
}
}
}
return jqXHR;
},
getJSON: function( url, data, callback ) {
return jQuery.get( url, data, callback, "json" );
},
getScript: function( url, callback ) {
return jQuery.get( url, undefined, callback, "script" );
}
} );
jQuery.each( [ "get", "post" ], function( i, method ) {
jQuery[ method ] = function( url, data, callback, type ) {
// Shift arguments if data argument was omitted
if ( isFunction( data ) ) {
type = type || callback;
callback = data;
data = undefined;
}
// The url can be an options object (which then must have .url)
return jQuery.ajax( jQuery.extend( {
url: url,
type: method,
dataType: type,
data: data,
success: callback
}, jQuery.isPlainObject( url ) && url ) );
};
} );
jQuery._evalUrl = function( url ) {
return jQuery.ajax( {
url: url,
// Make this explicit, since user can override this through ajaxSetup (#11264)
type: "GET",
dataType: "script",
cache: true,
async: false,
global: false,
"throws": true
} );
};
jQuery.fn.extend( {
wrapAll: function( html ) {
var wrap;
if ( this[ 0 ] ) {
if ( isFunction( html ) ) {
html = html.call( this[ 0 ] );
}
// The elements to wrap the target around
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
if ( this[ 0 ].parentNode ) {
wrap.insertBefore( this[ 0 ] );
}
wrap.map( function() {
var elem = this;
while ( elem.firstElementChild ) {
elem = elem.firstElementChild;
}
return elem;
} ).append( this );
}
return this;
},
wrapInner: function( html ) {
if ( isFunction( html ) ) {
return this.each( function( i ) {
jQuery( this ).wrapInner( html.call( this, i ) );
} );
}
return this.each( function() {
var self = jQuery( this ),
contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
} else {
self.append( html );
}
} );
},
wrap: function( html ) {
var htmlIsFunction = isFunction( html );
return this.each( function( i ) {
jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
} );
},
unwrap: function( selector ) {
this.parent( selector ).not( "body" ).each( function() {
jQuery( this ).replaceWith( this.childNodes );
} );
return this;
}
} );
jQuery.expr.pseudos.hidden = function( elem ) {
return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};
jQuery.ajaxSettings.xhr = function() {
try {
return new window.XMLHttpRequest();
} catch ( e ) {}
};
var xhrSuccessStatus = {
// File protocol always yields status code 0, assume 200
0: 200,
// Support: IE <=9 only
// #1450: sometimes IE returns 1223 when it should be 204
1223: 204
},
xhrSupported = jQuery.ajaxSettings.xhr();
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;
jQuery.ajaxTransport( function( options ) {
var callback, errorCallback;
// Cross domain only allowed if supported through XMLHttpRequest
if ( support.cors || xhrSupported && !options.crossDomain ) {
return {
send: function( headers, complete ) {
var i,
xhr = options.xhr();
xhr.open(
options.type,
options.url,
options.async,
options.username,
options.password
);
// Apply custom fields if provided
if ( options.xhrFields ) {
for ( i in options.xhrFields ) {
xhr[ i ] = options.xhrFields[ i ];
}
}
// Override mime type if needed
if ( options.mimeType && xhr.overrideMimeType ) {
xhr.overrideMimeType( options.mimeType );
}
// X-Requested-With header
// For cross-domain requests, seeing as conditions for a preflight are
// akin to a jigsaw puzzle, we simply never set it to be sure.
// (it can always be set on a per-request basis or even using ajaxSetup)
// For same-domain requests, won't change header if already provided.
if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
headers[ "X-Requested-With" ] = "XMLHttpRequest";
}
// Set headers
for ( i in headers ) {
xhr.setRequestHeader( i, headers[ i ] );
}
// Callback
callback = function( type ) {
return function() {
if ( callback ) {
callback = errorCallback = xhr.onload =
xhr.onerror = xhr.onabort = xhr.ontimeout =
xhr.onreadystatechange = null;
if ( type === "abort" ) {
xhr.abort();
} else if ( type === "error" ) {
// Support: IE <=9 only
// On a manual native abort, IE9 throws
// errors on any property access that is not readyState
if ( typeof xhr.status !== "number" ) {
complete( 0, "error" );
} else {
complete(
// File: protocol always yields status 0; see #8605, #14207
xhr.status,
xhr.statusText
);
}
} else {
complete(
xhrSuccessStatus[ xhr.status ] || xhr.status,
xhr.statusText,
// Support: IE <=9 only
// IE9 has no XHR2 but throws on binary (trac-11426)
// For XHR2 non-text, let the caller handle it (gh-2498)
( xhr.responseType || "text" ) !== "text" ||
typeof xhr.responseText !== "string" ?
{ binary: xhr.response } :
{ text: xhr.responseText },
xhr.getAllResponseHeaders()
);
}
}
};
};
// Listen to events
xhr.onload = callback();
errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
// Support: IE 9 only
// Use onreadystatechange to replace onabort
// to handle uncaught aborts
if ( xhr.onabort !== undefined ) {
xhr.onabort = errorCallback;
} else {
xhr.onreadystatechange = function() {
// Check readyState before timeout as it changes
if ( xhr.readyState === 4 ) {
// Allow onerror to be called first,
// but that will not handle a native abort
// Also, save errorCallback to a variable
// as xhr.onerror cannot be accessed
window.setTimeout( function() {
if ( callback ) {
errorCallback();
}
} );
}
};
}
// Create the abort callback
callback = callback( "abort" );
try {
// Do send the request (this may raise an exception)
xhr.send( options.hasContent && options.data || null );
} catch ( e ) {
// #14683: Only rethrow if this hasn't been notified as an error yet
if ( callback ) {
throw e;
}
}
},
abort: function() {
if ( callback ) {
callback();
}
}
};
}
} );
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
if ( s.crossDomain ) {
s.contents.script = false;
}
} );
// Install script dataType
jQuery.ajaxSetup( {
accepts: {
script: "text/javascript, application/javascript, " +
"application/ecmascript, application/x-ecmascript"
},
contents: {
script: /\b(?:java|ecma)script\b/
},
converters: {
"text script": function( text ) {
jQuery.globalEval( text );
return text;
}
}
} );
// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
if ( s.cache === undefined ) {
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
}
} );
// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {
// This transport only deals with cross domain requests
if ( s.crossDomain ) {
var script, callback;
return {
send: function( _, complete ) {
script = jQuery( "<script>" ).prop( {
charset: s.scriptCharset,
src: s.url
} ).on(
"load error",
callback = function( evt ) {
script.remove();
callback = null;
if ( evt ) {
complete( evt.type === "error" ? 404 : 200, evt.type );
}
}
);
// Use native DOM manipulation to avoid our domManip AJAX trickery
document.head.appendChild( script[ 0 ] );
},
abort: function() {
if ( callback ) {
callback();
}
}
};
}
} );
var oldCallbacks = [],
rjsonp = /(=)\?(?=&|$)|\?\?/;
// Default jsonp settings
jQuery.ajaxSetup( {
jsonp: "callback",
jsonpCallback: function() {
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
this[ callback ] = true;
return callback;
}
} );
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
var callbackName, overwritten, responseContainer,
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
"url" :
typeof s.data === "string" &&
( s.contentType || "" )
.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
rjsonp.test( s.data ) && "data"
);
// Handle iff the expected data type is "jsonp" or we have a parameter to set
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
// Get callback name, remembering preexisting value associated with it
callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
s.jsonpCallback() :
s.jsonpCallback;
// Insert callback into url or form data
if ( jsonProp ) {
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
} else if ( s.jsonp !== false ) {
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
}
// Use data converter to retrieve json after script execution
s.converters[ "script json" ] = function() {
if ( !responseContainer ) {
jQuery.error( callbackName + " was not called" );
}
return responseContainer[ 0 ];
};
// Force json dataType
s.dataTypes[ 0 ] = "json";
// Install callback
overwritten = window[ callbackName ];
window[ callbackName ] = function() {
responseContainer = arguments;
};
// Clean-up function (fires after converters)
jqXHR.always( function() {
// If previous value didn't exist - remove it
if ( overwritten === undefined ) {
jQuery( window ).removeProp( callbackName );
// Otherwise restore preexisting value
} else {
window[ callbackName ] = overwritten;
}
// Save back as free
if ( s[ callbackName ] ) {
// Make sure that re-using the options doesn't screw things around
s.jsonpCallback = originalSettings.jsonpCallback;
// Save the callback name for future use
oldCallbacks.push( callbackName );
}
// Call if it was a function and we have a response
if ( responseContainer && isFunction( overwritten ) ) {
overwritten( responseContainer[ 0 ] );
}
responseContainer = overwritten = undefined;
} );
// Delegate to script
return "script";
}
} );
// Support: Safari 8 only
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
var body = document.implementation.createHTMLDocument( "" ).body;
body.innerHTML = "<form></form><form></form>";
return body.childNodes.length === 2;
} )();
// Argument "data" should be string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
keepScripts = context;
context = false;
}
var base, parsed, scripts;
if ( !context ) {
// Stop scripts or inline event handlers from being executed immediately
// by using document.implementation
if ( support.createHTMLDocument ) {
context = document.implementation.createHTMLDocument( "" );
// Set the base href for the created document
// so any parsed elements with URLs
// are based on the document's URL (gh-2965)
base = context.createElement( "base" );
base.href = document.location.href;
context.head.appendChild( base );
} else {
context = document;
}
}
parsed = rsingleTag.exec( data );
scripts = !keepScripts && [];
// Single tag
if ( parsed ) {
return [ context.createElement( parsed[ 1 ] ) ];
}
parsed = buildFragment( [ data ], context, scripts );
if ( scripts && scripts.length ) {
jQuery( scripts ).remove();
}
return jQuery.merge( [], parsed.childNodes );
};
/**
* Load a url into a page
*/
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
if ( off > -1 ) {
selector = stripAndCollapse( url.slice( off ) );
url = url.slice( 0, off );
}
// If it's a function
if ( isFunction( params ) ) {
// We assume that it's the callback
callback = params;
params = undefined;
// Otherwise, build a param string
} else if ( params && typeof params === "object" ) {
type = "POST";
}
// If we have elements to modify, make the request
if ( self.length > 0 ) {
jQuery.ajax( {
url: url,
// If "type" variable is undefined, then "GET" method will be used.
// Make value of this field explicit since
// user can override it through ajaxSetup method
type: type || "GET",
dataType: "html",
data: params
} ).done( function( responseText ) {
// Save response for use in complete callback
response = arguments;
self.html( selector ?
// If a selector was specified, locate the right elements in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors
jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
// Otherwise use the full result
responseText );
// If the request succeeds, this function gets "data", "status", "jqXHR"
// but they are ignored because response was set above.
// If it fails, this function gets "jqXHR", "status", "error"
} ).always( callback && function( jqXHR, status ) {
self.each( function() {
callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
} );
} );
}
return this;
};
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend"
], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
} );
jQuery.expr.pseudos.animated = function( elem ) {
return jQuery.grep( jQuery.timers, function( fn ) {
return elem === fn.elem;
} ).length;
};
jQuery.offset = {
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
// Set position first, in-case top/left are set even on static elem
if ( position === "static" ) {
elem.style.position = "relative";
}
curOffset = curElem.offset();
curCSSTop = jQuery.css( elem, "top" );
curCSSLeft = jQuery.css( elem, "left" );
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
// Need to be able to calculate position if either
// top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat( curCSSTop ) || 0;
curLeft = parseFloat( curCSSLeft ) || 0;
}
if ( isFunction( options ) ) {
// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
}
if ( options.top != null ) {
props.top = ( options.top - curOffset.top ) + curTop;
}
if ( options.left != null ) {
props.left = ( options.left - curOffset.left ) + curLeft;
}
if ( "using" in options ) {
options.using.call( elem, props );
} else {
curElem.css( props );
}
}
};
jQuery.fn.extend( {
// offset() relates an element's border box to the document origin
offset: function( options ) {
// Preserve chaining for setter
if ( arguments.length ) {
return options === undefined ?
this :
this.each( function( i ) {
jQuery.offset.setOffset( this, options, i );
} );
}
var rect, win,
elem = this[ 0 ];
if ( !elem ) {
return;
}
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
// Support: IE <=11 only
// Running getBoundingClientRect on a
// disconnected node in IE throws an error
if ( !elem.getClientRects().length ) {
return { top: 0, left: 0 };
}
// Get document-relative position by adding viewport scroll to viewport-relative gBCR
rect = elem.getBoundingClientRect();
win = elem.ownerDocument.defaultView;
return {
top: rect.top + win.pageYOffset,
left: rect.left + win.pageXOffset
};
},
// position() relates an element's margin box to its offset parent's padding box
// This corresponds to the behavior of CSS absolute positioning
position: function() {
if ( !this[ 0 ] ) {
return;
}
var offsetParent, offset, doc,
elem = this[ 0 ],
parentOffset = { top: 0, left: 0 };
// position:fixed elements are offset from the viewport, which itself always has zero offset
if ( jQuery.css( elem, "position" ) === "fixed" ) {
// Assume position:fixed implies availability of getBoundingClientRect
offset = elem.getBoundingClientRect();
} else {
offset = this.offset();
// Account for the *real* offset parent, which can be the document or its root element
// when a statically positioned element is identified
doc = elem.ownerDocument;
offsetParent = elem.offsetParent || doc.documentElement;
while ( offsetParent &&
( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
jQuery.css( offsetParent, "position" ) === "static" ) {
offsetParent = offsetParent.parentNode;
}
if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
// Incorporate borders into its offset, since they are outside its content origin
parentOffset = jQuery( offsetParent ).offset();
parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
}
}
// Subtract parent offsets and element margins
return {
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
};
},
// This method will return documentElement in the following cases:
// 1) For the element inside the iframe without offsetParent, this method will return
// documentElement of the parent window
// 2) For the hidden or detached element
// 3) For body or html element, i.e. in case of the html node - it will return itself
//
// but those exceptions were never presented as a real life use-cases
// and might be considered as more preferable results.
//
// This logic, however, is not guaranteed and can change at any point in the future
offsetParent: function() {
return this.map( function() {
var offsetParent = this.offsetParent;
while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || documentElement;
} );
}
} );
// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
var top = "pageYOffset" === prop;
jQuery.fn[ method ] = function( val ) {
return access( this, function( elem, method, val ) {
// Coalesce documents and windows
var win;
if ( isWindow( elem ) ) {
win = elem;
} else if ( elem.nodeType === 9 ) {
win = elem.defaultView;
}
if ( val === undefined ) {
return win ? win[ prop ] : elem[ method ];
}
if ( win ) {
win.scrollTo(
!top ? val : win.pageXOffset,
top ? val : win.pageYOffset
);
} else {
elem[ method ] = val;
}
}, method, val, arguments.length );
};
} );
// Support: Safari <=7 - 9.1, Chrome <=37 - 49
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it here
jQuery.each( [ "top", "left" ], function( i, prop ) {
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
function( elem, computed ) {
if ( computed ) {
computed = curCSS( elem, prop );
// If curCSS returns percentage, fallback to offset
return rnumnonpx.test( computed ) ?
jQuery( elem ).position()[ prop ] + "px" :
computed;
}
}
);
} );
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
function( defaultExtra, funcName ) {
// Margin is only for outerHeight, outerWidth
jQuery.fn[ funcName ] = function( margin, value ) {
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
return access( this, function( elem, type, value ) {
var doc;
if ( isWindow( elem ) ) {
// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
return funcName.indexOf( "outer" ) === 0 ?
elem[ "inner" + name ] :
elem.document.documentElement[ "client" + name ];
}
// Get document width or height
if ( elem.nodeType === 9 ) {
doc = elem.documentElement;
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
// whichever is greatest
return Math.max(
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
elem.body[ "offset" + name ], doc[ "offset" + name ],
doc[ "client" + name ]
);
}
return value === undefined ?
// Get width or height on the element, requesting but not forcing parseFloat
jQuery.css( elem, type, extra ) :
// Set width or height on the element
jQuery.style( elem, type, value, extra );
}, type, chainable ? margin : undefined, chainable );
};
} );
} );
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
} );
jQuery.fn.extend( {
hover: function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
}
} );
jQuery.fn.extend( {
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},
delegate: function( selector, types, data, fn ) {
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
return arguments.length === 1 ?
this.off( selector, "**" ) :
this.off( types, selector || "**", fn );
}
} );
// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
var tmp, args, proxy;
if ( typeof context === "string" ) {
tmp = fn[ context ];
context = fn;
fn = tmp;
}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
if ( !isFunction( fn ) ) {
return undefined;
}
// Simulated bind
args = slice.call( arguments, 2 );
proxy = function() {
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
};
// Set the guid of unique handler to the same of original handler, so it can be removed
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
return proxy;
};
jQuery.holdReady = function( hold ) {
if ( hold ) {
jQuery.readyWait++;
} else {
jQuery.ready( true );
}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow;
jQuery.camelCase = camelCase;
jQuery.type = toType;
jQuery.now = Date.now;
jQuery.isNumeric = function( obj ) {
// As of jQuery 3.0, isNumeric is limited to
// strings and numbers (primitives or objects)
// that can be coerced to finite numbers (gh-2662)
var type = jQuery.type( obj );
return ( type === "number" || type === "string" ) &&
// parseFloat NaNs numeric-cast false positives ("")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
!isNaN( obj - parseFloat( obj ) );
};
// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.
// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
if ( true ) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
return jQuery;
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
var
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$;
jQuery.noConflict = function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
}
if ( deep && window.jQuery === jQuery ) {
window.jQuery = _jQuery;
}
return jQuery;
};
// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( !noGlobal ) {
window.jQuery = window.$ = jQuery;
}
return jQuery;
} );
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
/*!
* tui-code-snippet.js
* @version 1.5.0
* @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
* @license MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(true)
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["util"] = factory();
else
root["tui"] = root["tui"] || {}, root["tui"]["util"] = 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] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = 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;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "dist";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
/**
* @fileoverview
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
* @namespace tui.util
* @example
* // node, commonjs
* var util = require('tui-code-snippet');
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var util = tui.util;
* <script>
*/
var util = {};
var object = __webpack_require__(1);
var extend = object.extend;
extend(util, object);
extend(util, __webpack_require__(3));
extend(util, __webpack_require__(2));
extend(util, __webpack_require__(4));
extend(util, __webpack_require__(5));
extend(util, __webpack_require__(6));
extend(util, __webpack_require__(7));
extend(util, __webpack_require__(8));
extend(util, __webpack_require__(9));
util.browser = __webpack_require__(10);
util.popup = __webpack_require__(11);
util.formatDate = __webpack_require__(12);
util.defineClass = __webpack_require__(13);
util.defineModule = __webpack_require__(14);
util.defineNamespace = __webpack_require__(15);
util.CustomEvents = __webpack_require__(16);
util.Enum = __webpack_require__(17);
util.ExMap = __webpack_require__(18);
util.HashMap = __webpack_require__(20);
util.Map = __webpack_require__(19);
module.exports = util;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some functions for handling a plain object, json.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var type = __webpack_require__(2);
var array = __webpack_require__(3);
/**
* The last id of stamp
* @type {number}
* @private
*/
var lastId = 0;
/**
* Extend the target object from other objects.
* @param {object} target - Object that will be extended
* @param {...object} objects - Objects as sources
* @returns {object} Extended object
* @memberof tui.util
*/
function extend(target, objects) { // eslint-disable-line no-unused-vars
var hasOwnProp = Object.prototype.hasOwnProperty;
var source, prop, i, len;
for (i = 1, len = arguments.length; i < len; i += 1) {
source = arguments[i];
for (prop in source) {
if (hasOwnProp.call(source, prop)) {
target[prop] = source[prop];
}
}
}
return target;
}
/**
* Assign a unique id to an object
* @param {object} obj - Object that will be assigned id.
* @returns {number} Stamped id
* @memberof tui.util
*/
function stamp(obj) {
if (!obj.__fe_id) {
lastId += 1;
obj.__fe_id = lastId; // eslint-disable-line camelcase
}
return obj.__fe_id;
}
/**
* Verify whether an object has a stamped id or not.
* @param {object} obj - adjusted object
* @returns {boolean}
* @memberof tui.util
*/
function hasStamp(obj) {
return type.isExisty(pick(obj, '__fe_id'));
}
/**
* Reset the last id of stamp
* @private
*/
function resetLastId() {
lastId = 0;
}
/**
* Return a key-list(array) of a given object
* @param {object} obj - Object from which a key-list will be extracted
* @returns {Array} A key-list(array)
* @memberof tui.util
*/
function keys(obj) {
var keyArray = [];
var key;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
keyArray.push(key);
}
}
return keyArray;
}
/**
* Return the equality for multiple objects(jsonObjects).<br>
* See {@link http://stackoverflow.com/questions/1068834/object-comparison-in-javascript}
* @param {...object} object - Multiple objects for comparing.
* @returns {boolean} Equality
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var jsonObj1 = {name:'milk', price: 1000};
* var jsonObj2 = {name:'milk', price: 1000};
* var jsonObj3 = {name:'milk', price: 1000};
* util.compareJSON(jsonObj1, jsonObj2, jsonObj3); // true
*
* var jsonObj4 = {name:'milk', price: 1000};
* var jsonObj5 = {name:'beer', price: 3000};
* util.compareJSON(jsonObj4, jsonObj5); // false
*/
function compareJSON(object) {
var argsLen = arguments.length;
var i = 1;
if (argsLen < 1) {
return true;
}
for (; i < argsLen; i += 1) {
if (!isSameObject(object, arguments[i])) {
return false;
}
}
return true;
}
/**
* @param {*} x - object to compare
* @param {*} y - object to compare
* @returns {boolean} - whether object x and y is same or not
* @private
*/
function isSameObject(x, y) { // eslint-disable-line complexity
var leftChain = [];
var rightChain = [];
var p;
// remember that NaN === NaN returns false
// and isNaN(undefined) returns true
if (isNaN(x) &&
isNaN(y) &&
type.isNumber(x) &&
type.isNumber(y)) {
return true;
}
// Compare primitives and functions.
// Check if both arguments link to the same object.
// Especially useful on step when comparing prototypes
if (x === y) {
return true;
}
// Works in case when functions are created in constructor.
// Comparing dates is a common scenario. Another built-ins?
// We can even handle functions passed across iframes
if ((type.isFunction(x) && type.isFunction(y)) ||
(x instanceof Date && y instanceof Date) ||
(x instanceof RegExp && y instanceof RegExp) ||
(x instanceof String && y instanceof String) ||
(x instanceof Number && y instanceof Number)) {
return x.toString() === y.toString();
}
// At last checking prototypes as good a we can
if (!(x instanceof Object && y instanceof Object)) {
return false;
}
if (x.isPrototypeOf(y) ||
y.isPrototypeOf(x) ||
x.constructor !== y.constructor ||
x.prototype !== y.prototype) {
return false;
}
// check for infinitive linking loops
if (array.inArray(x, leftChain) > -1 ||
array.inArray(y, rightChain) > -1) {
return false;
}
// Quick checking of one object beeing a subset of another.
for (p in y) {
if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
return false;
} else if (typeof y[p] !== typeof x[p]) {
return false;
}
}
// This for loop executes comparing with hasOwnProperty() and typeof for each property in 'x' object,
// and verifying equality for x[property] and y[property].
for (p in x) {
if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
return false;
} else if (typeof y[p] !== typeof x[p]) {
return false;
}
if (typeof (x[p]) === 'object' || typeof (x[p]) === 'function') {
leftChain.push(x);
rightChain.push(y);
if (!isSameObject(x[p], y[p])) {
return false;
}
leftChain.pop();
rightChain.pop();
} else if (x[p] !== y[p]) {
return false;
}
}
return true;
}
/* eslint-enable complexity */
/**
* Retrieve a nested item from the given object/array
* @param {object|Array} obj - Object for retrieving
* @param {...string|number} paths - Paths of property
* @returns {*} Value
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var obj = {
* 'key1': 1,
* 'nested' : {
* 'key1': 11,
* 'nested': {
* 'key1': 21
* }
* }
* };
* util.pick(obj, 'nested', 'nested', 'key1'); // 21
* util.pick(obj, 'nested', 'nested', 'key2'); // undefined
*
* var arr = ['a', 'b', 'c'];
* util.pick(arr, 1); // 'b'
*/
function pick(obj, paths) { // eslint-disable-line no-unused-vars
var args = arguments;
var target = args[0];
var i = 1;
var length = args.length;
for (; i < length; i += 1) {
if (type.isUndefined(target) ||
type.isNull(target)) {
return;
}
target = target[args[i]];
}
return target; // eslint-disable-line consistent-return
}
module.exports = {
extend: extend,
stamp: stamp,
hasStamp: hasStamp,
resetLastId: resetLastId,
keys: Object.prototype.keys || keys,
compareJSON: compareJSON,
pick: pick
};
/***/ }),
/* 2 */
/***/ (function(module, exports) {
/**
* @fileoverview This module provides some functions to check the type of variable
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var toString = Object.prototype.toString;
/**
* Check whether the given variable is existing or not.<br>
* If the given variable is not null and not undefined, returns true.
* @param {*} param - Target for checking
* @returns {boolean} Is existy?
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* util.isExisty(''); //true
* util.isExisty(0); //true
* util.isExisty([]); //true
* util.isExisty({}); //true
* util.isExisty(null); //false
* util.isExisty(undefined); //false
*/
function isExisty(param) {
return !isUndefined(param) && !isNull(param);
}
/**
* Check whether the given variable is undefined or not.<br>
* If the given variable is undefined, returns true.
* @param {*} obj - Target for checking
* @returns {boolean} Is undefined?
* @memberof tui.util
*/
function isUndefined(obj) {
return obj === undefined; // eslint-disable-line no-undefined
}
/**
* Check whether the given variable is null or not.<br>
* If the given variable(arguments[0]) is null, returns true.
* @param {*} obj - Target for checking
* @returns {boolean} Is null?
* @memberof tui.util
*/
function isNull(obj) {
return obj === null;
}
/**
* Check whether the given variable is truthy or not.<br>
* If the given variable is not null or not undefined or not false, returns true.<br>
* (It regards 0 as true)
* @param {*} obj - Target for checking
* @returns {boolean} Is truthy?
* @memberof tui.util
*/
function isTruthy(obj) {
return isExisty(obj) && obj !== false;
}
/**
* Check whether the given variable is falsy or not.<br>
* If the given variable is null or undefined or false, returns true.
* @param {*} obj - Target for checking
* @returns {boolean} Is falsy?
* @memberof tui.util
*/
function isFalsy(obj) {
return !isTruthy(obj);
}
/**
* Check whether the given variable is an arguments object or not.<br>
* If the given variable is an arguments object, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is arguments?
* @memberof tui.util
*/
function isArguments(obj) {
var result = isExisty(obj) &&
((toString.call(obj) === '[object Arguments]') || !!obj.callee);
return result;
}
/**
* Check whether the given variable is an instance of Array or not.<br>
* If the given variable is an instance of Array, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is array instance?
* @memberof tui.util
*/
function isArray(obj) {
return obj instanceof Array;
}
/**
* Check whether the given variable is an object or not.<br>
* If the given variable is an object, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is object?
* @memberof tui.util
*/
function isObject(obj) {
return obj === Object(obj);
}
/**
* Check whether the given variable is a function or not.<br>
* If the given variable is a function, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is function?
* @memberof tui.util
*/
function isFunction(obj) {
return obj instanceof Function;
}
/**
* Check whether the given variable is a number or not.<br>
* If the given variable is a number, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is number?
* @memberof tui.util
*/
function isNumber(obj) {
return typeof obj === 'number' || obj instanceof Number;
}
/**
* Check whether the given variable is a string or not.<br>
* If the given variable is a string, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is string?
* @memberof tui.util
*/
function isString(obj) {
return typeof obj === 'string' || obj instanceof String;
}
/**
* Check whether the given variable is a boolean or not.<br>
* If the given variable is a boolean, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is boolean?
* @memberof tui.util
*/
function isBoolean(obj) {
return typeof obj === 'boolean' || obj instanceof Boolean;
}
/**
* Check whether the given variable is an instance of Array or not.<br>
* If the given variable is an instance of Array, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is an instance of array?
* @memberof tui.util
*/
function isArraySafe(obj) {
return toString.call(obj) === '[object Array]';
}
/**
* Check whether the given variable is a function or not.<br>
* If the given variable is a function, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is a function?
* @memberof tui.util
*/
function isFunctionSafe(obj) {
return toString.call(obj) === '[object Function]';
}
/**
* Check whether the given variable is a number or not.<br>
* If the given variable is a number, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is a number?
* @memberof tui.util
*/
function isNumberSafe(obj) {
return toString.call(obj) === '[object Number]';
}
/**
* Check whether the given variable is a string or not.<br>
* If the given variable is a string, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is a string?
* @memberof tui.util
*/
function isStringSafe(obj) {
return toString.call(obj) === '[object String]';
}
/**
* Check whether the given variable is a boolean or not.<br>
* If the given variable is a boolean, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is a boolean?
* @memberof tui.util
*/
function isBooleanSafe(obj) {
return toString.call(obj) === '[object Boolean]';
}
/**
* Check whether the given variable is a instance of HTMLNode or not.<br>
* If the given variables is a instance of HTMLNode, return true.
* @param {*} html - Target for checking
* @returns {boolean} Is HTMLNode ?
* @memberof tui.util
*/
function isHTMLNode(html) {
if (typeof HTMLElement === 'object') {
return (html && (html instanceof HTMLElement || !!html.nodeType));
}
return !!(html && html.nodeType);
}
/**
* Check whether the given variable is a HTML tag or not.<br>
* If the given variables is a HTML tag, return true.
* @param {*} html - Target for checking
* @returns {Boolean} Is HTML tag?
* @memberof tui.util
*/
function isHTMLTag(html) {
if (typeof HTMLElement === 'object') {
return (html && (html instanceof HTMLElement));
}
return !!(html && html.nodeType && html.nodeType === 1);
}
/**
* Check whether the given variable is empty(null, undefined, or empty array, empty object) or not.<br>
* If the given variables is empty, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is empty?
* @memberof tui.util
*/
function isEmpty(obj) {
if (!isExisty(obj) || _isEmptyString(obj)) {
return true;
}
if (isArray(obj) || isArguments(obj)) {
return obj.length === 0;
}
if (isObject(obj) && !isFunction(obj)) {
return !_hasOwnProperty(obj);
}
return true;
}
/**
* Check whether given argument is empty string
* @param {*} obj - Target for checking
* @returns {boolean} whether given argument is empty string
* @memberof tui.util
* @private
*/
function _isEmptyString(obj) {
return isString(obj) && obj === '';
}
/**
* Check whether given argument has own property
* @param {Object} obj - Target for checking
* @returns {boolean} - whether given argument has own property
* @memberof tui.util
* @private
*/
function _hasOwnProperty(obj) {
var key;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
return true;
}
}
return false;
}
/**
* Check whether the given variable is not empty
* (not null, not undefined, or not empty array, not empty object) or not.<br>
* If the given variables is not empty, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is not empty?
* @memberof tui.util
*/
function isNotEmpty(obj) {
return !isEmpty(obj);
}
/**
* Check whether the given variable is an instance of Date or not.<br>
* If the given variables is an instance of Date, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is an instance of Date?
* @memberof tui.util
*/
function isDate(obj) {
return obj instanceof Date;
}
/**
* Check whether the given variable is an instance of Date or not.<br>
* If the given variables is an instance of Date, return true.<br>
* (It is used for multiple frame environments)
* @param {*} obj - Target for checking
* @returns {boolean} Is an instance of Date?
* @memberof tui.util
*/
function isDateSafe(obj) {
return toString.call(obj) === '[object Date]';
}
module.exports = {
isExisty: isExisty,
isUndefined: isUndefined,
isNull: isNull,
isTruthy: isTruthy,
isFalsy: isFalsy,
isArguments: isArguments,
isArray: isArray,
isArraySafe: isArraySafe,
isObject: isObject,
isFunction: isFunction,
isFunctionSafe: isFunctionSafe,
isNumber: isNumber,
isNumberSafe: isNumberSafe,
isDate: isDate,
isDateSafe: isDateSafe,
isString: isString,
isStringSafe: isStringSafe,
isBoolean: isBoolean,
isBooleanSafe: isBooleanSafe,
isHTMLNode: isHTMLNode,
isHTMLTag: isHTMLTag,
isEmpty: isEmpty,
isNotEmpty: isNotEmpty
};
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some functions for handling array.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
var aps = Array.prototype.slice;
var util;
/**
* Generate an integer Array containing an arithmetic progression.
* @param {number} start - start index
* @param {number} stop - stop index
* @param {number} step - next visit index = current index + step
* @returns {Array}
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* util.range(5); // [0, 1, 2, 3, 4]
* util.range(1, 5); // [1,2,3,4]
* util.range(2, 10, 2); // [2,4,6,8]
* util.range(10, 2, -2); // [10,8,6,4]
*/
var range = function(start, stop, step) {
var arr = [];
var flag;
if (type.isUndefined(stop)) {
stop = start || 0;
start = 0;
}
step = step || 1;
flag = step < 0 ? -1 : 1;
stop *= flag;
for (; start * flag < stop; start += step) {
arr.push(start);
}
return arr;
};
/* eslint-disable valid-jsdoc */
/**
* Zip together multiple lists into a single array
* @param {...Array}
* @returns {Array}
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var result = util.zip([1, 2, 3], ['a', 'b','c'], [true, false, true]);
* console.log(result[0]); // [1, 'a', true]
* console.log(result[1]); // [2, 'b', false]
* console.log(result[2]); // [3, 'c', true]
*/
var zip = function() {/* eslint-enable valid-jsdoc */
var arr2d = aps.call(arguments);
var result = [];
collection.forEach(arr2d, function(arr) {
collection.forEach(arr, function(value, index) {
if (!result[index]) {
result[index] = [];
}
result[index].push(value);
});
});
return result;
};
/**
* Returns the first index at which a given element can be found in the array
* from start index(default 0), or -1 if it is not present.<br>
* It compares searchElement to elements of the Array using strict equality
* (the same method used by the ===, or triple-equals, operator).
* @param {*} searchElement Element to locate in the array
* @param {Array} array Array that will be traversed.
* @param {number} startIndex Start index in array for searching (default 0)
* @returns {number} the First index at which a given element, or -1 if it is not present
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var arr = ['one', 'two', 'three', 'four'];
* var idx1 = util.inArray('one', arr, 3); // -1
* var idx2 = util.inArray('one', arr); // 0
*/
var inArray = function(searchElement, array, startIndex) {
var i;
var length;
startIndex = startIndex || 0;
if (!type.isArray(array)) {
return -1;
}
if (Array.prototype.indexOf) {
return Array.prototype.indexOf.call(array, searchElement, startIndex);
}
length = array.length;
for (i = startIndex; startIndex >= 0 && i < length; i += 1) {
if (array[i] === searchElement) {
return i;
}
}
return -1;
};
util = {
inArray: inArray,
range: range,
zip: zip
};
module.exports = util;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some functions for handling object as collection.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var type = __webpack_require__(2);
var object = __webpack_require__(1);
/**
* Execute the provided callback once for each element present
* in the array(or Array-like object) in ascending order.<br>
* If the callback function returns false, the loop will be stopped.<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the element
* - The index of the element
* - The array(or Array-like object) being traversed
* @param {Array} arr The array(or Array-like object) that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var sum = 0;
*
* util.forEachArray([1,2,3], function(value){
* sum += value;
* });
* alert(sum); // 6
*/
function forEachArray(arr, iteratee, context) {
var index = 0;
var len = arr.length;
context = context || null;
for (; index < len; index += 1) {
if (iteratee.call(context, arr[index], index, arr) === false) {
break;
}
}
}
/**
* Execute the provided callback once for each property of object which actually exist.<br>
* If the callback function returns false, the loop will be stopped.<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the property
* - The name of the property
* - The object being traversed
* @param {Object} obj The object that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var sum = 0;
*
* util.forEachOwnProperties({a:1,b:2,c:3}, function(value){
* sum += value;
* });
* alert(sum); // 6
**/
function forEachOwnProperties(obj, iteratee, context) {
var key;
context = context || null;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
if (iteratee.call(context, obj[key], key, obj) === false) {
break;
}
}
}
}
/**
* Execute the provided callback once for each property of object(or element of array) which actually exist.<br>
* If the object is Array-like object(ex-arguments object), It needs to transform to Array.(see 'ex2' of example).<br>
* If the callback function returns false, the loop will be stopped.<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the property(or The value of the element)
* - The name of the property(or The index of the element)
* - The object being traversed
* @param {Object} obj The object that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var sum = 0;
*
* util.forEach([1,2,3], function(value){
* sum += value;
* });
* alert(sum); // 6
*
* // In case of Array-like object
* var array = Array.prototype.slice.call(arrayLike); // change to array
* util.forEach(array, function(value){
* sum += value;
* });
*/
function forEach(obj, iteratee, context) {
if (type.isArray(obj)) {
forEachArray(obj, iteratee, context);
} else {
forEachOwnProperties(obj, iteratee, context);
}
}
/**
* Execute the provided callback function once for each element in an array, in order,
* and constructs a new array from the results.<br>
* If the object is Array-like object(ex-arguments object),
* It needs to transform to Array.(see 'ex2' of forEach example)<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the property(or The value of the element)
* - The name of the property(or The index of the element)
* - The object being traversed
* @param {Object} obj The object that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @returns {Array} A new array composed of returned values from callback function
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var result = util.map([0,1,2,3], function(value) {
* return value + 1;
* });
*
* alert(result); // 1,2,3,4
*/
function map(obj, iteratee, context) {
var resultArray = [];
context = context || null;
forEach(obj, function() {
resultArray.push(iteratee.apply(context, arguments));
});
return resultArray;
}
/**
* Execute the callback function once for each element present in the array(or Array-like object or plain object).<br>
* If the object is Array-like object(ex-arguments object),
* It needs to transform to Array.(see 'ex2' of forEach example)<br>
* Callback function(iteratee) is invoked with four arguments:
* - The previousValue
* - The currentValue
* - The index
* - The object being traversed
* @param {Object} obj The object that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @returns {*} The result value
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var result = util.reduce([0,1,2,3], function(stored, value) {
* return stored + value;
* });
*
* alert(result); // 6
*/
function reduce(obj, iteratee, context) {
var index = 0;
var keys, length, store;
context = context || null;
if (!type.isArray(obj)) {
keys = object.keys(obj);
length = keys.length;
store = obj[keys[index += 1]];
} else {
length = obj.length;
store = obj[index];
}
index += 1;
for (; index < length; index += 1) {
store = iteratee.call(context, store, obj[keys ? keys[index] : index]);
}
return store;
}
/**
* Transform the Array-like object to Array.<br>
* In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used.
* @param {*} arrayLike Array-like object
* @returns {Array} Array
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var arrayLike = {
* 0: 'one',
* 1: 'two',
* 2: 'three',
* 3: 'four',
* length: 4
* };
* var result = util.toArray(arrayLike);
*
* alert(result instanceof Array); // true
* alert(result); // one,two,three,four
*/
function toArray(arrayLike) {
var arr;
try {
arr = Array.prototype.slice.call(arrayLike);
} catch (e) {
arr = [];
forEachArray(arrayLike, function(value) {
arr.push(value);
});
}
return arr;
}
/**
* Create a new array or plain object with all elements(or properties)
* that pass the test implemented by the provided function.<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the property(or The value of the element)
* - The name of the property(or The index of the element)
* - The object being traversed
* @param {Object} obj Object(plain object or Array) that will be traversed
* @param {function} iteratee Callback function
* @param {Object} [context] Context(this) of callback function
* @returns {Object} plain object or Array
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var result1 = util.filter([0,1,2,3], function(value) {
* return (value % 2 === 0);
* });
* alert(result1); // [0, 2]
*
* var result2 = util.filter({a : 1, b: 2, c: 3}, function(value) {
* return (value % 2 !== 0);
* });
* alert(result2.a); // 1
* alert(result2.b); // undefined
* alert(result2.c); // 3
*/
function filter(obj, iteratee, context) {
var result, add;
context = context || null;
if (!type.isObject(obj) || !type.isFunction(iteratee)) {
throw new Error('wrong parameter');
}
if (type.isArray(obj)) {
result = [];
add = function(subResult, args) {
subResult.push(args[0]);
};
} else {
result = {};
add = function(subResult, args) {
subResult[args[1]] = args[0];
};
}
forEach(obj, function() {
if (iteratee.apply(context, arguments)) {
add(result, arguments);
}
}, context);
return result;
}
/**
* fetching a property
* @param {Array} arr target collection
* @param {String|Number} property property name
* @returns {Array}
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var objArr = [
* {'abc': 1, 'def': 2, 'ghi': 3},
* {'abc': 4, 'def': 5, 'ghi': 6},
* {'abc': 7, 'def': 8, 'ghi': 9}
* ];
* var arr2d = [
* [1, 2, 3],
* [4, 5, 6],
* [7, 8, 9]
* ];
* util.pluck(objArr, 'abc'); // [1, 4, 7]
* util.pluck(arr2d, 2); // [3, 6, 9]
*/
function pluck(arr, property) {
var result = map(arr, function(item) {
return item[property];
});
return result;
}
module.exports = {
forEachOwnProperties: forEachOwnProperties,
forEachArray: forEachArray,
forEach: forEach,
toArray: toArray,
map: map,
reduce: reduce,
filter: filter,
pluck: pluck
};
/***/ }),
/* 5 */
/***/ (function(module, exports) {
/**
* @fileoverview This module provides a bind() function for context binding.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
/**
* Create a new function that, when called, has its this keyword set to the provided value.
* @param {function} fn A original function before binding
* @param {*} obj context of function in arguments[0]
* @returns {function()} A new bound function with context that is in arguments[1]
* @memberof tui.util
*/
function bind(fn, obj) {
var slice = Array.prototype.slice;
var args;
if (fn.bind) {
return fn.bind.apply(fn, slice.call(arguments, 1));
}
/* istanbul ignore next */
args = slice.call(arguments, 2);
/* istanbul ignore next */
return function() {
/* istanbul ignore next */
return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);
};
}
module.exports = {
bind: bind
};
/***/ }),
/* 6 */
/***/ (function(module, exports) {
/**
* @fileoverview This module provides some simple function for inheritance.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
/**
* Create a new object with the specified prototype object and properties.
* @param {Object} obj This object will be a prototype of the newly-created object.
* @returns {Object}
* @memberof tui.util
*/
function createObject(obj) {
function F() {} // eslint-disable-line require-jsdoc
F.prototype = obj;
return new F();
}
/**
* Provide a simple inheritance in prototype-oriented.<br>
* Caution :
* Don't overwrite the prototype of child constructor.
*
* @param {function} subType Child constructor
* @param {function} superType Parent constructor
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* // Parent constructor
* function Animal(leg) {
* this.leg = leg;
* }
* Animal.prototype.growl = function() {
* // ...
* };
*
* // Child constructor
* function Person(name) {
* this.name = name;
* }
*
* // Inheritance
* util.inherit(Person, Animal);
*
* // After this inheritance, please use only the extending of property.
* // Do not overwrite prototype.
* Person.prototype.walk = function(direction) {
* // ...
* };
*/
function inherit(subType, superType) {
var prototype = createObject(superType.prototype);
prototype.constructor = subType;
subType.prototype = prototype;
}
module.exports = {
createObject: createObject,
inherit: inherit
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some functions for handling the string.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var object = __webpack_require__(1);
/**
* Transform the given HTML Entity string into plain string
* @param {String} htmlEntity - HTML Entity type string
* @returns {String} Plain string
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var htmlEntityString = "A &#39;quote&#39; is &lt;b&gt;bold&lt;/b&gt;"
* var result = util.decodeHTMLEntity(htmlEntityString); //"A 'quote' is <b>bold</b>"
*/
function decodeHTMLEntity(htmlEntity) {
var entities = {
'&quot;': '"',
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
'&#39;': '\'',
'&nbsp;': ' '
};
return htmlEntity.replace(/&amp;|&lt;|&gt;|&quot;|&#39;|&nbsp;/g, function(m0) {
return entities[m0] ? entities[m0] : m0;
});
}
/**
* Transform the given string into HTML Entity string
* @param {String} html - String for encoding
* @returns {String} HTML Entity
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var htmlEntityString = "<script> alert('test');</script><a href='test'>";
* var result = util.encodeHTMLEntity(htmlEntityString);
* //"&lt;script&gt; alert(&#39;test&#39;);&lt;/script&gt;&lt;a href=&#39;test&#39;&gt;"
*/
function encodeHTMLEntity(html) {
var entities = {
'"': 'quot',
'&': 'amp',
'<': 'lt',
'>': 'gt',
'\'': '#39'
};
return html.replace(/[<>&"']/g, function(m0) {
return entities[m0] ? '&' + entities[m0] + ';' : m0;
});
}
/**
* Return whether the string capable to transform into plain string is in the given string or not.
* @param {String} string - test string
* @memberof tui.util
* @returns {boolean}
*/
function hasEncodableString(string) {
return (/[<>&"']/).test(string);
}
/**
* Return duplicate charters
* @param {string} operandStr1 The operand string
* @param {string} operandStr2 The operand string
* @private
* @memberof tui.util
* @returns {string}
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* util.getDuplicatedChar('fe dev', 'nhn entertainment'); // 'e'
* util.getDuplicatedChar('fdsa', 'asdf'); // 'asdf'
*/
function getDuplicatedChar(operandStr1, operandStr2) {
var i = 0;
var len = operandStr1.length;
var pool = {};
var dupl, key;
for (; i < len; i += 1) {
key = operandStr1.charAt(i);
pool[key] = 1;
}
for (i = 0, len = operandStr2.length; i < len; i += 1) {
key = operandStr2.charAt(i);
if (pool[key]) {
pool[key] += 1;
}
}
pool = collection.filter(pool, function(item) {
return item > 1;
});
pool = object.keys(pool).sort();
dupl = pool.join('');
return dupl;
}
module.exports = {
decodeHTMLEntity: decodeHTMLEntity,
encodeHTMLEntity: encodeHTMLEntity,
hasEncodableString: hasEncodableString,
getDuplicatedChar: getDuplicatedChar
};
/***/ }),
/* 8 */
/***/ (function(module, exports) {
/**
* @fileoverview collections of some technic methods.
* @author NHN Ent. FE Development Lab <e0242.nhnent.com>
*/
'use strict';
var tricks = {};
var aps = Array.prototype.slice;
/**
* Creates a debounced function that delays invoking fn until after delay milliseconds has elapsed
* since the last time the debouced function was invoked.
* @param {function} fn The function to debounce.
* @param {number} [delay=0] The number of milliseconds to delay
* @memberof tui.util
* @returns {function} debounced function.
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* function someMethodToInvokeDebounced() {}
*
* var debounced = util.debounce(someMethodToInvokeDebounced, 300);
*
* // invoke repeatedly
* debounced();
* debounced();
* debounced();
* debounced();
* debounced();
* debounced(); // last invoke of debounced()
*
* // invoke someMethodToInvokeDebounced() after 300 milliseconds.
*/
function debounce(fn, delay) {
var timer, args;
/* istanbul ignore next */
delay = delay || 0;
function debounced() { // eslint-disable-line require-jsdoc
args = aps.call(arguments);
window.clearTimeout(timer);
timer = window.setTimeout(function() {
fn.apply(null, args);
}, delay);
}
return debounced;
}
/**
* return timestamp
* @memberof tui.util
* @returns {number} The number of milliseconds from Jan. 1970 00:00:00 (GMT)
*/
function timestamp() {
return Number(new Date());
}
/**
* Creates a throttled function that only invokes fn at most once per every interval milliseconds.
*
* You can use this throttle short time repeatedly invoking functions. (e.g MouseMove, Resize ...)
*
* if you need reuse throttled method. you must remove slugs (e.g. flag variable) related with throttling.
* @param {function} fn function to throttle
* @param {number} [interval=0] the number of milliseconds to throttle invocations to.
* @memberof tui.util
* @returns {function} throttled function
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* function someMethodToInvokeThrottled() {}
*
* var throttled = util.throttle(someMethodToInvokeThrottled, 300);
*
* // invoke repeatedly
* throttled(); // invoke (leading)
* throttled();
* throttled(); // invoke (near 300 milliseconds)
* throttled();
* throttled();
* throttled(); // invoke (near 600 milliseconds)
* // ...
* // invoke (trailing)
*
* // if you need reuse throttled method. then invoke reset()
* throttled.reset();
*/
function throttle(fn, interval) {
var base;
var isLeading = true;
var tick = function(_args) {
fn.apply(null, _args);
base = null;
};
var debounced, stamp, args;
/* istanbul ignore next */
interval = interval || 0;
debounced = tricks.debounce(tick, interval);
function throttled() { // eslint-disable-line require-jsdoc
args = aps.call(arguments);
if (isLeading) {
tick(args);
isLeading = false;
return;
}
stamp = tricks.timestamp();
base = base || stamp;
// pass array directly because `debounce()`, `tick()` are already use
// `apply()` method to invoke developer's `fn` handler.
//
// also, this `debounced` line invoked every time for implements
// `trailing` features.
debounced(args);
if ((stamp - base) >= interval) {
tick(args);
}
}
function reset() { // eslint-disable-line require-jsdoc
isLeading = true;
base = null;
}
throttled.reset = reset;
return throttled;
}
tricks.timestamp = timestamp;
tricks.debounce = debounce;
tricks.throttle = throttle;
module.exports = tricks;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some functions for handling object as collection.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var object = __webpack_require__(1);
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
var ms7days = 7 * 24 * 60 * 60 * 1000;
/**
* Check if the date has passed 7 days
* @param {number} date - milliseconds
* @returns {boolean}
* @ignore
*/
function isExpired(date) {
var now = new Date().getTime();
return now - date > ms7days;
}
/**
* Send hostname on DOMContentLoaded.
* To prevent hostname set tui.usageStatistics to false.
* @param {string} appName - application name
* @param {string} trackingId - GA tracking ID
* @ignore
*/
function sendHostname(appName, trackingId) {
var url = 'https://www.google-analytics.com/collect';
var hostname = location.hostname;
var hitType = 'event';
var eventCategory = 'use';
var applicationKeyForStorage = 'TOAST UI ' + appName + ' for ' + hostname + ': Statistics';
var date = window.localStorage.getItem(applicationKeyForStorage);
// skip if the flag is defined and is set to false explicitly
if (!type.isUndefined(window.tui) && window.tui.usageStatistics === false) {
return;
}
// skip if not pass seven days old
if (date && !isExpired(date)) {
return;
}
window.localStorage.setItem(applicationKeyForStorage, new Date().getTime());
setTimeout(function() {
if (document.readyState === 'interactive' || document.readyState === 'complete') {
imagePing(url, {
v: 1,
t: hitType,
tid: trackingId,
cid: hostname,
dp: hostname,
dh: appName,
el: appName,
ec: eventCategory
});
}
}, 1000);
}
/**
* Request image ping.
* @param {String} url url for ping request
* @param {Object} trackingInfo infos for make query string
* @returns {HTMLElement}
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* util.imagePing('https://www.google-analytics.com/collect', {
* v: 1,
* t: 'event',
* tid: 'trackingid',
* cid: 'cid',
* dp: 'dp',
* dh: 'dh'
* });
*/
function imagePing(url, trackingInfo) {
var queryString = collection.map(object.keys(trackingInfo), function(key, index) {
var startWith = index === 0 ? '' : '&';
return startWith + key + '=' + trackingInfo[key];
}).join('');
var trackingElement = document.createElement('img');
trackingElement.src = url + '?' + queryString;
trackingElement.style.display = 'none';
document.body.appendChild(trackingElement);
document.body.removeChild(trackingElement);
return trackingElement;
}
module.exports = {
imagePing: imagePing,
sendHostname: sendHostname
};
/***/ }),
/* 10 */
/***/ (function(module, exports) {
/**
* @fileoverview This module detects the kind of well-known browser and version.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
/**
* This object has an information that indicate the kind of browser.<br>
* The list below is a detectable browser list.
* - ie8 ~ ie11
* - chrome
* - firefox
* - safari
* - edge
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* util.browser.chrome === true; // chrome
* util.browser.firefox === true; // firefox
* util.browser.safari === true; // safari
* util.browser.msie === true; // IE
* util.browser.edge === true; // edge
* util.browser.others === true; // other browser
* util.browser.version; // browser version
*/
var browser = {
chrome: false,
firefox: false,
safari: false,
msie: false,
edge: false,
others: false,
version: 0
};
var nav = window.navigator;
var appName = nav.appName.replace(/\s/g, '_');
var userAgent = nav.userAgent;
var rIE = /MSIE\s([0-9]+[.0-9]*)/;
var rIE11 = /Trident.*rv:11\./;
var rEdge = /Edge\/(\d+)\./;
var versionRegex = {
firefox: /Firefox\/(\d+)\./,
chrome: /Chrome\/(\d+)\./,
safari: /Version\/([\d.]+).*Safari\/(\d+)/
};
var key, tmp;
var detector = {
Microsoft_Internet_Explorer: function() { // eslint-disable-line camelcase
var detectedVersion = userAgent.match(rIE);
if (detectedVersion) { // ie8 ~ ie10
browser.msie = true;
browser.version = parseFloat(detectedVersion[1]);
} else { // no version information
browser.others = true;
}
},
Netscape: function() { // eslint-disable-line complexity
var detected = false;
if (rIE11.exec(userAgent)) {
browser.msie = true;
browser.version = 11;
detected = true;
} else if (rEdge.exec(userAgent)) {
browser.edge = true;
browser.version = userAgent.match(rEdge)[1];
detected = true;
} else {
for (key in versionRegex) {
if (versionRegex.hasOwnProperty(key)) {
tmp = userAgent.match(versionRegex[key]);
if (tmp && tmp.length > 1) { // eslint-disable-line max-depth
browser[key] = detected = true;
browser.version = parseFloat(tmp[1] || 0);
break;
}
}
}
}
if (!detected) {
browser.others = true;
}
}
};
var fn = detector[appName];
if (fn) {
detector[appName]();
}
module.exports = browser;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has some methods for handling popup-window
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
var func = __webpack_require__(5);
var browser = __webpack_require__(10);
var object = __webpack_require__(1);
var popupId = 0;
/**
* Popup management class
* @constructor
* @memberof tui.util
* @example
* // node, commonjs
* var popup = require('tui-code-snippet').popup;
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var popup = tui.util.popup;
* <script>
*/
function Popup() {
/**
* Caching the window-contexts of opened popups
* @type {Object}
*/
this.openedPopup = {};
/**
* In IE7, an error occurs when the closeWithParent property attaches to window object.<br>
* So, It is for saving the value of closeWithParent instead of attaching to window object.
* @type {Object}
*/
this.closeWithParentPopup = {};
/**
* Post data bridge for IE11 popup
* @type {string}
*/
this.postBridgeUrl = '';
}
/**********
* public methods
**********/
/**
* Returns a popup-list administered by current window.
* @param {string} [key] The key of popup.
* @returns {Object} popup window list object
*/
Popup.prototype.getPopupList = function(key) {
var target;
if (type.isExisty(key)) {
target = this.openedPopup[key];
} else {
target = this.openedPopup;
}
return target;
};
/**
* Open popup
* Caution:
* In IE11, when transfer data to popup by POST, must set the postBridgeUrl.
*
* @param {string} url - popup url
* @param {Object} options - popup options
* @param {string} [options.popupName] - Key of popup window.<br>
* If the key is set, when you try to open by this key, the popup of this key is focused.<br>
* Or else a new popup window having this key is opened.
*
* @param {string} [options.popupOptionStr=""] - Option string of popup window<br>
* It is same with the third parameter of window.open() method.<br>
* See {@link http://www.w3schools.com/jsref/met_win_open.asp}
*
* @param {boolean} [options.closeWithParent=true] - Is closed when parent window closed?
*
* @param {boolean} [options.useReload=false] - This property indicates whether reload the popup or not.<br>
* If true, the popup will be reloaded when you try to re-open the popup that has been opened.<br>
* When transmit the POST-data, some browsers alert a message for confirming whether retransmit or not.
*
* @param {string} [options.postBridgeUrl='']
* Use this url to avoid a certain bug occuring when transmitting POST data to the popup in IE11.<br>
* This specific buggy situation is known to happen because IE11 tries to open the requested url<br>
* not in a new popup window as intended, but in a new tab.<br>
* See {@link http://wiki.nhnent.com/pages/viewpage.action?pageId=240562844}
*
* @param {string} [options.method=get]
* The method of transmission when the form-data is transmitted to popup-window.
*
* @param {Object} [options.param=null]
* Using as parameters for transmission when the form-data is transmitted to popup-window.
*/
Popup.prototype.openPopup = function(url, options) { // eslint-disable-line complexity
var popup, formElement, useIEPostBridge;
options = object.extend({
popupName: 'popup_' + popupId + '_' + Number(new Date()),
popupOptionStr: '',
useReload: true,
closeWithParent: true,
method: 'get',
param: {}
}, options || {});
options.method = options.method.toUpperCase();
this.postBridgeUrl = options.postBridgeUrl || this.postBridgeUrl;
useIEPostBridge = options.method === 'POST' && options.param &&
browser.msie && browser.version === 11;
if (!type.isExisty(url)) {
throw new Error('Popup#open() need popup url.');
}
popupId += 1;
/*
* In form-data transmission
* 1. Create a form before opening a popup.
* 2. Transmit the form-data.
* 3. Remove the form after transmission.
*/
if (options.param) {
if (options.method === 'GET') {
url = url + (/\?/.test(url) ? '&' : '?') + this._parameterize(options.param);
} else if (options.method === 'POST') {
if (!useIEPostBridge) {
formElement = this.createForm(url, options.param, options.method, options.popupName);
url = 'about:blank';
}
}
}
popup = this.openedPopup[options.popupName];
if (!type.isExisty(popup)) {
this.openedPopup[options.popupName] = popup = this._open(useIEPostBridge, options.param,
url, options.popupName, options.popupOptionStr);
} else if (popup.closed) {
this.openedPopup[options.popupName] = popup = this._open(useIEPostBridge, options.param,
url, options.popupName, options.popupOptionStr);
} else {
if (options.useReload) {
popup.location.replace(url);
}
popup.focus();
}
this.closeWithParentPopup[options.popupName] = options.closeWithParent;
if (!popup || popup.closed || type.isUndefined(popup.closed)) {
alert('please enable popup windows for this website');
}
if (options.param && options.method === 'POST' && !useIEPostBridge) {
if (popup) {
formElement.submit();
}
if (formElement.parentNode) {
formElement.parentNode.removeChild(formElement);
}
}
window.onunload = func.bind(this.closeAllPopup, this);
};
/**
* Close the popup
* @param {boolean} [skipBeforeUnload] - If true, the 'window.onunload' will be null and skip unload event.
* @param {Window} [popup] - Window-context of popup for closing. If omit this, current window-context will be closed.
*/
Popup.prototype.close = function(skipBeforeUnload, popup) {
var target = popup || window;
skipBeforeUnload = type.isExisty(skipBeforeUnload) ? skipBeforeUnload : false;
if (skipBeforeUnload) {
window.onunload = null;
}
if (!target.closed) {
target.opener = window.location.href;
target.close();
}
};
/**
* Close all the popups in current window.
* @param {boolean} closeWithParent - If true, popups having the closeWithParentPopup property as true will be closed.
*/
Popup.prototype.closeAllPopup = function(closeWithParent) {
var hasArg = type.isExisty(closeWithParent);
collection.forEachOwnProperties(this.openedPopup, function(popup, key) {
if ((hasArg && this.closeWithParentPopup[key]) || !hasArg) {
this.close(false, popup);
}
}, this);
};
/**
* Activate(or focus) the popup of the given name.
* @param {string} popupName - Name of popup for activation
*/
Popup.prototype.focus = function(popupName) {
this.getPopupList(popupName).focus();
};
/**
* Return an object made of parsing the query string.
* @returns {Object} An object having some information of the query string.
* @private
*/
Popup.prototype.parseQuery = function() {
var param = {};
var search, pair;
search = window.location.search.substr(1);
collection.forEachArray(search.split('&'), function(part) {
pair = part.split('=');
param[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
});
return param;
};
/**
* Create a hidden form from the given arguments and return this form.
* @param {string} action - URL for form transmission
* @param {Object} [data] - Data for form transmission
* @param {string} [method] - Method of transmission
* @param {string} [target] - Target of transmission
* @param {HTMLElement} [container] - Container element of form.
* @returns {HTMLElement} Form element
*/
Popup.prototype.createForm = function(action, data, method, target, container) {
var form = document.createElement('form'),
input;
container = container || document.body;
form.method = method || 'POST';
form.action = action || '';
form.target = target || '';
form.style.display = 'none';
collection.forEachOwnProperties(data, function(value, key) {
input = document.createElement('input');
input.name = key;
input.type = 'hidden';
input.value = value;
form.appendChild(input);
});
container.appendChild(form);
return form;
};
/**********
* private methods
**********/
/**
* Return an query string made by parsing the given object
* @param {Object} obj - An object that has information for query string
* @returns {string} - Query string
* @private
*/
Popup.prototype._parameterize = function(obj) {
var query = [];
collection.forEachOwnProperties(obj, function(value, key) {
query.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
});
return query.join('&');
};
/**
* Open popup
* @param {boolean} useIEPostBridge - A switch option whether to use alternative
* of tossing POST data to the popup window in IE11
* @param {Object} param - A data for tossing to popup
* @param {string} url - Popup url
* @param {string} popupName - Popup name
* @param {string} optionStr - Setting for popup, ex) 'width=640,height=320,scrollbars=yes'
* @returns {Window} Window context of popup
* @private
*/
Popup.prototype._open = function(useIEPostBridge, param, url, popupName, optionStr) {
var popup;
if (useIEPostBridge) {
popup = window.open(this.postBridgeUrl, popupName, optionStr);
setTimeout(function() {
popup.redirect(url, param);
}, 100);
} else {
popup = window.open(url, popupName, optionStr);
}
return popup;
};
module.exports = new Popup();
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module has a function for date format.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var type = __webpack_require__(2);
var object = __webpack_require__(1);
var tokens = /[\\]*YYYY|[\\]*YY|[\\]*MMMM|[\\]*MMM|[\\]*MM|[\\]*M|[\\]*DD|[\\]*D|[\\]*HH|[\\]*H|[\\]*A/gi;
var MONTH_STR = [
'Invalid month', 'January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November', 'December'
];
var MONTH_DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var replaceMap = {
M: function(date) {
return Number(date.month);
},
MM: function(date) {
var month = date.month;
return (Number(month) < 10) ? '0' + month : month;
},
MMM: function(date) {
return MONTH_STR[Number(date.month)].substr(0, 3);
},
MMMM: function(date) {
return MONTH_STR[Number(date.month)];
},
D: function(date) {
return Number(date.date);
},
d: function(date) {
return replaceMap.D(date); // eslint-disable-line new-cap
},
DD: function(date) {
var dayInMonth = date.date;
return (Number(dayInMonth) < 10) ? '0' + dayInMonth : dayInMonth;
},
dd: function(date) {
return replaceMap.DD(date); // eslint-disable-line new-cap
},
YY: function(date) {
return Number(date.year) % 100;
},
yy: function(date) {
return replaceMap.YY(date); // eslint-disable-line new-cap
},
YYYY: function(date) {
var prefix = '20',
year = date.year;
if (year > 69 && year < 100) {
prefix = '19';
}
return (Number(year) < 100) ? prefix + String(year) : year;
},
yyyy: function(date) {
return replaceMap.YYYY(date); // eslint-disable-line new-cap
},
A: function(date) {
return date.meridiem;
},
a: function(date) {
return date.meridiem;
},
hh: function(date) {
var hour = date.hour;
return (Number(hour) < 10) ? '0' + hour : hour;
},
HH: function(date) {
return replaceMap.hh(date);
},
h: function(date) {
return String(Number(date.hour));
},
H: function(date) {
return replaceMap.h(date);
},
m: function(date) {
return String(Number(date.minute));
},
mm: function(date) {
var minute = date.minute;
return (Number(minute) < 10) ? '0' + minute : minute;
}
};
/**
* Check whether the given variables are valid date or not.
* @param {number} year - Year
* @param {number} month - Month
* @param {number} date - Day in month.
* @returns {boolean} Is valid?
* @private
*/
function isValidDate(year, month, date) { // eslint-disable-line complexity
var isValidYear, isValidMonth, isValid, lastDayInMonth;
year = Number(year);
month = Number(month);
date = Number(date);
isValidYear = (year > -1 && year < 100) || ((year > 1969) && (year < 2070));
isValidMonth = (month > 0) && (month < 13);
if (!isValidYear || !isValidMonth) {
return false;
}
lastDayInMonth = MONTH_DAYS[month];
if (month === 2 && year % 4 === 0) {
if (year % 100 !== 0 || year % 400 === 0) {
lastDayInMonth = 29;
}
}
isValid = (date > 0) && (date <= lastDayInMonth);
return isValid;
}
/**
* Return a string that transformed from the given form and date.
* @param {string} form - Date form
* @param {Date|Object} date - Date object
* @param {{meridiemSet: {AM: string, PM: string}}} option - Option
* @returns {boolean|string} A transformed string or false.
* @memberof tui.util
* @example
* // key | Shorthand
* // --------------- |-----------------------
* // years | YY / YYYY / yy / yyyy
* // months(n) | M / MM
* // months(str) | MMM / MMMM
* // days | D / DD / d / dd
* // hours | H / HH / h / hh
* // minutes | m / mm
* // meridiem(AM,PM) | A / a
*
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var dateStr1 = util.formatDate('yyyy-MM-dd', {
* year: 2014,
* month: 12,
* date: 12
* });
* alert(dateStr1); // '2014-12-12'
*
* var dateStr2 = util.formatDate('MMM DD YYYY HH:mm', {
* year: 1999,
* month: 9,
* date: 9,
* hour: 0,
* minute: 2
* });
* alert(dateStr2); // 'Sep 09 1999 00:02'
*
* var dt = new Date(2010, 2, 13),
* dateStr3 = util.formatDate('yyyy년 M월 dd일', dt);
* alert(dateStr3); // '2010년 3월 13일'
*
* var option4 = {
* meridiemSet: {
* AM: '오전',
* PM: '오후'
* }
* };
* var date4 = {year: 1999, month: 9, date: 9, hour: 13, minute: 2};
* var dateStr4 = util.formatDate('yyyy-MM-dd A hh:mm', date4, option4));
* alert(dateStr4); // '1999-09-09 오후 01:02'
*/
function formatDate(form, date, option) { // eslint-disable-line complexity
var am = object.pick(option, 'meridiemSet', 'AM') || 'AM';
var pm = object.pick(option, 'meridiemSet', 'PM') || 'PM';
var meridiem, nDate, resultStr;
if (type.isDate(date)) {
nDate = {
year: date.getFullYear(),
month: date.getMonth() + 1,
date: date.getDate(),
hour: date.getHours(),
minute: date.getMinutes()
};
} else {
nDate = {
year: date.year,
month: date.month,
date: date.date,
hour: date.hour,
minute: date.minute
};
}
if (!isValidDate(nDate.year, nDate.month, nDate.date)) {
return false;
}
nDate.meridiem = '';
if (/([^\\]|^)[aA]\b/.test(form)) {
meridiem = (nDate.hour > 11) ? pm : am;
if (nDate.hour > 12) { // See the clock system: https://en.wikipedia.org/wiki/12-hour_clock
nDate.hour %= 12;
}
if (nDate.hour === 0) {
nDate.hour = 12;
}
nDate.meridiem = meridiem;
}
resultStr = form.replace(tokens, function(key) {
if (key.indexOf('\\') > -1) { // escape character
return key.replace(/\\/, '');
}
return replaceMap[key](nDate) || '';
});
return resultStr;
}
module.exports = formatDate;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview
* This module provides a function to make a constructor
* that can inherit from the other constructors like the CLASS easily.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var inherit = __webpack_require__(6).inherit;
var extend = __webpack_require__(1).extend;
/**
* Help a constructor to be defined and to inherit from the other constructors
* @param {*} [parent] Parent constructor
* @param {Object} props Members of constructor
* @param {Function} props.init Initialization method
* @param {Object} [props.static] Static members of constructor
* @returns {*} Constructor
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var Parent = util.defineClass({
* init: function() { // constuructor
* this.name = 'made by def';
* },
* method: function() {
* // ...
* },
* static: {
* staticMethod: function() {
* // ...
* }
* }
* });
*
* var Child = util.defineClass(Parent, {
* childMethod: function() {}
* });
*
* Parent.staticMethod();
*
* var parentInstance = new Parent();
* console.log(parentInstance.name); //made by def
* parentInstance.staticMethod(); // Error
*
* var childInstance = new Child();
* childInstance.method();
* childInstance.childMethod();
*/
function defineClass(parent, props) {
var obj;
if (!props) {
props = parent;
parent = null;
}
obj = props.init || function() {};
if (parent) {
inherit(obj, parent);
}
if (props.hasOwnProperty('static')) {
extend(obj, props['static']);
delete props['static'];
}
extend(obj.prototype, props);
return obj;
}
module.exports = defineClass;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview Define module
* @author NHN Ent.
* FE Development Lab <dl_javscript@nhnent.com>
* @dependency type.js, defineNamespace.js
*/
'use strict';
var defineNamespace = __webpack_require__(15);
var type = __webpack_require__(2);
var INITIALIZATION_METHOD_NAME = 'initialize';
/**
* Define module
* @param {string} namespace - Namespace of module
* @param {Object} moduleDefinition - Object literal for module
* @returns {Object} Defined module
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var myModule = util.defineModule('modules.myModule', {
* name: 'john',
* message: '',
* initialize: function() {
* this.message = 'hello world';
* },
* getMessage: function() {
* return this.name + ': ' + this.message
* }
* });
*
* console.log(myModule.getMessage()); // 'john: hello world';
*/
function defineModule(namespace, moduleDefinition) {
var base = moduleDefinition || {};
if (type.isFunction(base[INITIALIZATION_METHOD_NAME])) {
base[INITIALIZATION_METHOD_NAME]();
}
return defineNamespace(namespace, base);
}
module.exports = defineModule;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview Define namespace
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
* @dependency object.js, collection.js
*/
'use strict';
var collection = __webpack_require__(4);
var object = __webpack_require__(1);
/**
* Define namespace
* @param {string} namespace - Namespace (ex- 'foo.bar.baz')
* @param {(object|function)} props - A set of modules or one module
* @param {boolean} [isOverride] - Override the props to the namespace.<br>
* (It removes previous properties of this namespace)
* @returns {(object|function)} Defined namespace
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var util = require('tui-code-snippet'); // node, commonjs
* var util = tui.util; // distribution file
*
* //-- #2. Use property --//
* var neComp = util.defineNamespace;
* neComp.listMenu = defineClass({
* init: function() {
* // ...
* }
* });
*/
function defineNamespace(namespace, props, isOverride) {
var names, result, prevLast, last;
names = namespace.split('.');
names.unshift(window);
result = collection.reduce(names, function(obj, name) {
obj[name] = obj[name] || {};
return obj[name];
});
if (isOverride) {
last = names.pop();
prevLast = object.pick.apply(null, names);
result = prevLast[last] = props;
} else {
object.extend(result, props);
}
return result;
}
module.exports = defineNamespace;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview
* This module provides some functions for custom events.<br>
* And it is implemented in the observer design pattern.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
var object = __webpack_require__(1);
var R_EVENTNAME_SPLIT = /\s+/g;
/**
* A unit of event handler item.
* @ignore
* @typedef {object} HandlerItem
* @property {function} fn - event handler
* @property {object} ctx - context of event handler
*/
/**
* @class
* @memberof tui.util
* @example
* // node, commonjs
* var CustomEvents = require('tui-code-snippet').CustomEvents;
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var CustomEvents = tui.util.CustomEvents;
* </script>
*/
function CustomEvents() {
/**
* @type {HandlerItem[]}
*/
this.events = null;
/**
* only for checking specific context event was binded
* @type {object[]}
*/
this.contexts = null;
}
/**
* Mixin custom events feature to specific constructor
* @param {function} func - constructor
* @example
* //-- #1. Get Module --//
* var CustomEvents = require('tui-code-snippet').CustomEvents; // node, commonjs
* var CustomEvents = tui.util.CustomEvents; // distribution file
*
* //-- #2. Use property --//
* var model;
* function Model() {
* this.name = '';
* }
* CustomEvents.mixin(Model);
*
* model = new Model();
* model.on('change', function() { this.name = 'model'; }, this);
* model.fire('change');
* alert(model.name); // 'model';
*/
CustomEvents.mixin = function(func) {
object.extend(func.prototype, CustomEvents.prototype);
};
/**
* Get HandlerItem object
* @param {function} handler - handler function
* @param {object} [context] - context for handler
* @returns {HandlerItem} HandlerItem object
* @private
*/
CustomEvents.prototype._getHandlerItem = function(handler, context) {
var item = {handler: handler};
if (context) {
item.context = context;
}
return item;
};
/**
* Get event object safely
* @param {string} [eventName] - create sub event map if not exist.
* @returns {(object|array)} event object. if you supplied `eventName`
* parameter then make new array and return it
* @private
*/
CustomEvents.prototype._safeEvent = function(eventName) {
var events = this.events;
var byName;
if (!events) {
events = this.events = {};
}
if (eventName) {
byName = events[eventName];
if (!byName) {
byName = [];
events[eventName] = byName;
}
events = byName;
}
return events;
};
/**
* Get context array safely
* @returns {array} context array
* @private
*/
CustomEvents.prototype._safeContext = function() {
var context = this.contexts;
if (!context) {
context = this.contexts = [];
}
return context;
};
/**
* Get index of context
* @param {object} ctx - context that used for bind custom event
* @returns {number} index of context
* @private
*/
CustomEvents.prototype._indexOfContext = function(ctx) {
var context = this._safeContext();
var index = 0;
while (context[index]) {
if (ctx === context[index][0]) {
return index;
}
index += 1;
}
return -1;
};
/**
* Memorize supplied context for recognize supplied object is context or
* name: handler pair object when off()
* @param {object} ctx - context object to memorize
* @private
*/
CustomEvents.prototype._memorizeContext = function(ctx) {
var context, index;
if (!type.isExisty(ctx)) {
return;
}
context = this._safeContext();
index = this._indexOfContext(ctx);
if (index > -1) {
context[index][1] += 1;
} else {
context.push([ctx, 1]);
}
};
/**
* Forget supplied context object
* @param {object} ctx - context object to forget
* @private
*/
CustomEvents.prototype._forgetContext = function(ctx) {
var context, contextIndex;
if (!type.isExisty(ctx)) {
return;
}
context = this._safeContext();
contextIndex = this._indexOfContext(ctx);
if (contextIndex > -1) {
context[contextIndex][1] -= 1;
if (context[contextIndex][1] <= 0) {
context.splice(contextIndex, 1);
}
}
};
/**
* Bind event handler
* @param {(string|{name:string, handler:function})} eventName - custom
* event name or an object {eventName: handler}
* @param {(function|object)} [handler] - handler function or context
* @param {object} [context] - context for binding
* @private
*/
CustomEvents.prototype._bindEvent = function(eventName, handler, context) {
var events = this._safeEvent(eventName);
this._memorizeContext(context);
events.push(this._getHandlerItem(handler, context));
};
/**
* Bind event handlers
* @param {(string|{name:string, handler:function})} eventName - custom
* event name or an object {eventName: handler}
* @param {(function|object)} [handler] - handler function or context
* @param {object} [context] - context for binding
* //-- #1. Get Module --//
* var CustomEvents = require('tui-code-snippet').CustomEvents; // node, commonjs
* var CustomEvents = tui.util.CustomEvents; // distribution file
*
* //-- #2. Use property --//
* // # 2.1 Basic Usage
* CustomEvents.on('onload', handler);
*
* // # 2.2 With context
* CustomEvents.on('onload', handler, myObj);
*
* // # 2.3 Bind by object that name, handler pairs
* CustomEvents.on({
* 'play': handler,
* 'pause': handler2
* });
*
* // # 2.4 Bind by object that name, handler pairs with context object
* CustomEvents.on({
* 'play': handler
* }, myObj);
*/
CustomEvents.prototype.on = function(eventName, handler, context) {
var self = this;
if (type.isString(eventName)) {
// [syntax 1, 2]
eventName = eventName.split(R_EVENTNAME_SPLIT);
collection.forEach(eventName, function(name) {
self._bindEvent(name, handler, context);
});
} else if (type.isObject(eventName)) {
// [syntax 3, 4]
context = handler;
collection.forEach(eventName, function(func, name) {
self.on(name, func, context);
});
}
};
/**
* Bind one-shot event handlers
* @param {(string|{name:string,handler:function})} eventName - custom
* event name or an object {eventName: handler}
* @param {function|object} [handler] - handler function or context
* @param {object} [context] - context for binding
*/
CustomEvents.prototype.once = function(eventName, handler, context) {
var self = this;
if (type.isObject(eventName)) {
context = handler;
collection.forEach(eventName, function(func, name) {
self.once(name, func, context);
});
return;
}
function onceHandler() { // eslint-disable-line require-jsdoc
handler.apply(context, arguments);
self.off(eventName, onceHandler, context);
}
this.on(eventName, onceHandler, context);
};
/**
* Splice supplied array by callback result
* @param {array} arr - array to splice
* @param {function} predicate - function return boolean
* @private
*/
CustomEvents.prototype._spliceMatches = function(arr, predicate) {
var i = 0;
var len;
if (!type.isArray(arr)) {
return;
}
for (len = arr.length; i < len; i += 1) {
if (predicate(arr[i]) === true) {
arr.splice(i, 1);
len -= 1;
i -= 1;
}
}
};
/**
* Get matcher for unbind specific handler events
* @param {function} handler - handler function
* @returns {function} handler matcher
* @private
*/
CustomEvents.prototype._matchHandler = function(handler) {
var self = this;
return function(item) {
var needRemove = handler === item.handler;
if (needRemove) {
self._forgetContext(item.context);
}
return needRemove;
};
};
/**
* Get matcher for unbind specific context events
* @param {object} context - context
* @returns {function} object matcher
* @private
*/
CustomEvents.prototype._matchContext = function(context) {
var self = this;
return function(item) {
var needRemove = context === item.context;
if (needRemove) {
self._forgetContext(item.context);
}
return needRemove;
};
};
/**
* Get matcher for unbind specific hander, context pair events
* @param {function} handler - handler function
* @param {object} context - context
* @returns {function} handler, context matcher
* @private
*/
CustomEvents.prototype._matchHandlerAndContext = function(handler, context) {
var self = this;
return function(item) {
var matchHandler = (handler === item.handler);
var matchContext = (context === item.context);
var needRemove = (matchHandler && matchContext);
if (needRemove) {
self._forgetContext(item.context);
}
return needRemove;
};
};
/**
* Unbind event by event name
* @param {string} eventName - custom event name to unbind
* @param {function} [handler] - handler function
* @private
*/
CustomEvents.prototype._offByEventName = function(eventName, handler) {
var self = this;
var forEach = collection.forEachArray;
var andByHandler = type.isFunction(handler);
var matchHandler = self._matchHandler(handler);
eventName = eventName.split(R_EVENTNAME_SPLIT);
forEach(eventName, function(name) {
var handlerItems = self._safeEvent(name);
if (andByHandler) {
self._spliceMatches(handlerItems, matchHandler);
} else {
forEach(handlerItems, function(item) {
self._forgetContext(item.context);
});
self.events[name] = [];
}
});
};
/**
* Unbind event by handler function
* @param {function} handler - handler function
* @private
*/
CustomEvents.prototype._offByHandler = function(handler) {
var self = this;
var matchHandler = this._matchHandler(handler);
collection.forEach(this._safeEvent(), function(handlerItems) {
self._spliceMatches(handlerItems, matchHandler);
});
};
/**
* Unbind event by object(name: handler pair object or context object)
* @param {object} obj - context or {name: handler} pair object
* @param {function} handler - handler function
* @private
*/
CustomEvents.prototype._offByObject = function(obj, handler) {
var self = this;
var matchFunc;
if (this._indexOfContext(obj) < 0) {
collection.forEach(obj, function(func, name) {
self.off(name, func);
});
} else if (type.isString(handler)) {
matchFunc = this._matchContext(obj);
self._spliceMatches(this._safeEvent(handler), matchFunc);
} else if (type.isFunction(handler)) {
matchFunc = this._matchHandlerAndContext(handler, obj);
collection.forEach(this._safeEvent(), function(handlerItems) {
self._spliceMatches(handlerItems, matchFunc);
});
} else {
matchFunc = this._matchContext(obj);
collection.forEach(this._safeEvent(), function(handlerItems) {
self._spliceMatches(handlerItems, matchFunc);
});
}
};
/**
* Unbind custom events
* @param {(string|object|function)} eventName - event name or context or
* {name: handler} pair object or handler function
* @param {(function)} handler - handler function
* @example
* //-- #1. Get Module --//
* var CustomEvents = require('tui-code-snippet').CustomEvents; // node, commonjs
* var CustomEvents = tui.util.CustomEvents; // distribution file
*
* //-- #2. Use property --//
* // # 2.1 off by event name
* CustomEvents.off('onload');
*
* // # 2.2 off by event name and handler
* CustomEvents.off('play', handler);
*
* // # 2.3 off by handler
* CustomEvents.off(handler);
*
* // # 2.4 off by context
* CustomEvents.off(myObj);
*
* // # 2.5 off by context and handler
* CustomEvents.off(myObj, handler);
*
* // # 2.6 off by context and event name
* CustomEvents.off(myObj, 'onload');
*
* // # 2.7 off by an Object.<string, function> that is {eventName: handler}
* CustomEvents.off({
* 'play': handler,
* 'pause': handler2
* });
*
* // # 2.8 off the all events
* CustomEvents.off();
*/
CustomEvents.prototype.off = function(eventName, handler) {
if (type.isString(eventName)) {
// [syntax 1, 2]
this._offByEventName(eventName, handler);
} else if (!arguments.length) {
// [syntax 8]
this.events = {};
this.contexts = [];
} else if (type.isFunction(eventName)) {
// [syntax 3]
this._offByHandler(eventName);
} else if (type.isObject(eventName)) {
// [syntax 4, 5, 6]
this._offByObject(eventName, handler);
}
};
/**
* Fire custom event
* @param {string} eventName - name of custom event
*/
CustomEvents.prototype.fire = function(eventName) { // eslint-disable-line
this.invoke.apply(this, arguments);
};
/**
* Fire a event and returns the result of operation 'boolean AND' with all
* listener's results.
*
* So, It is different from {@link CustomEvents#fire}.
*
* In service code, use this as a before event in component level usually
* for notifying that the event is cancelable.
* @param {string} eventName - Custom event name
* @param {...*} data - Data for event
* @returns {boolean} The result of operation 'boolean AND'
* @example
* var map = new Map();
* map.on({
* 'beforeZoom': function() {
* // It should cancel the 'zoom' event by some conditions.
* if (that.disabled && this.getState()) {
* return false;
* }
* return true;
* }
* });
*
* if (this.invoke('beforeZoom')) { // check the result of 'beforeZoom'
* // if true,
* // doSomething
* }
*/
CustomEvents.prototype.invoke = function(eventName) {
var events, args, index, item;
if (!this.hasListener(eventName)) {
return true;
}
events = this._safeEvent(eventName);
args = Array.prototype.slice.call(arguments, 1);
index = 0;
while (events[index]) {
item = events[index];
if (item.handler.apply(item.context, args) === false) {
return false;
}
index += 1;
}
return true;
};
/**
* Return whether at least one of the handlers is registered in the given
* event name.
* @param {string} eventName - Custom event name
* @returns {boolean} Is there at least one handler in event name?
*/
CustomEvents.prototype.hasListener = function(eventName) {
return this.getListenerLength(eventName) > 0;
};
/**
* Return a count of events registered.
* @param {string} eventName - Custom event name
* @returns {number} number of event
*/
CustomEvents.prototype.getListenerLength = function(eventName) {
var events = this._safeEvent(eventName);
return events.length;
};
module.exports = CustomEvents;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module provides a Enum Constructor.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
* @example
* // node, commonjs
* var Enum = require('tui-code-snippet').Enum;
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var Enum = tui.util.Enum;
* <script>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
/**
* Check whether the defineProperty() method is supported.
* @type {boolean}
* @ignore
*/
var isSupportDefinedProperty = (function() {
try {
Object.defineProperty({}, 'x', {});
return true;
} catch (e) {
return false;
}
})();
/**
* A unique value of a constant.
* @type {number}
* @ignore
*/
var enumValue = 0;
/**
* Make a constant-list that has unique values.<br>
* In modern browsers (except IE8 and lower),<br>
* a value defined once can not be changed.
*
* @param {...string|string[]} itemList Constant-list (An array of string is available)
* @class
* @memberof tui.util
* @example
* //-- #1. Get Module --//
* var Enum = require('tui-code-snippet').Enum; // node, commonjs
* var Enum = tui.util.Enum; // distribution file
*
* //-- #2. Use property --//
* var MYENUM = new Enum('TYPE1', 'TYPE2');
* var MYENUM2 = new Enum(['TYPE1', 'TYPE2']);
*
* //usage
* if (value === MYENUM.TYPE1) {
* ....
* }
*
* //add (If a duplicate name is inputted, will be disregarded.)
* MYENUM.set('TYPE3', 'TYPE4');
*
* //get name of a constant by a value
* MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'
*
* // In modern browsers (except IE8 and lower), a value can not be changed in constants.
* var originalValue = MYENUM.TYPE1;
* MYENUM.TYPE1 = 1234; // maybe TypeError
* MYENUM.TYPE1 === originalValue; // true
**/
function Enum(itemList) {
if (itemList) {
this.set.apply(this, arguments);
}
}
/**
* Define a constants-list
* @param {...string|string[]} itemList Constant-list (An array of string is available)
*/
Enum.prototype.set = function(itemList) {
var self = this;
if (!type.isArray(itemList)) {
itemList = collection.toArray(arguments);
}
collection.forEach(itemList, function itemListIteratee(item) {
self._addItem(item);
});
};
/**
* Return a key of the constant.
* @param {number} value A value of the constant.
* @returns {string|undefined} Key of the constant.
*/
Enum.prototype.getName = function(value) {
var self = this;
var foundedKey;
collection.forEach(this, function(itemValue, key) { // eslint-disable-line consistent-return
if (self._isEnumItem(key) && value === itemValue) {
foundedKey = key;
return false;
}
});
return foundedKey;
};
/**
* Create a constant.
* @private
* @param {string} name Constant name. (It will be a key of a constant)
*/
Enum.prototype._addItem = function(name) {
var value;
if (!this.hasOwnProperty(name)) {
value = this._makeEnumValue();
if (isSupportDefinedProperty) {
Object.defineProperty(this, name, {
enumerable: true,
configurable: false,
writable: false,
value: value
});
} else {
this[name] = value;
}
}
};
/**
* Return a unique value for assigning to a constant.
* @private
* @returns {number} A unique value
*/
Enum.prototype._makeEnumValue = function() {
var value;
value = enumValue;
enumValue += 1;
return value;
};
/**
* Return whether a constant from the given key is in instance or not.
* @param {string} key - A constant key
* @returns {boolean} Result
* @private
*/
Enum.prototype._isEnumItem = function(key) {
return type.isNumber(this[key]);
};
module.exports = Enum;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview
* Implements the ExMap (Extended Map) object.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var Map = __webpack_require__(19);
// Caching tui.util for performance enhancing
var mapAPIsForRead = ['get', 'has', 'forEach', 'keys', 'values', 'entries'];
var mapAPIsForDelete = ['delete', 'clear'];
/**
* The ExMap object is Extended Version of the tui.util.Map object.<br>
* and added some useful feature to make it easy to manage the Map object.
* @constructor
* @param {Array} initData - Array of key-value pairs (2-element Arrays).
* Each key-value pair will be added to the new Map
* @memberof tui.util
* @example
* // node, commonjs
* var ExMap = require('tui-code-snippet').ExMap;
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var ExMap = tui.util.ExMap;
* <script>
*/
function ExMap(initData) {
this._map = new Map(initData);
this.size = this._map.size;
}
collection.forEachArray(mapAPIsForRead, function(name) {
ExMap.prototype[name] = function() {
return this._map[name].apply(this._map, arguments);
};
});
collection.forEachArray(mapAPIsForDelete, function(name) {
ExMap.prototype[name] = function() {
var result = this._map[name].apply(this._map, arguments);
this.size = this._map.size;
return result;
};
});
ExMap.prototype.set = function() {
this._map.set.apply(this._map, arguments);
this.size = this._map.size;
return this;
};
/**
* Sets all of the key-value pairs in the specified object to the Map object.
* @param {Object} object - Plain object that has a key-value pair
*/
ExMap.prototype.setObject = function(object) {
collection.forEachOwnProperties(object, function(value, key) {
this.set(key, value);
}, this);
};
/**
* Removes the elements associated with keys in the specified array.
* @param {Array} keys - Array that contains keys of the element to remove
*/
ExMap.prototype.deleteByKeys = function(keys) {
collection.forEachArray(keys, function(key) {
this['delete'](key);
}, this);
};
/**
* Sets all of the key-value pairs in the specified Map object to this Map object.
* @param {Map} map - Map object to be merged into this Map object
*/
ExMap.prototype.merge = function(map) {
map.forEach(function(value, key) {
this.set(key, value);
}, this);
};
/**
* Looks through each key-value pair in the map and returns the new ExMap object of
* all key-value pairs that pass a truth test implemented by the provided function.
* @param {function} predicate - Function to test each key-value pair of the Map object.<br>
* Invoked with arguments (value, key). Return true to keep the element, false otherwise.
* @returns {ExMap} A new ExMap object
*/
ExMap.prototype.filter = function(predicate) {
var filtered = new ExMap();
this.forEach(function(value, key) {
if (predicate(value, key)) {
filtered.set(key, value);
}
});
return filtered;
};
module.exports = ExMap;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview
* Implements the Map object.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
var array = __webpack_require__(3);
var browser = __webpack_require__(10);
var func = __webpack_require__(5);
/**
* Using undefined for a key can be ambiguous if there's deleted item in the array,<br>
* which is also undefined when accessed by index.<br>
* So use this unique object as an undefined key to distinguish it from deleted keys.
* @private
* @constant
*/
var _KEY_FOR_UNDEFINED = {};
/**
* For using NaN as a key, use this unique object as a NaN key.<br>
* This makes it easier and faster to compare an object with each keys in the array<br>
* through no exceptional comapring for NaN.
* @private
* @constant
*/
var _KEY_FOR_NAN = {};
/**
* Constructor of MapIterator<br>
* Creates iterator object with new keyword.
* @constructor
* @param {Array} keys - The array of keys in the map
* @param {function} valueGetter - Function that returns certain value,
* taking key and keyIndex as arguments.
* @ignore
*/
function MapIterator(keys, valueGetter) {
this._keys = keys;
this._valueGetter = valueGetter;
this._length = this._keys.length;
this._index = -1;
this._done = false;
}
/**
* Implementation of Iterator protocol.
* @returns {{done: boolean, value: *}} Object that contains done(boolean) and value.
*/
MapIterator.prototype.next = function() {
var data = {};
do {
this._index += 1;
} while (type.isUndefined(this._keys[this._index]) && this._index < this._length);
if (this._index >= this._length) {
data.done = true;
} else {
data.done = false;
data.value = this._valueGetter(this._keys[this._index], this._index);
}
return data;
};
/**
* The Map object implements the ES6 Map specification as closely as possible.<br>
* For using objects and primitive values as keys, this object uses array internally.<br>
* So if the key is not a string, get(), set(), has(), delete() will operates in O(n),<br>
* and it can cause performance issues with a large dataset.
*
* Features listed below are not supported. (can't be implented without native support)
* - Map object is iterable<br>
* - Iterable object can be used as an argument of constructor
*
* If the browser supports full implementation of ES6 Map specification, native Map obejct
* will be used internally.
* @class
* @param {Array} initData - Array of key-value pairs (2-element Arrays).
* Each key-value pair will be added to the new Map
* @memberof tui.util
* @example
* // node, commonjs
* var Map = require('tui-code-snippet').Map;
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var Map = tui.util.Map;
* <script>
*/
function Map(initData) {
this._valuesForString = {};
this._valuesForIndex = {};
this._keys = [];
if (initData) {
this._setInitData(initData);
}
this.size = 0;
}
/* eslint-disable no-extend-native */
/**
* Add all elements in the initData to the Map object.
* @private
* @param {Array} initData - Array of key-value pairs to add to the Map object
*/
Map.prototype._setInitData = function(initData) {
if (!type.isArray(initData)) {
throw new Error('Only Array is supported.');
}
collection.forEachArray(initData, function(pair) {
this.set(pair[0], pair[1]);
}, this);
};
/**
* Returns true if the specified value is NaN.<br>
* For unsing NaN as a key, use this method to test equality of NaN<br>
* because === operator doesn't work for NaN.
* @private
* @param {*} value - Any object to be tested
* @returns {boolean} True if value is NaN, false otherwise.
*/
Map.prototype._isNaN = function(value) {
return typeof value === 'number' && value !== value; // eslint-disable-line no-self-compare
};
/**
* Returns the index of the specified key.
* @private
* @param {*} key - The key object to search for.
* @returns {number} The index of the specified key
*/
Map.prototype._getKeyIndex = function(key) {
var result = -1;
var value;
if (type.isString(key)) {
value = this._valuesForString[key];
if (value) {
result = value.keyIndex;
}
} else {
result = array.inArray(key, this._keys);
}
return result;
};
/**
* Returns the original key of the specified key.
* @private
* @param {*} key - key
* @returns {*} Original key
*/
Map.prototype._getOriginKey = function(key) {
var originKey = key;
if (key === _KEY_FOR_UNDEFINED) {
originKey = undefined; // eslint-disable-line no-undefined
} else if (key === _KEY_FOR_NAN) {
originKey = NaN;
}
return originKey;
};
/**
* Returns the unique key of the specified key.
* @private
* @param {*} key - key
* @returns {*} Unique key
*/
Map.prototype._getUniqueKey = function(key) {
var uniqueKey = key;
if (type.isUndefined(key)) {
uniqueKey = _KEY_FOR_UNDEFINED;
} else if (this._isNaN(key)) {
uniqueKey = _KEY_FOR_NAN;
}
return uniqueKey;
};
/**
* Returns the value object of the specified key.
* @private
* @param {*} key - The key of the value object to be returned
* @param {number} keyIndex - The index of the key
* @returns {{keyIndex: number, origin: *}} Value object
*/
Map.prototype._getValueObject = function(key, keyIndex) { // eslint-disable-line consistent-return
if (type.isString(key)) {
return this._valuesForString[key];
}
if (type.isUndefined(keyIndex)) {
keyIndex = this._getKeyIndex(key);
}
if (keyIndex >= 0) {
return this._valuesForIndex[keyIndex];
}
};
/**
* Returns the original value of the specified key.
* @private
* @param {*} key - The key of the value object to be returned
* @param {number} keyIndex - The index of the key
* @returns {*} Original value
*/
Map.prototype._getOriginValue = function(key, keyIndex) {
return this._getValueObject(key, keyIndex).origin;
};
/**
* Returns key-value pair of the specified key.
* @private
* @param {*} key - The key of the value object to be returned
* @param {number} keyIndex - The index of the key
* @returns {Array} Key-value Pair
*/
Map.prototype._getKeyValuePair = function(key, keyIndex) {
return [this._getOriginKey(key), this._getOriginValue(key, keyIndex)];
};
/**
* Creates the wrapper object of original value that contains a key index
* and returns it.
* @private
* @param {type} origin - Original value
* @param {type} keyIndex - Index of the key
* @returns {{keyIndex: number, origin: *}} Value object
*/
Map.prototype._createValueObject = function(origin, keyIndex) {
return {
keyIndex: keyIndex,
origin: origin
};
};
/**
* Sets the value for the key in the Map object.
* @param {*} key - The key of the element to add to the Map object
* @param {*} value - The value of the element to add to the Map object
* @returns {Map} The Map object
*/
Map.prototype.set = function(key, value) {
var uniqueKey = this._getUniqueKey(key);
var keyIndex = this._getKeyIndex(uniqueKey);
var valueObject;
if (keyIndex < 0) {
keyIndex = this._keys.push(uniqueKey) - 1;
this.size += 1;
}
valueObject = this._createValueObject(value, keyIndex);
if (type.isString(key)) {
this._valuesForString[key] = valueObject;
} else {
this._valuesForIndex[keyIndex] = valueObject;
}
return this;
};
/**
* Returns the value associated to the key, or undefined if there is none.
* @param {*} key - The key of the element to return
* @returns {*} Element associated with the specified key
*/
Map.prototype.get = function(key) {
var uniqueKey = this._getUniqueKey(key);
var value = this._getValueObject(uniqueKey);
return value && value.origin;
};
/**
* Returns a new Iterator object that contains the keys for each element
* in the Map object in insertion order.
* @returns {Iterator} A new Iterator object
*/
Map.prototype.keys = function() {
return new MapIterator(this._keys, func.bind(this._getOriginKey, this));
};
/**
* Returns a new Iterator object that contains the values for each element
* in the Map object in insertion order.
* @returns {Iterator} A new Iterator object
*/
Map.prototype.values = function() {
return new MapIterator(this._keys, func.bind(this._getOriginValue, this));
};
/**
* Returns a new Iterator object that contains the [key, value] pairs
* for each element in the Map object in insertion order.
* @returns {Iterator} A new Iterator object
*/
Map.prototype.entries = function() {
return new MapIterator(this._keys, func.bind(this._getKeyValuePair, this));
};
/**
* Returns a boolean asserting whether a value has been associated to the key
* in the Map object or not.
* @param {*} key - The key of the element to test for presence
* @returns {boolean} True if an element with the specified key exists;
* Otherwise false
*/
Map.prototype.has = function(key) {
return !!this._getValueObject(key);
};
/**
* Removes the specified element from a Map object.
* @param {*} key - The key of the element to remove
* @function delete
* @memberof tui.util.Map.prototype
*/
// cannot use reserved keyword as a property name in IE8 and under.
Map.prototype['delete'] = function(key) {
var keyIndex;
if (type.isString(key)) {
if (this._valuesForString[key]) {
keyIndex = this._valuesForString[key].keyIndex;
delete this._valuesForString[key];
}
} else {
keyIndex = this._getKeyIndex(key);
if (keyIndex >= 0) {
delete this._valuesForIndex[keyIndex];
}
}
if (keyIndex >= 0) {
delete this._keys[keyIndex];
this.size -= 1;
}
};
/**
* Executes a provided function once per each key/value pair in the Map object,
* in insertion order.
* @param {function} callback - Function to execute for each element
* @param {thisArg} thisArg - Value to use as this when executing callback
*/
Map.prototype.forEach = function(callback, thisArg) {
thisArg = thisArg || this;
collection.forEachArray(this._keys, function(key) {
if (!type.isUndefined(key)) {
callback.call(thisArg, this._getValueObject(key).origin, key, this);
}
}, this);
};
/**
* Removes all elements from a Map object.
*/
Map.prototype.clear = function() {
Map.call(this);
};
/* eslint-enable no-extend-native */
// Use native Map object if exists.
// But only latest versions of Chrome and Firefox support full implementation.
(function() {
if (window.Map && (
(browser.firefox && browser.version >= 37) ||
(browser.chrome && browser.version >= 42)
)
) {
Map = window.Map; // eslint-disable-line no-func-assign
}
})();
module.exports = Map;
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @fileoverview This module provides the HashMap constructor.
* @author NHN Ent.
* FE Development Lab <dl_javascript@nhnent.com>
*/
'use strict';
var collection = __webpack_require__(4);
var type = __webpack_require__(2);
/**
* All the data in hashMap begin with _MAPDATAPREFIX;
* @type {string}
* @private
*/
var _MAPDATAPREFIX = 'å';
/**
* HashMap can handle the key-value pairs.<br>
* Caution:<br>
* HashMap instance has a length property but is not an instance of Array.
* @param {Object} [obj] A initial data for creation.
* @constructor
* @memberof tui.util
* @deprecated since version 1.3.0
* @example
* // node, commonjs
* var HashMap = require('tui-code-snippet').HashMap;
* var hm = new tui.util.HashMap({
'mydata': {
'hello': 'imfine'
},
'what': 'time'
});
* @example
* // distribution file, script
* <script src='path-to/tui-code-snippt.js'></script>
* <script>
* var HashMap = tui.util.HashMap;
* <script>
* var hm = new tui.util.HashMap({
'mydata': {
'hello': 'imfine'
},
'what': 'time'
});
*/
function HashMap(obj) {
/**
* size
* @type {number}
*/
this.length = 0;
if (obj) {
this.setObject(obj);
}
}
/**
* Set a data from the given key with value or the given object.
* @param {string|Object} key A string or object for key
* @param {*} [value] A data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.set({
* 'key1': 'data1',
* 'key2': 'data2'
* });
*/
HashMap.prototype.set = function(key, value) {
if (arguments.length === 2) {
this.setKeyValue(key, value);
} else {
this.setObject(key);
}
};
/**
* Set a data from the given key with value.
* @param {string} key A string for key
* @param {*} value A data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.setKeyValue('key', 'value');
*/
HashMap.prototype.setKeyValue = function(key, value) {
if (!this.has(key)) {
this.length += 1;
}
this[this.encodeKey(key)] = value;
};
/**
* Set a data from the given object.
* @param {Object} obj A object for data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.setObject({
* 'key1': 'data1',
* 'key2': 'data2'
* });
*/
HashMap.prototype.setObject = function(obj) {
var self = this;
collection.forEachOwnProperties(obj, function(value, key) {
self.setKeyValue(key, value);
});
};
/**
* Merge with the given another hashMap.
* @param {HashMap} hashMap Another hashMap instance
*/
HashMap.prototype.merge = function(hashMap) {
var self = this;
hashMap.each(function(value, key) {
self.setKeyValue(key, value);
});
};
/**
* Encode the given key for hashMap.
* @param {string} key A string for key
* @returns {string} A encoded key
* @private
*/
HashMap.prototype.encodeKey = function(key) {
return _MAPDATAPREFIX + key;
};
/**
* Decode the given key in hashMap.
* @param {string} key A string for key
* @returns {string} A decoded key
* @private
*/
HashMap.prototype.decodeKey = function(key) {
var decodedKey = key.split(_MAPDATAPREFIX);
return decodedKey[decodedKey.length - 1];
};
/**
* Return the value from the given key.
* @param {string} key A string for key
* @returns {*} The value from a key
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.get('key') // value
*/
HashMap.prototype.get = function(key) {
return this[this.encodeKey(key)];
};
/**
* Check the existence of a value from the key.
* @param {string} key A string for key
* @returns {boolean} Indicating whether a value exists or not.
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.has('key') // true
*/
HashMap.prototype.has = function(key) {
return this.hasOwnProperty(this.encodeKey(key));
};
/**
* Remove a data(key-value pairs) from the given key or the given key-list.
* @param {...string|string[]} key A string for key
* @returns {string|string[]} A removed data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.set('key2', 'value');
*
* hm.remove('key');
* hm.remove('key', 'key2');
* hm.remove(['key', 'key2']);
*/
HashMap.prototype.remove = function(key) {
if (arguments.length > 1) {
key = collection.toArray(arguments);
}
return type.isArray(key) ? this.removeByKeyArray(key) : this.removeByKey(key);
};
/**
* Remove data(key-value pair) from the given key.
* @param {string} key A string for key
* @returns {*|null} A removed data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.removeByKey('key')
*/
HashMap.prototype.removeByKey = function(key) {
var data = this.has(key) ? this.get(key) : null;
if (data !== null) {
delete this[this.encodeKey(key)];
this.length -= 1;
}
return data;
};
/**
* Remove a data(key-value pairs) from the given key-list.
* @param {string[]} keyArray An array of keys
* @returns {string[]} A removed data
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.set('key2', 'value');
* hm.removeByKeyArray(['key', 'key2']);
*/
HashMap.prototype.removeByKeyArray = function(keyArray) {
var data = [];
var self = this;
collection.forEach(keyArray, function(key) {
data.push(self.removeByKey(key));
});
return data;
};
/**
* Remove all the data
*/
HashMap.prototype.removeAll = function() {
var self = this;
this.each(function(value, key) {
self.remove(key);
});
};
/**
* Execute the provided callback once for each all the data.
* @param {Function} iteratee Callback function
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.set('key2', 'value');
*
* hm.each(function(value, key) {
* //do something...
* });
*/
HashMap.prototype.each = function(iteratee) {
var self = this;
var flag;
collection.forEachOwnProperties(this, function(value, key) { // eslint-disable-line consistent-return
if (key.charAt(0) === _MAPDATAPREFIX) {
flag = iteratee(value, self.decodeKey(key));
}
if (flag === false) {
return flag;
}
});
};
/**
* Return the key-list stored.
* @returns {Array} A key-list
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm = new HashMap();
* hm.set('key', 'value');
* hm.set('key2', 'value');
* hm.keys(); //['key', 'key2');
*/
HashMap.prototype.keys = function() {
var keys = [];
var self = this;
this.each(function(value, key) {
keys.push(self.decodeKey(key));
});
return keys;
};
/**
* Work similarly to Array.prototype.map().<br>
* It executes the provided callback that checks conditions once for each element of hashMap,<br>
* and returns a new array having elements satisfying the conditions
* @param {Function} condition A function that checks conditions
* @returns {Array} A new array having elements satisfying the conditions
* @example
* //-- #1. Get Module --//
* var HashMap = require('tui-code-snippet').HashMap; // node, commonjs
* var HashMap = tui.util.HashMap; // distribution file
*
* //-- #2. Use property --//
* var hm1 = new HashMap();
* hm1.set('key', 'value');
* hm1.set('key2', 'value');
*
* hm1.find(function(value, key) {
* return key === 'key2';
* }); // ['value']
*
* var hm2 = new HashMap({
* 'myobj1': {
* visible: true
* },
* 'mybobj2': {
* visible: false
* }
* });
*
* hm2.find(function(obj, key) {
* return obj.visible === true;
* }); // [{visible: true}];
*/
HashMap.prototype.find = function(condition) {
var founds = [];
this.each(function(value, key) {
if (condition(value, key)) {
founds.push(value);
}
});
return founds;
};
/**
* Return a new Array having all values.
* @returns {Array} A new array having all values
*/
HashMap.prototype.toArray = function() {
var result = [];
this.each(function(v) {
result.push(v);
});
return result;
};
module.exports = HashMap;
/***/ })
/******/ ])
});
;
/***/ }),
/* 3 */
/***/ (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; }; }(); /**
* @fileoverview Implements CommandManager
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
var _command = __webpack_require__(34);
var _command2 = _interopRequireDefault(_command);
var _util = __webpack_require__(26);
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 KEYMAP_OS_INDEX = _util.isMac ? 1 : 0;
/**
* Class CommandManager
*/
var CommandManager = function () {
/**
* @param {ToastUIEditor} base nedInstance
* @param {object} [options={}] - option object
* @param {boolean} [options.useCommandShortcut=true] - execute command with keyMap
*/
function CommandManager(base) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, CommandManager);
this._command = new _tuiCodeSnippet2.default.Map();
this._mdCommand = new _tuiCodeSnippet2.default.Map();
this._wwCommand = new _tuiCodeSnippet2.default.Map();
this._options = _jquery2.default.extend({
'useCommandShortcut': true
}, options);
this.base = base;
this.keyMapCommand = {};
this._initEvent();
}
/**
* You can change command before command addition by addCommandBefore event.
* @param {object} command - command
* @returns {object}
* @private
*/
_createClass(CommandManager, [{
key: '_addCommandBefore',
value: function _addCommandBefore(command) {
var commandWrapper = { command: command };
this.base.eventManager.emit('addCommandBefore', commandWrapper);
return commandWrapper.command || command;
}
/**
* Add command
* @memberof CommandManager
* @param {Command} command Command instance
* @returns {Command} Command
*/
}, {
key: 'addCommand',
value: function addCommand(command) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
if (args.length) {
command = CommandManager.command.apply(CommandManager, [command].concat(args));
}
command = this._addCommandBefore(command);
var name = command.getName();
var commandBase = void 0;
if (command.isMDType()) {
commandBase = this._mdCommand;
} else if (command.isWWType()) {
commandBase = this._wwCommand;
} else if (command.isGlobalType()) {
commandBase = this._command;
}
commandBase.set(name, command);
if (command.keyMap) {
this.keyMapCommand[command.keyMap[KEYMAP_OS_INDEX]] = name;
}
return command;
}
/**
* _initEvent
* Bind event handler to eventManager
* @private
* @memberof CommandManager
*/
}, {
key: '_initEvent',
value: function _initEvent() {
var _this = this;
this.base.eventManager.listen('command', function () {
_this.exec.apply(_this, arguments);
});
this.base.eventManager.listen('keyMap', function (ev) {
if (!_this._options.useCommandShortcut) {
return;
}
var command = _this.keyMapCommand[ev.keyMap];
if (command) {
ev.data.preventDefault();
_this.exec(command);
}
});
}
/**
* Execute command
* @memberof CommandManager
* @param {String} name Command name
* @param {*} ...args Command argument
* @returns {*}
*/
}, {
key: 'exec',
value: function exec(name) {
var commandToRun = void 0,
result = void 0;
var context = this.base;
commandToRun = this._command.get(name);
if (!commandToRun) {
if (this.base.isMarkdownMode()) {
commandToRun = this._mdCommand.get(name);
context = this.base.mdEditor;
} else {
commandToRun = this._wwCommand.get(name);
context = this.base.wwEditor;
}
}
if (commandToRun) {
var _commandToRun;
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
args.unshift(context);
result = (_commandToRun = commandToRun).exec.apply(_commandToRun, args);
}
return result;
}
}]);
return CommandManager;
}();
/**
* Create command by given editor type and property object
* @memberof CommandManager
* @param {string} type Command type
* @param {{name: string, keyMap: Array}} props Property
* @returns {*}
*/
CommandManager.command = function (type, props) {
var command = _command2.default.factory(type, props.name, props.keyMap);
_tuiCodeSnippet2.default.extend(command, props);
return command;
};
exports.default = CommandManager;
/***/ }),
/* 4 */,
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @fileoverview DOM Utils
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var FIND_ZWB = /\u200B/g;
/**
* isTextNode
* Check if node is text node
* @param {Node} node node to check
* @returns {boolean} result
* @ignore
*/
var isTextNode = function isTextNode(node) {
return node && node.nodeType === Node.TEXT_NODE;
};
/**
* isElemNode
* Check if node is element node
* @param {Node} node node to check
* @returns {boolean} result
* @ignore
*/
var isElemNode = function isElemNode(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
};
/**
* Check that the node is block node
* @param {Node} node node
* @returns {boolean}
* @ignore
*/
var isBlockNode = function isBlockNode(node) {
return (/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|DETAILS|DIALOG|DD|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[\d]|HEADER|HGROUP|HR|LI|MAIN|NAV|OL|P|PRE|SECTION|UL)$/ig.test(this.getNodeName(node))
);
};
/**
* getNodeName
* Get node name of node
* @param {Node} node node
* @returns {string} node name
* @ignore
*/
var getNodeName = function getNodeName(node) {
if (isElemNode(node)) {
return node.tagName;
}
return 'TEXT';
};
/**
* getTextLength
* Get node offset length of node(for Range API)
* @param {Node} node node
* @returns {number} length
* @ignore
*/
var getTextLength = function getTextLength(node) {
var len = void 0;
if (isElemNode(node)) {
len = node.textContent.replace(FIND_ZWB, '').length;
} else if (isTextNode(node)) {
len = node.nodeValue.replace(FIND_ZWB, '').length;
}
return len;
};
/**
* getOffsetLength
* Get node offset length of node(for Range API)
* @param {Node} node node
* @returns {number} length
* @ignore
*/
var getOffsetLength = function getOffsetLength(node) {
var len = void 0;
if (isElemNode(node)) {
len = node.childNodes.length;
} else if (isTextNode(node)) {
len = node.nodeValue.replace(FIND_ZWB, '').length;
}
return len;
};
/**
* getNodeOffsetOfParent
* get node offset between parent's childnodes
* @param {Node} node node
* @returns {number} offset(index)
* @ignore
*/
var getNodeOffsetOfParent = function getNodeOffsetOfParent(node) {
var childNodesOfParent = node.parentNode.childNodes;
var i = void 0,
t = void 0,
found = void 0;
for (i = 0, t = childNodesOfParent.length; i < t; i += 1) {
if (childNodesOfParent[i] === node) {
found = i;
break;
}
}
return found;
};
/**
* getChildNodeByOffset
* get child node by offset
* @param {Node} node node
* @param {number} index offset index
* @returns {Node} foudned node
* @ignore
*/
var getChildNodeByOffset = function getChildNodeByOffset(node, index) {
var currentNode = void 0;
if (isTextNode(node)) {
currentNode = node;
} else if (node.childNodes.length && index >= 0) {
currentNode = node.childNodes[index];
}
return currentNode;
};
/**
* getNodeWithDirectionUntil
* find next node from passed node
* @param {strong} direction previous or next
* @param {Node} node node
* @param {string} untilNodeName parent node name to limit
* @returns {Node} founded node
* @ignore
*/
var getNodeWithDirectionUntil = function getNodeWithDirectionUntil(direction, node, untilNodeName) {
var directionKey = direction + 'Sibling';
var nodeName = void 0,
foundedNode = void 0;
while (node && !node[directionKey]) {
nodeName = getNodeName(node.parentNode);
if (nodeName === untilNodeName || nodeName === 'BODY') {
break;
}
node = node.parentNode;
}
if (node[directionKey]) {
foundedNode = node[directionKey];
}
return foundedNode;
};
/**
* getPrevOffsetNodeUntil
* get prev node of childnode pointed with index
* @param {Node} node node
* @param {number} index offset index
* @param {string} untilNodeName parent node name to limit
* @returns {Node} founded node
* @ignore
*/
var getPrevOffsetNodeUntil = function getPrevOffsetNodeUntil(node, index, untilNodeName) {
var prevNode = void 0;
if (index > 0) {
prevNode = getChildNodeByOffset(node, index - 1);
} else {
prevNode = getNodeWithDirectionUntil('previous', node, untilNodeName);
}
return prevNode;
};
var getParentUntilBy = function getParentUntilBy(node, matchCondition, stopCondition) {
var foundedNode = void 0;
while (node.parentNode && !matchCondition(node.parentNode)) {
node = node.parentNode;
if (stopCondition && stopCondition(node.parentNode)) {
break;
}
}
if (matchCondition(node.parentNode)) {
foundedNode = node;
}
return foundedNode;
};
/**
* getParentUntil
* get parent node until paseed node name
* @param {Node} node node
* @param {string|HTMLNode} untilNode node name or node to limit
* @returns {Node} founded node
* @ignore
*/
var getParentUntil = function getParentUntil(node, untilNode) {
var foundedNode = void 0;
if (_tuiCodeSnippet2.default.isString(untilNode)) {
foundedNode = getParentUntilBy(node, function (targetNode) {
return untilNode === getNodeName(targetNode);
});
} else {
foundedNode = getParentUntilBy(node, function (targetNode) {
return untilNode === targetNode;
});
}
return foundedNode;
};
/**
* getNodeWithDirectionUnderParent
* get node on the given direction under given parent
* @param {strong} direction previous or next
* @param {Node} node node
* @param {string|Node} underNode parent node name to limit
* @returns {Node} founded node
* @ignore
*/
var getNodeWithDirectionUnderParent = function getNodeWithDirectionUnderParent(direction, node, underNode) {
var directionKey = direction + 'Sibling';
var foundedNode = void 0;
node = getParentUntil(node, underNode);
if (node && node[directionKey]) {
foundedNode = node[directionKey];
}
return foundedNode;
};
/**
* getTopPrevNodeUnder
* get top previous top level node under given node
* @param {Node} node node
* @param {Node} underNode underNode
* @returns {Node} founded node
* @ignore
*/
var getTopPrevNodeUnder = function getTopPrevNodeUnder(node, underNode) {
return getNodeWithDirectionUnderParent('previous', node, underNode);
};
/**
* getNextTopBlockNode
* get next top level block node
* @param {Node} node node
* @param {Node} underNode underNode
* @returns {Node} founded node
* @ignore
*/
var getTopNextNodeUnder = function getTopNextNodeUnder(node, underNode) {
return getNodeWithDirectionUnderParent('next', node, underNode);
};
/**
* Get parent element the body element
* @param {Node} node Node for start searching
* @returns {Node}
* @ignore
*/
var getTopBlockNode = function getTopBlockNode(node) {
return getParentUntil(node, 'BODY');
};
/**
* Get previous text node
* @param {Node} node Node for start searching
* @returns {Node}
* @ignore
*/
var getPrevTextNode = function getPrevTextNode(node) {
node = node.previousSibling || node.parentNode;
while (!isTextNode(node) && getNodeName(node) !== 'BODY') {
if (node.previousSibling) {
node = node.previousSibling;
while (node.lastChild) {
node = node.lastChild;
}
} else {
node = node.parentNode;
}
}
if (getNodeName(node) === 'BODY') {
node = null;
}
return node;
};
/**
* test whether root contains the given node
* @param {HTMLNode} root - root node
* @param {HTMLNode} node - node to test
* @returns {Boolean} true if root contains node
*/
var containsNode = function containsNode(root, node) {
var walker = document.createTreeWalker(root, 4, null, false);
var found = root === node;
while (!found && walker.nextNode()) {
found = walker.currentNode === node;
}
return found;
};
/**
* find node by offset
* @param {HTMLElement} root Root element
* @param {Array.<number>} offsetList offset list
* @param {function} textNodeFilter Text node filter
* @returns {Array}
* @ignore
*/
var findOffsetNode = function findOffsetNode(root, offsetList, textNodeFilter) {
var result = [];
var text = '';
var walkerOffset = 0;
var newWalkerOffset = void 0;
if (!offsetList.length) {
return result;
}
var offset = offsetList.shift();
var walker = document.createTreeWalker(root, 4, null, false);
while (walker.nextNode()) {
text = walker.currentNode.nodeValue || '';
if (textNodeFilter) {
text = textNodeFilter(text);
}
newWalkerOffset = walkerOffset + text.length;
while (newWalkerOffset >= offset) {
result.push({
container: walker.currentNode,
offsetInContainer: offset - walkerOffset,
offset: offset
});
if (!offsetList.length) {
return result;
}
offset = offsetList.shift();
}
walkerOffset = newWalkerOffset;
}
// there should be offset left
do {
result.push({
container: walker.currentNode,
offsetInContainer: text.length,
offset: offset
});
offset = offsetList.shift();
} while (!_tuiCodeSnippet2.default.isUndefined(offset));
return result;
};
var getNodeInfo = function getNodeInfo(node) {
var path = {};
path.tagName = node.nodeName;
if (node.id) {
path.id = node.id;
}
var className = node.className.trim();
if (className) {
path.className = className;
}
return path;
};
var getPath = function getPath(node, root) {
var paths = [];
while (node && node !== root) {
if (isElemNode(node)) {
paths.unshift(getNodeInfo(node));
}
node = node.parentNode;
}
return paths;
};
/**
* Find next, previous TD or TH element by given TE element
* @param {HTMLElement} node TD element
* @param {string} direction 'next' or 'previous'
* @returns {HTMLElement|null}
* @ignore
*/
var getTableCellByDirection = function getTableCellByDirection(node, direction) {
var isForward = true;
var targetElement = null;
if (_tuiCodeSnippet2.default.isUndefined(direction) || direction !== 'next' && direction !== 'previous') {
return null;
} else if (direction === 'previous') {
isForward = false;
}
if (isForward) {
targetElement = node.nextElementSibling;
} else {
targetElement = node.previousElementSibling;
}
return targetElement;
};
/**
* Find sibling TR's TD element by given TD and direction
* @param {HTMLElement} node TD element
* @param {string} direction Boolean value for find first TD in next line
* @param {boolean} [needEdgeCell=false] Boolean value for find first TD in next line
* @returns {HTMLElement|null}
* @ignore
*/
var getSiblingRowCellByDirection = function getSiblingRowCellByDirection(node, direction, needEdgeCell) {
var isForward = true;
var tableCellElement = null;
var $node = void 0,
index = void 0,
$targetRowElement = void 0,
$currentContainer = void 0,
$siblingContainer = void 0,
isSiblingContainerExists = void 0;
if (_tuiCodeSnippet2.default.isUndefined(direction) || direction !== 'next' && direction !== 'previous') {
return null;
} else if (direction === 'previous') {
isForward = false;
}
if (node) {
$node = (0, _jquery2.default)(node);
if (isForward) {
$targetRowElement = $node.parent().next();
$currentContainer = $node.parents('thead');
$siblingContainer = $currentContainer[0] && $currentContainer.next();
isSiblingContainerExists = $siblingContainer && getNodeName($siblingContainer[0]) === 'TBODY';
index = 0;
} else {
$targetRowElement = $node.parent().prev();
$currentContainer = $node.parents('tbody');
$siblingContainer = $currentContainer[0] && $currentContainer.prev();
isSiblingContainerExists = $siblingContainer && getNodeName($siblingContainer[0]) === 'THEAD';
index = node.parentNode.childNodes.length - 1;
}
if (_tuiCodeSnippet2.default.isUndefined(needEdgeCell) || !needEdgeCell) {
index = getNodeOffsetOfParent(node);
}
if ($targetRowElement[0]) {
tableCellElement = $targetRowElement.children('td,th')[index];
} else if ($currentContainer[0] && isSiblingContainerExists) {
tableCellElement = $siblingContainer.find('td,th')[index];
}
return tableCellElement;
}
return null;
};
/**
* Check that the inline node is supported by markdown
* @param {Node} node TD element
* @returns {boolean}
* @ignore
*/
var isMDSupportInlineNode = function isMDSupportInlineNode(node) {
return (/^(A|B|BR|CODE|DEL|EM|I|IMG|S|SPAN|STRONG)$/ig.test(node.nodeName)
);
};
/**
* Check that node is styled node.
* Styled node is a node that has text and decorates text.
* @param {Node} node TD element
* @returns {boolean}
* @ignore
*/
var isStyledNode = function isStyledNode(node) {
return (/^(A|ABBR|ACRONYM|B|BDI|BDO|BIG|CITE|CODE|DEL|DFN|EM|I|INS|KBD|MARK|Q|S|SAMP|SMALL|SPAN|STRONG|SUB|SUP|U|VAR)$/ig.test(node.nodeName)
);
};
/**
* remove node from 'start' node to 'end-1' node inside parent
* if 'end' node is null, remove all child nodes after 'start' node.
* @param {Node} parent - parent node
* @param {Node} start - start node to remove
* @param {Node} end - end node to remove
* @ignore
*/
var removeChildFromStartToEndNode = function removeChildFromStartToEndNode(parent, start, end) {
var child = start;
if (!child || parent !== child.parentNode) {
return;
}
while (child !== end) {
var next = child.nextSibling;
parent.removeChild(child);
child = next;
}
};
/**
* remove nodes along the direction from the node to reach targetParent node
* @param {Node} targetParent - stop removing when reach target parent node
* @param {Node} node - start node
* @param {boolean} isForward - direction
* @ignore
*/
var removeNodesByDirection = function removeNodesByDirection(targetParent, node, isForward) {
var parent = node;
while (parent !== targetParent) {
var nextParent = parent.parentNode;
var _parent = parent,
nextSibling = _parent.nextSibling,
previousSibling = _parent.previousSibling;
if (!isForward && nextSibling) {
removeChildFromStartToEndNode(nextParent, nextSibling, null);
} else if (isForward && previousSibling) {
removeChildFromStartToEndNode(nextParent, nextParent.childNodes[0], parent);
}
parent = nextParent;
}
};
var getLeafNode = function getLeafNode(node) {
var result = node;
while (result.childNodes && result.childNodes.length) {
var _result = result,
nextLeaf = _result.firstChild;
// When inline tag have empty text node with other childnodes, ignore empty text node.
if (isTextNode(nextLeaf) && !getTextLength(nextLeaf)) {
result = nextLeaf.nextSibling || nextLeaf;
} else {
result = nextLeaf;
}
}
return result;
};
exports.default = {
getNodeName: getNodeName,
isTextNode: isTextNode,
isElemNode: isElemNode,
isBlockNode: isBlockNode,
getTextLength: getTextLength,
getOffsetLength: getOffsetLength,
getPrevOffsetNodeUntil: getPrevOffsetNodeUntil,
getNodeOffsetOfParent: getNodeOffsetOfParent,
getChildNodeByOffset: getChildNodeByOffset,
containsNode: containsNode,
getTopPrevNodeUnder: getTopPrevNodeUnder,
getTopNextNodeUnder: getTopNextNodeUnder,
getParentUntilBy: getParentUntilBy,
getParentUntil: getParentUntil,
getTopBlockNode: getTopBlockNode,
getPrevTextNode: getPrevTextNode,
findOffsetNode: findOffsetNode,
getPath: getPath,
getNodeInfo: getNodeInfo,
getTableCellByDirection: getTableCellByDirection,
getSiblingRowCellByDirection: getSiblingRowCellByDirection,
isMDSupportInlineNode: isMDSupportInlineNode,
isStyledNode: isStyledNode,
removeChildFromStartToEndNode: removeChildFromStartToEndNode,
removeNodesByDirection: removeNodesByDirection,
getLeafNode: getLeafNode
};
/***/ }),
/* 6 */,
/* 7 */,
/* 8 */
/***/ (function(module, exports) {
module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* class Ruler
*
* Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
* [[MarkdownIt#inline]] to manage sequences of functions (rules):
*
* - keep rules in defined order
* - assign the name to each rule
* - enable/disable rules
* - add/replace rules
* - allow assign rules to additional named chains (in the same)
* - cacheing lists of active rules
*
* You will not need use this class directly until write plugins. For simple
* rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
* [[MarkdownIt.use]].
**/
/**
* new Ruler()
**/
function Ruler() {
// List of added rules. Each element is:
//
// {
// name: XXX,
// enabled: Boolean,
// fn: Function(),
// alt: [ name2, name3 ]
// }
//
this.__rules__ = [];
// Cached rule chains.
//
// First level - chain name, '' for default.
// Second level - diginal anchor for fast filtering by charcodes.
//
this.__cache__ = null;
}
////////////////////////////////////////////////////////////////////////////////
// Helper methods, should not be used directly
// Find rule index by name
//
Ruler.prototype.__find__ = function (name) {
for (var i = 0; i < this.__rules__.length; i++) {
if (this.__rules__[i].name === name) {
return i;
}
}
return -1;
};
// Build rules lookup cache
//
Ruler.prototype.__compile__ = function () {
var self = this;
var chains = [ '' ];
// collect unique names
self.__rules__.forEach(function (rule) {
if (!rule.enabled) { return; }
rule.alt.forEach(function (altName) {
if (chains.indexOf(altName) < 0) {
chains.push(altName);
}
});
});
self.__cache__ = {};
chains.forEach(function (chain) {
self.__cache__[chain] = [];
self.__rules__.forEach(function (rule) {
if (!rule.enabled) { return; }
if (chain && rule.alt.indexOf(chain) < 0) { return; }
self.__cache__[chain].push(rule.fn);
});
});
};
/**
* Ruler.at(name, fn [, options])
* - name (String): rule name to replace.
* - fn (Function): new rule function.
* - options (Object): new rule options (not mandatory).
*
* Replace rule by name with new function & options. Throws error if name not
* found.
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* Replace existing typorgapher replacement rule with new one:
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.at('replacements', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.at = function (name, fn, options) {
var index = this.__find__(name);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + name); }
this.__rules__[index].fn = fn;
this.__rules__[index].alt = opt.alt || [];
this.__cache__ = null;
};
/**
* Ruler.before(beforeName, ruleName, fn [, options])
* - beforeName (String): new rule will be added before this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain before one with given name. See also
* [[Ruler.after]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
var index = this.__find__(beforeName);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }
this.__rules__.splice(index, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.after(afterName, ruleName, fn [, options])
* - afterName (String): new rule will be added after this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain after one with given name. See also
* [[Ruler.before]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.after = function (afterName, ruleName, fn, options) {
var index = this.__find__(afterName);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }
this.__rules__.splice(index + 1, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.push(ruleName, fn [, options])
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Push new rule to the end of chain. See also
* [[Ruler.before]], [[Ruler.after]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.push('my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.push = function (ruleName, fn, options) {
var opt = options || {};
this.__rules__.push({
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.enable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to enable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.disable]], [[Ruler.enableOnly]].
**/
Ruler.prototype.enable = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
var result = [];
// Search by name and enable
list.forEach(function (name) {
var idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) { return; }
throw new Error('Rules manager: invalid rule name ' + name);
}
this.__rules__[idx].enabled = true;
result.push(name);
}, this);
this.__cache__ = null;
return result;
};
/**
* Ruler.enableOnly(list [, ignoreInvalid])
* - list (String|Array): list of rule names to enable (whitelist).
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names, and disable everything else. If any rule name
* not found - throw Error. Errors can be disabled by second param.
*
* See also [[Ruler.disable]], [[Ruler.enable]].
**/
Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
this.__rules__.forEach(function (rule) { rule.enabled = false; });
this.enable(list, ignoreInvalid);
};
/**
* Ruler.disable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Disable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.enable]], [[Ruler.enableOnly]].
**/
Ruler.prototype.disable = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
var result = [];
// Search by name and disable
list.forEach(function (name) {
var idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) { return; }
throw new Error('Rules manager: invalid rule name ' + name);
}
this.__rules__[idx].enabled = false;
result.push(name);
}, this);
this.__cache__ = null;
return result;
};
/**
* Ruler.getRules(chainName) -> Array
*
* Return array of active functions (rules) for given chain name. It analyzes
* rules configuration, compiles caches if not exists and returns result.
*
* Default chain name is `''` (empty string). It can't be skipped. That's
* done intentionally, to keep signature monomorphic for high speed.
**/
Ruler.prototype.getRules = function (chainName) {
if (this.__cache__ === null) {
this.__compile__();
}
// Chain can be empty, if rules disabled. But we still have to return Array.
return this.__cache__[chainName] || [];
};
module.exports = Ruler;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Token class
/**
* class Token
**/
/**
* new Token(type, tag, nesting)
*
* Create new token and fill passed properties.
**/
function Token(type, tag, nesting) {
/**
* Token#type -> String
*
* Type of the token (string, e.g. "paragraph_open")
**/
this.type = type;
/**
* Token#tag -> String
*
* html tag name, e.g. "p"
**/
this.tag = tag;
/**
* Token#attrs -> Array
*
* Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
**/
this.attrs = null;
/**
* Token#map -> Array
*
* Source map info. Format: `[ line_begin, line_end ]`
**/
this.map = null;
/**
* Token#nesting -> Number
*
* Level change (number in {-1, 0, 1} set), where:
*
* - `1` means the tag is opening
* - `0` means the tag is self-closing
* - `-1` means the tag is closing
**/
this.nesting = nesting;
/**
* Token#level -> Number
*
* nesting level, the same as `state.level`
**/
this.level = 0;
/**
* Token#children -> Array
*
* An array of child nodes (inline and img tokens)
**/
this.children = null;
/**
* Token#content -> String
*
* In a case of self-closing tag (code, html, fence, etc.),
* it has contents of this tag.
**/
this.content = '';
/**
* Token#markup -> String
*
* '*' or '_' for emphasis, fence string for fence, etc.
**/
this.markup = '';
/**
* Token#info -> String
*
* fence infostring
**/
this.info = '';
/**
* Token#meta -> Object
*
* A place for plugins to store an arbitrary data
**/
this.meta = null;
/**
* Token#block -> Boolean
*
* True for block-level tokens, false for inline tokens.
* Used in renderer to calculate line breaks
**/
this.block = false;
/**
* Token#hidden -> Boolean
*
* If it's true, ignore this element when rendering. Used for tight lists
* to hide paragraphs.
**/
this.hidden = false;
}
/**
* Token.attrIndex(name) -> Number
*
* Search attribute index by name.
**/
Token.prototype.attrIndex = function attrIndex(name) {
var attrs, i, len;
if (!this.attrs) { return -1; }
attrs = this.attrs;
for (i = 0, len = attrs.length; i < len; i++) {
if (attrs[i][0] === name) { return i; }
}
return -1;
};
/**
* Token.attrPush(attrData)
*
* Add `[ name, value ]` attribute to list. Init attrs if necessary
**/
Token.prototype.attrPush = function attrPush(attrData) {
if (this.attrs) {
this.attrs.push(attrData);
} else {
this.attrs = [ attrData ];
}
};
/**
* Token.attrSet(name, value)
*
* Set `name` attribute to `value`. Override old value if exists.
**/
Token.prototype.attrSet = function attrSet(name, value) {
var idx = this.attrIndex(name),
attrData = [ name, value ];
if (idx < 0) {
this.attrPush(attrData);
} else {
this.attrs[idx] = attrData;
}
};
/**
* Token.attrGet(name)
*
* Get the value of attribute `name`, or null if it does not exist.
**/
Token.prototype.attrGet = function attrGet(name) {
var idx = this.attrIndex(name), value = null;
if (idx >= 0) {
value = this.attrs[idx][1];
}
return value;
};
/**
* Token.attrJoin(name, value)
*
* Join value to existing attribute via space. Or create new attribute if not
* exists. Useful to operate with token classes.
**/
Token.prototype.attrJoin = function attrJoin(name, value) {
var idx = this.attrIndex(name);
if (idx < 0) {
this.attrPush([ name, value ]);
} else {
this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
}
};
module.exports = Token;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CodeBlockManager = 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; }; }(); /**
* @fileoverview Implements CodeBlockManager
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _highlight = __webpack_require__(99);
var _highlight2 = _interopRequireDefault(_highlight);
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"); } }
/**
* Class Code Block Manager
*/
var CodeBlockManager = function () {
/**
* Creates an instance of CodeBlockManager.
* @memberof CodeBlockManager
*/
function CodeBlockManager() {
_classCallCheck(this, CodeBlockManager);
this._replacers = {};
}
/**
* Set replacer for code block
* @param {string} language - code block language
* @param {function} replacer - replacer function to code block element
*/
_createClass(CodeBlockManager, [{
key: 'setReplacer',
value: function setReplacer(language, replacer) {
this._replacers[language] = replacer;
}
/**
* get replacer for code block
* @param {string} language - code block type
* @returns {function} - replacer function
* @memberof CodeBlockManager
*/
}, {
key: 'getReplacer',
value: function getReplacer(language) {
return this._replacers[language];
}
/**
* Create code block html.
* @param {string} language - code block language
* @param {string} codeText - code text
* @returns {string}
*/
}, {
key: 'createCodeBlockHtml',
value: function createCodeBlockHtml(language, codeText) {
var replacer = this.getReplacer(language);
var html = void 0;
if (replacer) {
html = replacer(codeText, language);
} else {
html = _highlight2.default.getLanguage(language) ? _highlight2.default.highlight(language, codeText).value : escape(codeText, false);
}
return html;
}
/**
* get supported languages by highlight-js
* @returns {Array<string>} - supported languages by highlight-js
* @static
*/
}], [{
key: 'getHighlightJSLanguages',
value: function getHighlightJSLanguages() {
return _highlight2.default.listLanguages();
}
}]);
return CodeBlockManager;
}();
/**
* escape code from markdown-it
* @param {string} html HTML string
* @param {string} encode Boolean value of whether encode or not
* @returns {string}
* @ignore
*/
function escape(html, encode) {
return html.replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
}
exports.CodeBlockManager = CodeBlockManager;
exports.default = new CodeBlockManager();
/***/ }),
/* 12 */,
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @fileoverview Implements htmlSanitizer
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var HTML_ATTR_LIST_RX = new RegExp('^(abbr|align|alt|axis|bgcolor|border|cellpadding|cellspacing|class|clear|' + 'color|cols|compact|coords|dir|face|headers|height|hreflang|hspace|' + 'ismap|lang|language|nohref|nowrap|rel|rev|rows|rules|' + 'scope|scrolling|shape|size|span|start|summary|tabindex|target|title|type|' + 'valign|value|vspace|width|checked|mathvariant|encoding|id|name|' + 'background|cite|href|longdesc|src|usemap|xlink:href|data-+|checked|style)', 'g');
var SVG_ATTR_LIST_RX = new RegExp('^(accent-height|accumulate|additive|alphabetic|arabic-form|ascent|' + 'baseProfile|bbox|begin|by|calcMode|cap-height|class|color|color-rendering|content|' + 'cx|cy|d|dx|dy|descent|display|dur|end|fill|fill-rule|font-family|font-size|font-stretch|' + 'font-style|font-variant|font-weight|from|fx|fy|g1|g2|glyph-name|gradientUnits|hanging|' + 'height|horiz-adv-x|horiz-origin-x|ideographic|k|keyPoints|keySplines|keyTimes|lang|' + 'marker-end|marker-mid|marker-start|markerHeight|markerUnits|markerWidth|mathematical|' + 'max|min|offset|opacity|orient|origin|overline-position|overline-thickness|panose-1|' + 'path|pathLength|points|preserveAspectRatio|r|refX|refY|repeatCount|repeatDur|' + 'requiredExtensions|requiredFeatures|restart|rotate|rx|ry|slope|stemh|stemv|stop-color|' + 'stop-opacity|strikethrough-position|strikethrough-thickness|stroke|stroke-dasharray|' + 'stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|' + 'stroke-width|systemLanguage|target|text-anchor|to|transform|type|u1|u2|underline-position|' + 'underline-thickness|unicode|unicode-range|units-per-em|values|version|viewBox|visibility|' + 'width|widths|x|x-height|x1|x2|xlink:actuate|xlink:arcrole|xlink:role|xlink:show|xlink:title|' + 'xlink:type|xml:base|xml:lang|xml:space|xmlns|xmlns:xlink|y|y1|y2|zoomAndPan)', 'g');
/**
* htmlSanitizer
* @param {string|Node} html html or Node
* @param {boolean} [needHtmlText] pass true if need html text
* @returns {string|DocumentFragment} result
* @ignore
*/
function htmlSanitizer(html, needHtmlText) {
var $html = (0, _jquery2.default)('<div />');
html = html.replace(/<!--[\s\S]*?-->/g, '');
$html.append(html);
removeUnnecessaryTags($html);
leaveOnlyWhitelistAttribute($html);
return finalizeHtml($html, needHtmlText);
}
/**
* Remove unnecessary tags
* @private
* @param {jQuery} $html jQuery instance
*/
function removeUnnecessaryTags($html) {
$html.find('script, iframe, textarea, form, button, select, meta, style, link, title').remove();
}
/**
* Leave only white list attributes
* @private
* @param {jQuery} $html jQuery instance
*/
function leaveOnlyWhitelistAttribute($html) {
$html.find('*').each(function (index, node) {
var attrs = node.attributes;
var blacklist = _tuiCodeSnippet2.default.toArray(attrs).filter(function (attr) {
var isHTMLAttr = attr.name.match(HTML_ATTR_LIST_RX);
var isSVGAttr = attr.name.match(SVG_ATTR_LIST_RX);
return !isHTMLAttr && !isSVGAttr;
});
_tuiCodeSnippet2.default.forEachArray(blacklist, function (attr) {
// Edge svg attribute name returns uppercase bug. error guard.
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5579311/
if (attrs.getNamedItem(attr.name)) {
attrs.removeNamedItem(attr.name);
}
});
});
}
/**
* Finalize html result
* @private
* @param {jQuery} $html jQuery instance
* @param {boolean} needHtmlText pass true if need html text
* @returns {string|DocumentFragment} result
*/
function finalizeHtml($html, needHtmlText) {
var returnValue = void 0;
if (needHtmlText) {
returnValue = $html[0].innerHTML;
} else {
var frag = document.createDocumentFragment();
var childNodes = _tuiCodeSnippet2.default.toArray($html[0].childNodes);
var length = childNodes.length;
for (var i = 0; i < length; i += 1) {
frag.appendChild(childNodes[i]);
}
returnValue = frag;
}
return returnValue;
}
exports.default = htmlSanitizer;
/***/ }),
/* 14 */,
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// HTML5 entities map: { name -> utf16string }
//
/*eslint quotes:0*/
module.exports = __webpack_require__(37);
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports.encode = __webpack_require__(38);
module.exports.decode = __webpack_require__(39);
module.exports.format = __webpack_require__(40);
module.exports.parse = __webpack_require__(41);
/***/ }),
/* 17 */
/***/ (function(module, exports) {
module.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
/***/ }),
/* 18 */
/***/ (function(module, exports) {
module.exports=/[\0-\x1F\x7F-\x9F]/
/***/ }),
/* 19 */
/***/ (function(module, exports) {
module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Regexps to match html elements
var attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
var unquoted = '[^"\'=<>`\\x00-\\x20]+';
var single_quoted = "'[^']*'";
var double_quoted = '"[^"]*"';
var attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
var attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
var open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
var close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
var processing = '<[?].*?[?]>';
var declaration = '<![A-Z]+\\s+[^>]*>';
var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
var HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +
'|' + processing + '|' + declaration + '|' + cdata + ')');
var HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');
module.exports.HTML_TAG_RE = HTML_TAG_RE;
module.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ~~strike through~~
//
// Insert each marker as a separate text token, and add it to delimiter list
//
module.exports.tokenize = function strikethrough(state, silent) {
var i, scanned, token, len, ch,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x7E/* ~ */) { return false; }
scanned = state.scanDelims(state.pos, true);
len = scanned.length;
ch = String.fromCharCode(marker);
if (len < 2) { return false; }
if (len % 2) {
token = state.push('text', '', 0);
token.content = ch;
len--;
}
for (i = 0; i < len; i += 2) {
token = state.push('text', '', 0);
token.content = ch + ch;
state.delimiters.push({
marker: marker,
jump: i,
token: state.tokens.length - 1,
level: state.level,
end: -1,
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
};
// Walk through delimiter list and replace text tokens with tags
//
module.exports.postProcess = function strikethrough(state) {
var i, j,
startDelim,
endDelim,
token,
loneMarkers = [],
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x7E/* ~ */) {
continue;
}
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
token = state.tokens[startDelim.token];
token.type = 's_open';
token.tag = 's';
token.nesting = 1;
token.markup = '~~';
token.content = '';
token = state.tokens[endDelim.token];
token.type = 's_close';
token.tag = 's';
token.nesting = -1;
token.markup = '~~';
token.content = '';
if (state.tokens[endDelim.token - 1].type === 'text' &&
state.tokens[endDelim.token - 1].content === '~') {
loneMarkers.push(endDelim.token - 1);
}
}
// If a marker sequence has an odd number of characters, it's splitted
// like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
// start of the sequence.
//
// So, we have to move all those markers after subsequent s_close tags.
//
while (loneMarkers.length) {
i = loneMarkers.pop();
j = i + 1;
while (j < state.tokens.length && state.tokens[j].type === 's_close') {
j++;
}
j--;
if (i !== j) {
token = state.tokens[j];
state.tokens[j] = state.tokens[i];
state.tokens[i] = token;
}
}
};
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process *this* and _that_
//
// Insert each marker as a separate text token, and add it to delimiter list
//
module.exports.tokenize = function emphasis(state, silent) {
var i, scanned, token,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }
scanned = state.scanDelims(state.pos, marker === 0x2A);
for (i = 0; i < scanned.length; i++) {
token = state.push('text', '', 0);
token.content = String.fromCharCode(marker);
state.delimiters.push({
// Char code of the starting marker (number).
//
marker: marker,
// Total length of these series of delimiters.
//
length: scanned.length,
// An amount of characters before this one that's equivalent to
// current one. In plain English: if this delimiter does not open
// an emphasis, neither do previous `jump` characters.
//
// Used to skip sequences like "*****" in one step, for 1st asterisk
// value will be 0, for 2nd it's 1 and so on.
//
jump: i,
// A position of the token this delimiter corresponds to.
//
token: state.tokens.length - 1,
// Token level.
//
level: state.level,
// If this delimiter is matched as a valid opener, `end` will be
// equal to its position, otherwise it's `-1`.
//
end: -1,
// Boolean flags that determine if this delimiter could open or close
// an emphasis.
//
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
};
// Walk through delimiter list and replace text tokens with tags
//
module.exports.postProcess = function emphasis(state) {
var i,
startDelim,
endDelim,
token,
ch,
isStrong,
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = max - 1; i >= 0; i--) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {
continue;
}
// Process only opening markers
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
// If the previous delimiter has the same marker and is adjacent to this one,
// merge those into one strong delimiter.
//
// `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
//
isStrong = i > 0 &&
delimiters[i - 1].end === startDelim.end + 1 &&
delimiters[i - 1].token === startDelim.token - 1 &&
delimiters[startDelim.end + 1].token === endDelim.token + 1 &&
delimiters[i - 1].marker === startDelim.marker;
ch = String.fromCharCode(startDelim.marker);
token = state.tokens[startDelim.token];
token.type = isStrong ? 'strong_open' : 'em_open';
token.tag = isStrong ? 'strong' : 'em';
token.nesting = 1;
token.markup = isStrong ? ch + ch : ch;
token.content = '';
token = state.tokens[endDelim.token];
token.type = isStrong ? 'strong_close' : 'em_close';
token.tag = isStrong ? 'strong' : 'em';
token.nesting = -1;
token.markup = isStrong ? ch + ch : ch;
token.content = '';
if (isStrong) {
state.tokens[delimiters[i - 1].token].content = '';
state.tokens[delimiters[startDelim.end + 1].token].content = '';
i--;
}
}
};
/***/ }),
/* 23 */,
/* 24 */
/***/ (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 _preview = __webpack_require__(25);
var _preview2 = _interopRequireDefault(_preview);
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; } /**
* @fileoverview Implements markdown preview
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/**
* Class Markdown Preview
* @extends {Preview}
*/
var MarkdownPreview = function (_Preview) {
_inherits(MarkdownPreview, _Preview);
/**
* Creates an instance of MarkdownPreview.
* @param {jQuery} $el - base jQuery element
* @param {EventManager} eventManager - event manager
* @param {Convertor} convertor - convertor
* @param {boolean} isViewer - true for view only mode
* @memberof MarkdownPreview
*/
function MarkdownPreview($el, eventManager, convertor, isViewer) {
_classCallCheck(this, MarkdownPreview);
var _this = _possibleConstructorReturn(this, (MarkdownPreview.__proto__ || Object.getPrototypeOf(MarkdownPreview)).call(this, $el, eventManager, convertor, isViewer));
_this._initEvent();
return _this;
}
/**
* Initialize event
* @private
*/
_createClass(MarkdownPreview, [{
key: '_initEvent',
value: function _initEvent() {
var _this2 = this;
var latestMarkdownValue = '';
this.eventManager.listen('contentChangedFromMarkdown', function (markdownEditor) {
latestMarkdownValue = markdownEditor.getValue();
if (_this2.isVisible()) {
_this2.lazyRunner.run('refresh', latestMarkdownValue.replace(/<br>\n/g, '<br>'));
}
});
this.eventManager.listen('previewNeedsRefresh', function (value) {
_this2.refresh(value || latestMarkdownValue);
});
this.$el.on('scroll', function (event) {
_this2.eventManager.emit('scroll', {
source: 'preview',
data: event
});
});
}
/**
* render
* @param {string} html - html string to render
* @memberof MarkdownPreview
* @override
*/
}, {
key: 'render',
value: function render(html) {
_get(MarkdownPreview.prototype.__proto__ || Object.getPrototypeOf(MarkdownPreview.prototype), 'render', this).call(this, html);
this.eventManager.emit('previewRenderAfter', this);
}
}, {
key: 'remove',
value: function remove() {
this.$el.off('scroll');
this.$el = null;
}
}]);
return MarkdownPreview;
}(_preview2.default);
exports.default = MarkdownPreview;
/***/ }),
/* 25 */
/***/ (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; }; }(); /**
* @fileoverview Implements preview
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _lazyRunner = __webpack_require__(33);
var _lazyRunner2 = _interopRequireDefault(_lazyRunner);
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"); } }
/**
* Class Preview
**/
var Preview = function () {
/**
* Creates an instance of Preview.
* @param {jQuery} $el Container element for preview
* @param {EventManager} eventManager Event manager instance
* @param {Convertor} convertor Convertor instance
* @param {boolean} isViewer - whether viewer mode or not
* @memberof Preview
*/
function Preview($el, eventManager, convertor, isViewer) {
_classCallCheck(this, Preview);
this.eventManager = eventManager;
this.convertor = convertor;
this.$el = $el;
this.isViewer = !!isViewer;
this._initContentSection();
this.lazyRunner = new _lazyRunner2.default();
this.lazyRunner.registerLazyRunFunction('refresh', this.refresh, 800, this);
}
/**
* Initialize content selection
* @private
*/
_createClass(Preview, [{
key: '_initContentSection',
value: function _initContentSection() {
this._$previewContent = (0, _jquery2.default)('<div class="tui-editor-contents" />');
this.$el.append(this._$previewContent);
}
/**
* Refresh rendering
* @memberof Preview
* @param {string} markdown Markdown text
*/
}, {
key: 'refresh',
value: function refresh(markdown) {
this.render(this.convertor.toHTMLWithCodeHightlight(markdown));
}
/**
* get html string
* @returns {string} - html preview string
* @memberof Preview
*/
}, {
key: 'getHTML',
value: function getHTML() {
return this._$previewContent.html();
}
/**
* set html string
* @param {string} html - html preview string
* @memberof Preview
*/
}, {
key: 'setHTML',
value: function setHTML(html) {
this._$previewContent.html(html);
}
/**
* Render HTML on preview
* @memberof Preview
* @param {string} html HTML string
* @protected
*/
}, {
key: 'render',
value: function render(html) {
var _$previewContent = this._$previewContent;
html = this.eventManager.emit('previewBeforeHook', html) || html;
_$previewContent.empty();
_$previewContent.html(html);
}
/**
* Set preview height
* @memberof Preview
* @param {number} height - Height for preview container
*/
}, {
key: 'setHeight',
value: function setHeight(height) {
this.$el.get(0).style.height = height + 'px';
}
/**
* set min height
* @param {number} minHeight - min height
* @memberof Preview
*/
}, {
key: 'setMinHeight',
value: function setMinHeight(minHeight) {
this.$el.get(0).style.minHeight = minHeight + 'px';
}
/**
* Is Preview visible
* @returns {boolean} result
*/
}, {
key: 'isVisible',
value: function isVisible() {
return this.$el.css('display') !== 'none';
}
}]);
return Preview;
}();
exports.default = Preview;
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isMac = /Mac/.test(navigator.platform);
module.exports = {
isMac: isMac
};
/***/ }),
/* 27 */
/***/ (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; }; }(); /**
* @fileoverview Implements EventManager
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
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 eventList = ['previewBeforeHook', 'previewRenderAfter', 'previewNeedsRefresh', 'addImageBlobHook', 'setMarkdownAfter', 'contentChangedFromWysiwyg', 'changeFromWysiwyg', 'contentChangedFromMarkdown', 'changeFromMarkdown', 'change', 'changeModeToWysiwyg', 'changeModeToMarkdown', 'changeModeBefore', 'changeMode', 'changePreviewStyle', 'changePreviewTabPreview', 'changePreviewTabWrite', 'openPopupAddLink', 'openPopupAddImage', 'openPopupAddTable', 'openPopupTableUtils', 'openHeadingSelect', 'openPopupCodeBlockLanguages', 'openPopupCodeBlockEditor', 'openDropdownToolbar', 'closePopupCodeBlockLanguages', 'closePopupCodeBlockEditor', 'closeAllPopup', 'command', 'addCommandBefore', 'htmlUpdate', 'markdownUpdate', 'renderedHtmlUpdated', 'removeEditor', 'convertorAfterMarkdownToHtmlConverted', 'convertorBeforeHtmlToMarkdownConverted', 'convertorAfterHtmlToMarkdownConverted', 'stateChange', 'wysiwygSetValueAfter', 'wysiwygSetValueBefore', 'wysiwygGetValueBefore', 'wysiwygProcessHTMLText', 'wysiwygRangeChangeAfter', 'wysiwygKeyEvent', 'scroll', 'click', 'mousedown', 'mouseover', 'mouseout', 'mouseup', 'contextmenu', 'keydown', 'keyup', 'keyMap', 'load', 'focus', 'blur', 'paste', 'pasteBefore', 'willPaste', 'copy', 'copyBefore', 'copyAfter', 'cut', 'cutAfter', 'drop', 'show', 'hide'];
/**
* Class EventManager
*/
var EventManager = function () {
/**
* Creates an instance of EventManager.
* @memberof EventManager
*/
function EventManager() {
_classCallCheck(this, EventManager);
this.events = new _tuiCodeSnippet2.default.Map();
this.TYPE = new _tuiCodeSnippet2.default.Enum(eventList);
}
/**
* Listen event and bind event handler
* @memberof EventManager
* @param {string} typeStr Event type string
* @param {function} handler Event handler
*/
_createClass(EventManager, [{
key: 'listen',
value: function listen(typeStr, handler) {
var typeInfo = this._getTypeInfo(typeStr);
var eventHandlers = this.events.get(typeInfo.type) || [];
if (!this._hasEventType(typeInfo.type)) {
throw new Error('There is no event type ' + typeInfo.type);
}
if (typeInfo.namespace) {
handler.namespace = typeInfo.namespace;
}
eventHandlers.push(handler);
this.events.set(typeInfo.type, eventHandlers);
}
/**
* Emit event
* @memberof EventManager
* @param {string} eventName Event name to emit
* @returns {Array}
*/
}, {
key: 'emit',
value: function emit() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var typeStr = args.shift();
var typeInfo = this._getTypeInfo(typeStr);
var eventHandlers = this.events.get(typeInfo.type);
var results = void 0;
if (eventHandlers) {
_tuiCodeSnippet2.default.forEach(eventHandlers, function (handler) {
var result = handler.apply(undefined, args);
if (!_tuiCodeSnippet2.default.isUndefined(result)) {
results = results || [];
results.push(result);
}
});
}
return results;
}
/**
* Emit given event and return result
* @memberof EventManager
* @param {string} eventName Event name to emit
* @param {string} sourceText Source text to change
* @returns {string}
*/
}, {
key: 'emitReduce',
value: function emitReduce() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var type = args.shift();
var eventHandlers = this.events.get(type);
if (eventHandlers) {
_tuiCodeSnippet2.default.forEach(eventHandlers, function (handler) {
var result = handler.apply(undefined, args);
if (!_tuiCodeSnippet2.default.isFalsy(result)) {
args[0] = result;
}
});
}
return args[0];
}
/**
* Get event type and namespace
* @memberof EventManager
* @param {string} typeStr Event type name
* @returns {{type: string, namespace: string}}
* @private
*/
}, {
key: '_getTypeInfo',
value: function _getTypeInfo(typeStr) {
var splited = typeStr.split('.');
return {
type: splited[0],
namespace: splited[1]
};
}
/**
* Check whether event type exists or not
* @param {string} type Event type name
* @returns {boolean}
* @private
*/
}, {
key: '_hasEventType',
value: function _hasEventType(type) {
return !_tuiCodeSnippet2.default.isUndefined(this.TYPE[this._getTypeInfo(type).type]);
}
/**
* Add event type when given event not exists
* @memberof EventManager
* @param {string} type Event type name
*/
}, {
key: 'addEventType',
value: function addEventType(type) {
if (this._hasEventType(type)) {
throw new Error('There is already have event type ' + type);
}
this.TYPE.set(type);
}
/**
* Remove event handler from given event type
* @memberof EventManager
* @param {string} typeStr Event type name
* @param {function} [handler] - registered event handler
*/
}, {
key: 'removeEventHandler',
value: function removeEventHandler(typeStr, handler) {
var _this = this;
var _getTypeInfo2 = this._getTypeInfo(typeStr),
type = _getTypeInfo2.type,
namespace = _getTypeInfo2.namespace;
if (type && handler) {
this._removeEventHandlerWithHandler(type, handler);
} else if (type && !namespace) {
// dont use dot notation cuz eslint
this.events['delete'](type);
} else if (!type && namespace) {
this.events.forEach(function (eventHandlers, eventType) {
_this._removeEventHandlerWithTypeInfo(eventType, namespace);
});
} else if (type && namespace) {
this._removeEventHandlerWithTypeInfo(type, namespace);
}
}
/**
* Remove event handler with event handler
* @param {string} type - event type name
* @param {function} handler - event handler
* @memberof EventManager
* @private
*/
}, {
key: '_removeEventHandlerWithHandler',
value: function _removeEventHandlerWithHandler(type, handler) {
var eventHandlers = this.events.get(type) || [];
var handlerIndex = eventHandlers.indexOf(handler);
if (handlerIndex >= 0) {
eventHandlers.splice(handlerIndex, 1);
}
}
/**
* Remove event handler with event type information
* @memberof EventManager
* @param {string} type Event type name
* @param {string} namespace Event namespace
* @private
*/
}, {
key: '_removeEventHandlerWithTypeInfo',
value: function _removeEventHandlerWithTypeInfo(type, namespace) {
var handlersToSurvive = [];
var eventHandlers = this.events.get(type);
if (!eventHandlers) {
return;
}
eventHandlers.map(function (handler) {
if (handler.namespace !== namespace) {
handlersToSurvive.push(handler);
}
return null;
});
this.events.set(type, handlersToSurvive);
}
}]);
return EventManager;
}();
exports.default = EventManager;
/***/ }),
/* 28 */
/***/ (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; }; }(); /**
* @fileoverview extension manager
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
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"); } }
/**
* Class ExtManager
*/
var ExtManager = function () {
/**
* Creates an instance of ExtManager.
* @memberof ExtManager
*/
function ExtManager() {
_classCallCheck(this, ExtManager);
this.exts = new _tuiCodeSnippet2.default.Map();
}
/**
* defineExtension
* Defined Extension
* @memberof ExtManager
* @param {string} name extension name
* @param {ExtManager~extension} ext extension
*/
_createClass(ExtManager, [{
key: 'defineExtension',
value: function defineExtension(name, ext) {
this.exts.set(name, ext);
}
/**
* Apply extensions
* @memberof ExtManager
* @param {object} context Context
* @param {Array.<string|object>} options - options or names array
*/
}, {
key: 'applyExtension',
value: function applyExtension(context, options) {
var _this = this;
if (options) {
options.forEach(function (option) {
var hasOption = _tuiCodeSnippet2.default.isObject(option);
var name = hasOption ? option.name : option;
if (_this.exts.has(name)) {
var ext = _this.exts.get(name);
if (hasOption) {
ext(context, option);
} else {
ext(context);
}
}
});
}
}
}]);
return ExtManager;
}();
exports.default = new ExtManager();
/***/ }),
/* 29 */
/***/ (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; }; }(); /**
* @fileoverview Convertor have responsible to convert markdown and html
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
var _markdownIt = __webpack_require__(35);
var _markdownIt2 = _interopRequireDefault(_markdownIt);
var _toMark = __webpack_require__(91);
var _toMark2 = _interopRequireDefault(_toMark);
var _htmlSanitizer = __webpack_require__(13);
var _htmlSanitizer2 = _interopRequireDefault(_htmlSanitizer);
var _markdownitTaskPlugin = __webpack_require__(92);
var _markdownitTaskPlugin2 = _interopRequireDefault(_markdownitTaskPlugin);
var _markdownitCodeBlockPlugin = __webpack_require__(93);
var _markdownitCodeBlockPlugin2 = _interopRequireDefault(_markdownitCodeBlockPlugin);
var _markdownitCodeRenderer = __webpack_require__(94);
var _markdownitCodeRenderer2 = _interopRequireDefault(_markdownitCodeRenderer);
var _markdownitBlockQuoteRenderer = __webpack_require__(95);
var _markdownitBlockQuoteRenderer2 = _interopRequireDefault(_markdownitBlockQuoteRenderer);
var _markdownitTableRenderer = __webpack_require__(96);
var _markdownitTableRenderer2 = _interopRequireDefault(_markdownitTableRenderer);
var _markdownitHtmlBlockRenderer = __webpack_require__(97);
var _markdownitHtmlBlockRenderer2 = _interopRequireDefault(_markdownitHtmlBlockRenderer);
var _markdownitBackticksRenderer = __webpack_require__(98);
var _markdownitBackticksRenderer2 = _interopRequireDefault(_markdownitBackticksRenderer);
var _codeBlockManager = __webpack_require__(11);
var _codeBlockManager2 = _interopRequireDefault(_codeBlockManager);
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 markdownitHighlight = new _markdownIt2.default({
html: true,
breaks: true,
quotes: '“”‘’',
langPrefix: 'lang-',
highlight: function highlight(codeText, type) {
return _codeBlockManager2.default.createCodeBlockHtml(type, codeText);
}
});
var markdownit = new _markdownIt2.default({
html: true,
breaks: true,
quotes: '“”‘’',
langPrefix: 'lang-'
});
// markdownitHighlight
markdownitHighlight.block.ruler.at('code', _markdownitCodeRenderer2.default);
markdownitHighlight.block.ruler.at('table', _markdownitTableRenderer2.default, {
alt: ['paragraph', 'reference']
});
markdownitHighlight.block.ruler.at('blockquote', _markdownitBlockQuoteRenderer2.default, {
alt: ['paragraph', 'reference', 'blockquote', 'list']
});
markdownitHighlight.block.ruler.at('html_block', _markdownitHtmlBlockRenderer2.default, {
alt: ['paragraph', 'reference', 'blockquote']
});
markdownitHighlight.inline.ruler.at('backticks', _markdownitBackticksRenderer2.default);
markdownitHighlight.use(_markdownitTaskPlugin2.default);
markdownitHighlight.use(_markdownitCodeBlockPlugin2.default);
// markdownit
markdownit.block.ruler.at('code', _markdownitCodeRenderer2.default);
markdownit.block.ruler.at('table', _markdownitTableRenderer2.default, {
alt: ['paragraph', 'reference']
});
markdownit.block.ruler.at('blockquote', _markdownitBlockQuoteRenderer2.default, {
alt: ['paragraph', 'reference', 'blockquote', 'list']
});
markdownit.block.ruler.at('html_block', _markdownitHtmlBlockRenderer2.default, {
alt: ['paragraph', 'reference', 'blockquote']
});
markdownit.inline.ruler.at('backticks', _markdownitBackticksRenderer2.default);
markdownit.use(_markdownitTaskPlugin2.default);
markdownit.use(_markdownitCodeBlockPlugin2.default);
/**
* Class Convertor
*/
var Convertor = function () {
/**
* Convertor constructor
* @param {EventManager} em - EventManager instance
*/
function Convertor(em) {
_classCallCheck(this, Convertor);
this.eventManager = em;
}
/**
* _markdownToHtmlWithCodeHighlight
* Convert markdown to html with Codehighlight
* @private
* @memberof Convertor
* @param {string} markdown markdown text
* @returns {string} html text
*/
_createClass(Convertor, [{
key: '_markdownToHtmlWithCodeHighlight',
value: function _markdownToHtmlWithCodeHighlight(markdown) {
markdown = markdown.replace(/<br>/ig, '<br data-tomark-pass>');
// eslint-disable-next-line
var onerrorStripeRegex = /(<img[^>]*)(onerror\s*=\s*[\"']?[^\"']*[\"']?)(.*)/i;
while (onerrorStripeRegex.exec(markdown)) {
markdown = markdown.replace(onerrorStripeRegex, '$1$3');
}
var renderedHTML = markdownitHighlight.render(markdown);
renderedHTML = this._removeBrToMarkPassAttributeInCode(renderedHTML);
return renderedHTML;
}
/**
* _markdownToHtml
* Convert markdown to html
* @private
* @memberof Convertor
* @param {string} markdown markdown text
* @returns {string} html text
*/
}, {
key: '_markdownToHtml',
value: function _markdownToHtml(markdown) {
markdown = markdown.replace(/<br>/ig, '<br data-tomark-pass>');
// eslint-disable-next-line
var onerrorStripeRegex = /(<img[^>]*)(onerror\s*=\s*[\"']?[^\"']*[\"']?)(.*)/i;
while (onerrorStripeRegex.exec(markdown)) {
markdown = markdown.replace(onerrorStripeRegex, '$1$3');
}
var renderedHTML = markdownit.render(markdown);
renderedHTML = this._removeBrToMarkPassAttributeInCode(renderedHTML);
return renderedHTML;
}
/**
* Remove BR's data-tomark-pass attribute text when br in code element
* @param {string} renderedHTML Rendered HTML string from markdown editor
* @returns {string}
* @private
*/
}, {
key: '_removeBrToMarkPassAttributeInCode',
value: function _removeBrToMarkPassAttributeInCode(renderedHTML) {
var $wrapperDiv = (0, _jquery2.default)('<div />');
$wrapperDiv.html(renderedHTML);
$wrapperDiv.find('code, pre').each(function (i, codeOrPre) {
var $code = (0, _jquery2.default)(codeOrPre);
$code.html($code.html().replace(/&lt;br data-tomark-pass&gt;/, '&lt;br&gt;'));
});
renderedHTML = $wrapperDiv.html();
return renderedHTML;
}
/**
* toHTMLWithCodeHightlight
* Convert markdown to html with Codehighlight
* emit convertorAfterMarkdownToHtmlConverted
* @memberof Convertor
* @param {string} markdown markdown text
* @returns {string} html text
*/
}, {
key: 'toHTMLWithCodeHightlight',
value: function toHTMLWithCodeHightlight(markdown) {
var html = this._markdownToHtmlWithCodeHighlight(markdown);
html = this.eventManager.emitReduce('convertorAfterMarkdownToHtmlConverted', html);
return html;
}
/**
* toHTML
* Convert markdown to html
* emit convertorAfterMarkdownToHtmlConverted
* @memberof Convertor
* @param {string} markdown markdown text
* @returns {string} html text
*/
}, {
key: 'toHTML',
value: function toHTML(markdown) {
var html = this._markdownToHtml(markdown);
html = this.eventManager.emitReduce('convertorAfterMarkdownToHtmlConverted', html);
return html;
}
}, {
key: 'initHtmlSanitizer',
value: function initHtmlSanitizer() {
this.eventManager.listen('convertorAfterMarkdownToHtmlConverted', function (html) {
return (0, _htmlSanitizer2.default)(html, true);
});
}
/**
* toMarkdown
* Convert html to markdown
* emit convertorAfterHtmlToMarkdownConverted
* @memberof Convertor
* @param {string} html html text
* @param {object | null} toMarkOptions - toMark library options
* @returns {string} markdown text
*/
}, {
key: 'toMarkdown',
value: function toMarkdown(html, toMarkOptions) {
var resultArray = [];
html = this.eventManager.emitReduce('convertorBeforeHtmlToMarkdownConverted', html);
var markdown = (0, _toMark2.default)(this._appendAttributeForBrIfNeed(html), toMarkOptions);
markdown = this.eventManager.emitReduce('convertorAfterHtmlToMarkdownConverted', markdown);
_tuiCodeSnippet2.default.forEach(markdown.split('\n'), function (line, index) {
var FIND_TABLE_RX = /^\|[^|]*\|/ig;
var FIND_CODE_RX = /`[^`]*<br>[^`]*`/ig;
if (!FIND_CODE_RX.test(line) && !FIND_TABLE_RX.test(line)) {
line = line.replace(/<br>/ig, '<br>\n');
}
resultArray[index] = line;
});
return resultArray.join('\n');
}
}, {
key: '_appendAttributeForBrIfNeed',
value: function _appendAttributeForBrIfNeed(html) {
var FIND_BR_RX = /<br>/ig;
var FIND_DOUBLE_BR_RX = /<br \/><br \/>/ig;
var FIND_PASSING_AND_NORMAL_BR_RX = /<br data-tomark-pass \/><br \/>(.)/ig;
var FIRST_TWO_BRS_BEFORE_RX = /([^>]|<\/a>|<\/code>|<\/span>|<\/b>|<\/i>|<\/s>|<img [^>]*>)/;
var TWO_BRS_RX = /<br data-tomark-pass \/><br data-tomark-pass \/>/;
var FIND_FIRST_TWO_BRS_RX = new RegExp(FIRST_TWO_BRS_BEFORE_RX.source + TWO_BRS_RX.source, 'g');
html = html.replace(FIND_BR_RX, '<br />');
html = html.replace(FIND_DOUBLE_BR_RX, '<br data-tomark-pass /><br data-tomark-pass />');
var div = document.createElement('div');
var $div = (0, _jquery2.default)(div);
$div.html(html);
$div.find('pre br,code br').each(function (index, node) {
if (node.hasAttribute('data-tomark-pass')) {
node.removeAttribute('data-tomark-pass');
}
});
html = $div.html().replace(/<br data-tomark-pass="">/ig, '<br data-tomark-pass />');
html = html.replace(FIND_BR_RX, '<br />');
html = html.replace(FIND_PASSING_AND_NORMAL_BR_RX, '<br data-tomark-pass /><br data-tomark-pass />$1');
html = html.replace(FIND_FIRST_TWO_BRS_RX, '$1<br /><br />');
return html;
}
/**
* get markdownit with code highlight
* @returns {markdownit} - markdownit instance
* @memberof Convertor
* @static
*/
}], [{
key: 'getMarkdownitHighlightRenderer',
value: function getMarkdownitHighlightRenderer() {
return markdownitHighlight;
}
/**
* get markdownit
* @returns {markdownit} - markdownit instance
* @memberof Convertor
* @static
*/
}, {
key: 'getMarkdownitRenderer',
value: function getMarkdownitRenderer() {
return markdownit;
}
}]);
return Convertor;
}();
exports.default = Convertor;
/***/ }),
/* 30 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/* 31 */,
/* 32 */,
/* 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; }; }(); /**
* @fileoverview Implements LazyRunner
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
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"); } }
/**
* Class LazyRunner
*/
var LazyRunner = function () {
/**
* Creates an instance of LazyRunner.
* @memberof LazyRunner
*/
function LazyRunner() {
_classCallCheck(this, LazyRunner);
this.globalTOID = null;
this.lazyRunFunctions = {};
}
_createClass(LazyRunner, [{
key: 'run',
value: function run(fn, params, context, delay) {
var TOID = void 0;
if (_tuiCodeSnippet2.default.isString(fn)) {
TOID = this._runRegisteredRun(fn, params, context, delay);
} else {
TOID = this._runSingleRun(fn, params, context, delay, this.globalTOID);
this.globalTOID = TOID;
}
return TOID;
}
}, {
key: 'registerLazyRunFunction',
value: function registerLazyRunFunction(name, fn, delay, context) {
context = context || this;
this.lazyRunFunctions[name] = {
fn: fn,
delay: delay,
context: context,
TOID: null
};
}
}, {
key: '_runSingleRun',
value: function _runSingleRun(fn, params, context, delay, TOID) {
this._clearTOIDIfNeed(TOID);
TOID = setTimeout(function () {
fn.call(context, params);
}, delay);
return TOID;
}
}, {
key: '_runRegisteredRun',
value: function _runRegisteredRun(lazyRunName, params, context, delay) {
var lazyRunFunction = this.lazyRunFunctions[lazyRunName];
var fn = lazyRunFunction.fn;
var TOID = lazyRunFunction.TOID;
delay = delay || lazyRunFunction.delay;
context = context || lazyRunFunction.context;
TOID = this._runSingleRun(fn, params, context, delay, TOID);
lazyRunFunction.TOID = TOID;
return TOID;
}
}, {
key: '_clearTOIDIfNeed',
value: function _clearTOIDIfNeed(TOID) {
if (TOID) {
clearTimeout(TOID);
}
}
}]);
return LazyRunner;
}();
exports.default = LazyRunner;
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**
* @fileoverview Implements Command
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
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"); } }
/**
* Class Command
*/
var Command = function () {
/**
* @param {string} name Command name
* @param {number} type Command type (Command.TYPE)
* @param {Array.<string>} [keyMap] keyMap
*/
function Command(name, type, keyMap) {
_classCallCheck(this, Command);
this.name = name;
this.type = type;
if (keyMap) {
this.setKeyMap(keyMap);
}
}
/**
* getName
* returns Name of command
* @memberof Command
* @returns {string} Command Name
*/
_createClass(Command, [{
key: 'getName',
value: function getName() {
return this.name;
}
/**
* getType
* returns Type of command
* @memberof Command
* @returns {number} Command Command type number
*/
}, {
key: 'getType',
value: function getType() {
return this.type;
}
/**
* isMDType
* returns whether Command Type is Markdown or not
* @memberof Command
* @returns {boolean} result
*/
}, {
key: 'isMDType',
value: function isMDType() {
return this.type === Command.TYPE.MD;
}
/**
* isWWType
* returns whether Command Type is Wysiwyg or not
* @memberof Command
* @returns {boolean} result
*/
}, {
key: 'isWWType',
value: function isWWType() {
return this.type === Command.TYPE.WW;
}
/**
* isGlobalType
* returns whether Command Type is Global or not
* @memberof Command
* @returns {boolean} result
*/
}, {
key: 'isGlobalType',
value: function isGlobalType() {
return this.type === Command.TYPE.GB;
}
/**
* setKeyMap
* Set keymap value for each os
* @memberof Command
* @param {string} win Windows Key(and etc)
* @param {string} mac Mac osx key
*/
}, {
key: 'setKeyMap',
value: function setKeyMap(win, mac) {
this.keyMap = [win, mac];
}
}]);
return Command;
}();
/**
* Command factory method
* @memberof Command
* @param {string} typeStr Editor type name
* @param {object} props Property
* @param {string} props.name Command name
* @param {number} props.type Command type number
* @returns {Command}
*/
Command.factory = function (typeStr, props) {
var type = void 0;
if (typeStr === 'markdown') {
type = Command.TYPE.MD;
} else if (typeStr === 'wysiwyg') {
type = Command.TYPE.WW;
} else if (typeStr === 'global') {
type = Command.TYPE.GB;
}
var command = new Command(props.name, type);
_tuiCodeSnippet2.default.extend(command, props);
return command;
};
/**
* Command Type Constant
* markdown : 0
* wysiwyg : 1
* global : 2
* @memberof Command
* @type {object}
*/
Command.TYPE = {
MD: 0,
WW: 1,
GB: 2
};
exports.default = Command;
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(36);
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Main parser class
var utils = __webpack_require__(0);
var helpers = __webpack_require__(44);
var Renderer = __webpack_require__(48);
var ParserCore = __webpack_require__(49);
var ParserBlock = __webpack_require__(57);
var ParserInline = __webpack_require__(71);
var LinkifyIt = __webpack_require__(84);
var mdurl = __webpack_require__(16);
var punycode = __webpack_require__(86);
var config = {
'default': __webpack_require__(88),
zero: __webpack_require__(89),
commonmark: __webpack_require__(90)
};
////////////////////////////////////////////////////////////////////////////////
//
// This validator can prohibit more than really needed to prevent XSS. It's a
// tradeoff to keep code simple and to be secure by default.
//
// If you need different setup - override validator method as you wish. Or
// replace it with dummy function and use external sanitizer.
//
var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
function validateLink(url) {
// url should be normalized at this point, and existing entities are decoded
var str = url.trim().toLowerCase();
return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
}
////////////////////////////////////////////////////////////////////////////////
var RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];
function normalizeLink(url) {
var parsed = mdurl.parse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
//
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
//
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toASCII(parsed.hostname);
} catch (er) { /**/ }
}
}
return mdurl.encode(mdurl.format(parsed));
}
function normalizeLinkText(url) {
var parsed = mdurl.parse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
//
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
//
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toUnicode(parsed.hostname);
} catch (er) { /**/ }
}
}
return mdurl.decode(mdurl.format(parsed));
}
/**
* class MarkdownIt
*
* Main parser/renderer class.
*
* ##### Usage
*
* ```javascript
* // node.js, "classic" way:
* var MarkdownIt = require('markdown-it'),
* md = new MarkdownIt();
* var result = md.render('# markdown-it rulezz!');
*
* // node.js, the same, but with sugar:
* var md = require('markdown-it')();
* var result = md.render('# markdown-it rulezz!');
*
* // browser without AMD, added to "window" on script load
* // Note, there are no dash.
* var md = window.markdownit();
* var result = md.render('# markdown-it rulezz!');
* ```
*
* Single line rendering, without paragraph wrap:
*
* ```javascript
* var md = require('markdown-it')();
* var result = md.renderInline('__markdown-it__ rulezz!');
* ```
**/
/**
* new MarkdownIt([presetName, options])
* - presetName (String): optional, `commonmark` / `zero`
* - options (Object)
*
* Creates parser instanse with given config. Can be called without `new`.
*
* ##### presetName
*
* MarkdownIt provides named presets as a convenience to quickly
* enable/disable active syntax rules and options for common use cases.
*
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
* similar to GFM, used when no preset name given. Enables all available rules,
* but still without html, typographer & autolinker.
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
* all rules disabled. Useful to quickly setup your config via `.enable()`.
* For example, when you need only `bold` and `italic` markup and nothing else.
*
* ##### options:
*
* - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
* That's not safe! You may need external sanitizer to protect output from XSS.
* It's better to extend features via plugins, instead of enabling HTML.
* - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
* (`<br />`). This is needed only for full CommonMark compatibility. In real
* world you will need HTML output.
* - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
* - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
* Can be useful for external highlighters.
* - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
* - __typographer__ - `false`. Set `true` to enable [some language-neutral
* replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
* quotes beautification (smartquotes).
* - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
* pairs, when typographer enabled and smartquotes on. For example, you can
* use `'«»„“'` for Russian, `'„“‚‘'` for German, and
* `['«\xA0', '\xA0»', '\xA0', '\xA0']` for French (including nbsp).
* - __highlight__ - `null`. Highlighter function for fenced code blocks.
* Highlighter `function (str, lang)` should return escaped HTML. It can also
* return empty string if the source was not changed and should be escaped
* externaly. If result starts with <pre... internal wrapper is skipped.
*
* ##### Example
*
* ```javascript
* // commonmark mode
* var md = require('markdown-it')('commonmark');
*
* // default mode
* var md = require('markdown-it')();
*
* // enable everything
* var md = require('markdown-it')({
* html: true,
* linkify: true,
* typographer: true
* });
* ```
*
* ##### Syntax highlighting
*
* ```js
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return hljs.highlight(lang, str, true).value;
* } catch (__) {}
* }
*
* return ''; // use external default escaping
* }
* });
* ```
*
* Or with full wrapper override (if you need assign class to `<pre>`):
*
* ```javascript
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* // Actual default values
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return '<pre class="hljs"><code>' +
* hljs.highlight(lang, str, true).value +
* '</code></pre>';
* } catch (__) {}
* }
*
* return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
* }
* });
* ```
*
**/
function MarkdownIt(presetName, options) {
if (!(this instanceof MarkdownIt)) {
return new MarkdownIt(presetName, options);
}
if (!options) {
if (!utils.isString(presetName)) {
options = presetName || {};
presetName = 'default';
}
}
/**
* MarkdownIt#inline -> ParserInline
*
* Instance of [[ParserInline]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.inline = new ParserInline();
/**
* MarkdownIt#block -> ParserBlock
*
* Instance of [[ParserBlock]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.block = new ParserBlock();
/**
* MarkdownIt#core -> Core
*
* Instance of [[Core]] chain executor. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.core = new ParserCore();
/**
* MarkdownIt#renderer -> Renderer
*
* Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
* rules for new token types, generated by plugins.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* function myToken(tokens, idx, options, env, self) {
* //...
* return result;
* };
*
* md.renderer.rules['my_token'] = myToken
* ```
*
* See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
**/
this.renderer = new Renderer();
/**
* MarkdownIt#linkify -> LinkifyIt
*
* [linkify-it](https://github.com/markdown-it/linkify-it) instance.
* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
* rule.
**/
this.linkify = new LinkifyIt();
/**
* MarkdownIt#validateLink(url) -> Boolean
*
* Link validation function. CommonMark allows too much in links. By default
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
* except some embedded image types.
*
* You can change this behaviour:
*
* ```javascript
* var md = require('markdown-it')();
* // enable everything
* md.validateLink = function () { return true; }
* ```
**/
this.validateLink = validateLink;
/**
* MarkdownIt#normalizeLink(url) -> String
*
* Function used to encode link url to a machine-readable format,
* which includes url-encoding, punycode, etc.
**/
this.normalizeLink = normalizeLink;
/**
* MarkdownIt#normalizeLinkText(url) -> String
*
* Function used to decode link url to a human-readable format`
**/
this.normalizeLinkText = normalizeLinkText;
// Expose utils & helpers for easy acces from plugins
/**
* MarkdownIt#utils -> utils
*
* Assorted utility functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
**/
this.utils = utils;
/**
* MarkdownIt#helpers -> helpers
*
* Link components parser functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
**/
this.helpers = utils.assign({}, helpers);
this.options = {};
this.configure(presetName);
if (options) { this.set(options); }
}
/** chainable
* MarkdownIt.set(options)
*
* Set parser options (in the same format as in constructor). Probably, you
* will never need it, but you can change options after constructor call.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .set({ html: true, breaks: true })
* .set({ typographer, true });
* ```
*
* __Note:__ To achieve the best possible performance, don't modify a
* `markdown-it` instance options on the fly. If you need multiple configurations
* it's best to create multiple instances and initialize each with separate
* config.
**/
MarkdownIt.prototype.set = function (options) {
utils.assign(this.options, options);
return this;
};
/** chainable, internal
* MarkdownIt.configure(presets)
*
* Batch load of all options and compenent settings. This is internal method,
* and you probably will not need it. But if you with - see available presets
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
*
* We strongly recommend to use presets instead of direct config loads. That
* will give better compatibility with next versions.
**/
MarkdownIt.prototype.configure = function (presets) {
var self = this, presetName;
if (utils.isString(presets)) {
presetName = presets;
presets = config[presetName];
if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); }
}
if (!presets) { throw new Error('Wrong `markdown-it` preset, can\'t be empty'); }
if (presets.options) { self.set(presets.options); }
if (presets.components) {
Object.keys(presets.components).forEach(function (name) {
if (presets.components[name].rules) {
self[name].ruler.enableOnly(presets.components[name].rules);
}
if (presets.components[name].rules2) {
self[name].ruler2.enableOnly(presets.components[name].rules2);
}
});
}
return this;
};
/** chainable
* MarkdownIt.enable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to enable
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable list or rules. It will automatically find appropriate components,
* containing rules with given names. If rule not found, and `ignoreInvalid`
* not set - throws exception.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .enable(['sub', 'sup'])
* .disable('smartquotes');
* ```
**/
MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
var result = [];
if (!Array.isArray(list)) { list = [ list ]; }
[ 'core', 'block', 'inline' ].forEach(function (chain) {
result = result.concat(this[chain].ruler.enable(list, true));
}, this);
result = result.concat(this.inline.ruler2.enable(list, true));
var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
if (missed.length && !ignoreInvalid) {
throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
}
return this;
};
/** chainable
* MarkdownIt.disable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* The same as [[MarkdownIt.enable]], but turn specified rules off.
**/
MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
var result = [];
if (!Array.isArray(list)) { list = [ list ]; }
[ 'core', 'block', 'inline' ].forEach(function (chain) {
result = result.concat(this[chain].ruler.disable(list, true));
}, this);
result = result.concat(this.inline.ruler2.disable(list, true));
var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
if (missed.length && !ignoreInvalid) {
throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
}
return this;
};
/** chainable
* MarkdownIt.use(plugin, params)
*
* Load specified plugin with given params into current parser instance.
* It's just a sugar to call `plugin(md, params)` with curring.
*
* ##### Example
*
* ```javascript
* var iterator = require('markdown-it-for-inline');
* var md = require('markdown-it')()
* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
* });
* ```
**/
MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
plugin.apply(plugin, args);
return this;
};
/** internal
* MarkdownIt.parse(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* Parse input string and returns list of block tokens (special token type
* "inline" will contain list of inline tokens). You should not call this
* method directly, until you write custom renderer (for example, to produce
* AST).
*
* `env` is used to pass data between "distributed" rules and return additional
* metadata like reference info, needed for the renderer. It also can be used to
* inject data in specific cases. Usually, you will be ok to pass `{}`,
* and then pass updated object to renderer.
**/
MarkdownIt.prototype.parse = function (src, env) {
if (typeof src !== 'string') {
throw new Error('Input data should be a String');
}
var state = new this.core.State(src, this, env);
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.render(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Render markdown string into html. It does all magic for you :).
*
* `env` can be used to inject additional metadata (`{}` by default).
* But you will not need it with high probability. See also comment
* in [[MarkdownIt.parse]].
**/
MarkdownIt.prototype.render = function (src, env) {
env = env || {};
return this.renderer.render(this.parse(src, env), this.options, env);
};
/** internal
* MarkdownIt.parseInline(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
* block tokens list with the single `inline` element, containing parsed inline
* tokens in `children` property. Also updates `env` object.
**/
MarkdownIt.prototype.parseInline = function (src, env) {
var state = new this.core.State(src, this, env);
state.inlineMode = true;
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.renderInline(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Similar to [[MarkdownIt.render]] but for single paragraph content. Result
* will NOT be wrapped into `<p>` tags.
**/
MarkdownIt.prototype.renderInline = function (src, env) {
env = env || {};
return this.renderer.render(this.parseInline(src, env), this.options, env);
};
module.exports = MarkdownIt;
/***/ }),
/* 37 */
/***/ (function(module, exports) {
module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"","backsim":"∽","backsimeq":"⋍","Backslash":"","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"","Bernoullis":"","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"","caps":"∩︀","caret":"","caron":"ˇ","Cayleys":"","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"<EFBFBD><EFBFBD>
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var encodeCache = {};
// Create a lookup array where anything but characters in `chars` string
// and alphanumeric chars is percent-encoded.
//
function getEncodeCache(exclude) {
var i, ch, cache = encodeCache[exclude];
if (cache) { return cache; }
cache = encodeCache[exclude] = [];
for (i = 0; i < 128; i++) {
ch = String.fromCharCode(i);
if (/^[0-9a-z]$/i.test(ch)) {
// always allow unencoded alphanumeric characters
cache.push(ch);
} else {
cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
}
}
for (i = 0; i < exclude.length; i++) {
cache[exclude.charCodeAt(i)] = exclude[i];
}
return cache;
}
// Encode unsafe characters with percent-encoding, skipping already
// encoded sequences.
//
// - string - string to encode
// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)
// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)
//
function encode(string, exclude, keepEscaped) {
var i, l, code, nextCode, cache,
result = '';
if (typeof exclude !== 'string') {
// encode(string, keepEscaped)
keepEscaped = exclude;
exclude = encode.defaultChars;
}
if (typeof keepEscaped === 'undefined') {
keepEscaped = true;
}
cache = getEncodeCache(exclude);
for (i = 0, l = string.length; i < l; i++) {
code = string.charCodeAt(i);
if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
result += string.slice(i, i + 3);
i += 2;
continue;
}
}
if (code < 128) {
result += cache[code];
continue;
}
if (code >= 0xD800 && code <= 0xDFFF) {
if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
nextCode = string.charCodeAt(i + 1);
if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
result += encodeURIComponent(string[i] + string[i + 1]);
i++;
continue;
}
}
result += '%EF%BF%BD';
continue;
}
result += encodeURIComponent(string[i]);
}
return result;
}
encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
encode.componentChars = "-_.!~*'()";
module.exports = encode;
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable no-bitwise */
var decodeCache = {};
function getDecodeCache(exclude) {
var i, ch, cache = decodeCache[exclude];
if (cache) { return cache; }
cache = decodeCache[exclude] = [];
for (i = 0; i < 128; i++) {
ch = String.fromCharCode(i);
cache.push(ch);
}
for (i = 0; i < exclude.length; i++) {
ch = exclude.charCodeAt(i);
cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
}
return cache;
}
// Decode percent-encoded string.
//
function decode(string, exclude) {
var cache;
if (typeof exclude !== 'string') {
exclude = decode.defaultChars;
}
cache = getDecodeCache(exclude);
return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
var i, l, b1, b2, b3, b4, chr,
result = '';
for (i = 0, l = seq.length; i < l; i += 3) {
b1 = parseInt(seq.slice(i + 1, i + 3), 16);
if (b1 < 0x80) {
result += cache[b1];
continue;
}
if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {
// 110xxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
if ((b2 & 0xC0) === 0x80) {
chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);
if (chr < 0x80) {
result += '\ufffd\ufffd';
} else {
result += String.fromCharCode(chr);
}
i += 3;
continue;
}
}
if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {
// 1110xxxx 10xxxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
b3 = parseInt(seq.slice(i + 7, i + 9), 16);
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);
if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {
result += '\ufffd\ufffd\ufffd';
} else {
result += String.fromCharCode(chr);
}
i += 6;
continue;
}
}
if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {
// 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
b3 = parseInt(seq.slice(i + 7, i + 9), 16);
b4 = parseInt(seq.slice(i + 10, i + 12), 16);
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);
if (chr < 0x10000 || chr > 0x10FFFF) {
result += '\ufffd\ufffd\ufffd\ufffd';
} else {
chr -= 0x10000;
result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
}
i += 9;
continue;
}
}
result += '\ufffd';
}
return result;
});
}
decode.defaultChars = ';/?:@&=+$,#';
decode.componentChars = '';
module.exports = decode;
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function format(url) {
var result = '';
result += url.protocol || '';
result += url.slashes ? '//' : '';
result += url.auth ? url.auth + '@' : '';
if (url.hostname && url.hostname.indexOf(':') !== -1) {
// ipv6 address
result += '[' + url.hostname + ']';
} else {
result += url.hostname || '';
}
result += url.port ? ':' + url.port : '';
result += url.pathname || '';
result += url.search || '';
result += url.hash || '';
return result;
};
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// Changes from joyent/node:
//
// 1. No leading slash in paths,
// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
//
// 2. Backslashes are not replaced with slashes,
// so `http:\\example.org\` is treated like a relative path
//
// 3. Trailing colon is treated like a part of the path,
// i.e. in `http://example.org:foo` pathname is `:foo`
//
// 4. Nothing is URL-encoded in the resulting object,
// (in joyent/node some chars in auth and paths are encoded)
//
// 5. `url.parse()` does not have `parseQueryString` argument
//
// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
// which can be constructed using other parts of the url.
//
function Url() {
this.protocol = null;
this.slashes = null;
this.auth = null;
this.port = null;
this.hostname = null;
this.hash = null;
this.search = null;
this.pathname = null;
}
// Reference: RFC 3986, RFC 1808, RFC 2396
// define these here so at least they only have to be
// compiled once on the first module load.
var protocolPattern = /^([a-z0-9.+-]+:)/i,
portPattern = /:[0-9]*$/,
// Special case for a simple path URL
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
// RFC 2396: characters reserved for delimiting URLs.
// We actually just auto-escape these.
delims = [ '<', '>', '"', '`', ' ', '\r', '\n', '\t' ],
// RFC 2396: characters not allowed for various reasons.
unwise = [ '{', '}', '|', '\\', '^', '`' ].concat(delims),
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
autoEscape = [ '\'' ].concat(unwise),
// Characters that are never ever allowed in a hostname.
// Note that any invalid chars are also handled, but these
// are the ones that are *expected* to be seen, so we fast-path
// them.
nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),
hostEndingChars = [ '/', '?', '#' ],
hostnameMaxLen = 255,
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
// protocols that can allow "unsafe" and "unwise" chars.
/* eslint-disable no-script-url */
// protocols that never have a hostname.
hostlessProtocol = {
'javascript': true,
'javascript:': true
},
// protocols that always contain a // bit.
slashedProtocol = {
'http': true,
'https': true,
'ftp': true,
'gopher': true,
'file': true,
'http:': true,
'https:': true,
'ftp:': true,
'gopher:': true,
'file:': true
};
/* eslint-enable no-script-url */
function urlParse(url, slashesDenoteHost) {
if (url && url instanceof Url) { return url; }
var u = new Url();
u.parse(url, slashesDenoteHost);
return u;
}
Url.prototype.parse = function(url, slashesDenoteHost) {
var i, l, lowerProto, hec, slashes,
rest = url;
// trim before proceeding.
// This is to support parse stuff like " http://foo.com \n"
rest = rest.trim();
if (!slashesDenoteHost && url.split('#').length === 1) {
// Try fast path regexp
var simplePath = simplePathPattern.exec(rest);
if (simplePath) {
this.pathname = simplePath[1];
if (simplePath[2]) {
this.search = simplePath[2];
}
return this;
}
}
var proto = protocolPattern.exec(rest);
if (proto) {
proto = proto[0];
lowerProto = proto.toLowerCase();
this.protocol = proto;
rest = rest.substr(proto.length);
}
// figure out if it's got a host
// user@server is *always* interpreted as a hostname, and url
// resolution will treat //foo/bar as host=foo,path=bar because that's
// how the browser resolves relative URLs.
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
slashes = rest.substr(0, 2) === '//';
if (slashes && !(proto && hostlessProtocol[proto])) {
rest = rest.substr(2);
this.slashes = true;
}
}
if (!hostlessProtocol[proto] &&
(slashes || (proto && !slashedProtocol[proto]))) {
// there's a hostname.
// the first instance of /, ?, ;, or # ends the host.
//
// If there is an @ in the hostname, then non-host chars *are* allowed
// to the left of the last @ sign, unless some host-ending character
// comes *before* the @-sign.
// URLs are obnoxious.
//
// ex:
// http://a@b@c/ => user:a@b host:c
// http://a@b?@c => user:a host:c path:/?@c
// v0.12 TODO(isaacs): This is not quite how Chrome does things.
// Review our test case against browsers more comprehensively.
// find the first instance of any hostEndingChars
var hostEnd = -1;
for (i = 0; i < hostEndingChars.length; i++) {
hec = rest.indexOf(hostEndingChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// at this point, either we have an explicit point where the
// auth portion cannot go past, or the last @ char is the decider.
var auth, atSign;
if (hostEnd === -1) {
// atSign can be anywhere.
atSign = rest.lastIndexOf('@');
} else {
// atSign must be in auth portion.
// http://a@b/c@d => host:b auth:a path:/c@d
atSign = rest.lastIndexOf('@', hostEnd);
}
// Now we have a portion which is definitely the auth.
// Pull that off.
if (atSign !== -1) {
auth = rest.slice(0, atSign);
rest = rest.slice(atSign + 1);
this.auth = auth;
}
// the host is the remaining to the left of the first non-host char
hostEnd = -1;
for (i = 0; i < nonHostChars.length; i++) {
hec = rest.indexOf(nonHostChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// if we still have not hit it, then the entire thing is a host.
if (hostEnd === -1) {
hostEnd = rest.length;
}
if (rest[hostEnd - 1] === ':') { hostEnd--; }
var host = rest.slice(0, hostEnd);
rest = rest.slice(hostEnd);
// pull out port.
this.parseHost(host);
// we've indicated that there is a hostname,
// so even if it's empty, it has to be present.
this.hostname = this.hostname || '';
// if hostname begins with [ and ends with ]
// assume that it's an IPv6 address.
var ipv6Hostname = this.hostname[0] === '[' &&
this.hostname[this.hostname.length - 1] === ']';
// validate a little.
if (!ipv6Hostname) {
var hostparts = this.hostname.split(/\./);
for (i = 0, l = hostparts.length; i < l; i++) {
var part = hostparts[i];
if (!part) { continue; }
if (!part.match(hostnamePartPattern)) {
var newpart = '';
for (var j = 0, k = part.length; j < k; j++) {
if (part.charCodeAt(j) > 127) {
// we replace non-ASCII char with a temporary placeholder
// we need this to make sure size of hostname is not
// broken by replacing non-ASCII by nothing
newpart += 'x';
} else {
newpart += part[j];
}
}
// we test again with ASCII char only
if (!newpart.match(hostnamePartPattern)) {
var validParts = hostparts.slice(0, i);
var notHost = hostparts.slice(i + 1);
var bit = part.match(hostnamePartStart);
if (bit) {
validParts.push(bit[1]);
notHost.unshift(bit[2]);
}
if (notHost.length) {
rest = notHost.join('.') + rest;
}
this.hostname = validParts.join('.');
break;
}
}
}
}
if (this.hostname.length > hostnameMaxLen) {
this.hostname = '';
}
// strip [ and ] from the hostname
// the host field still retains them, though
if (ipv6Hostname) {
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
}
}
// chop off from the tail first.
var hash = rest.indexOf('#');
if (hash !== -1) {
// got a fragment string.
this.hash = rest.substr(hash);
rest = rest.slice(0, hash);
}
var qm = rest.indexOf('?');
if (qm !== -1) {
this.search = rest.substr(qm);
rest = rest.slice(0, qm);
}
if (rest) { this.pathname = rest; }
if (slashedProtocol[lowerProto] &&
this.hostname && !this.pathname) {
this.pathname = '';
}
return this;
};
Url.prototype.parseHost = function(host) {
var port = portPattern.exec(host);
if (port) {
port = port[0];
if (port !== ':') {
this.port = port.substr(1);
}
host = host.substr(0, host.length - port.length);
}
if (host) { this.hostname = host; }
};
module.exports = urlParse;
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.Any = __webpack_require__(17);
exports.Cc = __webpack_require__(18);
exports.Cf = __webpack_require__(43);
exports.P = __webpack_require__(8);
exports.Z = __webpack_require__(19);
/***/ }),
/* 43 */
/***/ (function(module, exports) {
module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Just a shortcut for bulk export
exports.parseLinkLabel = __webpack_require__(45);
exports.parseLinkDestination = __webpack_require__(46);
exports.parseLinkTitle = __webpack_require__(47);
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Parse link label
//
// this function assumes that first character ("[") already matches;
// returns the end of the label
//
module.exports = function parseLinkLabel(state, start, disableNested) {
var level, found, marker, prevPos,
labelEnd = -1,
max = state.posMax,
oldPos = state.pos;
state.pos = start + 1;
level = 1;
while (state.pos < max) {
marker = state.src.charCodeAt(state.pos);
if (marker === 0x5D /* ] */) {
level--;
if (level === 0) {
found = true;
break;
}
}
prevPos = state.pos;
state.md.inline.skipToken(state);
if (marker === 0x5B /* [ */) {
if (prevPos === state.pos - 1) {
// increase level if we find text `[`, which is not a part of any token
level++;
} else if (disableNested) {
state.pos = oldPos;
return -1;
}
}
}
if (found) {
labelEnd = state.pos;
}
// restore old state
state.pos = oldPos;
return labelEnd;
};
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Parse link destination
//
var isSpace = __webpack_require__(0).isSpace;
var unescapeAll = __webpack_require__(0).unescapeAll;
module.exports = function parseLinkDestination(str, pos, max) {
var code, level,
lines = 0,
start = pos,
result = {
ok: false,
pos: 0,
lines: 0,
str: ''
};
if (str.charCodeAt(pos) === 0x3C /* < */) {
pos++;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 0x0A /* \n */ || isSpace(code)) { return result; }
if (code === 0x3E /* > */) {
result.pos = pos + 1;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
}
if (code === 0x5C /* \ */ && pos + 1 < max) {
pos += 2;
continue;
}
pos++;
}
// no closing '>'
return result;
}
// this should be ... } else { ... branch
level = 0;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 0x20) { break; }
// ascii control characters
if (code < 0x20 || code === 0x7F) { break; }
if (code === 0x5C /* \ */ && pos + 1 < max) {
pos += 2;
continue;
}
if (code === 0x28 /* ( */) {
level++;
}
if (code === 0x29 /* ) */) {
if (level === 0) { break; }
level--;
}
pos++;
}
if (start === pos) { return result; }
if (level !== 0) { return result; }
result.str = unescapeAll(str.slice(start, pos));
result.lines = lines;
result.pos = pos;
result.ok = true;
return result;
};
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Parse link title
//
var unescapeAll = __webpack_require__(0).unescapeAll;
module.exports = function parseLinkTitle(str, pos, max) {
var code,
marker,
lines = 0,
start = pos,
result = {
ok: false,
pos: 0,
lines: 0,
str: ''
};
if (pos >= max) { return result; }
marker = str.charCodeAt(pos);
if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }
pos++;
// if opening marker is "(", switch it to closing marker ")"
if (marker === 0x28) { marker = 0x29; }
while (pos < max) {
code = str.charCodeAt(pos);
if (code === marker) {
result.pos = pos + 1;
result.lines = lines;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
} else if (code === 0x0A) {
lines++;
} else if (code === 0x5C /* \ */ && pos + 1 < max) {
pos++;
if (str.charCodeAt(pos) === 0x0A) {
lines++;
}
}
pos++;
}
return result;
};
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* class Renderer
*
* Generates HTML from parsed token stream. Each instance has independent
* copy of rules. Those can be rewritten with ease. Also, you can add new
* rules if you create plugin and adds new token types.
**/
var assign = __webpack_require__(0).assign;
var unescapeAll = __webpack_require__(0).unescapeAll;
var escapeHtml = __webpack_require__(0).escapeHtml;
////////////////////////////////////////////////////////////////////////////////
var default_rules = {};
default_rules.code_inline = function (tokens, idx, options, env, slf) {
var token = tokens[idx];
return '<code' + slf.renderAttrs(token) + '>' +
escapeHtml(tokens[idx].content) +
'</code>';
};
default_rules.code_block = function (tokens, idx, options, env, slf) {
var token = tokens[idx];
return '<pre' + slf.renderAttrs(token) + '><code>' +
escapeHtml(tokens[idx].content) +
'</code></pre>\n';
};
default_rules.fence = function (tokens, idx, options, env, slf) {
var token = tokens[idx],
info = token.info ? unescapeAll(token.info).trim() : '',
langName = '',
highlighted, i, tmpAttrs, tmpToken;
if (info) {
langName = info.split(/\s+/g)[0];
}
if (options.highlight) {
highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);
} else {
highlighted = escapeHtml(token.content);
}
if (highlighted.indexOf('<pre') === 0) {
return highlighted + '\n';
}
// If language exists, inject class gently, without modifying original token.
// May be, one day we will add .clone() for token and simplify this part, but
// now we prefer to keep things local.
if (info) {
i = token.attrIndex('class');
tmpAttrs = token.attrs ? token.attrs.slice() : [];
if (i < 0) {
tmpAttrs.push([ 'class', options.langPrefix + langName ]);
} else {
tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
}
// Fake token just to render attributes
tmpToken = {
attrs: tmpAttrs
};
return '<pre><code' + slf.renderAttrs(tmpToken) + '>'
+ highlighted
+ '</code></pre>\n';
}
return '<pre><code' + slf.renderAttrs(token) + '>'
+ highlighted
+ '</code></pre>\n';
};
default_rules.image = function (tokens, idx, options, env, slf) {
var token = tokens[idx];
// "alt" attr MUST be set, even if empty. Because it's mandatory and
// should be placed on proper position for tests.
//
// Replace content with actual value
token.attrs[token.attrIndex('alt')][1] =
slf.renderInlineAsText(token.children, options, env);
return slf.renderToken(tokens, idx, options);
};
default_rules.hardbreak = function (tokens, idx, options /*, env */) {
return options.xhtmlOut ? '<br />\n' : '<br>\n';
};
default_rules.softbreak = function (tokens, idx, options /*, env */) {
return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n';
};
default_rules.text = function (tokens, idx /*, options, env */) {
return escapeHtml(tokens[idx].content);
};
default_rules.html_block = function (tokens, idx /*, options, env */) {
return tokens[idx].content;
};
default_rules.html_inline = function (tokens, idx /*, options, env */) {
return tokens[idx].content;
};
/**
* new Renderer()
*
* Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
**/
function Renderer() {
/**
* Renderer#rules -> Object
*
* Contains render rules for tokens. Can be updated and extended.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.renderer.rules.strong_open = function () { return '<b>'; };
* md.renderer.rules.strong_close = function () { return '</b>'; };
*
* var result = md.renderInline(...);
* ```
*
* Each rule is called as independed static function with fixed signature:
*
* ```javascript
* function my_token_render(tokens, idx, options, env, renderer) {
* // ...
* return renderedHTML;
* }
* ```
*
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
* for more details and examples.
**/
this.rules = assign({}, default_rules);
}
/**
* Renderer.renderAttrs(token) -> String
*
* Render token attributes to string.
**/
Renderer.prototype.renderAttrs = function renderAttrs(token) {
var i, l, result;
if (!token.attrs) { return ''; }
result = '';
for (i = 0, l = token.attrs.length; i < l; i++) {
result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
}
return result;
};
/**
* Renderer.renderToken(tokens, idx, options) -> String
* - tokens (Array): list of tokens
* - idx (Numbed): token index to render
* - options (Object): params of parser instance
*
* Default token renderer. Can be overriden by custom function
* in [[Renderer#rules]].
**/
Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
var nextToken,
result = '',
needLf = false,
token = tokens[idx];
// Tight list paragraphs
if (token.hidden) {
return '';
}
// Insert a newline between hidden paragraph and subsequent opening
// block-level tag.
//
// For example, here we should insert a newline before blockquote:
// - a
// >
//
if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
result += '\n';
}
// Add token name, e.g. `<img`
result += (token.nesting === -1 ? '</' : '<') + token.tag;
// Encode attributes, e.g. `<img src="foo"`
result += this.renderAttrs(token);
// Add a slash for self-closing tags, e.g. `<img src="foo" /`
if (token.nesting === 0 && options.xhtmlOut) {
result += ' /';
}
// Check if we need to add a newline after this tag
if (token.block) {
needLf = true;
if (token.nesting === 1) {
if (idx + 1 < tokens.length) {
nextToken = tokens[idx + 1];
if (nextToken.type === 'inline' || nextToken.hidden) {
// Block-level tag containing an inline tag.
//
needLf = false;
} else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
// Opening tag + closing tag of the same type. E.g. `<li></li>`.
//
needLf = false;
}
}
}
}
result += needLf ? '>\n' : '>';
return result;
};
/**
* Renderer.renderInline(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* The same as [[Renderer.render]], but for single token of `inline` type.
**/
Renderer.prototype.renderInline = function (tokens, options, env) {
var type,
result = '',
rules = this.rules;
for (var i = 0, len = tokens.length; i < len; i++) {
type = tokens[i].type;
if (typeof rules[type] !== 'undefined') {
result += rules[type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options);
}
}
return result;
};
/** internal
* Renderer.renderInlineAsText(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Special kludge for image `alt` attributes to conform CommonMark spec.
* Don't try to use it! Spec requires to show `alt` content with stripped markup,
* instead of simple escaping.
**/
Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
var result = '';
for (var i = 0, len = tokens.length; i < len; i++) {
if (tokens[i].type === 'text') {
result += tokens[i].content;
} else if (tokens[i].type === 'image') {
result += this.renderInlineAsText(tokens[i].children, options, env);
}
}
return result;
};
/**
* Renderer.render(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Takes token stream and generates HTML. Probably, you will never need to call
* this method directly.
**/
Renderer.prototype.render = function (tokens, options, env) {
var i, len, type,
result = '',
rules = this.rules;
for (i = 0, len = tokens.length; i < len; i++) {
type = tokens[i].type;
if (type === 'inline') {
result += this.renderInline(tokens[i].children, options, env);
} else if (typeof rules[type] !== 'undefined') {
result += rules[tokens[i].type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options, env);
}
}
return result;
};
module.exports = Renderer;
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** internal
* class Core
*
* Top-level rules executor. Glues block/inline parsers and does intermediate
* transformations.
**/
var Ruler = __webpack_require__(9);
var _rules = [
[ 'normalize', __webpack_require__(50) ],
[ 'block', __webpack_require__(51) ],
[ 'inline', __webpack_require__(52) ],
[ 'linkify', __webpack_require__(53) ],
[ 'replacements', __webpack_require__(54) ],
[ 'smartquotes', __webpack_require__(55) ]
];
/**
* new Core()
**/
function Core() {
/**
* Core#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of core rules.
**/
this.ruler = new Ruler();
for (var i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1]);
}
}
/**
* Core.process(state)
*
* Executes core chain rules.
**/
Core.prototype.process = function (state) {
var i, l, rules;
rules = this.ruler.getRules('');
for (i = 0, l = rules.length; i < l; i++) {
rules[i](state);
}
};
Core.prototype.State = __webpack_require__(56);
module.exports = Core;
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Normalize input string
var NEWLINES_RE = /\r[\n\u0085]?|[\u2424\u2028\u0085]/g;
var NULL_RE = /\u0000/g;
module.exports = function inline(state) {
var str;
// Normalize newlines
str = state.src.replace(NEWLINES_RE, '\n');
// Replace NULL characters
str = str.replace(NULL_RE, '\uFFFD');
state.src = str;
};
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function block(state) {
var token;
if (state.inlineMode) {
token = new state.Token('inline', '', 0);
token.content = state.src;
token.map = [ 0, 1 ];
token.children = [];
state.tokens.push(token);
} else {
state.md.block.parse(state.src, state.md, state.env, state.tokens);
}
};
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function inline(state) {
var tokens = state.tokens, tok, i, l;
// Parse inlines
for (i = 0, l = tokens.length; i < l; i++) {
tok = tokens[i];
if (tok.type === 'inline') {
state.md.inline.parse(tok.content, state.md, state.env, tok.children);
}
}
};
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Replace link-like texts with link nodes.
//
// Currently restricted by `md.validateLink()` to http/https/ftp
//
var arrayReplaceAt = __webpack_require__(0).arrayReplaceAt;
function isLinkOpen(str) {
return /^<a[>\s]/i.test(str);
}
function isLinkClose(str) {
return /^<\/a\s*>/i.test(str);
}
module.exports = function linkify(state) {
var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,
level, htmlLinkLevel, url, fullUrl, urlText,
blockTokens = state.tokens,
links;
if (!state.md.options.linkify) { return; }
for (j = 0, l = blockTokens.length; j < l; j++) {
if (blockTokens[j].type !== 'inline' ||
!state.md.linkify.pretest(blockTokens[j].content)) {
continue;
}
tokens = blockTokens[j].children;
htmlLinkLevel = 0;
// We scan from the end, to keep position when new tags added.
// Use reversed logic in links start/end match
for (i = tokens.length - 1; i >= 0; i--) {
currentToken = tokens[i];
// Skip content of markdown links
if (currentToken.type === 'link_close') {
i--;
while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
i--;
}
continue;
}
// Skip content of html tag links
if (currentToken.type === 'html_inline') {
if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {
htmlLinkLevel--;
}
if (isLinkClose(currentToken.content)) {
htmlLinkLevel++;
}
}
if (htmlLinkLevel > 0) { continue; }
if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
text = currentToken.content;
links = state.md.linkify.match(text);
// Now split string to nodes
nodes = [];
level = currentToken.level;
lastPos = 0;
for (ln = 0; ln < links.length; ln++) {
url = links[ln].url;
fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) { continue; }
urlText = links[ln].text;
// Linkifier might send raw hostnames like "example.com", where url
// starts with domain name. So we prepend http:// in those cases,
// and remove it afterwards.
//
if (!links[ln].schema) {
urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
} else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
} else {
urlText = state.md.normalizeLinkText(urlText);
}
pos = links[ln].index;
if (pos > lastPos) {
token = new state.Token('text', '', 0);
token.content = text.slice(lastPos, pos);
token.level = level;
nodes.push(token);
}
token = new state.Token('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.level = level++;
token.markup = 'linkify';
token.info = 'auto';
nodes.push(token);
token = new state.Token('text', '', 0);
token.content = urlText;
token.level = level;
nodes.push(token);
token = new state.Token('link_close', 'a', -1);
token.level = --level;
token.markup = 'linkify';
token.info = 'auto';
nodes.push(token);
lastPos = links[ln].lastIndex;
}
if (lastPos < text.length) {
token = new state.Token('text', '', 0);
token.content = text.slice(lastPos);
token.level = level;
nodes.push(token);
}
// replace current node
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
}
}
}
};
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Simple typographyc replacements
//
// (c) (C) → ©
// (tm) (TM) → ™
// (r) (R) → ®
// +- → ±
// (p) (P) -> §
// ... → … (also ?.... → ?.., !.... → !..)
// ???????? → ???, !!!!! → !!!, `,,` → `,`
// -- → &ndash;, --- → &mdash;
//
// TODO:
// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
// - miltiplication 2 x 4 -> 2 × 4
var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
// Workaround for phantomjs - need regex without /g flag,
// or root check will fail every second time
var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i;
var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig;
var SCOPED_ABBR = {
c: '©',
r: '®',
p: '§',
tm: '™'
};
function replaceFn(match, name) {
return SCOPED_ABBR[name.toLowerCase()];
}
function replace_scoped(inlineTokens) {
var i, token, inside_autolink = 0;
for (i = inlineTokens.length - 1; i >= 0; i--) {
token = inlineTokens[i];
if (token.type === 'text' && !inside_autolink) {
token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
}
if (token.type === 'link_open' && token.info === 'auto') {
inside_autolink--;
}
if (token.type === 'link_close' && token.info === 'auto') {
inside_autolink++;
}
}
}
function replace_rare(inlineTokens) {
var i, token, inside_autolink = 0;
for (i = inlineTokens.length - 1; i >= 0; i--) {
token = inlineTokens[i];
if (token.type === 'text' && !inside_autolink) {
if (RARE_RE.test(token.content)) {
token.content = token.content
.replace(/\+-/g, '±')
// .., ..., ....... -> …
// but ?..... & !..... -> ?.. & !..
.replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..')
.replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
// em-dash
.replace(/(^|[^-])---([^-]|$)/mg, '$1\u2014$2')
// en-dash
.replace(/(^|\s)--(\s|$)/mg, '$1\u2013$2')
.replace(/(^|[^-\s])--([^-\s]|$)/mg, '$1\u2013$2');
}
}
if (token.type === 'link_open' && token.info === 'auto') {
inside_autolink--;
}
if (token.type === 'link_close' && token.info === 'auto') {
inside_autolink++;
}
}
}
module.exports = function replace(state) {
var blkIdx;
if (!state.md.options.typographer) { return; }
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== 'inline') { continue; }
if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
replace_scoped(state.tokens[blkIdx].children);
}
if (RARE_RE.test(state.tokens[blkIdx].content)) {
replace_rare(state.tokens[blkIdx].children);
}
}
};
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Convert straight quotation marks to typographic ones
//
var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
var isPunctChar = __webpack_require__(0).isPunctChar;
var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
var QUOTE_TEST_RE = /['"]/;
var QUOTE_RE = /['"]/g;
var APOSTROPHE = '\u2019'; /* */
function replaceAt(str, index, ch) {
return str.substr(0, index) + ch + str.substr(index + 1);
}
function process_inlines(tokens, state) {
var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,
isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,
canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;
stack = [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
thisLevel = tokens[i].level;
for (j = stack.length - 1; j >= 0; j--) {
if (stack[j].level <= thisLevel) { break; }
}
stack.length = j + 1;
if (token.type !== 'text') { continue; }
text = token.content;
pos = 0;
max = text.length;
/*eslint no-labels:0,block-scoped-var:0*/
OUTER:
while (pos < max) {
QUOTE_RE.lastIndex = pos;
t = QUOTE_RE.exec(text);
if (!t) { break; }
canOpen = canClose = true;
pos = t.index + 1;
isSingle = (t[0] === "'");
// Find previous character,
// default to space if it's the beginning of the line
//
lastChar = 0x20;
if (t.index - 1 >= 0) {
lastChar = text.charCodeAt(t.index - 1);
} else {
for (j = i - 1; j >= 0; j--) {
if (tokens[j].type !== 'text') { continue; }
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
break;
}
}
// Find next character,
// default to space if it's the end of the line
//
nextChar = 0x20;
if (pos < max) {
nextChar = text.charCodeAt(pos);
} else {
for (j = i + 1; j < tokens.length; j++) {
if (tokens[j].type !== 'text') { continue; }
nextChar = tokens[j].content.charCodeAt(0);
break;
}
}
isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
isLastWhiteSpace = isWhiteSpace(lastChar);
isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
canOpen = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
canOpen = false;
}
}
if (isLastWhiteSpace) {
canClose = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
canClose = false;
}
}
if (nextChar === 0x22 /* " */ && t[0] === '"') {
if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
// special case: 1"" - count first quote as an inch
canClose = canOpen = false;
}
}
if (canOpen && canClose) {
// treat this as the middle of the word
canOpen = false;
canClose = isNextPunctChar;
}
if (!canOpen && !canClose) {
// middle of word
if (isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
continue;
}
if (canClose) {
// this could be a closing quote, rewind the stack to get a match
for (j = stack.length - 1; j >= 0; j--) {
item = stack[j];
if (stack[j].level < thisLevel) { break; }
if (item.single === isSingle && stack[j].level === thisLevel) {
item = stack[j];
if (isSingle) {
openQuote = state.md.options.quotes[2];
closeQuote = state.md.options.quotes[3];
} else {
openQuote = state.md.options.quotes[0];
closeQuote = state.md.options.quotes[1];
}
// replace token.content *before* tokens[item.token].content,
// because, if they are pointing at the same token, replaceAt
// could mess up indices when quote length != 1
token.content = replaceAt(token.content, t.index, closeQuote);
tokens[item.token].content = replaceAt(
tokens[item.token].content, item.pos, openQuote);
pos += closeQuote.length - 1;
if (item.token === i) { pos += openQuote.length - 1; }
text = token.content;
max = text.length;
stack.length = j;
continue OUTER;
}
}
}
if (canOpen) {
stack.push({
token: i,
pos: t.index,
single: isSingle,
level: thisLevel
});
} else if (canClose && isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
}
}
}
module.exports = function smartquotes(state) {
/*eslint max-depth:0*/
var blkIdx;
if (!state.md.options.typographer) { return; }
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== 'inline' ||
!QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
continue;
}
process_inlines(state.tokens[blkIdx].children, state);
}
};
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Core state object
//
var Token = __webpack_require__(10);
function StateCore(src, md, env) {
this.src = src;
this.env = env;
this.tokens = [];
this.inlineMode = false;
this.md = md; // link to parser instance
}
// re-export Token class to use in core rules
StateCore.prototype.Token = Token;
module.exports = StateCore;
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** internal
* class ParserBlock
*
* Block-level tokenizer.
**/
var Ruler = __webpack_require__(9);
var _rules = [
// First 2 params - rule name & source. Secondary array - list of rules,
// which can be terminated by this one.
[ 'table', __webpack_require__(58), [ 'paragraph', 'reference' ] ],
[ 'code', __webpack_require__(59) ],
[ 'fence', __webpack_require__(60), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'blockquote', __webpack_require__(61), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'hr', __webpack_require__(62), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'list', __webpack_require__(63), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'reference', __webpack_require__(64) ],
[ 'heading', __webpack_require__(65), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'lheading', __webpack_require__(66) ],
[ 'html_block', __webpack_require__(67), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'paragraph', __webpack_require__(69) ]
];
/**
* new ParserBlock()
**/
function ParserBlock() {
/**
* ParserBlock#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of block rules.
**/
this.ruler = new Ruler();
for (var i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });
}
}
// Generate tokens for input range
//
ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
var ok, i,
rules = this.ruler.getRules(''),
len = rules.length,
line = startLine,
hasEmptyLines = false,
maxNesting = state.md.options.maxNesting;
while (line < endLine) {
state.line = line = state.skipEmptyLines(line);
if (line >= endLine) { break; }
// Termination condition for nested calls.
// Nested calls currently used for blockquotes & lists
if (state.sCount[line] < state.blkIndent) { break; }
// If nesting level exceeded - skip tail to the end. That's not ordinary
// situation and we should not care about content.
if (state.level >= maxNesting) {
state.line = endLine;
break;
}
// Try all possible rules.
// On success, rule should:
//
// - update `state.line`
// - update `state.tokens`
// - return true
for (i = 0; i < len; i++) {
ok = rules[i](state, line, endLine, false);
if (ok) { break; }
}
// set state.tight if we had an empty line before current tag
// i.e. latest empty line should not count
state.tight = !hasEmptyLines;
// paragraph might "eat" one newline after it in nested lists
if (state.isEmpty(state.line - 1)) {
hasEmptyLines = true;
}
line = state.line;
if (line < endLine && state.isEmpty(line)) {
hasEmptyLines = true;
line++;
state.line = line;
}
}
};
/**
* ParserBlock.parse(str, md, env, outTokens)
*
* Process input string and push block tokens into `outTokens`
**/
ParserBlock.prototype.parse = function (src, md, env, outTokens) {
var state;
if (!src) { return; }
state = new this.State(src, md, env, outTokens);
this.tokenize(state, state.line, state.lineMax);
};
ParserBlock.prototype.State = __webpack_require__(70);
module.exports = ParserBlock;
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// GFM table, non-standard
var isSpace = __webpack_require__(0).isSpace;
function getLine(state, line) {
var pos = state.bMarks[line] + state.blkIndent,
max = state.eMarks[line];
return state.src.substr(pos, max - pos);
}
function escapedSplit(str) {
var result = [],
pos = 0,
max = str.length,
ch,
escapes = 0,
lastPos = 0,
backTicked = false,
lastBackTick = 0;
ch = str.charCodeAt(pos);
while (pos < max) {
if (ch === 0x60/* ` */) {
if (backTicked) {
// make \` close code sequence, but not open it;
// the reason is: `\` is correct code block
backTicked = false;
lastBackTick = pos;
} else if (escapes % 2 === 0) {
backTicked = true;
lastBackTick = pos;
}
} else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {
result.push(str.substring(lastPos, pos));
lastPos = pos + 1;
}
if (ch === 0x5c/* \ */) {
escapes++;
} else {
escapes = 0;
}
pos++;
// If there was an un-closed backtick, go back to just after
// the last backtick, but as if it was a normal character
if (pos === max && backTicked) {
backTicked = false;
pos = lastBackTick + 1;
}
ch = str.charCodeAt(pos);
}
result.push(str.substring(lastPos));
return result;
}
module.exports = function table(state, startLine, endLine, silent) {
var ch, lineText, pos, i, nextLine, columns, columnCount, token,
aligns, t, tableLines, tbodyLines;
// should have at least two lines
if (startLine + 2 > endLine) { return false; }
nextLine = startLine + 1;
if (state.sCount[nextLine] < state.blkIndent) { return false; }
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }
// first character of the second line should be '|', '-', ':',
// and no other characters are allowed but spaces;
// basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
pos = state.bMarks[nextLine] + state.tShift[nextLine];
if (pos >= state.eMarks[nextLine]) { return false; }
ch = state.src.charCodeAt(pos++);
if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }
while (pos < state.eMarks[nextLine]) {
ch = state.src.charCodeAt(pos);
if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }
pos++;
}
lineText = getLine(state, startLine + 1);
columns = lineText.split('|');
aligns = [];
for (i = 0; i < columns.length; i++) {
t = columns[i].trim();
if (!t) {
// allow empty columns before and after table, but not in between columns;
// e.g. allow ` |---| `, disallow ` ---||--- `
if (i === 0 || i === columns.length - 1) {
continue;
} else {
return false;
}
}
if (!/^:?-+:?$/.test(t)) { return false; }
if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {
aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');
} else if (t.charCodeAt(0) === 0x3A/* : */) {
aligns.push('left');
} else {
aligns.push('');
}
}
lineText = getLine(state, startLine).trim();
if (lineText.indexOf('|') === -1) { return false; }
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
// header row will define an amount of columns in the entire table,
// and align row shouldn't be smaller than that (the rest of the rows can)
columnCount = columns.length;
if (columnCount > aligns.length) { return false; }
if (silent) { return true; }
token = state.push('table_open', 'table', 1);
token.map = tableLines = [ startLine, 0 ];
token = state.push('thead_open', 'thead', 1);
token.map = [ startLine, startLine + 1 ];
token = state.push('tr_open', 'tr', 1);
token.map = [ startLine, startLine + 1 ];
for (i = 0; i < columns.length; i++) {
token = state.push('th_open', 'th', 1);
token.map = [ startLine, startLine + 1 ];
if (aligns[i]) {
token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
}
token = state.push('inline', '', 0);
token.content = columns[i].trim();
token.map = [ startLine, startLine + 1 ];
token.children = [];
token = state.push('th_close', 'th', -1);
}
token = state.push('tr_close', 'tr', -1);
token = state.push('thead_close', 'thead', -1);
token = state.push('tbody_open', 'tbody', 1);
token.map = tbodyLines = [ startLine + 2, 0 ];
for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) { break; }
lineText = getLine(state, nextLine).trim();
if (lineText.indexOf('|') === -1) { break; }
if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
token = state.push('tr_open', 'tr', 1);
for (i = 0; i < columnCount; i++) {
token = state.push('td_open', 'td', 1);
if (aligns[i]) {
token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
}
token = state.push('inline', '', 0);
token.content = columns[i] ? columns[i].trim() : '';
token.children = [];
token = state.push('td_close', 'td', -1);
}
token = state.push('tr_close', 'tr', -1);
}
token = state.push('tbody_close', 'tbody', -1);
token = state.push('table_close', 'table', -1);
tableLines[1] = tbodyLines[1] = nextLine;
state.line = nextLine;
return true;
};
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Code block (4 spaces padded)
module.exports = function code(state, startLine, endLine/*, silent*/) {
var nextLine, last, token;
if (state.sCount[startLine] - state.blkIndent < 4) { return false; }
last = nextLine = startLine + 1;
while (nextLine < endLine) {
if (state.isEmpty(nextLine)) {
nextLine++;
continue;
}
if (state.sCount[nextLine] - state.blkIndent >= 4) {
nextLine++;
last = nextLine;
continue;
}
break;
}
state.line = last;
token = state.push('code_block', 'code', 0);
token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);
token.map = [ startLine, state.line ];
return true;
};
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// fences (``` lang, ~~~ lang)
module.exports = function fence(state, startLine, endLine, silent) {
var marker, len, params, nextLine, mem, token, markup,
haveEndMarker = false,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (pos + 3 > max) { return false; }
marker = state.src.charCodeAt(pos);
if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {
return false;
}
// scan marker length
mem = pos;
pos = state.skipChars(pos, marker);
len = pos - mem;
if (len < 3) { return false; }
markup = state.src.slice(mem, pos);
params = state.src.slice(pos, max);
if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; }
// Since start is found, we can report success here in validation mode
if (silent) { return true; }
// search end of block
nextLine = startLine;
for (;;) {
nextLine++;
if (nextLine >= endLine) {
// unclosed block should be autoclosed by end of document.
// also block seems to be autoclosed by end of parent
break;
}
pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos < max && state.sCount[nextLine] < state.blkIndent) {
// non-empty line with negative indent should stop the list:
// - ```
// test
break;
}
if (state.src.charCodeAt(pos) !== marker) { continue; }
if (state.sCount[nextLine] - state.blkIndent >= 4) {
// closing fence should be indented less than 4 spaces
continue;
}
pos = state.skipChars(pos, marker);
// closing code fence must be at least as long as the opening one
if (pos - mem < len) { continue; }
// make sure tail has spaces only
pos = state.skipSpaces(pos);
if (pos < max) { continue; }
haveEndMarker = true;
// found!
break;
}
// If a fence has heading spaces, they should be removed from its inner block
len = state.sCount[startLine];
state.line = nextLine + (haveEndMarker ? 1 : 0);
token = state.push('fence', 'code', 0);
token.info = params;
token.content = state.getLines(startLine + 1, nextLine, len, true);
token.markup = markup;
token.map = [ startLine, state.line ];
return true;
};
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Block quotes
var isSpace = __webpack_require__(0).isSpace;
module.exports = function blockquote(state, startLine, endLine, silent) {
var adjustTab,
ch,
i,
initial,
l,
lastLineEmpty,
lines,
nextLine,
offset,
oldBMarks,
oldBSCount,
oldIndent,
oldParentType,
oldSCount,
oldTShift,
spaceAfterMarker,
terminate,
terminatorRules,
token,
wasOutdented,
oldLineMax = state.lineMax,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
// check the block quote marker
if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }
// we know that it's going to be a valid blockquote,
// so no point trying to find the end of it in silent mode
if (silent) { return true; }
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
// skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) {
// ' > test '
// ^ -- position start of line here:
pos++;
initial++;
offset++;
adjustTab = false;
spaceAfterMarker = true;
} else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
spaceAfterMarker = true;
if ((state.bsCount[startLine] + offset) % 4 === 3) {
// ' >\t test '
// ^ -- position start of line here (tab has width===1)
pos++;
initial++;
offset++;
adjustTab = false;
} else {
// ' >\t test '
// ^ -- position start of line here + shift bsCount slightly
// to make extra space appear
adjustTab = true;
}
} else {
spaceAfterMarker = false;
}
oldBMarks = [ state.bMarks[startLine] ];
state.bMarks[startLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
oldBSCount = [ state.bsCount[startLine] ];
state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);
lastLineEmpty = pos >= max;
oldSCount = [ state.sCount[startLine] ];
state.sCount[startLine] = offset - initial;
oldTShift = [ state.tShift[startLine] ];
state.tShift[startLine] = pos - state.bMarks[startLine];
terminatorRules = state.md.block.ruler.getRules('blockquote');
oldParentType = state.parentType;
state.parentType = 'blockquote';
wasOutdented = false;
// Search the end of the block
//
// Block ends with either:
// 1. an empty line outside:
// ```
// > test
//
// ```
// 2. an empty line inside:
// ```
// >
// test
// ```
// 3. another tag:
// ```
// > test
// - - -
// ```
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
// check if it's outdented, i.e. it's inside list item and indented
// less than said list item:
//
// ```
// 1. anything
// > current blockquote
// 2. checking this line
// ```
if (state.sCount[nextLine] < state.blkIndent) wasOutdented = true;
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos >= max) {
// Case 1: line is not inside the blockquote, and this line is empty.
break;
}
if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !wasOutdented) {
// This line is inside the blockquote.
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);
// skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) {
// ' > test '
// ^ -- position start of line here:
pos++;
initial++;
offset++;
adjustTab = false;
spaceAfterMarker = true;
} else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
spaceAfterMarker = true;
if ((state.bsCount[nextLine] + offset) % 4 === 3) {
// ' >\t test '
// ^ -- position start of line here (tab has width===1)
pos++;
initial++;
offset++;
adjustTab = false;
} else {
// ' >\t test '
// ^ -- position start of line here + shift bsCount slightly
// to make extra space appear
adjustTab = true;
}
} else {
spaceAfterMarker = false;
}
oldBMarks.push(state.bMarks[nextLine]);
state.bMarks[nextLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
lastLineEmpty = pos >= max;
oldBSCount.push(state.bsCount[nextLine]);
state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] = offset - initial;
oldTShift.push(state.tShift[nextLine]);
state.tShift[nextLine] = pos - state.bMarks[nextLine];
continue;
}
// Case 2: line is not inside the blockquote, and the last line was empty.
if (lastLineEmpty) { break; }
// Case 3: another tag found.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
// Quirk to enforce "hard termination mode" for paragraphs;
// normally if you call `tokenize(state, startLine, nextLine)`,
// paragraphs will look below nextLine for paragraph continuation,
// but if blockquote is terminated by another tag, they shouldn't
state.lineMax = nextLine;
if (state.blkIndent !== 0) {
// state.blkIndent was non-zero, we now set it to zero,
// so we need to re-calculate all offsets to appear as
// if indent wasn't changed
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] -= state.blkIndent;
}
break;
}
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
// A negative indentation means that this is a paragraph continuation
//
state.sCount[nextLine] = -1;
}
oldIndent = state.blkIndent;
state.blkIndent = 0;
token = state.push('blockquote_open', 'blockquote', 1);
token.markup = '>';
token.map = lines = [ startLine, 0 ];
state.md.block.tokenize(state, startLine, nextLine);
token = state.push('blockquote_close', 'blockquote', -1);
token.markup = '>';
state.lineMax = oldLineMax;
state.parentType = oldParentType;
lines[1] = state.line;
// Restore original tShift; this might not be necessary since the parser
// has already been here, but just to make sure we can do that.
for (i = 0; i < oldTShift.length; i++) {
state.bMarks[i + startLine] = oldBMarks[i];
state.tShift[i + startLine] = oldTShift[i];
state.sCount[i + startLine] = oldSCount[i];
state.bsCount[i + startLine] = oldBSCount[i];
}
state.blkIndent = oldIndent;
return true;
};
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Horizontal rule
var isSpace = __webpack_require__(0).isSpace;
module.exports = function hr(state, startLine, endLine, silent) {
var marker, cnt, ch, token,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
marker = state.src.charCodeAt(pos++);
// Check hr marker
if (marker !== 0x2A/* * */ &&
marker !== 0x2D/* - */ &&
marker !== 0x5F/* _ */) {
return false;
}
// markers can be mixed with spaces, but there should be at least 3 of them
cnt = 1;
while (pos < max) {
ch = state.src.charCodeAt(pos++);
if (ch !== marker && !isSpace(ch)) { return false; }
if (ch === marker) { cnt++; }
}
if (cnt < 3) { return false; }
if (silent) { return true; }
state.line = startLine + 1;
token = state.push('hr', 'hr', 0);
token.map = [ startLine, state.line ];
token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
return true;
};
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Lists
var isSpace = __webpack_require__(0).isSpace;
// Search `[-+*][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipBulletListMarker(state, startLine) {
var marker, pos, max, ch;
pos = state.bMarks[startLine] + state.tShift[startLine];
max = state.eMarks[startLine];
marker = state.src.charCodeAt(pos++);
// Check bullet
if (marker !== 0x2A/* * */ &&
marker !== 0x2D/* - */ &&
marker !== 0x2B/* + */) {
return -1;
}
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " -test " - is not a list item
return -1;
}
}
return pos;
}
// Search `\d+[.)][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipOrderedListMarker(state, startLine) {
var ch,
start = state.bMarks[startLine] + state.tShift[startLine],
pos = start,
max = state.eMarks[startLine];
// List marker should have at least 2 chars (digit + dot)
if (pos + 1 >= max) { return -1; }
ch = state.src.charCodeAt(pos++);
if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }
for (;;) {
// EOL -> fail
if (pos >= max) { return -1; }
ch = state.src.charCodeAt(pos++);
if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {
// List marker should have no more than 9 digits
// (prevents integer overflow in browsers)
if (pos - start >= 10) { return -1; }
continue;
}
// found valid marker
if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {
break;
}
return -1;
}
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " 1.test " - is not a list item
return -1;
}
}
return pos;
}
function markTightParagraphs(state, idx) {
var i, l,
level = state.level + 2;
for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
state.tokens[i + 2].hidden = true;
state.tokens[i].hidden = true;
i += 2;
}
}
}
module.exports = function list(state, startLine, endLine, silent) {
var ch,
contentStart,
i,
indent,
indentAfterMarker,
initial,
isOrdered,
itemLines,
l,
listLines,
listTokIdx,
markerCharCode,
markerValue,
max,
nextLine,
offset,
oldIndent,
oldLIndent,
oldParentType,
oldTShift,
oldTight,
pos,
posAfterMarker,
prevEmptyEnd,
start,
terminate,
terminatorRules,
token,
isTerminatingParagraph = false,
tight = true;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
// limit conditions when list can interrupt
// a paragraph (validation mode only)
if (silent && state.parentType === 'paragraph') {
// Next list item should still terminate previous list item;
//
// This code can fail if plugins use blkIndent as well as lists,
// but I hope the spec gets fixed long before that happens.
//
if (state.tShift[startLine] >= state.blkIndent) {
isTerminatingParagraph = true;
}
}
// Detect list type and position after marker
if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {
isOrdered = true;
start = state.bMarks[startLine] + state.tShift[startLine];
markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));
// If we're starting a new ordered list right after
// a paragraph, it should start with 1.
if (isTerminatingParagraph && markerValue !== 1) return false;
} else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {
isOrdered = false;
} else {
return false;
}
// If we're starting a new unordered list right after
// a paragraph, first line should not be empty.
if (isTerminatingParagraph) {
if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;
}
// We should terminate list on style change. Remember first one to compare.
markerCharCode = state.src.charCodeAt(posAfterMarker - 1);
// For validation mode we can terminate immediately
if (silent) { return true; }
// Start list
listTokIdx = state.tokens.length;
if (isOrdered) {
token = state.push('ordered_list_open', 'ol', 1);
if (markerValue !== 1) {
token.attrs = [ [ 'start', markerValue ] ];
}
} else {
token = state.push('bullet_list_open', 'ul', 1);
}
token.map = listLines = [ startLine, 0 ];
token.markup = String.fromCharCode(markerCharCode);
//
// Iterate list items
//
nextLine = startLine;
prevEmptyEnd = false;
terminatorRules = state.md.block.ruler.getRules('list');
oldParentType = state.parentType;
state.parentType = 'list';
while (nextLine < endLine) {
pos = posAfterMarker;
max = state.eMarks[nextLine];
initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine]) % 4;
} else if (ch === 0x20) {
offset++;
} else {
break;
}
pos++;
}
contentStart = pos;
if (contentStart >= max) {
// trimming space in "- \n 3" case, indent is 1 here
indentAfterMarker = 1;
} else {
indentAfterMarker = offset - initial;
}
// If we have more than 4 spaces, the indent is 1
// (the rest is just indented code block)
if (indentAfterMarker > 4) { indentAfterMarker = 1; }
// " - test"
// ^^^^^ - calculating total length of this thing
indent = initial + indentAfterMarker;
// Run subparser & write tokens
token = state.push('list_item_open', 'li', 1);
token.markup = String.fromCharCode(markerCharCode);
token.map = itemLines = [ startLine, 0 ];
oldIndent = state.blkIndent;
oldTight = state.tight;
oldTShift = state.tShift[startLine];
oldLIndent = state.sCount[startLine];
state.blkIndent = indent;
state.tight = true;
state.tShift[startLine] = contentStart - state.bMarks[startLine];
state.sCount[startLine] = offset;
if (contentStart >= max && state.isEmpty(startLine + 1)) {
// workaround for this case
// (list item is empty, list terminates before "foo"):
// ~~~~~~~~
// -
//
// foo
// ~~~~~~~~
state.line = Math.min(state.line + 2, endLine);
} else {
state.md.block.tokenize(state, startLine, endLine, true);
}
// If any of list item is tight, mark list as tight
if (!state.tight || prevEmptyEnd) {
tight = false;
}
// Item become loose if finish with empty line,
// but we should filter last element, because it means list finish
prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);
state.blkIndent = oldIndent;
state.tShift[startLine] = oldTShift;
state.sCount[startLine] = oldLIndent;
state.tight = oldTight;
token = state.push('list_item_close', 'li', -1);
token.markup = String.fromCharCode(markerCharCode);
nextLine = startLine = state.line;
itemLines[1] = nextLine;
contentStart = state.bMarks[startLine];
if (nextLine >= endLine) { break; }
//
// Try to check if list is terminated or continued.
//
if (state.sCount[nextLine] < state.blkIndent) { break; }
// fail if terminating block found
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
// fail if list has another type
if (isOrdered) {
posAfterMarker = skipOrderedListMarker(state, nextLine);
if (posAfterMarker < 0) { break; }
} else {
posAfterMarker = skipBulletListMarker(state, nextLine);
if (posAfterMarker < 0) { break; }
}
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
}
// Finalize list
if (isOrdered) {
token = state.push('ordered_list_close', 'ol', -1);
} else {
token = state.push('bullet_list_close', 'ul', -1);
}
token.markup = String.fromCharCode(markerCharCode);
listLines[1] = nextLine;
state.line = nextLine;
state.parentType = oldParentType;
// mark paragraphs tight if needed
if (tight) {
markTightParagraphs(state, listTokIdx);
}
return true;
};
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var normalizeReference = __webpack_require__(0).normalizeReference;
var isSpace = __webpack_require__(0).isSpace;
module.exports = function reference(state, startLine, _endLine, silent) {
var ch,
destEndPos,
destEndLineNo,
endLine,
href,
i,
l,
label,
labelEnd,
oldParentType,
res,
start,
str,
terminate,
terminatorRules,
title,
lines = 0,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine],
nextLine = startLine + 1;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }
// Simple check to quickly interrupt scan on [link](url) at the start of line.
// Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54
while (++pos < max) {
if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&
state.src.charCodeAt(pos - 1) !== 0x5C/* \ */) {
if (pos + 1 === max) { return false; }
if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }
break;
}
}
endLine = state.lineMax;
// jump line-by-line until empty one or EOF
terminatorRules = state.md.block.ruler.getRules('reference');
oldParentType = state.parentType;
state.parentType = 'reference';
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
max = str.length;
for (pos = 1; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x5B /* [ */) {
return false;
} else if (ch === 0x5D /* ] */) {
labelEnd = pos;
break;
} else if (ch === 0x0A /* \n */) {
lines++;
} else if (ch === 0x5C /* \ */) {
pos++;
if (pos < max && str.charCodeAt(pos) === 0x0A) {
lines++;
}
}
}
if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }
// [label]: destination 'title'
// ^^^ skip optional whitespace here
for (pos = labelEnd + 2; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x0A) {
lines++;
} else if (isSpace(ch)) {
/*eslint no-empty:0*/
} else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^^^^^ parse this
res = state.md.helpers.parseLinkDestination(str, pos, max);
if (!res.ok) { return false; }
href = state.md.normalizeLink(res.str);
if (!state.md.validateLink(href)) { return false; }
pos = res.pos;
lines += res.lines;
// save cursor state, we could require to rollback later
destEndPos = pos;
destEndLineNo = lines;
// [label]: destination 'title'
// ^^^ skipping those spaces
start = pos;
for (; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x0A) {
lines++;
} else if (isSpace(ch)) {
/*eslint no-empty:0*/
} else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^ parse this
res = state.md.helpers.parseLinkTitle(str, pos, max);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
lines += res.lines;
} else {
title = '';
pos = destEndPos;
lines = destEndLineNo;
}
// skip trailing spaces until the rest of the line
while (pos < max) {
ch = str.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
if (pos < max && str.charCodeAt(pos) !== 0x0A) {
if (title) {
// garbage at the end of the line after title,
// but it could still be a valid reference if we roll back
title = '';
pos = destEndPos;
lines = destEndLineNo;
while (pos < max) {
ch = str.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
}
}
if (pos < max && str.charCodeAt(pos) !== 0x0A) {
// garbage at the end of the line
return false;
}
label = normalizeReference(str.slice(1, labelEnd));
if (!label) {
// CommonMark 0.20 disallows empty labels
return false;
}
// Reference can not terminate anything. This check is for safety only.
/*istanbul ignore if*/
if (silent) { return true; }
if (typeof state.env.references === 'undefined') {
state.env.references = {};
}
if (typeof state.env.references[label] === 'undefined') {
state.env.references[label] = { title: title, href: href };
}
state.parentType = oldParentType;
state.line = startLine + lines + 1;
return true;
};
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// heading (#, ##, ...)
var isSpace = __webpack_require__(0).isSpace;
module.exports = function heading(state, startLine, endLine, silent) {
var ch, level, tmp, token,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
ch = state.src.charCodeAt(pos);
if (ch !== 0x23/* # */ || pos >= max) { return false; }
// count heading level
level = 1;
ch = state.src.charCodeAt(++pos);
while (ch === 0x23/* # */ && pos < max && level <= 6) {
level++;
ch = state.src.charCodeAt(++pos);
}
if (level > 6 || (pos < max && !isSpace(ch))) { return false; }
if (silent) { return true; }
// Let's cut tails like ' ### ' from the end of string
max = state.skipSpacesBack(max, pos);
tmp = state.skipCharsBack(max, 0x23, pos); // #
if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
max = tmp;
}
state.line = startLine + 1;
token = state.push('heading_open', 'h' + String(level), 1);
token.markup = '########'.slice(0, level);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = state.src.slice(pos, max).trim();
token.map = [ startLine, state.line ];
token.children = [];
token = state.push('heading_close', 'h' + String(level), -1);
token.markup = '########'.slice(0, level);
return true;
};
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// lheading (---, ===)
module.exports = function lheading(state, startLine, endLine/*, silent*/) {
var content, terminate, i, l, token, pos, max, level, marker,
nextLine = startLine + 1, oldParentType,
terminatorRules = state.md.block.ruler.getRules('paragraph');
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
oldParentType = state.parentType;
state.parentType = 'paragraph'; // use paragraph to match terminatorRules
// jump line-by-line until empty one or EOF
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
//
// Check for underline in setext header
//
if (state.sCount[nextLine] >= state.blkIndent) {
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos < max) {
marker = state.src.charCodeAt(pos);
if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {
pos = state.skipChars(pos, marker);
pos = state.skipSpaces(pos);
if (pos >= max) {
level = (marker === 0x3D/* = */ ? 1 : 2);
break;
}
}
}
}
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
if (!level) {
// Didn't find valid underline
return false;
}
content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine + 1;
token = state.push('heading_open', 'h' + String(level), 1);
token.markup = String.fromCharCode(marker);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = content;
token.map = [ startLine, state.line - 1 ];
token.children = [];
token = state.push('heading_close', 'h' + String(level), -1);
token.markup = String.fromCharCode(marker);
state.parentType = oldParentType;
return true;
};
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// HTML block
var block_names = __webpack_require__(68);
var HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(20).HTML_OPEN_CLOSE_TAG_RE;
// An array of opening and corresponding closing sequences for html tags,
// last argument defines whether it can terminate a paragraph or not
//
var HTML_SEQUENCES = [
[ /^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true ],
[ /^<!--/, /-->/, true ],
[ /^<\?/, /\?>/, true ],
[ /^<![A-Z]/, />/, true ],
[ /^<!\[CDATA\[/, /\]\]>/, true ],
[ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true ],
[ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false ]
];
module.exports = function html_block(state, startLine, endLine, silent) {
var i, nextLine, token, lineText,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (!state.md.options.html) { return false; }
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
lineText = state.src.slice(pos, max);
for (i = 0; i < HTML_SEQUENCES.length; i++) {
if (HTML_SEQUENCES[i][0].test(lineText)) { break; }
}
if (i === HTML_SEQUENCES.length) { return false; }
if (silent) {
// true if this sequence can be a terminator, false otherwise
return HTML_SEQUENCES[i][2];
}
nextLine = startLine + 1;
// If we are here - we detected HTML block.
// Let's roll down till block end.
if (!HTML_SEQUENCES[i][1].test(lineText)) {
for (; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) { break; }
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
lineText = state.src.slice(pos, max);
if (HTML_SEQUENCES[i][1].test(lineText)) {
if (lineText.length !== 0) { nextLine++; }
break;
}
}
}
state.line = nextLine;
token = state.push('html_block', '', 0);
token.map = [ startLine, nextLine ];
token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
return true;
};
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// List of valid html blocks names, accorting to commonmark spec
// http://jgm.github.io/CommonMark/spec.html#html-blocks
module.exports = [
'address',
'article',
'aside',
'base',
'basefont',
'blockquote',
'body',
'caption',
'center',
'col',
'colgroup',
'dd',
'details',
'dialog',
'dir',
'div',
'dl',
'dt',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'frame',
'frameset',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'head',
'header',
'hr',
'html',
'iframe',
'legend',
'li',
'link',
'main',
'menu',
'menuitem',
'meta',
'nav',
'noframes',
'ol',
'optgroup',
'option',
'p',
'param',
'section',
'source',
'summary',
'table',
'tbody',
'td',
'tfoot',
'th',
'thead',
'title',
'tr',
'track',
'ul'
];
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Paragraph
module.exports = function paragraph(state, startLine/*, endLine*/) {
var content, terminate, i, l, token, oldParentType,
nextLine = startLine + 1,
terminatorRules = state.md.block.ruler.getRules('paragraph'),
endLine = state.lineMax;
oldParentType = state.parentType;
state.parentType = 'paragraph';
// jump line-by-line until empty one or EOF
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine;
token = state.push('paragraph_open', 'p', 1);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = content;
token.map = [ startLine, state.line ];
token.children = [];
token = state.push('paragraph_close', 'p', -1);
state.parentType = oldParentType;
return true;
};
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Parser state class
var Token = __webpack_require__(10);
var isSpace = __webpack_require__(0).isSpace;
function StateBlock(src, md, env, tokens) {
var ch, s, start, pos, len, indent, offset, indent_found;
this.src = src;
// link to parser instance
this.md = md;
this.env = env;
//
// Internal state vartiables
//
this.tokens = tokens;
this.bMarks = []; // line begin offsets for fast jumps
this.eMarks = []; // line end offsets for fast jumps
this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
this.sCount = []; // indents for each line (tabs expanded)
// An amount of virtual spaces (tabs expanded) between beginning
// of each line (bMarks) and real beginning of that line.
//
// It exists only as a hack because blockquotes override bMarks
// losing information in the process.
//
// It's used only when expanding tabs, you can think about it as
// an initial tab length, e.g. bsCount=21 applied to string `\t123`
// means first tab should be expanded to 4-21%4 === 3 spaces.
//
this.bsCount = [];
// block parser variables
this.blkIndent = 0; // required block content indent
// (for example, if we are in list)
this.line = 0; // line index in src
this.lineMax = 0; // lines count
this.tight = false; // loose/tight mode for lists
this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
// can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
// used in lists to determine if they interrupt a paragraph
this.parentType = 'root';
this.level = 0;
// renderer
this.result = '';
// Create caches
// Generate markers.
s = this.src;
indent_found = false;
for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {
ch = s.charCodeAt(pos);
if (!indent_found) {
if (isSpace(ch)) {
indent++;
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
continue;
} else {
indent_found = true;
}
}
if (ch === 0x0A || pos === len - 1) {
if (ch !== 0x0A) { pos++; }
this.bMarks.push(start);
this.eMarks.push(pos);
this.tShift.push(indent);
this.sCount.push(offset);
this.bsCount.push(0);
indent_found = false;
indent = 0;
offset = 0;
start = pos + 1;
}
}
// Push fake entry to simplify cache bounds checks
this.bMarks.push(s.length);
this.eMarks.push(s.length);
this.tShift.push(0);
this.sCount.push(0);
this.bsCount.push(0);
this.lineMax = this.bMarks.length - 1; // don't count last fake line
}
// Push new token to "stream".
//
StateBlock.prototype.push = function (type, tag, nesting) {
var token = new Token(type, tag, nesting);
token.block = true;
if (nesting < 0) { this.level--; }
token.level = this.level;
if (nesting > 0) { this.level++; }
this.tokens.push(token);
return token;
};
StateBlock.prototype.isEmpty = function isEmpty(line) {
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
};
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
for (var max = this.lineMax; from < max; from++) {
if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
break;
}
}
return from;
};
// Skip spaces from given position.
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
var ch;
for (var max = this.src.length; pos < max; pos++) {
ch = this.src.charCodeAt(pos);
if (!isSpace(ch)) { break; }
}
return pos;
};
// Skip spaces from given position in reverse.
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
if (pos <= min) { return pos; }
while (pos > min) {
if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }
}
return pos;
};
// Skip char codes from given position
StateBlock.prototype.skipChars = function skipChars(pos, code) {
for (var max = this.src.length; pos < max; pos++) {
if (this.src.charCodeAt(pos) !== code) { break; }
}
return pos;
};
// Skip char codes reverse from given position - 1
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
if (pos <= min) { return pos; }
while (pos > min) {
if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }
}
return pos;
};
// cut lines range from source.
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
var i, lineIndent, ch, first, last, queue, lineStart,
line = begin;
if (begin >= end) {
return '';
}
queue = new Array(end - begin);
for (i = 0; line < end; line++, i++) {
lineIndent = 0;
lineStart = first = this.bMarks[line];
if (line + 1 < end || keepLastLF) {
// No need for bounds check because we have fake entry on tail.
last = this.eMarks[line] + 1;
} else {
last = this.eMarks[line];
}
while (first < last && lineIndent < indent) {
ch = this.src.charCodeAt(first);
if (isSpace(ch)) {
if (ch === 0x09) {
lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
} else {
lineIndent++;
}
} else if (first - lineStart < this.tShift[line]) {
// patched tShift masked characters to look like spaces (blockquotes, list markers)
lineIndent++;
} else {
break;
}
first++;
}
if (lineIndent > indent) {
// partially expanding tabs in code blocks, e.g '\t\tfoobar'
// with indent=2 becomes ' \tfoobar'
queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);
} else {
queue[i] = this.src.slice(first, last);
}
}
return queue.join('');
};
// re-export Token class to use in block rules
StateBlock.prototype.Token = Token;
module.exports = StateBlock;
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** internal
* class ParserInline
*
* Tokenizes paragraph content.
**/
var Ruler = __webpack_require__(9);
////////////////////////////////////////////////////////////////////////////////
// Parser rules
var _rules = [
[ 'text', __webpack_require__(72) ],
[ 'newline', __webpack_require__(73) ],
[ 'escape', __webpack_require__(74) ],
[ 'backticks', __webpack_require__(75) ],
[ 'strikethrough', __webpack_require__(21).tokenize ],
[ 'emphasis', __webpack_require__(22).tokenize ],
[ 'link', __webpack_require__(76) ],
[ 'image', __webpack_require__(77) ],
[ 'autolink', __webpack_require__(78) ],
[ 'html_inline', __webpack_require__(79) ],
[ 'entity', __webpack_require__(80) ]
];
var _rules2 = [
[ 'balance_pairs', __webpack_require__(81) ],
[ 'strikethrough', __webpack_require__(21).postProcess ],
[ 'emphasis', __webpack_require__(22).postProcess ],
[ 'text_collapse', __webpack_require__(82) ]
];
/**
* new ParserInline()
**/
function ParserInline() {
var i;
/**
* ParserInline#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of inline rules.
**/
this.ruler = new Ruler();
for (i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1]);
}
/**
* ParserInline#ruler2 -> Ruler
*
* [[Ruler]] instance. Second ruler used for post-processing
* (e.g. in emphasis-like rules).
**/
this.ruler2 = new Ruler();
for (i = 0; i < _rules2.length; i++) {
this.ruler2.push(_rules2[i][0], _rules2[i][1]);
}
}
// Skip single token by running all rules in validation mode;
// returns `true` if any rule reported success
//
ParserInline.prototype.skipToken = function (state) {
var ok, i, pos = state.pos,
rules = this.ruler.getRules(''),
len = rules.length,
maxNesting = state.md.options.maxNesting,
cache = state.cache;
if (typeof cache[pos] !== 'undefined') {
state.pos = cache[pos];
return;
}
if (state.level < maxNesting) {
for (i = 0; i < len; i++) {
// Increment state.level and decrement it later to limit recursion.
// It's harmless to do here, because no tokens are created. But ideally,
// we'd need a separate private state variable for this purpose.
//
state.level++;
ok = rules[i](state, true);
state.level--;
if (ok) { break; }
}
} else {
// Too much nesting, just skip until the end of the paragraph.
//
// NOTE: this will cause links to behave incorrectly in the following case,
// when an amount of `[` is exactly equal to `maxNesting + 1`:
//
// [[[[[[[[[[[[[[[[[[[[[foo]()
//
// TODO: remove this workaround when CM standard will allow nested links
// (we can replace it by preventing links from being parsed in
// validation mode)
//
state.pos = state.posMax;
}
if (!ok) { state.pos++; }
cache[pos] = state.pos;
};
// Generate tokens for input range
//
ParserInline.prototype.tokenize = function (state) {
var ok, i,
rules = this.ruler.getRules(''),
len = rules.length,
end = state.posMax,
maxNesting = state.md.options.maxNesting;
while (state.pos < end) {
// Try all possible rules.
// On success, rule should:
//
// - update `state.pos`
// - update `state.tokens`
// - return true
if (state.level < maxNesting) {
for (i = 0; i < len; i++) {
ok = rules[i](state, false);
if (ok) { break; }
}
}
if (ok) {
if (state.pos >= end) { break; }
continue;
}
state.pending += state.src[state.pos++];
}
if (state.pending) {
state.pushPending();
}
};
/**
* ParserInline.parse(str, md, env, outTokens)
*
* Process input string and push inline tokens into `outTokens`
**/
ParserInline.prototype.parse = function (str, md, env, outTokens) {
var i, rules, len;
var state = new this.State(str, md, env, outTokens);
this.tokenize(state);
rules = this.ruler2.getRules('');
len = rules.length;
for (i = 0; i < len; i++) {
rules[i](state);
}
};
ParserInline.prototype.State = __webpack_require__(83);
module.exports = ParserInline;
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Skip text characters for text token, place those to pending buffer
// and increment current pos
// Rule to skip pure text
// '{}$%@~+=:' reserved for extentions
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// !!!! Don't confuse with "Markdown ASCII Punctuation" chars
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
function isTerminatorChar(ch) {
switch (ch) {
case 0x0A/* \n */:
case 0x21/* ! */:
case 0x23/* # */:
case 0x24/* $ */:
case 0x25/* % */:
case 0x26/* & */:
case 0x2A/* * */:
case 0x2B/* + */:
case 0x2D/* - */:
case 0x3A/* : */:
case 0x3C/* < */:
case 0x3D/* = */:
case 0x3E/* > */:
case 0x40/* @ */:
case 0x5B/* [ */:
case 0x5C/* \ */:
case 0x5D/* ] */:
case 0x5E/* ^ */:
case 0x5F/* _ */:
case 0x60/* ` */:
case 0x7B/* { */:
case 0x7D/* } */:
case 0x7E/* ~ */:
return true;
default:
return false;
}
}
module.exports = function text(state, silent) {
var pos = state.pos;
while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
pos++;
}
if (pos === state.pos) { return false; }
if (!silent) { state.pending += state.src.slice(state.pos, pos); }
state.pos = pos;
return true;
};
// Alternative implementation, for memory.
//
// It costs 10% of performance, but allows extend terminators list, if place it
// to `ParcerInline` property. Probably, will switch to it sometime, such
// flexibility required.
/*
var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
module.exports = function text(state, silent) {
var pos = state.pos,
idx = state.src.slice(pos).search(TERMINATOR_RE);
// first char is terminator -> empty text
if (idx === 0) { return false; }
// no terminator -> text till end of string
if (idx < 0) {
if (!silent) { state.pending += state.src.slice(pos); }
state.pos = state.src.length;
return true;
}
if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
state.pos += idx;
return true;
};*/
/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Proceess '\n'
var isSpace = __webpack_require__(0).isSpace;
module.exports = function newline(state, silent) {
var pmax, max, pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
pmax = state.pending.length - 1;
max = state.posMax;
// ' \n' -> hardbreak
// Lookup in pending chars is bad practice! Don't copy to other rules!
// Pending string is stored in concat mode, indexed lookups will cause
// convertion to flat mode.
if (!silent) {
if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
state.pending = state.pending.replace(/ +$/, '');
state.push('hardbreak', 'br', 0);
} else {
state.pending = state.pending.slice(0, -1);
state.push('softbreak', 'br', 0);
}
} else {
state.push('softbreak', 'br', 0);
}
}
pos++;
// skip heading spaces for next line
while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
state.pos = pos;
return true;
};
/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process escaped chars and hardbreaks
var isSpace = __webpack_require__(0).isSpace;
var ESCAPED = [];
for (var i = 0; i < 256; i++) { ESCAPED.push(0); }
'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'
.split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });
module.exports = function escape(state, silent) {
var ch, pos = state.pos, max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; }
pos++;
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (ch < 256 && ESCAPED[ch] !== 0) {
if (!silent) { state.pending += state.src[pos]; }
state.pos += 2;
return true;
}
if (ch === 0x0A) {
if (!silent) {
state.push('hardbreak', 'br', 0);
}
pos++;
// skip leading whitespaces from next line
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
state.pos = pos;
return true;
}
}
if (!silent) { state.pending += '\\'; }
state.pos++;
return true;
};
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Parse backticks
module.exports = function backtick(state, silent) {
var start, max, marker, matchStart, matchEnd, token,
pos = state.pos,
ch = state.src.charCodeAt(pos);
if (ch !== 0x60/* ` */) { return false; }
start = pos;
pos++;
max = state.posMax;
while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }
marker = state.src.slice(start, pos);
matchStart = matchEnd = pos;
while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
matchEnd = matchStart + 1;
while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }
if (matchEnd - matchStart === marker.length) {
if (!silent) {
token = state.push('code_inline', 'code', 0);
token.markup = marker;
token.content = state.src.slice(pos, matchStart)
.replace(/[ \n]+/g, ' ')
.trim();
}
state.pos = matchEnd;
return true;
}
}
if (!silent) { state.pending += marker; }
state.pos += marker.length;
return true;
};
/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process [link](<to> "stuff")
var normalizeReference = __webpack_require__(0).normalizeReference;
var isSpace = __webpack_require__(0).isSpace;
module.exports = function link(state, silent) {
var attrs,
code,
label,
labelEnd,
labelStart,
pos,
res,
ref,
title,
token,
href = '',
oldPos = state.pos,
max = state.posMax,
start = state.pos,
parseReference = true;
if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }
labelStart = state.pos + 1;
labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) { return false; }
pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
//
// Inline link
//
// might have found a valid shortcut link, disable reference parsing
parseReference = false;
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
if (pos >= max) { return false; }
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = '';
}
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
} else {
title = '';
}
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
// parsing a valid shortcut link failed, fallback to reference
parseReference = true;
}
pos++;
}
if (parseReference) {
//
// Link reference
//
if (typeof state.env.references === 'undefined') { return false; }
if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;
pos = state.md.helpers.parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) { label = state.src.slice(labelStart, labelEnd); }
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
//
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
//
if (!silent) {
state.pos = labelStart;
state.posMax = labelEnd;
token = state.push('link_open', 'a', 1);
token.attrs = attrs = [ [ 'href', href ] ];
if (title) {
attrs.push([ 'title', title ]);
}
state.md.inline.tokenize(state);
token = state.push('link_close', 'a', -1);
}
state.pos = pos;
state.posMax = max;
return true;
};
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process ![image](<src> "title")
var normalizeReference = __webpack_require__(0).normalizeReference;
var isSpace = __webpack_require__(0).isSpace;
module.exports = function image(state, silent) {
var attrs,
code,
content,
label,
labelEnd,
labelStart,
pos,
ref,
res,
title,
token,
tokens,
start,
href = '',
oldPos = state.pos,
max = state.posMax;
if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }
if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }
labelStart = state.pos + 2;
labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) { return false; }
pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
//
// Inline link
//
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
if (pos >= max) { return false; }
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = '';
}
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
} else {
title = '';
}
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
state.pos = oldPos;
return false;
}
pos++;
} else {
//
// Link reference
//
if (typeof state.env.references === 'undefined') { return false; }
if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;
pos = state.md.helpers.parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) { label = state.src.slice(labelStart, labelEnd); }
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
//
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
//
if (!silent) {
content = state.src.slice(labelStart, labelEnd);
state.md.inline.parse(
content,
state.md,
state.env,
tokens = []
);
token = state.push('image', 'img', 0);
token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];
token.children = tokens;
token.content = content;
if (title) {
attrs.push([ 'title', title ]);
}
}
state.pos = pos;
state.posMax = max;
return true;
};
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process autolinks '<protocol:...>'
/*eslint max-len:0*/
var EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;
var AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;
module.exports = function autolink(state, silent) {
var tail, linkMatch, emailMatch, url, fullUrl, token,
pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
tail = state.src.slice(pos);
if (tail.indexOf('>') < 0) { return false; }
if (AUTOLINK_RE.test(tail)) {
linkMatch = tail.match(AUTOLINK_RE);
url = linkMatch[0].slice(1, -1);
fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) { return false; }
if (!silent) {
token = state.push('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.markup = 'autolink';
token.info = 'auto';
token = state.push('text', '', 0);
token.content = state.md.normalizeLinkText(url);
token = state.push('link_close', 'a', -1);
token.markup = 'autolink';
token.info = 'auto';
}
state.pos += linkMatch[0].length;
return true;
}
if (EMAIL_RE.test(tail)) {
emailMatch = tail.match(EMAIL_RE);
url = emailMatch[0].slice(1, -1);
fullUrl = state.md.normalizeLink('mailto:' + url);
if (!state.md.validateLink(fullUrl)) { return false; }
if (!silent) {
token = state.push('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.markup = 'autolink';
token.info = 'auto';
token = state.push('text', '', 0);
token.content = state.md.normalizeLinkText(url);
token = state.push('link_close', 'a', -1);
token.markup = 'autolink';
token.info = 'auto';
}
state.pos += emailMatch[0].length;
return true;
}
return false;
};
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process html tags
var HTML_TAG_RE = __webpack_require__(20).HTML_TAG_RE;
function isLetter(ch) {
/*eslint no-bitwise:0*/
var lc = ch | 0x20; // to lower case
return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);
}
module.exports = function html_inline(state, silent) {
var ch, match, max, token,
pos = state.pos;
if (!state.md.options.html) { return false; }
// Check start
max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||
pos + 2 >= max) {
return false;
}
// Quick fail on second char
ch = state.src.charCodeAt(pos + 1);
if (ch !== 0x21/* ! */ &&
ch !== 0x3F/* ? */ &&
ch !== 0x2F/* / */ &&
!isLetter(ch)) {
return false;
}
match = state.src.slice(pos).match(HTML_TAG_RE);
if (!match) { return false; }
if (!silent) {
token = state.push('html_inline', '', 0);
token.content = state.src.slice(pos, pos + match[0].length);
}
state.pos += match[0].length;
return true;
};
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Process html entity - &#123;, &#xAF;, &quot;, ...
var entities = __webpack_require__(15);
var has = __webpack_require__(0).has;
var isValidEntityCode = __webpack_require__(0).isValidEntityCode;
var fromCodePoint = __webpack_require__(0).fromCodePoint;
var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;
var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
module.exports = function entity(state, silent) {
var ch, code, match, pos = state.pos, max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }
if (pos + 1 < max) {
ch = state.src.charCodeAt(pos + 1);
if (ch === 0x23 /* # */) {
match = state.src.slice(pos).match(DIGITAL_RE);
if (match) {
if (!silent) {
code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
}
state.pos += match[0].length;
return true;
}
} else {
match = state.src.slice(pos).match(NAMED_RE);
if (match) {
if (has(entities, match[1])) {
if (!silent) { state.pending += entities[match[1]]; }
state.pos += match[0].length;
return true;
}
}
}
}
if (!silent) { state.pending += '&'; }
state.pos++;
return true;
};
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// For each opening emphasis-like marker find a matching closing one
//
module.exports = function link_pairs(state) {
var i, j, lastDelim, currDelim,
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
lastDelim = delimiters[i];
if (!lastDelim.close) { continue; }
j = i - lastDelim.jump - 1;
while (j >= 0) {
currDelim = delimiters[j];
if (currDelim.open &&
currDelim.marker === lastDelim.marker &&
currDelim.end < 0 &&
currDelim.level === lastDelim.level) {
// typeofs are for backward compatibility with plugins
var odd_match = (currDelim.close || lastDelim.open) &&
typeof currDelim.length !== 'undefined' &&
typeof lastDelim.length !== 'undefined' &&
(currDelim.length + lastDelim.length) % 3 === 0;
if (!odd_match) {
lastDelim.jump = i - j;
lastDelim.open = false;
currDelim.end = i;
currDelim.jump = 0;
break;
}
}
j -= currDelim.jump + 1;
}
}
};
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Merge adjacent text nodes into one, and re-calculate all token levels
//
module.exports = function text_collapse(state) {
var curr, last,
level = 0,
tokens = state.tokens,
max = state.tokens.length;
for (curr = last = 0; curr < max; curr++) {
// re-calculate levels
level += tokens[curr].nesting;
tokens[curr].level = level;
if (tokens[curr].type === 'text' &&
curr + 1 < max &&
tokens[curr + 1].type === 'text') {
// collapse two adjacent text nodes
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
} else {
if (curr !== last) { tokens[last] = tokens[curr]; }
last++;
}
}
if (curr !== last) {
tokens.length = last;
}
};
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Inline parser state
var Token = __webpack_require__(10);
var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
var isPunctChar = __webpack_require__(0).isPunctChar;
var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
function StateInline(src, md, env, outTokens) {
this.src = src;
this.env = env;
this.md = md;
this.tokens = outTokens;
this.pos = 0;
this.posMax = this.src.length;
this.level = 0;
this.pending = '';
this.pendingLevel = 0;
this.cache = {}; // Stores { start: end } pairs. Useful for backtrack
// optimization of pairs parse (emphasis, strikes).
this.delimiters = []; // Emphasis-like delimiters
}
// Flush pending text
//
StateInline.prototype.pushPending = function () {
var token = new Token('text', '', 0);
token.content = this.pending;
token.level = this.pendingLevel;
this.tokens.push(token);
this.pending = '';
return token;
};
// Push new token to "stream".
// If pending text exists - flush it as text token
//
StateInline.prototype.push = function (type, tag, nesting) {
if (this.pending) {
this.pushPending();
}
var token = new Token(type, tag, nesting);
if (nesting < 0) { this.level--; }
token.level = this.level;
if (nesting > 0) { this.level++; }
this.pendingLevel = this.level;
this.tokens.push(token);
return token;
};
// Scan a sequence of emphasis-like markers, and determine whether
// it can start an emphasis sequence or end an emphasis sequence.
//
// - start - position to scan from (it should point at a valid marker);
// - canSplitWord - determine if these markers can be found inside a word
//
StateInline.prototype.scanDelims = function (start, canSplitWord) {
var pos = start, lastChar, nextChar, count, can_open, can_close,
isLastWhiteSpace, isLastPunctChar,
isNextWhiteSpace, isNextPunctChar,
left_flanking = true,
right_flanking = true,
max = this.posMax,
marker = this.src.charCodeAt(start);
// treat beginning of the line as a whitespace
lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }
count = pos - start;
// treat end of the line as a whitespace
nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
isLastWhiteSpace = isWhiteSpace(lastChar);
isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
left_flanking = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
left_flanking = false;
}
}
if (isLastWhiteSpace) {
right_flanking = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
right_flanking = false;
}
}
if (!canSplitWord) {
can_open = left_flanking && (!right_flanking || isLastPunctChar);
can_close = right_flanking && (!left_flanking || isNextPunctChar);
} else {
can_open = left_flanking;
can_close = right_flanking;
}
return {
can_open: can_open,
can_close: can_close,
length: count
};
};
// re-export Token class to use in block rules
StateInline.prototype.Token = Token;
module.exports = StateInline;
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
////////////////////////////////////////////////////////////////////////////////
// Helpers
// Merge objects
//
function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
Object.keys(source).forEach(function (key) {
obj[key] = source[key];
});
});
return obj;
}
function _class(obj) { return Object.prototype.toString.call(obj); }
function isString(obj) { return _class(obj) === '[object String]'; }
function isObject(obj) { return _class(obj) === '[object Object]'; }
function isRegExp(obj) { return _class(obj) === '[object RegExp]'; }
function isFunction(obj) { return _class(obj) === '[object Function]'; }
function escapeRE(str) { return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); }
////////////////////////////////////////////////////////////////////////////////
var defaultOptions = {
fuzzyLink: true,
fuzzyEmail: true,
fuzzyIP: false
};
function isOptionsObj(obj) {
return Object.keys(obj || {}).reduce(function (acc, k) {
return acc || defaultOptions.hasOwnProperty(k);
}, false);
}
var defaultSchemas = {
'http:': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.http = new RegExp(
'^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
);
}
if (self.re.http.test(tail)) {
return tail.match(self.re.http)[0].length;
}
return 0;
}
},
'https:': 'http:',
'ftp:': 'http:',
'//': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.no_http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.no_http = new RegExp(
'^' +
self.re.src_auth +
// Don't allow single-level domains, because of false positives like '//test'
// with code comments
'(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
self.re.src_port +
self.re.src_host_terminator +
self.re.src_path,
'i'
);
}
if (self.re.no_http.test(tail)) {
// should not be `://` & `///`, that protects from errors in protocol name
if (pos >= 3 && text[pos - 3] === ':') { return 0; }
if (pos >= 3 && text[pos - 3] === '/') { return 0; }
return tail.match(self.re.no_http)[0].length;
}
return 0;
}
},
'mailto:': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.mailto) {
self.re.mailto = new RegExp(
'^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
);
}
if (self.re.mailto.test(tail)) {
return tail.match(self.re.mailto)[0].length;
}
return 0;
}
}
};
/*eslint-disable max-len*/
// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
var tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
var tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
/*eslint-enable max-len*/
////////////////////////////////////////////////////////////////////////////////
function resetScanCache(self) {
self.__index__ = -1;
self.__text_cache__ = '';
}
function createValidator(re) {
return function (text, pos) {
var tail = text.slice(pos);
if (re.test(tail)) {
return tail.match(re)[0].length;
}
return 0;
};
}
function createNormalizer() {
return function (match, self) {
self.normalize(match);
};
}
// Schemas compiler. Build regexps.
//
function compile(self) {
// Load & clone RE patterns.
var re = self.re = __webpack_require__(85)(self.__opts__);
// Define dynamic patterns
var tlds = self.__tlds__.slice();
self.onCompile();
if (!self.__tlds_replaced__) {
tlds.push(tlds_2ch_src_re);
}
tlds.push(re.src_xn);
re.src_tlds = tlds.join('|');
function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');
//
// Compile each schema
//
var aliases = [];
self.__compiled__ = {}; // Reset compiled data
function schemaError(name, val) {
throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
}
Object.keys(self.__schemas__).forEach(function (name) {
var val = self.__schemas__[name];
// skip disabled methods
if (val === null) { return; }
var compiled = { validate: null, link: null };
self.__compiled__[name] = compiled;
if (isObject(val)) {
if (isRegExp(val.validate)) {
compiled.validate = createValidator(val.validate);
} else if (isFunction(val.validate)) {
compiled.validate = val.validate;
} else {
schemaError(name, val);
}
if (isFunction(val.normalize)) {
compiled.normalize = val.normalize;
} else if (!val.normalize) {
compiled.normalize = createNormalizer();
} else {
schemaError(name, val);
}
return;
}
if (isString(val)) {
aliases.push(name);
return;
}
schemaError(name, val);
});
//
// Compile postponed aliases
//
aliases.forEach(function (alias) {
if (!self.__compiled__[self.__schemas__[alias]]) {
// Silently fail on missed schemas to avoid errons on disable.
// schemaError(alias, self.__schemas__[alias]);
return;
}
self.__compiled__[alias].validate =
self.__compiled__[self.__schemas__[alias]].validate;
self.__compiled__[alias].normalize =
self.__compiled__[self.__schemas__[alias]].normalize;
});
//
// Fake record for guessed links
//
self.__compiled__[''] = { validate: null, normalize: createNormalizer() };
//
// Build schema condition
//
var slist = Object.keys(self.__compiled__)
.filter(function (name) {
// Filter disabled & fake schemas
return name.length > 0 && self.__compiled__[name];
})
.map(escapeRE)
.join('|');
// (?!_) cause 1.5x slowdown
self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|' +
'(' + self.re.host_fuzzy_test.source + ')|' +
'@',
'i');
//
// Cleanup
//
resetScanCache(self);
}
/**
* class Match
*
* Match result. Single element of array, returned by [[LinkifyIt#match]]
**/
function Match(self, shift) {
var start = self.__index__,
end = self.__last_index__,
text = self.__text_cache__.slice(start, end);
/**
* Match#schema -> String
*
* Prefix (protocol) for matched string.
**/
this.schema = self.__schema__.toLowerCase();
/**
* Match#index -> Number
*
* First position of matched string.
**/
this.index = start + shift;
/**
* Match#lastIndex -> Number
*
* Next position after matched string.
**/
this.lastIndex = end + shift;
/**
* Match#raw -> String
*
* Matched string.
**/
this.raw = text;
/**
* Match#text -> String
*
* Notmalized text of matched string.
**/
this.text = text;
/**
* Match#url -> String
*
* Normalized url of matched string.
**/
this.url = text;
}
function createMatch(self, shift) {
var match = new Match(self, shift);
self.__compiled__[match.schema].normalize(match, self);
return match;
}
/**
* class LinkifyIt
**/
/**
* new LinkifyIt(schemas, options)
* - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Creates new linkifier instance with optional additional schemas.
* Can be called without `new` keyword for convenience.
*
* By default understands:
*
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
* - "fuzzy" links and emails (example.com, foo@bar.com).
*
* `schemas` is an object, where each key/value describes protocol/rule:
*
* - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
* for example). `linkify-it` makes shure that prefix is not preceeded with
* alphanumeric char and symbols. Only whitespaces and punctuation allowed.
* - __value__ - rule to check tail after link prefix
* - _String_ - just alias to existing rule
* - _Object_
* - _validate_ - validator function (should return matched length on success),
* or `RegExp`.
* - _normalize_ - optional function to normalize text & url of matched result
* (for example, for @twitter mentions).
*
* `options`:
*
* - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
* - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
* like version numbers. Default `false`.
* - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
*
**/
function LinkifyIt(schemas, options) {
if (!(this instanceof LinkifyIt)) {
return new LinkifyIt(schemas, options);
}
if (!options) {
if (isOptionsObj(schemas)) {
options = schemas;
schemas = {};
}
}
this.__opts__ = assign({}, defaultOptions, options);
// Cache last tested result. Used to skip repeating steps on next `match` call.
this.__index__ = -1;
this.__last_index__ = -1; // Next scan position
this.__schema__ = '';
this.__text_cache__ = '';
this.__schemas__ = assign({}, defaultSchemas, schemas);
this.__compiled__ = {};
this.__tlds__ = tlds_default;
this.__tlds_replaced__ = false;
this.re = {};
compile(this);
}
/** chainable
* LinkifyIt#add(schema, definition)
* - schema (String): rule name (fixed pattern prefix)
* - definition (String|RegExp|Object): schema definition
*
* Add new rule definition. See constructor description for details.
**/
LinkifyIt.prototype.add = function add(schema, definition) {
this.__schemas__[schema] = definition;
compile(this);
return this;
};
/** chainable
* LinkifyIt#set(options)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Set recognition options for links without schema.
**/
LinkifyIt.prototype.set = function set(options) {
this.__opts__ = assign(this.__opts__, options);
return this;
};
/**
* LinkifyIt#test(text) -> Boolean
*
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
**/
LinkifyIt.prototype.test = function test(text) {
// Reset scan cache
this.__text_cache__ = text;
this.__index__ = -1;
if (!text.length) { return false; }
var m, ml, me, len, shift, next, re, tld_pos, at_pos;
// try to scan for link with schema - that's the most simple rule
if (this.re.schema_test.test(text)) {
re = this.re.schema_search;
re.lastIndex = 0;
while ((m = re.exec(text)) !== null) {
len = this.testSchemaAt(text, m[2], re.lastIndex);
if (len) {
this.__schema__ = m[2];
this.__index__ = m.index + m[1].length;
this.__last_index__ = m.index + m[0].length + len;
break;
}
}
}
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
// guess schemaless links
tld_pos = text.search(this.re.host_fuzzy_test);
if (tld_pos >= 0) {
// if tld is located after found link - no need to check fuzzy pattern
if (this.__index__ < 0 || tld_pos < this.__index__) {
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
shift = ml.index + ml[1].length;
if (this.__index__ < 0 || shift < this.__index__) {
this.__schema__ = '';
this.__index__ = shift;
this.__last_index__ = ml.index + ml[0].length;
}
}
}
}
}
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
// guess schemaless emails
at_pos = text.indexOf('@');
if (at_pos >= 0) {
// We can't skip this check, because this cases are possible:
// 192.168.1.1@gmail.com, my.in@example.com
if ((me = text.match(this.re.email_fuzzy)) !== null) {
shift = me.index + me[1].length;
next = me.index + me[0].length;
if (this.__index__ < 0 || shift < this.__index__ ||
(shift === this.__index__ && next > this.__last_index__)) {
this.__schema__ = 'mailto:';
this.__index__ = shift;
this.__last_index__ = next;
}
}
}
}
return this.__index__ >= 0;
};
/**
* LinkifyIt#pretest(text) -> Boolean
*
* Very quick check, that can give false positives. Returns true if link MAY BE
* can exists. Can be used for speed optimization, when you need to check that
* link NOT exists.
**/
LinkifyIt.prototype.pretest = function pretest(text) {
return this.re.pretest.test(text);
};
/**
* LinkifyIt#testSchemaAt(text, name, position) -> Number
* - text (String): text to scan
* - name (String): rule (schema) name
* - position (Number): text offset to check from
*
* Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
* at given position. Returns length of found pattern (0 on fail).
**/
LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
// If not supported schema check requested - terminate
if (!this.__compiled__[schema.toLowerCase()]) {
return 0;
}
return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
};
/**
* LinkifyIt#match(text) -> Array|null
*
* Returns array of found link descriptions or `null` on fail. We strongly
* recommend to use [[LinkifyIt#test]] first, for best speed.
*
* ##### Result match description
*
* - __schema__ - link schema, can be empty for fuzzy links, or `//` for
* protocol-neutral links.
* - __index__ - offset of matched text
* - __lastIndex__ - index of next char after mathch end
* - __raw__ - matched text
* - __text__ - normalized text
* - __url__ - link, generated from matched text
**/
LinkifyIt.prototype.match = function match(text) {
var shift = 0, result = [];
// Try to take previous element from cache, if .test() called before
if (this.__index__ >= 0 && this.__text_cache__ === text) {
result.push(createMatch(this, shift));
shift = this.__last_index__;
}
// Cut head if cache was used
var tail = shift ? text.slice(shift) : text;
// Scan string until end reached
while (this.test(tail)) {
result.push(createMatch(this, shift));
tail = tail.slice(this.__last_index__);
shift += this.__last_index__;
}
if (result.length) {
return result;
}
return null;
};
/** chainable
* LinkifyIt#tlds(list [, keepOld]) -> this
* - list (Array): list of tlds
* - keepOld (Boolean): merge with current list if `true` (`false` by default)
*
* Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
* to avoid false positives. By default this algorythm used:
*
* - hostname with any 2-letter root zones are ok.
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
* are ok.
* - encoded (`xn--...`) root zones are ok.
*
* If list is replaced, then exact match for 2-chars root zones will be checked.
**/
LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
list = Array.isArray(list) ? list : [ list ];
if (!keepOld) {
this.__tlds__ = list.slice();
this.__tlds_replaced__ = true;
compile(this);
return this;
}
this.__tlds__ = this.__tlds__.concat(list)
.sort()
.filter(function (el, idx, arr) {
return el !== arr[idx - 1];
})
.reverse();
compile(this);
return this;
};
/**
* LinkifyIt#normalize(match)
*
* Default normalizer (if schema does not define it's own).
**/
LinkifyIt.prototype.normalize = function normalize(match) {
// Do minimal possible changes by default. Need to collect feedback prior
// to move forward https://github.com/markdown-it/linkify-it/issues/1
if (!match.schema) { match.url = 'http://' + match.url; }
if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
match.url = 'mailto:' + match.url;
}
};
/**
* LinkifyIt#onCompile()
*
* Override to modify basic RegExp-s.
**/
LinkifyIt.prototype.onCompile = function onCompile() {
};
module.exports = LinkifyIt;
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (opts) {
var re = {};
// Use direct extract instead of `regenerate` to reduse browserified size
re.src_Any = __webpack_require__(17).source;
re.src_Cc = __webpack_require__(18).source;
re.src_Z = __webpack_require__(19).source;
re.src_P = __webpack_require__(8).source;
// \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');
// \p{\Z\Cc} (white spaces + control)
re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');
// Experimental. List of chars, completely prohibited in links
// because can separate it from other part of text
var text_separators = '[><\uff5c]';
// All possible word characters (everything without punctuation, spaces & controls)
// Defined via punctuation & spaces to save space
// Should be something like \p{\L\N\S\M} (\w but without `_`)
re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
// The same as abothe but without [0-9]
// var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
////////////////////////////////////////////////////////////////////////////////
re.src_ip4 =
'(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
// Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
re.src_port =
'(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
re.src_host_terminator =
'(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
re.src_path =
'(?:' +
'[/?#]' +
'(?:' +
'(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-]).|' +
'\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
'\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
"\\'(?=" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found
'\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
// - english
// - percent-encoded
// - parts of file path
// until more examples found.
'\\.(?!' + re.src_ZCc + '|[.]).|' +
(opts && opts['---'] ?
'\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
:
'\\-+|'
) +
'\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths
'\\!(?!' + re.src_ZCc + '|[!]).|' +
'\\?(?!' + re.src_ZCc + '|[?]).' +
')+' +
'|\\/' +
')?';
re.src_email_name =
'[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+';
re.src_xn =
'xn--[a-z0-9\\-]{1,59}';
// More to read about domain names
// http://serverfault.com/questions/638260/
re.src_domain_root =
// Allow letters & digits (http://test1)
'(?:' +
re.src_xn +
'|' +
re.src_pseudo_letter + '{1,63}' +
')';
re.src_domain =
'(?:' +
re.src_xn +
'|' +
'(?:' + re.src_pseudo_letter + ')' +
'|' +
// don't allow `--` in domain names, because:
// - that can conflict with markdown &mdash; / &ndash;
// - nobody use those anyway
'(?:' + re.src_pseudo_letter + '(?:-(?!-)|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +
')';
re.src_host =
'(?:' +
// Don't need IP check, because digits are already allowed in normal domain names
// src_ip4 +
// '|' +
'(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain/*_root*/ + ')' +
')';
re.tpl_host_fuzzy =
'(?:' +
re.src_ip4 +
'|' +
'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' +
')';
re.tpl_host_no_ip_fuzzy =
'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
re.src_host_strict =
re.src_host + re.src_host_terminator;
re.tpl_host_fuzzy_strict =
re.tpl_host_fuzzy + re.src_host_terminator;
re.src_host_port_strict =
re.src_host + re.src_port + re.src_host_terminator;
re.tpl_host_port_fuzzy_strict =
re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
re.tpl_host_port_no_ip_fuzzy_strict =
re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;
////////////////////////////////////////////////////////////////////////////////
// Main rules
// Rude test fuzzy links by host, for quick deny
re.tpl_host_fuzzy_test =
'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
re.tpl_email_fuzzy =
'(^|' + text_separators + '|\\(|' + re.src_ZCc + ')(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
re.tpl_link_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
re.tpl_link_no_ip_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
return re;
};
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) {
/** Detect free variables */
var freeExports = typeof exports == 'object' && exports &&
!exports.nodeType && exports;
var freeModule = typeof module == 'object' && module &&
!module.nodeType && module;
var freeGlobal = typeof global == 'object' && global;
if (
freeGlobal.global === freeGlobal ||
freeGlobal.window === freeGlobal ||
freeGlobal.self === freeGlobal
) {
root = freeGlobal;
}
/**
* The `punycode` object.
* @name punycode
* @type Object
*/
var punycode,
/** Highest positive signed 32-bit float value */
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
base = 36,
tMin = 1,
tMax = 26,
skew = 38,
damp = 700,
initialBias = 72,
initialN = 128, // 0x80
delimiter = '-', // '\x2D'
/** Regular expressions */
regexPunycode = /^xn--/,
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
/** Error messages */
errors = {
'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
/** Convenience shortcuts */
baseMinusTMin = base - tMin,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
/** Temporary variable */
key;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, fn) {
var length = array.length;
var result = [];
while (length--) {
result[length] = fn(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {Array} A new string of characters returned by the callback
* function.
*/
function mapDomain(string, fn) {
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
string = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
string = string.replace(regexSeparators, '\x2E');
var labels = string.split('.');
var encoded = map(labels, fn).join('.');
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
var output = [],
counter = 0,
length = string.length,
value,
extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// high surrogate, and there is a next character
extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// unmatched surrogate; only append this code unit, in case the next
// code unit is the high surrogate of a surrogate pair
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/
function ucs2encode(array) {
return map(array, function(value) {
var output = '';
if (value > 0xFFFF) {
value -= 0x10000;
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
value = 0xDC00 | value & 0x3FF;
}
output += stringFromCharCode(value);
return output;
}).join('');
}
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
function basicToDigit(codePoint) {
if (codePoint - 48 < 10) {
return codePoint - 22;
}
if (codePoint - 65 < 26) {
return codePoint - 65;
}
if (codePoint - 97 < 26) {
return codePoint - 97;
}
return base;
}
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
}
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
function adapt(delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
}
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/
function decode(input) {
// Don't use UCS-2
var output = [],
inputLength = input.length,
out,
i = 0,
n = initialN,
bias = initialBias,
basic,
j,
index,
oldi,
w,
k,
digit,
t,
/** Cached calculation results */
baseMinusT;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base || digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output
output.splice(i++, 0, n);
}
return ucs2encode(output);
}
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
bias,
j,
m,
q,
k,
t,
currentValue,
output = [],
/** `inputLength` will hold the number of code points in `input`. */
inputLength,
/** Cached calculation results */
handledCPCountPlusOne,
baseMinusT,
qMinusT;
// Convert the input in UCS-2 to Unicode
input = ucs2decode(input);
// Cache the length
inputLength = input.length;
// Initialize the state
n = initialN;
delta = 0;
bias = initialBias;
// Handle the basic code points
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
handledCPCount = basicLength = output.length;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a delimiter
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
for (m = maxInt, j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow
handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer
for (q = delta, k = base; /* no condition */; k += base) {
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
qMinusT = q - t;
baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
}
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
function toUnicode(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
}
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
function toASCII(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
}
/*--------------------------------------------------------------------------*/
/** Define the public API */
punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '1.4.1',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
/** Expose `punycode` */
// Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following:
if (
true
) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
return punycode;
}).call(exports, __webpack_require__, exports, module),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (freeExports && freeModule) {
if (module.exports == freeExports) {
// in Node.js, io.js, or RingoJS v0.8.0+
freeModule.exports = punycode;
} else {
// in Narwhal or RingoJS v0.7.0-
for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
}
}
} else {
// in Rhino or a web browser
root.punycode = punycode;
}
}(this));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(87)(module), __webpack_require__(30)))
/***/ }),
/* 87 */
/***/ (function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// markdown-it default options
module.exports = {
options: {
html: false, // Enable HTML tags in source
xhtmlOut: false, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 100 // Internal protection, recursion limit
},
components: {
core: {},
block: {},
inline: {}
}
};
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// "Zero" preset, with nothing enabled. Useful for manual configuring of simple
// modes. For example, to parse bold/italic only.
module.exports = {
options: {
html: false, // Enable HTML tags in source
xhtmlOut: false, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 20 // Internal protection, recursion limit
},
components: {
core: {
rules: [
'normalize',
'block',
'inline'
]
},
block: {
rules: [
'paragraph'
]
},
inline: {
rules: [
'text'
],
rules2: [
'balance_pairs',
'text_collapse'
]
}
}
};
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Commonmark default options
module.exports = {
options: {
html: true, // Enable HTML tags in source
xhtmlOut: true, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 20 // Internal protection, recursion limit
},
components: {
core: {
rules: [
'normalize',
'block',
'inline'
]
},
block: {
rules: [
'blockquote',
'code',
'fence',
'heading',
'hr',
'html_block',
'lheading',
'list',
'reference',
'paragraph'
]
},
inline: {
rules: [
'autolink',
'backticks',
'emphasis',
'entity',
'escape',
'html_inline',
'image',
'link',
'newline',
'text'
],
rules2: [
'balance_pairs',
'emphasis',
'text_collapse'
]
}
}
};
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
(function webpackUniversalModuleDefinition(root, factory) {
if(true)
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["to-mark"] = factory();
else
root["toMark"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 3);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements basicRenderer
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var Renderer = __webpack_require__(1);
var FIND_LAST_RETURN_RX = /\n$/g,
FIND_BR_AND_RETURN_RX = /[ \xA0]+\n\n/g,
FIND_MULTIPLE_EMPTYLINE_BETWEEN_TEXT_RX = /([ \xA0]+\n){2,}/g,
FIND_LINK_HREF = /href\=\"(.*?)\"/,
START_OF_LINES_RX = /^/gm;
/**
* basicRenderer
* Basic Markdown Renderer
* @exports basicRenderer
* @augments Renderer
*/
var basicRenderer = Renderer.factory({
//inlines
'TEXT_NODE': function(node) {
var managedText;
managedText = this.trim(this.getSpaceCollapsedText(node.nodeValue));
if (this._isNeedEscapeHtml(managedText)) {
managedText = this.escapeTextHtml(managedText);
}
if (this._isNeedEscape(managedText)) {
managedText = this.escapeText(managedText);
}
return this.getSpaceControlled(managedText, node);
},
'CODE TEXT_NODE': function(node) {
return node.nodeValue;
},
'EM, I': function(node, subContent) {
var res = '';
if (!this.isEmptyText(subContent)) {
res = '*' + subContent + '*';
}
return res;
},
'STRONG, B': function(node, subContent) {
var res = '';
if (!this.isEmptyText(subContent)) {
res = '**' + subContent + '**';
}
return res;
},
'A': function(node, subContent) {
var res = subContent;
var title = '';
var foundedHref, url;
//상황에따라 href속성은 상황에 따라 값을 예측하기 힘듬
//그래서 html에 적용된 그대로를 사용
foundedHref = FIND_LINK_HREF.exec(node.outerHTML);
if (foundedHref) {
url = foundedHref[1].replace(/&amp;/g, '&');
}
if (node.title) {
title = ' "' + node.title + '"';
}
if (!this.isEmptyText(subContent) && url) {
res = '[' + this.escapeTextForLink(subContent) + '](' + url + title + ')';
}
return res;
},
'IMG': function(node) {
var res = '',
src = node.getAttribute('src'),
alt = node.alt;
if (src) {
res = '![' + this.escapeTextForLink(alt) + '](' + src + ')';
}
return res;
},
'BR': function() {
return ' \n';
},
'CODE': function(node, subContent) {
var backticks, numBackticks;
var res = '';
if (!this.isEmptyText(subContent)) {
numBackticks = parseInt(node.getAttribute('data-backticks'), 10);
backticks = isNaN(numBackticks) ? '`' : Array(numBackticks + 1).join('`');
res = backticks + subContent + backticks;
}
return res;
},
//Paragraphs
'P': function(node, subContent) {
var res = '';
//convert multiple brs to one br
subContent = subContent.replace(FIND_MULTIPLE_EMPTYLINE_BETWEEN_TEXT_RX, ' \n');
if (!this.isEmptyText(subContent)) {
res = '\n\n' + subContent + '\n\n';
}
return res;
},
'BLOCKQUOTE P': function(node, subContent) {
return subContent;
},
'LI P': function(node, subContent) {
var res = '';
if (!this.isEmptyText(subContent)) {
res = subContent;
}
return res;
},
//Headings
'H1, H2, H3, H4, H5, H6': function(node, subContent) {
var res = '',
headingNumber = parseInt(node.tagName.charAt(1), 10);
while (headingNumber) {
res += '#';
headingNumber -= 1;
}
res += ' ';
res += subContent;
return '\n\n' + res + '\n\n';
},
'LI H1, LI H2, LI H3, LI H4, LI H5, LI H6': function(node) {
return '<' + node.tagName.toLowerCase() + '>' + node.innerHTML + '</' + node.tagName.toLowerCase() + '>';
},
//List
'UL, OL': function(node, subContent) {
return '\n\n' + subContent + '\n\n';
},
'LI OL, LI UL': function(node, subContent) {
var res, processedSubContent;
//remove last br of li
processedSubContent = subContent.replace(FIND_BR_AND_RETURN_RX, '\n');
//parent LI converter add \n too, so we remove last return
processedSubContent = processedSubContent.replace(FIND_LAST_RETURN_RX, '');
res = processedSubContent.replace(START_OF_LINES_RX, ' ');
return '\n' + res;
},
'UL LI': function(node, subContent) {
var res = '';
//convert multiple brs to one br
subContent = subContent.replace(FIND_MULTIPLE_EMPTYLINE_BETWEEN_TEXT_RX, ' \n');
if (node.firstChild && node.firstChild.tagName === 'P') {
res += '\n';
}
res += '* ' + subContent + '\n';
return res;
},
'OL LI': function(node, subContent) {
var res = '',
liCounter = 1;
while (node.previousSibling) {
node = node.previousSibling;
if (node.nodeType === 1 && node.tagName === 'LI') {
liCounter += 1;
}
}
//convert multiple brs to one br
subContent = subContent.replace(FIND_MULTIPLE_EMPTYLINE_BETWEEN_TEXT_RX, ' \n');
if (node.firstChild && node.firstChild.tagName === 'P') {
res += '\n';
}
res += liCounter + '. ' + subContent + '\n';
return res;
},
//HR
'HR': function() {
return '\n\n- - -\n\n';
},
//Blockquote
'BLOCKQUOTE': function(node, subContent) {
var res, trimmedText;
//convert multiple brs to one emptyline
subContent = subContent.replace(FIND_MULTIPLE_EMPTYLINE_BETWEEN_TEXT_RX, '\n\n');
trimmedText = this.trim(subContent);
res = trimmedText.replace(START_OF_LINES_RX, '> ');
return '\n\n' + res + '\n\n';
},
//Code Block
'PRE CODE': function(node, subContent) {
var res, lastNremoved;
lastNremoved = subContent.replace(FIND_LAST_RETURN_RX, '');
res = lastNremoved.replace(START_OF_LINES_RX, ' ');
return '\n\n' + res + '\n\n';
}
});
module.exports = basicRenderer;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements Renderer
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var FIND_LEAD_SPACE_RX = /^\u0020/,
FIND_TRAIL_SPACE_RX = /.+\u0020$/,
FIND_SPACE_RETURN_TAB_RX = /[\n\s\t]+/g,
//find first and last characters for trim
FIND_CHAR_TO_TRIM_RX = /^[\u0020\r\n\t]+|[\u0020\r\n\t]+$/g,
//find space more than one
FIND_SPACE_MORE_THAN_ONE_RX = /[\u0020]+/g,
//find characters that need escape
FIND_CHAR_TO_ESCAPE_RX = /[~>()*{}\[\]_`+-.!#|]/g,
// find characters to be escaped in links or images
FIND_CHAR_TO_ESCAPE_IN_LINK_RX = /[\[\]\(\)<>]/g;
var TEXT_NODE = 3;
/**
* forEachOwnProperties
* Iterate properties of object
* from https://github.com/nhnent/fe.code-snippet/blob/master/src/collection.js
* @param {object} obj object to iterate
* @param {function} iteratee callback function
* @param {*} [context] context of callback
*/
function forEachOwnProperties(obj, iteratee, context) {
var key;
context = context || null;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
if (iteratee.call(context, obj[key], key, obj) === false) {
break;
}
}
}
}
/**
* Renderer
* @exports Renderer
* @constructor
* @param {object} [rules] rules to add
* @class
*/
function Renderer(rules) {
this.rules = {};
if (rules) {
this.addRules(rules);
}
}
/**
* Line feed replacement text
* @type string
*/
Renderer.prototype.lineFeedReplacement = '\u200B\u200B';
/**
* addRule
* Add rule
* @param {string} selectorString rule selector
* @param {function} converter converter function
*/
Renderer.prototype.addRule = function(selectorString, converter) {
var selectors = selectorString.split(', '),
selector = selectors.pop();
converter.fname = selectorString;
while (selector) {
this._setConverterWithSelector(selector, converter);
selector = selectors.pop();
}
};
/**
* addRules
* Add rules using object
* @param {object} rules key(rule selector), value(converter function)
*/
Renderer.prototype.addRules = function(rules) {
forEachOwnProperties(rules, function(converter, selectorString) {
this.addRule(selectorString, converter);
}, this);
};
/**
* Whether if inline node or not
* @param {Node} node Element
* @returns {boolean}
*/
function isInlineNode(node) {
var tag = node.tagName;
return tag === 'S' || tag === 'B' || tag === 'I' || tag === 'EM'
|| tag === 'STRONG' || tag === 'A' || tag === 'IMG' || tag === 'CODE';
}
/**
* getSpaceControlled
* Remove flanked space of dom node
* @param {string} content text content
* @param {HTMLElement} node current node
* @returns {string} result
*/
Renderer.prototype.getSpaceControlled = function(content, node) {
var lead = '',
trail = '',
text;
if (node.previousSibling && (node.previousSibling.nodeType === TEXT_NODE || isInlineNode(node.previousSibling))) {
text = node.previousSibling.innerHTML || node.previousSibling.nodeValue;
if (FIND_TRAIL_SPACE_RX.test(text) || FIND_LEAD_SPACE_RX.test(node.innerHTML || node.nodeValue)) {
lead = ' ';
}
}
if (node.nextSibling && (node.nextSibling.nodeType === TEXT_NODE || isInlineNode(node.nextSibling))) {
text = node.nextSibling.innerHTML || node.nextSibling.nodeValue;
if (FIND_LEAD_SPACE_RX.test(text) || FIND_TRAIL_SPACE_RX.test(node.innerHTML || node.nodeValue)) {
trail = ' ';
}
}
return lead + content + trail;
};
/**
* convert
* Convert dom node to markdown using dom node and subContent
* @param {HTMLElement} node node to convert
* @param {string} subContent child nodes converted text
* @returns {string} converted text
*/
Renderer.prototype.convert = function(node, subContent) {
var result,
converter = this._getConverter(node);
if (node && node.nodeType === Node.ELEMENT_NODE && node.hasAttribute('data-tomark-pass')) {
node.removeAttribute('data-tomark-pass');
result = node.outerHTML;
} else if (converter) {
result = converter.call(this, node, subContent);
} else if (node) {
result = this.getSpaceControlled(this._getInlineHtml(node, subContent), node);
}
return result || '';
};
Renderer.prototype._getInlineHtml = function(node, subContent) {
var html = node.outerHTML,
tagName = node.tagName,
escapedSubContent = subContent.replace(/\$/g, '$$$$');
// escape $: replace all $ char to $$ before we throw this string to replace
return html.replace(new RegExp('(<' + tagName + ' ?.*?>).*(</' + tagName + '>)', 'i'), '$1' + escapedSubContent + '$2');
};
/**
* _getConverter
* Get converter function for node
* @private
* @param {HTMLElement} node node
* @returns {function} converter function
*/
Renderer.prototype._getConverter = function(node) {
var rulePointer = this.rules,
converter;
while (node && rulePointer) {
rulePointer = this._getNextRule(rulePointer, this._getRuleNameFromNode(node));
node = this._getPrevNode(node);
if (rulePointer && rulePointer.converter) {
converter = rulePointer.converter;
}
}
return converter;
};
/**
* _getNextRule
* Get next rule object
* @private
* @param {object} ruleObj rule object
* @param {string} ruleName rule tag name to find
* @returns {object} rule Object
*/
Renderer.prototype._getNextRule = function(ruleObj, ruleName) {
return ruleObj[ruleName];
};
/**
* _getRuleNameFromNode
* Get proper rule tag name from node
* @private
* @param {HTMLElement} node node
* @returns {string} rule tag name
*/
Renderer.prototype._getRuleNameFromNode = function(node) {
return node.tagName || 'TEXT_NODE';
};
/**
* _getPrevNode
* Get node's available parent node
* @private
* @param {HTMLElement} node node
* @returns {HTMLElement | undefined} result
*/
Renderer.prototype._getPrevNode = function(node) {
var parentNode = node.parentNode;
var previousNode;
if (parentNode && !parentNode.__htmlRootByToMark) {
previousNode = parentNode;
}
return previousNode;
};
/**
* _setConverterWithSelector
* Set converter for selector
* @private
* @param {string} selectors rule selector
* @param {function} converter converter function
*/
Renderer.prototype._setConverterWithSelector = function(selectors, converter) {
var rulePointer = this.rules;
this._eachSelector(selectors, function(ruleElem) {
if (!rulePointer[ruleElem]) {
rulePointer[ruleElem] = {};
}
rulePointer = rulePointer[ruleElem];
});
rulePointer.converter = converter;
};
/**
* _eachSelector
* Iterate each selectors
* @private
* @param {string} selectors rule selectors
* @param {function} iteratee callback
*/
Renderer.prototype._eachSelector = function(selectors, iteratee) {
var selectorArray, selectorIndex;
selectorArray = selectors.split(' ');
selectorIndex = selectorArray.length - 1;
while (selectorIndex >= 0) {
iteratee(selectorArray[selectorIndex]);
selectorIndex -= 1;
}
};
/**
* trim
* Trim text
* @param {string} text text be trimed
* @returns {string} trimed text
*/
Renderer.prototype.trim = function(text) {
return text.replace(FIND_CHAR_TO_TRIM_RX, '');
};
/**
* isEmptyText
* Returns whether text empty or not
* @param {string} text text be checked
* @returns {boolean} result
*/
Renderer.prototype.isEmptyText = function(text) {
return text.replace(FIND_SPACE_RETURN_TAB_RX, '') === '';
};
/**
* getSpaceCollapsedText
* Collape space more than 2
* @param {string} text text be collapsed
* @returns {string} result
*/
Renderer.prototype.getSpaceCollapsedText = function(text) {
return text.replace(FIND_SPACE_MORE_THAN_ONE_RX, ' ');
};
/**
* Backslash escape to text
* Apply backslash escape to text
* @param {string} text text be processed
* @returns {string} processed text
*/
Renderer.prototype.escapeText = function(text) {
return text.replace(FIND_CHAR_TO_ESCAPE_RX, function(matched) {
return '\\' + matched;
});
};
/**
* Escape given text for link
* @param {string} text - text be processed
* @returns {string} - processed text
*/
Renderer.prototype.escapeTextForLink = function(text) {
return text.replace(FIND_CHAR_TO_ESCAPE_IN_LINK_RX, function(matched) {
return '\\' + matched;
});
};
/**
* Backslash escape to text for html
* Apply backslash escape to text
* @param {string} text text be processed
* @returns {string} processed text
*/
Renderer.prototype.escapeTextHtml = function(text) {
text = text.replace(Renderer.markdownTextToEscapeHtmlRx, function(matched) {
return '\\' + matched;
});
return text;
};
Renderer.markdownTextToEscapeRx = {
codeblock: /(^ {4}[^\n]+\n*)+/,
hr: /^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,
heading: /^(#{1,6}) +[\s\S]+/,
lheading: /^([^\n]+)\n *(=|-){2,} */,
blockquote: /^( *>[^\n]+.*)+/,
list: /^ *(\*+|-+|\d+\.) [\s\S]+/,
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,
link: /!?\[.*\]\(.*\)/,
reflink: /!?\[.*\]\s*\[([^\]]*)\]/,
strong: /__(\S[\s\S]*\h)__|\*\*(\S[\s\S]*\S)\*\*/,
em: /_(\S[\s\S]*\S)_|\*(\S[\s\S]*\S)\*/,
strikeThrough: /~~(\S[\s\S]*\S)~~/,
code: /(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
verticalBar: /\u007C/,
codeblockGfm: /^(`{3,})/,
codeblockTildes: /^(~{3,})/
};
Renderer.markdownTextToEscapeHtmlRx = /<([a-zA-Z_][a-zA-Z0-9\-\._]*)(\s|[^\\/>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-\._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-\.:/]*)>/g;
Renderer.prototype._isNeedEscape = function(text) {
var res = false;
var markdownTextToEscapeRx = Renderer.markdownTextToEscapeRx;
var type;
for (type in markdownTextToEscapeRx) {
if (markdownTextToEscapeRx.hasOwnProperty(type) && markdownTextToEscapeRx[type].test(text)) {
res = true;
break;
}
}
return res;
};
Renderer.prototype._isNeedEscapeHtml = function(text) {
return Renderer.markdownTextToEscapeHtmlRx.test(text);
};
/**
* Clone rules
* @param {object} destination object for apply rules
* @param {object} source source object for clone rules
*/
function cloneRules(destination, source) {
forEachOwnProperties(source, function(value, key) {
if (key !== 'converter') {
if (!destination[key]) {
destination[key] = {};
}
cloneRules(destination[key], value);
} else {
destination[key] = value;
}
});
}
Renderer.prototype.mix = function(renderer) {
cloneRules(this.rules, renderer.rules);
};
/**
* Renderer factory
* Return new renderer
* @param {Renderer} srcRenderer renderer to extend
* @param {object} rules rule object, key(rule selector), value(converter function)
* @returns {Renderer} renderer
*/
Renderer.factory = function(srcRenderer, rules) {
var renderer = new Renderer();
if (!rules) {
rules = srcRenderer;
} else {
renderer.mix(srcRenderer);
}
renderer.addRules(rules);
return renderer;
};
module.exports = Renderer;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements Github flavored markdown renderer
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var Renderer = __webpack_require__(1),
basicRenderer = __webpack_require__(0);
/**
* gfmRenderer
* github flavored Markdown Renderer
*
* we didnt render gfm br here because we need distingush returns that made by block with br
* so we render gfm br later in toMark.js finalize function
* @exports gfmRenderer
* @augments Renderer
*/
var gfmRenderer = Renderer.factory(basicRenderer, {
'DEL, S': function(node, subContent) {
return '~~' + subContent + '~~';
},
'PRE CODE': function(node, subContent) {
var backticks;
var language = '';
var numberOfBackticks = node.getAttribute('data-backticks');
if (node.getAttribute('data-language')) {
language = ' ' + node.getAttribute('data-language');
}
numberOfBackticks = parseInt(numberOfBackticks, 10);
backticks = isNaN(numberOfBackticks) ? '```' : Array(numberOfBackticks + 1).join('`');
subContent = subContent.replace(/(\r\n)|(\r)|(\n)/g, this.lineFeedReplacement);
return '\n\n' + backticks + language + '\n' + subContent + '\n' + backticks + '\n\n';
},
'PRE': function(node, subContent) {
return subContent;
},
'UL LI': function(node, subContent) {
return basicRenderer.convert(node, makeTaskIfNeed(node, subContent));
},
'OL LI': function(node, subContent) {
return basicRenderer.convert(node, makeTaskIfNeed(node, subContent));
},
//Table
'TABLE': function(node, subContent) {
return '\n\n' + subContent + '\n\n';
},
'TBODY, TFOOT': function(node, subContent) {
return subContent;
},
'TR TD, TR TH': function(node, subContent) {
subContent = subContent.replace(/(\r\n)|(\r)|(\n)/g, '');
return ' ' + subContent + ' |';
},
'TD BR, TH BR': function() {
return '<br>';
},
'TR': function(node, subContent) {
return '|' + subContent + '\n';
},
'THEAD': function(node, subContent) {
var i, ths, thsLength,
result = '';
ths = findChildTag(findChildTag(node, 'TR')[0], 'TH');
thsLength = ths.length;
for (i = 0; i < thsLength; i += 1) {
result += ' ' + makeTableHeadAlignText(ths[i]) + ' |';
}
return subContent ? (subContent + '|' + result + '\n') : '';
}
});
/**
* Make task Markdown string if need
* @param {HTMLElement} node Passed HTML Element
* @param {string} subContent node's content
* @returns {string}
*/
function makeTaskIfNeed(node, subContent) {
var condition;
if (node.className.indexOf('task-list-item') !== -1) {
condition = node.className.indexOf('checked') !== -1 ? 'x' : ' ';
subContent = '[' + condition + '] ' + subContent;
}
return subContent;
}
/**
* Make table head align text
* @param {HTMLElement} th Table head cell element
* @returns {string}
*/
function makeTableHeadAlignText(th) {
var align, leftAlignValue, rightAlignValue, textLength;
align = th.align;
textLength = th.textContent ? th.textContent.length : th.innerText.length;
leftAlignValue = '';
rightAlignValue = '';
if (align) {
if (align === 'left') {
leftAlignValue = ':';
textLength -= 1;
} else if (align === 'right') {
rightAlignValue = ':';
textLength -= 1;
} else if (align === 'center') {
rightAlignValue = ':';
leftAlignValue = ':';
textLength -= 2;
}
}
return leftAlignValue + repeatString('-', textLength) + rightAlignValue;
}
/**
* Find child element of given tag name
* @param {HTMLElement} node starting element
* @param {string} tagName Tag name for search
* @returns {Array.<HTMLElement>}
*/
function findChildTag(node, tagName) {
var i,
childNodes = node.childNodes,
childLength = childNodes.length,
result = [];
for (i = 0; i < childLength; i += 1) {
if (childNodes[i].tagName && childNodes[i].tagName === tagName) {
result.push(childNodes[i]);
}
}
return result;
}
/**
* Repeat given string
* @param {string} pattern String for repeat
* @param {number} count Amount of repeat
* @returns {string}
*/
function repeatString(pattern, count) {
var result = pattern;
count = Math.max(count, 3);
while (count > 1) {
result += pattern;
count -= 1;
}
return result;
}
module.exports = gfmRenderer;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements entry point
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var toMark = __webpack_require__(4);
var Renderer = __webpack_require__(1);
var basicRenderer = __webpack_require__(0);
var gfmRenderer = __webpack_require__(2);
toMark.Renderer = Renderer;
toMark.basicRenderer = basicRenderer;
toMark.gfmRenderer = gfmRenderer;
module.exports = toMark;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements toMark
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var DomRunner = __webpack_require__(5),
toDom = __webpack_require__(6),
basicRenderer = __webpack_require__(0),
gfmRenderer = __webpack_require__(2);
var FIND_UNUSED_BRS_RX = /[ \xA0]+(\n\n)/g,
FIND_FIRST_LAST_WITH_SPACE_RETURNS_RX = /^[\n]+|[\s\n]+$/g,
FIND_MULTIPLE_BRS_RX = /([ \xA0]+\n){2,}/g,
FIND_RETURNS_RX = /([ \xA0]){2,}\n/g,
FIND_RETURNS_AND_SPACE_RX = /[ \xA0\n]+/g;
/**
* toMark
* @exports toMark
* @param {string} htmlStr html string to convert
* @param {object} options option
* @param {boolean} options.gfm if this property is false turn off it cant parse gfm
* @param {Renderer} options.renderer pass renderer to use
* @returns {string} converted markdown text
* @example
* toMark('<h1>hello world</h1>'); // "# hello world"
* toMark('<del>strike</del>'); // "~~strike~~"
* toMark('<del>strike</del>', {gfm: false}); // "strike"
*/
function toMark(htmlStr, options) {
var runner,
isGfm = true,
renderer;
if (!htmlStr) {
return '';
}
renderer = gfmRenderer;
if (options) {
isGfm = options.gfm;
if (isGfm === false) {
renderer = basicRenderer;
}
renderer = options.renderer || renderer;
}
runner = new DomRunner(toDom(htmlStr));
return finalize(parse(runner, renderer), isGfm, renderer.lineFeedReplacement);
}
/**
* parse
* Parse dom to markdown
* @param {DomRunner} runner runner
* @param {Renderer} renderer renderer
* @returns {string} markdown text
*/
function parse(runner, renderer) {
var markdownContent = '';
while (runner.next()) {
markdownContent += tracker(runner, renderer);
}
return markdownContent;
}
/**
* finalize
* Remove first and last return character
* @param {string} text text to finalize
* @param {boolean} isGfm isGfm flag
* @param {string} lineFeedReplacement Line feed replacement text
* @returns {string} result
*/
function finalize(text, isGfm, lineFeedReplacement) {
//collapse return and <br>
//BR뒤에 바로 \n이 이어지면 BR은 불필요하다
text = text.replace(FIND_UNUSED_BRS_RX, '\n');
//console.log(2, JSON.stringify(text));
//collapse multiple br
//두개 이상의 BR개행은 한개로
text = text.replace(FIND_MULTIPLE_BRS_RX, '\n\n');
//console.log(3, JSON.stringify(text));
text = text.replace(FIND_RETURNS_AND_SPACE_RX, function(matched) {
var returnCount = (matched.match(/\n/g) || []).length;
if (returnCount >= 3) {
return '\n\n';
} else if (matched >= 1) {
return '\n';
}
return matched;
});
//console.log(3, JSON.stringify(text));
//remove first and last \n
//시작과 마지막 개행제거
text = text.replace(FIND_FIRST_LAST_WITH_SPACE_RETURNS_RX, '');
//console.log(JSON.stringify(text));
text = text.replace(new RegExp(lineFeedReplacement, 'g'), '\n');
//in gfm replace ' \n' make by <br> to '\n'
//gfm모드인경우 임의 개행에 스페이스를 제거
if (isGfm) {
text = text.replace(FIND_RETURNS_RX, '\n');
}
//console.log(7, JSON.stringify(text));
return text;
}
/**
* tracker
* Iterate childNodes and process conversion using recursive call
* @param {DomRunner} runner dom runner
* @param {Renderer} renderer renderer to use
* @returns {string} processed text
*/
function tracker(runner, renderer) {
var i,
t,
subContent = '',
content;
var node = runner.getNode();
for (i = 0, t = node.childNodes.length; i < t; i += 1) {
runner.next();
subContent += tracker(runner, renderer);
}
content = renderer.convert(node, subContent);
return content;
}
module.exports = toMark;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements DomRunner
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/**
* Node Type Value
*/
var NODE = {
ELEMENT_NODE: 1,
ATTRIBUTE_NODE: 2,
TEXT_NODE: 3
};
/**
* DomRunner
* @exports DomRunner
* @constructor
* @class
* @param {HTMLElement} node A root node that it has nodes to iterate(not iterate itself and its any siblings)
*/
function DomRunner(node) {
this._normalizeTextChildren(node);
this._root = node;
this._current = node;
}
/**
* next
* Iterate next node
* @returns {HTMLElement} next node
*/
DomRunner.prototype.next = function() {
var current = this._current,
node;
if (this._current) {
node = this._getNextNode(current);
while (this._isNeedNextSearch(node, current)) {
current = current.parentNode;
node = current.nextSibling;
}
this._current = node;
}
return this._current;
};
/**
* getNode
* Return current node
* @returns {HTMLElement} current node
*/
DomRunner.prototype.getNode = function() {
this._normalizeTextChildren(this._current);
return this._current;
};
DomRunner.prototype._normalizeTextChildren = function(node) {
var childNode, nextNode;
if (!node || node.childNodes.length < 2) {
return;
}
childNode = node.firstChild;
while (childNode.nextSibling) {
nextNode = childNode.nextSibling;
if (childNode.nodeType === NODE.TEXT_NODE && nextNode.nodeType === NODE.TEXT_NODE) {
childNode.nodeValue += nextNode.nodeValue;
node.removeChild(nextNode);
} else {
childNode = nextNode;
}
}
};
/**
* getNodeText
* Get current node's text content
* @returns {string} text
*/
DomRunner.prototype.getNodeText = function() {
var node = this.getNode(),
text;
if (node.nodeType === NODE.TEXT_NODE) {
text = node.nodeValue;
} else {
text = node.textContent || node.innerText;
}
return text;
};
/**
* _isNeedNextSearch
* Check if there is next node to iterate
* @private
* @param {HTMLElement} node next node
* @param {HTMLElement} current next node
* @returns {boolean} result
*/
DomRunner.prototype._isNeedNextSearch = function(node, current) {
return !node && current !== this._root && current.parentNode !== this._root;
};
/**
* _getNextNode
* Return available next node
* @private
* @param {HTMLElement} current current node
* @returns {node} next node
*/
DomRunner.prototype._getNextNode = function(current) {
return current.firstChild || current.nextSibling;
};
DomRunner.NODE_TYPE = NODE;
module.exports = DomRunner;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @fileoverview Implements toDom
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var FIND_FIRST_LAST_SPACE_OR_RETURN_OR_TAB_RX = /^[\s\r\n\t]+|[\s\r\n\t]+$/g,
FIND_RETURN_OR_TAB_BETWEEN_TAGS_RX = />[\r\n\t]+</g,
FIND_WHOLE_SPACE_MORE_THAN_ONE_BETWEEN_TAGS_RX = />[ ]+</g;
/**
* toDom
* @exports toDom
* @param {HTMLElement|string} html DOM Node root or HTML string
* @returns {HTMLElement[]} dom element
*/
function toDom(html) {
var wrapper;
if (Object.prototype.toString.call(html) === '[object String]') {
wrapper = document.createElement('div');
wrapper.innerHTML = preProcess(html);
} else {
wrapper = html;
}
wrapper.__htmlRootByToMark = true;
return wrapper;
}
/**
* Pre process for html string
* @param {string} html Source HTML string
* @returns {string}
*/
function preProcess(html) {
//trim text
html = html.replace(FIND_FIRST_LAST_SPACE_OR_RETURN_OR_TAB_RX, '');
//trim between tags
html = html.replace(FIND_RETURN_OR_TAB_BETWEEN_TAGS_RX, '><');
//remove spaces more than 1(if need more space, must use &nbsp)
html = html.replace(FIND_WHOLE_SPACE_MORE_THAN_ONE_BETWEEN_TAGS_RX, '> <');
return html;
}
toDom.preProcess = preProcess;
module.exports = toDom;
/***/ })
/******/ ]);
});
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2016, Revin Guillen.
// Distributed under an MIT license: https://github.com/revin/markdown-it-task-lists/
/**
* @fileoverview Implements markdownitTaskPlugin
* @modifier Sungho Kim(sungho-kim@nhnent.com) FE Development Lab/NHN Ent.
* @modifier Junghwan Park(junghwan.park@nhnent.com) FE Development Lab/NHN Ent.
*/
/* eslint-disable */
/**
* Task list renderer for Markdown-it
* @param {object} markdownit Markdown-it instance
* @ignore
*/
var MarkdownitTaskRenderer = function MarkdownitTaskRenderer(markdownit) {
markdownit.core.ruler.after('inline', 'tui-task-list', function (state) {
var TASK_LIST_ITEM_CLASS_NAME = 'task-list-item';
var CHECKED_CLASS_NAME = 'checked';
var tokens = state.tokens;
var className;
var tokenIndex;
// tokenIndex=0 'ul', tokenIndex=1 'li', tokenIndex=2 'p_open'
for (tokenIndex = 2; tokenIndex < tokens.length; tokenIndex += 1) {
if (isTaskListItemToken(tokens, tokenIndex)) {
if (isChecked(tokens[tokenIndex])) {
className = TASK_LIST_ITEM_CLASS_NAME + ' ' + CHECKED_CLASS_NAME;
} else {
className = TASK_LIST_ITEM_CLASS_NAME;
}
removeMarkdownTaskFormatText(tokens[tokenIndex]);
setTokenAttribute(tokens[tokenIndex - 2], 'class', className);
setTokenAttribute(tokens[tokenIndex - 2], 'data-te-task', '');
}
}
});
};
/**
* Remove task format text for rendering
* @param {object} token Token object
* @ignore
*/
function removeMarkdownTaskFormatText(token) {
// '[X] ' length is 4
// FIXED: we don't need first space
token.content = token.content.slice(4);
token.children[0].content = token.children[0].content.slice(4);
}
/**
* Return boolean value whether task checked or not
* @param {object} token Token object
* @returns {boolean}
* @ignore
*/
function isChecked(token) {
var checked = false;
if (token.content.indexOf('[x]') === 0 || token.content.indexOf('[X]') === 0) {
checked = true;
}
return checked;
}
/**
* Set attribute of passed token
* @param {object} token Token object
* @param {string} attributeName Attribute name for set
* @param {string} attributeValue Attribute value for set
* @ignore
*/
function setTokenAttribute(token, attributeName, attributeValue) {
var index = token.attrIndex(attributeName);
var attr = [attributeName, attributeValue];
if (index < 0) {
token.attrPush(attr);
} else {
token.attrs[index] = attr;
}
}
/**
* Return boolean value whether task list item or not
* @param {array} tokens Token object
* @param {number} index Number of token index
* @returns {boolean}
* @ignore
*/
function isTaskListItemToken(tokens, index) {
return tokens[index].type === 'inline' && tokens[index - 1].type === 'paragraph_open' && tokens[index - 2].type === 'list_item_open' && (tokens[index].content.indexOf('[ ]') === 0 || tokens[index].content.indexOf('[x]') === 0 || tokens[index].content.indexOf('[X]') === 0);
}
/* eslint-enable */
module.exports = MarkdownitTaskRenderer;
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2016, Revin Guillen.
// Distributed under an MIT license: https://github.com/revin/markdown-it-task-lists/
/* eslint-disable */
/**
* @fileoverview Implements markdownitCodeBlockPlugin
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/**
* Code block renderer for Markdown-it
* @param {object} markdownit Markdown-it instance
* @ignore
*/
var MarkdownitCodeBlockRenderer = function MarkdownitCodeBlockRenderer(markdownit) {
markdownit.core.ruler.after('block', 'tui-code-block', function (state) {
var DEFAULT_NUMBER_OF_BACKTICKS = 3;
var tokens = state.tokens;
var currentToken, tokenIndex, numberOfBackticks;
for (tokenIndex = 0; tokenIndex < tokens.length; tokenIndex += 1) {
currentToken = tokens[tokenIndex];
if (isCodeFenceToken(currentToken)) {
numberOfBackticks = currentToken.markup.length;
if (numberOfBackticks > DEFAULT_NUMBER_OF_BACKTICKS) {
setTokenAttribute(currentToken, 'data-backticks', numberOfBackticks, true);
}
if (currentToken.info) {
setTokenAttribute(currentToken, 'data-language', escape(currentToken.info.replace(' ', ''), true));
}
}
}
});
};
/**
* Set attribute of passed token
* @param {object} token Token object
* @param {string} attributeName Attribute name for set
* @param {string} attributeValue Attribute value for set
* @ignore
*/
function setTokenAttribute(token, attributeName, attributeValue) {
var index = token.attrIndex(attributeName);
var attr = [attributeName, attributeValue];
if (index < 0) {
token.attrPush(attr);
} else {
token.attrs[index] = attr;
}
}
/**
* Return boolean value whether passed token is code fence or not
* @param {object} token Token object
* @returns {boolean}
* @ignore
*/
function isCodeFenceToken(token) {
return token.block === true && token.tag === 'code' && token.type === 'fence';
}
/**
* escape code from markdown-it
* @param {string} html HTML string
* @param {string} encode Boolean value of whether encode or not
* @returns {string}
* @ignore
*/
function escape(html, encode) {
return html.replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
}
/* eslint-enable */
module.exports = MarkdownitCodeBlockRenderer;
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
// Distributed under an ISC license: https://github.com/markdown-it/markdown-it/
/**
* @fileoverview Implements MarkdownItCodeRenderer
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/* eslint-disable */
module.exports = function code(state, startLine, endLine /*, silent*/) {
// Added by Junghwan Park
var FIND_LIST_RX = / {0,3}(?:-|\*|\d\.) /;
var lines = state.src.split('\n');
var currentLine = lines[startLine];
// Added by Junghwan Park
var nextLine,
last,
token,
emptyLines = 0;
// Add condition by Junghwan Park
if (currentLine.match(FIND_LIST_RX) || state.sCount[startLine] - state.blkIndent < 4) {
// Add condition by Junghwan Park
return false;
}
last = nextLine = startLine + 1;
while (nextLine < endLine) {
if (state.isEmpty(nextLine)) {
emptyLines++;
// workaround for lists: 2 blank lines should terminate indented
// code block, but not fenced code block
if (emptyLines >= 2 && state.parentType === 'list') {
break;
}
nextLine++;
continue;
}
emptyLines = 0;
if (state.sCount[nextLine] - state.blkIndent >= 4) {
nextLine++;
last = nextLine;
continue;
}
break;
}
state.line = last;
token = state.push('code_block', 'code', 0);
token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);
token.map = [startLine, state.line];
return true;
};
/* eslint-enable */
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
// Distributed under MIT license: https://github.com/markdown-it/markdown-it/
/**
* @fileoverview Implements markdownitCodeBlockQuoteRenderer
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/* eslint-disable */
// Block quotes
// prevent quote, pre in list #811
// ref: #989
// #811 START
// var isSpace = require('../common/utils').isSpace;
function isSpace(code) {
switch (code) {
case 0x09:
case 0x20:
return true;
}
return false;
}
// #811 END
module.exports = function blockquote(state, startLine, endLine, silent) {
var adjustTab,
ch,
i,
initial,
l,
lastLineEmpty,
lines,
nextLine,
offset,
oldBMarks,
oldBSCount,
oldIndent,
oldParentType,
oldSCount,
oldTShift,
spaceAfterMarker,
terminate,
terminatorRules,
token,
wasOutdented,
oldLineMax = state.lineMax,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// #811 START
var FIND_LIST_RX = /(?:-|\*|\d+\.) {1,4}(?:> {0,3})[^>]*$/;
var sourceLines = state.src.split('\n');
var currentLine = sourceLines[startLine];
// #811 END
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
// check the block quote marker
if (state.src.charCodeAt(pos++) !== 0x3E /* > */) {
return false;
}
// #811 START
// check block quote in list
if (currentLine.match(FIND_LIST_RX) /*&& !currentLine.match(/^ {0,6}>/)*/) {
return false;
}
// #811 END
// we know that it's going to be a valid blockquote,
// so no point trying to find the end of it in silent mode
if (silent) {
return true;
}
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
// skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) {
// ' > test '
// ^ -- position start of line here:
pos++;
initial++;
offset++;
adjustTab = false;
spaceAfterMarker = true;
} else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
spaceAfterMarker = true;
if ((state.bsCount[startLine] + offset) % 4 === 3) {
// ' >\t test '
// ^ -- position start of line here (tab has width===1)
pos++;
initial++;
offset++;
adjustTab = false;
} else {
// ' >\t test '
// ^ -- position start of line here + shift bsCount slightly
// to make extra space appear
adjustTab = true;
}
} else {
spaceAfterMarker = false;
}
oldBMarks = [state.bMarks[startLine]];
state.bMarks[startLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
oldBSCount = [state.bsCount[startLine]];
state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);
lastLineEmpty = pos >= max;
oldSCount = [state.sCount[startLine]];
state.sCount[startLine] = offset - initial;
oldTShift = [state.tShift[startLine]];
state.tShift[startLine] = pos - state.bMarks[startLine];
terminatorRules = state.md.block.ruler.getRules('blockquote');
oldParentType = state.parentType;
state.parentType = 'blockquote';
wasOutdented = false;
// Search the end of the block
//
// Block ends with either:
// 1. an empty line outside:
// ```
// > test
//
// ```
// 2. an empty line inside:
// ```
// >
// test
// ```
// 3. another tag:
// ```
// > test
// - - -
// ```
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
// check if it's outdented, i.e. it's inside list item and indented
// less than said list item:
//
// ```
// 1. anything
// > current blockquote
// 2. checking this line
// ```
if (state.sCount[nextLine] < state.blkIndent) wasOutdented = true;
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos >= max) {
// Case 1: line is not inside the blockquote, and this line is empty.
break;
}
if (state.src.charCodeAt(pos++) === 0x3E /* > */ && !wasOutdented) {
// This line is inside the blockquote.
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);
// skip one optional space after '>'
if (state.src.charCodeAt(pos) === 0x20 /* space */) {
// ' > test '
// ^ -- position start of line here:
pos++;
initial++;
offset++;
adjustTab = false;
spaceAfterMarker = true;
} else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
spaceAfterMarker = true;
if ((state.bsCount[nextLine] + offset) % 4 === 3) {
// ' >\t test '
// ^ -- position start of line here (tab has width===1)
pos++;
initial++;
offset++;
adjustTab = false;
} else {
// ' >\t test '
// ^ -- position start of line here + shift bsCount slightly
// to make extra space appear
adjustTab = true;
}
} else {
spaceAfterMarker = false;
}
oldBMarks.push(state.bMarks[nextLine]);
state.bMarks[nextLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
lastLineEmpty = pos >= max;
oldBSCount.push(state.bsCount[nextLine]);
state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] = offset - initial;
oldTShift.push(state.tShift[nextLine]);
state.tShift[nextLine] = pos - state.bMarks[nextLine];
continue;
}
// Case 2: line is not inside the blockquote, and the last line was empty.
if (lastLineEmpty) {
break;
}
// Case 3: another tag found.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
// Quirk to enforce "hard termination mode" for paragraphs;
// normally if you call `tokenize(state, startLine, nextLine)`,
// paragraphs will look below nextLine for paragraph continuation,
// but if blockquote is terminated by another tag, they shouldn't
state.lineMax = nextLine;
if (state.blkIndent !== 0) {
// state.blkIndent was non-zero, we now set it to zero,
// so we need to re-calculate all offsets to appear as
// if indent wasn't changed
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] -= state.blkIndent;
}
break;
}
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
// A negative indentation means that this is a paragraph continuation
//
state.sCount[nextLine] = -1;
}
oldIndent = state.blkIndent;
state.blkIndent = 0;
token = state.push('blockquote_open', 'blockquote', 1);
token.markup = '>';
token.map = lines = [startLine, 0];
state.md.block.tokenize(state, startLine, nextLine);
token = state.push('blockquote_close', 'blockquote', -1);
token.markup = '>';
state.lineMax = oldLineMax;
state.parentType = oldParentType;
lines[1] = state.line;
// Restore original tShift; this might not be necessary since the parser
// has already been here, but just to make sure we can do that.
for (i = 0; i < oldTShift.length; i++) {
state.bMarks[i + startLine] = oldBMarks[i];
state.tShift[i + startLine] = oldTShift[i];
state.sCount[i + startLine] = oldSCount[i];
state.bsCount[i + startLine] = oldBSCount[i];
}
state.blkIndent = oldIndent;
return true;
};
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
// Distributed under an ISC license: https://github.com/markdown-it/markdown-it/
/**
* @fileoverview Implements markdownitTableRenderer
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/*eslint-disable */
function getLine(state, line) {
var pos = state.bMarks[line] + state.blkIndent,
max = state.eMarks[line];
return state.src.substr(pos, max - pos);
}
function escapedSplit(str) {
var result = [],
pos = 0,
max = str.length,
ch,
escapes = 0,
lastPos = 0,
backTicked = false,
lastBackTick = 0;
ch = str.charCodeAt(pos);
while (pos < max) {
if (ch === 0x60 /* ` */ && escapes % 2 === 0) {
backTicked = !backTicked;
lastBackTick = pos;
} else if (ch === 0x7c /* | */ && escapes % 2 === 0 && !backTicked) {
result.push(str.substring(lastPos, pos));
lastPos = pos + 1;
} else if (ch === 0x5c /* \ */) {
escapes += 1;
} else {
escapes = 0;
}
pos += 1;
// If there was an un-closed backtick, go back to just after
// the last backtick, but as if it was a normal character
if (pos === max && backTicked) {
backTicked = false;
pos = lastBackTick + 1;
}
ch = str.charCodeAt(pos);
}
result.push(str.substring(lastPos));
return result;
}
module.exports = function table(state, startLine, endLine, silent) {
var ch, lineText, pos, i, nextLine, columns, columnCount, token, aligns, alignCount, t, tableLines, tbodyLines;
// should have at least three lines
if (startLine + 2 > endLine) {
return false;
}
nextLine = startLine + 1;
if (state.sCount[nextLine] < state.blkIndent) {
return false;
}
// first character of the second line should be '|' or '-'
pos = state.bMarks[nextLine] + state.tShift[nextLine];
if (pos >= state.eMarks[nextLine]) {
return false;
}
ch = state.src.charCodeAt(pos);
if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */) {
return false;
}
lineText = getLine(state, startLine + 1);
if (!/^[-:| ]+$/.test(lineText)) {
return false;
}
columns = lineText.split('|');
aligns = [];
for (i = 0; i < columns.length; i += 1) {
t = columns[i].trim();
if (!t) {
// allow empty columns before and after table, but not in between columns;
// e.g. allow ` |---| `, disallow ` ---||--- `
if (i === 0 || i === columns.length - 1) {
continue;
} else {
return false;
}
}
if (!/^:?-+:?$/.test(t)) {
return false;
}
if (t.charCodeAt(t.length - 1) === 0x3A /* : */) {
aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right');
} else if (t.charCodeAt(0) === 0x3A /* : */) {
aligns.push('left');
} else {
aligns.push('');
}
}
alignCount = aligns.length;
lineText = getLine(state, startLine).trim();
if (lineText.indexOf('|') === -1) {
return false;
}
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
// header row will define an amount of columns in the entire table,
// and align row shouldn't be smaller than that (the rest of the rows can)
columnCount = columns.length;
if (columnCount > alignCount) {
return false;
} else if (columnCount < alignCount) {
for (i = 0; i < alignCount - columnCount; i += 1) {
columns.push('');
}
columnCount = columns.length;
}
if (silent) {
return true;
}
token = state.push('table_open', 'table', 1);
token.map = tableLines = [startLine, 0];
token = state.push('thead_open', 'thead', 1);
token.map = [startLine, startLine + 1];
token = state.push('tr_open', 'tr', 1);
token.map = [startLine, startLine + 1];
for (i = 0; i < columnCount; i += 1) {
token = state.push('th_open', 'th', 1);
token.map = [startLine, startLine + 1];
if (aligns[i]) {
// FIXED: change property style to align
token.attrs = [['align', aligns[i]]];
}
token = state.push('inline', '', 0);
token.content = columns[i].trim();
token.map = [startLine, startLine + 1];
token.children = [];
token = state.push('th_close', 'th', -1);
}
token = state.push('tr_close', 'tr', -1);
token = state.push('thead_close', 'thead', -1);
token = state.push('tbody_open', 'tbody', 1);
token.map = tbodyLines = [startLine + 2, 0];
for (nextLine = startLine + 2; nextLine < endLine; nextLine += 1) {
if (state.sCount[nextLine] < state.blkIndent) {
break;
}
lineText = getLine(state, nextLine);
if (lineText.indexOf('|') === -1) {
break;
}
// keep spaces at beginning of line to indicate an empty first cell, but
// strip trailing whitespace
columns = escapedSplit(lineText.replace(/^\||\|\s*$/g, ''));
token = state.push('tr_open', 'tr', 1);
for (i = 0; i < columnCount; i += 1) {
token = state.push('td_open', 'td', 1);
if (aligns[i]) {
// FIXED: change property style to align
token.attrs = [['align', aligns[i]]];
}
token = state.push('inline', '', 0);
token.content = columns[i] ? columns[i].trim() : '';
token.children = [];
token = state.push('td_close', 'td', -1);
}
token = state.push('tr_close', 'tr', -1);
}
token = state.push('tbody_close', 'tbody', -1);
token = state.push('table_close', 'table', -1);
tableLines[1] = tbodyLines[1] = nextLine;
state.line = nextLine;
return true;
};
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
// Distributed under an ISC license: https://github.com/markdown-it/markdown-it/
/**
* @fileoverview Implements markdownitHtmlBlockRenderer
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/* eslint-disable */
// HTML block
// An array of opening and corresponding closing sequences for html tags,
// last argument defines whether it can terminate a paragraph or not
//
// void tag names --- Added by Junghwan Park
var voidTagNames = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
var HTML_SEQUENCES = [[/^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true], [/^<!--/, /-->/, true], [/^<\?/, /\?>/, true], [/^<![A-Z]/, />/, true], [/^<!\[CDATA\[/, /\]\]>/, true], [new RegExp('^<(' + voidTagNames.join('|') + ')', 'i'), /^\/?>$/, true], [new RegExp('^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|pre|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))', 'i'), /^$/, true], [/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>)\s*$/, /^$/, false]];
module.exports = function html_block(state, startLine, endLine, silent) {
var i,
nextLine,
token,
lineText,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
if (!state.md.options.html) {
return false;
}
if (state.src.charCodeAt(pos) !== 0x3C /* < */) {
return false;
}
lineText = state.src.slice(pos, max);
for (i = 0; i < HTML_SEQUENCES.length; i++) {
if (HTML_SEQUENCES[i][0].test(lineText)) {
// add condition for return when meet void element --- Added by Junghwan Park
if (i === 5) {
return false;
} else {
break;
}
}
}
if (i === HTML_SEQUENCES.length) {
return false;
}
if (silent) {
// true if this sequence can be a terminator, false otherwise
return HTML_SEQUENCES[i][2];
}
nextLine = startLine + 1;
// If we are here - we detected HTML block.
// Let's roll down till block end.
if (!HTML_SEQUENCES[i][1].test(lineText)) {
for (; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) {
break;
}
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
lineText = state.src.slice(pos, max);
if (HTML_SEQUENCES[i][1].test(lineText)) {
if (lineText.length !== 0) {
nextLine++;
}
break;
}
}
}
state.line = nextLine;
token = state.push('html_block', '', 0);
token.map = [startLine, nextLine];
token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
return true;
};
/* eslint-enable */
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
// Distributed under MIT license: https://github.com/markdown-it/markdown-it/
/**
* @fileoverview Implements markdownitBackticksRenderer
* @modifier NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
/* eslint-disable */
// Parse backticks
module.exports = function backtick(state, silent) {
var start,
max,
marker,
matchStart,
matchEnd,
token,
pos = state.pos,
ch = state.src.charCodeAt(pos);
if (ch !== 0x60 /* ` */) {
return false;
}
start = pos;
pos++;
max = state.posMax;
while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */) {
pos++;
}
marker = state.src.slice(start, pos);
matchStart = matchEnd = pos;
while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
matchEnd = matchStart + 1;
while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */) {
matchEnd++;
}
if (matchEnd - matchStart === marker.length) {
if (!silent) {
token = state.push('code_inline', 'code', 0);
token.markup = marker;
token.content = state.src.slice(pos, matchStart).replace(/[ \n]+/g, ' ').trim();
// TUI.EDITOR MODIFICATION START
// store number of backtick in data-backtick
// https://github.nhnent.com/fe/tui.editor/pull/981
token.attrSet('data-backticks', token.markup.length);
// TUI.EDITOR MODIFICATION END
}
state.pos = matchEnd;
return true;
}
}
if (!silent) {
state.pending += marker;
}
state.pos += marker.length;
return true;
};
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
var hljs = __webpack_require__(100);
hljs.registerLanguage('1c', __webpack_require__(101));
hljs.registerLanguage('abnf', __webpack_require__(102));
hljs.registerLanguage('accesslog', __webpack_require__(103));
hljs.registerLanguage('actionscript', __webpack_require__(104));
hljs.registerLanguage('ada', __webpack_require__(105));
hljs.registerLanguage('apache', __webpack_require__(106));
hljs.registerLanguage('applescript', __webpack_require__(107));
hljs.registerLanguage('cpp', __webpack_require__(108));
hljs.registerLanguage('arduino', __webpack_require__(109));
hljs.registerLanguage('armasm', __webpack_require__(110));
hljs.registerLanguage('xml', __webpack_require__(111));
hljs.registerLanguage('asciidoc', __webpack_require__(112));
hljs.registerLanguage('aspectj', __webpack_require__(113));
hljs.registerLanguage('autohotkey', __webpack_require__(114));
hljs.registerLanguage('autoit', __webpack_require__(115));
hljs.registerLanguage('avrasm', __webpack_require__(116));
hljs.registerLanguage('awk', __webpack_require__(117));
hljs.registerLanguage('axapta', __webpack_require__(118));
hljs.registerLanguage('bash', __webpack_require__(119));
hljs.registerLanguage('basic', __webpack_require__(120));
hljs.registerLanguage('bnf', __webpack_require__(121));
hljs.registerLanguage('brainfuck', __webpack_require__(122));
hljs.registerLanguage('cal', __webpack_require__(123));
hljs.registerLanguage('capnproto', __webpack_require__(124));
hljs.registerLanguage('ceylon', __webpack_require__(125));
hljs.registerLanguage('clean', __webpack_require__(126));
hljs.registerLanguage('clojure', __webpack_require__(127));
hljs.registerLanguage('clojure-repl', __webpack_require__(128));
hljs.registerLanguage('cmake', __webpack_require__(129));
hljs.registerLanguage('coffeescript', __webpack_require__(130));
hljs.registerLanguage('coq', __webpack_require__(131));
hljs.registerLanguage('cos', __webpack_require__(132));
hljs.registerLanguage('crmsh', __webpack_require__(133));
hljs.registerLanguage('crystal', __webpack_require__(134));
hljs.registerLanguage('cs', __webpack_require__(135));
hljs.registerLanguage('csp', __webpack_require__(136));
hljs.registerLanguage('css', __webpack_require__(137));
hljs.registerLanguage('d', __webpack_require__(138));
hljs.registerLanguage('markdown', __webpack_require__(139));
hljs.registerLanguage('dart', __webpack_require__(140));
hljs.registerLanguage('delphi', __webpack_require__(141));
hljs.registerLanguage('diff', __webpack_require__(142));
hljs.registerLanguage('django', __webpack_require__(143));
hljs.registerLanguage('dns', __webpack_require__(144));
hljs.registerLanguage('dockerfile', __webpack_require__(145));
hljs.registerLanguage('dos', __webpack_require__(146));
hljs.registerLanguage('dsconfig', __webpack_require__(147));
hljs.registerLanguage('dts', __webpack_require__(148));
hljs.registerLanguage('dust', __webpack_require__(149));
hljs.registerLanguage('ebnf', __webpack_require__(150));
hljs.registerLanguage('elixir', __webpack_require__(151));
hljs.registerLanguage('elm', __webpack_require__(152));
hljs.registerLanguage('ruby', __webpack_require__(153));
hljs.registerLanguage('erb', __webpack_require__(154));
hljs.registerLanguage('erlang-repl', __webpack_require__(155));
hljs.registerLanguage('erlang', __webpack_require__(156));
hljs.registerLanguage('excel', __webpack_require__(157));
hljs.registerLanguage('fix', __webpack_require__(158));
hljs.registerLanguage('flix', __webpack_require__(159));
hljs.registerLanguage('fortran', __webpack_require__(160));
hljs.registerLanguage('fsharp', __webpack_require__(161));
hljs.registerLanguage('gams', __webpack_require__(162));
hljs.registerLanguage('gauss', __webpack_require__(163));
hljs.registerLanguage('gcode', __webpack_require__(164));
hljs.registerLanguage('gherkin', __webpack_require__(165));
hljs.registerLanguage('glsl', __webpack_require__(166));
hljs.registerLanguage('go', __webpack_require__(167));
hljs.registerLanguage('golo', __webpack_require__(168));
hljs.registerLanguage('gradle', __webpack_require__(169));
hljs.registerLanguage('groovy', __webpack_require__(170));
hljs.registerLanguage('haml', __webpack_require__(171));
hljs.registerLanguage('handlebars', __webpack_require__(172));
hljs.registerLanguage('haskell', __webpack_require__(173));
hljs.registerLanguage('haxe', __webpack_require__(174));
hljs.registerLanguage('hsp', __webpack_require__(175));
hljs.registerLanguage('htmlbars', __webpack_require__(176));
hljs.registerLanguage('http', __webpack_require__(177));
hljs.registerLanguage('hy', __webpack_require__(178));
hljs.registerLanguage('inform7', __webpack_require__(179));
hljs.registerLanguage('ini', __webpack_require__(180));
hljs.registerLanguage('irpf90', __webpack_require__(181));
hljs.registerLanguage('java', __webpack_require__(182));
hljs.registerLanguage('javascript', __webpack_require__(183));
hljs.registerLanguage('jboss-cli', __webpack_require__(184));
hljs.registerLanguage('json', __webpack_require__(185));
hljs.registerLanguage('julia', __webpack_require__(186));
hljs.registerLanguage('julia-repl', __webpack_require__(187));
hljs.registerLanguage('kotlin', __webpack_require__(188));
hljs.registerLanguage('lasso', __webpack_require__(189));
hljs.registerLanguage('ldif', __webpack_require__(190));
hljs.registerLanguage('leaf', __webpack_require__(191));
hljs.registerLanguage('less', __webpack_require__(192));
hljs.registerLanguage('lisp', __webpack_require__(193));
hljs.registerLanguage('livecodeserver', __webpack_require__(194));
hljs.registerLanguage('livescript', __webpack_require__(195));
hljs.registerLanguage('llvm', __webpack_require__(196));
hljs.registerLanguage('lsl', __webpack_require__(197));
hljs.registerLanguage('lua', __webpack_require__(198));
hljs.registerLanguage('makefile', __webpack_require__(199));
hljs.registerLanguage('mathematica', __webpack_require__(200));
hljs.registerLanguage('matlab', __webpack_require__(201));
hljs.registerLanguage('maxima', __webpack_require__(202));
hljs.registerLanguage('mel', __webpack_require__(203));
hljs.registerLanguage('mercury', __webpack_require__(204));
hljs.registerLanguage('mipsasm', __webpack_require__(205));
hljs.registerLanguage('mizar', __webpack_require__(206));
hljs.registerLanguage('perl', __webpack_require__(207));
hljs.registerLanguage('mojolicious', __webpack_require__(208));
hljs.registerLanguage('monkey', __webpack_require__(209));
hljs.registerLanguage('moonscript', __webpack_require__(210));
hljs.registerLanguage('n1ql', __webpack_require__(211));
hljs.registerLanguage('nginx', __webpack_require__(212));
hljs.registerLanguage('nimrod', __webpack_require__(213));
hljs.registerLanguage('nix', __webpack_require__(214));
hljs.registerLanguage('nsis', __webpack_require__(215));
hljs.registerLanguage('objectivec', __webpack_require__(216));
hljs.registerLanguage('ocaml', __webpack_require__(217));
hljs.registerLanguage('openscad', __webpack_require__(218));
hljs.registerLanguage('oxygene', __webpack_require__(219));
hljs.registerLanguage('parser3', __webpack_require__(220));
hljs.registerLanguage('pf', __webpack_require__(221));
hljs.registerLanguage('php', __webpack_require__(222));
hljs.registerLanguage('pony', __webpack_require__(223));
hljs.registerLanguage('powershell', __webpack_require__(224));
hljs.registerLanguage('processing', __webpack_require__(225));
hljs.registerLanguage('profile', __webpack_require__(226));
hljs.registerLanguage('prolog', __webpack_require__(227));
hljs.registerLanguage('protobuf', __webpack_require__(228));
hljs.registerLanguage('puppet', __webpack_require__(229));
hljs.registerLanguage('purebasic', __webpack_require__(230));
hljs.registerLanguage('python', __webpack_require__(231));
hljs.registerLanguage('q', __webpack_require__(232));
hljs.registerLanguage('qml', __webpack_require__(233));
hljs.registerLanguage('r', __webpack_require__(234));
hljs.registerLanguage('rib', __webpack_require__(235));
hljs.registerLanguage('roboconf', __webpack_require__(236));
hljs.registerLanguage('routeros', __webpack_require__(237));
hljs.registerLanguage('rsl', __webpack_require__(238));
hljs.registerLanguage('ruleslanguage', __webpack_require__(239));
hljs.registerLanguage('rust', __webpack_require__(240));
hljs.registerLanguage('scala', __webpack_require__(241));
hljs.registerLanguage('scheme', __webpack_require__(242));
hljs.registerLanguage('scilab', __webpack_require__(243));
hljs.registerLanguage('scss', __webpack_require__(244));
hljs.registerLanguage('shell', __webpack_require__(245));
hljs.registerLanguage('smali', __webpack_require__(246));
hljs.registerLanguage('smalltalk', __webpack_require__(247));
hljs.registerLanguage('sml', __webpack_require__(248));
hljs.registerLanguage('sqf', __webpack_require__(249));
hljs.registerLanguage('sql', __webpack_require__(250));
hljs.registerLanguage('stan', __webpack_require__(251));
hljs.registerLanguage('stata', __webpack_require__(252));
hljs.registerLanguage('step21', __webpack_require__(253));
hljs.registerLanguage('stylus', __webpack_require__(254));
hljs.registerLanguage('subunit', __webpack_require__(255));
hljs.registerLanguage('swift', __webpack_require__(256));
hljs.registerLanguage('taggerscript', __webpack_require__(257));
hljs.registerLanguage('yaml', __webpack_require__(258));
hljs.registerLanguage('tap', __webpack_require__(259));
hljs.registerLanguage('tcl', __webpack_require__(260));
hljs.registerLanguage('tex', __webpack_require__(261));
hljs.registerLanguage('thrift', __webpack_require__(262));
hljs.registerLanguage('tp', __webpack_require__(263));
hljs.registerLanguage('twig', __webpack_require__(264));
hljs.registerLanguage('typescript', __webpack_require__(265));
hljs.registerLanguage('vala', __webpack_require__(266));
hljs.registerLanguage('vbnet', __webpack_require__(267));
hljs.registerLanguage('vbscript', __webpack_require__(268));
hljs.registerLanguage('vbscript-html', __webpack_require__(269));
hljs.registerLanguage('verilog', __webpack_require__(270));
hljs.registerLanguage('vhdl', __webpack_require__(271));
hljs.registerLanguage('vim', __webpack_require__(272));
hljs.registerLanguage('x86asm', __webpack_require__(273));
hljs.registerLanguage('xl', __webpack_require__(274));
hljs.registerLanguage('xquery', __webpack_require__(275));
hljs.registerLanguage('zephir', __webpack_require__(276));
module.exports = hljs;
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
/*
Syntax highlighting with language autodetection.
https://highlightjs.org/
*/
(function(factory) {
// Find the global object for export to both the browser and web workers.
var globalObject = typeof window === 'object' && window ||
typeof self === 'object' && self;
// Setup highlight.js for different environments. First is Node.js or
// CommonJS.
if(true) {
factory(exports);
} else if(globalObject) {
// Export hljs globally even when using AMD for cases when this script
// is loaded with others that may still expect a global hljs.
globalObject.hljs = factory({});
// Finally register the global hljs with AMD.
if(typeof define === 'function' && define.amd) {
define([], function() {
return globalObject.hljs;
});
}
}
}(function(hljs) {
// Convenience variables for build-in objects
var ArrayProto = [],
objectKeys = Object.keys;
// Global internal variables used within the highlight.js library.
var languages = {},
aliases = {};
// Regular expressions used throughout the highlight.js library.
var noHighlightRe = /^(no-?highlight|plain|text)$/i,
languagePrefixRe = /\blang(?:uage)?-([\w-]+)\b/i,
fixMarkupRe = /((^(<[^>]+>|\t|)+|(?:\n)))/gm;
var spanEndTag = '</span>';
// Global options used when within external APIs. This is modified when
// calling the `hljs.configure` function.
var options = {
classPrefix: 'hljs-',
tabReplace: null,
useBR: false,
languages: undefined
};
/* Utility functions */
function escape(value) {
return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function tag(node) {
return node.nodeName.toLowerCase();
}
function testRe(re, lexeme) {
var match = re && re.exec(lexeme);
return match && match.index === 0;
}
function isNotHighlighted(language) {
return noHighlightRe.test(language);
}
function blockLanguage(block) {
var i, match, length, _class;
var classes = block.className + ' ';
classes += block.parentNode ? block.parentNode.className : '';
// language-* takes precedence over non-prefixed class names.
match = languagePrefixRe.exec(classes);
if (match) {
return getLanguage(match[1]) ? match[1] : 'no-highlight';
}
classes = classes.split(/\s+/);
for (i = 0, length = classes.length; i < length; i++) {
_class = classes[i]
if (isNotHighlighted(_class) || getLanguage(_class)) {
return _class;
}
}
}
function inherit(parent) { // inherit(parent, override_obj, override_obj, ...)
var key;
var result = {};
var objects = Array.prototype.slice.call(arguments, 1);
for (key in parent)
result[key] = parent[key];
objects.forEach(function(obj) {
for (key in obj)
result[key] = obj[key];
});
return result;
}
/* Stream merging */
function nodeStream(node) {
var result = [];
(function _nodeStream(node, offset) {
for (var child = node.firstChild; child; child = child.nextSibling) {
if (child.nodeType === 3)
offset += child.nodeValue.length;
else if (child.nodeType === 1) {
result.push({
event: 'start',
offset: offset,
node: child
});
offset = _nodeStream(child, offset);
// Prevent void elements from having an end tag that would actually
// double them in the output. There are more void elements in HTML
// but we list only those realistically expected in code display.
if (!tag(child).match(/br|hr|img|input/)) {
result.push({
event: 'stop',
offset: offset,
node: child
});
}
}
}
return offset;
})(node, 0);
return result;
}
function mergeStreams(original, highlighted, value) {
var processed = 0;
var result = '';
var nodeStack = [];
function selectStream() {
if (!original.length || !highlighted.length) {
return original.length ? original : highlighted;
}
if (original[0].offset !== highlighted[0].offset) {
return (original[0].offset < highlighted[0].offset) ? original : highlighted;
}
/*
To avoid starting the stream just before it should stop the order is
ensured that original always starts first and closes last:
if (event1 == 'start' && event2 == 'start')
return original;
if (event1 == 'start' && event2 == 'stop')
return highlighted;
if (event1 == 'stop' && event2 == 'start')
return original;
if (event1 == 'stop' && event2 == 'stop')
return highlighted;
... which is collapsed to:
*/
return highlighted[0].event === 'start' ? original : highlighted;
}
function open(node) {
function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '&quot;') + '"';}
result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>';
}
function close(node) {
result += '</' + tag(node) + '>';
}
function render(event) {
(event.event === 'start' ? open : close)(event.node);
}
while (original.length || highlighted.length) {
var stream = selectStream();
result += escape(value.substring(processed, stream[0].offset));
processed = stream[0].offset;
if (stream === original) {
/*
On any opening or closing tag of the original markup we first close
the entire highlighted node stack, then render the original tag along
with all the following original tags at the same offset and then
reopen all the tags on the highlighted stack.
*/
nodeStack.reverse().forEach(close);
do {
render(stream.splice(0, 1)[0]);
stream = selectStream();
} while (stream === original && stream.length && stream[0].offset === processed);
nodeStack.reverse().forEach(open);
} else {
if (stream[0].event === 'start') {
nodeStack.push(stream[0].node);
} else {
nodeStack.pop();
}
render(stream.splice(0, 1)[0]);
}
}
return result + escape(value.substr(processed));
}
/* Initialization */
function expand_mode(mode) {
if (mode.variants && !mode.cached_variants) {
mode.cached_variants = mode.variants.map(function(variant) {
return inherit(mode, {variants: null}, variant);
});
}
return mode.cached_variants || (mode.endsWithParent && [inherit(mode)]) || [mode];
}
function compileLanguage(language) {
function reStr(re) {
return (re && re.source) || re;
}
function langRe(value, global) {
return new RegExp(
reStr(value),
'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')
);
}
function compileMode(mode, parent) {
if (mode.compiled)
return;
mode.compiled = true;
mode.keywords = mode.keywords || mode.beginKeywords;
if (mode.keywords) {
var compiled_keywords = {};
var flatten = function(className, str) {
if (language.case_insensitive) {
str = str.toLowerCase();
}
str.split(' ').forEach(function(kw) {
var pair = kw.split('|');
compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1];
});
};
if (typeof mode.keywords === 'string') { // string
flatten('keyword', mode.keywords);
} else {
objectKeys(mode.keywords).forEach(function (className) {
flatten(className, mode.keywords[className]);
});
}
mode.keywords = compiled_keywords;
}
mode.lexemesRe = langRe(mode.lexemes || /\w+/, true);
if (parent) {
if (mode.beginKeywords) {
mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b';
}
if (!mode.begin)
mode.begin = /\B|\b/;
mode.beginRe = langRe(mode.begin);
if (!mode.end && !mode.endsWithParent)
mode.end = /\B|\b/;
if (mode.end)
mode.endRe = langRe(mode.end);
mode.terminator_end = reStr(mode.end) || '';
if (mode.endsWithParent && parent.terminator_end)
mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end;
}
if (mode.illegal)
mode.illegalRe = langRe(mode.illegal);
if (mode.relevance == null)
mode.relevance = 1;
if (!mode.contains) {
mode.contains = [];
}
mode.contains = Array.prototype.concat.apply([], mode.contains.map(function(c) {
return expand_mode(c === 'self' ? mode : c)
}));
mode.contains.forEach(function(c) {compileMode(c, mode);});
if (mode.starts) {
compileMode(mode.starts, parent);
}
var terminators =
mode.contains.map(function(c) {
return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin;
})
.concat([mode.terminator_end, mode.illegal])
.map(reStr)
.filter(Boolean);
mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(/*s*/) {return null;}};
}
compileMode(language);
}
/*
Core highlighting function. Accepts a language name, or an alias, and a
string with the code to highlight. Returns an object with the following
properties:
- relevance (int)
- value (an HTML string with highlighting markup)
*/
function highlight(name, value, ignore_illegals, continuation) {
function subMode(lexeme, mode) {
var i, length;
for (i = 0, length = mode.contains.length; i < length; i++) {
if (testRe(mode.contains[i].beginRe, lexeme)) {
return mode.contains[i];
}
}
}
function endOfMode(mode, lexeme) {
if (testRe(mode.endRe, lexeme)) {
while (mode.endsParent && mode.parent) {
mode = mode.parent;
}
return mode;
}
if (mode.endsWithParent) {
return endOfMode(mode.parent, lexeme);
}
}
function isIllegal(lexeme, mode) {
return !ignore_illegals && testRe(mode.illegalRe, lexeme);
}
function keywordMatch(mode, match) {
var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0];
return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str];
}
function buildSpan(classname, insideSpan, leaveOpen, noPrefix) {
var classPrefix = noPrefix ? '' : options.classPrefix,
openSpan = '<span class="' + classPrefix,
closeSpan = leaveOpen ? '' : spanEndTag
openSpan += classname + '">';
return openSpan + insideSpan + closeSpan;
}
function processKeywords() {
var keyword_match, last_index, match, result;
if (!top.keywords)
return escape(mode_buffer);
result = '';
last_index = 0;
top.lexemesRe.lastIndex = 0;
match = top.lexemesRe.exec(mode_buffer);
while (match) {
result += escape(mode_buffer.substring(last_index, match.index));
keyword_match = keywordMatch(top, match);
if (keyword_match) {
relevance += keyword_match[1];
result += buildSpan(keyword_match[0], escape(match[0]));
} else {
result += escape(match[0]);
}
last_index = top.lexemesRe.lastIndex;
match = top.lexemesRe.exec(mode_buffer);
}
return result + escape(mode_buffer.substr(last_index));
}
function processSubLanguage() {
var explicit = typeof top.subLanguage === 'string';
if (explicit && !languages[top.subLanguage]) {
return escape(mode_buffer);
}
var result = explicit ?
highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) :
highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined);
// Counting embedded language score towards the host language may be disabled
// with zeroing the containing mode relevance. Usecase in point is Markdown that
// allows XML everywhere and makes every XML snippet to have a much larger Markdown
// score.
if (top.relevance > 0) {
relevance += result.relevance;
}
if (explicit) {
continuations[top.subLanguage] = result.top;
}
return buildSpan(result.language, result.value, false, true);
}
function processBuffer() {
result += (top.subLanguage != null ? processSubLanguage() : processKeywords());
mode_buffer = '';
}
function startNewMode(mode) {
result += mode.className? buildSpan(mode.className, '', true): '';
top = Object.create(mode, {parent: {value: top}});
}
function processLexeme(buffer, lexeme) {
mode_buffer += buffer;
if (lexeme == null) {
processBuffer();
return 0;
}
var new_mode = subMode(lexeme, top);
if (new_mode) {
if (new_mode.skip) {
mode_buffer += lexeme;
} else {
if (new_mode.excludeBegin) {
mode_buffer += lexeme;
}
processBuffer();
if (!new_mode.returnBegin && !new_mode.excludeBegin) {
mode_buffer = lexeme;
}
}
startNewMode(new_mode, lexeme);
return new_mode.returnBegin ? 0 : lexeme.length;
}
var end_mode = endOfMode(top, lexeme);
if (end_mode) {
var origin = top;
if (origin.skip) {
mode_buffer += lexeme;
} else {
if (!(origin.returnEnd || origin.excludeEnd)) {
mode_buffer += lexeme;
}
processBuffer();
if (origin.excludeEnd) {
mode_buffer = lexeme;
}
}
do {
if (top.className) {
result += spanEndTag;
}
if (!top.skip) {
relevance += top.relevance;
}
top = top.parent;
} while (top !== end_mode.parent);
if (end_mode.starts) {
startNewMode(end_mode.starts, '');
}
return origin.returnEnd ? 0 : lexeme.length;
}
if (isIllegal(lexeme, top))
throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
/*
Parser should not reach this point as all types of lexemes should be caught
earlier, but if it does due to some bug make sure it advances at least one
character forward to prevent infinite looping.
*/
mode_buffer += lexeme;
return lexeme.length || 1;
}
var language = getLanguage(name);
if (!language) {
throw new Error('Unknown language: "' + name + '"');
}
compileLanguage(language);
var top = continuation || language;
var continuations = {}; // keep continuations for sub-languages
var result = '', current;
for(current = top; current !== language; current = current.parent) {
if (current.className) {
result = buildSpan(current.className, '', true) + result;
}
}
var mode_buffer = '';
var relevance = 0;
try {
var match, count, index = 0;
while (true) {
top.terminators.lastIndex = index;
match = top.terminators.exec(value);
if (!match)
break;
count = processLexeme(value.substring(index, match.index), match[0]);
index = match.index + count;
}
processLexeme(value.substr(index));
for(current = top; current.parent; current = current.parent) { // close dangling modes
if (current.className) {
result += spanEndTag;
}
}
return {
relevance: relevance,
value: result,
language: name,
top: top
};
} catch (e) {
if (e.message && e.message.indexOf('Illegal') !== -1) {
return {
relevance: 0,
value: escape(value)
};
} else {
throw e;
}
}
}
/*
Highlighting with language detection. Accepts a string with the code to
highlight. Returns an object with the following properties:
- language (detected language)
- relevance (int)
- value (an HTML string with highlighting markup)
- second_best (object with the same structure for second-best heuristically
detected language, may be absent)
*/
function highlightAuto(text, languageSubset) {
languageSubset = languageSubset || options.languages || objectKeys(languages);
var result = {
relevance: 0,
value: escape(text)
};
var second_best = result;
languageSubset.filter(getLanguage).forEach(function(name) {
var current = highlight(name, text, false);
current.language = name;
if (current.relevance > second_best.relevance) {
second_best = current;
}
if (current.relevance > result.relevance) {
second_best = result;
result = current;
}
});
if (second_best.language) {
result.second_best = second_best;
}
return result;
}
/*
Post-processing of the highlighted markup:
- replace TABs with something more useful
- replace real line-breaks with '<br>' for non-pre containers
*/
function fixMarkup(value) {
return !(options.tabReplace || options.useBR)
? value
: value.replace(fixMarkupRe, function(match, p1) {
if (options.useBR && match === '\n') {
return '<br>';
} else if (options.tabReplace) {
return p1.replace(/\t/g, options.tabReplace);
}
return '';
});
}
function buildClassName(prevClassName, currentLang, resultLang) {
var language = currentLang ? aliases[currentLang] : resultLang,
result = [prevClassName.trim()];
if (!prevClassName.match(/\bhljs\b/)) {
result.push('hljs');
}
if (prevClassName.indexOf(language) === -1) {
result.push(language);
}
return result.join(' ').trim();
}
/*
Applies highlighting to a DOM node containing code. Accepts a DOM node and
two optional parameters for fixMarkup.
*/
function highlightBlock(block) {
var node, originalStream, result, resultNode, text;
var language = blockLanguage(block);
if (isNotHighlighted(language))
return;
if (options.useBR) {
node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(/<br[ \/]*>/g, '\n');
} else {
node = block;
}
text = node.textContent;
result = language ? highlight(language, text, true) : highlightAuto(text);
originalStream = nodeStream(node);
if (originalStream.length) {
resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
resultNode.innerHTML = result.value;
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
}
result.value = fixMarkup(result.value);
block.innerHTML = result.value;
block.className = buildClassName(block.className, language, result.language);
block.result = {
language: result.language,
re: result.relevance
};
if (result.second_best) {
block.second_best = {
language: result.second_best.language,
re: result.second_best.relevance
};
}
}
/*
Updates highlight.js global options with values passed in the form of an object.
*/
function configure(user_options) {
options = inherit(options, user_options);
}
/*
Applies highlighting to all <pre><code>..</code></pre> blocks on a page.
*/
function initHighlighting() {
if (initHighlighting.called)
return;
initHighlighting.called = true;
var blocks = document.querySelectorAll('pre code');
ArrayProto.forEach.call(blocks, highlightBlock);
}
/*
Attaches highlighting to the page load event.
*/
function initHighlightingOnLoad() {
addEventListener('DOMContentLoaded', initHighlighting, false);
addEventListener('load', initHighlighting, false);
}
function registerLanguage(name, language) {
var lang = languages[name] = language(hljs);
if (lang.aliases) {
lang.aliases.forEach(function(alias) {aliases[alias] = name;});
}
}
function listLanguages() {
return objectKeys(languages);
}
function getLanguage(name) {
name = (name || '').toLowerCase();
return languages[name] || languages[aliases[name]];
}
/* Interface definition */
hljs.highlight = highlight;
hljs.highlightAuto = highlightAuto;
hljs.fixMarkup = fixMarkup;
hljs.highlightBlock = highlightBlock;
hljs.configure = configure;
hljs.initHighlighting = initHighlighting;
hljs.initHighlightingOnLoad = initHighlightingOnLoad;
hljs.registerLanguage = registerLanguage;
hljs.listLanguages = listLanguages;
hljs.getLanguage = getLanguage;
hljs.inherit = inherit;
// Common regexps
hljs.IDENT_RE = '[a-zA-Z]\\w*';
hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
// Common modes
hljs.BACKSLASH_ESCAPE = {
begin: '\\\\[\\s\\S]', relevance: 0
};
hljs.APOS_STRING_MODE = {
className: 'string',
begin: '\'', end: '\'',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
};
hljs.QUOTE_STRING_MODE = {
className: 'string',
begin: '"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
};
hljs.PHRASAL_WORDS_MODE = {
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
};
hljs.COMMENT = function (begin, end, inherits) {
var mode = hljs.inherit(
{
className: 'comment',
begin: begin, end: end,
contains: []
},
inherits || {}
);
mode.contains.push(hljs.PHRASAL_WORDS_MODE);
mode.contains.push({
className: 'doctag',
begin: '(?:TODO|FIXME|NOTE|BUG|XXX):',
relevance: 0
});
return mode;
};
hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$');
hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/');
hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$');
hljs.NUMBER_MODE = {
className: 'number',
begin: hljs.NUMBER_RE,
relevance: 0
};
hljs.C_NUMBER_MODE = {
className: 'number',
begin: hljs.C_NUMBER_RE,
relevance: 0
};
hljs.BINARY_NUMBER_MODE = {
className: 'number',
begin: hljs.BINARY_NUMBER_RE,
relevance: 0
};
hljs.CSS_NUMBER_MODE = {
className: 'number',
begin: hljs.NUMBER_RE + '(' +
'%|em|ex|ch|rem' +
'|vw|vh|vmin|vmax' +
'|cm|mm|in|pt|pc|px' +
'|deg|grad|rad|turn' +
'|s|ms' +
'|Hz|kHz' +
'|dpi|dpcm|dppx' +
')?',
relevance: 0
};
hljs.REGEXP_MODE = {
className: 'regexp',
begin: /\//, end: /\/[gimuy]*/,
illegal: /\n/,
contains: [
hljs.BACKSLASH_ESCAPE,
{
begin: /\[/, end: /\]/,
relevance: 0,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
hljs.TITLE_MODE = {
className: 'title',
begin: hljs.IDENT_RE,
relevance: 0
};
hljs.UNDERSCORE_TITLE_MODE = {
className: 'title',
begin: hljs.UNDERSCORE_IDENT_RE,
relevance: 0
};
hljs.METHOD_GUARD = {
// excludes method names from keyword processing
begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE,
relevance: 0
};
return hljs;
}));
/***/ }),
/* 101 */
/***/ (function(module, exports) {
module.exports = function(hljs){
// общий паттерн для определения идентификаторов
var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+';
// v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword
var v7_keywords =
'далее ';
// v8 ключевые слова ==> keyword
var v8_keywords =
'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' +
'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ';
// keyword : ключевые слова
var KEYWORD = v7_keywords + v8_keywords;
// v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword
var v7_meta_keywords =
'загрузитьизфайла ';
// v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword
var v8_meta_keywords =
'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' +
'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' +
'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ';
// meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях
var METAKEYWORD = v7_meta_keywords + v8_meta_keywords;
// v7 системные константы ==> built_in
var v7_system_constants =
'разделительстраниц разделительстрок символтабуляции ';
// v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in
var v7_global_context_methods =
'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' +
'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' +
'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' +
'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' +
'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' +
'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' +
'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' +
'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' +
'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' +
'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' +
'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ';
// v8 методы глобального контекста ==> built_in
var v8_global_context_methods =
'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' +
'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' +
'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' +
'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' +
'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' +
'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' +
'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' +
'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' +
'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' +
'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' +
'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' +
'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' +
'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' +
айтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' +
'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' +
'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' +
'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' +
'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' +
'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' +
'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' +
'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' +
'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' +
'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' +
'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' +
'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' +
'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' +
'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' +
'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' +
'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' +
'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' +
'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' +
'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' +
'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' +
'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' +
'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' +
'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' +
'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' +
'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' +
'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' +
'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' +
'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' +
'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' +
'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' +
'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' +
'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' +
'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' +
'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' +
'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' +
'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' +
'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' +
'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' +
'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' +
'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' +
'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' +
'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' +
'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' +
'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+
'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' +
'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' +
'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' +
'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' +
'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' +
'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' +
'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' +
'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' +
'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' +
'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' +
'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' +
'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' +
'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' +
'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' +
'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ';
// v8 свойства глобального контекста ==> built_in
var v8_global_context_property =
'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' +
'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' +
'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' +
'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' +
'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' +
'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' +
'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' +
'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' +
'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' +
'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' +
'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ';
// built_in : встроенные или библиотечные объекты (константы, классы, функции)
var BUILTIN =
v7_system_constants +
v7_global_context_methods + v8_global_context_methods +
v8_global_context_property;
// v8 системные наборы значений ==> class
var v8_system_sets_of_values =
'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ';
// v8 системные перечисления - интерфейсные ==> class
var v8_system_enums_interface =
'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' +
'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' +
'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' +
'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' +
'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' +
'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' +
'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' +
'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' +
'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' +
'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' +
'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' +
'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' +
'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' +
'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' +
'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' +
'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' +
'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' +
'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' +
'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' +
'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' +
'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' +
'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' +
'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' +
'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' +
'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' +
'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' +
'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' +
'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' +
'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' +
'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' +
'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' +
'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' +
'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' +
'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' +
'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' +
'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' +
'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' +
'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' +
'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' +
'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' +
'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' +
'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' +
'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' +
'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' +
'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' +
'форматкартинки ширинаподчиненныхэлементовформы ';
// v8 системные перечисления - свойства прикладных объектов ==> class
var v8_system_enums_objects_properties =
'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' +
'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' +
'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ';
// v8 системные перечисления - планы обмена ==> class
var v8_system_enums_exchange_plans =
'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ';
// v8 системные перечисления - табличный документ ==> class
var v8_system_enums_tabular_document =
'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' +
'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' +
'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' +
'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' +
'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' +
'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' +
'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ';
// v8 системные перечисления - планировщик ==> class
var v8_system_enums_sheduler =
'отображениевремениэлементовпланировщика ';
// v8 системные перечисления - форматированный документ ==> class
var v8_system_enums_formatted_document =
'типфайлаформатированногодокумента ';
// v8 системные перечисления - запрос ==> class
var v8_system_enums_query =
'обходрезультатазапроса типзаписизапроса ';
// v8 системные перечисления - построитель отчета ==> class
var v8_system_enums_report_builder =
'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ';
// v8 системные перечисления - работа с файлами ==> class
var v8_system_enums_files =
'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ';
// v8 системные перечисления - построитель запроса ==> class
var v8_system_enums_query_builder =
'типизмеренияпостроителязапроса ';
// v8 системные перечисления - анализ данных ==> class
var v8_system_enums_data_analysis =
'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' +
'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' +
'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' +
'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' +
'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' +
'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ';
// v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class
var v8_system_enums_xml_json_xs_dom_xdto_ws =
'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' +
ействиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' +
сключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' +
етоднаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' +
'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' +
'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' +
орматдатыjson экранированиесимволовjson ';
// v8 системные перечисления - система компоновки данных ==> class
var v8_system_enums_data_composition_system =
'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' +
'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' +
'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' +
'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' +
'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' +
'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' +
'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' +
'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' +
'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' +
'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+
'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' +
'использованиеусловногооформлениякомпоновкиданных ';
// v8 системные перечисления - почта ==> class
var v8_system_enums_email =
'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' +
'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' +
'статусразборапочтовогосообщения ';
// v8 системные перечисления - журнал регистрации ==> class
var v8_system_enums_logbook =
'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ';
// v8 системные перечисления - криптография ==> class
var v8_system_enums_cryptography =
'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' +
'типхранилищасертификатовкриптографии ';
// v8 системные перечисления - ZIP ==> class
var v8_system_enums_zip =
одировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' +
'режимсохраненияпутейzip уровеньсжатияzip ';
// v8 системные перечисления -
// Блокировка данных, Фоновые задания, Автоматизированное тестирование,
// Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class
var v8_system_enums_other =
'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' +
'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ';
// v8 системные перечисления - схема запроса ==> class
var v8_system_enums_request_schema =
'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' +
'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ';
// v8 системные перечисления - свойства объектов метаданных ==> class
var v8_system_enums_properties_of_metadata_objects =
'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' +
'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' +
'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' +
'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' +
'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' +
'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' +
'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' +
'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' +
'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' +
'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+
'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' +
'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' +
'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' +
'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' +
'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' +
'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' +
'типномерадокумента типномеразадачи типформы удалениедвижений ';
// v8 системные перечисления - разные ==> class
var v8_system_enums_differents =
'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' +
'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' +
'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' +
спользованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' +
одировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' +
'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' +
'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' +
'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' +
'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты';
// class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование)
var CLASS =
v8_system_sets_of_values +
v8_system_enums_interface +
v8_system_enums_objects_properties +
v8_system_enums_exchange_plans +
v8_system_enums_tabular_document +
v8_system_enums_sheduler +
v8_system_enums_formatted_document +
v8_system_enums_query +
v8_system_enums_report_builder +
v8_system_enums_files +
v8_system_enums_query_builder +
v8_system_enums_data_analysis +
v8_system_enums_xml_json_xs_dom_xdto_ws +
v8_system_enums_data_composition_system +
v8_system_enums_email +
v8_system_enums_logbook +
v8_system_enums_cryptography +
v8_system_enums_zip +
v8_system_enums_other +
v8_system_enums_request_schema +
v8_system_enums_properties_of_metadata_objects +
v8_system_enums_differents;
// v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type
var v8_shared_object =
'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' +
'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' +
'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' +
'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' +
'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' +
аписьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' +
'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' +
'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' +
спользованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' +
'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' +
'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' +
'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' +
'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' +
'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' +
'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' +
'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' +
'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' +
'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' +
'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' +
'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' +
'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' +
'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' +
'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' +
'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' +
'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' +
'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' +
'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' +
'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' +
'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' +
асетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' +
асетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' +
асетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' +
асетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' +
рагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' +
'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ';
// v8 универсальные коллекции значений ==> type
var v8_universal_collection =
'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' +
'фиксированноесоответствие фиксированныймассив ';
// type : встроенные типы
var TYPE =
v8_shared_object +
v8_universal_collection;
// literal : примитивные типы
var LITERAL = 'null истина ложь неопределено';
// number : числа
var NUMBERS = hljs.inherit(hljs.NUMBER_MODE);
// string : строки
var STRINGS = {
className: 'string',
begin: '"|\\|', end: '"|$',
contains: [{begin: '""'}]
};
// number : даты
var DATE = {
begin: "'", end: "'", excludeBegin: true, excludeEnd: true,
contains: [
{
className: 'number',
begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}'
}
]
};
// comment : комментарии
var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE);
// meta : инструкции препроцессора, директивы компиляции
var META = {
className: 'meta',
lexemes: UNDERSCORE_IDENT_RE,
begin: '#|&', end: '$',
keywords: {'meta-keyword': KEYWORD + METAKEYWORD},
contains: [
COMMENTS
]
};
// symbol : метка goto
var SYMBOL = {
className: 'symbol',
begin: '~', end: ';|:', excludeEnd: true
};
// function : объявление процедур и функций
var FUNCTION = {
className: 'function',
lexemes: UNDERSCORE_IDENT_RE,
variants: [
{begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'},
{begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'}
],
contains: [
{
begin: '\\(', end: '\\)', endsParent : true,
contains: [
{
className: 'params',
lexemes: UNDERSCORE_IDENT_RE,
begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true,
keywords: {
keyword: 'знач',
literal: LITERAL
},
contains: [
NUMBERS,
STRINGS,
DATE
]
},
COMMENTS
]
},
hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE})
]
};
return {
case_insensitive: true,
lexemes: UNDERSCORE_IDENT_RE,
keywords: {
keyword: KEYWORD,
built_in: BUILTIN,
class: CLASS,
type: TYPE,
literal: LITERAL
},
contains: [
META,
FUNCTION,
COMMENTS,
SYMBOL,
NUMBERS,
STRINGS,
DATE
]
}
};
/***/ }),
/* 102 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var regexes = {
ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*",
unexpectedChars: "[!@#$^&',?+~`|:]"
};
var keywords = [
"ALPHA",
"BIT",
"CHAR",
"CR",
"CRLF",
"CTL",
"DIGIT",
"DQUOTE",
"HEXDIG",
"HTAB",
"LF",
"LWSP",
"OCTET",
"SP",
"VCHAR",
"WSP"
];
var commentMode = hljs.COMMENT(";", "$");
var terminalBinaryMode = {
className: "symbol",
begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/
};
var terminalDecimalMode = {
className: "symbol",
begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/
};
var terminalHexadecimalMode = {
className: "symbol",
begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/,
};
var caseSensitivityIndicatorMode = {
className: "symbol",
begin: /%[si]/
};
var ruleDeclarationMode = {
begin: regexes.ruleDeclaration + '\\s*=',
returnBegin: true,
end: /=/,
relevance: 0,
contains: [{className: "attribute", begin: regexes.ruleDeclaration}]
};
return {
illegal: regexes.unexpectedChars,
keywords: keywords.join(" "),
contains: [
ruleDeclarationMode,
commentMode,
terminalBinaryMode,
terminalDecimalMode,
terminalHexadecimalMode,
caseSensitivityIndicatorMode,
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE
]
};
};
/***/ }),
/* 103 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
// IP
{
className: 'number',
begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
},
// Other numbers
{
className: 'number',
begin: '\\b\\d+\\b',
relevance: 0
},
// Requests
{
className: 'string',
begin: '"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '"',
keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE',
illegal: '\\n',
relevance: 10
},
// Dates
{
className: 'string',
begin: /\[/, end: /\]/,
illegal: '\\n'
},
// Strings
{
className: 'string',
begin: '"', end: '"',
illegal: '\\n'
}
]
};
};
/***/ }),
/* 104 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
var AS3_REST_ARG_MODE = {
className: 'rest_arg',
begin: '[.]{3}', end: IDENT_RE,
relevance: 10
};
return {
aliases: ['as'],
keywords: {
keyword: 'as break case catch class const continue default delete do dynamic each ' +
'else extends final finally for function get if implements import in include ' +
'instanceof interface internal is namespace native new override package private ' +
'protected public return set static super switch this throw try typeof use var void ' +
'while with',
literal: 'true false null undefined'
},
contains: [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_NUMBER_MODE,
{
className: 'class',
beginKeywords: 'package', end: '{',
contains: [hljs.TITLE_MODE]
},
{
className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
contains: [
{
beginKeywords: 'extends implements'
},
hljs.TITLE_MODE
]
},
{
className: 'meta',
beginKeywords: 'import include', end: ';',
keywords: {'meta-keyword': 'import include'}
},
{
className: 'function',
beginKeywords: 'function', end: '[{;]', excludeEnd: true,
illegal: '\\S',
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)',
contains: [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
AS3_REST_ARG_MODE
]
},
{
begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE
}
]
},
hljs.METHOD_GUARD
],
illegal: /#/
};
};
/***/ }),
/* 105 */
/***/ (function(module, exports) {
module.exports = // We try to support full Ada2012
//
// We highlight all appearances of types, keywords, literals (string, char, number, bool)
// and titles (user defined function/procedure/package)
// CSS classes are set accordingly
//
// Languages causing problems for language detection:
// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)
// sql (ada default.txt has a lot of sql keywords)
function(hljs) {
// Regular expression for Ada numeric literals.
// stolen form the VHDL highlighter
// Decimal literal:
var INTEGER_RE = '\\d(_|\\d)*';
var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
// Based literal:
var BASED_INTEGER_RE = '\\w+';
var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
// Identifier regex
var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';
// bad chars, only allowed in literals
var BAD_CHARS = '[]{}%#\'\"'
// Ada doesn't have block comments, only line comments
var COMMENTS = hljs.COMMENT('--', '$');
// variable declarations of the form
// Foo : Bar := Baz;
// where only Bar will be highlighted
var VAR_DECLS = {
// TODO: These spaces are not required by the Ada syntax
// however, I have yet to see handwritten Ada code where
// someone does not put spaces around :
begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)',
// endsWithParent: true,
// returnBegin: true,
illegal: BAD_CHARS,
contains: [
{
// workaround to avoid highlighting
// named loops and declare blocks
beginKeywords: 'loop for declare others',
endsParent: true,
},
{
// properly highlight all modifiers
className: 'keyword',
beginKeywords: 'not null constant access function procedure in out aliased exception'
},
{
className: 'type',
begin: ID_REGEX,
endsParent: true,
relevance: 0,
}
]
};
return {
case_insensitive: true,
keywords: {
keyword:
'abort else new return abs elsif not reverse abstract end ' +
'accept entry select access exception of separate aliased exit or some ' +
'all others subtype and for out synchronized array function overriding ' +
'at tagged generic package task begin goto pragma terminate ' +
'body private then if procedure type case in protected constant interface ' +
'is raise use declare range delay limited record when delta loop rem while ' +
'digits renames with do mod requeue xor',
literal:
'True False',
},
contains: [
COMMENTS,
// strings "foobar"
{
className: 'string',
begin: /"/, end: /"/,
contains: [{begin: /""/, relevance: 0}]
},
// characters ''
{
// character literals always contain one char
className: 'string',
begin: /'.'/
},
{
// number literals
className: 'number',
begin: NUMBER_RE,
relevance: 0
},
{
// Attributes
className: 'symbol',
begin: "'" + ID_REGEX,
},
{
// package definition, maybe inside generic
className: 'title',
begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)',
keywords: 'package body',
excludeBegin: true,
excludeEnd: true,
illegal: BAD_CHARS
},
{
// function/procedure declaration/definition
// maybe inside generic
begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)',
keywords: 'overriding function procedure with is renames return',
// we need to re-match the 'function' keyword, so that
// the title mode below matches only exactly once
returnBegin: true,
contains:
[
COMMENTS,
{
// name of the function/procedure
className: 'title',
begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+',
end: '(\\(|\\s+|$)',
excludeBegin: true,
excludeEnd: true,
illegal: BAD_CHARS
},
// 'self'
// // parameter types
VAR_DECLS,
{
// return type
className: 'type',
begin: '\\breturn\\s+', end: '(\\s+|;|$)',
keywords: 'return',
excludeBegin: true,
excludeEnd: true,
// we are done with functions
endsParent: true,
illegal: BAD_CHARS
},
]
},
{
// new type declarations
// maybe inside generic
className: 'type',
begin: '\\b(sub)?type\\s+', end: '\\s+',
keywords: 'type',
excludeBegin: true,
illegal: BAD_CHARS
},
// see comment above the definition
VAR_DECLS,
// no markup
// relevance boosters for small snippets
// {begin: '\\s*=>\\s*'},
// {begin: '\\s*:=\\s*'},
// {begin: '\\s+:=\\s+'},
]
};
};
/***/ }),
/* 106 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var NUMBER = {className: 'number', begin: '[\\$%]\\d+'};
return {
aliases: ['apacheconf'],
case_insensitive: true,
contains: [
hljs.HASH_COMMENT_MODE,
{className: 'section', begin: '</?', end: '>'},
{
className: 'attribute',
begin: /\w+/,
relevance: 0,
// keywords arent needed for highlighting per se, they only boost relevance
// for a very generally defined mode (starts with a word, ends with line-end
keywords: {
nomarkup:
'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +
'sethandler errordocument loadmodule options header listen serverroot ' +
'servername'
},
starts: {
end: /$/,
relevance: 0,
keywords: {
literal: 'on off all'
},
contains: [
{
className: 'meta',
begin: '\\s\\[', end: '\\]$'
},
{
className: 'variable',
begin: '[\\$%]\\{', end: '\\}',
contains: ['self', NUMBER]
},
NUMBER,
hljs.QUOTE_STRING_MODE
]
}
}
],
illegal: /\S/
};
};
/***/ }),
/* 107 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''});
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)',
contains: ['self', hljs.C_NUMBER_MODE, STRING]
};
var COMMENT_MODE_1 = hljs.COMMENT('--', '$');
var COMMENT_MODE_2 = hljs.COMMENT(
'\\(\\*',
'\\*\\)',
{
contains: ['self', COMMENT_MODE_1] //allow nesting
}
);
var COMMENTS = [
COMMENT_MODE_1,
COMMENT_MODE_2,
hljs.HASH_COMMENT_MODE
];
return {
aliases: ['osascript'],
keywords: {
keyword:
'about above after against and around as at back before beginning ' +
'behind below beneath beside between but by considering ' +
'contain contains continue copy div does eighth else end equal ' +
'equals error every exit fifth first for fourth from front ' +
'get given global if ignoring in into is it its last local me ' +
'middle mod my ninth not of on onto or over prop property put ref ' +
'reference repeat returning script second set seventh since ' +
'sixth some tell tenth that the|0 then third through thru ' +
'timeout times to transaction try until where while whose with ' +
'without',
literal:
'AppleScript false linefeed return pi quote result space tab true',
built_in:
'alias application boolean class constant date file integer list ' +
'number real record string text ' +
'activate beep count delay launch log offset read round ' +
'run say summarize write ' +
'character characters contents day frontmost id item length ' +
'month name paragraph paragraphs rest reverse running time version ' +
'weekday word words year'
},
contains: [
STRING,
hljs.C_NUMBER_MODE,
{
className: 'built_in',
begin:
'\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +
'mount volume|path to|(close|open for) access|(get|set) eof|' +
'current date|do shell script|get volume settings|random number|' +
'set volume|system attribute|system info|time to GMT|' +
'(load|run|store) script|scripting components|' +
'ASCII (character|number)|localized string|' +
'choose (application|color|file|file name|' +
'folder|from list|remote application|URL)|' +
'display (alert|dialog))\\b|^\\s*return\\b'
},
{
className: 'literal',
begin:
'\\b(text item delimiters|current application|missing value)\\b'
},
{
className: 'keyword',
begin:
'\\b(apart from|aside from|instead of|out of|greater than|' +
"isn't|(doesn't|does not) (equal|come before|come after|contain)|" +
'(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +
'contained by|comes (before|after)|a (ref|reference)|POSIX file|' +
'POSIX path|(date|time) string|quoted form)\\b'
},
{
beginKeywords: 'on',
illegal: '[${=;\\n]',
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
}
].concat(COMMENTS),
illegal: '//|->|=>|\\[\\['
};
};
/***/ }),
/* 108 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var CPP_PRIMITIVE_TYPES = {
className: 'keyword',
begin: '\\b[a-z\\d_]*_t\\b'
};
var STRINGS = {
className: 'string',
variants: [
{
begin: '(u8?|U)?L?"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '(u8?|U)?R"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '\'\\\\?.', end: '\'',
illegal: '.'
}
]
};
var NUMBERS = {
className: 'number',
variants: [
{ begin: '\\b(0b[01\']+)' },
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
],
relevance: 0
};
var PREPROCESSOR = {
className: 'meta',
begin: /#\s*[a-z]+\b/, end: /$/,
keywords: {
'meta-keyword':
'if else elif endif define undef warning error line ' +
'pragma ifdef ifndef include'
},
contains: [
{
begin: /\\\n/, relevance: 0
},
hljs.inherit(STRINGS, {className: 'meta-string'}),
{
className: 'meta-string',
begin: /<[^\n>]*>/, end: /$/,
illegal: '\\n',
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var FUNCTION_TITLE = hljs.IDENT_RE + '\\s*\\(';
var CPP_KEYWORDS = {
keyword: 'int float while private char catch import module export virtual operator sizeof ' +
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using asm case typeid ' +
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
'switch continue inline delete alignof constexpr decltype ' +
'noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary ' +
'atomic_bool atomic_char atomic_schar ' +
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong new throw return ' +
'and or not',
built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +
'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' +
'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
'vfprintf vprintf vsprintf endl initializer_list unique_ptr',
literal: 'true false nullptr NULL'
};
var EXPRESSION_CONTAINS = [
CPP_PRIMITIVE_TYPES,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS
];
return {
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp'],
keywords: CPP_KEYWORDS,
illegal: '</',
contains: EXPRESSION_CONTAINS.concat([
PREPROCESSOR,
{
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
keywords: CPP_KEYWORDS,
contains: ['self', CPP_PRIMITIVE_TYPES]
},
{
begin: hljs.IDENT_RE + '::',
keywords: CPP_KEYWORDS
},
{
// This mode covers expression context where we can't expect a function
// definition and shouldn't highlight anything that looks like one:
// `return some()`, `else if()`, `(x*sum(1, 2))`
variants: [
{begin: /=/, end: /;/},
{begin: /\(/, end: /\)/},
{beginKeywords: 'new throw return else', end: /;/}
],
keywords: CPP_KEYWORDS,
contains: EXPRESSION_CONTAINS.concat([
{
begin: /\(/, end: /\)/,
keywords: CPP_KEYWORDS,
contains: EXPRESSION_CONTAINS.concat(['self']),
relevance: 0
}
]),
relevance: 0
},
{
className: 'function',
begin: '(' + hljs.IDENT_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,
returnBegin: true, end: /[{;=]/,
excludeEnd: true,
keywords: CPP_KEYWORDS,
illegal: /[^\w\s\*&]/,
contains: [
{
begin: FUNCTION_TITLE, returnBegin: true,
contains: [hljs.TITLE_MODE],
relevance: 0
},
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: CPP_KEYWORDS,
relevance: 0,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
STRINGS,
NUMBERS,
CPP_PRIMITIVE_TYPES
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
PREPROCESSOR
]
},
{
className: 'class',
beginKeywords: 'class struct', end: /[{;:]/,
contains: [
{begin: /</, end: />/, contains: ['self']}, // skip generic stuff
hljs.TITLE_MODE
]
}
]),
exports: {
preprocessor: PREPROCESSOR,
strings: STRINGS,
keywords: CPP_KEYWORDS
}
};
};
/***/ }),
/* 109 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var CPP = hljs.getLanguage('cpp').exports;
return {
keywords: {
keyword:
'boolean byte word string String array ' + CPP.keywords.keyword,
built_in:
'setup loop while catch for if do goto try switch case else ' +
'default break continue return ' +
'KeyboardController MouseController SoftwareSerial ' +
'EthernetServer EthernetClient LiquidCrystal ' +
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
'HttpClient RobotMotor WiFiClient GSMScanner ' +
'FileSystem Scheduler GSMServer YunClient YunServer ' +
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
'Console GSMBand Esplora Stepper Process ' +
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
'Client Server GSMPIN FileIO Bridge Serial ' +
'EEPROM Stream Mouse Audio Servo File Task ' +
'GPRS WiFi Wire TFT GSM SPI SD ' +
'runShellCommandAsynchronously analogWriteResolution ' +
'retrieveCallingNumber printFirmwareVersion ' +
'analogReadResolution sendDigitalPortPair ' +
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
'beginTransmission getSignalStrength runAsynchronously ' +
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
'readAccelerometer messageAvailable sendDigitalPorts ' +
'lineFollowConfig countryNameWrite runShellCommand ' +
'readStringUntil rewindDirectory readTemperature ' +
'setClockDivider readLightSensor endTransmission ' +
'analogReference detachInterrupt countryNameRead ' +
'attachInterrupt encryptionType readBytesUntil ' +
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
'openNextFile scanNetworks noInterrupts digitalWrite ' +
'beginSpeaker mousePressed isActionDone mouseDragged ' +
'displayLogos noAutoscroll addParameter remoteNumber ' +
'getModifiers keyboardRead userNameRead waitContinue ' +
'processInput parseCommand printVersion readNetworks ' +
'writeMessage blinkVersion cityNameRead readMessage ' +
'setDataMode parsePacket isListening setBitOrder ' +
'beginPacket isDirectory motorsWrite drawCompass ' +
'digitalRead clearScreen serialEvent rightToLeft ' +
'setTextSize leftToRight requestFrom keyReleased ' +
'compassRead analogWrite interrupts WiFiServer ' +
'disconnect playMelody parseFloat autoscroll ' +
'getPINUsed setPINUsed setTimeout sendAnalog ' +
'readSlider analogRead beginWrite createChar ' +
'motorsStop keyPressed tempoWrite readButton ' +
'subnetMask debugPrint macAddress writeGreen ' +
'randomSeed attachGPRS readString sendString ' +
'remotePort releaseAll mouseMoved background ' +
'getXChange getYChange answerCall getResult ' +
'voiceCall endPacket constrain getSocket writeJSON ' +
'getButton available connected findUntil readBytes ' +
'exitValue readGreen writeBlue startLoop IPAddress ' +
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
'onRequest onReceive changePIN playFile noBuffer ' +
'parseInt overflow checkPIN knobRead beginTFT ' +
'bitClear updateIR bitWrite position writeRGB ' +
'highByte writeRed setSpeed readBlue noStroke ' +
'remoteIP transfer shutdown hangCall beginSMS ' +
'endWrite attached maintain noCursor checkReg ' +
'checkPUK shiftOut isValid shiftIn pulseIn ' +
'connect println localIP pinMode getIMEI ' +
'display noBlink process getBand running beginSD ' +
'drawBMP lowByte setBand release bitRead prepare ' +
'pointTo readRed setMode noFill remove listen ' +
'stroke detach attach noTone exists buffer ' +
'height bitSet circle config cursor random ' +
'IRread setDNS endSMS getKey micros ' +
'millis begin print write ready flush width ' +
'isPIN blink clear press mkdir rmdir close ' +
'point yield image BSSID click delay ' +
'read text move peek beep rect line open ' +
'seek fill size turn stop home find ' +
'step tone sqrt RSSI SSID ' +
'end bit tan cos sin pow map abs max ' +
'min get run put',
literal:
'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
'DEFAULT OUTPUT INPUT HIGH LOW'
},
contains: [
CPP.preprocessor,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 110 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
//local labels: %?[FB]?[AT]?\d{1,2}\w+
return {
case_insensitive: true,
aliases: ['arm'],
lexemes: '\\.?' + hljs.IDENT_RE,
keywords: {
meta:
//GNU preprocs
'.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+
//ARM directives
'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',
built_in:
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers
'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility
'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp
'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs
'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc
'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs
//program status registers
'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+
'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+
//NEON and VFP registers
's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+
's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+
'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+
'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' +
'{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'
},
contains: [
{
className: 'keyword',
begin: '\\b('+ //mnemonics
'adc|'+
'(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+
'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+
'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+
'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+
'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+
'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+
'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+
'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+
'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+
'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+
'[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+
'wfe|wfi|yield'+
')'+
'(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes
'[sptrx]?' , //legal postfixes
end: '\\s'
},
hljs.COMMENT('[;@]', '$', {relevance: 0}),
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\'',
end: '[^\\\\]\'',
relevance: 0
},
{
className: 'title',
begin: '\\|', end: '\\|',
illegal: '\\n',
relevance: 0
},
{
className: 'number',
variants: [
{begin: '[#$=]?0x[0-9a-f]+'}, //hex
{begin: '[#$=]?0b[01]+'}, //bin
{begin: '[#$=]\\d+'}, //literal
{begin: '\\b\\d+'} //bare number
],
relevance: 0
},
{
className: 'symbol',
variants: [
{begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax
{begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax
{begin: '[=#]\\w+' } //label reference
],
relevance: 0
}
]
};
};
/***/ }),
/* 111 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
var TAG_INTERNALS = {
endsWithParent: true,
illegal: /</,
relevance: 0,
contains: [
{
className: 'attr',
begin: XML_IDENT_RE,
relevance: 0
},
{
begin: /=\s*/,
relevance: 0,
contains: [
{
className: 'string',
endsParent: true,
variants: [
{begin: /"/, end: /"/},
{begin: /'/, end: /'/},
{begin: /[^\s"'=<>`]+/}
]
}
]
}
]
};
return {
aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist'],
case_insensitive: true,
contains: [
{
className: 'meta',
begin: '<!DOCTYPE', end: '>',
relevance: 10,
contains: [{begin: '\\[', end: '\\]'}]
},
hljs.COMMENT(
'<!--',
'-->',
{
relevance: 10
}
),
{
begin: '<\\!\\[CDATA\\[', end: '\\]\\]>',
relevance: 10
},
{
begin: /<\?(php)?/, end: /\?>/,
subLanguage: 'php',
contains: [{begin: '/\\*', end: '\\*/', skip: true}]
},
{
className: 'tag',
/*
The lookahead pattern (?=...) ensures that 'begin' only matches
'<style' as a single word, followed by a whitespace or an
ending braket. The '$' is needed for the lexeme to be recognized
by hljs.subMode() that tests lexemes outside the stream.
*/
begin: '<style(?=\\s|>|$)', end: '>',
keywords: {name: 'style'},
contains: [TAG_INTERNALS],
starts: {
end: '</style>', returnEnd: true,
subLanguage: ['css', 'xml']
}
},
{
className: 'tag',
// See the comment in the <style tag about the lookahead pattern
begin: '<script(?=\\s|>|$)', end: '>',
keywords: {name: 'script'},
contains: [TAG_INTERNALS],
starts: {
end: '\<\/script\>', returnEnd: true,
subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml']
}
},
{
className: 'meta',
variants: [
{begin: /<\?xml/, end: /\?>/, relevance: 10},
{begin: /<\?\w+/, end: /\?>/}
]
},
{
className: 'tag',
begin: '</?', end: '/?>',
contains: [
{
className: 'name', begin: /[^\/><\s]+/, relevance: 0
},
TAG_INTERNALS
]
}
]
};
};
/***/ }),
/* 112 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['adoc'],
contains: [
// block comment
hljs.COMMENT(
'^/{4,}\\n',
'\\n/{4,}$',
// can also be done as...
//'^/{4,}$',
//'^/{4,}$',
{
relevance: 10
}
),
// line comment
hljs.COMMENT(
'^//',
'$',
{
relevance: 0
}
),
// title
{
className: 'title',
begin: '^\\.\\w.*$'
},
// example, admonition & sidebar blocks
{
begin: '^[=\\*]{4,}\\n',
end: '\\n^[=\\*]{4,}$',
relevance: 10
},
// headings
{
className: 'section',
relevance: 10,
variants: [
{begin: '^(={1,5}) .+?( \\1)?$'},
{begin: '^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$'},
]
},
// document attributes
{
className: 'meta',
begin: '^:.+?:',
end: '\\s',
excludeEnd: true,
relevance: 10
},
// block attributes
{
className: 'meta',
begin: '^\\[.+?\\]$',
relevance: 0
},
// quoteblocks
{
className: 'quote',
begin: '^_{4,}\\n',
end: '\\n_{4,}$',
relevance: 10
},
// listing and literal blocks
{
className: 'code',
begin: '^[\\-\\.]{4,}\\n',
end: '\\n[\\-\\.]{4,}$',
relevance: 10
},
// passthrough blocks
{
begin: '^\\+{4,}\\n',
end: '\\n\\+{4,}$',
contains: [
{
begin: '<', end: '>',
subLanguage: 'xml',
relevance: 0
}
],
relevance: 10
},
// lists (can only capture indicators)
{
className: 'bullet',
begin: '^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+'
},
// admonition
{
className: 'symbol',
begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+',
relevance: 10
},
// inline strong
{
className: 'strong',
// must not follow a word character or be followed by an asterisk or space
begin: '\\B\\*(?![\\*\\s])',
end: '(\\n{2}|\\*)',
// allow escaped asterisk followed by word char
contains: [
{
begin: '\\\\*\\w',
relevance: 0
}
]
},
// inline emphasis
{
className: 'emphasis',
// must not follow a word character or be followed by a single quote or space
begin: '\\B\'(?![\'\\s])',
end: '(\\n{2}|\')',
// allow escaped single quote followed by word char
contains: [
{
begin: '\\\\\'\\w',
relevance: 0
}
],
relevance: 0
},
// inline emphasis (alt)
{
className: 'emphasis',
// must not follow a word character or be followed by an underline or space
begin: '_(?![_\\s])',
end: '(\\n{2}|_)',
relevance: 0
},
// inline smart quotes
{
className: 'string',
variants: [
{begin: "``.+?''"},
{begin: "`.+?'"}
]
},
// inline code snippets (TODO should get same treatment as strong and emphasis)
{
className: 'code',
begin: '(`.+?`|\\+.+?\\+)',
relevance: 0
},
// indented literal block
{
className: 'code',
begin: '^[ \\t]',
end: '$',
relevance: 0
},
// horizontal rules
{
begin: '^\'{3,}[ \\t]*$',
relevance: 10
},
// images and links
{
begin: '(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]',
returnBegin: true,
contains: [
{
begin: '(link|image:?):',
relevance: 0
},
{
className: 'link',
begin: '\\w',
end: '[^\\[]+',
relevance: 0
},
{
className: 'string',
begin: '\\[',
end: '\\]',
excludeBegin: true,
excludeEnd: true,
relevance: 0
}
],
relevance: 10
}
]
};
};
/***/ }),
/* 113 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
var KEYWORDS =
'false synchronized int abstract float private char boolean static null if const ' +
'for true while long throw strictfp finally protected import native final return void ' +
'enum else extends implements break transient new catch instanceof byte super volatile case ' +
'assert short package default double public try this switch continue throws privileged ' +
'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' +
'staticinitialization withincode target within execution getWithinTypeName handler ' +
'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents '+
'warning error soft precedence thisAspectInstance';
var SHORTKEYS = 'get set args call';
return {
keywords : KEYWORDS,
illegal : /<\/|#/,
contains : [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [
{
// eat up @'s in emails to prevent them to be recognized as doctags
begin: /\w+@/, relevance: 0
},
{
className : 'doctag',
begin : '@[A-Za-z]+'
}
]
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className : 'class',
beginKeywords : 'aspect',
end : /[{;=]/,
excludeEnd : true,
illegal : /[:;"\[\]]/,
contains : [
{
beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'
},
hljs.UNDERSCORE_TITLE_MODE,
{
begin : /\([^\)]*/,
end : /[)]+/,
keywords : KEYWORDS + ' ' + SHORTKEYS,
excludeEnd : false
}
]
},
{
className : 'class',
beginKeywords : 'class interface',
end : /[{;=]/,
excludeEnd : true,
relevance: 0,
keywords : 'class interface',
illegal : /[:"\[\]]/,
contains : [
{beginKeywords : 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
// AspectJ Constructs
beginKeywords : 'pointcut after before around throwing returning',
end : /[)]/,
excludeEnd : false,
illegal : /["\[\]]/,
contains : [
{
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
returnBegin : true,
contains : [hljs.UNDERSCORE_TITLE_MODE]
}
]
},
{
begin : /[:]/,
returnBegin : true,
end : /[{;]/,
relevance: 0,
excludeEnd : false,
keywords : KEYWORDS,
illegal : /["\[\]]/,
contains : [
{
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
keywords : KEYWORDS + ' ' + SHORTKEYS,
relevance: 0
},
hljs.QUOTE_STRING_MODE
]
},
{
// this prevents 'new Name(...), or throw ...' from being recognized as a function definition
beginKeywords : 'new throw',
relevance : 0
},
{
// the function class is a bit different for AspectJ compared to the Java language
className : 'function',
begin : /\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,
returnBegin : true,
end : /[{;=]/,
keywords : KEYWORDS,
excludeEnd : true,
contains : [
{
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
returnBegin : true,
relevance: 0,
contains : [hljs.UNDERSCORE_TITLE_MODE]
},
{
className : 'params',
begin : /\(/, end : /\)/,
relevance: 0,
keywords : KEYWORDS,
contains : [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_NUMBER_MODE,
{
// annotation is also used in this language
className : 'meta',
begin : '@[A-Za-z]+'
}
]
};
};
/***/ }),
/* 114 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BACKTICK_ESCAPE = {
begin: '`[\\s\\S]'
};
return {
case_insensitive: true,
aliases: [ 'ahk' ],
keywords: {
keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group',
literal: 'A|0 true false NOT AND OR',
built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel',
},
contains: [
{
className: 'built_in',
begin: 'A_[a-zA-Z0-9]+'
},
BACKTICK_ESCAPE,
hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}),
hljs.COMMENT(';', '$', {relevance: 0}),
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'number',
begin: hljs.NUMBER_RE,
relevance: 0
},
{
className: 'subst', // FIXED
begin: '%(?=[a-zA-Z0-9#_$@])', end: '%',
illegal: '[^a-zA-Z0-9#_$@]'
},
{
className: 'built_in',
begin: '^\\s*\\w+\\s*,'
//I don't really know if this is totally relevant
},
{
className: 'meta',
begin: '^\\s*#\w+', end:'$',
relevance: 0
},
{
className: 'symbol',
contains: [BACKTICK_ESCAPE],
variants: [
{begin: '^[^\\n";]+::(?!=)'},
{begin: '^[^\\n";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things
// followed by a single ':' in many languages
]
},
{
// consecutive commas, not for highlighting but just for relevance
begin: ',\\s*,'
}
]
}
};
/***/ }),
/* 115 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = 'ByRef Case Const ContinueCase ContinueLoop ' +
'Default Dim Do Else ElseIf EndFunc EndIf EndSelect ' +
'EndSwitch EndWith Enum Exit ExitLoop For Func ' +
'Global If In Local Next ReDim Return Select Static ' +
'Step Switch Then To Until Volatile WEnd While With',
LITERAL = 'True False And Null Not Or',
BUILT_IN =
'Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringRe
COMMENT = {
variants: [
hljs.COMMENT(';', '$', {relevance: 0}),
hljs.COMMENT('#cs', '#ce'),
hljs.COMMENT('#comments-start', '#comments-end')
]
},
VARIABLE = {
begin: '\\$[A-z0-9_]+'
},
STRING = {
className: 'string',
variants: [{
begin: /"/,
end: /"/,
contains: [{
begin: /""/,
relevance: 0
}]
}, {
begin: /'/,
end: /'/,
contains: [{
begin: /''/,
relevance: 0
}]
}]
},
NUMBER = {
variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
},
PREPROCESSOR = {
className: 'meta',
begin: '#',
end: '$',
keywords: {'meta-keyword': 'comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin'},
contains: [{
begin: /\\\n/,
relevance: 0
}, {
beginKeywords: 'include',
keywords: {'meta-keyword': 'include'},
end: '$',
contains: [
STRING, {
className: 'meta-string',
variants: [{
begin: '<',
end: '>'
}, {
begin: /"/,
end: /"/,
contains: [{
begin: /""/,
relevance: 0
}]
}, {
begin: /'/,
end: /'/,
contains: [{
begin: /''/,
relevance: 0
}]
}]
}
]
},
STRING,
COMMENT
]
},
CONSTANT = {
className: 'symbol',
// begin: '@',
// end: '$',
// keywords: 'AppDataCommonDir AppDataDir AutoItExe AutoItPID AutoItVersion AutoItX64 COM_EventObj CommonFilesDir Compiled ComputerName ComSpec CPUArch CR CRLF DesktopCommonDir DesktopDepth DesktopDir DesktopHeight DesktopRefresh DesktopWidth DocumentsCommonDir error exitCode exitMethod extended FavoritesCommonDir FavoritesDir GUI_CtrlHandle GUI_CtrlId GUI_DragFile GUI_DragId GUI_DropId GUI_WinHandle HomeDrive HomePath HomeShare HotKeyPressed HOUR IPAddress1 IPAddress2 IPAddress3 IPAddress4 KBLayout LF LocalAppDataDir LogonDNSDomain LogonDomain LogonServer MDAY MIN MON MSEC MUILang MyDocumentsDir NumParams OSArch OSBuild OSLang OSServicePack OSType OSVersion ProgramFilesDir ProgramsCommonDir ProgramsDir ScriptDir ScriptFullPath ScriptLineNumber ScriptName SEC StartMenuCommonDir StartMenuDir StartupCommonDir StartupDir SW_DISABLE SW_ENABLE SW_HIDE SW_LOCK SW_MAXIMIZE SW_MINIMIZE SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL SW_UNLOCK SystemDir TAB TempDir TRAY_ID TrayIconFlashing TrayIconVisible UserName UserProfileDir WDAY WindowsDir WorkingDir YDAY YEAR',
// relevance: 5
begin: '@[A-z0-9_]+'
},
FUNCTION = {
className: 'function',
beginKeywords: 'Func',
end: '$',
illegal: '\\$|\\[|%',
contains: [
hljs.UNDERSCORE_TITLE_MODE, {
className: 'params',
begin: '\\(',
end: '\\)',
contains: [
VARIABLE,
STRING,
NUMBER
]
}
]
};
return {
case_insensitive: true,
illegal: /\/\*/,
keywords: {
keyword: KEYWORDS,
built_in: BUILT_IN,
literal: LITERAL
},
contains: [
COMMENT,
VARIABLE,
STRING,
NUMBER,
PREPROCESSOR,
CONSTANT,
FUNCTION
]
}
};
/***/ }),
/* 116 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
lexemes: '\\.?' + hljs.IDENT_RE,
keywords: {
keyword:
/* mnemonic */
'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' +
'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' +
'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' +
'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' +
'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' +
'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' +
'subi swap tst wdr',
built_in:
/* general purpose registers */
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' +
'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' +
/* IO Registers (ATMega128) */
'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' +
'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' +
'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' +
'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' +
'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' +
'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' +
'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' +
'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf',
meta:
'.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' +
'.listmac .macro .nolist .org .set'
},
contains: [
hljs.C_BLOCK_COMMENT_MODE,
hljs.COMMENT(
';',
'$',
{
relevance: 0
}
),
hljs.C_NUMBER_MODE, // 0x..., decimal, float
hljs.BINARY_NUMBER_MODE, // 0b...
{
className: 'number',
begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o...
},
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\'', end: '[^\\\\]\'',
illegal: '[^\\\\][^\']'
},
{className: 'symbol', begin: '^[A-Za-z0-9_.$]+:'},
{className: 'meta', begin: '#', end: '$'},
{ // подстановка в «.macro»
className: 'subst',
begin: '@[0-9]+'
}
]
};
};
/***/ }),
/* 117 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VARIABLE = {
className: 'variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)}/}
]
};
var KEYWORDS = 'BEGIN END if else while do for in break continue delete next nextfile function func exit|10';
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{
begin: /(u|b)?r?'''/, end: /'''/,
relevance: 10
},
{
begin: /(u|b)?r?"""/, end: /"""/,
relevance: 10
},
{
begin: /(u|r|ur)'/, end: /'/,
relevance: 10
},
{
begin: /(u|r|ur)"/, end: /"/,
relevance: 10
},
{
begin: /(b|br)'/, end: /'/
},
{
begin: /(b|br)"/, end: /"/
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
};
return {
keywords: {
keyword: KEYWORDS
},
contains: [
VARIABLE,
STRING,
hljs.REGEXP_MODE,
hljs.HASH_COMMENT_MODE,
hljs.NUMBER_MODE
]
}
};
/***/ }),
/* 118 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: 'false int abstract private char boolean static null if for true ' +
'while long throw finally protected final return void enum else ' +
'break new catch byte super case short default double public try this switch ' +
'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' +
'order group by asc desc index hint like dispaly edit client server ttsbegin ' +
'ttscommit str real date container anytype common div mod',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'meta',
begin: '#', end: '$'
},
{
className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
illegal: ':',
contains: [
{beginKeywords: 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
}
]
};
};
/***/ }),
/* 119 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VAR = {
className: 'variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)}/}
]
};
var QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VAR,
{
className: 'variable',
begin: /\$\(/, end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
var APOS_STRING = {
className: 'string',
begin: /'/, end: /'/
};
return {
aliases: ['sh', 'zsh'],
lexemes: /\b-?[a-z\._]+\b/,
keywords: {
keyword:
'if then else elif fi for while in do done case esac function',
literal:
'true false',
built_in:
// Shell built-ins
// http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +
'trap umask unset ' +
// Bash built-ins
'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +
'read readarray source type typeset ulimit unalias ' +
// Shell modifiers
'set shopt ' +
// Zsh built-ins
'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +
'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +
'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +
'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +
'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +
'zpty zregexparse zsocket zstyle ztcp',
_:
'-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster
},
contains: [
{
className: 'meta',
begin: /^#![^\n]+sh\s*$/,
relevance: 10
},
{
className: 'function',
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
returnBegin: true,
contains: [hljs.inherit(hljs.TITLE_MODE, {begin: /\w[\w\d_]*/})],
relevance: 0
},
hljs.HASH_COMMENT_MODE,
QUOTE_STRING,
APOS_STRING,
VAR
]
};
};
/***/ }),
/* 120 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
illegal: '^\.',
// Support explicitely typed variables that end with $%! or #.
lexemes: '[a-zA-Z][a-zA-Z0-9_\$\%\!\#]*',
keywords: {
keyword:
'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +
'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' +
'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' +
'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' +
'HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' +
'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' +
'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' +
'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' +
'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' +
'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' +
'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' +
'WEND WIDTH WINDOW WRITE XOR'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.COMMENT('REM', '$', {relevance: 10}),
hljs.COMMENT('\'', '$', {relevance: 0}),
{
// Match line numbers
className: 'symbol',
begin: '^[0-9]+\ ',
relevance: 10
},
{
// Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)
className: 'number',
begin: '\\b([0-9]+[0-9edED\.]*[#\!]?)',
relevance: 0
},
{
// Match hexadecimal numbers (&Hxxxx)
className: 'number',
begin: '(\&[hH][0-9a-fA-F]{1,4})'
},
{
// Match octal numbers (&Oxxxxxx)
className: 'number',
begin: '(\&[oO][0-7]{1,6})'
}
]
};
};
/***/ }),
/* 121 */
/***/ (function(module, exports) {
module.exports = function(hljs){
return {
contains: [
// Attribute
{
className: 'attribute',
begin: /</, end: />/
},
// Specific
{
begin: /::=/,
starts: {
end: /$/,
contains: [
{
begin: /</, end: />/
},
// Common
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
}
}
]
};
};
/***/ }),
/* 122 */
/***/ (function(module, exports) {
module.exports = function(hljs){
var LITERAL = {
className: 'literal',
begin: '[\\+\\-]',
relevance: 0
};
return {
aliases: ['bf'],
contains: [
hljs.COMMENT(
'[^\\[\\]\\.,\\+\\-<> \r\n]',
'[\\[\\]\\.,\\+\\-<> \r\n]',
{
returnEnd: true,
relevance: 0
}
),
{
className: 'title',
begin: '[\\[\\]]',
relevance: 0
},
{
className: 'string',
begin: '[\\.,]',
relevance: 0
},
{
// this mode works as the only relevance counter
begin: /\+\+|\-\-/, returnBegin: true,
contains: [LITERAL]
},
LITERAL
]
};
};
/***/ }),
/* 123 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS =
'div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to ' +
'until while with var';
var LITERALS = 'false true';
var COMMENT_MODES = [
hljs.C_LINE_COMMENT_MODE,
hljs.COMMENT(
/\{/,
/\}/,
{
relevance: 0
}
),
hljs.COMMENT(
/\(\*/,
/\*\)/,
{
relevance: 10
}
)
];
var STRING = {
className: 'string',
begin: /'/, end: /'/,
contains: [{begin: /''/}]
};
var CHAR_STRING = {
className: 'string', begin: /(#\d+)+/
};
var DATE = {
className: 'number',
begin: '\\b\\d+(\\.\\d+)?(DT|D|T)',
relevance: 0
};
var DBL_QUOTED_VARIABLE = {
className: 'string', // not a string technically but makes sense to be highlighted in the same style
begin: '"',
end: '"'
};
var PROCEDURE = {
className: 'function',
beginKeywords: 'procedure', end: /[:;]/,
keywords: 'procedure|10',
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
contains: [STRING, CHAR_STRING]
}
].concat(COMMENT_MODES)
};
var OBJECT = {
className: 'class',
begin: 'OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)',
returnBegin: true,
contains: [
hljs.TITLE_MODE,
PROCEDURE
]
};
return {
case_insensitive: true,
keywords: { keyword: KEYWORDS, literal: LITERALS },
illegal: /\/\*/,
contains: [
STRING, CHAR_STRING,
DATE, DBL_QUOTED_VARIABLE,
hljs.NUMBER_MODE,
OBJECT,
PROCEDURE
]
};
};
/***/ }),
/* 124 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['capnp'],
keywords: {
keyword:
'struct enum interface union group import using const annotation extends in of on as with from fixed',
built_in:
'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' +
'Text Data AnyPointer AnyStruct Capability List',
literal:
'true false'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
hljs.HASH_COMMENT_MODE,
{
className: 'meta',
begin: /@0x[\w\d]{16};/,
illegal: /\n/
},
{
className: 'symbol',
begin: /@\d+\b/
},
{
className: 'class',
beginKeywords: 'struct enum', end: /\{/,
illegal: /\n/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
})
]
},
{
className: 'class',
beginKeywords: 'interface', end: /\{/,
illegal: /\n/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
})
]
}
]
};
};
/***/ }),
/* 125 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
// 2.3. Identifiers and keywords
var KEYWORDS =
'assembly module package import alias class interface object given value ' +
'assign void function new of extends satisfies abstracts in out return ' +
'break continue throw assert dynamic if else switch case for while try ' +
'catch finally then let this outer super is exists nonempty';
// 7.4.1 Declaration Modifiers
var DECLARATION_MODIFIERS =
'shared abstract formal default actual variable late native deprecated' +
'final sealed annotation suppressWarnings small';
// 7.4.2 Documentation
var DOCUMENTATION =
'doc by license see throws tagged';
var SUBST = {
className: 'subst', excludeBegin: true, excludeEnd: true,
begin: /``/, end: /``/,
keywords: KEYWORDS,
relevance: 10
};
var EXPRESSIONS = [
{
// verbatim string
className: 'string',
begin: '"""',
end: '"""',
relevance: 10
},
{
// string literal or template
className: 'string',
begin: '"', end: '"',
contains: [SUBST]
},
{
// character literal
className: 'string',
begin: "'",
end: "'"
},
{
// numeric literal
className: 'number',
begin: '#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?',
relevance: 0
}
];
SUBST.contains = EXPRESSIONS;
return {
keywords: {
keyword: KEYWORDS + ' ' + DECLARATION_MODIFIERS,
meta: DOCUMENTATION
},
illegal: '\\$[^01]|#[^0-9a-fA-F]',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.COMMENT('/\\*', '\\*/', {contains: ['self']}),
{
// compiler annotation
className: 'meta',
begin: '@[a-z]\\w*(?:\\:\"[^\"]*\")?'
}
].concat(EXPRESSIONS)
};
};
/***/ }),
/* 126 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['clean','icl','dcl'],
keywords: {
keyword:
'if let in with where case of class instance otherwise ' +
'implementation definition system module from import qualified as ' +
'special code inline foreign export ccall stdcall generic derive ' +
'infix infixl infixr',
literal:
'True False'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{begin: '->|<-[|:]?|::|#!?|>>=|\\{\\||\\|\\}|:==|=:|\\.\\.|<>|`'} // relevance booster
]
};
};
/***/ }),
/* 127 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var keywords = {
'builtin-name':
// Clojure keywords
'def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+
'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+
'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+
'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '+
'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . '+
'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last '+
'drop-while while intern condp case reduced cycle split-at split-with repeat replicate '+
'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext '+
'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends '+
'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler '+
'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter '+
'monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or '+
'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert '+
'peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast '+
'sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import '+
'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! '+
'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger '+
'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline '+
'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking '+
'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! '+
'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! '+
'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty '+
'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list '+
'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer '+
'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate '+
'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta '+
'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'
};
var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\'';
var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
var SYMBOL = {
begin: SYMBOL_RE,
relevance: 0
};
var NUMBER = {
className: 'number', begin: SIMPLE_NUMBER_RE,
relevance: 0
};
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
var COMMENT = hljs.COMMENT(
';',
'$',
{
relevance: 0
}
);
var LITERAL = {
className: 'literal',
begin: /\b(true|false|nil)\b/
};
var COLLECTION = {
begin: '[\\[\\{]', end: '[\\]\\}]'
};
var HINT = {
className: 'comment',
begin: '\\^' + SYMBOL_RE
};
var HINT_COL = hljs.COMMENT('\\^\\{', '\\}');
var KEY = {
className: 'symbol',
begin: '[:]{1,2}' + SYMBOL_RE
};
var LIST = {
begin: '\\(', end: '\\)'
};
var BODY = {
endsWithParent: true,
relevance: 0
};
var NAME = {
keywords: keywords,
lexemes: SYMBOL_RE,
className: 'name', begin: SYMBOL_RE,
starts: BODY
};
var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];
BODY.contains = DEFAULT_CONTAINS;
COLLECTION.contains = DEFAULT_CONTAINS;
HINT_COL.contains = [COLLECTION];
return {
aliases: ['clj'],
illegal: /\S/,
contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
}
};
/***/ }),
/* 128 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
{
className: 'meta',
begin: /^([\w.-]+|\s*#_)=>/,
starts: {
end: /$/,
subLanguage: 'clojure'
}
}
]
}
};
/***/ }),
/* 129 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['cmake.in'],
case_insensitive: true,
keywords: {
keyword:
'add_custom_command add_custom_target add_definitions add_dependencies ' +
'add_executable add_library add_subdirectory add_test aux_source_directory ' +
'break build_command cmake_minimum_required cmake_policy configure_file ' +
'create_test_sourcelist define_property else elseif enable_language enable_testing ' +
'endforeach endfunction endif endmacro endwhile execute_process export find_file ' +
'find_library find_package find_path find_program fltk_wrap_ui foreach function ' +
'get_cmake_property get_directory_property get_filename_component get_property ' +
'get_source_file_property get_target_property get_test_property if include ' +
'include_directories include_external_msproject include_regular_expression install ' +
'link_directories load_cache load_command macro mark_as_advanced message option ' +
'output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return ' +
'separate_arguments set set_directory_properties set_property ' +
'set_source_files_properties set_target_properties set_tests_properties site_name ' +
'source_group string target_link_libraries try_compile try_run unset variable_watch ' +
'while build_name exec_program export_library_dependencies install_files ' +
'install_programs install_targets link_libraries make_directory remove subdir_depends ' +
'subdirs use_mangled_mesa utility_source variable_requires write_file ' +
'qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or ' +
'equal less greater strless strgreater strequal matches'
},
contains: [
{
className: 'variable',
begin: '\\${', end: '}'
},
hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE
]
};
};
/***/ }),
/* 130 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
// JS keywords
'in if for while finally new do return else break catch instanceof throw try this ' +
'switch continue typeof delete debugger super yield import export from as default await ' +
// Coffee keywords
'then unless until loop of by when and or is isnt not',
literal:
// JS literals
'true false null undefined ' +
// Coffee literals
'yes no on off',
built_in:
'npm require console print module global window document'
};
var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
var SUBST = {
className: 'subst',
begin: /#\{/, end: /}/,
keywords: KEYWORDS
};
var EXPRESSIONS = [
hljs.BINARY_NUMBER_MODE,
hljs.inherit(hljs.C_NUMBER_MODE, {starts: {end: '(\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp
{
className: 'string',
variants: [
{
begin: /'''/, end: /'''/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: /'/, end: /'/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: /"""/, end: /"""/,
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
},
{
begin: /"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
}
]
},
{
className: 'regexp',
variants: [
{
begin: '///', end: '///',
contains: [SUBST, hljs.HASH_COMMENT_MODE]
},
{
begin: '//[gim]*',
relevance: 0
},
{
// regex can't start with space to parse x / 2 / 3 as two divisions
// regex can't start with *, and it supports an "illegal" in the main mode
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
}
]
},
{
begin: '@' + JS_IDENT_RE // relevance booster
},
{
subLanguage: 'javascript',
excludeBegin: true, excludeEnd: true,
variants: [
{
begin: '```', end: '```',
},
{
begin: '`', end: '`',
}
]
}
];
SUBST.contains = EXPRESSIONS;
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>';
var PARAMS = {
className: 'params',
begin: '\\([^\\(]', returnBegin: true,
/* We need another contained nameless mode to not have every nested
pair of parens to be called "params" */
contains: [{
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
contains: ['self'].concat(EXPRESSIONS)
}]
};
return {
aliases: ['coffee', 'cson', 'iced'],
keywords: KEYWORDS,
illegal: /\/\*/,
contains: EXPRESSIONS.concat([
hljs.COMMENT('###', '###'),
hljs.HASH_COMMENT_MODE,
{
className: 'function',
begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>',
returnBegin: true,
contains: [TITLE, PARAMS]
},
{
// anonymous function start
begin: /[:\(,=]\s*/,
relevance: 0,
contains: [
{
className: 'function',
begin: PARAMS_RE, end: '[-=]>',
returnBegin: true,
contains: [PARAMS]
}
]
},
{
className: 'class',
beginKeywords: 'class',
end: '$',
illegal: /[:="\[\]]/,
contains: [
{
beginKeywords: 'extends',
endsWithParent: true,
illegal: /[:="\[\]]/,
contains: [TITLE]
},
TITLE
]
},
{
begin: JS_IDENT_RE + ':', end: ':',
returnBegin: true, returnEnd: true,
relevance: 0
}
])
};
};
/***/ }),
/* 131 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword:
'_ as at cofix else end exists exists2 fix for forall fun if IF in let ' +
'match mod Prop return Set then Type using where with ' +
'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' +
'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' +
'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' +
'Conjectures Constant constr Constraint Constructors Context Corollary ' +
'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent' +
'Derive Drop eauto End Equality Eval Example Existential Existentials ' +
'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' +
'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' +
'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' +
'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' +
'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' +
'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' +
'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' +
'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' +
'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' +
'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' +
'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' +
'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' +
'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' +
'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' +
'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' +
'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' +
'Verbose Visibility where with',
built_in:
'abstract absurd admit after apply as assert assumption at auto autorewrite ' +
'autounfold before bottom btauto by case case_eq cbn cbv change ' +
'classical_left classical_right clear clearbody cofix compare compute ' +
'congruence constr_eq constructor contradict contradiction cut cutrewrite ' +
'cycle decide decompose dependent destruct destruction dintuition ' +
'discriminate discrR do double dtauto eapply eassumption eauto ecase ' +
'econstructor edestruct ediscriminate eelim eexact eexists einduction ' +
'einjection eleft elim elimtype enough equality erewrite eright ' +
'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' +
'field field_simplify field_simplify_eq first firstorder fix fold fourier ' +
'functional generalize generalizing gfail give_up has_evar hnf idtac in ' +
'induction injection instantiate intro intro_pattern intros intuition ' +
'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' +
'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' +
'record red refine reflexivity remember rename repeat replace revert ' +
'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' +
'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' +
'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' +
'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' +
'symmetry tactic tauto time timeout top transitivity trivial try tryif ' +
'unfold unify until using vm_compute with'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.COMMENT('\\(\\*', '\\*\\)'),
hljs.C_NUMBER_MODE,
{
className: 'type',
excludeBegin: true,
begin: '\\|\\s*',
end: '\\w+'
},
{begin: /[-=]>/} // relevance booster
]
};
};
/***/ }),
/* 132 */
/***/ (function(module, exports) {
module.exports = function cos (hljs) {
var STRINGS = {
className: 'string',
variants: [
{
begin: '"',
end: '"',
contains: [{ // escaped
begin: "\"\"",
relevance: 0
}]
}
]
};
var NUMBERS = {
className: "number",
begin: "\\b(\\d+(\\.\\d*)?|\\.\\d+)",
relevance: 0
};
var COS_KEYWORDS =
'property parameter class classmethod clientmethod extends as break ' +
'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' +
'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' +
'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' +
'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' +
'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' +
'zsync ascii';
// registered function - no need in them due to all functions are highlighted,
// but I'll just leave this here.
//"$bit", "$bitcount",
//"$bitfind", "$bitlogic", "$case", "$char", "$classmethod", "$classname",
//"$compile", "$data", "$decimal", "$double", "$extract", "$factor",
//"$find", "$fnumber", "$get", "$increment", "$inumber", "$isobject",
//"$isvaliddouble", "$isvalidnum", "$justify", "$length", "$list",
//"$listbuild", "$listdata", "$listfind", "$listfromstring", "$listget",
//"$listlength", "$listnext", "$listsame", "$listtostring", "$listvalid",
//"$locate", "$match", "$method", "$name", "$nconvert", "$next",
//"$normalize", "$now", "$number", "$order", "$parameter", "$piece",
//"$prefetchoff", "$prefetchon", "$property", "$qlength", "$qsubscript",
//"$query", "$random", "$replace", "$reverse", "$sconvert", "$select",
//"$sortbegin", "$sortend", "$stack", "$text", "$translate", "$view",
//"$wascii", "$wchar", "$wextract", "$wfind", "$wiswide", "$wlength",
//"$wreverse", "$xecute", "$zabs", "$zarccos", "$zarcsin", "$zarctan",
//"$zcos", "$zcot", "$zcsc", "$zdate", "$zdateh", "$zdatetime",
//"$zdatetimeh", "$zexp", "$zhex", "$zln", "$zlog", "$zpower", "$zsec",
//"$zsin", "$zsqr", "$ztan", "$ztime", "$ztimeh", "$zboolean",
//"$zconvert", "$zcrc", "$zcyc", "$zdascii", "$zdchar", "$zf",
//"$ziswide", "$zlascii", "$zlchar", "$zname", "$zposition", "$zqascii",
//"$zqchar", "$zsearch", "$zseek", "$zstrip", "$zwascii", "$zwchar",
//"$zwidth", "$zwpack", "$zwbpack", "$zwunpack", "$zwbunpack", "$zzenkaku",
//"$change", "$mv", "$mvat", "$mvfmt", "$mvfmts", "$mviconv",
//"$mviconvs", "$mvinmat", "$mvlover", "$mvoconv", "$mvoconvs", "$mvraise",
//"$mvtrans", "$mvv", "$mvname", "$zbitand", "$zbitcount", "$zbitfind",
//"$zbitget", "$zbitlen", "$zbitnot", "$zbitor", "$zbitset", "$zbitstr",
//"$zbitxor", "$zincrement", "$znext", "$zorder", "$zprevious", "$zsort",
//"device", "$ecode", "$estack", "$etrap", "$halt", "$horolog",
//"$io", "$job", "$key", "$namespace", "$principal", "$quit", "$roles",
//"$storage", "$system", "$test", "$this", "$tlevel", "$username",
//"$x", "$y", "$za", "$zb", "$zchild", "$zeof", "$zeos", "$zerror",
//"$zhorolog", "$zio", "$zjob", "$zmode", "$znspace", "$zparent", "$zpi",
//"$zpos", "$zreference", "$zstorage", "$ztimestamp", "$ztimezone",
//"$ztrap", "$zversion"
return {
case_insensitive: true,
aliases: ["cos", "cls"],
keywords: COS_KEYWORDS,
contains: [
NUMBERS,
STRINGS,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: "comment",
begin: /;/, end: "$",
relevance: 0
},
{ // Functions and user-defined functions: write $ztime(60*60*3), $$myFunc(10), $$^Val(1)
className: "built_in",
begin: /(?:\$\$?|\.\.)\^?[a-zA-Z]+/
},
{ // Macro command: quit $$$OK
className: "built_in",
begin: /\$\$\$[a-zA-Z]+/
},
{ // Special (global) variables: write %request.Content; Built-in classes: %Library.Integer
className: "built_in",
begin: /%[a-z]+(?:\.[a-z]+)*/
},
{ // Global variable: set ^globalName = 12 write ^globalName
className: "symbol",
begin: /\^%?[a-zA-Z][\w]*/
},
{ // Some control constructions: do ##class(Package.ClassName).Method(), ##super()
className: "keyword",
begin: /##class|##super|#define|#dim/
},
// sub-languages: are not fully supported by hljs by 11/15/2015
// left for the future implementation.
{
begin: /&sql\(/, end: /\)/,
excludeBegin: true, excludeEnd: true,
subLanguage: "sql"
},
{
begin: /&(js|jscript|javascript)</, end: />/,
excludeBegin: true, excludeEnd: true,
subLanguage: "javascript"
},
{
// this brakes first and last tag, but this is the only way to embed a valid html
begin: /&html<\s*</, end: />\s*>/,
subLanguage: "xml"
}
]
};
};
/***/ }),
/* 133 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var RESOURCES = 'primitive rsc_template';
var COMMANDS = 'group clone ms master location colocation order fencing_topology ' +
'rsc_ticket acl_target acl_group user role ' +
'tag xml';
var PROPERTY_SETS = 'property rsc_defaults op_defaults';
var KEYWORDS = 'params meta operations op rule attributes utilization';
var OPERATORS = 'read write deny defined not_defined in_range date spec in ' +
'ref reference attribute type xpath version and or lt gt tag ' +
'lte gte eq ne \\';
var TYPES = 'number string';
var LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false';
return {
aliases: ['crm', 'pcmk'],
case_insensitive: true,
keywords: {
keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES,
literal: LITERALS
},
contains: [
hljs.HASH_COMMENT_MODE,
{
beginKeywords: 'node',
starts: {
end: '\\s*([\\w_-]+:)?',
starts: {
className: 'title',
end: '\\s*[\\$\\w_][\\w_-]*'
}
}
},
{
beginKeywords: RESOURCES,
starts: {
className: 'title',
end: '\\s*[\\$\\w_][\\w_-]*',
starts: {
end: '\\s*@?[\\w_][\\w_\\.:-]*'
}
}
},
{
begin: '\\b(' + COMMANDS.split(' ').join('|') + ')\\s+',
keywords: COMMANDS,
starts: {
className: 'title',
end: '[\\$\\w_][\\w_-]*'
}
},
{
beginKeywords: PROPERTY_SETS,
starts: {
className: 'title',
end: '\\s*([\\w_-]+:)?'
}
},
hljs.QUOTE_STRING_MODE,
{
className: 'meta',
begin: '(ocf|systemd|service|lsb):[\\w_:-]+',
relevance: 0
},
{
className: 'number',
begin: '\\b\\d+(\\.\\d+)?(ms|s|h|m)?',
relevance: 0
},
{
className: 'literal',
begin: '[-]?(infinity|inf)',
relevance: 0
},
{
className: 'attr',
begin: /([A-Za-z\$_\#][\w_-]+)=/,
relevance: 0
},
{
className: 'tag',
begin: '</?',
end: '/?>',
relevance: 0
}
]
};
};
/***/ }),
/* 134 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var NUM_SUFFIX = '(_[uif](8|16|32|64))?';
var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\w*[!?=]?';
var RE_STARTER = '!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|' +
'>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?';
var CRYSTAL_KEYWORDS = {
keyword:
'abstract alias as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' +
'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' +
'return require select self sizeof struct super then type typeof union uninitialized unless until when while with yield ' +
'__DIR__ __END_LINE__ __FILE__ __LINE__',
literal: 'false nil true'
};
var SUBST = {
className: 'subst',
begin: '#{', end: '}',
keywords: CRYSTAL_KEYWORDS
};
var EXPANSION = {
className: 'template-variable',
variants: [
{begin: '\\{\\{', end: '\\}\\}'},
{begin: '\\{%', end: '%\\}'}
],
keywords: CRYSTAL_KEYWORDS
};
function recursiveParen(begin, end) {
var
contains = [{begin: begin, end: end}];
contains[0].contains = contains;
return contains;
}
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{begin: /'/, end: /'/},
{begin: /"/, end: /"/},
{begin: /`/, end: /`/},
{begin: '%w?\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
{begin: '%w?\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%w?{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%w?<', end: '>', contains: recursiveParen('<', '>')},
{begin: '%w?/', end: '/'},
{begin: '%w?%', end: '%'},
{begin: '%w?-', end: '-'},
{begin: '%w?\\|', end: '\\|'},
{begin: /<<-\w+$/, end: /^\s*\w+$/},
],
relevance: 0,
};
var Q_STRING = {
className: 'string',
variants: [
{begin: '%q\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
{begin: '%q\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%q{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%q<', end: '>', contains: recursiveParen('<', '>')},
{begin: '%q/', end: '/'},
{begin: '%q%', end: '%'},
{begin: '%q-', end: '-'},
{begin: '%q\\|', end: '\\|'},
{begin: /<<-'\w+'$/, end: /^\s*\w+$/},
],
relevance: 0,
};
var REGEXP = {
begin: '(' + RE_STARTER + ')\\s*',
contains: [
{
className: 'regexp',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{begin: '//[a-z]*', relevance: 0},
{begin: '/', end: '/[a-z]*'},
{begin: '%r\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
{begin: '%r\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%r{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%r<', end: '>', contains: recursiveParen('<', '>')},
{begin: '%r/', end: '/'},
{begin: '%r%', end: '%'},
{begin: '%r-', end: '-'},
{begin: '%r\\|', end: '\\|'},
]
}
],
relevance: 0
};
var REGEXP2 = {
className: 'regexp',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{begin: '%r\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
{begin: '%r\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%r{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%r<', end: '>', contains: recursiveParen('<', '>')},
{begin: '%r/', end: '/'},
{begin: '%r%', end: '%'},
{begin: '%r-', end: '-'},
{begin: '%r\\|', end: '\\|'},
],
relevance: 0
};
var ATTRIBUTE = {
className: 'meta',
begin: '@\\[', end: '\\]',
contains: [
hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'})
]
};
var CRYSTAL_DEFAULT_CONTAINS = [
EXPANSION,
STRING,
Q_STRING,
REGEXP,
REGEXP2,
ATTRIBUTE,
hljs.HASH_COMMENT_MODE,
{
className: 'class',
beginKeywords: 'class module struct', end: '$|;',
illegal: /=/,
contains: [
hljs.HASH_COMMENT_MODE,
hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'}),
{begin: '<'} // relevance booster for inheritance
]
},
{
className: 'class',
beginKeywords: 'lib enum union', end: '$|;',
illegal: /=/,
contains: [
hljs.HASH_COMMENT_MODE,
hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'}),
],
relevance: 10
},
{
className: 'function',
beginKeywords: 'def', end: /\B\b/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
begin: CRYSTAL_METHOD_RE,
endsParent: true
})
]
},
{
className: 'function',
beginKeywords: 'fun macro', end: /\B\b/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
begin: CRYSTAL_METHOD_RE,
endsParent: true
})
],
relevance: 5
},
{
className: 'symbol',
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
relevance: 0
},
{
className: 'symbol',
begin: ':',
contains: [STRING, {begin: CRYSTAL_METHOD_RE}],
relevance: 0
},
{
className: 'number',
variants: [
{ begin: '\\b0b([01_]*[01])' + NUM_SUFFIX },
{ begin: '\\b0o([0-7_]*[0-7])' + NUM_SUFFIX },
{ begin: '\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])' + NUM_SUFFIX },
{ begin: '\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)' + NUM_SUFFIX}
],
relevance: 0
}
];
SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;
EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION
return {
aliases: ['cr'],
lexemes: CRYSTAL_IDENT_RE,
keywords: CRYSTAL_KEYWORDS,
contains: CRYSTAL_DEFAULT_CONTAINS
};
};
/***/ }),
/* 135 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
// Normal keywords.
'abstract as base bool break byte case catch char checked const continue decimal ' +
'default delegate do double enum event explicit extern finally fixed float ' +
'for foreach goto if implicit in int interface internal is lock long nameof ' +
'object operator out override params private protected public readonly ref sbyte ' +
'sealed short sizeof stackalloc static string struct switch this try typeof ' +
'uint ulong unchecked unsafe ushort using virtual void volatile while ' +
// Contextual keywords.
'add alias ascending async await by descending dynamic equals from get global group into join ' +
'let on orderby partial remove select set value var where yield',
literal:
'null false true'
};
var VERBATIM_STRING = {
className: 'string',
begin: '@"', end: '"',
contains: [{begin: '""'}]
};
var VERBATIM_STRING_NO_LF = hljs.inherit(VERBATIM_STRING, {illegal: /\n/});
var SUBST = {
className: 'subst',
begin: '{', end: '}',
keywords: KEYWORDS
};
var SUBST_NO_LF = hljs.inherit(SUBST, {illegal: /\n/});
var INTERPOLATED_STRING = {
className: 'string',
begin: /\$"/, end: '"',
illegal: /\n/,
contains: [{begin: '{{'}, {begin: '}}'}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF]
};
var INTERPOLATED_VERBATIM_STRING = {
className: 'string',
begin: /\$@"/, end: '"',
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST]
};
var INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, {
illegal: /\n/,
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST_NO_LF]
});
SUBST.contains = [
INTERPOLATED_VERBATIM_STRING,
INTERPOLATED_STRING,
VERBATIM_STRING,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
];
SUBST_NO_LF.contains = [
INTERPOLATED_VERBATIM_STRING_NO_LF,
INTERPOLATED_STRING,
VERBATIM_STRING_NO_LF,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, {illegal: /\n/})
];
var STRING = {
variants: [
INTERPOLATED_VERBATIM_STRING,
INTERPOLATED_STRING,
VERBATIM_STRING,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
};
var TYPE_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '(\\s*,\\s*' + hljs.IDENT_RE + ')*>)?(\\[\\])?';
return {
aliases: ['csharp'],
keywords: KEYWORDS,
illegal: /::/,
contains: [
hljs.COMMENT(
'///',
'$',
{
returnBegin: true,
contains: [
{
className: 'doctag',
variants: [
{
begin: '///', relevance: 0
},
{
begin: '<!--|-->'
},
{
begin: '</?', end: '>'
}
]
}
]
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'meta',
begin: '#', end: '$',
keywords: {
'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum'
}
},
STRING,
hljs.C_NUMBER_MODE,
{
beginKeywords: 'class interface', end: /[{;=]/,
illegal: /[^\s:]/,
contains: [
hljs.TITLE_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
beginKeywords: 'namespace', end: /[{;=]/,
illegal: /[^\s:]/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: '[a-zA-Z](\\.?\\w)*'}),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
// [Attributes("")]
className: 'meta',
begin: '^\\s*\\[', excludeBegin: true, end: '\\]', excludeEnd: true,
contains: [
{className: 'meta-string', begin: /"/, end: /"/}
]
},
{
// Expression keywords prevent 'keyword Name(...)' from being
// recognized as a function definition
beginKeywords: 'new return throw await else',
relevance: 0
},
{
className: 'function',
begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
end: /[{;=]/, excludeEnd: true,
keywords: KEYWORDS,
contains: [
{
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
contains: [hljs.TITLE_MODE],
relevance: 0
},
{
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
relevance: 0,
contains: [
STRING,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}
]
};
};
/***/ }),
/* 136 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: false,
lexemes: '[a-zA-Z][a-zA-Z0-9_-]*',
keywords: {
keyword: 'base-uri child-src connect-src default-src font-src form-action' +
' frame-ancestors frame-src img-src media-src object-src plugin-types' +
' report-uri sandbox script-src style-src',
},
contains: [
{
className: 'string',
begin: "'", end: "'"
},
{
className: 'attribute',
begin: '^Content', end: ':', excludeEnd: true,
},
]
};
};
/***/ }),
/* 137 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
var RULE = {
begin: /[A-Z\_\.\-]+\s*:/, returnBegin: true, end: ';', endsWithParent: true,
contains: [
{
className: 'attribute',
begin: /\S/, end: ':', excludeEnd: true,
starts: {
endsWithParent: true, excludeEnd: true,
contains: [
{
begin: /[\w-]+\(/, returnBegin: true,
contains: [
{
className: 'built_in',
begin: /[\w-]+/
},
{
begin: /\(/, end: /\)/,
contains: [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
}
]
},
hljs.CSS_NUMBER_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'number', begin: '#[0-9A-Fa-f]+'
},
{
className: 'meta', begin: '!important'
}
]
}
}
]
};
return {
case_insensitive: true,
illegal: /[=\/|'\$]/,
contains: [
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'selector-id', begin: /#[A-Za-z0-9_-]+/
},
{
className: 'selector-class', begin: /\.[A-Za-z0-9_-]+/
},
{
className: 'selector-attr',
begin: /\[/, end: /\]/,
illegal: '$'
},
{
className: 'selector-pseudo',
begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/
},
{
begin: '@(font-face|page)',
lexemes: '[a-z-]+',
keywords: 'font-face page'
},
{
begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing
// because it doesnt let it to be parsed as
// a rule set but instead drops parser into
// the default mode which is how it should be.
illegal: /:/, // break on Less variables @var: ...
contains: [
{
className: 'keyword',
begin: /\w+/
},
{
begin: /\s/, endsWithParent: true, excludeEnd: true,
relevance: 0,
contains: [
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,
hljs.CSS_NUMBER_MODE
]
}
]
},
{
className: 'selector-tag', begin: IDENT_RE,
relevance: 0
},
{
begin: '{', end: '}',
illegal: /\S/,
contains: [
hljs.C_BLOCK_COMMENT_MODE,
RULE,
]
}
]
};
};
/***/ }),
/* 138 */
/***/ (function(module, exports) {
module.exports = /**
* Known issues:
*
* - invalid hex string literals will be recognized as a double quoted strings
* but 'x' at the beginning of string will not be matched
*
* - delimited string literals are not checked for matching end delimiter
* (not possible to do with js regexp)
*
* - content of token string is colored as a string (i.e. no keyword coloring inside a token string)
* also, content of token string is not validated to contain only valid D tokens
*
* - special token sequence rule is not strictly following D grammar (anything following #line
* up to the end of line is matched as special token sequence)
*/
function(hljs) {
/**
* Language keywords
*
* @type {Object}
*/
var D_KEYWORDS = {
keyword:
'abstract alias align asm assert auto body break byte case cast catch class ' +
'const continue debug default delete deprecated do else enum export extern final ' +
'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' +
'interface invariant is lazy macro mixin module new nothrow out override package ' +
'pragma private protected public pure ref return scope shared static struct ' +
'super switch synchronized template this throw try typedef typeid typeof union ' +
'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' +
'__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__',
built_in:
'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' +
'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' +
'wstring',
literal:
'false null true'
};
/**
* Number literal regexps
*
* @type {String}
*/
var decimal_integer_re = '(0|[1-9][\\d_]*)',
decimal_integer_nosus_re = '(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)',
binary_integer_re = '0[bB][01_]+',
hexadecimal_digits_re = '([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)',
hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re,
decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')',
decimal_float_re = '(' + decimal_integer_nosus_re + '(\\.\\d*|' + decimal_exponent_re + ')|' +
'\\d+\\.' + decimal_integer_nosus_re + decimal_integer_nosus_re + '|' +
'\\.' + decimal_integer_re + decimal_exponent_re + '?' +
')',
hexadecimal_float_re = '(0[xX](' +
hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|'+
'\\.?' + hexadecimal_digits_re +
')[pP][+-]?' + decimal_integer_nosus_re + ')',
integer_re = '(' +
decimal_integer_re + '|' +
binary_integer_re + '|' +
hexadecimal_integer_re +
')',
float_re = '(' +
hexadecimal_float_re + '|' +
decimal_float_re +
')';
/**
* Escape sequence supported in D string and character literals
*
* @type {String}
*/
var escape_sequence_re = '\\\\(' +
'[\'"\\?\\\\abfnrtv]|' + // common escapes
'u[\\dA-Fa-f]{4}|' + // four hex digit unicode codepoint
'[0-7]{1,3}|' + // one to three octal digit ascii char code
'x[\\dA-Fa-f]{2}|' + // two hex digit ascii char code
'U[\\dA-Fa-f]{8}' + // eight hex digit unicode codepoint
')|' +
'&[a-zA-Z\\d]{2,};'; // named character entity
/**
* D integer number literals
*
* @type {Object}
*/
var D_INTEGER_MODE = {
className: 'number',
begin: '\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?',
relevance: 0
};
/**
* [D_FLOAT_MODE description]
* @type {Object}
*/
var D_FLOAT_MODE = {
className: 'number',
begin: '\\b(' +
float_re + '([fF]|L|i|[fF]i|Li)?|' +
integer_re + '(i|[fF]i|Li)' +
')',
relevance: 0
};
/**
* D character literal
*
* @type {Object}
*/
var D_CHARACTER_MODE = {
className: 'string',
begin: '\'(' + escape_sequence_re + '|.)', end: '\'',
illegal: '.'
};
/**
* D string escape sequence
*
* @type {Object}
*/
var D_ESCAPE_SEQUENCE = {
begin: escape_sequence_re,
relevance: 0
};
/**
* D double quoted string literal
*
* @type {Object}
*/
var D_STRING_MODE = {
className: 'string',
begin: '"',
contains: [D_ESCAPE_SEQUENCE],
end: '"[cwd]?'
};
/**
* D wysiwyg and delimited string literals
*
* @type {Object}
*/
var D_WYSIWYG_DELIMITED_STRING_MODE = {
className: 'string',
begin: '[rq]"',
end: '"[cwd]?',
relevance: 5
};
/**
* D alternate wysiwyg string literal
*
* @type {Object}
*/
var D_ALTERNATE_WYSIWYG_STRING_MODE = {
className: 'string',
begin: '`',
end: '`[cwd]?'
};
/**
* D hexadecimal string literal
*
* @type {Object}
*/
var D_HEX_STRING_MODE = {
className: 'string',
begin: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',
relevance: 10
};
/**
* D delimited string literal
*
* @type {Object}
*/
var D_TOKEN_STRING_MODE = {
className: 'string',
begin: 'q"\\{',
end: '\\}"'
};
/**
* Hashbang support
*
* @type {Object}
*/
var D_HASHBANG_MODE = {
className: 'meta',
begin: '^#!',
end: '$',
relevance: 5
};
/**
* D special token sequence
*
* @type {Object}
*/
var D_SPECIAL_TOKEN_SEQUENCE_MODE = {
className: 'meta',
begin: '#(line)',
end: '$',
relevance: 5
};
/**
* D attributes
*
* @type {Object}
*/
var D_ATTRIBUTE_MODE = {
className: 'keyword',
begin: '@[a-zA-Z_][a-zA-Z_\\d]*'
};
/**
* D nesting comment
*
* @type {Object}
*/
var D_NESTING_COMMENT_MODE = hljs.COMMENT(
'\\/\\+',
'\\+\\/',
{
contains: ['self'],
relevance: 10
}
);
return {
lexemes: hljs.UNDERSCORE_IDENT_RE,
keywords: D_KEYWORDS,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
D_NESTING_COMMENT_MODE,
D_HEX_STRING_MODE,
D_STRING_MODE,
D_WYSIWYG_DELIMITED_STRING_MODE,
D_ALTERNATE_WYSIWYG_STRING_MODE,
D_TOKEN_STRING_MODE,
D_FLOAT_MODE,
D_INTEGER_MODE,
D_CHARACTER_MODE,
D_HASHBANG_MODE,
D_SPECIAL_TOKEN_SEQUENCE_MODE,
D_ATTRIBUTE_MODE
]
};
};
/***/ }),
/* 139 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['md', 'mkdown', 'mkd'],
contains: [
// highlight headers
{
className: 'section',
variants: [
{ begin: '^#{1,6}', end: '$' },
{ begin: '^.+?\\n[=-]{2,}$' }
]
},
// inline html
{
begin: '<', end: '>',
subLanguage: 'xml',
relevance: 0
},
// lists (indicators only)
{
className: 'bullet',
begin: '^([*+-]|(\\d+\\.))\\s+'
},
// strong segments
{
className: 'strong',
begin: '[*_]{2}.+?[*_]{2}'
},
// emphasis segments
{
className: 'emphasis',
variants: [
{ begin: '\\*.+?\\*' },
{ begin: '_.+?_'
, relevance: 0
}
]
},
// blockquotes
{
className: 'quote',
begin: '^>\\s+', end: '$'
},
// code snippets
{
className: 'code',
variants: [
{
begin: '^```\w*\s*$', end: '^```\s*$'
},
{
begin: '`.+?`'
},
{
begin: '^( {4}|\t)', end: '$',
relevance: 0
}
]
},
// horizontal rules
{
begin: '^[-\\*]{3,}', end: '$'
},
// using links - title and link
{
begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]',
returnBegin: true,
contains: [
{
className: 'string',
begin: '\\[', end: '\\]',
excludeBegin: true,
returnEnd: true,
relevance: 0
},
{
className: 'link',
begin: '\\]\\(', end: '\\)',
excludeBegin: true, excludeEnd: true
},
{
className: 'symbol',
begin: '\\]\\[', end: '\\]',
excludeBegin: true, excludeEnd: true
}
],
relevance: 10
},
{
begin: /^\[[^\n]+\]:/,
returnBegin: true,
contains: [
{
className: 'symbol',
begin: /\[/, end: /\]/,
excludeBegin: true, excludeEnd: true
},
{
className: 'link',
begin: /:\s*/, end: /$/,
excludeBegin: true
}
]
}
]
};
};
/***/ }),
/* 140 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
var SUBST = {
className: 'subst',
begin: '\\$\\{', end: '}',
keywords: 'true false null this is new super'
};
var STRING = {
className: 'string',
variants: [
{
begin: 'r\'\'\'', end: '\'\'\''
},
{
begin: 'r"""', end: '"""'
},
{
begin: 'r\'', end: '\'',
illegal: '\\n'
},
{
begin: 'r"', end: '"',
illegal: '\\n'
},
{
begin: '\'\'\'', end: '\'\'\'',
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
},
{
begin: '"""', end: '"""',
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
},
{
begin: '\'', end: '\'',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
},
{
begin: '"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
}
]
};
SUBST.contains = [
hljs.C_NUMBER_MODE, STRING
];
var KEYWORDS = {
keyword: 'assert async await break case catch class const continue default do else enum extends false final ' +
'finally for if in is new null rethrow return super switch sync this throw true try var void while with yield ' +
'abstract as dynamic export external factory get implements import library operator part set static typedef',
built_in:
// dart:core
'print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set ' +
'Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num ' +
// dart:html
'document window querySelector querySelectorAll Element ElementList'
};
return {
keywords: KEYWORDS,
contains: [
STRING,
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
subLanguage: 'markdown'
}
),
hljs.COMMENT(
'///',
'$',
{
subLanguage: 'markdown'
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
contains: [
{
beginKeywords: 'extends implements'
},
hljs.UNDERSCORE_TITLE_MODE
]
},
hljs.C_NUMBER_MODE,
{
className: 'meta', begin: '@[A-Za-z]+'
},
{
begin: '=>' // No markup, just a relevance booster
}
]
}
};
/***/ }),
/* 141 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS =
'exports register file shl array record property for mod while set ally label uses raise not ' +
'stored class safecall var interface or private static exit index inherited to else stdcall ' +
'override shr asm far resourcestring finalization packed virtual out and protected library do ' +
'xorwrite goto near function end div overload object unit begin string on inline repeat until ' +
'destructor write message program with read initialization except default nil if case cdecl in ' +
'downto threadvar of try pascal const external constructor type public then implementation ' +
'finally published procedure absolute reintroduce operator as is abstract alias assembler ' +
'bitpacked break continue cppdecl cvar enumerator experimental platform deprecated ' +
'unimplemented dynamic export far16 forward generic helper implements interrupt iochecks ' +
'local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat ' +
'specialize strict unaligned varargs ';
var COMMENT_MODES = [
hljs.C_LINE_COMMENT_MODE,
hljs.COMMENT(/\{/, /\}/, {relevance: 0}),
hljs.COMMENT(/\(\*/, /\*\)/, {relevance: 10})
];
var DIRECTIVE = {
className: 'meta',
variants: [
{begin: /\{\$/, end: /\}/},
{begin: /\(\*\$/, end: /\*\)/}
]
};
var STRING = {
className: 'string',
begin: /'/, end: /'/,
contains: [{begin: /''/}]
};
var CHAR_STRING = {
className: 'string', begin: /(#\d+)+/
};
var CLASS = {
begin: hljs.IDENT_RE + '\\s*=\\s*class\\s*\\(', returnBegin: true,
contains: [
hljs.TITLE_MODE
]
};
var FUNCTION = {
className: 'function',
beginKeywords: 'function constructor destructor procedure', end: /[:;]/,
keywords: 'function constructor|10 destructor|10 procedure|10',
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
contains: [STRING, CHAR_STRING, DIRECTIVE].concat(COMMENT_MODES)
},
DIRECTIVE
].concat(COMMENT_MODES)
};
return {
aliases: ['dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm'],
case_insensitive: true,
keywords: KEYWORDS,
illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
contains: [
STRING, CHAR_STRING,
hljs.NUMBER_MODE,
CLASS,
FUNCTION,
DIRECTIVE
].concat(COMMENT_MODES)
};
};
/***/ }),
/* 142 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['patch'],
contains: [
{
className: 'meta',
relevance: 10,
variants: [
{begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},
{begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/},
{begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/}
]
},
{
className: 'comment',
variants: [
{begin: /Index: /, end: /$/},
{begin: /={3,}/, end: /$/},
{begin: /^\-{3}/, end: /$/},
{begin: /^\*{3} /, end: /$/},
{begin: /^\+{3}/, end: /$/},
{begin: /\*{5}/, end: /\*{5}$/}
]
},
{
className: 'addition',
begin: '^\\+', end: '$'
},
{
className: 'deletion',
begin: '^\\-', end: '$'
},
{
className: 'addition',
begin: '^\\!', end: '$'
}
]
};
};
/***/ }),
/* 143 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var FILTER = {
begin: /\|[A-Za-z]+:?/,
keywords: {
name:
'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' +
'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' +
'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' +
'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' +
'dictsortreversed default_if_none pluralize lower join center default ' +
'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' +
'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' +
'localtime utc timezone'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE
]
};
return {
aliases: ['jinja'],
case_insensitive: true,
subLanguage: 'xml',
contains: [
hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/),
hljs.COMMENT(/\{#/, /#}/),
{
className: 'template-tag',
begin: /\{%/, end: /%}/,
contains: [
{
className: 'name',
begin: /\w+/,
keywords: {
name:
'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' +
'endfor ifnotequal endifnotequal widthratio extends include spaceless ' +
'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' +
'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' +
'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' +
'plural get_current_language language get_available_languages ' +
'get_current_language_bidi get_language_info get_language_info_list localize ' +
'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' +
'verbatim'
},
starts: {
endsWithParent: true,
keywords: 'in by as',
contains: [FILTER],
relevance: 0
}
}
]
},
{
className: 'template-variable',
begin: /\{\{/, end: /}}/,
contains: [FILTER]
}
]
};
};
/***/ }),
/* 144 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['bind', 'zone'],
keywords: {
keyword:
'IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX ' +
'LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT'
},
contains: [
hljs.COMMENT(';', '$', {relevance: 0}),
{
className: 'meta',
begin: /^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/
},
// IPv6
{
className: 'number',
begin: '((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b'
},
// IPv4
{
className: 'number',
begin: '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b'
},
hljs.inherit(hljs.NUMBER_MODE, {begin: /\b\d+[dhwm]?/})
]
};
};
/***/ }),
/* 145 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['docker'],
case_insensitive: true,
keywords: 'from maintainer expose env arg user onbuild stopsignal',
contains: [
hljs.HASH_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
{
beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck shell',
starts: {
end: /[^\\]\n/,
subLanguage: 'bash'
}
}
],
illegal: '</'
}
};
/***/ }),
/* 146 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMENT = hljs.COMMENT(
/^\s*@?rem\b/, /$/,
{
relevance: 10
}
);
var LABEL = {
className: 'symbol',
begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
relevance: 0
};
return {
aliases: ['bat', 'cmd'],
case_insensitive: true,
illegal: /\/\*/,
keywords: {
keyword:
'if else goto for in do call exit not exist errorlevel defined ' +
'equ neq lss leq gtr geq',
built_in:
'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux ' +
'shift cd dir echo setlocal endlocal set pause copy ' +
'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' +
'comp compact convert date dir diskcomp diskcopy doskey erase fs ' +
'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' +
'pause print popd pushd promt rd recover rem rename replace restore rmdir shift' +
'sort start subst time title tree type ver verify vol ' +
// winutils
'ping net ipconfig taskkill xcopy ren del'
},
contains: [
{
className: 'variable', begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/
},
{
className: 'function',
begin: LABEL.begin, end: 'goto:eof',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}),
COMMENT
]
},
{
className: 'number', begin: '\\b\\d+',
relevance: 0
},
COMMENT
]
};
};
/***/ }),
/* 147 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var QUOTED_PROPERTY = {
className: 'string',
begin: /"/, end: /"/
};
var APOS_PROPERTY = {
className: 'string',
begin: /'/, end: /'/
};
var UNQUOTED_PROPERTY = {
className: 'string',
begin: '[\\w-?]+:\\w+', end: '\\W',
relevance: 0
};
var VALUELESS_PROPERTY = {
className: 'string',
begin: '\\w+-?\\w+', end: '\\W',
relevance: 0
};
return {
keywords: 'dsconfig',
contains: [
{
className: 'keyword',
begin: '^dsconfig', end: '\\s', excludeEnd: true,
relevance: 10
},
{
className: 'built_in',
begin: '(list|create|get|set|delete)-(\\w+)', end: '\\s', excludeEnd: true,
illegal: '!@#$%^&*()',
relevance: 10
},
{
className: 'built_in',
begin: '--(\\w+)', end: '\\s', excludeEnd: true
},
QUOTED_PROPERTY,
APOS_PROPERTY,
UNQUOTED_PROPERTY,
VALUELESS_PROPERTY,
hljs.HASH_COMMENT_MODE
]
};
};
/***/ }),
/* 148 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var STRINGS = {
className: 'string',
variants: [
hljs.inherit(hljs.QUOTE_STRING_MODE, { begin: '((u8?|U)|L)?"' }),
{
begin: '(u8?|U)?R"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '\'\\\\?.', end: '\'',
illegal: '.'
}
]
};
var NUMBERS = {
className: 'number',
variants: [
{ begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
};
var PREPROCESSOR = {
className: 'meta',
begin: '#', end: '$',
keywords: {'meta-keyword': 'if else elif endif define undef ifdef ifndef'},
contains: [
{
begin: /\\\n/, relevance: 0
},
{
beginKeywords: 'include', end: '$',
keywords: {'meta-keyword': 'include'},
contains: [
hljs.inherit(STRINGS, {className: 'meta-string'}),
{
className: 'meta-string',
begin: '<', end: '>',
illegal: '\\n'
}
]
},
STRINGS,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var DTS_REFERENCE = {
className: 'variable',
begin: '\\&[a-z\\d_]*\\b'
};
var DTS_KEYWORD = {
className: 'meta-keyword',
begin: '/[a-z][a-z\\d-]*/'
};
var DTS_LABEL = {
className: 'symbol',
begin: '^\\s*[a-zA-Z_][a-zA-Z\\d_]*:'
};
var DTS_CELL_PROPERTY = {
className: 'params',
begin: '<',
end: '>',
contains: [
NUMBERS,
DTS_REFERENCE
]
};
var DTS_NODE = {
className: 'class',
begin: /[a-zA-Z_][a-zA-Z\d_@]*\s{/,
end: /[{;=]/,
returnBegin: true,
excludeEnd: true
};
var DTS_ROOT_NODE = {
className: 'class',
begin: '/\\s*{',
end: '};',
relevance: 10,
contains: [
DTS_REFERENCE,
DTS_KEYWORD,
DTS_LABEL,
DTS_NODE,
DTS_CELL_PROPERTY,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS
]
};
return {
keywords: "",
contains: [
DTS_ROOT_NODE,
DTS_REFERENCE,
DTS_KEYWORD,
DTS_LABEL,
DTS_NODE,
DTS_CELL_PROPERTY,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS,
PREPROCESSOR,
{
begin: hljs.IDENT_RE + '::',
keywords: ""
}
]
};
};
/***/ }),
/* 149 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep';
return {
aliases: ['dst'],
case_insensitive: true,
subLanguage: 'xml',
contains: [
{
className: 'template-tag',
begin: /\{[#\/]/, end: /\}/, illegal: /;/,
contains: [
{
className: 'name',
begin: /[a-zA-Z\.-]+/,
starts: {
endsWithParent: true, relevance: 0,
contains: [
hljs.QUOTE_STRING_MODE
]
}
}
]
},
{
className: 'template-variable',
begin: /\{/, end: /\}/, illegal: /;/,
keywords: EXPRESSION_KEYWORDS
}
]
};
};
/***/ }),
/* 150 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var commentMode = hljs.COMMENT(/\(\*/, /\*\)/);
var nonTerminalMode = {
className: "attribute",
begin: /^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/
};
var specialSequenceMode = {
className: "meta",
begin: /\?.*\?/
};
var ruleBodyMode = {
begin: /=/, end: /;/,
contains: [
commentMode,
specialSequenceMode,
// terminals
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE
]
};
return {
illegal: /\S/,
contains: [
commentMode,
nonTerminalMode,
ruleBodyMode
]
};
};
/***/ }),
/* 151 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?';
var ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var ELIXIR_KEYWORDS =
'and false then defined module in return redo retry end for true self when ' +
'next until do begin unless nil break not case cond alias while ensure or ' +
'include use alias fn quote';
var SUBST = {
className: 'subst',
begin: '#\\{', end: '}',
lexemes: ELIXIR_IDENT_RE,
keywords: ELIXIR_KEYWORDS
};
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{
begin: /'/, end: /'/
},
{
begin: /"/, end: /"/
}
]
};
var FUNCTION = {
className: 'function',
beginKeywords: 'def defp defmacro', end: /\B\b/, // the mode is ended by the title
contains: [
hljs.inherit(hljs.TITLE_MODE, {
begin: ELIXIR_IDENT_RE,
endsParent: true
})
]
};
var CLASS = hljs.inherit(FUNCTION, {
className: 'class',
beginKeywords: 'defimpl defmodule defprotocol defrecord', end: /\bdo\b|$|;/
});
var ELIXIR_DEFAULT_CONTAINS = [
STRING,
hljs.HASH_COMMENT_MODE,
CLASS,
FUNCTION,
{
className: 'symbol',
begin: ':(?!\\s)',
contains: [STRING, {begin: ELIXIR_METHOD_RE}],
relevance: 0
},
{
className: 'symbol',
begin: ELIXIR_IDENT_RE + ':',
relevance: 0
},
{
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
},
{
className: 'variable',
begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))'
},
{
begin: '->'
},
{ // regexp container
begin: '(' + hljs.RE_STARTERS_RE + ')\\s*',
contains: [
hljs.HASH_COMMENT_MODE,
{
className: 'regexp',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{
begin: '/', end: '/[a-z]*'
},
{
begin: '%r\\[', end: '\\][a-z]*'
}
]
}
],
relevance: 0
}
];
SUBST.contains = ELIXIR_DEFAULT_CONTAINS;
return {
lexemes: ELIXIR_IDENT_RE,
keywords: ELIXIR_KEYWORDS,
contains: ELIXIR_DEFAULT_CONTAINS
};
};
/***/ }),
/* 152 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMENT = {
variants: [
hljs.COMMENT('--', '$'),
hljs.COMMENT(
'{-',
'-}',
{
contains: ['self']
}
)
]
};
var CONSTRUCTOR = {
className: 'type',
begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix).
relevance: 0
};
var LIST = {
begin: '\\(', end: '\\)',
illegal: '"',
contains: [
{className: 'type', begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'},
COMMENT
]
};
var RECORD = {
begin: '{', end: '}',
contains: LIST.contains
};
return {
keywords:
'let in if then else case of where module import exposing ' +
'type alias as infix infixl infixr port effect command subscription',
contains: [
// Top-level constructions.
{
beginKeywords: 'port effect module', end: 'exposing',
keywords: 'port effect module where command subscription exposing',
contains: [LIST, COMMENT],
illegal: '\\W\\.|;'
},
{
begin: 'import', end: '$',
keywords: 'import as exposing',
contains: [LIST, COMMENT],
illegal: '\\W\\.|;'
},
{
begin: 'type', end: '$',
keywords: 'type alias',
contains: [CONSTRUCTOR, LIST, RECORD, COMMENT]
},
{
beginKeywords: 'infix infixl infixr', end: '$',
contains: [hljs.C_NUMBER_MODE, COMMENT]
},
{
begin: 'port', end: '$',
keywords: 'port',
contains: [COMMENT]
},
// Literals and names.
// TODO: characters.
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
CONSTRUCTOR,
hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\w\']*'}),
COMMENT,
{begin: '->|<-'} // No markup, relevance booster
],
illegal: /;/
};
};
/***/ }),
/* 153 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var RUBY_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var RUBY_KEYWORDS = {
keyword:
'and then defined module in return redo if BEGIN retry end for self when ' +
'next until do begin unless END rescue else break undef not super class case ' +
'require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor',
literal:
'true false nil'
};
var YARDOCTAG = {
className: 'doctag',
begin: '@[A-Za-z]+'
};
var IRB_OBJECT = {
begin: '#<', end: '>'
};
var COMMENT_MODES = [
hljs.COMMENT(
'#',
'$',
{
contains: [YARDOCTAG]
}
),
hljs.COMMENT(
'^\\=begin',
'^\\=end',
{
contains: [YARDOCTAG],
relevance: 10
}
),
hljs.COMMENT('^__END__', '\\n$')
];
var SUBST = {
className: 'subst',
begin: '#\\{', end: '}',
keywords: RUBY_KEYWORDS
};
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
variants: [
{begin: /'/, end: /'/},
{begin: /"/, end: /"/},
{begin: /`/, end: /`/},
{begin: '%[qQwWx]?\\(', end: '\\)'},
{begin: '%[qQwWx]?\\[', end: '\\]'},
{begin: '%[qQwWx]?{', end: '}'},
{begin: '%[qQwWx]?<', end: '>'},
{begin: '%[qQwWx]?/', end: '/'},
{begin: '%[qQwWx]?%', end: '%'},
{begin: '%[qQwWx]?-', end: '-'},
{begin: '%[qQwWx]?\\|', end: '\\|'},
{
// \B in the beginning suppresses recognition of ?-sequences where ?
// is the last character of a preceding identifier, as in: `func?4`
begin: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/
},
{
begin: /<<(-?)\w+$/, end: /^\s*\w+$/,
}
]
};
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)', endsParent: true,
keywords: RUBY_KEYWORDS
};
var RUBY_DEFAULT_CONTAINS = [
STRING,
IRB_OBJECT,
{
className: 'class',
beginKeywords: 'class module', end: '$|;',
illegal: /=/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'}),
{
begin: '<\\s*',
contains: [{
begin: '(' + hljs.IDENT_RE + '::)?' + hljs.IDENT_RE
}]
}
].concat(COMMENT_MODES)
},
{
className: 'function',
beginKeywords: 'def', end: '$|;',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: RUBY_METHOD_RE}),
PARAMS
].concat(COMMENT_MODES)
},
{
// swallow namespace qualifiers before symbols
begin: hljs.IDENT_RE + '::'
},
{
className: 'symbol',
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
relevance: 0
},
{
className: 'symbol',
begin: ':(?!\\s)',
contains: [STRING, {begin: RUBY_METHOD_RE}],
relevance: 0
},
{
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
},
{
begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' // variables
},
{
className: 'params',
begin: /\|/, end: /\|/,
keywords: RUBY_KEYWORDS
},
{ // regexp container
begin: '(' + hljs.RE_STARTERS_RE + '|unless)\\s*',
keywords: 'unless',
contains: [
IRB_OBJECT,
{
className: 'regexp',
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
illegal: /\n/,
variants: [
{begin: '/', end: '/[a-z]*'},
{begin: '%r{', end: '}[a-z]*'},
{begin: '%r\\(', end: '\\)[a-z]*'},
{begin: '%r!', end: '![a-z]*'},
{begin: '%r\\[', end: '\\][a-z]*'}
]
}
].concat(COMMENT_MODES),
relevance: 0
}
].concat(COMMENT_MODES);
SUBST.contains = RUBY_DEFAULT_CONTAINS;
PARAMS.contains = RUBY_DEFAULT_CONTAINS;
var SIMPLE_PROMPT = "[>?]>";
var DEFAULT_PROMPT = "[\\w#]+\\(\\w+\\):\\d+:\\d+>";
var RVM_PROMPT = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>";
var IRB_DEFAULT = [
{
begin: /^\s*=>/,
starts: {
end: '$', contains: RUBY_DEFAULT_CONTAINS
}
},
{
className: 'meta',
begin: '^('+SIMPLE_PROMPT+"|"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')',
starts: {
end: '$', contains: RUBY_DEFAULT_CONTAINS
}
}
];
return {
aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'],
keywords: RUBY_KEYWORDS,
illegal: /\/\*/,
contains: COMMENT_MODES.concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS)
};
};
/***/ }),
/* 154 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
subLanguage: 'xml',
contains: [
hljs.COMMENT('<%#', '%>'),
{
begin: '<%[%=-]?', end: '[%-]?%>',
subLanguage: 'ruby',
excludeBegin: true,
excludeEnd: true
}
]
};
};
/***/ }),
/* 155 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
built_in:
'spawn spawn_link self',
keyword:
'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +
'let not of or orelse|10 query receive rem try when xor'
},
contains: [
{
className: 'meta', begin: '^[0-9]+> ',
relevance: 10
},
hljs.COMMENT('%', '$'),
{
className: 'number',
begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)',
relevance: 0
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
begin: '\\?(::)?([A-Z]\\w*(::)?)+'
},
{
begin: '->'
},
{
begin: 'ok'
},
{
begin: '!'
},
{
begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)',
relevance: 0
},
{
begin: '[A-Z][a-zA-Z0-9_\']*',
relevance: 0
}
]
};
};
/***/ }),
/* 156 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BASIC_ATOM_RE = '[a-z\'][a-zA-Z0-9_\']*';
var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';
var ERLANG_RESERVED = {
keyword:
'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +
'let not of orelse|10 query receive rem try when xor',
literal:
'false true'
};
var COMMENT = hljs.COMMENT('%', '$');
var NUMBER = {
className: 'number',
begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)',
relevance: 0
};
var NAMED_FUN = {
begin: 'fun\\s+' + BASIC_ATOM_RE + '/\\d+'
};
var FUNCTION_CALL = {
begin: FUNCTION_NAME_RE + '\\(', end: '\\)',
returnBegin: true,
relevance: 0,
contains: [
{
begin: FUNCTION_NAME_RE, relevance: 0
},
{
begin: '\\(', end: '\\)', endsWithParent: true,
returnEnd: true,
relevance: 0
// "contains" defined later
}
]
};
var TUPLE = {
begin: '{', end: '}',
relevance: 0
// "contains" defined later
};
var VAR1 = {
begin: '\\b_([A-Z][A-Za-z0-9_]*)?',
relevance: 0
};
var VAR2 = {
begin: '[A-Z][a-zA-Z0-9_]*',
relevance: 0
};
var RECORD_ACCESS = {
begin: '#' + hljs.UNDERSCORE_IDENT_RE,
relevance: 0,
returnBegin: true,
contains: [
{
begin: '#' + hljs.UNDERSCORE_IDENT_RE,
relevance: 0
},
{
begin: '{', end: '}',
relevance: 0
// "contains" defined later
}
]
};
var BLOCK_STATEMENTS = {
beginKeywords: 'fun receive if try case', end: 'end',
keywords: ERLANG_RESERVED
};
BLOCK_STATEMENTS.contains = [
COMMENT,
NAMED_FUN,
hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}),
BLOCK_STATEMENTS,
FUNCTION_CALL,
hljs.QUOTE_STRING_MODE,
NUMBER,
TUPLE,
VAR1, VAR2,
RECORD_ACCESS
];
var BASIC_MODES = [
COMMENT,
NAMED_FUN,
BLOCK_STATEMENTS,
FUNCTION_CALL,
hljs.QUOTE_STRING_MODE,
NUMBER,
TUPLE,
VAR1, VAR2,
RECORD_ACCESS
];
FUNCTION_CALL.contains[1].contains = BASIC_MODES;
TUPLE.contains = BASIC_MODES;
RECORD_ACCESS.contains[1].contains = BASIC_MODES;
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)',
contains: BASIC_MODES
};
return {
aliases: ['erl'],
keywords: ERLANG_RESERVED,
illegal: '(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))',
contains: [
{
className: 'function',
begin: '^' + BASIC_ATOM_RE + '\\s*\\(', end: '->',
returnBegin: true,
illegal: '\\(|#|//|/\\*|\\\\|:|;',
contains: [
PARAMS,
hljs.inherit(hljs.TITLE_MODE, {begin: BASIC_ATOM_RE})
],
starts: {
end: ';|\\.',
keywords: ERLANG_RESERVED,
contains: BASIC_MODES
}
},
COMMENT,
{
begin: '^-', end: '\\.',
relevance: 0,
excludeEnd: true,
returnBegin: true,
lexemes: '-' + hljs.IDENT_RE,
keywords:
'-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' +
'-import -include -include_lib -compile -define -else -endif -file -behaviour ' +
'-behavior -spec',
contains: [PARAMS]
},
NUMBER,
hljs.QUOTE_STRING_MODE,
RECORD_ACCESS,
VAR1, VAR2,
TUPLE,
{begin: /\.$/} // relevance booster
]
};
};
/***/ }),
/* 157 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['xlsx', 'xls'],
case_insensitive: true,
lexemes: /[a-zA-Z][\w\.]*/,
// built-in functions imported from https://web.archive.org/web/20160513042710/https://support.office.com/en-us/article/Excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188
keywords: {
built_in: 'ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST'
},
contains: [
{
/* matches a beginning equal sign found in Excel formula examples */
begin: /^=/,
end: /[^=]/, returnEnd: true, illegal: /=/, /* only allow single equal sign at front of line */
relevance: 10
},
/* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */
{
/* matches a reference to a single cell */
className: 'symbol',
begin: /\b[A-Z]{1,2}\d+\b/,
end: /[^\d]/, excludeEnd: true,
relevance: 0
},
{
/* matches a reference to a range of cells */
className: 'symbol',
begin: /[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,
relevance: 0
},
hljs.BACKSLASH_ESCAPE,
hljs.QUOTE_STRING_MODE,
{
className: 'number',
begin: hljs.NUMBER_RE + '(%)?',
relevance: 0
},
/* Excel formula comments are done by putting the comment in a function call to N() */
hljs.COMMENT(/\bN\(/,/\)/,
{
excludeBegin: true,
excludeEnd: true,
illegal: /\n/
})
]
};
};
/***/ }),
/* 158 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
{
begin: /[^\u2401\u0001]+/,
end: /[\u2401\u0001]/,
excludeEnd: true,
returnBegin: true,
returnEnd: false,
contains: [
{
begin: /([^\u2401\u0001=]+)/,
end: /=([^\u2401\u0001=]+)/,
returnEnd: true,
returnBegin: false,
className: 'attr'
},
{
begin: /=/,
end: /([\u2401\u0001])/,
excludeEnd: true,
excludeBegin: true,
className: 'string'
}]
}],
case_insensitive: true
};
};
/***/ }),
/* 159 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
var CHAR = {
className: 'string',
begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
};
var STRING = {
className: 'string',
variants: [
{
begin: '"', end: '"'
}
]
};
var NAME = {
className: 'title',
begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/
};
var METHOD = {
className: 'function',
beginKeywords: 'def',
end: /[:={\[(\n;]/,
excludeEnd: true,
contains: [NAME]
};
return {
keywords: {
literal: 'true false',
keyword: 'case class def else enum if impl import in lat rel index let match namespace switch type yield with'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
CHAR,
STRING,
METHOD,
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 160 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)'
};
var F_KEYWORDS = {
literal: '.False. .True.',
keyword: 'kind do while private call intrinsic where elsewhere ' +
'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +
'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +
'goto save else use module select case ' +
'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +
'continue format pause cycle exit ' +
'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +
'synchronous nopass non_overridable pass protected volatile abstract extends import ' +
'non_intrinsic value deferred generic final enumerator class associate bind enum ' +
'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +
'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +
'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +
'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' +
'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +
'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +
'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +
'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +
'integer real character complex logical dimension allocatable|10 parameter ' +
'external implicit|10 none double precision assign intent optional pointer ' +
'target in out common equivalence data',
built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +
'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +
'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +
'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +
'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +
'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +
'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +
'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +
'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +
'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +
'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +
'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +
'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +
'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of' +
'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +
'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +
'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +
'num_images parity popcnt poppar shifta shiftl shiftr this_image'
};
return {
case_insensitive: true,
aliases: ['f90', 'f95'],
keywords: F_KEYWORDS,
illegal: /\/\*/,
contains: [
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}),
{
className: 'function',
beginKeywords: 'subroutine function program',
illegal: '[${=\\n]',
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
},
hljs.COMMENT('!', '$', {relevance: 0}),
{
className: 'number',
begin: '(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?',
relevance: 0
}
]
};
};
/***/ }),
/* 161 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var TYPEPARAM = {
begin: '<', end: '>',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/})
]
};
return {
aliases: ['fs'],
keywords:
'abstract and as assert base begin class default delegate do done ' +
'downcast downto elif else end exception extern false finally for ' +
'fun function global if in inherit inline interface internal lazy let ' +
'match member module mutable namespace new null of open or ' +
'override private public rec return sig static struct then to ' +
'true try type upcast use val void when while with yield',
illegal: /\/\*/,
contains: [
{
// monad builder keywords (matches before non-bang kws)
className: 'keyword',
begin: /\b(yield|return|let|do)!/
},
{
className: 'string',
begin: '@"', end: '"',
contains: [{begin: '""'}]
},
{
className: 'string',
begin: '"""', end: '"""'
},
hljs.COMMENT('\\(\\*', '\\*\\)'),
{
className: 'class',
beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
contains: [
hljs.UNDERSCORE_TITLE_MODE,
TYPEPARAM
]
},
{
className: 'meta',
begin: '\\[<', end: '>\\]',
relevance: 10
},
{
className: 'symbol',
begin: '\\B(\'[A-Za-z])\\b',
contains: [hljs.BACKSLASH_ESCAPE]
},
hljs.C_LINE_COMMENT_MODE,
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 162 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
var KEYWORDS = {
'keyword':
'abort acronym acronyms alias all and assign binary card diag display ' +
'else eq file files for free ge gt if integer le loop lt maximizing ' +
'minimizing model models ne negative no not option options or ord ' +
'positive prod put putpage puttl repeat sameas semicont semiint smax ' +
'smin solve sos1 sos2 sum system table then until using while xor yes',
'literal': 'eps inf na',
'built-in':
'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy ' +
'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact ' +
'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max ' +
'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power ' +
'randBinomial randLinear randTriangle round rPower sigmoid sign ' +
'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt ' +
'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp ' +
'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt ' +
'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear ' +
'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion ' +
'handleCollect handleDelete handleStatus handleSubmit heapFree ' +
'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate ' +
'licenseLevel licenseStatus maxExecError sleep timeClose timeComp ' +
'timeElapsed timeExec timeStart'
};
var PARAMS = {
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
};
var SYMBOLS = {
className: 'symbol',
variants: [
{begin: /\=[lgenxc]=/},
{begin: /\$/},
]
};
var QSTR = { // One-line quoted comment string
className: 'comment',
variants: [
{begin: '\'', end: '\''},
{begin: '"', end: '"'},
],
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
};
var ASSIGNMENT = {
begin: '/',
end: '/',
keywords: KEYWORDS,
contains: [
QSTR,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_NUMBER_MODE,
],
};
var DESCTEXT = { // Parameter/set/variable description text
begin: /[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,
excludeBegin: true,
end: '$',
endsWithParent: true,
contains: [
QSTR,
ASSIGNMENT,
{
className: 'comment',
begin: /([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/,
relevance: 0
},
],
};
return {
aliases: ['gms'],
case_insensitive: true,
keywords: KEYWORDS,
contains: [
hljs.COMMENT(/^\$ontext/, /^\$offtext/),
{
className: 'meta',
begin: '^\\$[a-z0-9]+',
end: '$',
returnBegin: true,
contains: [
{
className: 'meta-keyword',
begin: '^\\$[a-z0-9]+',
}
]
},
hljs.COMMENT('^\\*', '$'),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
// Declarations
{
beginKeywords:
'set sets parameter parameters variable variables ' +
'scalar scalars equation equations',
end: ';',
contains: [
hljs.COMMENT('^\\*', '$'),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
ASSIGNMENT,
DESCTEXT,
]
},
{ // table environment
beginKeywords: 'table',
end: ';',
returnBegin: true,
contains: [
{ // table header row
beginKeywords: 'table',
end: '$',
contains: [DESCTEXT],
},
hljs.COMMENT('^\\*', '$'),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_NUMBER_MODE,
// Table does not contain DESCTEXT or ASSIGNMENT
]
},
// Function definitions
{
className: 'function',
begin: /^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,
returnBegin: true,
contains: [
{ // Function title
className: 'title',
begin: /^[a-z0-9_]+/,
},
PARAMS,
SYMBOLS,
],
},
hljs.C_NUMBER_MODE,
SYMBOLS,
]
};
};
/***/ }),
/* 163 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword: 'and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile ' +
'continue create debug declare delete disable dlibrary dllcall do dos ed edit else ' +
'elseif enable end endfor endif endp endo errorlog errorlogat expr external fn ' +
'for format goto gosub graph if keyword let lib library line load loadarray loadexe ' +
'loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow ' +
'matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print ' +
'printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen ' +
'scroll setarray show sparse stop string struct system trace trap threadfor ' +
'threadendfor threadbegin threadjoin threadstat threadend until use while winprint',
built_in: 'abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol ' +
'AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks ' +
'AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults ' +
'annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness ' +
'annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd ' +
'astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar ' +
'base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 ' +
'cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv ' +
'cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn ' +
'cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi ' +
'cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ' +
'ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated ' +
'complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs ' +
'cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos ' +
'datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd ' +
'dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName ' +
'dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy ' +
'dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen ' +
'dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA ' +
'dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField ' +
'dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition ' +
'dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows ' +
'dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly ' +
'dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy ' +
'dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl ' +
'dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt ' +
'dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday ' +
'dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays ' +
'endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error ' +
'etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut ' +
'EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol ' +
'EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq ' +
'feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt ' +
'floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC ' +
'gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders ' +
'gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse ' +
'gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray ' +
'getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders ' +
'getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT ' +
'gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm ' +
'hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 ' +
'indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 ' +
'inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf ' +
'isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv ' +
'lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn ' +
'lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind ' +
'loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars ' +
'makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli ' +
'mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave ' +
'movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate ' +
'olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto ' +
'pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox ' +
'plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea ' +
'plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout ' +
'plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill ' +
'plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol ' +
'plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange ' +
'plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel ' +
'plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot ' +
'pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames ' +
'pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector ' +
'pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate ' +
'qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr ' +
'real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn ' +
'rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel ' +
'rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn ' +
'rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh ' +
'rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind ' +
'scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa ' +
'setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind ' +
'sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL ' +
'spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense ' +
'spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet ' +
'sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt ' +
'strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr ' +
'surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor ' +
'threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk ' +
'trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt ' +
'utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs ' +
'vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window ' +
'writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM ' +
'xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute ' +
'h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels ' +
'plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin strtrim sylvester',
literal: 'DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS ' +
'DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 ' +
'DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS ' +
'DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES ' +
'DB_TRANSACTIONS DB_UNICODE DB_VIEWS'
};
var PREPROCESSOR =
{
className: 'meta',
begin: '#', end: '$',
keywords: {'meta-keyword': 'define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline'},
contains: [
{
begin: /\\\n/, relevance: 0
},
{
beginKeywords: 'include', end: '$',
keywords: {'meta-keyword': 'include'},
contains: [
{
className: 'meta-string',
begin: '"', end: '"',
illegal: '\\n'
}
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var FUNCTION_TITLE = hljs.UNDERSCORE_IDENT_RE + '\\s*\\(?';
var PARSE_PARAMS = [
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
relevance: 0,
contains: [
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}
];
return {
aliases: ['gss'],
case_insensitive: true, // language is case-insensitive
keywords: KEYWORDS,
illegal: '(\\{[%#]|[%#]\\})',
contains: [
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.COMMENT('@', '@'),
PREPROCESSOR,
{
className: 'string',
begin: '"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
className: 'function',
beginKeywords: 'proc keyword',
end: ';',
excludeEnd: true,
keywords: KEYWORDS,
contains: [
{
begin: FUNCTION_TITLE, returnBegin: true,
contains: [hljs.UNDERSCORE_TITLE_MODE],
relevance: 0
},
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
PREPROCESSOR
].concat(PARSE_PARAMS)
},
{
className: 'function',
beginKeywords: 'fn',
end: ';',
excludeEnd: true,
keywords: KEYWORDS,
contains: [
{
begin: FUNCTION_TITLE + hljs.IDENT_RE + '\\)?\\s*\\=\\s*', returnBegin: true,
contains: [hljs.UNDERSCORE_TITLE_MODE],
relevance: 0
},
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
].concat(PARSE_PARAMS)
},
{
className: 'function',
begin: '\\bexternal (proc|keyword|fn)\\s+',
end: ';',
excludeEnd: true,
keywords: KEYWORDS,
contains: [
{
begin: FUNCTION_TITLE, returnBegin: true,
contains: [hljs.UNDERSCORE_TITLE_MODE],
relevance: 0
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
className: 'function',
begin: '\\bexternal (matrix|string|array|sparse matrix|struct ' + hljs.IDENT_RE + ')\\s+',
end: ';',
excludeEnd: true,
keywords: KEYWORDS,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}
]
};
};
/***/ }),
/* 164 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
var GCODE_CLOSE_RE = '\\%';
var GCODE_KEYWORDS =
'IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT ' +
'EQ LT GT NE GE LE OR XOR';
var GCODE_START = {
className: 'meta',
begin: '([O])([0-9]+)'
};
var GCODE_CODE = [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.COMMENT(/\(/, /\)/),
hljs.inherit(hljs.C_NUMBER_MODE, {begin: '([-+]?([0-9]*\\.?[0-9]+\\.?))|' + hljs.C_NUMBER_RE}),
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'name',
begin: '([G])([0-9]+\\.?[0-9]?)'
},
{
className: 'name',
begin: '([M])([0-9]+\\.?[0-9]?)'
},
{
className: 'attr',
begin: '(VC|VS|#)',
end: '(\\d+)'
},
{
className: 'attr',
begin: '(VZOFX|VZOFY|VZOFZ)'
},
{
className: 'built_in',
begin: '(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)',
end: '([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])'
},
{
className: 'symbol',
variants: [
{
begin: 'N', end: '\\d+',
illegal: '\\W'
}
]
}
];
return {
aliases: ['nc'],
// Some implementations (CNC controls) of G-code are interoperable with uppercase and lowercase letters seamlessly.
// However, most prefer all uppercase and uppercase is customary.
case_insensitive: true,
lexemes: GCODE_IDENT_RE,
keywords: GCODE_KEYWORDS,
contains: [
{
className: 'meta',
begin: GCODE_CLOSE_RE
},
GCODE_START
].concat(GCODE_CODE)
};
};
/***/ }),
/* 165 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
return {
aliases: ['feature'],
keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
contains: [
{
className: 'symbol',
begin: '\\*',
relevance: 0
},
{
className: 'meta',
begin: '@[^@\\s]+'
},
{
begin: '\\|', end: '\\|\\w*$',
contains: [
{
className: 'string',
begin: '[^|]+'
}
]
},
{
className: 'variable',
begin: '<', end: '>'
},
hljs.HASH_COMMENT_MODE,
{
className: 'string',
begin: '"""', end: '"""'
},
hljs.QUOTE_STRING_MODE
]
};
};
/***/ }),
/* 166 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword:
// Statements
'break continue discard do else for if return while switch case default ' +
// Qualifiers
'attribute binding buffer ccw centroid centroid varying coherent column_major const cw ' +
'depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing ' +
'flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant ' +
'invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y ' +
'local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left ' +
'out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f '+
'r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict ' +
'rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 ' +
'rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 ' +
'rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip ' +
'triangles triangles_adjacency uniform varying vertices volatile writeonly',
type:
'atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 ' +
'dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray ' +
'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer' +
'iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray ' +
'image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray ' +
'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D ' +
'isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 ' +
'mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray ' +
'sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow ' +
'sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D ' +
'samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow ' +
'image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect ' +
'uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray ' +
'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D ' +
'samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void',
built_in:
// Constants
'gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes ' +
'gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms ' +
'gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers ' +
'gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits ' +
'gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize ' +
'gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters ' +
'gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors ' +
'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' +
'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' +
'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' +
'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' +
'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' +
'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' +
'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' +
'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' +
'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' +
'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' +
'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' +
'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' +
'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' +
'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms ' +
'gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits ' +
'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset ' +
// Variables
'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' +
'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' +
'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' +
'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' +
'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' +
'gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' +
'gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix ' +
'gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose ' +
'gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose ' +
'gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 ' +
'gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 ' +
'gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ ' +
'gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord ' +
'gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse ' +
'gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask ' +
'gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter ' +
'gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose ' +
'gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out ' +
// Functions
'EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin ' +
'asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement ' +
'atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier ' +
'bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross ' +
'dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB ' +
'floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' +
'greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap ' +
'imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad ' +
'imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset ' +
'interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log ' +
'log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer ' +
'memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 ' +
'normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 ' +
'packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod ' +
'shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh ' +
'smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod ' +
'texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod ' +
'texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' +
'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset ' +
'textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset ' +
'textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod ' +
'textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 ' +
'unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow',
literal: 'true false'
},
illegal: '"',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_NUMBER_MODE,
{
className: 'meta',
begin: '#', end: '$'
}
]
};
};
/***/ }),
/* 167 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var GO_KEYWORDS = {
keyword:
'break default func interface select case map struct chan else goto package switch ' +
'const fallthrough if range type continue for import return var go defer ' +
'bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 ' +
'uint16 uint32 uint64 int uint uintptr rune',
literal:
'true false iota nil',
built_in:
'append cap close complex copy imag len make new panic print println real recover delete'
};
return {
aliases: ['golang'],
keywords: GO_KEYWORDS,
illegal: '</',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'string',
variants: [
hljs.QUOTE_STRING_MODE,
{begin: '\'', end: '[^\\\\]\''},
{begin: '`', end: '`'},
]
},
{
className: 'number',
variants: [
{begin: hljs.C_NUMBER_RE + '[dflsi]', relevance: 1},
hljs.C_NUMBER_MODE
]
},
{
begin: /:=/ // relevance booster
},
{
className: 'function',
beginKeywords: 'func', end: /\s*\{/, excludeEnd: true,
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: GO_KEYWORDS,
illegal: /["']/
}
]
}
]
};
};
/***/ }),
/* 168 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword:
'println readln print import module function local return let var ' +
'while for foreach times in case when match with break continue ' +
'augment augmentation each find filter reduce ' +
'if then else otherwise try catch finally raise throw orIfNull ' +
'DynamicObject|10 DynamicVariable struct Observable map set vector list array',
literal:
'true false null'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'meta', begin: '@[A-Za-z]+'
}
]
}
};
/***/ }),
/* 169 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
keywords: {
keyword:
'task project allprojects subprojects artifacts buildscript configurations ' +
'dependencies repositories sourceSets description delete from into include ' +
'exclude source classpath destinationDir includes options sourceCompatibility ' +
'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +
'def abstract break case catch continue default do else extends final finally ' +
'for if implements instanceof native new private protected public return static ' +
'switch synchronized throw throws transient try volatile while strictfp package ' +
'import false null super this true antlrtask checkstyle codenarc copy boolean ' +
'byte char class double float int interface long short void compile runTime ' +
'file fileTree abs any append asList asWritable call collect compareTo count ' +
'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +
'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +
'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +
'newReader newWriter next plus pop power previous print println push putAt read ' +
'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +
'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +
'withStream withWriter withWriterAppend write writeLine'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
hljs.REGEXP_MODE
]
}
};
/***/ }),
/* 170 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
literal : 'true false null',
keyword:
'byte short char int long boolean float double void ' +
// groovy specific keywords
'def as in assert trait ' +
// common keywords with Java
'super this abstract static volatile transient public private protected synchronized final ' +
'class interface enum if else for while switch case break default continue ' +
'throw throws try catch finally implements extends new import package return instanceof'
},
contains: [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [
{
// eat up @'s in emails to prevent them to be recognized as doctags
begin: /\w+@/, relevance: 0
},
{
className : 'doctag',
begin : '@[A-Za-z]+'
}
]
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'string',
begin: '"""', end: '"""'
},
{
className: 'string',
begin: "'''", end: "'''"
},
{
className: 'string',
begin: "\\$/", end: "/\\$",
relevance: 10
},
hljs.APOS_STRING_MODE,
{
className: 'regexp',
begin: /~?\/[^\/\n]+\//,
contains: [
hljs.BACKSLASH_ESCAPE
]
},
hljs.QUOTE_STRING_MODE,
{
className: 'meta',
begin: "^#!/usr/bin/env", end: '$',
illegal: '\n'
},
hljs.BINARY_NUMBER_MODE,
{
className: 'class',
beginKeywords: 'class interface trait enum', end: '{',
illegal: ':',
contains: [
{beginKeywords: 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
},
hljs.C_NUMBER_MODE,
{
className: 'meta', begin: '@[A-Za-z]+'
},
{
// highlight map keys and named parameters as strings
className: 'string', begin: /[^\?]{0}[A-Za-z0-9_$]+ *:/
},
{
// catch middle element of the ternary operator
// to avoid highlight it as a label, named parameter, or map key
begin: /\?/, end: /\:/
},
{
// highlight labeled statements
className: 'symbol', begin: '^\\s*[A-Za-z0-9_$]+:',
relevance: 0
}
],
illegal: /#|<\//
}
};
/***/ }),
/* 171 */
/***/ (function(module, exports) {
module.exports = // TODO support filter tags like :javascript, support inline HTML
function(hljs) {
return {
case_insensitive: true,
contains: [
{
className: 'meta',
begin: '^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$',
relevance: 10
},
// FIXME these comments should be allowed to span indented lines
hljs.COMMENT(
'^\\s*(!=#|=#|-#|/).*$',
false,
{
relevance: 0
}
),
{
begin: '^\\s*(-|=|!=)(?!#)',
starts: {
end: '\\n',
subLanguage: 'ruby'
}
},
{
className: 'tag',
begin: '^\\s*%',
contains: [
{
className: 'selector-tag',
begin: '\\w+'
},
{
className: 'selector-id',
begin: '#[\\w-]+'
},
{
className: 'selector-class',
begin: '\\.[\\w-]+'
},
{
begin: '{\\s*',
end: '\\s*}',
contains: [
{
begin: ':\\w+\\s*=>',
end: ',\\s+',
returnBegin: true,
endsWithParent: true,
contains: [
{
className: 'attr',
begin: ':\\w+'
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
begin: '\\w+',
relevance: 0
}
]
}
]
},
{
begin: '\\(\\s*',
end: '\\s*\\)',
excludeEnd: true,
contains: [
{
begin: '\\w+\\s*=',
end: '\\s+',
returnBegin: true,
endsWithParent: true,
contains: [
{
className: 'attr',
begin: '\\w+',
relevance: 0
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
begin: '\\w+',
relevance: 0
}
]
}
]
}
]
},
{
begin: '^\\s*[=~]\\s*'
},
{
begin: '#{',
starts: {
end: '}',
subLanguage: 'ruby'
}
}
]
};
};
/***/ }),
/* 172 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BUILT_INS = {'builtin-name': 'each in with if else unless bindattr action collection debugger log outlet template unbound view yield'};
return {
aliases: ['hbs', 'html.hbs', 'html.handlebars'],
case_insensitive: true,
subLanguage: 'xml',
contains: [
hljs.COMMENT('{{!(--)?', '(--)?}}'),
{
className: 'template-tag',
begin: /\{\{[#\/]/, end: /\}\}/,
contains: [
{
className: 'name',
begin: /[a-zA-Z\.-]+/,
keywords: BUILT_INS,
starts: {
endsWithParent: true, relevance: 0,
contains: [
hljs.QUOTE_STRING_MODE
]
}
}
]
},
{
className: 'template-variable',
begin: /\{\{/, end: /\}\}/,
keywords: BUILT_INS
}
]
};
};
/***/ }),
/* 173 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMENT = {
variants: [
hljs.COMMENT('--', '$'),
hljs.COMMENT(
'{-',
'-}',
{
contains: ['self']
}
)
]
};
var PRAGMA = {
className: 'meta',
begin: '{-#', end: '#-}'
};
var PREPROCESSOR = {
className: 'meta',
begin: '^#', end: '$'
};
var CONSTRUCTOR = {
className: 'type',
begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (build-in, infix).
relevance: 0
};
var LIST = {
begin: '\\(', end: '\\)',
illegal: '"',
contains: [
PRAGMA,
PREPROCESSOR,
{className: 'type', begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'},
hljs.inherit(hljs.TITLE_MODE, {begin: '[_a-z][\\w\']*'}),
COMMENT
]
};
var RECORD = {
begin: '{', end: '}',
contains: LIST.contains
};
return {
aliases: ['hs'],
keywords:
'let in if then else case of where do module import hiding ' +
'qualified type data newtype deriving class instance as default ' +
'infix infixl infixr foreign export ccall stdcall cplusplus ' +
'jvm dotnet safe unsafe family forall mdo proc rec',
contains: [
// Top-level constructions.
{
beginKeywords: 'module', end: 'where',
keywords: 'module where',
contains: [LIST, COMMENT],
illegal: '\\W\\.|;'
},
{
begin: '\\bimport\\b', end: '$',
keywords: 'import qualified as hiding',
contains: [LIST, COMMENT],
illegal: '\\W\\.|;'
},
{
className: 'class',
begin: '^(\\s*)?(class|instance)\\b', end: 'where',
keywords: 'class family instance where',
contains: [CONSTRUCTOR, LIST, COMMENT]
},
{
className: 'class',
begin: '\\b(data|(new)?type)\\b', end: '$',
keywords: 'data family type newtype deriving',
contains: [PRAGMA, CONSTRUCTOR, LIST, RECORD, COMMENT]
},
{
beginKeywords: 'default', end: '$',
contains: [CONSTRUCTOR, LIST, COMMENT]
},
{
beginKeywords: 'infix infixl infixr', end: '$',
contains: [hljs.C_NUMBER_MODE, COMMENT]
},
{
begin: '\\bforeign\\b', end: '$',
keywords: 'foreign import export ccall stdcall cplusplus jvm ' +
'dotnet safe unsafe',
contains: [CONSTRUCTOR, hljs.QUOTE_STRING_MODE, COMMENT]
},
{
className: 'meta',
begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$'
},
// "Whitespaces".
PRAGMA,
PREPROCESSOR,
// Literals and names.
// TODO: characters.
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
CONSTRUCTOR,
hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\w\']*'}),
COMMENT,
{begin: '->|<-'} // No markup, relevance booster
]
};
};
/***/ }),
/* 174 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
var HAXE_BASIC_TYPES = 'Int Float String Bool Dynamic Void Array ';
return {
aliases: ['hx'],
keywords: {
keyword: 'break case cast catch continue default do dynamic else enum extern ' +
'for function here if import in inline never new override package private get set ' +
'public return static super switch this throw trace try typedef untyped using var while ' +
HAXE_BASIC_TYPES,
built_in:
'trace this',
literal:
'true false null _'
},
contains: [
{ className: 'string', // interpolate-able strings
begin: '\'', end: '\'',
contains: [
hljs.BACKSLASH_ESCAPE,
{ className: 'subst', // interpolation
begin: '\\$\\{', end: '\\}'
},
{ className: 'subst', // interpolation
begin: '\\$', end: '\\W}'
}
]
},
hljs.QUOTE_STRING_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_NUMBER_MODE,
{ className: 'meta', // compiler meta
begin: '@:', end: '$'
},
{ className: 'meta', // compiler conditionals
begin: '#', end: '$',
keywords: {'meta-keyword': 'if else elseif end error'}
},
{ className: 'type', // function types
begin: ':[ \t]*', end: '[^A-Za-z0-9_ \t\\->]',
excludeBegin: true, excludeEnd: true,
relevance: 0
},
{ className: 'type', // types
begin: ':[ \t]*', end: '\\W',
excludeBegin: true, excludeEnd: true
},
{ className: 'type', // instantiation
begin: 'new *', end: '\\W',
excludeBegin: true, excludeEnd: true
},
{ className: 'class', // enums
beginKeywords: 'enum', end: '\\{',
contains: [
hljs.TITLE_MODE
]
},
{ className: 'class', // abstracts
beginKeywords: 'abstract', end: '[\\{$]',
contains: [
{ className: 'type',
begin: '\\(', end: '\\)',
excludeBegin: true, excludeEnd: true
},
{ className: 'type',
begin: 'from +', end: '\\W',
excludeBegin: true, excludeEnd: true
},
{ className: 'type',
begin: 'to +', end: '\\W',
excludeBegin: true, excludeEnd: true
},
hljs.TITLE_MODE
],
keywords: {
keyword: 'abstract from to'
}
},
{ className: 'class', // classes
begin: '\\b(class|interface) +', end: '[\\{$]', excludeEnd: true,
keywords: 'class interface',
contains: [
{ className: 'keyword',
begin: '\\b(extends|implements) +',
keywords: 'extends implements',
contains: [
{
className: 'type',
begin: hljs.IDENT_RE,
relevance: 0
}
]
},
hljs.TITLE_MODE
]
},
{ className: 'function',
beginKeywords: 'function', end: '\\(', excludeEnd: true,
illegal: '\\S',
contains: [
hljs.TITLE_MODE
]
}
],
illegal: /<\//
};
};
/***/ }),
/* 175 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
lexemes: /[\w\._]+/,
keywords: 'goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
{
// multi-line string
className: 'string',
begin: '{"', end: '"}',
contains: [hljs.BACKSLASH_ESCAPE]
},
hljs.COMMENT(';', '$', {relevance: 0}),
{
// pre-processor
className: 'meta',
begin: '#', end: '$',
keywords: {'meta-keyword': 'addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib'},
contains: [
hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}),
hljs.NUMBER_MODE,
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
// label
className: 'symbol',
begin: '^\\*(\\w+|@)'
},
hljs.NUMBER_MODE,
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 176 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BUILT_INS = 'action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view';
var ATTR_ASSIGNMENT = {
illegal: /\}\}/,
begin: /[a-zA-Z0-9_]+=/,
returnBegin: true,
relevance: 0,
contains: [
{
className: 'attr', begin: /[a-zA-Z0-9_]+/
}
]
};
var SUB_EXPR = {
illegal: /\}\}/,
begin: /\)/, end: /\)/,
contains: [
{
begin: /[a-zA-Z\.\-]+/,
keywords: {built_in: BUILT_INS},
starts: {
endsWithParent: true, relevance: 0,
contains: [
hljs.QUOTE_STRING_MODE,
]
}
}
]
};
var TAG_INNARDS = {
endsWithParent: true, relevance: 0,
keywords: {keyword: 'as', built_in: BUILT_INS},
contains: [
hljs.QUOTE_STRING_MODE,
ATTR_ASSIGNMENT,
hljs.NUMBER_MODE
]
};
return {
case_insensitive: true,
subLanguage: 'xml',
contains: [
hljs.COMMENT('{{!(--)?', '(--)?}}'),
{
className: 'template-tag',
begin: /\{\{[#\/]/, end: /\}\}/,
contains: [
{
className: 'name',
begin: /[a-zA-Z\.\-]+/,
keywords: {'builtin-name': BUILT_INS},
starts: TAG_INNARDS
}
]
},
{
className: 'template-variable',
begin: /\{\{[a-zA-Z][a-zA-Z\-]+/, end: /\}\}/,
keywords: {keyword: 'as', built_in: BUILT_INS},
contains: [
hljs.QUOTE_STRING_MODE
]
}
]
};
};
/***/ }),
/* 177 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VERSION = 'HTTP/[0-9\\.]+';
return {
aliases: ['https'],
illegal: '\\S',
contains: [
{
begin: '^' + VERSION, end: '$',
contains: [{className: 'number', begin: '\\b\\d{3}\\b'}]
},
{
begin: '^[A-Z]+ (.*?) ' + VERSION + '$', returnBegin: true, end: '$',
contains: [
{
className: 'string',
begin: ' ', end: ' ',
excludeBegin: true, excludeEnd: true
},
{
begin: VERSION
},
{
className: 'keyword',
begin: '[A-Z]+'
}
]
},
{
className: 'attribute',
begin: '^\\w', end: ': ', excludeEnd: true,
illegal: '\\n|\\s|=',
starts: {end: '$', relevance: 0}
},
{
begin: '\\n\\n',
starts: {subLanguage: [], endsWithParent: true}
}
]
};
};
/***/ }),
/* 178 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var keywords = {
'builtin-name':
// keywords
'!= % %= & &= * ** **= *= *map ' +
'+ += , --build-class-- --import-- -= . / // //= ' +
'/= < << <<= <= = > >= >> >>= ' +
'@ @= ^ ^= abs accumulate all and any ap-compose ' +
'ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ' +
'ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast ' +
'callable calling-module-name car case cdr chain chr coll? combinations compile ' +
'compress cond cons cons? continue count curry cut cycle dec ' +
'def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn ' +
'defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir ' +
'disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? ' +
'end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first ' +
'flatten float? fn fnc fnr for for* format fraction genexpr ' +
'gensym get getattr global globals group-by hasattr hash hex id ' +
'identity if if* if-not if-python2 import in inc input instance? ' +
'integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even ' +
'is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none ' +
'is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass ' +
'iter iterable? iterate iterator? keyword keyword? lambda last len let ' +
'lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all ' +
'map max merge-with method-decorator min multi-decorator multicombinations name neg? next ' +
'none? nonlocal not not-in not? nth numeric? oct odd? open ' +
'or ord partition permutations pos? post-route postwalk pow prewalk print ' +
'product profile/calls profile/cpu put-route quasiquote quote raise range read read-str ' +
'recursive-replace reduce remove repeat repeatedly repr require rest round route ' +
'route-with-methods rwm second seq set-comp setattr setv some sorted string ' +
'string? sum switch symbol? take take-nth take-while tee try unless ' +
'unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms ' +
'xi xor yield yield-from zero? zip zip-longest | |= ~'
};
var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\'';
var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
var SHEBANG = {
className: 'meta',
begin: '^#!', end: '$'
};
var SYMBOL = {
begin: SYMBOL_RE,
relevance: 0
};
var NUMBER = {
className: 'number', begin: SIMPLE_NUMBER_RE,
relevance: 0
};
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
var COMMENT = hljs.COMMENT(
';',
'$',
{
relevance: 0
}
);
var LITERAL = {
className: 'literal',
begin: /\b([Tt]rue|[Ff]alse|nil|None)\b/
};
var COLLECTION = {
begin: '[\\[\\{]', end: '[\\]\\}]'
};
var HINT = {
className: 'comment',
begin: '\\^' + SYMBOL_RE
};
var HINT_COL = hljs.COMMENT('\\^\\{', '\\}');
var KEY = {
className: 'symbol',
begin: '[:]{1,2}' + SYMBOL_RE
};
var LIST = {
begin: '\\(', end: '\\)'
};
var BODY = {
endsWithParent: true,
relevance: 0
};
var NAME = {
keywords: keywords,
lexemes: SYMBOL_RE,
className: 'name', begin: SYMBOL_RE,
starts: BODY
};
var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];
BODY.contains = DEFAULT_CONTAINS;
COLLECTION.contains = DEFAULT_CONTAINS;
return {
aliases: ['hylang'],
illegal: /\S/,
contains: [SHEBANG, LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
}
};
/***/ }),
/* 179 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var START_BRACKET = '\\[';
var END_BRACKET = '\\]';
return {
aliases: ['i7'],
case_insensitive: true,
keywords: {
// Some keywords more or less unique to I7, for relevance.
keyword:
// kind:
'thing room person man woman animal container ' +
'supporter backdrop door ' +
// characteristic:
'scenery open closed locked inside gender ' +
// verb:
'is are say understand ' +
// misc keyword:
'kind of rule'
},
contains: [
{
className: 'string',
begin: '"', end: '"',
relevance: 0,
contains: [
{
className: 'subst',
begin: START_BRACKET, end: END_BRACKET
}
]
},
{
className: 'section',
begin: /^(Volume|Book|Part|Chapter|Section|Table)\b/,
end: '$'
},
{
// Rule definition
// This is here for relevance.
begin: /^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,
end: ':',
contains: [
{
//Rule name
begin: '\\(This', end: '\\)'
}
]
},
{
className: 'comment',
begin: START_BRACKET, end: END_BRACKET,
contains: ['self']
}
]
};
};
/***/ }),
/* 180 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var STRING = {
className: "string",
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{
begin: "'''", end: "'''",
relevance: 10
}, {
begin: '"""', end: '"""',
relevance: 10
}, {
begin: '"', end: '"'
}, {
begin: "'", end: "'"
}
]
};
return {
aliases: ['toml'],
case_insensitive: true,
illegal: /\S/,
contains: [
hljs.COMMENT(';', '$'),
hljs.HASH_COMMENT_MODE,
{
className: 'section',
begin: /^\s*\[+/, end: /\]+/
},
{
begin: /^[a-z0-9\[\]_-]+\s*=\s*/, end: '$',
returnBegin: true,
contains: [
{
className: 'attr',
begin: /[a-z0-9\[\]_-]+/
},
{
begin: /=/, endsWithParent: true,
relevance: 0,
contains: [
{
className: 'literal',
begin: /\bon|off|true|false|yes|no\b/
},
{
className: 'variable',
variants: [
{begin: /\$[\w\d"][\w\d_]*/},
{begin: /\$\{(.*?)}/}
]
},
STRING,
{
className: 'number',
begin: /([\+\-]+)?[\d]+_[\d_]+/
},
hljs.NUMBER_MODE
]
}
]
}
]
};
};
/***/ }),
/* 181 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)'
};
var F_KEYWORDS = {
literal: '.False. .True.',
keyword: 'kind do while private call intrinsic where elsewhere ' +
'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +
'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +
'goto save else use module select case ' +
'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +
'continue format pause cycle exit ' +
'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +
'synchronous nopass non_overridable pass protected volatile abstract extends import ' +
'non_intrinsic value deferred generic final enumerator class associate bind enum ' +
'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +
'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +
'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +
'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' +
'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +
'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +
'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +
'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +
'integer real character complex logical dimension allocatable|10 parameter ' +
'external implicit|10 none double precision assign intent optional pointer ' +
'target in out common equivalence data ' +
// IRPF90 special keywords
'begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch ' +
'soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read',
built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +
'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +
'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +
'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +
'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +
'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +
'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +
'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +
'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +
'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +
'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +
'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +
'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +
'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of' +
'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +
'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +
'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +
'num_images parity popcnt poppar shifta shiftl shiftr this_image ' +
// IRPF90 special built_ins
'IRP_ALIGN irp_here'
};
return {
case_insensitive: true,
keywords: F_KEYWORDS,
illegal: /\/\*/,
contains: [
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}),
{
className: 'function',
beginKeywords: 'subroutine function program',
illegal: '[${=\\n]',
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
},
hljs.COMMENT('!', '$', {relevance: 0}),
hljs.COMMENT('begin_doc', 'end_doc', {relevance: 10}),
{
className: 'number',
begin: '(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?',
relevance: 0
}
]
};
};
/***/ }),
/* 182 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var JAVA_IDENT_RE = '[\u00C0-\u02B8a-zA-Z_$][\u00C0-\u02B8a-zA-Z_$0-9]*';
var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\s*,\\s*' + JAVA_IDENT_RE + ')*>)?';
var KEYWORDS =
'false synchronized int abstract float private char boolean static null if const ' +
'for true while long strictfp finally protected import native final void ' +
'enum else break transient catch instanceof byte super volatile case assert short ' +
'package default double public try this switch continue throws protected public private ' +
'module requires exports do';
// https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
var JAVA_NUMBER_RE = '\\b' +
'(' +
'0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...
'|' +
'0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...
'|' +
'(' +
'([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' +
'|' +
'\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' +
')' +
'([eE][-+]?\\d+)?' + // octal, decimal, float
')' +
'[lLfF]?';
var JAVA_NUMBER_MODE = {
className: 'number',
begin: JAVA_NUMBER_RE,
relevance: 0
};
return {
aliases: ['jsp'],
keywords: KEYWORDS,
illegal: /<\/|#/,
contains: [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [
{
// eat up @'s in emails to prevent them to be recognized as doctags
begin: /\w+@/, relevance: 0
},
{
className : 'doctag',
begin : '@[A-Za-z]+'
}
]
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'class',
beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,
keywords: 'class interface',
illegal: /[:"\[\]]/,
contains: [
{beginKeywords: 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
// Expression keywords prevent 'keyword Name(...)' from being
// recognized as a function definition
beginKeywords: 'new throw return else',
relevance: 0
},
{
className: 'function',
begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
excludeEnd: true,
keywords: KEYWORDS,
contains: [
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
relevance: 0,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
relevance: 0,
contains: [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
JAVA_NUMBER_MODE,
{
className: 'meta', begin: '@[A-Za-z]+'
}
]
};
};
/***/ }),
/* 183 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
var KEYWORDS = {
keyword:
'in of if for while finally var new function do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const export super debugger as async await static ' +
// ECMAScript 6 modules import
'import from as'
,
literal:
'true false null undefined NaN Infinity',
built_in:
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +
'Promise'
};
var EXPRESSIONS;
var NUMBER = {
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
};
var SUBST = {
className: 'subst',
begin: '\\$\\{', end: '\\}',
keywords: KEYWORDS,
contains: [] // defined later
};
var TEMPLATE_STRING = {
className: 'string',
begin: '`', end: '`',
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
]
};
SUBST.contains = [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
TEMPLATE_STRING,
NUMBER,
hljs.REGEXP_MODE
]
var PARAMS_CONTAINS = SUBST.contains.concat([
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE
]);
return {
aliases: ['js', 'jsx'],
keywords: KEYWORDS,
contains: [
{
className: 'meta',
relevance: 10,
begin: /^\s*['"]use (strict|asm)['"]/
},
{
className: 'meta',
begin: /^#!/, end: /$/
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
TEMPLATE_STRING,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBER,
{ // object attr container
begin: /[{,]\s*/, relevance: 0,
contains: [
{
begin: IDENT_RE + '\\s*:', returnBegin: true,
relevance: 0,
contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]
}
]
},
{ // "value" container
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
keywords: 'return throw case',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.REGEXP_MODE,
{
className: 'function',
begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>', returnBegin: true,
end: '\\s*=>',
contains: [
{
className: 'params',
variants: [
{
begin: IDENT_RE
},
{
begin: /\(\s*\)/,
},
{
begin: /\(/, end: /\)/,
excludeBegin: true, excludeEnd: true,
keywords: KEYWORDS,
contains: PARAMS_CONTAINS
}
]
}
]
},
{ // E4X / JSX
begin: /</, end: /(\/\w+|\w+\/)>/,
subLanguage: 'xml',
contains: [
{begin: /<\w+\s*\/>/, skip: true},
{
begin: /<\w+/, end: /(\/\w+|\w+\/)>/, skip: true,
contains: [
{begin: /<\w+\s*\/>/, skip: true},
'self'
]
}
]
}
],
relevance: 0
},
{
className: 'function',
beginKeywords: 'function', end: /\{/, excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),
{
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
contains: PARAMS_CONTAINS
}
],
illegal: /\[|%/
},
{
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
},
hljs.METHOD_GUARD,
{ // ES6 class
className: 'class',
beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,
illegal: /[:"\[\]]/,
contains: [
{beginKeywords: 'extends'},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
beginKeywords: 'constructor', end: /\{/, excludeEnd: true
}
],
illegal: /#(?!!)/
};
};
/***/ }),
/* 184 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
var PARAM = {
begin: /[\w-]+ *=/, returnBegin: true,
relevance: 0,
contains: [{className: 'attr', begin: /[\w-]+/}]
};
var PARAMSBLOCK = {
className: 'params',
begin: /\(/,
end: /\)/,
contains: [PARAM],
relevance : 0
};
var OPERATION = {
className: 'function',
begin: /:[\w\-.]+/,
relevance: 0
};
var PATH = {
className: 'string',
begin: /\B(([\/.])[\w\-.\/=]+)+/,
};
var COMMAND_PARAMS = {
className: 'params',
begin: /--[\w\-=\/]+/,
};
return {
aliases: ['wildfly-cli'],
lexemes: '[a-z\-]+',
keywords: {
keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' +
'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' +
'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' +
'undeploy unset version xa-data-source', // module
literal: 'true false'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
COMMAND_PARAMS,
OPERATION,
PATH,
PARAMSBLOCK
]
}
};
/***/ }),
/* 185 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var LITERALS = {literal: 'true false null'};
var TYPES = [
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
];
var VALUE_CONTAINER = {
end: ',', endsWithParent: true, excludeEnd: true,
contains: TYPES,
keywords: LITERALS
};
var OBJECT = {
begin: '{', end: '}',
contains: [
{
className: 'attr',
begin: /"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE],
illegal: '\\n',
},
hljs.inherit(VALUE_CONTAINER, {begin: /:/})
],
illegal: '\\S'
};
var ARRAY = {
begin: '\\[', end: '\\]',
contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents
illegal: '\\S'
};
TYPES.splice(TYPES.length, 0, OBJECT, ARRAY);
return {
contains: TYPES,
keywords: LITERALS,
illegal: '\\S'
};
};
/***/ }),
/* 186 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
// Since there are numerous special names in Julia, it is too much trouble
// to maintain them by hand. Hence these names (i.e. keywords, literals and
// built-ins) are automatically generated from Julia v0.6 itself through
// the following scripts for each.
var KEYWORDS = {
// # keyword generator, multi-word keywords handled manually below
// foreach(println, ["in", "isa", "where"])
// for kw in Base.REPLCompletions.complete_keyword("")
// if !(contains(kw, " ") || kw == "struct")
// println(kw)
// end
// end
keyword:
'in isa where ' +
'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' +
'global if import importall let local macro module quote return true try using while ' +
// legacy, to be deprecated in the next release
'type immutable abstract bitstype typealias ',
// # literal generator
// println("true")
// println("false")
// for name in Base.REPLCompletions.completions("", 0)[1]
// try
// v = eval(Symbol(name))
// if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon)
// println(name)
// end
// end
// end
literal:
'true false ' +
'ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort ' +
'NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway ' +
'RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im ' +
'nothing pi γ π φ ',
// # built_in generator:
// for name in Base.REPLCompletions.completions("", 0)[1]
// try
// v = eval(Symbol(name))
// if v isa Type || v isa TypeVar
// println(name)
// end
// end
// end
built_in:
'ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet ' +
'AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat ' +
'AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal '+
'BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException ' +
'CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager ' +
'Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ' +
'ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t ' +
'Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict ' +
'DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ' +
'ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function ' +
'Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear ' +
'IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException ' +
'InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix ' +
'MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict ' +
'OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe ' +
'PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ' +
'ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode ' +
'RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed ' +
'SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange ' +
'StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal ' +
'Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry ' +
'TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError ' +
'UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector ' +
'VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool '
};
// ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names
var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*';
// placeholder for recursive self-reference
var DEFAULT = {
lexemes: VARIABLE_NAME_RE, keywords: KEYWORDS, illegal: /<\//
};
// ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/
var NUMBER = {
className: 'number',
// supported numeric literals:
// * binary literal (e.g. 0x10)
// * octal literal (e.g. 0o76543210)
// * hexadecimal literal (e.g. 0xfedcba876543210)
// * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2)
// * decimal literal (e.g. 9876543210, 100_000_000)
// * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10)
begin: /(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,
relevance: 0
};
var CHAR = {
className: 'string',
begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
};
var INTERPOLATION = {
className: 'subst',
begin: /\$\(/, end: /\)/,
keywords: KEYWORDS
};
var INTERPOLATED_VARIABLE = {
className: 'variable',
begin: '\\$' + VARIABLE_NAME_RE
};
// TODO: neatly escape normal code in string literal
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
variants: [
{ begin: /\w*"""/, end: /"""\w*/, relevance: 10 },
{ begin: /\w*"/, end: /"\w*/ }
]
};
var COMMAND = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
begin: '`', end: '`'
};
var MACROCALL = {
className: 'meta',
begin: '@' + VARIABLE_NAME_RE
};
var COMMENT = {
className: 'comment',
variants: [
{ begin: '#=', end: '=#', relevance: 10 },
{ begin: '#', end: '$' }
]
};
DEFAULT.contains = [
NUMBER,
CHAR,
STRING,
COMMAND,
MACROCALL,
COMMENT,
hljs.HASH_COMMENT_MODE,
{
className: 'keyword',
begin:
'\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b'
},
{begin: /<:/} // relevance booster
];
INTERPOLATION.contains = DEFAULT.contains;
return DEFAULT;
};
/***/ }),
/* 187 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
{
className: 'meta',
begin: /^julia>/,
relevance: 10,
starts: {
// end the highlighting if we are on a new line and the line does not have at
// least six spaces in the beginning
end: /^(?![ ]{6})/,
subLanguage: 'julia'
},
// jldoctest Markdown blocks are used in the Julia manual and package docs indicate
// code snippets that should be verified when the documentation is built. They can be
// either REPL-like or script-like, but are usually REPL-like and therefore we apply
// julia-repl highlighting to them. More information can be found in Documenter's
// manual: https://juliadocs.github.io/Documenter.jl/latest/man/doctests.html
aliases: ['jldoctest']
}
]
}
};
/***/ }),
/* 188 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'abstract as val var vararg get set class object open private protected public noinline ' +
'crossinline dynamic final enum if else do while for when throw try catch finally ' +
'import package is in fun override companion reified inline lateinit init' +
'interface annotation data sealed internal infix operator out by constructor super ' +
// to be deleted soon
'trait volatile transient native default',
built_in:
'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
literal:
'true false null'
};
var KEYWORDS_WITH_LABEL = {
className: 'keyword',
begin: /\b(break|continue|return|this)\b/,
starts: {
contains: [
{
className: 'symbol',
begin: /@\w+/
}
]
}
};
var LABEL = {
className: 'symbol', begin: hljs.UNDERSCORE_IDENT_RE + '@'
};
// for string templates
var SUBST = {
className: 'subst',
begin: '\\${', end: '}', contains: [hljs.APOS_STRING_MODE, hljs.C_NUMBER_MODE]
};
var VARIABLE = {
className: 'variable', begin: '\\$' + hljs.UNDERSCORE_IDENT_RE
};
var STRING = {
className: 'string',
variants: [
{
begin: '"""', end: '"""',
contains: [VARIABLE, SUBST]
},
// Can't use built-in modes easily, as we want to use STRING in the meta
// context as 'meta-string' and there's no syntax to remove explicitly set
// classNames in built-in modes.
{
begin: '\'', end: '\'',
illegal: /\n/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '"', end: '"',
illegal: /\n/,
contains: [hljs.BACKSLASH_ESCAPE, VARIABLE, SUBST]
}
]
};
var ANNOTATION_USE_SITE = {
className: 'meta', begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'
};
var ANNOTATION = {
className: 'meta', begin: '@' + hljs.UNDERSCORE_IDENT_RE,
contains: [
{
begin: /\(/, end: /\)/,
contains: [
hljs.inherit(STRING, {className: 'meta-string'})
]
}
]
};
return {
keywords: KEYWORDS,
contains : [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [{
className : 'doctag',
begin : '@[A-Za-z]+'
}]
}
),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
KEYWORDS_WITH_LABEL,
LABEL,
ANNOTATION_USE_SITE,
ANNOTATION,
{
className: 'function',
beginKeywords: 'fun', end: '[(]|$',
returnBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
illegal: /fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,
relevance: 5,
contains: [
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
relevance: 0,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
className: 'type',
begin: /</, end: />/, keywords: 'reified',
relevance: 0
},
{
className: 'params',
begin: /\(/, end: /\)/,
endsParent: true,
keywords: KEYWORDS,
relevance: 0,
contains: [
{
begin: /:/, end: /[=,\/]/, endsWithParent: true,
contains: [
{className: 'type', begin: hljs.UNDERSCORE_IDENT_RE},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
],
relevance: 0
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
ANNOTATION_USE_SITE,
ANNOTATION,
STRING,
hljs.C_NUMBER_MODE
]
},
hljs.C_BLOCK_COMMENT_MODE
]
},
{
className: 'class',
beginKeywords: 'class interface trait', end: /[:\{(]|$/, // remove 'trait' when removed from KEYWORDS
excludeEnd: true,
illegal: 'extends implements',
contains: [
{beginKeywords: 'public protected internal private constructor'},
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'type',
begin: /</, end: />/, excludeBegin: true, excludeEnd: true,
relevance: 0
},
{
className: 'type',
begin: /[,:]\s*/, end: /[<\(,]|$/, excludeBegin: true, returnEnd: true
},
ANNOTATION_USE_SITE,
ANNOTATION
]
},
STRING,
{
className: 'meta',
begin: "^#!/usr/bin/env", end: '$',
illegal: '\n'
},
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 189 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var LASSO_IDENT_RE = '[a-zA-Z_][\\w.]*';
var LASSO_ANGLE_RE = '<\\?(lasso(script)?|=)';
var LASSO_CLOSE_RE = '\\]|\\?>';
var LASSO_KEYWORDS = {
literal:
'true false none minimal full all void and or not ' +
'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft',
built_in:
'array date decimal duration integer map pair string tag xml null ' +
'boolean bytes keyword list locale queue set stack staticarray ' +
'local var variable global data self inherited currentcapture givenblock',
keyword:
'cache database_names database_schemanames database_tablenames ' +
'define_tag define_type email_batch encode_set html_comment handle ' +
'handle_error header if inline iterate ljax_target link ' +
'link_currentaction link_currentgroup link_currentrecord link_detail ' +
'link_firstgroup link_firstrecord link_lastgroup link_lastrecord ' +
'link_nextgroup link_nextrecord link_prevgroup link_prevrecord log ' +
'loop namespace_using output_none portal private protect records ' +
'referer referrer repeating resultset rows search_args ' +
'search_arguments select sort_args sort_arguments thread_atomic ' +
'value_list while abort case else fail_if fail_ifnot fail if_empty ' +
'if_false if_null if_true loop_abort loop_continue loop_count params ' +
'params_up return return_value run_children soap_definetag ' +
'soap_lastrequest soap_lastresponse tag_name ascending average by ' +
'define descending do equals frozen group handle_failure import in ' +
'into join let match max min on order parent protected provide public ' +
'require returnhome skip split_thread sum take thread to trait type ' +
'where with yield yieldhome'
};
var HTML_COMMENT = hljs.COMMENT(
'<!--',
'-->',
{
relevance: 0
}
);
var LASSO_NOPROCESS = {
className: 'meta',
begin: '\\[noprocess\\]',
starts: {
end: '\\[/noprocess\\]',
returnEnd: true,
contains: [HTML_COMMENT]
}
};
var LASSO_START = {
className: 'meta',
begin: '\\[/noprocess|' + LASSO_ANGLE_RE
};
var LASSO_DATAMEMBER = {
className: 'symbol',
begin: '\'' + LASSO_IDENT_RE + '\''
};
var LASSO_CODE = [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|NaN)\\b'}),
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'string',
begin: '`', end: '`'
},
{ // variables
variants: [
{
begin: '[#$]' + LASSO_IDENT_RE
},
{
begin: '#', end: '\\d+',
illegal: '\\W'
}
]
},
{
className: 'type',
begin: '::\\s*', end: LASSO_IDENT_RE,
illegal: '\\W'
},
{
className: 'params',
variants: [
{
begin: '-(?!infinity)' + LASSO_IDENT_RE,
relevance: 0
},
{
begin: '(\\.\\.\\.)'
}
]
},
{
begin: /(->|\.)\s*/,
relevance: 0,
contains: [LASSO_DATAMEMBER]
},
{
className: 'class',
beginKeywords: 'define',
returnEnd: true, end: '\\(|=>',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: LASSO_IDENT_RE + '(=(?!>))?|[-+*/%](?!>)'})
]
}
];
return {
aliases: ['ls', 'lassoscript'],
case_insensitive: true,
lexemes: LASSO_IDENT_RE + '|&[lg]t;',
keywords: LASSO_KEYWORDS,
contains: [
{
className: 'meta',
begin: LASSO_CLOSE_RE,
relevance: 0,
starts: { // markup
end: '\\[|' + LASSO_ANGLE_RE,
returnEnd: true,
relevance: 0,
contains: [HTML_COMMENT]
}
},
LASSO_NOPROCESS,
LASSO_START,
{
className: 'meta',
begin: '\\[no_square_brackets',
starts: {
end: '\\[/no_square_brackets\\]', // not implemented in the language
lexemes: LASSO_IDENT_RE + '|&[lg]t;',
keywords: LASSO_KEYWORDS,
contains: [
{
className: 'meta',
begin: LASSO_CLOSE_RE,
relevance: 0,
starts: {
end: '\\[noprocess\\]|' + LASSO_ANGLE_RE,
returnEnd: true,
contains: [HTML_COMMENT]
}
},
LASSO_NOPROCESS,
LASSO_START
].concat(LASSO_CODE)
}
},
{
className: 'meta',
begin: '\\[',
relevance: 0
},
{
className: 'meta',
begin: '^#!', end:'lasso9$',
relevance: 10
}
].concat(LASSO_CODE)
};
};
/***/ }),
/* 190 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
{
className: 'attribute',
begin: '^dn', end: ': ', excludeEnd: true,
starts: {end: '$', relevance: 0},
relevance: 10
},
{
className: 'attribute',
begin: '^\\w', end: ': ', excludeEnd: true,
starts: {end: '$', relevance: 0}
},
{
className: 'literal',
begin: '^-', end: '$'
},
hljs.HASH_COMMENT_MODE
]
};
};
/***/ }),
/* 191 */
/***/ (function(module, exports) {
module.exports = function (hljs) {
return {
contains: [
{
className: 'function',
begin: '#+' + '[A-Za-z_0-9]*' + '\\(',
end:' {',
returnBegin: true,
excludeEnd: true,
contains : [
{
className: 'keyword',
begin: '#+'
},
{
className: 'title',
begin: '[A-Za-z_][A-Za-z_0-9]*'
},
{
className: 'params',
begin: '\\(', end: '\\)',
endsParent: true,
contains: [
{
className: 'string',
begin: '"',
end: '"'
},
{
className: 'variable',
begin: '[A-Za-z_][A-Za-z_0-9]*'
}
]
}
]
}
]
};
};
/***/ }),
/* 192 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';
/* Generic Modes */
var RULES = [], VALUE = []; // forward def. for recursive modes
var STRING_MODE = function(c) { return {
// Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
className: 'string', begin: '~?' + c + '.*?' + c
};};
var IDENT_MODE = function(name, begin, relevance) { return {
className: name, begin: begin, relevance: relevance
};};
var PARENS_MODE = {
// used only to properly balance nested parens inside mixin call, def. arg list
begin: '\\(', end: '\\)', contains: VALUE, relevance: 0
};
// generic Less highlighter (used almost everywhere except selectors):
VALUE.push(
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
STRING_MODE("'"),
STRING_MODE('"'),
hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(
{
begin: '(url|data-uri)\\(',
starts: {className: 'string', end: '[\\)\\n]', excludeEnd: true}
},
IDENT_MODE('number', '#[0-9A-Fa-f]+\\b'),
PARENS_MODE,
IDENT_MODE('variable', '@@?' + IDENT_RE, 10),
IDENT_MODE('variable', '@{' + IDENT_RE + '}'),
IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string
{ // @media features (its here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
className: 'attribute', begin: IDENT_RE + '\\s*:', end: ':', returnBegin: true, excludeEnd: true
},
{
className: 'meta',
begin: '!important'
}
);
var VALUE_WITH_RULESETS = VALUE.concat({
begin: '{', end: '}', contains: RULES
});
var MIXIN_GUARD_MODE = {
beginKeywords: 'when', endsWithParent: true,
contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUEs 'function' match
};
/* Rule-Level Modes */
var RULE_MODE = {
begin: INTERP_IDENT_RE + '\\s*:', returnBegin: true, end: '[;}]',
relevance: 0,
contains: [
{
className: 'attribute',
begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,
starts: {
endsWithParent: true, illegal: '[<=$]',
relevance: 0,
contains: VALUE
}
}
]
};
var AT_RULE_MODE = {
className: 'keyword',
begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b',
starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}
};
// variable definitions and calls
var VAR_RULE_MODE = {
className: 'variable',
variants: [
// using more strict pattern for higher relevance to increase chances of Less detection.
// this is *the only* Less specific statement used in most of the sources, so...
// (well still often loose to the css-parser unless there's '//' comment,
// simply because 1 variable just can't beat 99 properties :)
{begin: '@' + IDENT_RE + '\\s*:', relevance: 15},
{begin: '@' + IDENT_RE}
],
starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}
};
var SELECTOR_MODE = {
// first parse unambiguous selectors (i.e. those not starting with tag)
// then fall into the scary lookahead-discriminator variant.
// this mode also handles mixin definitions and calls
variants: [{
begin: '[\\.#:&\\[>]', end: '[;{}]' // mixin calls end with ';'
}, {
begin: INTERP_IDENT_RE, end: '{'
}],
returnBegin: true,
returnEnd: true,
illegal: '[<=\'$"]',
relevance: 0,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
MIXIN_GUARD_MODE,
IDENT_MODE('keyword', 'all\\b'),
IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise its identified as tag
IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"
IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),
IDENT_MODE('selector-class', '\\.' + INTERP_IDENT_RE, 0),
IDENT_MODE('selector-tag', '&', 0),
{className: 'selector-attr', begin: '\\[', end: '\\]'},
{className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},
{begin: '\\(', end: '\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins
{begin: '!important'} // eat !important after mixin call or it will be colored as tag
]
};
RULES.push(
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
AT_RULE_MODE,
VAR_RULE_MODE,
RULE_MODE,
SELECTOR_MODE
);
return {
case_insensitive: true,
illegal: '[=>\'/<($"]',
contains: RULES
};
};
/***/ }),
/* 193 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*';
var MEC_RE = '\\|[^]*?\\|';
var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?';
var SHEBANG = {
className: 'meta',
begin: '^#!', end: '$'
};
var LITERAL = {
className: 'literal',
begin: '\\b(t{1}|nil)\\b'
};
var NUMBER = {
className: 'number',
variants: [
{begin: LISP_SIMPLE_NUMBER_RE, relevance: 0},
{begin: '#(b|B)[0-1]+(/[0-1]+)?'},
{begin: '#(o|O)[0-7]+(/[0-7]+)?'},
{begin: '#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?'},
{begin: '#(c|C)\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\)'}
]
};
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
var COMMENT = hljs.COMMENT(
';', '$',
{
relevance: 0
}
);
var VARIABLE = {
begin: '\\*', end: '\\*'
};
var KEYWORD = {
className: 'symbol',
begin: '[:&]' + LISP_IDENT_RE
};
var IDENT = {
begin: LISP_IDENT_RE,
relevance: 0
};
var MEC = {
begin: MEC_RE
};
var QUOTED_LIST = {
begin: '\\(', end: '\\)',
contains: ['self', LITERAL, STRING, NUMBER, IDENT]
};
var QUOTED = {
contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST, IDENT],
variants: [
{
begin: '[\'`]\\(', end: '\\)'
},
{
begin: '\\(quote ', end: '\\)',
keywords: {name: 'quote'}
},
{
begin: '\'' + MEC_RE
}
]
};
var QUOTED_ATOM = {
variants: [
{begin: '\'' + LISP_IDENT_RE},
{begin: '#\'' + LISP_IDENT_RE + '(::' + LISP_IDENT_RE + ')*'}
]
};
var LIST = {
begin: '\\(\\s*', end: '\\)'
};
var BODY = {
endsWithParent: true,
relevance: 0
};
LIST.contains = [
{
className: 'name',
variants: [
{begin: LISP_IDENT_RE},
{begin: MEC_RE}
]
},
BODY
];
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC, IDENT];
return {
illegal: /\S/,
contains: [
NUMBER,
SHEBANG,
LITERAL,
STRING,
COMMENT,
QUOTED,
QUOTED_ATOM,
LIST,
IDENT
]
};
};
/***/ }),
/* 194 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VARIABLE = {
begin: '\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+',
relevance: 0
};
var COMMENT_MODES = [
hljs.C_BLOCK_COMMENT_MODE,
hljs.HASH_COMMENT_MODE,
hljs.COMMENT('--', '$'),
hljs.COMMENT('[^:]//', '$')
];
var TITLE1 = hljs.inherit(hljs.TITLE_MODE, {
variants: [
{begin: '\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*'},
{begin: '\\b_[a-z0-9\\-]+'}
]
});
var TITLE2 = hljs.inherit(hljs.TITLE_MODE, {begin: '\\b([A-Za-z0-9_\\-]+)\\b'});
return {
case_insensitive: false,
keywords: {
keyword:
'$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER ' +
'codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph ' +
'after byte bytes english the until http forever descending using line real8 with seventh ' +
'for stdout finally element word words fourth before black ninth sixth characters chars stderr ' +
'uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid ' +
'at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 ' +
'int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat ' +
'end repeat URL in try into switch to words https token binfile each tenth as ticks tick ' +
'system real4 by dateItems without char character ascending eighth whole dateTime numeric short ' +
'first ftp integer abbreviated abbr abbrev private case while if ' +
'div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within ' +
'contains ends with begins the keys of keys',
literal:
'SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE ' +
'QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO ' +
'six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five ' +
'quote empty one true return cr linefeed right backslash null seven tab three two ' +
'RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK ' +
'FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK',
built_in:
'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode ' +
'base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum ' +
'cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress ' +
'constantNames cos date dateFormat decompress directories ' +
'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global ' +
'globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' +
'keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders ' +
'libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 ' +
'longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec ' +
'millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar ' +
'numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets ' +
'paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation ' +
'populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile ' +
'revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' +
'revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered ' +
'revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames ' +
'revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull ' +
'revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections ' +
'revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype ' +
'revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext ' +
'revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames ' +
'revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase ' +
'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute ' +
'revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces ' +
'revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode ' +
'revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling ' +
'revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error ' +
'revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute ' +
'revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort ' +
'revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree ' +
'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance ' +
'sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' +
'stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper ' +
'transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames ' +
'variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet ' +
'xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process ' +
'combine constant convert create new alias folder directory decrypt delete variable word line folder ' +
'directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile ' +
'libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback ' +
'libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime ' +
'libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename ' +
'replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' +
'revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees ' +
'revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord ' +
'revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase ' +
'revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD ' +
'revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost ' +
'revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData ' +
'revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel ' +
'revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback ' +
'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop ' +
'subtract union unload wait write'
},
contains: [
VARIABLE,
{
className: 'keyword',
begin: '\\bend\\sif\\b'
},
{
className: 'function',
beginKeywords: 'function', end: '$',
contains: [
VARIABLE,
TITLE2,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE,
TITLE1
]
},
{
className: 'function',
begin: '\\bend\\s+', end: '$',
keywords: 'end',
contains: [
TITLE2,
TITLE1
],
relevance: 0
},
{
beginKeywords: 'command on', end: '$',
contains: [
VARIABLE,
TITLE2,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE,
TITLE1
]
},
{
className: 'meta',
variants: [
{
begin: '<\\?(rev|lc|livecode)',
relevance: 10
},
{ begin: '<\\?' },
{ begin: '\\?>' }
]
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE,
TITLE1
].concat(COMMENT_MODES),
illegal: ';$|^\\[|^=|&|{'
};
};
/***/ }),
/* 195 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
// JS keywords
'in if for while finally new do return else break catch instanceof throw try this ' +
'switch continue typeof delete debugger case default function var with ' +
// LiveScript keywords
'then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super ' +
'case default function var void const let enum export import native ' +
'__hasProp __extends __slice __bind __indexOf',
literal:
// JS literals
'true false null undefined ' +
// LiveScript literals
'yes no on off it that void',
built_in:
'npm require console print module global window document'
};
var JS_IDENT_RE = '[A-Za-z$_](?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
var SUBST = {
className: 'subst',
begin: /#\{/, end: /}/,
keywords: KEYWORDS
};
var SUBST_SIMPLE = {
className: 'subst',
begin: /#[A-Za-z$_]/, end: /(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
keywords: KEYWORDS
};
var EXPRESSIONS = [
hljs.BINARY_NUMBER_MODE,
{
className: 'number',
begin: '(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)',
relevance: 0,
starts: {end: '(\\s*/)?', relevance: 0} // a number tries to eat the following slash to prevent treating it as a regexp
},
{
className: 'string',
variants: [
{
begin: /'''/, end: /'''/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: /'/, end: /'/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: /"""/, end: /"""/,
contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]
},
{
begin: /"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]
},
{
begin: /\\/, end: /(\s|$)/,
excludeEnd: true
}
]
},
{
className: 'regexp',
variants: [
{
begin: '//', end: '//[gim]*',
contains: [SUBST, hljs.HASH_COMMENT_MODE]
},
{
// regex can't start with space to parse x / 2 / 3 as two divisions
// regex can't start with *, and it supports an "illegal" in the main mode
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
}
]
},
{
begin: '@' + JS_IDENT_RE
},
{
begin: '``', end: '``',
excludeBegin: true, excludeEnd: true,
subLanguage: 'javascript'
}
];
SUBST.contains = EXPRESSIONS;
var PARAMS = {
className: 'params',
begin: '\\(', returnBegin: true,
/* We need another contained nameless mode to not have every nested
pair of parens to be called "params" */
contains: [
{
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
contains: ['self'].concat(EXPRESSIONS)
}
]
};
return {
aliases: ['ls'],
keywords: KEYWORDS,
illegal: /\/\*/,
contains: EXPRESSIONS.concat([
hljs.COMMENT('\\/\\*', '\\*\\/'),
hljs.HASH_COMMENT_MODE,
{
className: 'function',
contains: [TITLE, PARAMS],
returnBegin: true,
variants: [
{
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?', end: '\\->\\*?'
},
{
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?', end: '[-~]{1,2}>\\*?'
},
{
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?', end: '!?[-~]{1,2}>\\*?'
}
]
},
{
className: 'class',
beginKeywords: 'class',
end: '$',
illegal: /[:="\[\]]/,
contains: [
{
beginKeywords: 'extends',
endsWithParent: true,
illegal: /[:="\[\]]/,
contains: [TITLE]
},
TITLE
]
},
{
begin: JS_IDENT_RE + ':', end: ':',
returnBegin: true, returnEnd: true,
relevance: 0
}
])
};
};
/***/ }),
/* 196 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var identifier = '([-a-zA-Z$._][\\w\\-$.]*)';
return {
//lexemes: '[.%]?' + hljs.IDENT_RE,
keywords:
'begin end true false declare define global ' +
'constant private linker_private internal ' +
'available_externally linkonce linkonce_odr weak ' +
'weak_odr appending dllimport dllexport common ' +
'default hidden protected extern_weak external ' +
'thread_local zeroinitializer undef null to tail ' +
'target triple datalayout volatile nuw nsw nnan ' +
'ninf nsz arcp fast exact inbounds align ' +
'addrspace section alias module asm sideeffect ' +
'gc dbg linker_private_weak attributes blockaddress ' +
'initialexec localdynamic localexec prefix unnamed_addr ' +
'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' +
'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' +
'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' +
'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' +
'cc c signext zeroext inreg sret nounwind ' +
'noreturn noalias nocapture byval nest readnone ' +
'readonly inlinehint noinline alwaysinline optsize ssp ' +
'sspreq noredzone noimplicitfloat naked builtin cold ' +
'nobuiltin noduplicate nonlazybind optnone returns_twice ' +
'sanitize_address sanitize_memory sanitize_thread sspstrong ' +
'uwtable returned type opaque eq ne slt sgt ' +
'sle sge ult ugt ule uge oeq one olt ogt ' +
'ole oge ord uno ueq une x acq_rel acquire ' +
'alignstack atomic catch cleanup filter inteldialect ' +
'max min monotonic nand personality release seq_cst ' +
'singlethread umax umin unordered xchg add fadd ' +
'sub fsub mul fmul udiv sdiv fdiv urem srem ' +
'frem shl lshr ashr and or xor icmp fcmp ' +
'phi call trunc zext sext fptrunc fpext uitofp ' +
'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' +
'addrspacecast select va_arg ret br switch invoke ' +
'unwind unreachable indirectbr landingpad resume ' +
'malloc alloca free load store getelementptr ' +
'extractelement insertelement shufflevector getresult ' +
'extractvalue insertvalue atomicrmw cmpxchg fence ' +
'argmemonly double',
contains: [
{
className: 'keyword',
begin: 'i\\d+'
},
hljs.COMMENT(
';', '\\n', {relevance: 0}
),
// Double quote string
hljs.QUOTE_STRING_MODE,
{
className: 'string',
variants: [
// Double-quoted string
{ begin: '"', end: '[^\\\\]"' },
],
relevance: 0
},
{
className: 'title',
variants: [
{ begin: '@' + identifier },
{ begin: '@\\d+' },
{ begin: '!' + identifier },
{ begin: '!\\d+' + identifier }
]
},
{
className: 'symbol',
variants: [
{ begin: '%' + identifier },
{ begin: '%\\d+' },
{ begin: '#\\d+' },
]
},
{
className: 'number',
variants: [
{ begin: '0[xX][a-fA-F0-9]+' },
{ begin: '-?\\d+(?:[.]\\d+)?(?:[eE][-+]?\\d+(?:[.]\\d+)?)?' }
],
relevance: 0
},
]
};
};
/***/ }),
/* 197 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var LSL_STRING_ESCAPE_CHARS = {
className: 'subst',
begin: /\\[tn"\\]/
};
var LSL_STRINGS = {
className: 'string',
begin: '"',
end: '"',
contains: [
LSL_STRING_ESCAPE_CHARS
]
};
var LSL_NUMBERS = {
className: 'number',
begin: hljs.C_NUMBER_RE
};
var LSL_CONSTANTS = {
className: 'literal',
variants: [
{
begin: '\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b'
},
{
begin: '\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_T
},
{
begin: '\\b(?:FALSE|TRUE)\\b'
},
{
begin: '\\b(?:ZERO_ROTATION)\\b'
},
{
begin: '\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b'
},
{
begin: '\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b'
}
]
};
var LSL_FUNCTIONS = {
className: 'built_in',
begin: '\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursu
};
return {
illegal: ':',
contains: [
LSL_STRINGS,
{
className: 'comment',
variants: [
hljs.COMMENT('//', '$'),
hljs.COMMENT('/\\*', '\\*/')
]
},
LSL_NUMBERS,
{
className: 'section',
variants: [
{
begin: '\\b(?:state|default)\\b'
},
{
begin: '\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b'
}
]
},
LSL_FUNCTIONS,
LSL_CONSTANTS,
{
className: 'type',
begin: '\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b'
}
]
};
};
/***/ }),
/* 198 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var OPENING_LONG_BRACKET = '\\[=*\\[';
var CLOSING_LONG_BRACKET = '\\]=*\\]';
var LONG_BRACKETS = {
begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
contains: ['self']
};
var COMMENTS = [
hljs.COMMENT('--(?!' + OPENING_LONG_BRACKET + ')', '$'),
hljs.COMMENT(
'--' + OPENING_LONG_BRACKET,
CLOSING_LONG_BRACKET,
{
contains: [LONG_BRACKETS],
relevance: 10
}
)
];
return {
lexemes: hljs.UNDERSCORE_IDENT_RE,
keywords: {
literal: "true false nil",
keyword: "and break do else elseif end for goto if in local not or repeat return then until while",
built_in:
//Metatags and globals:
'_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len ' +
'__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert ' +
//Standard methods and properties:
'collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring' +
'module next pairs pcall print rawequal rawget rawset require select setfenv' +
'setmetatable tonumber tostring type unpack xpcall arg self' +
//Library methods and properties (one line per library):
'coroutine resume yield status wrap create running debug getupvalue ' +
'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv ' +
'io lines write close flush open output type read stderr stdin input stdout popen tmpfile ' +
'math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan ' +
'os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall ' +
'string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower ' +
'table setn insert getn foreachi maxn foreach concat sort remove'
},
contains: COMMENTS.concat([
{
className: 'function',
beginKeywords: 'function', end: '\\)',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}),
{
className: 'params',
begin: '\\(', endsWithParent: true,
contains: COMMENTS
}
].concat(COMMENTS)
},
hljs.C_NUMBER_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
contains: [LONG_BRACKETS],
relevance: 5
}
])
};
};
/***/ }),
/* 199 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
/* Variables: simple (eg $(var)) and special (eg $@) */
var VARIABLE = {
className: 'variable',
variants: [
{
begin: '\\$\\(' + hljs.UNDERSCORE_IDENT_RE + '\\)',
contains: [hljs.BACKSLASH_ESCAPE],
},
{
begin: /\$[@%<?\^\+\*]/
},
]
};
/* Quoted string with variables inside */
var QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VARIABLE,
]
};
/* Function: $(func arg,...) */
var FUNC = {
className: 'variable',
begin: /\$\([\w-]+\s/, end: /\)/,
keywords: {
built_in:
'subst patsubst strip findstring filter filter-out sort ' +
'word wordlist firstword lastword dir notdir suffix basename ' +
'addsuffix addprefix join wildcard realpath abspath error warning ' +
'shell origin flavor foreach if or and call eval file value',
},
contains: [
VARIABLE,
]
};
/* Variable assignment */
var VAR_ASSIG = {
begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\s*[:+?]?=',
illegal: '\\n',
returnBegin: true,
contains: [
{
begin: '^' + hljs.UNDERSCORE_IDENT_RE, end: '[:+?]?=',
excludeEnd: true,
}
]
};
/* Meta targets (.PHONY) */
var META = {
className: 'meta',
begin: /^\.PHONY:/, end: /$/,
keywords: {'meta-keyword': '.PHONY'},
lexemes: /[\.\w]+/
};
/* Targets */
var TARGET = {
className: 'section',
begin: /^[^\s]+:/, end: /$/,
contains: [VARIABLE,]
};
return {
aliases: ['mk', 'mak'],
keywords:
'define endef undefine ifdef ifndef ifeq ifneq else endif ' +
'include -include sinclude override export unexport private vpath',
lexemes: /[\w-]+/,
contains: [
hljs.HASH_COMMENT_MODE,
VARIABLE,
QUOTE_STRING,
FUNC,
VAR_ASSIG,
META,
TARGET,
]
};
};
/***/ }),
/* 200 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['mma'],
lexemes: '(\\$|\\b)' + hljs.IDENT_RE + '\\b',
keywords: 'AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis ' +
'BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering ' +
'C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ' +
'ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition ' +
'D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform ' +
'DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions ' +
'E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution ' +
'FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve ' +
'FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance ' +
'GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion ' +
'GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution ' +
'HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData ' +
'I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction ' +
'InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess ' +
'JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition ' +
'K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter ' +
'Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions ' +
'LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy ' +
'MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution ' +
'N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator ' +
'NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot ' +
'O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues ' +
'PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList ' +
'PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions ' +
'QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder ' +
'RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity ' +
'SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity ' +
'SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders ' +
'SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub ' +
'Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine ' +
'Transparent ' +
'UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd ' +
'V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution ' +
'WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian ' +
'XMLElement XMLObject Xnor Xor ' +
'Yellow YuleDissimilarity ' +
'ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform ' +
'$Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber',
contains: [
{
className: 'comment',
begin: /\(\*/, end: /\*\)/
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
begin: /\{/, end: /\}/,
illegal: /:/
}
]
};
};
/***/ }),
/* 201 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMON_CONTAINS = [
hljs.C_NUMBER_MODE,
{
className: 'string',
begin: '\'', end: '\'',
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}]
}
];
var TRANSPOSE = {
relevance: 0,
contains: [
{
begin: /'['\.]*/
}
]
};
return {
keywords: {
keyword:
'break case catch classdef continue else elseif end enumerated events for function ' +
'global if methods otherwise parfor persistent properties return spmd switch try while',
built_in:
'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' +
'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' +
'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' +
'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' +
'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' +
'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' +
'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' +
'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' +
'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' +
'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' +
'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' +
'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' +
'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' +
'rosser toeplitz vander wilkinson'
},
illegal: '(//|"|#|/\\*|\\s+/\\w+)',
contains: [
{
className: 'function',
beginKeywords: 'function', end: '$',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'params',
variants: [
{begin: '\\(', end: '\\)'},
{begin: '\\[', end: '\\]'}
]
}
]
},
{
begin: /[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,
returnBegin: true,
relevance: 0,
contains: [
{begin: /[a-zA-Z_][a-zA-Z_0-9]*/, relevance: 0},
TRANSPOSE.contains[0]
]
},
{
begin: '\\[', end: '\\]',
contains: COMMON_CONTAINS,
relevance: 0,
starts: TRANSPOSE
},
{
begin: '\\{', end: /}/,
contains: COMMON_CONTAINS,
relevance: 0,
starts: TRANSPOSE
},
{
// transpose operators at the end of a function call
begin: /\)/,
relevance: 0,
starts: TRANSPOSE
},
hljs.COMMENT('^\\s*\\%\\{\\s*$', '^\\s*\\%\\}\\s*$'),
hljs.COMMENT('\\%', '$')
].concat(COMMON_CONTAINS)
};
};
/***/ }),
/* 202 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = 'if then else elseif for thru do while unless step in and or not';
var LITERALS = 'true false unknown inf minf ind und %e %i %pi %phi %gamma';
var BUILTIN_FUNCTIONS =
' abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate'
+ ' addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix'
+ ' adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type'
+ ' alias allroots alphacharp alphanumericp amortization %and annuity_fv'
+ ' annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2'
+ ' applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply'
+ ' arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger'
+ ' asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order'
+ ' asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method'
+ ' av average_degree backtrace bars barsplot barsplot_description base64 base64_decode'
+ ' bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx'
+ ' bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify'
+ ' bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized'
+ ' bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp'
+ ' bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition'
+ ' block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description'
+ ' break bug_report build_info|10 buildq build_sample burn cabs canform canten'
+ ' cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli'
+ ' cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform'
+ ' cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel'
+ ' cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial'
+ ' cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson'
+ ' cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay'
+ ' ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic'
+ ' cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2'
+ ' charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps'
+ ' chinese cholesky christof chromatic_index chromatic_number cint circulant_graph'
+ ' clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph'
+ ' clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse'
+ ' collectterms columnop columnspace columnswap columnvector combination combine'
+ ' comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph'
+ ' complete_graph complex_number_p components compose_functions concan concat'
+ ' conjugate conmetderiv connected_components connect_vertices cons constant'
+ ' constantp constituent constvalue cont2part content continuous_freq contortion'
+ ' contour_plot contract contract_edge contragrad contrib_ode convert coord'
+ ' copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1'
+ ' covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline'
+ ' ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph'
+ ' cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate'
+ ' declare declare_constvalue declare_dimensions declare_fundamental_dimensions'
+ ' declare_fundamental_units declare_qty declare_translated declare_unit_conversion'
+ ' declare_units declare_weights decsym defcon define define_alt_display define_variable'
+ ' defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten'
+ ' delta demo demoivre denom depends derivdegree derivlist describe desolve'
+ ' determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag'
+ ' diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export'
+ ' dimacs_import dimension dimensionless dimensions dimensions_as_list direct'
+ ' directory discrete_freq disjoin disjointp disolate disp dispcon dispform'
+ ' dispfun dispJordan display disprule dispterms distrib divide divisors divsum'
+ ' dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart'
+ ' draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring'
+ ' edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth'
+ ' einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome'
+ ' ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using'
+ ' ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi'
+ ' ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp'
+ ' equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors'
+ ' euler ev eval_string evenp every evolution evolution2d evundiff example exp'
+ ' expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci'
+ ' expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li'
+ ' expintegral_shi expintegral_si explicit explose exponentialize express expt'
+ ' exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum'
+ ' factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements'
+ ' fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge'
+ ' file_search file_type fillarray findde find_root find_root_abs find_root_error'
+ ' find_root_rel first fix flatten flength float floatnump floor flower_snark'
+ ' flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran'
+ ' fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp'
+ ' foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s'
+ ' from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp'
+ ' fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units'
+ ' fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized'
+ ' gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide'
+ ' gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym'
+ ' geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean'
+ ' geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string'
+ ' get_pixel get_plot_option get_tex_environment get_tex_environment_default'
+ ' get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close'
+ ' gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum'
+ ' gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import'
+ ' graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery'
+ ' graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph'
+ ' grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path'
+ ' hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite'
+ ' hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description'
+ ' hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph'
+ ' icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy'
+ ' ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart'
+ ' imetric implicit implicit_derivative implicit_plot indexed_tensor indices'
+ ' induced_subgraph inferencep inference_result infix info_display init_atensor'
+ ' init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions'
+ ' integrate intersect intersection intervalp intopois intosum invariant1 invariant2'
+ ' inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc'
+ ' inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns'
+ ' inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint'
+ ' invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph'
+ ' is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate'
+ ' isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph'
+ ' items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc'
+ ' jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd'
+ ' jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill'
+ ' killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis'
+ ' kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform'
+ ' kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete'
+ ' kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace'
+ ' kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2'
+ ' kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson'
+ ' kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange'
+ ' laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp'
+ ' lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length'
+ ' let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit'
+ ' Lindstedt linear linearinterpol linear_program linear_regression line_graph'
+ ' linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials'
+ ' listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry'
+ ' log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst'
+ ' lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact'
+ ' lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub'
+ ' lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma'
+ ' make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country'
+ ' make_polygon make_random_state make_rgb_picture makeset make_string_input_stream'
+ ' make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom'
+ ' maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display'
+ ' mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker'
+ ' max max_clique max_degree max_flow maximize_lp max_independent_set max_matching'
+ ' maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform'
+ ' mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete'
+ ' mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic'
+ ' mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t'
+ ' mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull'
+ ' median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree'
+ ' min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor'
+ ' minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton'
+ ' mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions'
+ ' multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff'
+ ' multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary'
+ ' natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext'
+ ' newdet new_graph newline newton new_variable next_prime nicedummies niceindices'
+ ' ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp'
+ ' nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst'
+ ' nthroot nullity nullspace num numbered_boundaries numberp number_to_octets'
+ ' num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai'
+ ' nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin'
+ ' oid_to_octets op opena opena_binary openr openr_binary openw openw_binary'
+ ' operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless'
+ ' orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap'
+ ' out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface'
+ ' parg parGosper parse_string parse_timedate part part2cont partfrac partition'
+ ' partition_set partpol path_digraph path_graph pathname_directory pathname_name'
+ ' pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform'
+ ' pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete'
+ ' pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal'
+ ' pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal'
+ ' pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t'
+ ' pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph'
+ ' petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding'
+ ' playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff'
+ ' poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar'
+ ' polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion'
+ ' poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal'
+ ' poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal'
+ ' poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation'
+ ' poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm'
+ ' poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form'
+ ' poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part'
+ ' poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension'
+ ' poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod'
+ ' powerseries powerset prefix prev_prime primep primes principal_components'
+ ' print printf printfile print_graph printpois printprops prodrac product properties'
+ ' propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct'
+ ' puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp'
+ ' quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile'
+ ' quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2'
+ ' quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f'
+ ' quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel'
+ ' quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal'
+ ' quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t'
+ ' quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t'
+ ' quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan'
+ ' radius random random_bernoulli random_beta random_binomial random_bipartite_graph'
+ ' random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform'
+ ' random_exp random_f random_gamma random_general_finite_discrete random_geometric'
+ ' random_graph random_graph1 random_gumbel random_hypergeometric random_laplace'
+ ' random_logistic random_lognormal random_negative_binomial random_network'
+ ' random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto'
+ ' random_permutation random_poisson random_rayleigh random_regular_graph random_student_t'
+ ' random_tournament random_tree random_weibull range rank rat ratcoef ratdenom'
+ ' ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump'
+ ' ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array'
+ ' read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline'
+ ' read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate'
+ ' realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar'
+ ' rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus'
+ ' rem remainder remarray rembox remcomps remcon remcoord remfun remfunction'
+ ' remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions'
+ ' remove_fundamental_units remove_plot_option remove_vertex rempart remrule'
+ ' remsym remvalue rename rename_file reset reset_displays residue resolvante'
+ ' resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein'
+ ' resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer'
+ ' rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann'
+ ' rinvariant risch rk rmdir rncombine romberg room rootscontract round row'
+ ' rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i'
+ ' scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description'
+ ' scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second'
+ ' sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight'
+ ' setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state'
+ ' set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications'
+ ' set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path'
+ ' show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform'
+ ' simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert'
+ ' sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial'
+ ' skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp'
+ ' skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric'
+ ' skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic'
+ ' skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t'
+ ' skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t'
+ ' skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph'
+ ' smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve'
+ ' solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export'
+ ' sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1'
+ ' spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition'
+ ' sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus'
+ ' ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot'
+ ' starplot_description status std std1 std_bernoulli std_beta std_binomial'
+ ' std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma'
+ ' std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace'
+ ' std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t'
+ ' std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull'
+ ' stemplot stirling stirling1 stirling2 strim striml strimr string stringout'
+ ' stringp strong_components struve_h struve_l sublis sublist sublist_indices'
+ ' submatrix subsample subset subsetp subst substinpart subst_parallel substpart'
+ ' substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext'
+ ' symbolp symmdifference symmetricp system take_channel take_inference tan'
+ ' tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract'
+ ' tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference'
+ ' test_normality test_proportion test_proportions_difference test_rank_sum'
+ ' test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display'
+ ' texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter'
+ ' toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep'
+ ' totalfourier totient tpartpol trace tracematrix trace_options transform_sample'
+ ' translate translate_file transpose treefale tree_reduce treillis treinat'
+ ' triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate'
+ ' truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph'
+ ' truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget'
+ ' ultraspherical underlying_graph undiff union unique uniteigenvectors unitp'
+ ' units unit_step unitvector unorder unsum untellrat untimer'
+ ' untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli'
+ ' var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform'
+ ' var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel'
+ ' var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial'
+ ' var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson'
+ ' var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp'
+ ' verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance'
+ ' vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle'
+ ' vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j'
+ ' wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian'
+ ' xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta'
+ ' zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors'
+ ' zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table'
+ ' absboxchar activecontexts adapt_depth additive adim aform algebraic'
+ ' algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic'
+ ' animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar'
+ ' asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top'
+ ' azimuth background background_color backsubst berlefact bernstein_explicit'
+ ' besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest'
+ ' border boundaries_array box boxchar breakup %c capping cauchysum cbrange'
+ ' cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics'
+ ' colorbox columns commutative complex cone context contexts contour contour_levels'
+ ' cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp'
+ ' cube current_let_rule_package cylinder data_file_name debugmode decreasing'
+ ' default_let_rule_package delay dependencies derivabbrev derivsubst detout'
+ ' diagmetric diff dim dimensions dispflag display2d|10 display_format_internal'
+ ' distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor'
+ ' doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules'
+ ' dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart'
+ ' edge_color edge_coloring edge_partition edge_type edge_width %edispflag'
+ ' elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer'
+ ' epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type'
+ ' %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand'
+ ' expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine'
+ ' factlim factorflag factorial_expand factors_only fb feature features'
+ ' file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10'
+ ' file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color'
+ ' fill_density filled_func fixed_vertices flipflag float2bf font font_size'
+ ' fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim'
+ ' gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command'
+ ' gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command'
+ ' gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command'
+ ' gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble'
+ ' gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args'
+ ' Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both'
+ ' head_length head_type height hypergeometric_representation %iargs ibase'
+ ' icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form'
+ ' ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval'
+ ' infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued'
+ ' integrate_use_rootsof integration_constant integration_constant_counter interpolate_color'
+ ' intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr'
+ ' julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment'
+ ' label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max'
+ ' leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear'
+ ' linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params'
+ ' linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname'
+ ' loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx'
+ ' logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros'
+ ' mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult'
+ ' matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10'
+ ' maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint'
+ ' maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp'
+ ' mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver'
+ ' modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag'
+ ' newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc'
+ ' noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np'
+ ' npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties'
+ ' opsubst optimprefix optionset orientation origin orthopoly_returns_intervals'
+ ' outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution'
+ ' %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart'
+ ' png_file pochhammer_max_index points pointsize point_size points_joined point_type'
+ ' poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm'
+ ' poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list'
+ ' poly_secondary_elimination_order poly_top_reduction_only posfun position'
+ ' powerdisp pred prederror primep_number_of_tests product_use_gamma program'
+ ' programmode promote_float_to_bigfloat prompt proportional_axes props psexpand'
+ ' ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof'
+ ' ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann'
+ ' ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw'
+ ' refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs'
+ ' rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy'
+ ' same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck'
+ ' setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width'
+ ' show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type'
+ ' show_vertices show_weight simp simplified_output simplify_products simpproduct'
+ ' simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn'
+ ' solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag'
+ ' stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda'
+ ' subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric'
+ ' tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials'
+ ' tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch'
+ ' tr track transcompile transform transform_xy translate_fast_arrays transparent'
+ ' transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex'
+ ' tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign'
+ ' trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars'
+ ' tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode'
+ ' tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes'
+ ' ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble'
+ ' usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition'
+ ' vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface'
+ ' wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel'
+ ' xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate'
+ ' xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel'
+ ' xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width'
+ ' ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis'
+ ' ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis'
+ ' yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob'
+ ' zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest';
var SYMBOLS = '_ __ %|0 %%|0';
return {
lexemes: '[A-Za-z_%][0-9A-Za-z_%]*',
keywords: {
keyword: KEYWORDS,
literal: LITERALS,
built_in: BUILTIN_FUNCTIONS,
symbol: SYMBOLS,
},
contains: [
{
className: 'comment',
begin: '/\\*',
end: '\\*/',
contains: ['self']
},
hljs.QUOTE_STRING_MODE,
{
className: 'number',
relevance: 0,
variants: [
{
// float number w/ exponent
// hmm, I wonder if we ought to include other exponent markers?
begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b',
},
{
// bigfloat number
begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b',
relevance: 10
},
{
// float number w/out exponent
// Doesn't seem to recognize floats which start with '.'
begin: '\\b(\\.\\d+|\\d+\\.\\d+)\\b',
},
{
// integer in base up to 36
// Doesn't seem to recognize integers which end with '.'
begin: '\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b',
}
]
}
],
illegal: /@/
}
};
/***/ }),
/* 203 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords:
'int float string vector matrix if else switch case default while do for in break ' +
'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' +
'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' +
'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' +
'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' +
'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' +
'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' +
'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' +
'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' +
'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' +
'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' +
'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' +
'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' +
'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' +
'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' +
'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' +
'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' +
'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' +
'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' +
'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' +
'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' +
'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' +
'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' +
'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' +
'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' +
'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' +
'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' +
'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' +
'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' +
'constrainValue constructionHistory container containsMultibyte contextInfo control ' +
'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' +
'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' +
'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' +
'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' +
'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' +
'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' +
'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' +
'currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx ' +
'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' +
'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' +
'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' +
'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' +
'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' +
'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' +
'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' +
'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' +
'displaySmoothness displayStats displayString displaySurface distanceDimContext ' +
'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' +
'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' +
'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' +
'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' +
'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' +
'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' +
'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' +
'equivalent equivalentTol erf error eval evalDeferred evalEcho event ' +
'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' +
'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' +
'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' +
'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' +
'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' +
'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' +
'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' +
'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' +
'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' +
'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' +
'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' +
'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' +
'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' +
'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' +
'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' +
'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' +
'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' +
'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' +
'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' +
'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' +
'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' +
'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' +
'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' +
'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' +
'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' +
'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' +
'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' +
'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' +
'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' +
'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' +
'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' +
'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' +
'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' +
'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' +
'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' +
'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' +
'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' +
'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' +
'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' +
'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' +
'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' +
'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' +
'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' +
'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' +
'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' +
'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' +
'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' +
'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' +
'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' +
'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' +
'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' +
'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' +
'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' +
'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' +
'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' +
'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' +
'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' +
'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' +
'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' +
'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' +
'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' +
'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' +
'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' +
'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' +
'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' +
'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' +
'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' +
'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' +
'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' +
'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' +
'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' +
'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' +
'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' +
'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' +
'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' +
'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' +
'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' +
'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' +
'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' +
'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' +
'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' +
'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' +
'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' +
'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' +
'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' +
'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' +
'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' +
'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' +
'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' +
'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' +
'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' +
'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' +
'removePanelCategory rename renameAttr renameSelectionList renameUI render ' +
'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' +
'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' +
'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' +
'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' +
'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' +
'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' +
'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' +
'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' +
'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' +
'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' +
'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' +
'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' +
'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' +
'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' +
'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' +
'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' +
'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' +
'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' +
'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' +
'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' +
'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' +
'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' +
'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' +
'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' +
'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' +
'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' +
'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' +
'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' +
'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' +
'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' +
'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' +
'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' +
'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' +
'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' +
'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' +
'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' +
'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' +
'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' +
'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' +
'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' +
'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' +
'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' +
'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' +
'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' +
'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' +
'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' +
'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' +
'trace track trackCtx transferAttributes transformCompare transformLimits translator ' +
'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' +
'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' +
'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' +
'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' +
'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' +
'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' +
'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform',
illegal: '</',
contains: [
hljs.C_NUMBER_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '`', end: '`',
contains: [hljs.BACKSLASH_ESCAPE]
},
{ // eats variables
begin: '[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)'
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
};
/***/ }),
/* 204 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'module use_module import_module include_module end_module initialise ' +
'mutable initialize finalize finalise interface implementation pred ' +
'mode func type inst solver any_pred any_func is semidet det nondet ' +
'multi erroneous failure cc_nondet cc_multi typeclass instance where ' +
'pragma promise external trace atomic or_else require_complete_switch ' +
'require_det require_semidet require_multi require_nondet ' +
'require_cc_multi require_cc_nondet require_erroneous require_failure',
meta:
// pragma
'inline no_inline type_spec source_file fact_table obsolete memo ' +
'loop_check minimal_model terminates does_not_terminate ' +
'check_termination promise_equivalent_clauses ' +
// preprocessor
'foreign_proc foreign_decl foreign_code foreign_type ' +
'foreign_import_module foreign_export_enum foreign_export ' +
'foreign_enum may_call_mercury will_not_call_mercury thread_safe ' +
'not_thread_safe maybe_thread_safe promise_pure promise_semipure ' +
'tabled_for_io local untrailed trailed attach_to_io_state ' +
'can_pass_as_mercury_type stable will_not_throw_exception ' +
'may_modify_trail will_not_modify_trail may_duplicate ' +
'may_not_duplicate affects_liveness does_not_affect_liveness ' +
'doesnt_affect_liveness no_sharing unknown_sharing sharing',
built_in:
'some all not if then else true fail false try catch catch_any ' +
'semidet_true semidet_false semidet_fail impure_true impure semipure'
};
var COMMENT = hljs.COMMENT('%', '$');
var NUMCODE = {
className: 'number',
begin: "0'.\\|0[box][0-9a-fA-F]*"
};
var ATOM = hljs.inherit(hljs.APOS_STRING_MODE, {relevance: 0});
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {relevance: 0});
var STRING_FMT = {
className: 'subst',
begin: '\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]',
relevance: 0
};
STRING.contains.push(STRING_FMT);
var IMPLICATION = {
className: 'built_in',
variants: [
{begin: '<=>'},
{begin: '<=', relevance: 0},
{begin: '=>', relevance: 0},
{begin: '/\\\\'},
{begin: '\\\\/'}
]
};
var HEAD_BODY_CONJUNCTION = {
className: 'built_in',
variants: [
{begin: ':-\\|-->'},
{begin: '=', relevance: 0}
]
};
return {
aliases: ['m', 'moo'],
keywords: KEYWORDS,
contains: [
IMPLICATION,
HEAD_BODY_CONJUNCTION,
COMMENT,
hljs.C_BLOCK_COMMENT_MODE,
NUMCODE,
hljs.NUMBER_MODE,
ATOM,
STRING,
{begin: /:-/} // relevance booster
]
};
};
/***/ }),
/* 205 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
//local labels: %?[FB]?[AT]?\d{1,2}\w+
return {
case_insensitive: true,
aliases: ['mips'],
lexemes: '\\.?' + hljs.IDENT_RE,
keywords: {
meta:
//GNU preprocs
'.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ',
built_in:
'$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' + // integer registers
'$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' + // integer registers
'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' + // integer register aliases
't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' + // integer register aliases
'k0 k1 gp sp fp ra ' + // integer register aliases
'$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' + // floating-point registers
'$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' + // floating-point registers
'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' + // Coprocessor 0 registers
'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' + // Coprocessor 0 registers
'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' + // Coprocessor 0 registers
'ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt ' // Coprocessor 0 registers
},
contains: [
{
className: 'keyword',
begin: '\\b('+ //mnemonics
// 32-bit integer instructions
'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' +
'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' +
'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' +
'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' +
'srlv?|subu?|sw[lr]?|xori?|wsbh|' +
// floating-point instructions
'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' +
'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' +
'(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' +
'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' +
'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' +
'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' +
'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' +
'swx?c1|' +
// system control instructions
'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' +
'rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|' +
'tlti?u?|tnei?|wait|wrpgpr'+
')',
end: '\\s'
},
hljs.COMMENT('[;#]', '$'),
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\'',
end: '[^\\\\]\'',
relevance: 0
},
{
className: 'title',
begin: '\\|', end: '\\|',
illegal: '\\n',
relevance: 0
},
{
className: 'number',
variants: [
{begin: '0x[0-9a-f]+'}, //hex
{begin: '\\b-?\\d+'} //bare number
],
relevance: 0
},
{
className: 'symbol',
variants: [
{begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU MIPS syntax
{begin: '^\\s*[0-9]+:'}, // numbered local labels
{begin: '[0-9]+[bf]' } // number local label reference (backwards, forwards)
],
relevance: 0
}
],
illegal: '\/'
};
};
/***/ }),
/* 206 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords:
'environ vocabularies notations constructors definitions ' +
'registrations theorems schemes requirements begin end definition ' +
'registration cluster existence pred func defpred deffunc theorem ' +
'proof let take assume then thus hence ex for st holds consider ' +
'reconsider such that and in provided of as from be being by means ' +
'equals implies iff redefine define now not or attr is mode ' +
'suppose per cases set thesis contradiction scheme reserve struct ' +
'correctness compatibility coherence symmetry assymetry ' +
'reflexivity irreflexivity connectedness uniqueness commutativity ' +
'idempotence involutiveness projectivity',
contains: [
hljs.COMMENT('::', '$')
]
};
};
/***/ }),
/* 207 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var PERL_KEYWORDS = 'getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ' +
'ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime ' +
'readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq' +
'fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent ' +
'shutdown dump chomp connect getsockname die socketpair close flock exists index shmget' +
'sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr ' +
'unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 ' +
'getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline ' +
'endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand ' +
'mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink ' +
'getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr ' +
'untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link ' +
'getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller ' +
'lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and ' +
'sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 ' +
'chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach ' +
'tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir' +
'ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe ' +
'atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when';
var SUBST = {
className: 'subst',
begin: '[$@]\\{', end: '\\}',
keywords: PERL_KEYWORDS
};
var METHOD = {
begin: '->{', end: '}'
// contains defined later
};
var VAR = {
variants: [
{begin: /\$\d/},
{begin: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},
{begin: /[\$%@][^\s\w{]/, relevance: 0}
]
};
var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR];
var PERL_DEFAULT_CONTAINS = [
VAR,
hljs.HASH_COMMENT_MODE,
hljs.COMMENT(
'^\\=\\w',
'\\=cut',
{
endsWithParent: true
}
),
METHOD,
{
className: 'string',
contains: STRING_CONTAINS,
variants: [
{
begin: 'q[qwxr]?\\s*\\(', end: '\\)',
relevance: 5
},
{
begin: 'q[qwxr]?\\s*\\[', end: '\\]',
relevance: 5
},
{
begin: 'q[qwxr]?\\s*\\{', end: '\\}',
relevance: 5
},
{
begin: 'q[qwxr]?\\s*\\|', end: '\\|',
relevance: 5
},
{
begin: 'q[qwxr]?\\s*\\<', end: '\\>',
relevance: 5
},
{
begin: 'qw\\s+q', end: 'q',
relevance: 5
},
{
begin: '\'', end: '\'',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '"', end: '"'
},
{
begin: '`', end: '`',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '{\\w+}',
contains: [],
relevance: 0
},
{
begin: '\-?\\w+\\s*\\=\\>',
contains: [],
relevance: 0
}
]
},
{
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
},
{ // regexp container
begin: '(\\/\\/|' + hljs.RE_STARTERS_RE + '|\\b(split|return|print|reverse|grep)\\b)\\s*',
keywords: 'split return print reverse grep',
relevance: 0,
contains: [
hljs.HASH_COMMENT_MODE,
{
className: 'regexp',
begin: '(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*',
relevance: 10
},
{
className: 'regexp',
begin: '(m|qr)?/', end: '/[a-z]*',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0 // allows empty "//" which is a common comment delimiter in other languages
}
]
},
{
className: 'function',
beginKeywords: 'sub', end: '(\\s*\\(.*?\\))?[;{]', excludeEnd: true,
relevance: 5,
contains: [hljs.TITLE_MODE]
},
{
begin: '-\\w\\b',
relevance: 0
},
{
begin: "^__DATA__$",
end: "^__END__$",
subLanguage: 'mojolicious',
contains: [
{
begin: "^@@.*",
end: "$",
className: "comment"
}
]
}
];
SUBST.contains = PERL_DEFAULT_CONTAINS;
METHOD.contains = PERL_DEFAULT_CONTAINS;
return {
aliases: ['pl', 'pm'],
lexemes: /[\w\.]+/,
keywords: PERL_KEYWORDS,
contains: PERL_DEFAULT_CONTAINS
};
};
/***/ }),
/* 208 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
subLanguage: 'xml',
contains: [
{
className: 'meta',
begin: '^__(END|DATA)__$'
},
// mojolicious line
{
begin: "^\\s*%{1,2}={0,2}", end: '$',
subLanguage: 'perl'
},
// mojolicious block
{
begin: "<%{1,2}={0,2}",
end: "={0,1}%>",
subLanguage: 'perl',
excludeBegin: true,
excludeEnd: true
}
]
};
};
/***/ }),
/* 209 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var NUMBER = {
className: 'number', relevance: 0,
variants: [
{
begin: '[$][a-fA-F0-9]+'
},
hljs.NUMBER_MODE
]
};
return {
case_insensitive: true,
keywords: {
keyword: 'public private property continue exit extern new try catch ' +
'eachin not abstract final select case default const local global field ' +
'end if then else elseif endif while wend repeat until forever for ' +
'to step next return module inline throw import',
built_in: 'DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil ' +
'Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI',
literal: 'true false null and or shl shr mod'
},
illegal: /\/\*/,
contains: [
hljs.COMMENT('#rem', '#end'),
hljs.COMMENT(
"'",
'$',
{
relevance: 0
}
),
{
className: 'function',
beginKeywords: 'function method', end: '[(=:]|$',
illegal: /\n/,
contains: [
hljs.UNDERSCORE_TITLE_MODE
]
},
{
className: 'class',
beginKeywords: 'class interface', end: '$',
contains: [
{
beginKeywords: 'extends implements'
},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
className: 'built_in',
begin: '\\b(self|super)\\b'
},
{
className: 'meta',
begin: '\\s*#', end: '$',
keywords: {'meta-keyword': 'if else elseif endif end then'}
},
{
className: 'meta',
begin: '^\\s*strict\\b'
},
{
beginKeywords: 'alias', end: '=',
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
hljs.QUOTE_STRING_MODE,
NUMBER
]
}
};
/***/ }),
/* 210 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
// Moonscript keywords
'if then not for in while do return else elseif break continue switch and or ' +
'unless when class extends super local import export from using',
literal:
'true false nil',
built_in:
'_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' +
'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' +
'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' +
'io math os package string table'
};
var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
var SUBST = {
className: 'subst',
begin: /#\{/, end: /}/,
keywords: KEYWORDS
};
var EXPRESSIONS = [
hljs.inherit(hljs.C_NUMBER_MODE,
{starts: {end: '(\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp
{
className: 'string',
variants: [
{
begin: /'/, end: /'/,
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: /"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
}
]
},
{
className: 'built_in',
begin: '@__' + hljs.IDENT_RE
},
{
begin: '@' + hljs.IDENT_RE // relevance booster on par with CoffeeScript
},
{
begin: hljs.IDENT_RE + '\\\\' + hljs.IDENT_RE // inst\method
}
];
SUBST.contains = EXPRESSIONS;
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>';
var PARAMS = {
className: 'params',
begin: '\\([^\\(]', returnBegin: true,
/* We need another contained nameless mode to not have every nested
pair of parens to be called "params" */
contains: [{
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
contains: ['self'].concat(EXPRESSIONS)
}]
};
return {
aliases: ['moon'],
keywords: KEYWORDS,
illegal: /\/\*/,
contains: EXPRESSIONS.concat([
hljs.COMMENT('--', '$'),
{
className: 'function', // function: -> =>
begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>',
returnBegin: true,
contains: [TITLE, PARAMS]
},
{
begin: /[\(,:=]\s*/, // anonymous function start
relevance: 0,
contains: [
{
className: 'function',
begin: PARAMS_RE, end: '[-=]>',
returnBegin: true,
contains: [PARAMS]
}
]
},
{
className: 'class',
beginKeywords: 'class',
end: '$',
illegal: /[:="\[\]]/,
contains: [
{
beginKeywords: 'extends',
endsWithParent: true,
illegal: /[:="\[\]]/,
contains: [TITLE]
},
TITLE
]
},
{
className: 'name', // table
begin: JS_IDENT_RE + ':', end: ':',
returnBegin: true, returnEnd: true,
relevance: 0
}
])
};
};
/***/ }),
/* 211 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
contains: [
{
beginKeywords:
'build create index delete drop explain infer|10 insert merge prepare select update upsert|10',
end: /;/, endsWithParent: true,
keywords: {
// Taken from http://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/reservedwords.html
keyword:
'all alter analyze and any array as asc begin between binary boolean break bucket build by call ' +
'case cast cluster collate collection commit connect continue correlate cover create database ' +
'dataset datastore declare decrement delete derived desc describe distinct do drop each element ' +
'else end every except exclude execute exists explain fetch first flatten for force from ' +
'function grant group gsi having if ignore ilike in include increment index infer inline inner ' +
'insert intersect into is join key keys keyspace known last left let letting like limit lsm map ' +
'mapping matched materialized merge minus namespace nest not number object offset on ' +
'option or order outer over parse partition password path pool prepare primary private privilege ' +
'procedure public raw realm reduce rename return returning revoke right role rollback satisfies ' +
'schema select self semi set show some start statistics string system then to transaction trigger ' +
'truncate under union unique unknown unnest unset update upsert use user using validate value ' +
'valued values via view when where while with within work xor',
// Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/literals.html
literal:
'true false null missing|5',
// Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/functions.html
built_in:
'array_agg array_append array_concat array_contains array_count array_distinct array_ifnull array_length ' +
'array_max array_min array_position array_prepend array_put array_range array_remove array_repeat array_replace ' +
'array_reverse array_sort array_sum avg count max min sum greatest least ifmissing ifmissingornull ifnull ' +
'missingif nullif ifinf ifnan ifnanorinf naninf neginfif posinfif clock_millis clock_str date_add_millis ' +
'date_add_str date_diff_millis date_diff_str date_part_millis date_part_str date_trunc_millis date_trunc_str ' +
'duration_to_str millis str_to_millis millis_to_str millis_to_utc millis_to_zone_name now_millis now_str ' +
'str_to_duration str_to_utc str_to_zone_name decode_json encode_json encoded_size poly_length base64 base64_encode ' +
'base64_decode meta uuid abs acos asin atan atan2 ceil cos degrees e exp ln log floor pi power radians random ' +
'round sign sin sqrt tan trunc object_length object_names object_pairs object_inner_pairs object_values ' +
'object_inner_values object_add object_put object_remove object_unwrap regexp_contains regexp_like regexp_position ' +
'regexp_replace contains initcap length lower ltrim position repeat replace rtrim split substr title trim upper ' +
'isarray isatom isboolean isnumber isobject isstring type toarray toatom toboolean tonumber toobject tostring'
},
contains: [
{
className: 'string',
begin: '\'', end: '\'',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
},
{
className: 'string',
begin: '"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
},
{
className: 'symbol',
begin: '`', end: '`',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 2
},
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_BLOCK_COMMENT_MODE
]
};
};
/***/ }),
/* 212 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VAR = {
className: 'variable',
variants: [
{begin: /\$\d+/},
{begin: /\$\{/, end: /}/},
{begin: '[\\$\\@]' + hljs.UNDERSCORE_IDENT_RE}
]
};
var DEFAULT = {
endsWithParent: true,
lexemes: '[a-z/_]+',
keywords: {
literal:
'on off yes no true false none blocked debug info notice warn error crit ' +
'select break last permanent redirect kqueue rtsig epoll poll /dev/poll'
},
relevance: 0,
illegal: '=>',
contains: [
hljs.HASH_COMMENT_MODE,
{
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, VAR],
variants: [
{begin: /"/, end: /"/},
{begin: /'/, end: /'/}
]
},
// this swallows entire URLs to avoid detecting numbers within
{
begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true,
contains: [VAR]
},
{
className: 'regexp',
contains: [hljs.BACKSLASH_ESCAPE, VAR],
variants: [
{begin: "\\s\\^", end: "\\s|{|;", returnEnd: true},
// regexp locations (~, ~*)
{begin: "~\\*?\\s+", end: "\\s|{|;", returnEnd: true},
// *.example.com
{begin: "\\*(\\.[a-z\\-]+)+"},
// sub.example.*
{begin: "([a-z\\-]+\\.)+\\*"}
]
},
// IP
{
className: 'number',
begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
},
// units
{
className: 'number',
begin: '\\b\\d+[kKmMgGdshdwy]*\\b',
relevance: 0
},
VAR
]
};
return {
aliases: ['nginxconf'],
contains: [
hljs.HASH_COMMENT_MODE,
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s+{', returnBegin: true,
end: '{',
contains: [
{
className: 'section',
begin: hljs.UNDERSCORE_IDENT_RE
}
],
relevance: 0
},
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true,
contains: [
{
className: 'attribute',
begin: hljs.UNDERSCORE_IDENT_RE,
starts: DEFAULT
}
],
relevance: 0
}
],
illegal: '[^\\s\\}]'
};
};
/***/ }),
/* 213 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['nim'],
keywords: {
keyword:
'addr and as asm bind block break case cast const continue converter ' +
'discard distinct div do elif else end enum except export finally ' +
'for from generic if import in include interface is isnot iterator ' +
'let macro method mixin mod nil not notin object of or out proc ptr ' +
'raise ref return shl shr static template try tuple type using var ' +
'when while with without xor yield',
literal:
'shared guarded stdin stdout stderr result true false',
built_in:
'int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float ' +
'float32 float64 bool char string cstring pointer expr stmt void ' +
'auto any range array openarray varargs seq set clong culong cchar ' +
'cschar cshort cint csize clonglong cfloat cdouble clongdouble ' +
'cuchar cushort cuint culonglong cstringarray semistatic'
},
contains: [ {
className: 'meta', // Actually pragma
begin: /{\./,
end: /\.}/,
relevance: 10
}, {
className: 'string',
begin: /[a-zA-Z]\w*"/,
end: /"/,
contains: [{begin: /""/}]
}, {
className: 'string',
begin: /([a-zA-Z]\w*)?"""/,
end: /"""/
},
hljs.QUOTE_STRING_MODE,
{
className: 'type',
begin: /\b[A-Z]\w+\b/,
relevance: 0
}, {
className: 'number',
relevance: 0,
variants: [
{begin: /\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},
{begin: /\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},
{begin: /\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},
{begin: /\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}
]
},
hljs.HASH_COMMENT_MODE
]
}
};
/***/ }),
/* 214 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var NIX_KEYWORDS = {
keyword:
'rec with let in inherit assert if else then',
literal:
'true false or and null',
built_in:
'import abort baseNameOf dirOf isNull builtins map removeAttrs throw ' +
'toString derivation'
};
var ANTIQUOTE = {
className: 'subst',
begin: /\$\{/,
end: /}/,
keywords: NIX_KEYWORDS
};
var ATTRS = {
begin: /[a-zA-Z0-9-_]+(\s*=)/, returnBegin: true,
relevance: 0,
contains: [
{
className: 'attr',
begin: /\S+/
}
]
};
var STRING = {
className: 'string',
contains: [ANTIQUOTE],
variants: [
{begin: "''", end: "''"},
{begin: '"', end: '"'}
]
};
var EXPRESSIONS = [
hljs.NUMBER_MODE,
hljs.HASH_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
STRING,
ATTRS
];
ANTIQUOTE.contains = EXPRESSIONS;
return {
aliases: ["nixos"],
keywords: NIX_KEYWORDS,
contains: EXPRESSIONS
};
};
/***/ }),
/* 215 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var CONSTANTS = {
className: 'variable',
begin: /\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/
};
var DEFINES = {
// ${defines}
className: 'variable',
begin: /\$+{[\w\.:-]+}/
};
var VARIABLES = {
// $variables
className: 'variable',
begin: /\$+\w+/,
illegal: /\(\){}/
};
var LANGUAGES = {
// $(language_strings)
className: 'variable',
begin: /\$+\([\w\^\.:-]+\)/
};
var PARAMETERS = {
// command parameters
className: 'params',
begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)'
};
var COMPILER = {
// !compiler_flags
className: 'keyword',
begin: /\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/
};
var METACHARS = {
// $\n, $\r, $\t, $$
className: 'subst',
begin: /\$(\\[nrt]|\$)/
};
var PLUGINS = {
// plug::ins
className: 'class',
begin: /\w+\:\:\w+/
};
var STRING = {
className: 'string',
variants: [
{
begin: '"', end: '"'
},
{
begin: '\'', end: '\''
},
{
begin: '`', end: '`'
}
],
illegal: /\n/,
contains: [
METACHARS,
CONSTANTS,
DEFINES,
VARIABLES,
LANGUAGES
]
};
return {
case_insensitive: false,
keywords: {
keyword:
'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle',
literal:
'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.COMMENT(
';',
'$',
{
relevance: 0
}
),
{
className: 'function',
beginKeywords: 'Function PageEx Section SectionGroup', end: '$'
},
STRING,
COMPILER,
DEFINES,
VARIABLES,
LANGUAGES,
PARAMETERS,
PLUGINS,
hljs.NUMBER_MODE
]
};
};
/***/ }),
/* 216 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var API_CLASS = {
className: 'built_in',
begin: '\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+',
};
var OBJC_KEYWORDS = {
keyword:
'int float while char export sizeof typedef const struct for union ' +
'unsigned long volatile static bool mutable if do return goto void ' +
'enum else break extern asm case short default double register explicit ' +
'signed typename this switch continue wchar_t inline readonly assign ' +
'readwrite self @synchronized id typeof ' +
'nonatomic super unichar IBOutlet IBAction strong weak copy ' +
'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +
'@private @protected @public @try @property @end @throw @catch @finally ' +
'@autoreleasepool @synthesize @dynamic @selector @optional @required ' +
'@encode @package @import @defs @compatibility_alias ' +
'__bridge __bridge_transfer __bridge_retained __bridge_retain ' +
'__covariant __contravariant __kindof ' +
'_Nonnull _Nullable _Null_unspecified ' +
'__FUNCTION__ __PRETTY_FUNCTION__ __attribute__ ' +
'getter setter retain unsafe_unretained ' +
'nonnull nullable null_unspecified null_resettable class instancetype ' +
'NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER ' +
'NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED ' +
'NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE ' +
'NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END ' +
'NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW ' +
'NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN',
literal:
'false true FALSE TRUE nil YES NO NULL',
built_in:
'BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once'
};
var LEXEMES = /[a-zA-Z@][a-zA-Z0-9_]*/;
var CLASS_KEYWORDS = '@interface @class @protocol @implementation';
return {
aliases: ['mm', 'objc', 'obj-c'],
keywords: OBJC_KEYWORDS,
lexemes: LEXEMES,
illegal: '</',
contains: [
API_CLASS,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_NUMBER_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
variants: [
{
begin: '@"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '\'', end: '[^\\\\]\'',
illegal: '[^\\\\][^\']'
}
]
},
{
className: 'meta',
begin: '#',
end: '$',
contains: [
{
className: 'meta-string',
variants: [
{ begin: '\"', end: '\"' },
{ begin: '<', end: '>' }
]
}
]
},
{
className: 'class',
begin: '(' + CLASS_KEYWORDS.split(' ').join('|') + ')\\b', end: '({|$)', excludeEnd: true,
keywords: CLASS_KEYWORDS, lexemes: LEXEMES,
contains: [
hljs.UNDERSCORE_TITLE_MODE
]
},
{
begin: '\\.'+hljs.UNDERSCORE_IDENT_RE,
relevance: 0
}
]
};
};
/***/ }),
/* 217 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
/* missing support for heredoc-like string (OCaml 4.0.2+) */
return {
aliases: ['ml'],
keywords: {
keyword:
'and as assert asr begin class constraint do done downto else end ' +
'exception external for fun function functor if in include ' +
'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +
'mod module mutable new object of open! open or private rec sig struct ' +
'then to try type val! val virtual when while with ' +
/* camlp4 */
'parser value',
built_in:
/* built-in types */
'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +
/* (some) types in Pervasives */
'in_channel out_channel ref',
literal:
'true false'
},
illegal: /\/\/|>>/,
lexemes: '[a-z_]\\w*!?',
contains: [
{
className: 'literal',
begin: '\\[(\\|\\|)?\\]|\\(\\)',
relevance: 0
},
hljs.COMMENT(
'\\(\\*',
'\\*\\)',
{
contains: ['self']
}
),
{ /* type variable */
className: 'symbol',
begin: '\'[A-Za-z_](?!\')[\\w\']*'
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
},
{ /* polymorphic variant */
className: 'type',
begin: '`[A-Z][\\w\']*'
},
{ /* module or constructor */
className: 'type',
begin: '\\b[A-Z][\\w\']*',
relevance: 0
},
{ /* don't color identifiers, but safely catch all identifiers with '*/
begin: '[a-z_]\\w*\'[\\w\']*', relevance: 0
},
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'number',
begin:
'\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
'0[oO][0-7_]+[Lln]?|' +
'0[bB][01_]+[Lln]?|' +
'[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
relevance: 0
},
{
begin: /[-=]>/ // relevance booster
}
]
}
};
/***/ }),
/* 218 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var SPECIAL_VARS = {
className: 'keyword',
begin: '\\$(f[asn]|t|vp[rtd]|children)'
},
LITERALS = {
className: 'literal',
begin: 'false|true|PI|undef'
},
NUMBERS = {
className: 'number',
begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?', //adds 1e5, 1e-10
relevance: 0
},
STRING = hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal: null}),
PREPRO = {
className: 'meta',
keywords: {'meta-keyword': 'include use'},
begin: 'include|use <',
end: '>'
},
PARAMS = {
className: 'params',
begin: '\\(', end: '\\)',
contains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS]
},
MODIFIERS = {
begin: '[*!#%]',
relevance: 0
},
FUNCTIONS = {
className: 'function',
beginKeywords: 'module function',
end: '\\=|\\{',
contains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE]
};
return {
aliases: ['scad'],
keywords: {
keyword: 'function module include use for intersection_for if else \\%',
literal: 'false true PI undef',
built_in: 'circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
PREPRO,
STRING,
SPECIAL_VARS,
MODIFIERS,
FUNCTIONS
]
}
};
/***/ }),
/* 219 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var OXYGENE_KEYWORDS = 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+
'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+
'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+
'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+
'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+
'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+
'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+
'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';
var CURLY_COMMENT = hljs.COMMENT(
'{',
'}',
{
relevance: 0
}
);
var PAREN_COMMENT = hljs.COMMENT(
'\\(\\*',
'\\*\\)',
{
relevance: 10
}
);
var STRING = {
className: 'string',
begin: '\'', end: '\'',
contains: [{begin: '\'\''}]
};
var CHAR_STRING = {
className: 'string', begin: '(#\\d+)+'
};
var FUNCTION = {
className: 'function',
beginKeywords: 'function constructor destructor procedure method', end: '[:;]',
keywords: 'function constructor|10 destructor|10 procedure|10 method|10',
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)',
keywords: OXYGENE_KEYWORDS,
contains: [STRING, CHAR_STRING]
},
CURLY_COMMENT, PAREN_COMMENT
]
};
return {
case_insensitive: true,
lexemes: /\.?\w+/,
keywords: OXYGENE_KEYWORDS,
illegal: '("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',
contains: [
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
STRING, CHAR_STRING,
hljs.NUMBER_MODE,
FUNCTION,
{
className: 'class',
begin: '=\\bclass\\b', end: 'end;',
keywords: OXYGENE_KEYWORDS,
contains: [
STRING, CHAR_STRING,
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
FUNCTION
]
}
]
};
};
/***/ }),
/* 220 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var CURLY_SUBCOMMENT = hljs.COMMENT(
'{',
'}',
{
contains: ['self']
}
);
return {
subLanguage: 'xml', relevance: 0,
contains: [
hljs.COMMENT('^#', '$'),
hljs.COMMENT(
'\\^rem{',
'}',
{
relevance: 10,
contains: [
CURLY_SUBCOMMENT
]
}
),
{
className: 'meta',
begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
relevance: 10
},
{
className: 'title',
begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
},
{
className: 'variable',
begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?'
},
{
className: 'keyword',
begin: '\\^[\\w\\-\\.\\:]+'
},
{
className: 'number',
begin: '\\^#[0-9a-fA-F]+'
},
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 221 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var MACRO = {
className: 'variable',
begin: /\$[\w\d#@][\w\d_]*/
};
var TABLE = {
className: 'variable',
begin: /<(?!\/)/, end: />/
};
var QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/
};
return {
aliases: ['pf.conf'],
lexemes: /[a-z0-9_<>-]+/,
keywords: {
built_in: /* block match pass are "actions" in pf.conf(5), the rest are
* lexically similar top-level commands.
*/
'block match pass load anchor|5 antispoof|10 set table',
keyword:
'in out log quick on rdomain inet inet6 proto from port os to route' +
'allow-opts divert-packet divert-reply divert-to flags group icmp-type' +
'icmp6-type label once probability recieved-on rtable prio queue' +
'tos tag tagged user keep fragment for os drop' +
'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin' +
'source-hash static-port' +
'dup-to reply-to route-to' +
'parent bandwidth default min max qlimit' +
'block-policy debug fingerprints hostid limit loginterface optimization' +
'reassemble ruleset-optimization basic none profile skip state-defaults' +
'state-policy timeout' +
'const counters persist' +
'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy' +
'source-track global rule max-src-nodes max-src-states max-src-conn' +
'max-src-conn-rate overload flush' +
'scrub|5 max-mss min-ttl no-df|10 random-id',
literal:
'all any no-route self urpf-failed egress|5 unknown'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.NUMBER_MODE,
hljs.QUOTE_STRING_MODE,
MACRO,
TABLE
]
};
};
/***/ }),
/* 222 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VARIABLE = {
begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
};
var PREPROCESSOR = {
className: 'meta', begin: /<\?(php)?|\?>/
};
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],
variants: [
{
begin: 'b"', end: '"'
},
{
begin: 'b\'', end: '\''
},
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})
]
};
var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};
return {
aliases: ['php3', 'php4', 'php5', 'php6'],
case_insensitive: true,
keywords:
'and include_once list abstract global private echo interface as static endswitch ' +
'array null if endwhile or const for endforeach self var while isset public ' +
'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' +
'return parent clone use __CLASS__ __LINE__ else break print eval new ' +
'catch __METHOD__ case exception default die require __FUNCTION__ ' +
'enddeclare final try switch continue endfor endif declare unset true false ' +
'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' +
'yield finally',
contains: [
hljs.HASH_COMMENT_MODE,
hljs.COMMENT('//', '$', {contains: [PREPROCESSOR]}),
hljs.COMMENT(
'/\\*',
'\\*/',
{
contains: [
{
className: 'doctag',
begin: '@[A-Za-z]+'
}
]
}
),
hljs.COMMENT(
'__halt_compiler.+?;',
false,
{
endsWithParent: true,
keywords: '__halt_compiler',
lexemes: hljs.UNDERSCORE_IDENT_RE
}
),
{
className: 'string',
begin: /<<<['"]?\w+['"]?$/, end: /^\w+;?$/,
contains: [
hljs.BACKSLASH_ESCAPE,
{
className: 'subst',
variants: [
{begin: /\$\w+/},
{begin: /\{\$/, end: /\}/}
]
}
]
},
PREPROCESSOR,
{
className: 'keyword', begin: /\$this\b/
},
VARIABLE,
{
// swallow composed identifiers to avoid parsing them as keywords
begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
},
{
className: 'function',
beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
illegal: '\\$|\\[|%',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)',
contains: [
'self',
VARIABLE,
hljs.C_BLOCK_COMMENT_MODE,
STRING,
NUMBER
]
}
]
},
{
className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
illegal: /[:\(\$"]/,
contains: [
{beginKeywords: 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
beginKeywords: 'namespace', end: ';',
illegal: /[\.']/,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
beginKeywords: 'use', end: ';',
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
begin: '=>' // No markup, just a relevance booster
},
STRING,
NUMBER
]
};
};
/***/ }),
/* 223 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'actor addressof and as be break class compile_error compile_intrinsic' +
'consume continue delegate digestof do else elseif embed end error' +
'for fun if ifdef in interface is isnt lambda let match new not object' +
'or primitive recover repeat return struct then trait try type until ' +
'use var where while with xor',
meta:
'iso val tag trn box ref',
literal:
'this false true'
};
var TRIPLE_QUOTE_STRING_MODE = {
className: 'string',
begin: '"""', end: '"""',
relevance: 10
};
var QUOTE_STRING_MODE = {
className: 'string',
begin: '"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE]
};
var SINGLE_QUOTE_CHAR_MODE = {
className: 'string',
begin: '\'', end: '\'',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
};
var TYPE_NAME = {
className: 'type',
begin: '\\b_?[A-Z][\\w]*',
relevance: 0
};
var PRIMED_NAME = {
begin: hljs.IDENT_RE + '\'', relevance: 0
};
var CLASS = {
className: 'class',
beginKeywords: 'class actor', end: '$',
contains: [
hljs.TITLE_MODE,
hljs.C_LINE_COMMENT_MODE
]
}
var FUNCTION = {
className: 'function',
beginKeywords: 'new fun', end: '=>',
contains: [
hljs.TITLE_MODE,
{
begin: /\(/, end: /\)/,
contains: [
TYPE_NAME,
PRIMED_NAME,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
begin: /:/, endsWithParent: true,
contains: [TYPE_NAME]
},
hljs.C_LINE_COMMENT_MODE
]
}
return {
keywords: KEYWORDS,
contains: [
CLASS,
FUNCTION,
TYPE_NAME,
TRIPLE_QUOTE_STRING_MODE,
QUOTE_STRING_MODE,
SINGLE_QUOTE_CHAR_MODE,
PRIMED_NAME,
hljs.C_NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
};
/***/ }),
/* 224 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BACKTICK_ESCAPE = {
begin: '`[\\s\\S]',
relevance: 0
};
var VAR = {
className: 'variable',
variants: [
{begin: /\$[\w\d][\w\d_:]*/}
]
};
var LITERAL = {
className: 'literal',
begin: /\$(null|true|false)\b/
};
var QUOTE_STRING = {
className: 'string',
variants: [
{ begin: /"/, end: /"/ },
{ begin: /@"/, end: /^"@/ }
],
contains: [
BACKTICK_ESCAPE,
VAR,
{
className: 'variable',
begin: /\$[A-z]/, end: /[^A-z]/
}
]
};
var APOS_STRING = {
className: 'string',
variants: [
{ begin: /'/, end: /'/ },
{ begin: /@'/, end: /^'@/ }
]
};
var PS_HELPTAGS = {
className: 'doctag',
variants: [
/* no paramater help tags */
{ begin: /\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/ },
/* one parameter help tags */
{ begin: /\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/ }
]
};
var PS_COMMENT = hljs.inherit(
hljs.COMMENT(null, null),
{
variants: [
/* single-line comment */
{ begin: /#/, end: /$/ },
/* multi-line comment */
{ begin: /<#/, end: /#>/ }
],
contains: [PS_HELPTAGS]
}
);
return {
aliases: ['ps'],
lexemes: /-?[A-z\.\-]+/,
case_insensitive: true,
keywords: {
keyword: 'if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch',
built_in: 'Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction
nomarkup: '-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace'
},
contains: [
BACKTICK_ESCAPE,
hljs.NUMBER_MODE,
QUOTE_STRING,
APOS_STRING,
LITERAL,
VAR,
PS_COMMENT
]
};
};
/***/ }),
/* 225 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +
'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +
'Object StringDict StringList Table TableRow XML ' +
// Java keywords
'false synchronized int abstract float private char boolean static null if const ' +
'for true while long throw strictfp finally protected import native final return void ' +
'enum else break transient new catch instanceof byte super volatile case assert short ' +
'package default double public try this switch continue throws protected public private',
literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',
title: 'setup draw',
built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +
'keyCode pixels focused frameCount frameRate height width ' +
'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +
'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +
'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +
'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +
'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +
'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +
'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +
'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +
'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +
'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +
'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +
'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +
'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +
'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +
'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +
'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +
'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +
'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +
'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +
'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +
'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +
'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 226 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
hljs.C_NUMBER_MODE,
{
begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':',
excludeEnd: true
},
{
begin: '(ncalls|tottime|cumtime)', end: '$',
keywords: 'ncalls tottime|10 cumtime|10 filename',
relevance: 10
},
{
begin: 'function calls', end: '$',
contains: [hljs.C_NUMBER_MODE],
relevance: 10
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\\(', end: '\\)$',
excludeBegin: true, excludeEnd: true,
relevance: 0
}
]
};
};
/***/ }),
/* 227 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var ATOM = {
begin: /[a-z][A-Za-z0-9_]*/,
relevance: 0
};
var VAR = {
className: 'symbol',
variants: [
{begin: /[A-Z][a-zA-Z0-9_]*/},
{begin: /_[A-Za-z0-9_]*/},
],
relevance: 0
};
var PARENTED = {
begin: /\(/,
end: /\)/,
relevance: 0
};
var LIST = {
begin: /\[/,
end: /\]/
};
var LINE_COMMENT = {
className: 'comment',
begin: /%/, end: /$/,
contains: [hljs.PHRASAL_WORDS_MODE]
};
var BACKTICK_STRING = {
className: 'string',
begin: /`/, end: /`/,
contains: [hljs.BACKSLASH_ESCAPE]
};
var CHAR_CODE = {
className: 'string', // 0'a etc.
begin: /0\'(\\\'|.)/
};
var SPACE_CODE = {
className: 'string',
begin: /0\'\\s/ // 0'\s
};
var PRED_OP = { // relevance booster
begin: /:-/
};
var inner = [
ATOM,
VAR,
PARENTED,
PRED_OP,
LIST,
LINE_COMMENT,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
BACKTICK_STRING,
CHAR_CODE,
SPACE_CODE,
hljs.C_NUMBER_MODE
];
PARENTED.contains = inner;
LIST.contains = inner;
return {
contains: inner.concat([
{begin: /\.$/} // relevance booster
])
};
};
/***/ }),
/* 228 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword: 'package import option optional required repeated group',
built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' +
'fixed32 fixed64 sfixed32 sfixed64 bool string bytes',
literal: 'true false'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
{
className: 'class',
beginKeywords: 'message enum service', end: /\{/,
illegal: /\n/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
})
]
},
{
className: 'function',
beginKeywords: 'rpc',
end: /;/, excludeEnd: true,
keywords: 'rpc returns'
},
{
begin: /^\s*[A-Z_]+/,
end: /\s*=/, excludeEnd: true
}
]
};
};
/***/ }),
/* 229 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var PUPPET_KEYWORDS = {
keyword:
/* language keywords */
'and case default else elsif false if in import enherits node or true undef unless main settings $string ',
literal:
/* metaparameters */
'alias audit before loglevel noop require subscribe tag ' +
/* normal attributes */
'owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check ' +
'en_address ip_address realname command environment hour monute month monthday special target weekday '+
'creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore ' +
'links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source ' +
'souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid '+
'ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel ' +
'native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options ' +
'device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use ' +
'message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform ' +
'responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running ' +
'start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age ' +
'password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled ' +
'enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist ' +
'priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey ' +
'sslverify mounted',
built_in:
/* core facts */
'architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers ' +
'domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces '+
'ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion ' +
'kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease ' +
'lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major ' +
'macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease '+
'operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion '+
'rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced '+
'selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime '+
'uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version'
};
var COMMENT = hljs.COMMENT('#', '$');
var IDENT_RE = '([A-Za-z_]|::)(\\w|::)*';
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE});
var VARIABLE = {className: 'variable', begin: '\\$' + IDENT_RE};
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE, VARIABLE],
variants: [
{begin: /'/, end: /'/},
{begin: /"/, end: /"/}
]
};
return {
aliases: ['pp'],
contains: [
COMMENT,
VARIABLE,
STRING,
{
beginKeywords: 'class', end: '\\{|;',
illegal: /=/,
contains: [TITLE, COMMENT]
},
{
beginKeywords: 'define', end: /\{/,
contains: [
{
className: 'section', begin: hljs.IDENT_RE, endsParent: true
}
]
},
{
begin: hljs.IDENT_RE + '\\s+\\{', returnBegin: true,
end: /\S/,
contains: [
{
className: 'keyword',
begin: hljs.IDENT_RE
},
{
begin: /\{/, end: /\}/,
keywords: PUPPET_KEYWORDS,
relevance: 0,
contains: [
STRING,
COMMENT,
{
begin:'[a-zA-Z_]+\\s*=>',
returnBegin: true, end: '=>',
contains: [
{
className: 'attr',
begin: hljs.IDENT_RE,
}
]
},
{
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
},
VARIABLE
]
}
],
relevance: 0
}
]
}
};
/***/ }),
/* 230 */
/***/ (function(module, exports) {
module.exports = // Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000;
function(hljs) {
var STRINGS = { // PB IDE color: #0080FF (Azure Radiance)
className: 'string',
begin: '(~)?"', end: '"',
illegal: '\\n'
};
var CONSTANTS = { // PB IDE color: #924B72 (Cannon Pink)
// "#" + a letter or underscore + letters, digits or underscores + (optional) "$"
className: 'symbol',
begin: '#[a-zA-Z_]\\w*\\$?'
};
return {
aliases: ['pb', 'pbi'],
keywords: // PB IDE color: #006666 (Blue Stone) + Bold
// The following keywords list was taken and adapted from GuShH's PureBasic language file for GeSHi...
'And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect ' +
'CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel ' +
'Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' +
'EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure ' +
'EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ' +
'ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro ' +
'NewList Not Or ProcedureReturn Protected Prototype ' +
'PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion ' +
'Swap To Wend While With XIncludeFile XOr ' +
'Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL',
contains: [
// COMMENTS | PB IDE color: #00AAAA (Persian Green)
hljs.COMMENT(';', '$', {relevance: 0}),
{ // PROCEDURES DEFINITIONS
className: 'function',
begin: '\\b(Procedure|Declare)(C|CDLL|DLL)?\\b',
end: '\\(',
excludeEnd: true,
returnBegin: true,
contains: [
{ // PROCEDURE KEYWORDS | PB IDE color: #006666 (Blue Stone) + Bold
className: 'keyword',
begin: '(Procedure|Declare)(C|CDLL|DLL)?',
excludeEnd: true
},
{ // PROCEDURE RETURN TYPE SETTING | PB IDE color: #000000 (Black)
className: 'type',
begin: '\\.\\w*'
// end: ' ',
},
hljs.UNDERSCORE_TITLE_MODE // PROCEDURE NAME | PB IDE color: #006666 (Blue Stone)
]
},
STRINGS,
CONSTANTS
]
};
};
/***/ }),
/* 231 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'and elif is global as in if from raise for except finally print import pass return ' +
'exec else break not with class assert yield try while continue del or def lambda ' +
'async await nonlocal|10 None True False',
built_in:
'Ellipsis NotImplemented'
};
var PROMPT = {
className: 'meta', begin: /^(>>>|\.\.\.) /
};
var SUBST = {
className: 'subst',
begin: /\{/, end: /\}/,
keywords: KEYWORDS,
illegal: /#/
};
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{
begin: /(u|b)?r?'''/, end: /'''/,
contains: [PROMPT],
relevance: 10
},
{
begin: /(u|b)?r?"""/, end: /"""/,
contains: [PROMPT],
relevance: 10
},
{
begin: /(fr|rf|f)'''/, end: /'''/,
contains: [PROMPT, SUBST]
},
{
begin: /(fr|rf|f)"""/, end: /"""/,
contains: [PROMPT, SUBST]
},
{
begin: /(u|r|ur)'/, end: /'/,
relevance: 10
},
{
begin: /(u|r|ur)"/, end: /"/,
relevance: 10
},
{
begin: /(b|br)'/, end: /'/
},
{
begin: /(b|br)"/, end: /"/
},
{
begin: /(fr|rf|f)'/, end: /'/,
contains: [SUBST]
},
{
begin: /(fr|rf|f)"/, end: /"/,
contains: [SUBST]
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
};
var NUMBER = {
className: 'number', relevance: 0,
variants: [
{begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?'},
{begin: '\\b(0o[0-7]+)[lLjJ]?'},
{begin: hljs.C_NUMBER_RE + '[lLjJ]?'}
]
};
var PARAMS = {
className: 'params',
begin: /\(/, end: /\)/,
contains: ['self', PROMPT, NUMBER, STRING]
};
SUBST.contains = [STRING, NUMBER, PROMPT];
return {
aliases: ['py', 'gyp'],
keywords: KEYWORDS,
illegal: /(<\/|->|\?)|=>/,
contains: [
PROMPT,
NUMBER,
STRING,
hljs.HASH_COMMENT_MODE,
{
variants: [
{className: 'function', beginKeywords: 'def'},
{className: 'class', beginKeywords: 'class'}
],
end: /:/,
illegal: /[${=;\n,]/,
contains: [
hljs.UNDERSCORE_TITLE_MODE,
PARAMS,
{
begin: /->/, endsWithParent: true,
keywords: 'None'
}
]
},
{
className: 'meta',
begin: /^[\t ]*@/, end: /$/
},
{
begin: /\b(print|exec)\(/ // dont highlight keywords-turned-functions in Python 3
}
]
};
};
/***/ }),
/* 232 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var Q_KEYWORDS = {
keyword:
'do while select delete by update from',
literal:
'0b 1b',
built_in:
'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',
type:
'`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
};
return {
aliases:['k', 'kdb'],
keywords: Q_KEYWORDS,
lexemes: /(`?)[A-Za-z0-9_]+\b/,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 233 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'in of on if for while finally var new function do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const export super debugger as async await import',
literal:
'true false null undefined NaN Infinity',
built_in:
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +
'Behavior bool color coordinate date double enumeration font geocircle georectangle ' +
'geoshape int list matrix4x4 parent point quaternion real rect ' +
'size string url variant vector2d vector3d vector4d' +
'Promise'
};
var QML_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9\\._]*';
// Isolate property statements. Ends at a :, =, ;, ,, a comment or end of line.
// Use property class.
var PROPERTY = {
className: 'keyword',
begin: '\\bproperty\\b',
starts: {
className: 'string',
end: '(:|=|;|,|//|/\\*|$)',
returnEnd: true
}
};
// Isolate signal statements. Ends at a ) a comment or end of line.
// Use property class.
var SIGNAL = {
className: 'keyword',
begin: '\\bsignal\\b',
starts: {
className: 'string',
end: '(\\(|:|=|;|,|//|/\\*|$)',
returnEnd: true
}
};
// id: is special in QML. When we see id: we want to mark the id: as attribute and
// emphasize the token following.
var ID_ID = {
className: 'attribute',
begin: '\\bid\\s*:',
starts: {
className: 'string',
end: QML_IDENT_RE,
returnEnd: false
}
};
// Find QML object attribute. An attribute is a QML identifier followed by :.
// Unfortunately it's hard to know where it ends, as it may contain scalars,
// objects, object definitions, or javascript. The true end is either when the parent
// ends or the next attribute is detected.
var QML_ATTRIBUTE = {
begin: QML_IDENT_RE + '\\s*:',
returnBegin: true,
contains: [
{
className: 'attribute',
begin: QML_IDENT_RE,
end: '\\s*:',
excludeEnd: true,
relevance: 0
}
],
relevance: 0
};
// Find QML object. A QML object is a QML identifier followed by { and ends at the matching }.
// All we really care about is finding IDENT followed by { and just mark up the IDENT and ignore the {.
var QML_OBJECT = {
begin: QML_IDENT_RE + '\\s*{', end: '{',
returnBegin: true,
relevance: 0,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: QML_IDENT_RE})
]
};
return {
aliases: ['qt'],
case_insensitive: false,
keywords: KEYWORDS,
contains: [
{
className: 'meta',
begin: /^\s*['"]use (strict|asm)['"]/
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{ // template string
className: 'string',
begin: '`', end: '`',
contains: [
hljs.BACKSLASH_ESCAPE,
{
className: 'subst',
begin: '\\$\\{', end: '\\}'
}
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
},
{ // "value" container
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
keywords: 'return throw case',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.REGEXP_MODE,
{ // E4X / JSX
begin: /</, end: />\s*[);\]]/,
relevance: 0,
subLanguage: 'xml'
}
],
relevance: 0
},
SIGNAL,
PROPERTY,
{
className: 'function',
beginKeywords: 'function', end: /\{/, excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),
{
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}
],
illegal: /\[|%/
},
{
begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
},
ID_ID,
QML_ATTRIBUTE,
QML_OBJECT
],
illegal: /#/
};
};
/***/ }),
/* 234 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*';
return {
contains: [
hljs.HASH_COMMENT_MODE,
{
begin: IDENT_RE,
lexemes: IDENT_RE,
keywords: {
keyword:
'function if in break next repeat else for return switch while try tryCatch ' +
'stop warning require library attach detach source setMethod setGeneric ' +
'setGroupGeneric setClass ...',
literal:
'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' +
'NA_complex_|10'
},
relevance: 0
},
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
relevance: 0
},
{
// explicit integer
className: 'number',
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
relevance: 0
},
{
// number with trailing decimal
className: 'number',
begin: "\\d+\\.(?!\\d)(?:i\\b)?",
relevance: 0
},
{
// number
className: 'number',
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// number with leading decimal
className: 'number',
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// escaped identifier
begin: '`',
end: '`',
relevance: 0
},
{
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{begin: '"', end: '"'},
{begin: "'", end: "'"}
]
}
]
};
};
/***/ }),
/* 235 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords:
'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' +
'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' +
'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' +
'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' +
'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' +
'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' +
'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' +
'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' +
'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' +
'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' +
'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' +
'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' +
'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' +
'TransformPoints Translate TrimCurve WorldBegin WorldEnd',
illegal: '</',
contains: [
hljs.HASH_COMMENT_MODE,
hljs.C_NUMBER_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
};
};
/***/ }),
/* 236 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENTIFIER = '[a-zA-Z-_][^\\n{]+\\{';
var PROPERTY = {
className: 'attribute',
begin: /[a-zA-Z-_]+/, end: /\s*:/, excludeEnd: true,
starts: {
end: ';',
relevance: 0,
contains: [
{
className: 'variable',
begin: /\.[a-zA-Z-_]+/
},
{
className: 'keyword',
begin: /\(optional\)/
}
]
}
};
return {
aliases: ['graph', 'instances'],
case_insensitive: true,
keywords: 'import',
contains: [
// Facet sections
{
begin: '^facet ' + IDENTIFIER,
end: '}',
keywords: 'facet',
contains: [
PROPERTY,
hljs.HASH_COMMENT_MODE
]
},
// Instance sections
{
begin: '^\\s*instance of ' + IDENTIFIER,
end: '}',
keywords: 'name count channels instance-data instance-state instance of',
illegal: /\S/,
contains: [
'self',
PROPERTY,
hljs.HASH_COMMENT_MODE
]
},
// Component sections
{
begin: '^' + IDENTIFIER,
end: '}',
contains: [
PROPERTY,
hljs.HASH_COMMENT_MODE
]
},
// Comments
hljs.HASH_COMMENT_MODE
]
};
};
/***/ }),
/* 237 */
/***/ (function(module, exports) {
module.exports = // Colors from RouterOS terminal:
// green - #0E9A00
// teal - #0C9A9A
// purple - #99069A
// light-brown - #9A9900
function(hljs) {
var STATEMENTS = 'foreach do while for if from to step else on-error and or not in';
// Global commands: Every global command should start with ":" token, otherwise it will be treated as variable.
var GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime';
// Common commands: Following commands available from most sub-menus:
var COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning';
var LITERALS = 'true false yes no nothing nil null';
var OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw';
// print parameters
// Several parameters are available for print command:
// ToDo: var PARAMETERS_PRINT = 'append as-value brief detail count-only file follow follow-only from interval terse value-list without-paging where info';
// ToDo: var OPERATORS = '&& and ! not || or in ~ ^ & << >> + - * /';
// ToDo: var TYPES = 'num number bool boolean str string ip ip6-prefix id time array';
// ToDo: The following tokens serve as delimiters in the grammar: () [] {} : ; $ /
var VAR_PREFIX = 'global local set for foreach';
var VAR = {
className: 'variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)}/}
]
};
var QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VAR,
{
className: 'variable',
begin: /\$\(/, end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
var APOS_STRING = {
className: 'string',
begin: /'/, end: /'/
};
var IPADDR = '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b';
var IPADDR_wBITMASK = IPADDR+'/(3[0-2]|[1-2][0-9]|\\d)';
//////////////////////////////////////////////////////////////////////
return {
aliases: ['routeros', 'mikrotik'],
case_insensitive: true,
lexemes: /:?[\w-]+/,
keywords: {
literal: LITERALS,
keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :'),
},
contains: [
{ // недопустимые конструкции
variants: [
{ begin: /^@/, end: /$/, }, // dns
{ begin: /\/\*/, end: /\*\//, }, // -- comment
{ begin: /%%/, end: /$/, }, // -- comment
{ begin: /^'/, end: /$/, }, // Monkey one line comment
{ begin: /^\s*\/[\w-]+=/, end: /$/, }, // jboss-cli
{ begin: /\/\//, end: /$/, }, // Stan comment
{ begin: /^\[\</, end: /\>\]$/, }, // F# class declaration?
{ begin: /<\//, end: />/, }, // HTML tags
{ begin: /^facet /, end: /\}/, }, // roboconf - лютый костыль )))
{ begin: '^1\\.\\.(\\d+)$', end: /$/, }, // tap
],
illegal: /./,
},
hljs.COMMENT('^#', '$'),
QUOTE_STRING,
APOS_STRING,
VAR,
{ // attribute=value
begin: /[\w-]+\=([^\s\{\}\[\]\(\)]+)/,
relevance: 0,
returnBegin: true,
contains: [
{
className: 'attribute',
begin: /[^=]+/
},
{
begin: /=/,
endsWithParent: true,
relevance: 0,
contains: [
QUOTE_STRING,
APOS_STRING,
VAR,
{
className: 'literal',
begin: '\\b(' + LITERALS.split(' ').join('|') + ')\\b',
},
/*{
// IPv4 addresses and subnets
className: 'number',
variants: [
{begin: IPADDR_wBITMASK+'(,'+IPADDR_wBITMASK+')*'}, //192.168.0.0/24,1.2.3.0/24
{begin: IPADDR+'-'+IPADDR}, // 192.168.0.1-192.168.0.3
{begin: IPADDR+'(,'+IPADDR+')*'}, // 192.168.0.1,192.168.0.34,192.168.24.1,192.168.0.1
]
}, // */
/*{
// MAC addresses and DHCP Client IDs
className: 'number',
begin: /\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\b/,
}, //*/
{
// Не форматировать не классифицированные значения. Необходимо для исключения подсветки значений как built_in.
// className: 'number',
begin: /("[^"]*"|[^\s\{\}\[\]]+)/,
}, //*/
]
} //*/
]
},//*/
{
// HEX values
className: 'number',
begin: /\*[0-9a-fA-F]+/,
}, //*/
{
begin: '\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\s\[\(]|\])',
returnBegin: true,
contains: [
{
className: 'builtin-name', //'function',
begin: /\w+/,
},
],
},
{
className: 'built_in',
variants: [
{begin: '(\\.\\./|/|\\s)((' + OBJECTS.split(' ').join('|') + ');?\\s)+',relevance: 10,},
{begin: /\.\./,},
],
},//*/
]
};
};
/***/ }),
/* 238 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword:
'float color point normal vector matrix while for if do return else break extern continue',
built_in:
'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' +
'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' +
'faceforward filterstep floor format fresnel incident length lightsource log match ' +
'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' +
'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' +
'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' +
'texture textureinfo trace transform vtransform xcomp ycomp zcomp'
},
illegal: '</',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'meta',
begin: '#', end: '$'
},
{
className: 'class',
beginKeywords: 'surface displacement light volume imager', end: '\\('
},
{
beginKeywords: 'illuminate illuminance gather', end: '\\('
}
]
};
};
/***/ }),
/* 239 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword: 'BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE ' +
'INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 ' +
'INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 ' +
'INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 ' +
'INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 ' +
'INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 ' +
'INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 ' +
'INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 ' +
'INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 ' +
'INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 ' +
'INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 ' +
'INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 ' +
'INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 ' +
'INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 ' +
'INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 ' +
'MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER ' +
'OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE ' +
'NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH ' +
'IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND ' +
'UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ' +
'ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE ' +
'GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE ' +
'SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING ' +
'DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF ' +
'MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY ' +
'YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE ' +
'COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR ' +
'READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ' +
'ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE ' +
'EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE ' +
'SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL ' +
'COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN ' +
'MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING ' +
'FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM ' +
'NUMDAYS READ_DATE STAGING',
built_in: 'IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML ' +
'DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT ' +
'DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE ' +
'DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT ' +
'DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'literal',
variants: [
{begin: '#\\s+[a-zA-Z\\ \\.]*', relevance: 0}, // looks like #-comment
{begin: '#[a-zA-Z\\ \\.]+'}
]
}
]
};
};
/***/ }),
/* 240 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var NUM_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?';
var KEYWORDS =
'alignof as be box break const continue crate do else enum extern ' +
'false fn for if impl in let loop match mod mut offsetof once priv ' +
'proc pub pure ref return self Self sizeof static struct super trait true ' +
'type typeof unsafe unsized use virtual while where yield move default';
var BUILTINS =
// functions
'drop ' +
// types
'i8 i16 i32 i64 i128 isize ' +
'u8 u16 u32 u64 u128 usize ' +
'f32 f64 ' +
'str char bool ' +
'Box Option Result String Vec ' +
// traits
'Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug ' +
'PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator ' +
'Extend IntoIterator DoubleEndedIterator ExactSizeIterator ' +
'SliceConcatExt ToString ' +
// macros
'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +
'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' +
'include_bin! include_str! line! local_data_key! module_path! ' +
'option_env! print! println! select! stringify! try! unimplemented! ' +
'unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!';
return {
aliases: ['rs'],
keywords: {
keyword:
KEYWORDS,
literal:
'true false Some None Ok Err',
built_in:
BUILTINS
},
lexemes: hljs.IDENT_RE + '!?',
illegal: '</',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.COMMENT('/\\*', '\\*/', {contains: ['self']}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {begin: /b?"/, illegal: null}),
{
className: 'string',
variants: [
{ begin: /r(#*)"(.|\n)*?"\1(?!#)/ },
{ begin: /b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/ }
]
},
{
className: 'symbol',
begin: /'[a-zA-Z_][a-zA-Z0-9_]*/
},
{
className: 'number',
variants: [
{ begin: '\\b0b([01_]+)' + NUM_SUFFIX },
{ begin: '\\b0o([0-7_]+)' + NUM_SUFFIX },
{ begin: '\\b0x([A-Fa-f0-9_]+)' + NUM_SUFFIX },
{ begin: '\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)' +
NUM_SUFFIX
}
],
relevance: 0
},
{
className: 'function',
beginKeywords: 'fn', end: '(\\(|<)', excludeEnd: true,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
className: 'meta',
begin: '#\\!?\\[', end: '\\]',
contains: [
{
className: 'meta-string',
begin: /"/, end: /"/
}
]
},
{
className: 'class',
beginKeywords: 'type', end: ';',
contains: [
hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})
],
illegal: '\\S'
},
{
className: 'class',
beginKeywords: 'trait enum struct union', end: '{',
contains: [
hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})
],
illegal: '[\\w\\d]'
},
{
begin: hljs.IDENT_RE + '::',
keywords: {built_in: BUILTINS}
},
{
begin: '->'
}
]
};
};
/***/ }),
/* 241 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var ANNOTATION = { className: 'meta', begin: '@[A-Za-z]+' };
// used in strings for escaping/interpolation/substitution
var SUBST = {
className: 'subst',
variants: [
{begin: '\\$[A-Za-z0-9_]+'},
{begin: '\\${', end: '}'}
]
};
var STRING = {
className: 'string',
variants: [
{
begin: '"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '"""', end: '"""',
relevance: 10
},
{
begin: '[a-z]+"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
},
{
className: 'string',
begin: '[a-z]+"""', end: '"""',
contains: [SUBST],
relevance: 10
}
]
};
var SYMBOL = {
className: 'symbol',
begin: '\'\\w[\\w\\d_]*(?!\')'
};
var TYPE = {
className: 'type',
begin: '\\b[A-Z][A-Za-z0-9_]*',
relevance: 0
};
var NAME = {
className: 'title',
begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,
relevance: 0
};
var CLASS = {
className: 'class',
beginKeywords: 'class object trait type',
end: /[:={\[\n;]/,
excludeEnd: true,
contains: [
{
beginKeywords: 'extends with',
relevance: 10
},
{
begin: /\[/,
end: /\]/,
excludeBegin: true,
excludeEnd: true,
relevance: 0,
contains: [TYPE]
},
{
className: 'params',
begin: /\(/,
end: /\)/,
excludeBegin: true,
excludeEnd: true,
relevance: 0,
contains: [TYPE]
},
NAME
]
};
var METHOD = {
className: 'function',
beginKeywords: 'def',
end: /[:={\[(\n;]/,
excludeEnd: true,
contains: [NAME]
};
return {
keywords: {
literal: 'true false null',
keyword: 'type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
STRING,
SYMBOL,
TYPE,
METHOD,
CLASS,
hljs.C_NUMBER_MODE,
ANNOTATION
]
};
};
/***/ }),
/* 242 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var SCHEME_IDENT_RE = '[^\\(\\)\\[\\]\\{\\}",\'`;#|\\\\\\s]+';
var SCHEME_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+([./]\\d+)?';
var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';
var BUILTINS = {
'builtin-name':
'case-lambda call/cc class define-class exit-handler field import ' +
'inherit init-field interface let*-values let-values let/ec mixin ' +
'opt-lambda override protect provide public rename require ' +
'require-for-syntax syntax syntax-case syntax-error unit/sig unless ' +
'when with-syntax and begin call-with-current-continuation ' +
'call-with-input-file call-with-output-file case cond define ' +
'define-syntax delay do dynamic-wind else for-each if lambda let let* ' +
'let-syntax letrec letrec-syntax map or syntax-rules \' * + , ,@ - ... / ' +
'; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan ' +
'boolean? caar cadr call-with-input-file call-with-output-file ' +
'call-with-values car cdddar cddddr cdr ceiling char->integer ' +
'char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? ' +
'char-downcase char-lower-case? char-numeric? char-ready? char-upcase ' +
'char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? ' +
'char? close-input-port close-output-port complex? cons cos ' +
'current-input-port current-output-port denominator display eof-object? ' +
'eq? equal? eqv? eval even? exact->inexact exact? exp expt floor ' +
'force gcd imag-part inexact->exact inexact? input-port? integer->char ' +
'integer? interaction-environment lcm length list list->string ' +
'list->vector list-ref list-tail list? load log magnitude make-polar ' +
'make-rectangular make-string make-vector max member memq memv min ' +
'modulo negative? newline not null-environment null? number->string ' +
'number? numerator odd? open-input-file open-output-file output-port? ' +
'pair? peek-char port? positive? procedure? quasiquote quote quotient ' +
'rational? rationalize read read-char real-part real? remainder reverse ' +
'round scheme-report-environment set! set-car! set-cdr! sin sqrt string ' +
'string->list string->number string->symbol string-append string-ci<=? ' +
'string-ci<? string-ci=? string-ci>=? string-ci>? string-copy ' +
'string-fill! string-length string-ref string-set! string<=? string<? ' +
'string=? string>=? string>? string? substring symbol->string symbol? ' +
'tan transcript-off transcript-on truncate values vector ' +
'vector->list vector-fill! vector-length vector-ref vector-set! ' +
'with-input-from-file with-output-to-file write write-char zero?'
};
var SHEBANG = {
className: 'meta',
begin: '^#!',
end: '$'
};
var LITERAL = {
className: 'literal',
begin: '(#t|#f|#\\\\' + SCHEME_IDENT_RE + '|#\\\\.)'
};
var NUMBER = {
className: 'number',
variants: [
{ begin: SCHEME_SIMPLE_NUMBER_RE, relevance: 0 },
{ begin: SCHEME_COMPLEX_NUMBER_RE, relevance: 0 },
{ begin: '#b[0-1]+(/[0-1]+)?' },
{ begin: '#o[0-7]+(/[0-7]+)?' },
{ begin: '#x[0-9a-f]+(/[0-9a-f]+)?' }
]
};
var STRING = hljs.QUOTE_STRING_MODE;
var REGULAR_EXPRESSION = {
className: 'regexp',
begin: '#[pr]x"',
end: '[^\\\\]"'
};
var COMMENT_MODES = [
hljs.COMMENT(
';',
'$',
{
relevance: 0
}
),
hljs.COMMENT('#\\|', '\\|#')
];
var IDENT = {
begin: SCHEME_IDENT_RE,
relevance: 0
};
var QUOTED_IDENT = {
className: 'symbol',
begin: '\'' + SCHEME_IDENT_RE
};
var BODY = {
endsWithParent: true,
relevance: 0
};
var QUOTED_LIST = {
variants: [
{ begin: /'/ },
{ begin: '`' }
],
contains: [
{
begin: '\\(', end: '\\)',
contains: ['self', LITERAL, STRING, NUMBER, IDENT, QUOTED_IDENT]
}
]
};
var NAME = {
className: 'name',
begin: SCHEME_IDENT_RE,
lexemes: SCHEME_IDENT_RE,
keywords: BUILTINS
};
var LAMBDA = {
begin: /lambda/, endsWithParent: true, returnBegin: true,
contains: [
NAME,
{
begin: /\(/, end: /\)/, endsParent: true,
contains: [IDENT],
}
]
};
var LIST = {
variants: [
{ begin: '\\(', end: '\\)' },
{ begin: '\\[', end: '\\]' }
],
contains: [LAMBDA, NAME, BODY]
};
BODY.contains = [LITERAL, NUMBER, STRING, IDENT, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES);
return {
illegal: /\S/,
contains: [SHEBANG, NUMBER, STRING, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES)
};
};
/***/ }),
/* 243 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMON_CONTAINS = [
hljs.C_NUMBER_MODE,
{
className: 'string',
begin: '\'|\"', end: '\'|\"',
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}]
}
];
return {
aliases: ['sci'],
lexemes: /%?\w+/,
keywords: {
keyword: 'abort break case clear catch continue do elseif else endfunction end for function '+
'global if pause return resume select try then while',
literal:
'%f %F %t %T %pi %eps %inf %nan %e %i %z %s',
built_in: // Scilab has more than 2000 functions. Just list the most commons
'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error '+
'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty '+
'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log '+
'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real '+
'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan '+
'type typename warning zeros matrix'
},
illegal: '("|#|/\\*|\\s+/\\w+)',
contains: [
{
className: 'function',
beginKeywords: 'function', end: '$',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)'
}
]
},
{
begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '',
relevance: 0
},
{
begin: '\\[', end: '\\]\'*[\\.\']*',
relevance: 0,
contains: COMMON_CONTAINS
},
hljs.COMMENT('//', '$')
].concat(COMMON_CONTAINS)
};
};
/***/ }),
/* 244 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
var VARIABLE = {
className: 'variable',
begin: '(\\$' + IDENT_RE + ')\\b'
};
var HEXCOLOR = {
className: 'number', begin: '#[0-9A-Fa-f]+'
};
var DEF_INTERNALS = {
className: 'attribute',
begin: '[A-Z\\_\\.\\-]+', end: ':',
excludeEnd: true,
illegal: '[^\\s]',
starts: {
endsWithParent: true, excludeEnd: true,
contains: [
HEXCOLOR,
hljs.CSS_NUMBER_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'meta', begin: '!important'
}
]
}
};
return {
case_insensitive: true,
illegal: '[=/|\']',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'selector-id', begin: '\\#[A-Za-z0-9_-]+',
relevance: 0
},
{
className: 'selector-class', begin: '\\.[A-Za-z0-9_-]+',
relevance: 0
},
{
className: 'selector-attr', begin: '\\[', end: '\\]',
illegal: '$'
},
{
className: 'selector-tag', // begin: IDENT_RE, end: '[,|\\s]'
begin: '\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b',
relevance: 0
},
{
begin: ':(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)'
},
{
begin: '::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)'
},
VARIABLE,
{
className: 'attribute',
begin: '\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b',
illegal: '[^\\s]'
},
{
begin: '\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b'
},
{
begin: ':', end: ';',
contains: [
VARIABLE,
HEXCOLOR,
hljs.CSS_NUMBER_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
{
className: 'meta', begin: '!important'
}
]
},
{
begin: '@', end: '[{;]',
keywords: 'mixin include extend for if else each while charset import debug media page content font-face namespace warn',
contains: [
VARIABLE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
HEXCOLOR,
hljs.CSS_NUMBER_MODE,
{
begin: '\\s[A-Za-z0-9_.-]+',
relevance: 0
}
]
}
]
};
};
/***/ }),
/* 245 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['console'],
contains: [
{
className: 'meta',
begin: '^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]',
starts: {
end: '$', subLanguage: 'bash'
}
},
]
}
};
/***/ }),
/* 246 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var smali_instr_low_prio = ['add', 'and', 'cmp', 'cmpg', 'cmpl', 'const', 'div', 'double', 'float', 'goto', 'if', 'int', 'long', 'move', 'mul', 'neg', 'new', 'nop', 'not', 'or', 'rem', 'return', 'shl', 'shr', 'sput', 'sub', 'throw', 'ushr', 'xor'];
var smali_instr_high_prio = ['aget', 'aput', 'array', 'check', 'execute', 'fill', 'filled', 'goto/16', 'goto/32', 'iget', 'instance', 'invoke', 'iput', 'monitor', 'packed', 'sget', 'sparse'];
var smali_keywords = ['transient', 'constructor', 'abstract', 'final', 'synthetic', 'public', 'private', 'protected', 'static', 'bridge', 'system'];
return {
aliases: ['smali'],
contains: [
{
className: 'string',
begin: '"', end: '"',
relevance: 0
},
hljs.COMMENT(
'#',
'$',
{
relevance: 0
}
),
{
className: 'keyword',
variants: [
{begin: '\\s*\\.end\\s[a-zA-Z0-9]*'},
{begin: '^[ ]*\\.[a-zA-Z]*', relevance: 0},
{begin: '\\s:[a-zA-Z_0-9]*', relevance: 0},
{begin: '\\s(' + smali_keywords.join('|') + ')'}
]
},
{
className: 'built_in',
variants : [
{
begin: '\\s('+smali_instr_low_prio.join('|')+')\\s'
},
{
begin: '\\s('+smali_instr_low_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)+\\s',
relevance: 10
},
{
begin: '\\s('+smali_instr_high_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)*\\s',
relevance: 10
},
]
},
{
className: 'class',
begin: 'L[^\(;:\n]*;',
relevance: 0
},
{
begin: '[vp][0-9]+',
}
]
};
};
/***/ }),
/* 247 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*';
var CHAR = {
className: 'string',
begin: '\\$.{1}'
};
var SYMBOL = {
className: 'symbol',
begin: '#' + hljs.UNDERSCORE_IDENT_RE
};
return {
aliases: ['st'],
keywords: 'self super nil true false thisContext', // only 6
contains: [
hljs.COMMENT('"', '"'),
hljs.APOS_STRING_MODE,
{
className: 'type',
begin: '\\b[A-Z][A-Za-z0-9_]*',
relevance: 0
},
{
begin: VAR_IDENT_RE + ':',
relevance: 0
},
hljs.C_NUMBER_MODE,
SYMBOL,
CHAR,
{
// This looks more complicated than needed to avoid combinatorial
// explosion under V8. It effectively means `| var1 var2 ... |` with
// whitespace adjacent to `|` being optional.
begin: '\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\|',
returnBegin: true, end: /\|/,
illegal: /\S/,
contains: [{begin: '(\\|[ ]*)?' + VAR_IDENT_RE}]
},
{
begin: '\\#\\(', end: '\\)',
contains: [
hljs.APOS_STRING_MODE,
CHAR,
hljs.C_NUMBER_MODE,
SYMBOL
]
}
]
};
};
/***/ }),
/* 248 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['ml'],
keywords: {
keyword:
/* according to Definition of Standard ML 97 */
'abstype and andalso as case datatype do else end eqtype ' +
'exception fn fun functor handle if in include infix infixr ' +
'let local nonfix of op open orelse raise rec sharing sig ' +
'signature struct structure then type val with withtype where while',
built_in:
/* built-in types according to basis library */
'array bool char exn int list option order real ref string substring vector unit word',
literal:
'true false NONE SOME LESS EQUAL GREATER nil'
},
illegal: /\/\/|>>/,
lexemes: '[a-z_]\\w*!?',
contains: [
{
className: 'literal',
begin: /\[(\|\|)?\]|\(\)/,
relevance: 0
},
hljs.COMMENT(
'\\(\\*',
'\\*\\)',
{
contains: ['self']
}
),
{ /* type variable */
className: 'symbol',
begin: '\'[A-Za-z_](?!\')[\\w\']*'
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
},
{ /* polymorphic variant */
className: 'type',
begin: '`[A-Z][\\w\']*'
},
{ /* module or constructor */
className: 'type',
begin: '\\b[A-Z][\\w\']*',
relevance: 0
},
{ /* don't color identifiers, but safely catch all identifiers with '*/
begin: '[a-z_]\\w*\'[\\w\']*'
},
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'number',
begin:
'\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
'0[oO][0-7_]+[Lln]?|' +
'0[bB][01_]+[Lln]?|' +
'[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
relevance: 0
},
{
begin: /[-=]>/ // relevance booster
}
]
};
};
/***/ }),
/* 249 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var CPP = hljs.getLanguage('cpp').exports;
// In SQF, a variable start with _
var VARIABLE = {
className: 'variable',
begin: /\b_+[a-zA-Z_]\w*/
};
// In SQF, a function should fit myTag_fnc_myFunction pattern
// https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function
var FUNCTION = {
className: 'title',
begin: /[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/
};
// In SQF strings, quotes matching the start are escaped by adding a consecutive.
// Example of single escaped quotes: " "" " and ' '' '.
var STRINGS = {
className: 'string',
variants: [
{
begin: '"',
end: '"',
contains: [{begin: '""', relevance: 0}]
},
{
begin: '\'',
end: '\'',
contains: [{begin: '\'\'', relevance: 0}]
}
]
};
return {
aliases: ['sqf'],
case_insensitive: true,
keywords: {
keyword:
'case catch default do else exit exitWith for forEach from if ' +
'switch then throw to try waitUntil while with',
built_in:
'abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames ' +
'actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey ' +
'add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo ' +
'addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea ' +
'addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler ' +
'addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal ' +
'addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine ' +
'addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool ' +
'addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler ' +
'addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem ' +
'addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem ' +
'addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint ' +
'addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem addWeaponPool ' +
'addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide ' +
'AISFinishHeal alive all3DENEntities allControls allCurators allCutLayers allDead allDeadMen ' +
'allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile ' +
'allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn ' +
'allowSprint allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate ' +
'animateDoor animateSource animationNames animationPhase animationSourcePhase animationState ' +
'append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo ' +
'assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator ' +
'assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget ' +
'assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 ' +
'atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled ' +
'backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor ' +
'behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo ' +
'briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension ' +
'camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy ' +
'cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile ' +
'camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov ' +
'camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir ' +
'camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget ' +
'camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest ' +
'cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend canUnloadInCombat ' +
'canVehicleCargo captive captiveNum cbChecked cbSetChecked ceil channelEnabled cheatsEnabled ' +
'checkAIFeature checkVisibility civilian className clearAllItemsFromBackpack clearBackpackCargo ' +
'clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool ' +
'clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio ' +
'clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool clientOwner closeDialog closeDisplay ' +
'closeOverlay collapseObjectTree collect3DENHistory combatMode commandArtilleryFire commandChat ' +
'commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove ' +
'commandRadio commandStop commandSuppressiveFire commandTarget commandWatch comment commitOverlay ' +
'compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName ' +
'configNull configProperties configSourceAddonList configSourceMod configSourceModList ' +
'connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard ' +
'copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown ' +
'create3DENComposition create3DENEntity createAgent createCenter createDialog createDiaryLink ' +
'createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup ' +
'createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine ' +
'createMissionDisplay createMPCampaignDisplay createSimpleObject createSimpleTask createSite ' +
'createSoundSource createTask createTeam createTrigger createUnit createVehicle createVehicleCrew ' +
'createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ' +
'ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ' +
'ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ' +
'ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ' +
'ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ' +
'ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ' +
'ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ' +
'ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ' +
'ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ' +
'ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ' +
'ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ' +
'ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ' +
'ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ' +
'ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ' +
'ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ' +
'ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible ' +
'curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef ' +
'curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints ' +
'curatorRegisteredObjects curatorSelected curatorWaypointCost current3DENOperation currentChannel ' +
'currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret ' +
'currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable ' +
'currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret ' +
'currentZeroing cursorObject cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText ' +
'damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg ' +
'delete3DENEntities deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup ' +
'deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources ' +
'deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach ' +
'detectedMines diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts ' +
'diag_activeSQSScripts diag_captureFrame diag_captureSlowFrame diag_codePerformance diag_drawMode ' +
'diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_list diag_log diag_logSlowFrame ' +
'diag_mergeConfigFile diag_recordTurretLimits diag_tickTime diag_toggle dialog diarySubjectExists ' +
'didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction ' +
'directSay disableAI disableCollisionWith disableConversation disableDebriefingStats ' +
'disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment ' +
'disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull ' +
'displayParent displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler ' +
'dissolveTeam distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire ' +
'doFire doFollow doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch ' +
'drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon ' +
'drawRectangle driver drop east echo edit3DENMissionAttributes editObject editorSetEventHandler ' +
'effectiveCommander emptyPositions enableAI enableAIFeature enableAimPrecision enableAttack ' +
'enableAudioFeature enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot ' +
'enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment ' +
'enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio ' +
'enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences ' +
'enableSimulation enableSimulationGlobal enableStamina enableTeamSwitch enableUAVConnectability ' +
'enableUAVWaypoints enableVehicleCargo endLoadingScreen endMission engineOn enginesIsOnRTD ' +
'enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft ' +
'evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp ' +
'expectedDestination exportJIPMessages eyeDirection eyePos face faction fadeMusic fadeRadio ' +
'fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject ' +
'findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire ' +
'fireAtTarget firstBackpack flag flagOwner flagSide flagTexture fleeing floor flyInHeight ' +
'flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceMap forceRespawn ' +
'forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent ' +
'forEachMemberTeam format formation formationDirection formationLeader formationMembers ' +
'formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew ' +
'gearIDCAmmoCount gearSlotAmmoCount gearSlotData get3DENActionState get3DENAttribute get3DENCamera ' +
'get3DENConnections get3DENEntity get3DENEntityID get3DENGrid get3DENIconsVisible ' +
'get3DENLayerEntities get3DENLinesVisible get3DENMissionAttribute get3DENMouseOver get3DENSelected ' +
'getAimingCoef getAllHitPointsDamage getAllOwnedMines getAmmoCargo getAnimAimPrecision ' +
'getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA ' +
'getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining ' +
'getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState ' +
'getClientStateNumber getConnectedUAV getCustomAimingCoef getDammage getDescription getDir ' +
'getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset ' +
'getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons ' +
'getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor ' +
'getMarkerPos getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue ' +
'getMissionDLCs getMissionLayerEntities getModelInfo getMousePosition getNumber getObjectArgument ' +
'getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType ' +
'getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPilotCameraDirection ' +
'getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget getPlayerChannel ' +
'getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL ' +
'getPosATLVisual getPosVisual getPosWorld getRelDir getRelPos getRemoteSensorsDisabled ' +
'getRepairCargo getResolution getShadowDistance getShotParents getSlingLoad getSpeed getStamina ' +
'getStatValue getSuppression getTerrainHeightASL getText getUnitLoadout getUnitTrait getVariable ' +
'getVehicleCargo getWeaponCargo getWeaponSway getWPPos glanceAt globalChat globalRadio goggles ' +
'goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner ' +
'groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems ' +
'handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups ' +
'hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup ' +
'hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC ' +
'hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups ' +
'importance in inArea inAreaArray incapacitatedState independent inflame inflamed ' +
'inGameUISetEventHandler inheritsFrom initAmbientLife inPolygon inputAction inRangeOfArtillery ' +
'insertEditorObject intersect is3DEN is3DENMultiplayer isAbleToBreathe isAgent isArray ' +
'isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn ' +
'isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll ' +
'isEqualTypeAny isEqualTypeArray isEqualTypeParams isFilePatchingEnabled isFlashlightOn ' +
'isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector ' +
'isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire ' +
'isMarkedForCollection isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden ' +
'isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP ' +
'isServer isShowing3DIcons isSprintAllowed isStaminaEnabled isSteamMission ' +
'isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable ' +
'isUAVConnected isUniformAllowed isVehicleCargo isWalking isWeaponDeployed isWeaponRested ' +
'itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase ' +
'kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage ' +
'keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel ' +
'lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture ' +
'lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor ' +
'lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText ' +
'lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits ' +
'libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed ' +
'linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces ' +
'lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear ' +
'lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture ' +
'lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue ' +
'lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine ' +
'loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock ' +
'lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockIdentity ' +
'lockTurret lockWP log logEntities logNetwork logNetworkTerminate lookAt lookAtPos magazineCargo ' +
'magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail ' +
'magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret ' +
'magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera ' +
'mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos ' +
'markerShape markerSize markerText markerType max members menuAction menuAdd menuChecked menuClear ' +
'menuCollapse menuData menuDelete menuEnable menuEnabled menuExpand menuHover menuPicture ' +
'menuSetAction menuSetCheck menuSetData menuSetPicture menuSetValue menuShortcut menuShortcutText ' +
'menuSize menuSort menuText menuURL menuValue min mineActive mineDetectedBy missionConfigFile ' +
'missionDifficulty missionName missionNamespace missionStart missionVersion mod modelToWorld ' +
'modelToWorldVisual modParams moonIntensity moonPhase morale move move3DENCamera moveInAny ' +
'moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut ' +
'moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound nearEntities ' +
'nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject ' +
'nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads nearSupplies ' +
'nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems ' +
'not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup ' +
'onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick ' +
'onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged ' +
'onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted ' +
'onShowNewObject onTeamSwitch openCuratorInterface openDLCPage openMap openYoutubeVideo opfor or ' +
'orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace ' +
'particlesQuality pi pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW ' +
'playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide ' +
'playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission ' +
'playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ' +
'ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ' +
'ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound ' +
'preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon ' +
'primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion ' +
'profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition ' +
'progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack ' +
'pushBackUnique putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd ' +
'radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume ' +
'rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload ' +
'reloadEnabled remoteControl remoteExec remoteExecCall remove3DENConnection remove3DENEventHandler ' +
'remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems ' +
'removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas ' +
'removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems ' +
'removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers ' +
'removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons ' +
'removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea ' +
'removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks ' +
'removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem ' +
'removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest ' +
'removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret ' +
'removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler ' +
'removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem ' +
'removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon ' +
'removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection ' +
'resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse ' +
'reversedMouseY roadAt roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ' +
'ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ' +
'ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript ' +
'safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame ' +
'saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say ' +
'say2D say3D scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scriptNull ' +
'scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces ' +
'selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition ' +
'selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectWeapon ' +
'selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage ' +
'serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set ' +
'set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer ' +
'set3DENLinesVisible set3DENMissionAttributes set3DENModelsVisible set3DENObjectType ' +
'set3DENSelected setAccTime setAirportSide setAmmo setAmmoCargo setAnimSpeedCoef setAperture ' +
'setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining ' +
'setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass ' +
'setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef ' +
'setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask ' +
'setCurrentWaypoint setCustomAimCoef setDamage setDammage setDate setDebriefingText ' +
'setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon ' +
'setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation ' +
'setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFormation setFormationTask ' +
'setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon ' +
'setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal ' +
'setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef ' +
'setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation ' +
'setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize ' +
'setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo ' +
'setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor ' +
'setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape ' +
'setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal ' +
'setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect ' +
'setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial ' +
'setObjectMaterialGlobal setObjectProxy setObjectTexture setObjectTextureGlobal ' +
'setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass ' +
'setParticleFire setParticleParams setParticleRandom setPilotCameraDirection ' +
'setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect setPitch setPlayable ' +
'setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld ' +
'setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo ' +
'setShadowDistance setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData ' +
'setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType ' +
'setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech ' +
'setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits ' +
'setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect ' +
'setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout ' +
'setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos setUnitPosWeak ' +
'setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat setUserActionText setVariable ' +
'setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor ' +
'setVehicleCargo setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName ' +
'setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves ' +
'setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription ' +
'setWaypointForceBehaviour setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius ' +
'setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed ' +
'setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible ' +
'setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat ' +
'showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend ' +
'showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject ' +
'shownGPS shownHUD shownMap shownPad shownRadio shownScoretable shownUAVFeed shownWarrant ' +
'shownWatch showPad showRadio showScoretable showSubtitles showUAVFeed showWarrant showWatch ' +
'showWaypoint showWaypoints side sideAmbientLife sideChat sideEmpty sideEnemy sideFriendly ' +
'sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity ' +
'simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime ' +
'sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed ' +
'slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode ' +
'splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str ' +
'sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth ' +
'switchableUnits switchAction switchCamera switchGesture switchLight switchMove ' +
'synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd ' +
'synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan ' +
'targetKnowledge targetsAggregate targetsQuery taskAlwaysVisible taskChildren taskCompleted ' +
'taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskNull taskParent ' +
'taskResult taskState taskType teamMember teamMemberNull teamName teams teamSwitch ' +
'teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text textLog ' +
'textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray ' +
'toFixed toLower toString toUpper triggerActivated triggerActivation triggerArea ' +
'triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText ' +
'triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear ' +
'tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture ' +
'tvSetPictureColor tvSetPictureColorDisabled tvSetPictureColorSelected tvSetPictureRight ' +
'tvSetPictureRightColor tvSetPictureRightColorDisabled tvSetPictureRightColorSelected tvSetText ' +
'tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvTooltip tvValue type typeName typeOf ' +
'UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle ' +
'underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitAimPosition ' +
'unitAimPositionVisual unitBackpack unitIsUAV unitPos unitReady unitRecoilCoefficient units ' +
'unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem ' +
'updateObjectTree useAISteeringComponent useAudioTimeForMoves vectorAdd vectorCos ' +
'vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr ' +
'vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized ' +
'vectorUp vectorUpVisual vehicle vehicleCargoEnabled vehicleChat vehicleRadio vehicles ' +
'vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems ' +
'vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition ' +
'visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject ' +
'waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour ' +
'waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour ' +
'waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName ' +
'waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed ' +
'waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible ' +
'weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered ' +
'weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind',
literal:
'true false nil'
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.NUMBER_MODE,
VARIABLE,
FUNCTION,
STRINGS,
CPP.preprocessor
],
illegal: /#/
};
};
/***/ }),
/* 250 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMENT_MODE = hljs.COMMENT('--', '$');
return {
case_insensitive: true,
illegal: /[<>{}*#]/,
contains: [
{
beginKeywords:
'begin end start commit rollback savepoint lock alter create drop rename call ' +
'delete do handler insert load replace select truncate update set show pragma grant ' +
'merge describe use explain help declare prepare execute deallocate release ' +
'unlock purge reset change stop analyze cache flush optimize repair kill ' +
'install uninstall checksum restore check backup revoke comment',
end: /;/, endsWithParent: true,
lexemes: /[\w\.]+/,
keywords: {
keyword:
'abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' +
'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' +
'allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply ' +
'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' +
'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' +
'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' +
'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' +
'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +
'buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +
'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +
'char_length character_length characters characterset charindex charset charsetform charsetid check ' +
'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' +
'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' +
'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' +
'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' +
'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' +
'consider consistent constant constraint constraints constructor container content contents context ' +
'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' +
'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' +
'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +
'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +
'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +
'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +
'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' +
'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' +
'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' +
'deterministic diagnostics difference dimension direct_load directory disable disable_all ' +
'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +
'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +
'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +
'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +
'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' +
'execu execut execute exempt exists exit exp expire explain export export_set extended extent external ' +
'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +
'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +
'finish first first_value fixed flash_cache flashback floor flush following follows for forall force ' +
'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +
'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +
'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +
'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +
'hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified ' +
'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +
'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +
'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' +
'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' +
'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +
'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase ' +
'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +
'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +
'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +
'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +
'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +
'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +
'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' +
'minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month ' +
'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +
'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +
'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +
'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' +
'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' +
'noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe ' +
'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' +
'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' +
'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' +
'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +
'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +
'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +
'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +
'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' +
'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' +
'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' +
'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' +
'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' +
'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' +
'quotename radians raise rand range rank raw read reads readsize rebuild record records ' +
'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' +
'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' +
'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' +
'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' +
'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' +
'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' +
'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' +
'sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select ' +
'self sequence sequential serializable server servererror session session_user sessions_per_user set ' +
'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' +
'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' +
'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' +
'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' +
'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' +
'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' +
'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' +
'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' +
'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' +
'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' +
'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +
'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo ' +
'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +
'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +
'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' +
'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' +
'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' +
'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot ' +
'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' +
'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' +
'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' +
'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' +
'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' +
'wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped ' +
'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' +
'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek',
literal:
'true false null',
built_in:
'array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number ' +
'numeric real record serial serial8 smallint text varchar varying void'
},
contains: [
{
className: 'string',
begin: '\'', end: '\'',
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}]
},
{
className: 'string',
begin: '"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE, {begin: '""'}]
},
{
className: 'string',
begin: '`', end: '`',
contains: [hljs.BACKSLASH_ESCAPE]
},
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE,
COMMENT_MODE
]
},
hljs.C_BLOCK_COMMENT_MODE,
COMMENT_MODE
]
};
};
/***/ }),
/* 251 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
contains: [
hljs.HASH_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
begin: hljs.UNDERSCORE_IDENT_RE,
lexemes: hljs.UNDERSCORE_IDENT_RE,
keywords: {
// Stan's keywords
name:
'for in while repeat until if then else',
// Stan's probablity distributions (less beta and gamma, as commonly
// used for parameter names). So far, _log and _rng variants are not
// included
symbol:
'bernoulli bernoulli_logit binomial binomial_logit ' +
'beta_binomial hypergeometric categorical categorical_logit ' +
'ordered_logistic neg_binomial neg_binomial_2 ' +
'neg_binomial_2_log poisson poisson_log multinomial normal ' +
'exp_mod_normal skew_normal student_t cauchy double_exponential ' +
'logistic gumbel lognormal chi_square inv_chi_square ' +
'scaled_inv_chi_square exponential inv_gamma weibull frechet ' +
'rayleigh wiener pareto pareto_type_2 von_mises uniform ' +
'multi_normal multi_normal_prec multi_normal_cholesky multi_gp ' +
'multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet ' +
'lkj_corr lkj_corr_cholesky wishart inv_wishart',
// Stan's data types
'selector-tag':
'int real vector simplex unit_vector ordered positive_ordered ' +
'row_vector matrix cholesky_factor_corr cholesky_factor_cov ' +
'corr_matrix cov_matrix',
// Stan's model blocks
title:
'functions model data parameters quantities transformed ' +
'generated',
literal:
'true false'
},
relevance: 0
},
// The below is all taken from the R language definition
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
relevance: 0
},
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
relevance: 0
},
{
// explicit integer
className: 'number',
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
relevance: 0
},
{
// number with trailing decimal
className: 'number',
begin: "\\d+\\.(?!\\d)(?:i\\b)?",
relevance: 0
},
{
// number
className: 'number',
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// number with leading decimal
className: 'number',
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
}
]
};
};
/***/ }),
/* 252 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['do', 'ado'],
case_insensitive: true,
keywords: 'if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit
contains: [
{
className: 'symbol',
begin: /`[a-zA-Z0-9_]+'/
},
{
className: 'variable',
begin: /\$\{?[a-zA-Z0-9_]+\}?/
},
{
className: 'string',
variants: [
{begin: '`"[^\r\n]*?"\''},
{begin: '"[^\r\n"]*"'}
]
},
{
className: 'built_in',
variants: [
{
begin: '\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)'
}
]
},
hljs.COMMENT('^[ \t]*\\*.*$', false),
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
};
/***/ }),
/* 253 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
var STEP21_KEYWORDS = {
keyword: 'HEADER ENDSEC DATA'
};
var STEP21_START = {
className: 'meta',
begin: 'ISO-10303-21;',
relevance: 10
};
var STEP21_CLOSE = {
className: 'meta',
begin: 'END-ISO-10303-21;',
relevance: 10
};
return {
aliases: ['p21', 'step', 'stp'],
case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized.
lexemes: STEP21_IDENT_RE,
keywords: STEP21_KEYWORDS,
contains: [
STEP21_START,
STEP21_CLOSE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.COMMENT('/\\*\\*!', '\\*/'),
hljs.C_NUMBER_MODE,
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'string',
begin: "'", end: "'"
},
{
className: 'symbol',
variants: [
{
begin: '#', end: '\\d+',
illegal: '\\W'
}
]
}
]
};
};
/***/ }),
/* 254 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var VARIABLE = {
className: 'variable',
begin: '\\$' + hljs.IDENT_RE
};
var HEX_COLOR = {
className: 'number',
begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'
};
var AT_KEYWORDS = [
'charset',
'css',
'debug',
'extend',
'font-face',
'for',
'import',
'include',
'media',
'mixin',
'page',
'warn',
'while'
];
var PSEUDO_SELECTORS = [
'after',
'before',
'first-letter',
'first-line',
'active',
'first-child',
'focus',
'hover',
'lang',
'link',
'visited'
];
var TAGS = [
'a',
'abbr',
'address',
'article',
'aside',
'audio',
'b',
'blockquote',
'body',
'button',
'canvas',
'caption',
'cite',
'code',
'dd',
'del',
'details',
'dfn',
'div',
'dl',
'dt',
'em',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'header',
'hgroup',
'html',
'i',
'iframe',
'img',
'input',
'ins',
'kbd',
'label',
'legend',
'li',
'mark',
'menu',
'nav',
'object',
'ol',
'p',
'q',
'quote',
'samp',
'section',
'span',
'strong',
'summary',
'sup',
'table',
'tbody',
'td',
'textarea',
'tfoot',
'th',
'thead',
'time',
'tr',
'ul',
'var',
'video'
];
var TAG_END = '[\\.\\s\\n\\[\\:,]';
var ATTRIBUTES = [
'align-content',
'align-items',
'align-self',
'animation',
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
'auto',
'backface-visibility',
'background',
'background-attachment',
'background-clip',
'background-color',
'background-image',
'background-origin',
'background-position',
'background-repeat',
'background-size',
'border',
'border-bottom',
'border-bottom-color',
'border-bottom-left-radius',
'border-bottom-right-radius',
'border-bottom-style',
'border-bottom-width',
'border-collapse',
'border-color',
'border-image',
'border-image-outset',
'border-image-repeat',
'border-image-slice',
'border-image-source',
'border-image-width',
'border-left',
'border-left-color',
'border-left-style',
'border-left-width',
'border-radius',
'border-right',
'border-right-color',
'border-right-style',
'border-right-width',
'border-spacing',
'border-style',
'border-top',
'border-top-color',
'border-top-left-radius',
'border-top-right-radius',
'border-top-style',
'border-top-width',
'border-width',
'bottom',
'box-decoration-break',
'box-shadow',
'box-sizing',
'break-after',
'break-before',
'break-inside',
'caption-side',
'clear',
'clip',
'clip-path',
'color',
'column-count',
'column-fill',
'column-gap',
'column-rule',
'column-rule-color',
'column-rule-style',
'column-rule-width',
'column-span',
'column-width',
'columns',
'content',
'counter-increment',
'counter-reset',
'cursor',
'direction',
'display',
'empty-cells',
'filter',
'flex',
'flex-basis',
'flex-direction',
'flex-flow',
'flex-grow',
'flex-shrink',
'flex-wrap',
'float',
'font',
'font-family',
'font-feature-settings',
'font-kerning',
'font-language-override',
'font-size',
'font-size-adjust',
'font-stretch',
'font-style',
'font-variant',
'font-variant-ligatures',
'font-weight',
'height',
'hyphens',
'icon',
'image-orientation',
'image-rendering',
'image-resolution',
'ime-mode',
'inherit',
'initial',
'justify-content',
'left',
'letter-spacing',
'line-height',
'list-style',
'list-style-image',
'list-style-position',
'list-style-type',
'margin',
'margin-bottom',
'margin-left',
'margin-right',
'margin-top',
'marks',
'mask',
'max-height',
'max-width',
'min-height',
'min-width',
'nav-down',
'nav-index',
'nav-left',
'nav-right',
'nav-up',
'none',
'normal',
'object-fit',
'object-position',
'opacity',
'order',
'orphans',
'outline',
'outline-color',
'outline-offset',
'outline-style',
'outline-width',
'overflow',
'overflow-wrap',
'overflow-x',
'overflow-y',
'padding',
'padding-bottom',
'padding-left',
'padding-right',
'padding-top',
'page-break-after',
'page-break-before',
'page-break-inside',
'perspective',
'perspective-origin',
'pointer-events',
'position',
'quotes',
'resize',
'right',
'tab-size',
'table-layout',
'text-align',
'text-align-last',
'text-decoration',
'text-decoration-color',
'text-decoration-line',
'text-decoration-style',
'text-indent',
'text-overflow',
'text-rendering',
'text-shadow',
'text-transform',
'text-underline-position',
'top',
'transform',
'transform-origin',
'transform-style',
'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
'unicode-bidi',
'vertical-align',
'visibility',
'white-space',
'widows',
'width',
'word-break',
'word-spacing',
'word-wrap',
'z-index'
];
// illegals
var ILLEGAL = [
'\\?',
'(\\bReturn\\b)', // monkey
'(\\bEnd\\b)', // monkey
'(\\bend\\b)', // vbscript
'(\\bdef\\b)', // gradle
';', // a whole lot of languages
'#\\s', // markdown
'\\*\\s', // markdown
'===\\s', // markdown
'\\|',
'%', // prolog
];
return {
aliases: ['styl'],
case_insensitive: false,
keywords: 'if else for in',
illegal: '(' + ILLEGAL.join('|') + ')',
contains: [
// strings
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
// comments
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
// hex colors
HEX_COLOR,
// class tag
{
begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,
returnBegin: true,
contains: [
{className: 'selector-class', begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*'}
]
},
// id tag
{
begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,
returnBegin: true,
contains: [
{className: 'selector-id', begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*'}
]
},
// tags
{
begin: '\\b(' + TAGS.join('|') + ')' + TAG_END,
returnBegin: true,
contains: [
{className: 'selector-tag', begin: '\\b[a-zA-Z][a-zA-Z0-9_-]*'}
]
},
// psuedo selectors
{
begin: '&?:?:\\b(' + PSEUDO_SELECTORS.join('|') + ')' + TAG_END
},
// @ keywords
{
begin: '\@(' + AT_KEYWORDS.join('|') + ')\\b'
},
// variables
VARIABLE,
// dimension
hljs.CSS_NUMBER_MODE,
// number
hljs.NUMBER_MODE,
// functions
// - only from beginning of line + whitespace
{
className: 'function',
begin: '^[a-zA-Z][a-zA-Z0-9_\-]*\\(.*\\)',
illegal: '[\\n]',
returnBegin: true,
contains: [
{className: 'title', begin: '\\b[a-zA-Z][a-zA-Z0-9_\-]*'},
{
className: 'params',
begin: /\(/,
end: /\)/,
contains: [
HEX_COLOR,
VARIABLE,
hljs.APOS_STRING_MODE,
hljs.CSS_NUMBER_MODE,
hljs.NUMBER_MODE,
hljs.QUOTE_STRING_MODE
]
}
]
},
// attributes
// - only from beginning of line + whitespace
// - must have whitespace after it
{
className: 'attribute',
begin: '\\b(' + ATTRIBUTES.reverse().join('|') + ')\\b',
starts: {
// value container
end: /;|$/,
contains: [
HEX_COLOR,
VARIABLE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.CSS_NUMBER_MODE,
hljs.NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
],
illegal: /\./,
relevance: 0
}
}
]
};
};
/***/ }),
/* 255 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var DETAILS = {
className: 'string',
begin: '\\[\n(multipart)?', end: '\\]\n'
};
var TIME = {
className: 'string',
begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z'
};
var PROGRESSVALUE = {
className: 'string',
begin: '(\\+|-)\\d+'
};
var KEYWORDS = {
className: 'keyword',
relevance: 10,
variants: [
{ begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?' },
{ begin: '^progress(:?)(\\s+)?(pop|push)?' },
{ begin: '^tags:' },
{ begin: '^time:' }
],
};
return {
case_insensitive: true,
contains: [
DETAILS,
TIME,
PROGRESSVALUE,
KEYWORDS
]
};
};
/***/ }),
/* 256 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var SWIFT_KEYWORDS = {
keyword: '__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity ' +
'break case catch class continue convenience default defer deinit didSet do ' +
'dynamic dynamicType else enum extension fallthrough false fileprivate final for func ' +
'get guard if import in indirect infix init inout internal is lazy left let ' +
'mutating nil none nonmutating open operator optional override postfix precedence ' +
'prefix private protocol Protocol public repeat required rethrows return ' +
'right self Self set static struct subscript super switch throw throws true ' +
'try try! try? Type typealias unowned var weak where while willSet',
literal: 'true false nil',
built_in: 'abs advance alignof alignofValue anyGenerator assert assertionFailure ' +
'bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' +
'bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros ' +
'debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords ' +
'enumerate equal fatalError filter find getBridgedObjectiveCType getVaList ' +
'indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC ' +
'isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare ' +
'map max maxElement min minElement numericCast overlaps partition posix ' +
'precondition preconditionFailure print println quickSort readLine reduce reflect ' +
'reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split ' +
'startsWith stride strideof strideofValue swap toString transcode ' +
'underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap ' +
'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +
'withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers ' +
'withUnsafePointer withUnsafePointers withVaList zip'
};
var TYPE = {
className: 'type',
begin: '\\b[A-Z][\\w\u00C0-\u02B8\']*',
relevance: 0
};
var BLOCK_COMMENT = hljs.COMMENT(
'/\\*',
'\\*/',
{
contains: ['self']
}
);
var SUBST = {
className: 'subst',
begin: /\\\(/, end: '\\)',
keywords: SWIFT_KEYWORDS,
contains: [] // assigned later
};
var NUMBERS = {
className: 'number',
begin: '\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b',
relevance: 0
};
var QUOTE_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {
contains: [SUBST, hljs.BACKSLASH_ESCAPE]
});
SUBST.contains = [NUMBERS];
return {
keywords: SWIFT_KEYWORDS,
contains: [
QUOTE_STRING_MODE,
hljs.C_LINE_COMMENT_MODE,
BLOCK_COMMENT,
TYPE,
NUMBERS,
{
className: 'function',
beginKeywords: 'func', end: '{', excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
begin: /[A-Za-z$_][0-9A-Za-z$_]*/
}),
{
begin: /</, end: />/
},
{
className: 'params',
begin: /\(/, end: /\)/, endsParent: true,
keywords: SWIFT_KEYWORDS,
contains: [
'self',
NUMBERS,
QUOTE_STRING_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{begin: ':'} // relevance booster
],
illegal: /["']/
}
],
illegal: /\[|%/
},
{
className: 'class',
beginKeywords: 'struct protocol class extension enum',
keywords: SWIFT_KEYWORDS,
end: '\\{',
excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})
]
},
{
className: 'meta', // @attributes
begin: '(@warn_unused_result|@exported|@lazy|@noescape|' +
'@NSCopying|@NSManaged|@objc|@convention|@required|' +
'@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' +
'@infix|@prefix|@postfix|@autoclosure|@testable|@available|' +
'@nonobjc|@NSApplicationMain|@UIApplicationMain)'
},
{
beginKeywords: 'import', end: /$/,
contains: [hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT]
}
]
};
};
/***/ }),
/* 257 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMENT = {
className: 'comment',
begin: /\$noop\(/,
end: /\)/,
contains: [{
begin: /\(/,
end: /\)/,
contains: ['self', {
begin: /\\./
}]
}],
relevance: 10
};
var FUNCTION = {
className: 'keyword',
begin: /\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,
end: /\(/,
excludeEnd: true
};
var VARIABLE = {
className: 'variable',
begin: /%[_a-zA-Z0-9:]*/,
end: '%'
};
var ESCAPE_SEQUENCE = {
className: 'symbol',
begin: /\\./
};
return {
contains: [
COMMENT,
FUNCTION,
VARIABLE,
ESCAPE_SEQUENCE
]
};
};
/***/ }),
/* 258 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var LITERALS = 'true false yes no null';
var keyPrefix = '^[ \\-]*';
var keyName = '[a-zA-Z_][\\w\\-]*';
var KEY = {
className: 'attr',
variants: [
{ begin: keyPrefix + keyName + ":"},
{ begin: keyPrefix + '"' + keyName + '"' + ":"},
{ begin: keyPrefix + "'" + keyName + "'" + ":"}
]
};
var TEMPLATE_VARIABLES = {
className: 'template-variable',
variants: [
{ begin: '\{\{', end: '\}\}' }, // jinja templates Ansible
{ begin: '%\{', end: '\}' } // Ruby i18n
]
};
var STRING = {
className: 'string',
relevance: 0,
variants: [
{begin: /'/, end: /'/},
{begin: /"/, end: /"/},
{begin: /\S+/}
],
contains: [
hljs.BACKSLASH_ESCAPE,
TEMPLATE_VARIABLES
]
};
return {
case_insensitive: true,
aliases: ['yml', 'YAML', 'yaml'],
contains: [
KEY,
{
className: 'meta',
begin: '^---\s*$',
relevance: 10
},
{ // multi line string
className: 'string',
begin: '[\\|>] *$',
returnEnd: true,
contains: STRING.contains,
// very simple termination: next hash key
end: KEY.variants[0].begin
},
{ // Ruby/Rails erb
begin: '<%[%=-]?', end: '[%-]?%>',
subLanguage: 'ruby',
excludeBegin: true,
excludeEnd: true,
relevance: 0
},
{ // data type
className: 'type',
begin: '!!' + hljs.UNDERSCORE_IDENT_RE,
},
{ // fragment id &ref
className: 'meta',
begin: '&' + hljs.UNDERSCORE_IDENT_RE + '$',
},
{ // fragment reference *ref
className: 'meta',
begin: '\\*' + hljs.UNDERSCORE_IDENT_RE + '$'
},
{ // array listing
className: 'bullet',
begin: '^ *-',
relevance: 0
},
hljs.HASH_COMMENT_MODE,
{
beginKeywords: LITERALS,
keywords: {literal: LITERALS}
},
hljs.C_NUMBER_MODE,
STRING
]
};
};
/***/ }),
/* 259 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
contains: [
hljs.HASH_COMMENT_MODE,
// version of format and total amount of testcases
{
className: 'meta',
variants: [
{ begin: '^TAP version (\\d+)$' },
{ begin: '^1\\.\\.(\\d+)$' }
],
},
// YAML block
{
begin: '(\s+)?---$', end: '\\.\\.\\.$',
subLanguage: 'yaml',
relevance: 0
},
// testcase number
{
className: 'number',
begin: ' (\\d+) '
},
// testcase status and description
{
className: 'symbol',
variants: [
{ begin: '^ok' },
{ begin: '^not ok' }
],
},
]
};
};
/***/ }),
/* 260 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['tk'],
keywords: 'after append apply array auto_execok auto_import auto_load auto_mkindex ' +
'auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock ' +
'close concat continue dde dict encoding eof error eval exec exit expr fblocked ' +
'fconfigure fcopy file fileevent filename flush for foreach format gets glob global ' +
'history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list ' +
'llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 '+
'mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex '+
'platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename '+
'return safe scan seek set socket source split string subst switch tcl_endOfWord '+
'tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter '+
'tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update '+
'uplevel upvar variable vwait while',
contains: [
hljs.COMMENT(';[ \\t]*#', '$'),
hljs.COMMENT('^[ \\t]*#', '$'),
{
beginKeywords: 'proc',
end: '[\\{]',
excludeEnd: true,
contains: [
{
className: 'title',
begin: '[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
end: '[ \\t\\n\\r]',
endsWithParent: true,
excludeEnd: true
}
]
},
{
excludeEnd: true,
variants: [
{
begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)',
end: '[^a-zA-Z0-9_\\}\\$]'
},
{
begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
end: '(\\))?[^a-zA-Z0-9_\\}\\$]'
}
]
},
{
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})
]
},
{
className: 'number',
variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
}
]
}
};
/***/ }),
/* 261 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var COMMAND = {
className: 'tag',
begin: /\\/,
relevance: 0,
contains: [
{
className: 'name',
variants: [
{begin: /[a-zA-Zа-яА-я]+[*]?/},
{begin: /[^a-zA-Zа-яА-я0-9]/}
],
starts: {
endsWithParent: true,
relevance: 0,
contains: [
{
className: 'string', // because it looks like attributes in HTML tags
variants: [
{begin: /\[/, end: /\]/},
{begin: /\{/, end: /\}/}
]
},
{
begin: /\s*=\s*/, endsWithParent: true,
relevance: 0,
contains: [
{
className: 'number',
begin: /-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/
}
]
}
]
}
}
]
};
return {
contains: [
COMMAND,
{
className: 'formula',
contains: [COMMAND],
relevance: 0,
variants: [
{begin: /\$\$/, end: /\$\$/},
{begin: /\$/, end: /\$/}
]
},
hljs.COMMENT(
'%',
'$',
{
relevance: 0
}
)
]
};
};
/***/ }),
/* 262 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BUILT_IN_TYPES = 'bool byte i16 i32 i64 double string binary';
return {
keywords: {
keyword:
'namespace const typedef struct enum service exception void oneway set list map required optional',
built_in:
BUILT_IN_TYPES,
literal:
'true false'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'class',
beginKeywords: 'struct enum service exception', end: /\{/,
illegal: /\n/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
})
]
},
{
begin: '\\b(set|list|map)\\s*<', end: '>',
keywords: BUILT_IN_TYPES,
contains: ['self']
}
]
};
};
/***/ }),
/* 263 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var TPID = {
className: 'number',
begin: '[1-9][0-9]*', /* no leading zeros */
relevance: 0
};
var TPLABEL = {
className: 'symbol',
begin: ':[^\\]]+'
};
var TPDATA = {
className: 'built_in',
begin: '(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|\
TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[', end: '\\]',
contains: [
'self',
TPID,
TPLABEL
]
};
var TPIO = {
className: 'built_in',
begin: '(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[', end: '\\]',
contains: [
'self',
TPID,
hljs.QUOTE_STRING_MODE, /* for pos section at bottom */
TPLABEL
]
};
return {
keywords: {
keyword:
'ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB ' +
'DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC ' +
'IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE ' +
'PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET ' +
'Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN ' +
'SUBSTR FINDSTR VOFFSET PROG ATTR MN POS',
literal:
'ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET'
},
contains: [
TPDATA,
TPIO,
{
className: 'keyword',
begin: '/(PROG|ATTR|MN|POS|END)\\b'
},
{
/* this is for cases like ,CALL */
className: 'keyword',
begin: '(CALL|RUN|POINT_LOGIC|LBL)\\b'
},
{
/* this is for cases like CNT100 where the default lexemes do not
* separate the keyword and the number */
className: 'keyword',
begin: '\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)'
},
{
/* to catch numbers that do not have a word boundary on the left */
className: 'number',
begin: '\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b',
relevance: 0
},
hljs.COMMENT('//', '[;$]'),
hljs.COMMENT('!', '[;$]'),
hljs.COMMENT('--eg:', '$'),
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\'', end: '\''
},
hljs.C_NUMBER_MODE,
{
className: 'variable',
begin: '\\$[A-Za-z0-9_]+'
}
]
};
};
/***/ }),
/* 264 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var PARAMS = {
className: 'params',
begin: '\\(', end: '\\)'
};
var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' +
'max min parent random range source template_from_string';
var FUNCTIONS = {
beginKeywords: FUNCTION_NAMES,
keywords: {name: FUNCTION_NAMES},
relevance: 0,
contains: [
PARAMS
]
};
var FILTER = {
begin: /\|[A-Za-z_]+:?/,
keywords:
'abs batch capitalize convert_encoding date date_modify default ' +
'escape first format join json_encode keys last length lower ' +
'merge nl2br number_format raw replace reverse round slice sort split ' +
'striptags title trim upper url_encode',
contains: [
FUNCTIONS
]
};
var TAGS = 'autoescape block do embed extends filter flush for ' +
'if import include macro sandbox set spaceless use verbatim';
TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');
return {
aliases: ['craftcms'],
case_insensitive: true,
subLanguage: 'xml',
contains: [
hljs.COMMENT(/\{#/, /#}/),
{
className: 'template-tag',
begin: /\{%/, end: /%}/,
contains: [
{
className: 'name',
begin: /\w+/,
keywords: TAGS,
starts: {
endsWithParent: true,
contains: [FILTER, FUNCTIONS],
relevance: 0
}
}
]
},
{
className: 'template-variable',
begin: /\{\{/, end: /}}/,
contains: ['self', FILTER, FUNCTIONS]
}
]
};
};
/***/ }),
/* 265 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'in if for while finally var new function do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const class public private protected get set super ' +
'static implements enum export import declare type namespace abstract ' +
'as from extends async await',
literal:
'true false null undefined NaN Infinity',
built_in:
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
'module console window document any number boolean string void Promise'
};
return {
aliases: ['ts'],
keywords: KEYWORDS,
contains: [
{
className: 'meta',
begin: /^\s*['"]use strict['"]/
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{ // template string
className: 'string',
begin: '`', end: '`',
contains: [
hljs.BACKSLASH_ESCAPE,
{
className: 'subst',
begin: '\\$\\{', end: '\\}'
}
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
},
{ // "value" container
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
keywords: 'return throw case',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.REGEXP_MODE,
{
className: 'function',
begin: '(\\(.*?\\)|' + hljs.IDENT_RE + ')\\s*=>', returnBegin: true,
end: '\\s*=>',
contains: [
{
className: 'params',
variants: [
{
begin: hljs.IDENT_RE
},
{
begin: /\(\s*\)/,
},
{
begin: /\(/, end: /\)/,
excludeBegin: true, excludeEnd: true,
keywords: KEYWORDS,
contains: [
'self',
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}
]
}
]
}
],
relevance: 0
},
{
className: 'function',
begin: 'function', end: /[\{;]/, excludeEnd: true,
keywords: KEYWORDS,
contains: [
'self',
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),
{
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
],
illegal: /["'\(]/
}
],
illegal: /%/,
relevance: 0 // () => {} is more typical in TypeScript
},
{
beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
contains: [
'self',
{
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
],
illegal: /["'\(]/
}
]
},
{ // prevent references like module.id from being higlighted as module definitions
begin: /module\./,
keywords: {built_in: 'module'},
relevance: 0
},
{
beginKeywords: 'module', end: /\{/, excludeEnd: true
},
{
beginKeywords: 'interface', end: /\{/, excludeEnd: true,
keywords: 'interface extends'
},
{
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
},
{
begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
},
{
className: 'meta', begin: '@[A-Za-z]+'
}
]
};
};
/***/ }),
/* 266 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
keywords: {
keyword:
// Value types
'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' +
'uint16 uint32 uint64 float double bool struct enum string void ' +
// Reference types
'weak unowned owned ' +
// Modifiers
'async signal static abstract interface override virtual delegate ' +
// Control Structures
'if while do for foreach else switch case break default return try catch ' +
// Visibility
'public private protected internal ' +
// Other
'using new this get set const stdout stdin stderr var',
built_in:
'DBus GLib CCode Gee Object Gtk Posix',
literal:
'false true null'
},
contains: [
{
className: 'class',
beginKeywords: 'class interface namespace', end: '{', excludeEnd: true,
illegal: '[^,:\\n\\s\\.]',
contains: [
hljs.UNDERSCORE_TITLE_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'string',
begin: '"""', end: '"""',
relevance: 5
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'meta',
begin: '^#', end: '$',
relevance: 2
}
]
};
};
/***/ }),
/* 267 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['vb'],
case_insensitive: true,
keywords: {
keyword:
'addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval ' + /* a-b */
'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */
'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */
'get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue ' + /* g-i */
'join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass ' + /* j-m */
'namespace narrowing new next not notinheritable notoverridable ' + /* n */
'of off on operator option optional or order orelse overloads overridable overrides ' + /* o */
'paramarray partial preserve private property protected public ' + /* p */
'raiseevent readonly redim rem removehandler resume return ' + /* r */
'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */
'take text then throw to try unicode until using when where while widening with withevents writeonly xor', /* t-x */
built_in:
'boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype ' + /* b-c */
'date decimal directcast double gettype getxmlnamespace iif integer long object ' + /* d-o */
'sbyte short single string trycast typeof uinteger ulong ushort', /* s-u */
literal:
'true false nothing'
},
illegal: '//|{|}|endif|gosub|variant|wend', /* reserved deprecated keywords */
contains: [
hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}),
hljs.COMMENT(
'\'',
'$',
{
returnBegin: true,
contains: [
{
className: 'doctag',
begin: '\'\'\'|<!--|-->',
contains: [hljs.PHRASAL_WORDS_MODE]
},
{
className: 'doctag',
begin: '</?', end: '>',
contains: [hljs.PHRASAL_WORDS_MODE]
}
]
}
),
hljs.C_NUMBER_MODE,
{
className: 'meta',
begin: '#', end: '$',
keywords: {'meta-keyword': 'if else elseif end region externalsource'}
}
]
};
};
/***/ }),
/* 268 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
aliases: ['vbs'],
case_insensitive: true,
keywords: {
keyword:
'call class const dim do loop erase execute executeglobal exit for each next function ' +
'if then else on error option explicit new private property let get public randomize ' +
'redim rem select case set stop sub while wend with end to elseif is or xor and not ' +
'class_initialize class_terminate default preserve in me byval byref step resume goto',
built_in:
'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' +
'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' +
'conversions csng timevalue second year space abs clng timeserial fixs len asc ' +
'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' +
'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' +
'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' +
'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' +
'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' +
'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' +
'chrw regexp server response request cstr err',
literal:
'true false null nothing empty'
},
illegal: '//',
contains: [
hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}),
hljs.COMMENT(
/'/,
/$/,
{
relevance: 0
}
),
hljs.C_NUMBER_MODE
]
};
};
/***/ }),
/* 269 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
subLanguage: 'xml',
contains: [
{
begin: '<%', end: '%>',
subLanguage: 'vbscript'
}
]
};
};
/***/ }),
/* 270 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var SV_KEYWORDS = {
keyword:
'accept_on alias always always_comb always_ff always_latch and assert assign ' +
'assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 ' +
'byte case casex casez cell chandle checker class clocking cmos config const ' +
'constraint context continue cover covergroup coverpoint cross deassign default ' +
'defparam design disable dist do edge else end endcase endchecker endclass ' +
'endclocking endconfig endfunction endgenerate endgroup endinterface endmodule ' +
'endpackage endprimitive endprogram endproperty endspecify endsequence endtable ' +
'endtask enum event eventually expect export extends extern final first_match for ' +
'force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 ' +
'if iff ifnone ignore_bins illegal_bins implements implies import incdir include ' +
'initial inout input inside instance int integer interconnect interface intersect ' +
'join join_any join_none large let liblist library local localparam logic longint ' +
'macromodule matches medium modport module nand negedge nettype new nexttime nmos ' +
'nor noshowcancelled not notif0 notif1 or output package packed parameter pmos ' +
'posedge primitive priority program property protected pull0 pull1 pulldown pullup ' +
'pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos ' +
'real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran ' +
'rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared ' +
'sequence shortint shortreal showcancelled signed small soft solve specify specparam ' +
'static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on ' +
'sync_reject_on table tagged task this throughout time timeprecision timeunit tran ' +
'tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 ' +
'unsigned until until_with untyped use uwire var vectored virtual void wait wait_order ' +
'wand weak weak0 weak1 while wildcard wire with within wor xnor xor',
literal:
'null',
built_in:
'$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale ' +
'$bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat ' +
'$realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson ' +
'$assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff ' +
'$assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk ' +
'$fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control ' +
'$coverage_get $coverage_save $set_coverage_db_name $rose $stable $past ' +
'$rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display ' +
'$coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename ' +
'$unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow ' +
'$floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning ' +
'$dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh ' +
'$tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random ' +
'$dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson ' +
'$dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array ' +
'$async$nand$array $async$or$array $async$nor$array $sync$and$array ' +
'$sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf ' +
'$async$and$plane $async$nand$plane $async$or$plane $async$nor$plane ' +
'$sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system ' +
'$display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo ' +
'$write $readmemb $readmemh $writememh $value$plusargs ' +
'$dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit ' +
'$writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb ' +
'$dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall ' +
'$dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo ' +
'$fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh ' +
'$swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb ' +
'$fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat ' +
'$sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror'
};
return {
aliases: ['v', 'sv', 'svh'],
case_insensitive: false,
keywords: SV_KEYWORDS, lexemes: /[\w\$]+/,
contains: [
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'number',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{begin: '\\b((\\d+\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'},
{begin: '\\B((\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'},
{begin: '\\b([0-9_])+', relevance: 0}
]
},
/* parameters to instances */
{
className: 'variable',
variants: [
{begin: '#\\((?!parameter).+\\)'},
{begin: '\\.\\w+', relevance: 0},
]
},
{
className: 'meta',
begin: '`', end: '$',
keywords: {'meta-keyword': 'define __FILE__ ' +
'__LINE__ begin_keywords celldefine default_nettype define ' +
'else elsif end_keywords endcelldefine endif ifdef ifndef ' +
'include line nounconnected_drive pragma resetall timescale ' +
'unconnected_drive undef undefineall'},
relevance: 0
}
]
}; // return
};
/***/ }),
/* 271 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
// Regular expression for VHDL numeric literals.
// Decimal literal:
var INTEGER_RE = '\\d(_|\\d)*';
var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
// Based literal:
var BASED_INTEGER_RE = '\\w+';
var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
return {
case_insensitive: true,
keywords: {
keyword:
'abs access after alias all and architecture array assert assume assume_guarantee attribute ' +
'begin block body buffer bus case component configuration constant context cover disconnect ' +
'downto default else elsif end entity exit fairness file for force function generate ' +
'generic group guarded if impure in inertial inout is label library linkage literal ' +
'loop map mod nand new next nor not null of on open or others out package port ' +
'postponed procedure process property protected pure range record register reject ' +
'release rem report restrict restrict_guarantee return rol ror select sequence ' +
'severity shared signal sla sll sra srl strong subtype then to transport type ' +
'unaffected units until use variable vmode vprop vunit wait when while with xnor xor',
built_in:
'boolean bit character ' +
'integer time delay_length natural positive ' +
'string bit_vector file_open_kind file_open_status ' +
'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' +
'std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signed' +
'real_vector time_vector',
literal:
'false true note warning error failure ' + // severity_level
'line text side width' // textio
},
illegal: '{',
contains: [
hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.
hljs.COMMENT('--', '$'),
hljs.QUOTE_STRING_MODE,
{
className: 'number',
begin: NUMBER_RE,
relevance: 0
},
{
className: 'string',
begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
className: 'symbol',
begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
};
/***/ }),
/* 272 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
lexemes: /[!#@\w]+/,
keywords: {
keyword:
// express version except: ! & * < = > !! # @ @@
'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+
'cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc '+
'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+
'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+
'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+
'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+
// full version
'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+
'bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap '+
'cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor '+
'endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap '+
'imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview '+
'lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap '+
'nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext '+
'ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding '+
'scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace '+
'startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious '+'trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew '+
'vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank',
built_in: //built in func
'synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv ' +
'complete_check add getwinposx getqflist getwinposy screencol ' +
'clearmatches empty extend getcmdpos mzeval garbagecollect setreg ' +
'ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable ' +
'shiftwidth max sinh isdirectory synID system inputrestore winline ' +
'atan visualmode inputlist tabpagewinnr round getregtype mapcheck ' +
'hasmapto histdel argidx findfile sha256 exists toupper getcmdline ' +
'taglist string getmatches bufnr strftime winwidth bufexists ' +
'strtrans tabpagebuflist setcmdpos remote_read printf setloclist ' +
'getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval ' +
'resolve libcallnr foldclosedend reverse filter has_key bufname ' +
'str2float strlen setline getcharmod setbufvar index searchpos ' +
'shellescape undofile foldclosed setqflist buflisted strchars str2nr ' +
'virtcol floor remove undotree remote_expr winheight gettabwinvar ' +
'reltime cursor tabpagenr finddir localtime acos getloclist search ' +
'tanh matchend rename gettabvar strdisplaywidth type abs py3eval ' +
'setwinvar tolower wildmenumode log10 spellsuggest bufloaded ' +
'synconcealed nextnonblank server2client complete settabwinvar ' +
'executable input wincol setmatches getftype hlID inputsave ' +
'searchpair or screenrow line settabvar histadd deepcopy strpart ' +
'remote_peek and eval getftime submatch screenchar winsaveview ' +
'matchadd mkdir screenattr getfontname libcall reltimestr getfsize ' +
'winnr invert pow getbufline byte2line soundfold repeat fnameescape ' +
'tagfiles sin strwidth spellbadword trunc maparg log lispindent ' +
'hostname setpos globpath remote_foreground getchar synIDattr ' +
'fnamemodify cscope_connection stridx winbufnr indent min ' +
'complete_add nr2char searchpairpos inputdialog values matchlist ' +
'items hlexists strridx browsedir expand fmod pathshorten line2byte ' +
'argc count getwinvar glob foldtextresult getreg foreground cosh ' +
'matchdelete has char2nr simplify histget searchdecl iconv ' +
'winrestcmd pumvisible writefile foldlevel haslocaldir keys cos ' +
'matchstr foldtext histnr tan tempname getcwd byteidx getbufvar ' +
'islocked escape eventhandler remote_send serverlist winrestview ' +
'synstack pyeval prevnonblank readfile cindent filereadable changenr ' +
'exp'
},
illegal: /;/,
contains: [
hljs.NUMBER_MODE,
hljs.APOS_STRING_MODE,
/*
A double quote can start either a string or a line comment. Strings are
ended before the end of a line by another double quote and can contain
escaped double-quotes and post-escaped line breaks.
Also, any double quote at the beginning of a line is a comment but we
don't handle that properly at the moment: any double quote inside will
turn them into a string. Handling it properly will require a smarter
parser.
*/
{
className: 'string',
begin: /"(\\"|\n\\|[^"\n])*"/
},
hljs.COMMENT('"', '$'),
{
className: 'variable',
begin: /[bwtglsav]:[\w\d_]*/
},
{
className: 'function',
beginKeywords: 'function function!', end: '$',
relevance: 0,
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)'
}
]
},
{
className: 'symbol',
begin: /<[\w-]+>/
}
]
};
};
/***/ }),
/* 273 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
return {
case_insensitive: true,
lexemes: '[.%]?' + hljs.IDENT_RE,
keywords: {
keyword:
'lock rep repe repz repne repnz xaquire xrelease bnd nobnd ' +
'aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd
built_in:
// Instruction pointer
'ip eip rip ' +
// 8-bit registers
'al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ' +
// 16-bit registers
'ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w ' +
// 32-bit registers
'eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d ' +
// 64-bit registers
'rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 ' +
// Segment registers
'cs ds es fs gs ss ' +
// Floating point stack registers
'st st0 st1 st2 st3 st4 st5 st6 st7 ' +
// MMX Registers
'mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 ' +
// SSE registers
'xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 ' +
'xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ' +
// AVX registers
'ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ' +
'ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 ' +
// AVX-512F registers
'zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 ' +
'zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 ' +
// AVX-512F mask registers
'k0 k1 k2 k3 k4 k5 k6 k7 ' +
// Bound (MPX) register
'bnd0 bnd1 bnd2 bnd3 ' +
// Special register
'cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 ' +
// NASM altreg package
'r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b ' +
'r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d ' +
'r0h r1h r2h r3h ' +
'r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l ' +
'db dw dd dq dt ddq do dy dz ' +
'resb resw resd resq rest resdq reso resy resz ' +
'incbin equ times ' +
'byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr',
meta:
'%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif ' +
'%if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep ' +
'%endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment ' +
'.nolist ' +
'__FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ ' +
'__UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend ' +
'align alignb sectalign daz nodaz up down zero default option assume public ' +
'bits use16 use32 use64 default section segment absolute extern global common cpu float ' +
'__utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ ' +
'__float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ ' +
'__Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e ' +
'float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__'
},
contains: [
hljs.COMMENT(
';',
'$',
{
relevance: 0
}
),
{
className: 'number',
variants: [
// Float number and x87 BCD
{
begin: '\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|' +
'(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b',
relevance: 0
},
// Hex number in $
{ begin: '\\$[0-9][0-9A-Fa-f]*', relevance: 0 },
// Number in H,D,T,Q,O,B,Y suffix
{ begin: '\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b' },
// Number in X,D,T,Q,O,B,Y prefix
{ begin: '\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b'}
]
},
// Double quote string
hljs.QUOTE_STRING_MODE,
{
className: 'string',
variants: [
// Single-quoted string
{ begin: '\'', end: '[^\\\\]\'' },
// Backquoted string
{ begin: '`', end: '[^\\\\]`' }
],
relevance: 0
},
{
className: 'symbol',
variants: [
// Global label and local label
{ begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)' },
// Macro-local label
{ begin: '^\\s*%%[A-Za-z0-9_$#@~.?]*:' }
],
relevance: 0
},
// Macro parameter
{
className: 'subst',
begin: '%[0-9]+',
relevance: 0
},
// Macro parameter
{
className: 'subst',
begin: '%!\S+',
relevance: 0
},
{
className: 'meta',
begin: /^\s*\.[\w_-]+/
}
]
};
};
/***/ }),
/* 274 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var BUILTIN_MODULES =
'ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo ' +
'StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts';
var XL_KEYWORDS = {
keyword:
'if then else do while until for loop import with is as where when by data constant ' +
'integer real text name boolean symbol infix prefix postfix block tree',
literal:
'true false nil',
built_in:
'in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin ' +
'acos atan exp expm1 log log2 log10 log1p pi at text_length text_range ' +
'text_find text_replace contains page slide basic_slide title_slide ' +
'title subtitle fade_in fade_out fade_at clear_color color line_color ' +
'line_width texture_wrap texture_transform texture scale_?x scale_?y ' +
'scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y ' +
'rotate_?z? rectangle circle ellipse sphere path line_to move_to ' +
'quad_to curve_to theme background contents locally time mouse_?x ' +
'mouse_?y mouse_buttons ' +
BUILTIN_MODULES
};
var DOUBLE_QUOTE_TEXT = {
className: 'string',
begin: '"', end: '"', illegal: '\\n'
};
var SINGLE_QUOTE_TEXT = {
className: 'string',
begin: '\'', end: '\'', illegal: '\\n'
};
var LONG_TEXT = {
className: 'string',
begin: '<<', end: '>>'
};
var BASED_NUMBER = {
className: 'number',
begin: '[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?'
};
var IMPORT = {
beginKeywords: 'import', end: '$',
keywords: XL_KEYWORDS,
contains: [DOUBLE_QUOTE_TEXT]
};
var FUNCTION_DEFINITION = {
className: 'function',
begin: /[a-z][^\n]*->/, returnBegin: true, end: /->/,
contains: [
hljs.inherit(hljs.TITLE_MODE, {starts: {
endsWithParent: true,
keywords: XL_KEYWORDS
}})
]
};
return {
aliases: ['tao'],
lexemes: /[a-zA-Z][a-zA-Z0-9_?]*/,
keywords: XL_KEYWORDS,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
DOUBLE_QUOTE_TEXT,
SINGLE_QUOTE_TEXT,
LONG_TEXT,
FUNCTION_DEFINITION,
IMPORT,
BASED_NUMBER,
hljs.NUMBER_MODE
]
};
};
/***/ }),
/* 275 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var KEYWORDS = 'for let if while then else return where group by xquery encoding version' +
'module namespace boundary-space preserve strip default collation base-uri ordering' +
'copy-namespaces order declare import schema namespace function option in allowing empty' +
'at tumbling window sliding window start when only end when previous next stable ascending' +
'descending empty greatest least some every satisfies switch case typeswitch try catch and' +
'or to union intersect instance of treat as castable cast map array delete insert into' +
'replace value rename copy modify update';
var LITERAL = 'false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute';
var VAR = {
begin: /\$[a-zA-Z0-9\-]+/
};
var NUMBER = {
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
};
var STRING = {
className: 'string',
variants: [
{begin: /"/, end: /"/, contains: [{begin: /""/, relevance: 0}]},
{begin: /'/, end: /'/, contains: [{begin: /''/, relevance: 0}]}
]
};
var ANNOTATION = {
className: 'meta',
begin: '%\\w+'
};
var COMMENT = {
className: 'comment',
begin: '\\(:', end: ':\\)',
relevance: 10,
contains: [
{
className: 'doctag', begin: '@\\w+'
}
]
};
var METHOD = {
begin: '{', end: '}'
};
var CONTAINS = [
VAR,
STRING,
NUMBER,
COMMENT,
ANNOTATION,
METHOD
];
METHOD.contains = CONTAINS;
return {
aliases: ['xpath', 'xq'],
case_insensitive: false,
lexemes: /[a-zA-Z\$][a-zA-Z0-9_:\-]*/,
illegal: /(proc)|(abstract)|(extends)|(until)|(#)/,
keywords: {
keyword: KEYWORDS,
literal: LITERAL
},
contains: CONTAINS
};
};
/***/ }),
/* 276 */
/***/ (function(module, exports) {
module.exports = function(hljs) {
var STRING = {
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{
begin: 'b"', end: '"'
},
{
begin: 'b\'', end: '\''
},
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})
]
};
var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};
return {
aliases: ['zep'],
case_insensitive: true,
keywords:
'and include_once list abstract global private echo interface as static endswitch ' +
'array null if endwhile or const for endforeach self var let while isset public ' +
'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' +
'return parent clone use __CLASS__ __LINE__ else break print eval new ' +
'catch __METHOD__ case exception default die require __FUNCTION__ ' +
'enddeclare final try switch continue endfor endif declare unset true false ' +
'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' +
'yield finally int uint long ulong char uchar double float bool boolean string' +
'likely unlikely',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.HASH_COMMENT_MODE,
hljs.COMMENT(
'/\\*',
'\\*/',
{
contains: [
{
className: 'doctag',
begin: '@[A-Za-z]+'
}
]
}
),
hljs.COMMENT(
'__halt_compiler.+?;',
false,
{
endsWithParent: true,
keywords: '__halt_compiler',
lexemes: hljs.UNDERSCORE_IDENT_RE
}
),
{
className: 'string',
begin: '<<<[\'"]?\\w+[\'"]?$', end: '^\\w+;',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
// swallow composed identifiers to avoid parsing them as keywords
begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
},
{
className: 'function',
beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
illegal: '\\$|\\[|%',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'params',
begin: '\\(', end: '\\)',
contains: [
'self',
hljs.C_BLOCK_COMMENT_MODE,
STRING,
NUMBER
]
}
]
},
{
className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
illegal: /[:\(\$"]/,
contains: [
{beginKeywords: 'extends implements'},
hljs.UNDERSCORE_TITLE_MODE
]
},
{
beginKeywords: 'namespace', end: ';',
illegal: /[\.']/,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
beginKeywords: 'use', end: ';',
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
begin: '=>' // No markup, just a relevance booster
},
STRING,
NUMBER
]
};
};
/***/ }),
/* 277 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
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; }; }(); /**
* @fileoverview Implements editor preivew
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
var _tuiCodeSnippet = __webpack_require__(2);
var _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);
var _mdPreview = __webpack_require__(24);
var _mdPreview2 = _interopRequireDefault(_mdPreview);
var _eventManager = __webpack_require__(27);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _commandManager = __webpack_require__(3);
var _commandManager2 = _interopRequireDefault(_commandManager);
var _extManager = __webpack_require__(28);
var _extManager2 = _interopRequireDefault(_extManager);
var _convertor = __webpack_require__(29);
var _convertor2 = _interopRequireDefault(_convertor);
var _domUtils = __webpack_require__(5);
var _domUtils2 = _interopRequireDefault(_domUtils);
var _codeBlockManager = __webpack_require__(11);
var _codeBlockManager2 = _interopRequireDefault(_codeBlockManager);
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 TASK_ATTR_NAME = 'data-te-task';
var TASK_CHECKED_CLASS_NAME = 'checked';
/**
* Class ToastUIEditorViewer
*/
var ToastUIEditorViewer = function () {
/**
* Viewer
* @param {object} options Option object
* @param {HTMLElement} options.el - container element
* @param {string} options.initialValue Editor's initial value
* @param {object} options.events eventlist Event list
* @param {function} options.events.load It would be emitted when editor fully load
* @param {function} options.events.change It would be emitted when content changed
* @param {function} options.events.stateChange It would be emitted when format change by cursor position
* @param {function} options.events.focus It would be emitted when editor get focus
* @param {function} options.events.blur It would be emitted when editor loose focus
* @param {object} options.hooks Hook list
* @param {function} options.hooks.previewBeforeHook Submit preview to hook URL before preview be shown
* @param {string[]} [options.exts] - extensions
*/
function ToastUIEditorViewer(options) {
var _this = this;
_classCallCheck(this, ToastUIEditorViewer);
this.options = _jquery2.default.extend({
useDefaultHTMLSanitizer: true,
codeBlockLanguages: _codeBlockManager.CodeBlockManager.getHighlightJSLanguages(),
customConvertor: null
}, options);
this.eventManager = new _eventManager2.default();
this.commandManager = new _commandManager2.default(this);
if (this.options.customConvertor) {
// eslint-disable-next-line new-cap
this.convertor = new this.options.customConvertor(this.eventManager);
} else {
this.convertor = new _convertor2.default(this.eventManager);
}
this.toMarkOptions = null;
if (this.options.useDefaultHTMLSanitizer) {
this.convertor.initHtmlSanitizer();
}
if (this.options.hooks) {
_tuiCodeSnippet2.default.forEach(this.options.hooks, function (fn, key) {
_this.addHook(key, fn);
});
}
if (this.options.events) {
_tuiCodeSnippet2.default.forEach(this.options.events, function (fn, key) {
_this.on(key, fn);
});
}
this.preview = new _mdPreview2.default((0, _jquery2.default)(this.options.el), this.eventManager, this.convertor, true);
this.preview.$el.on('mousedown', _jquery2.default.proxy(this._toggleTask, this));
_extManager2.default.applyExtension(this, this.options.exts);
this.setValue(this.options.initialValue);
this.eventManager.emit('load', this);
}
/**
* Toggle task by detecting mousedown event.
* @param {MouseEvent} ev - event
* @private
*/
_createClass(ToastUIEditorViewer, [{
key: '_toggleTask',
value: function _toggleTask(ev) {
var isBeneathTaskBox = ev.offsetX < 18 && ev.offsetY > 18;
if (ev.target.hasAttribute(TASK_ATTR_NAME) && !isBeneathTaskBox) {
(0, _jquery2.default)(ev.target).toggleClass(TASK_CHECKED_CLASS_NAME);
this.eventManager.emit('change', {
source: 'viewer',
data: ev
});
}
}
/**
* Set content for preview
* @memberof ToastUIEditorViewer
* @param {string} markdown Markdown text
*/
}, {
key: 'setMarkdown',
value: function setMarkdown(markdown) {
this.markdownValue = markdown = markdown || '';
this.preview.refresh(this.markdownValue);
this.eventManager.emit('setMarkdownAfter', this.markdownValue);
}
/**
* Set content for preview
* @memberof ToastUIEditorViewer
* @param {string} markdown Markdown text
* @deprecated
*/
}, {
key: 'setValue',
value: function setValue(markdown) {
this.setMarkdown(markdown);
}
/**
* Bind eventHandler to event type
* @memberof ToastUIEditorViewer
* @param {string} type Event type
* @param {function} handler Event handler
*/
}, {
key: 'on',
value: function on(type, handler) {
this.eventManager.listen(type, handler);
}
/**
* Unbind eventHandler from event type
* @memberof ToastUIEditorViewer
* @param {string} type Event type
*/
}, {
key: 'off',
value: function off(type) {
this.eventManager.removeEventHandler(type);
}
/**
* Remove Viewer preview from document
* @memberof ToastUIEditorViewer
*/
}, {
key: 'remove',
value: function remove() {
this.eventManager.emit('removeEditor');
this.preview.$el.off('mousedown', _jquery2.default.proxy(this._toggleTask, this));
this.preview.remove();
this.options = null;
this.eventManager = null;
this.commandManager = null;
this.convertor = null;
this.preview = null;
}
/**
* Add hook to Viewer preview's event
* @memberof ToastUIEditorViewer
* @param {string} type Event type
* @param {function} handler Event handler
*/
}, {
key: 'addHook',
value: function addHook(type, handler) {
this.eventManager.removeEventHandler(type);
this.eventManager.listen(type, handler);
}
/**
* Return true
* @memberof ToastUIEditorViewer
* @returns {boolean}
*/
}, {
key: 'isViewer',
value: function isViewer() {
return true;
}
/**
* Return false
* @memberof ToastUIEditorViewer
* @returns {boolean}
*/
}, {
key: 'isMarkdownMode',
value: function isMarkdownMode() {
return false;
}
/**
* Return false
* @memberof ToastUIEditorViewer
* @returns {boolean}
*/
}, {
key: 'isWysiwygMode',
value: function isWysiwygMode() {
return false;
}
/**
* Define extension
* @memberof ToastUIEditorViewer
* @param {string} name Extension name
* @param {ExtManager~extension} ext extension
*/
}], [{
key: 'defineExtension',
value: function defineExtension(name, ext) {
_extManager2.default.defineExtension(name, ext);
}
}]);
return ToastUIEditorViewer;
}();
/**
* check whther is viewer
* @type {boolean}
*/
ToastUIEditorViewer.isViewer = true;
/**
* domUtil instance
* @type {DomUtil}
*/
ToastUIEditorViewer.domUtils = _domUtils2.default;
/**
* CodeBlockManager instance
* @type {CodeBlockManager}
*/
ToastUIEditorViewer.codeBlockManager = _codeBlockManager2.default;
/**
* MarkdownIt hightlight instance
* @type {MarkdownIt}
*/
ToastUIEditorViewer.markdownitHighlight = _convertor2.default.getMarkdownitHighlightRenderer();
/**
* MarkdownIt instance
* @type {MarkdownIt}
*/
ToastUIEditorViewer.markdownit = _convertor2.default.getMarkdownitRenderer();
/**
* @ignore
*/
ToastUIEditorViewer.i18n = null;
/**
* @ignore
*/
ToastUIEditorViewer.Button = null;
/**
* @ignore
*/
ToastUIEditorViewer.WwCodeBlockManager = null;
/**
* @ignore
*/
ToastUIEditorViewer.WwTableManager = null;
/**
* @ignore
*/
ToastUIEditorViewer.WwTableSelectionManager = null;
module.exports = ToastUIEditorViewer;
/***/ }),
/* 278 */,
/* 279 */,
/* 280 */,
/* 281 */,
/* 282 */,
/* 283 */,
/* 284 */,
/* 285 */,
/* 286 */,
/* 287 */,
/* 288 */,
/* 289 */,
/* 290 */,
/* 291 */,
/* 292 */,
/* 293 */,
/* 294 */,
/* 295 */,
/* 296 */,
/* 297 */,
/* 298 */,
/* 299 */,
/* 300 */,
/* 301 */,
/* 302 */,
/* 303 */,
/* 304 */,
/* 305 */,
/* 306 */,
/* 307 */,
/* 308 */,
/* 309 */,
/* 310 */,
/* 311 */,
/* 312 */,
/* 313 */,
/* 314 */,
/* 315 */,
/* 316 */,
/* 317 */,
/* 318 */,
/* 319 */,
/* 320 */,
/* 321 */,
/* 322 */,
/* 323 */,
/* 324 */,
/* 325 */,
/* 326 */,
/* 327 */,
/* 328 */,
/* 329 */,
/* 330 */,
/* 331 */,
/* 332 */,
/* 333 */,
/* 334 */,
/* 335 */,
/* 336 */,
/* 337 */,
/* 338 */,
/* 339 */,
/* 340 */,
/* 341 */,
/* 342 */,
/* 343 */,
/* 344 */,
/* 345 */,
/* 346 */,
/* 347 */,
/* 348 */,
/* 349 */,
/* 350 */,
/* 351 */,
/* 352 */,
/* 353 */,
/* 354 */,
/* 355 */,
/* 356 */,
/* 357 */,
/* 358 */,
/* 359 */,
/* 360 */,
/* 361 */,
/* 362 */,
/* 363 */,
/* 364 */,
/* 365 */,
/* 366 */,
/* 367 */,
/* 368 */,
/* 369 */,
/* 370 */,
/* 371 */,
/* 372 */,
/* 373 */,
/* 374 */,
/* 375 */,
/* 376 */,
/* 377 */,
/* 378 */,
/* 379 */,
/* 380 */,
/* 381 */,
/* 382 */,
/* 383 */,
/* 384 */,
/* 385 */,
/* 386 */,
/* 387 */,
/* 388 */,
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _jquery = __webpack_require__(1);
var _jquery2 = _interopRequireDefault(_jquery);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Viewer = __webpack_require__(277);
// for jquery
/**
* @fileoverview entry point for viewer
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
*/
_jquery2.default.fn.tuiEditor = function () {
var options = void 0,
instance = void 0;
var el = this.get(0);
if (el) {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
options = args[0] || {};
instance = _jquery2.default.data(el, 'tuiEditor');
if (instance) {
if (typeof options === 'string') {
var _instance;
return (_instance = instance)[options].apply(_instance, args.slice(1));
}
} else {
options.el = el;
instance = new Viewer(options);
_jquery2.default.data(el, 'tuiEditor', instance);
}
}
return this;
};
module.exports = Viewer;
/***/ })
/******/ ]);
});