mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Client update
See changelog.md
This commit is contained in:
parent
f12dc52c79
commit
5af59f85f3
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.1.91 pre 2.2] - 2019-08-17
|
||||
### Added
|
||||
- (Client) Markdown engine
|
||||
- (Client) Imgur based image posting (through markdown)
|
||||
|
||||
### Changed
|
||||
- (Client) Removed cloudflare references making hack.chat is self-hosted again
|
||||
- (Client) The way messages are pushed, closing an xss vuln in PRs 985dd6f and 9fcb235
|
||||
- (Client) Side bar layout
|
||||
- (Client) Fixed some options not storing
|
||||
- (Client) Fixed firefox drop down menu bug
|
||||
- (Client) Updated Katex lib
|
||||
|
||||
### Stretched
|
||||
- The term "minimal"
|
||||
|
||||
## [2.1.9 pre 2.2] - 2019-03-18
|
||||
### Changed
|
||||
- Configuration script setup, making it more portable/sane
|
||||
|
|
1
client/audio/index.html
Normal file
1
client/audio/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
225
client/client.js
225
client/client.js
|
@ -7,6 +7,103 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// initialize markdown engine
|
||||
var markdownOptions = {
|
||||
html: false,
|
||||
xhtmlOut: false,
|
||||
breaks: true,
|
||||
langPrefix: '',
|
||||
linkify: true,
|
||||
linkTarget: '_blank" rel="noreferrer',
|
||||
typographer: true,
|
||||
quotes: `""''`,
|
||||
|
||||
doHighlight: true,
|
||||
highlight: function (str, lang) {
|
||||
if (!markdownOptions.doHighlight || !window.hljs) { return ''; }
|
||||
|
||||
if (lang && hljs.getLanguage(lang)) {
|
||||
try {
|
||||
return hljs.highlight(lang, str).value;
|
||||
} catch (__) {}
|
||||
}
|
||||
|
||||
try {
|
||||
return hljs.highlightAuto(str).value;
|
||||
} catch (__) {}
|
||||
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
var md = new Remarkable('full', markdownOptions);
|
||||
|
||||
// image handler
|
||||
var allowImages = false;
|
||||
var imgHostWhitelist = [
|
||||
'i.imgur.com',
|
||||
'imgur.com',
|
||||
];
|
||||
|
||||
function getDomain(link) {
|
||||
var a = document.createElement('a');
|
||||
a.href = link;
|
||||
return a.hostname;
|
||||
}
|
||||
|
||||
function isWhiteListed(link) {
|
||||
return imgHostWhitelist.indexOf(getDomain(link)) !== -1;
|
||||
}
|
||||
|
||||
md.renderer.rules.image = function (tokens, idx, options) {
|
||||
var src = Remarkable.utils.escapeHtml(tokens[idx].src);
|
||||
|
||||
if (isWhiteListed(src) && allowImages) {
|
||||
var imgSrc = ' src="' + Remarkable.utils.escapeHtml(tokens[idx].src) + '"';
|
||||
var title = tokens[idx].title ? (' title="' + Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(tokens[idx].title)) + '"') : '';
|
||||
var alt = ' alt="' + (tokens[idx].alt ? Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(Remarkable.utils.unescapeMd(tokens[idx].alt))) : '') + '"';
|
||||
var suffix = options.xhtmlOut ? ' /' : '';
|
||||
var scrollOnload = isAtBottom() ? ' onload="window.scrollTo(0, document.body.scrollHeight)"' : '';
|
||||
return '<a href="' + src + '" target="_blank" rel="noreferrer"><img' + scrollOnload + imgSrc + alt + title + suffix + '></a>';
|
||||
}
|
||||
|
||||
return '<a href="' + src + '" target="_blank" rel="noreferrer">' + Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(src)) + '</a>';
|
||||
};
|
||||
|
||||
md.renderer.rules.link_open = function (tokens, idx, options) {
|
||||
var title = tokens[idx].title ? (' title="' + Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(tokens[idx].title)) + '"') : '';
|
||||
var target = options.linkTarget ? (' target="' + options.linkTarget + '"') : '';
|
||||
return '<a rel="noreferrer" onclick="return verifyLink(this)" href="' + Remarkable.utils.escapeHtml(tokens[idx].href) + '"' + title + target + '>';
|
||||
};
|
||||
|
||||
md.renderer.rules.text = function(tokens, idx) {
|
||||
tokens[idx].content = Remarkable.utils.escapeHtml(tokens[idx].content);
|
||||
|
||||
if (tokens[idx].content.indexOf('?') !== -1) {
|
||||
tokens[idx].content = tokens[idx].content.replace(/(^|\s)(\?)\S+?(?=[,.!?:)]?\s|$)/gm, function(match) {
|
||||
var channelLink = Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(match.trim()));
|
||||
var whiteSpace = '';
|
||||
if (match[0] !== '?') {
|
||||
whiteSpace = match[0];
|
||||
}
|
||||
return whiteSpace + '<a href="' + channelLink + '" target="_blank">' + channelLink + '</a>';
|
||||
});
|
||||
}
|
||||
|
||||
return tokens[idx].content;
|
||||
};
|
||||
|
||||
md.use(remarkableKatex);
|
||||
|
||||
function verifyLink(link) {
|
||||
var linkHref = Remarkable.utils.escapeHtml(Remarkable.utils.replaceEntities(link.href));
|
||||
if (linkHref !== link.innerHTML) {
|
||||
return confirm('Warning, please verify this is where you want to go: ' + linkHref);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var verifyNickname = function (nick) {
|
||||
return /^[a-zA-Z0-9_]{1,24}$/.test(nick);
|
||||
}
|
||||
|
@ -67,7 +164,6 @@ var myChannel = window.location.search.replace(/^\?/, '');
|
|||
var lastSent = [""];
|
||||
var lastSentPos = 0;
|
||||
|
||||
|
||||
/** Notification switch and local storage behavior **/
|
||||
var notifySwitch = document.getElementById("notify-switch")
|
||||
var notifySetting = localStorageGet("notify-api")
|
||||
|
@ -118,7 +214,6 @@ function RequestNotifyPermission() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Update localStorage with value of checkbox
|
||||
notifySwitch.addEventListener('change', (event) => {
|
||||
if (event.target.checked) {
|
||||
|
@ -138,7 +233,6 @@ if (notifySetting === "true" || notifySetting === true) {
|
|||
notifySwitch.checked = false
|
||||
}
|
||||
|
||||
|
||||
/** Sound switch and local storage behavior **/
|
||||
var soundSwitch = document.getElementById("sound-switch")
|
||||
var notifySetting = localStorageGet("notify-sound")
|
||||
|
@ -159,8 +253,6 @@ if (notifySetting === "true" || notifySetting === true) {
|
|||
soundSwitch.checked = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Create a new notification after checking if permission has been granted
|
||||
function spawnNotification(title, body) {
|
||||
// Let's check if the browser supports notifications
|
||||
|
@ -184,12 +276,11 @@ function spawnNotification(title, body) {
|
|||
var n = new Notification(title, options);
|
||||
}
|
||||
} else if (Notification.permission == "denied") {
|
||||
// At last, if the user has denied notifications, and you
|
||||
// At last, if the user has denied notifications, and you
|
||||
// want to be respectful, there is no need to bother them any more.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function notify(args) {
|
||||
// Spawn notification if enabled
|
||||
if (notifySwitch.checked) {
|
||||
|
@ -320,7 +411,6 @@ function pushMessage(args) {
|
|||
((args.type === "whisper" || args.type === "invite") && args.from)
|
||||
)
|
||||
) {
|
||||
messageEl.classList.add('refmessage');
|
||||
notify(args);
|
||||
}
|
||||
|
||||
|
@ -365,41 +455,10 @@ function pushMessage(args) {
|
|||
}
|
||||
|
||||
// Text
|
||||
var textEl = document.createElement('pre');
|
||||
var textEl = document.createElement('p');
|
||||
textEl.classList.add('text');
|
||||
textEl.innerHTML = md.render(args.text);
|
||||
|
||||
textEl.textContent = args.text || '';
|
||||
|
||||
if($('#syntax-highlight').checked && textEl.textContent.includes('```')) {
|
||||
var textParts = textEl.textContent.split('```');
|
||||
var ignore = 0;
|
||||
textEl.innerHTML = '';
|
||||
for(var i=0; i< textParts.length; i++) {
|
||||
if(i==ignore) {
|
||||
textEl.innerHTML += parseLatex(textParts[i]);
|
||||
continue;
|
||||
}
|
||||
var lang = textParts[i].split(/\s+/g)[0];
|
||||
if(lang == '') {
|
||||
textEl.innerHTML += parseLatex('```' + textParts[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
var codeEl = document.createElement('code');
|
||||
codeEl.classList.add(lang);
|
||||
codeEl.textContent = textParts[i].replace(lang, '').trim();
|
||||
hljs.highlightBlock(codeEl);
|
||||
|
||||
textEl.innerHTML += codeEl.outerHTML.toString();
|
||||
ignore = i+1;
|
||||
}
|
||||
} else {
|
||||
var parsed = parseLatex(textEl.textContent);
|
||||
if(parsed != null)
|
||||
textEl.innerHTML = parsed;
|
||||
}
|
||||
textEl.innerHTML = textEl.innerHTML.replace(/(\?|https?:\/\/)\S+?(?=[,.!?:)]?\s|$)/g, parseLinks);
|
||||
|
||||
messageEl.appendChild(textEl);
|
||||
|
||||
// Scroll to bottom
|
||||
|
@ -413,27 +472,6 @@ function pushMessage(args) {
|
|||
updateTitle();
|
||||
}
|
||||
|
||||
function parseLatex(str) {
|
||||
if ($('#parse-latex').checked) {
|
||||
// Temporary hotfix for \rule spamming, see https://github.com/Khan/KaTeX/issues/109
|
||||
str = str.replace(/\\rule|\\\\\s*\[.*?\]/g, '');
|
||||
var holEl = document.createElement('p');
|
||||
holEl.textContent = str;
|
||||
try {
|
||||
renderMathInElement(holEl, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
]
|
||||
});
|
||||
return holEl.innerHTML.toString();
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function insertAtCursor(text) {
|
||||
var input = $('#chatinput');
|
||||
var start = input.selectionStart || 0;
|
||||
|
@ -453,19 +491,6 @@ function send(data) {
|
|||
}
|
||||
}
|
||||
|
||||
function parseLinks(g0) {
|
||||
var a = document.createElement('a');
|
||||
|
||||
a.innerHTML = g0;
|
||||
|
||||
var url = a.textContent;
|
||||
|
||||
a.href = url;
|
||||
a.target = '_blank';
|
||||
|
||||
return a.outerHTML;
|
||||
}
|
||||
|
||||
var windowActive = true;
|
||||
var unread = 0;
|
||||
|
||||
|
@ -620,7 +645,6 @@ $('#chatinput').oninput = function () {
|
|||
|
||||
updateInputSize();
|
||||
|
||||
|
||||
/* sidebar */
|
||||
|
||||
$('#sidebar').onmouseenter = $('#sidebar').ontouchstart = function (e) {
|
||||
|
@ -629,7 +653,14 @@ $('#sidebar').onmouseenter = $('#sidebar').ontouchstart = function (e) {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
$('#sidebar').onmouseleave = document.ontouchstart = function () {
|
||||
$('#sidebar').onmouseleave = document.ontouchstart = function (event) {
|
||||
var e = event.toElement || event.relatedTarget;
|
||||
try {
|
||||
if (e.parentNode == this || e == this) {
|
||||
return;
|
||||
}
|
||||
} catch (e) { return; }
|
||||
|
||||
if (!$('#pin-sidebar').checked) {
|
||||
$('#sidebar-content').classList.add('hidden');
|
||||
$('#sidebar').classList.remove('expand');
|
||||
|
@ -639,9 +670,7 @@ $('#sidebar').onmouseleave = document.ontouchstart = function () {
|
|||
$('#clear-messages').onclick = function () {
|
||||
// Delete children elements
|
||||
var messages = $('#messages');
|
||||
while (messages.firstChild) {
|
||||
messages.removeChild(messages.firstChild);
|
||||
}
|
||||
messages.innerHTML = '';
|
||||
}
|
||||
|
||||
// Restore settings from localStorage
|
||||
|
@ -657,6 +686,8 @@ if (localStorageGet('joined-left') == 'false') {
|
|||
|
||||
if (localStorageGet('parse-latex') == 'false') {
|
||||
$('#parse-latex').checked = false;
|
||||
md.inline.ruler.disable([ 'katex' ]);
|
||||
md.block.ruler.disable([ 'katex' ]);
|
||||
}
|
||||
|
||||
$('#pin-sidebar').onchange = function (e) {
|
||||
|
@ -668,7 +699,37 @@ $('#joined-left').onchange = function (e) {
|
|||
}
|
||||
|
||||
$('#parse-latex').onchange = function (e) {
|
||||
localStorageSet('parse-latex', !!e.target.checked);
|
||||
var enabled = !!e.target.checked;
|
||||
localStorageSet('parse-latex', enabled);
|
||||
if (enabled) {
|
||||
md.inline.ruler.enable([ 'katex' ]);
|
||||
md.block.ruler.enable([ 'katex' ]);
|
||||
} else {
|
||||
md.inline.ruler.disable([ 'katex' ]);
|
||||
md.block.ruler.disable([ 'katex' ]);
|
||||
}
|
||||
}
|
||||
|
||||
if (localStorageGet('syntax-highlight') == 'false') {
|
||||
$('#syntax-highlight').checked = false;
|
||||
markdownOptions.doHighlight = false;
|
||||
}
|
||||
|
||||
$('#syntax-highlight').onchange = function (e) {
|
||||
var enabled = !!e.target.checked;
|
||||
localStorageSet('syntax-highlight', enabled);
|
||||
markdownOptions.doHighlight = enabled;
|
||||
}
|
||||
|
||||
if (localStorageGet('allow-imgur') == 'false') {
|
||||
$('#allow-imgur').checked = false;
|
||||
allowImages = false;
|
||||
}
|
||||
|
||||
$('#allow-imgur').onchange = function (e) {
|
||||
var enabled = !!e.target.checked;
|
||||
localStorageSet('allow-imgur', enabled);
|
||||
allowImages = enabled;
|
||||
}
|
||||
|
||||
// User list
|
||||
|
@ -772,7 +833,7 @@ function setScheme(scheme) {
|
|||
|
||||
function setHighlight(scheme) {
|
||||
currentHighlight = scheme;
|
||||
$('#highlight-link').href = "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/" + scheme + ".min.css";
|
||||
$('#highlight-link').href = "vendor/hljs/styles/" + scheme + ".min.css";
|
||||
localStorageSet('highlight', scheme);
|
||||
}
|
||||
|
||||
|
|
1
client/imgs/index.html
Normal file
1
client/imgs/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -5,14 +5,18 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<title>hack.chat</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="katex/katex.min.css">
|
||||
<link id="scheme-link" rel="stylesheet" href="schemes/atelier-dune.css">
|
||||
<script src="katex/katex.min.js"></script>
|
||||
<script src="katex/contrib/auto-render.min.js"></script>
|
||||
<link id="highlight-link" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/hybrid.min.css">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link id="scheme-link" rel="stylesheet" href="schemes/atelier-dune.css">
|
||||
|
||||
<link rel="stylesheet" href="vendor/katex/katex.min.css">
|
||||
<script src="vendor/katex/katex.min.js"></script>
|
||||
<script src="vendor/remarkable-katex/remarkableKatex.min.js"></script>
|
||||
|
||||
<script src="vendor/hljs/highlight.min.js"></script>
|
||||
<link id="highlight-link" rel="stylesheet" href="vendor/hljs/styles/hybrid.min.css">
|
||||
<script src="vendor/remarkable/remarkable.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -31,11 +35,11 @@
|
|||
</footer>
|
||||
<nav id="sidebar">
|
||||
<div id="sidebar-content" class="hidden">
|
||||
<h4>Settings</h4>
|
||||
<p>
|
||||
<input id="pin-sidebar" type="checkbox">
|
||||
<label for="pin-sidebar">Pin sidebar</label>
|
||||
</p>
|
||||
<h4>Settings</h4>
|
||||
<p>
|
||||
<input id="sound-switch" type="checkbox">
|
||||
<label for="sound-switch">Sound notifications</label>
|
||||
|
@ -50,19 +54,30 @@
|
|||
</p>
|
||||
<p>
|
||||
<input id="parse-latex" type="checkbox" checked>
|
||||
<label for="parse-latex">Parse LaTeX</label>
|
||||
<label for="parse-latex">Allow LaTeX</label>
|
||||
</p>
|
||||
<p>
|
||||
<input id="syntax-highlight" type="checkbox" checked>
|
||||
<label for="syntax-highlight">Allow Highlight</label>
|
||||
</p>
|
||||
<p>
|
||||
<input id="allow-imgur" type="checkbox">
|
||||
<label for="allow-imgur" title="Embed images like: ![Title](https://i.imgur.com/image.png)">Allow Imgur</label>
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
<h4>Color scheme</h4>
|
||||
<select id="scheme-selector"></select>
|
||||
</p>
|
||||
<p>
|
||||
<h4>Highlight scheme</h4>
|
||||
<select id="highlight-selector"></select>
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
<button id="clear-messages">Clear all messages</button>
|
||||
</p>
|
||||
<h4>Color scheme</h4>
|
||||
<select id="scheme-selector"></select>
|
||||
<p>
|
||||
<input id="syntax-highlight" type="checkbox" checked>
|
||||
<label for="syntax-highlight">Syntax Highlight</label>
|
||||
</p>
|
||||
<h4>Highlight scheme</h4>
|
||||
<select id="highlight-selector"></select>
|
||||
<hr>
|
||||
<h4>Users online</h4>
|
||||
<p>(Click user to invite)</p>
|
||||
<ul id="users"></ul>
|
||||
|
|
|
@ -1,790 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("katex"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["katex"], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["renderMathInElement"] = factory(require("katex"));
|
||||
else
|
||||
root["renderMathInElement"] = factory(root["katex"]);
|
||||
})(this, function(__WEBPACK_EXTERNAL_MODULE_38__) {
|
||||
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 = 9);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
||||
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
||||
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(it){
|
||||
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
module.exports = !__webpack_require__(3)(function(){
|
||||
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(exec){
|
||||
try {
|
||||
return !!exec();
|
||||
} catch(e){
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var core = module.exports = {version: '2.4.0'};
|
||||
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||||
var IObject = __webpack_require__(6)
|
||||
, defined = __webpack_require__(7);
|
||||
module.exports = function(it){
|
||||
return IObject(defined(it));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var cof = __webpack_require__(27);
|
||||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
||||
return cof(it) == 'String' ? it.split('') : Object(it);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.2.1 RequireObjectCoercible(argument)
|
||||
module.exports = function(it){
|
||||
if(it == undefined)throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.1.4 ToInteger
|
||||
var ceil = Math.ceil
|
||||
, floor = Math.floor;
|
||||
module.exports = function(it){
|
||||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 9 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__ = __webpack_require__(10);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_katex__ = __webpack_require__(38);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_katex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_katex__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__splitAtDelimiters__ = __webpack_require__(39);
|
||||
|
||||
/* eslint no-console:0 */
|
||||
|
||||
|
||||
|
||||
|
||||
var splitWithDelimiters = function splitWithDelimiters(text, delimiters) {
|
||||
var data = [{ type: "text", data: text }];
|
||||
for (var i = 0; i < delimiters.length; i++) {
|
||||
var delimiter = delimiters[i];
|
||||
data = Object(__WEBPACK_IMPORTED_MODULE_2__splitAtDelimiters__["a" /* default */])(data, delimiter.left, delimiter.right, delimiter.display || false);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
/* Note: optionsCopy is mutated by this method. If it is ever exposed in the
|
||||
* API, we should copy it before mutating.
|
||||
*/
|
||||
var renderMathInText = function renderMathInText(text, optionsCopy) {
|
||||
var data = splitWithDelimiters(text, optionsCopy.delimiters);
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i].type === "text") {
|
||||
fragment.appendChild(document.createTextNode(data[i].data));
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
var math = data[i].data;
|
||||
// Override any display mode defined in the settings with that
|
||||
// defined by the text itself
|
||||
optionsCopy.displayMode = data[i].display;
|
||||
try {
|
||||
__WEBPACK_IMPORTED_MODULE_1_katex___default.a.render(math, span, optionsCopy);
|
||||
} catch (e) {
|
||||
if (!(e instanceof __WEBPACK_IMPORTED_MODULE_1_katex___default.a.ParseError)) {
|
||||
throw e;
|
||||
}
|
||||
optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e);
|
||||
fragment.appendChild(document.createTextNode(data[i].rawData));
|
||||
continue;
|
||||
}
|
||||
fragment.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
return fragment;
|
||||
};
|
||||
|
||||
var renderElem = function renderElem(elem, optionsCopy) {
|
||||
for (var i = 0; i < elem.childNodes.length; i++) {
|
||||
var childNode = elem.childNodes[i];
|
||||
if (childNode.nodeType === 3) {
|
||||
// Text node
|
||||
var frag = renderMathInText(childNode.textContent, optionsCopy);
|
||||
i += frag.childNodes.length - 1;
|
||||
elem.replaceChild(frag, childNode);
|
||||
} else if (childNode.nodeType === 1) {
|
||||
// Element node
|
||||
var shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1;
|
||||
|
||||
if (shouldRender) {
|
||||
renderElem(childNode, optionsCopy);
|
||||
}
|
||||
}
|
||||
// Otherwise, it's something else, and ignore it.
|
||||
}
|
||||
};
|
||||
|
||||
var defaultAutoRenderOptions = {
|
||||
delimiters: [{ left: "$$", right: "$$", display: true }, { left: "\\[", right: "\\]", display: true }, { left: "\\(", right: "\\)", display: false }],
|
||||
|
||||
ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"],
|
||||
|
||||
errorCallback: function errorCallback(msg, err) {
|
||||
console.error(msg, err);
|
||||
}
|
||||
};
|
||||
|
||||
var renderMathInElement = function renderMathInElement(elem, options) {
|
||||
if (!elem) {
|
||||
throw new Error("No element provided to render");
|
||||
}
|
||||
|
||||
var optionsCopy = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default()({}, defaultAutoRenderOptions, options);
|
||||
renderElem(elem, optionsCopy);
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (renderMathInElement);
|
||||
|
||||
/***/ }),
|
||||
/* 10 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = { "default": __webpack_require__(11), __esModule: true };
|
||||
|
||||
/***/ }),
|
||||
/* 11 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(12);
|
||||
module.exports = __webpack_require__(4).Object.assign;
|
||||
|
||||
/***/ }),
|
||||
/* 12 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.3.1 Object.assign(target, source)
|
||||
var $export = __webpack_require__(13);
|
||||
|
||||
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(23)});
|
||||
|
||||
/***/ }),
|
||||
/* 13 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__(0)
|
||||
, core = __webpack_require__(4)
|
||||
, ctx = __webpack_require__(14)
|
||||
, hide = __webpack_require__(16)
|
||||
, PROTOTYPE = 'prototype';
|
||||
|
||||
var $export = function(type, name, source){
|
||||
var IS_FORCED = type & $export.F
|
||||
, IS_GLOBAL = type & $export.G
|
||||
, IS_STATIC = type & $export.S
|
||||
, IS_PROTO = type & $export.P
|
||||
, IS_BIND = type & $export.B
|
||||
, IS_WRAP = type & $export.W
|
||||
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
||||
, expProto = exports[PROTOTYPE]
|
||||
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
||||
, key, own, out;
|
||||
if(IS_GLOBAL)source = name;
|
||||
for(key in source){
|
||||
// contains in native
|
||||
own = !IS_FORCED && target && target[key] !== undefined;
|
||||
if(own && key in exports)continue;
|
||||
// export native or passed
|
||||
out = own ? target[key] : source[key];
|
||||
// prevent global pollution for namespaces
|
||||
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
||||
// bind timers to global for call from export context
|
||||
: IS_BIND && own ? ctx(out, global)
|
||||
// wrap global constructors for prevent change them in library
|
||||
: IS_WRAP && target[key] == out ? (function(C){
|
||||
var F = function(a, b, c){
|
||||
if(this instanceof C){
|
||||
switch(arguments.length){
|
||||
case 0: return new C;
|
||||
case 1: return new C(a);
|
||||
case 2: return new C(a, b);
|
||||
} return new C(a, b, c);
|
||||
} return C.apply(this, arguments);
|
||||
};
|
||||
F[PROTOTYPE] = C[PROTOTYPE];
|
||||
return F;
|
||||
// make static versions for prototype methods
|
||||
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
||||
if(IS_PROTO){
|
||||
(exports.virtual || (exports.virtual = {}))[key] = out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
||||
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
|
||||
}
|
||||
}
|
||||
};
|
||||
// type bitmap
|
||||
$export.F = 1; // forced
|
||||
$export.G = 2; // global
|
||||
$export.S = 4; // static
|
||||
$export.P = 8; // proto
|
||||
$export.B = 16; // bind
|
||||
$export.W = 32; // wrap
|
||||
$export.U = 64; // safe
|
||||
$export.R = 128; // real proto method for `library`
|
||||
module.exports = $export;
|
||||
|
||||
/***/ }),
|
||||
/* 14 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// optional / simple context binding
|
||||
var aFunction = __webpack_require__(15);
|
||||
module.exports = function(fn, that, length){
|
||||
aFunction(fn);
|
||||
if(that === undefined)return fn;
|
||||
switch(length){
|
||||
case 1: return function(a){
|
||||
return fn.call(that, a);
|
||||
};
|
||||
case 2: return function(a, b){
|
||||
return fn.call(that, a, b);
|
||||
};
|
||||
case 3: return function(a, b, c){
|
||||
return fn.call(that, a, b, c);
|
||||
};
|
||||
}
|
||||
return function(/* ...args */){
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 15 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(it){
|
||||
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var dP = __webpack_require__(17)
|
||||
, createDesc = __webpack_require__(22);
|
||||
module.exports = __webpack_require__(2) ? function(object, key, value){
|
||||
return dP.f(object, key, createDesc(1, value));
|
||||
} : function(object, key, value){
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var anObject = __webpack_require__(18)
|
||||
, IE8_DOM_DEFINE = __webpack_require__(19)
|
||||
, toPrimitive = __webpack_require__(21)
|
||||
, dP = Object.defineProperty;
|
||||
|
||||
exports.f = __webpack_require__(2) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
||||
anObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
anObject(Attributes);
|
||||
if(IE8_DOM_DEFINE)try {
|
||||
return dP(O, P, Attributes);
|
||||
} catch(e){ /* empty */ }
|
||||
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
||||
if('value' in Attributes)O[P] = Attributes.value;
|
||||
return O;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(1);
|
||||
module.exports = function(it){
|
||||
if(!isObject(it))throw TypeError(it + ' is not an object!');
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 19 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = !__webpack_require__(2) && !__webpack_require__(3)(function(){
|
||||
return Object.defineProperty(__webpack_require__(20)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 20 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(1)
|
||||
, document = __webpack_require__(0).document
|
||||
// in old IE typeof document.createElement is 'object'
|
||||
, is = isObject(document) && isObject(document.createElement);
|
||||
module.exports = function(it){
|
||||
return is ? document.createElement(it) : {};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 21 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.1 ToPrimitive(input [, PreferredType])
|
||||
var isObject = __webpack_require__(1);
|
||||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||
// and the second argument - flag - preferred type is a string
|
||||
module.exports = function(it, S){
|
||||
if(!isObject(it))return it;
|
||||
var fn, val;
|
||||
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
throw TypeError("Can't convert object to primitive value");
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 22 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(bitmap, value){
|
||||
return {
|
||||
enumerable : !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable : !(bitmap & 4),
|
||||
value : value
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 23 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// 19.1.2.1 Object.assign(target, source, ...)
|
||||
var getKeys = __webpack_require__(24)
|
||||
, gOPS = __webpack_require__(35)
|
||||
, pIE = __webpack_require__(36)
|
||||
, toObject = __webpack_require__(37)
|
||||
, IObject = __webpack_require__(6)
|
||||
, $assign = Object.assign;
|
||||
|
||||
// should work with symbols and should have deterministic property order (V8 bug)
|
||||
module.exports = !$assign || __webpack_require__(3)(function(){
|
||||
var A = {}
|
||||
, B = {}
|
||||
, S = Symbol()
|
||||
, K = 'abcdefghijklmnopqrst';
|
||||
A[S] = 7;
|
||||
K.split('').forEach(function(k){ B[k] = k; });
|
||||
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
||||
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
|
||||
var T = toObject(target)
|
||||
, aLen = arguments.length
|
||||
, index = 1
|
||||
, getSymbols = gOPS.f
|
||||
, isEnum = pIE.f;
|
||||
while(aLen > index){
|
||||
var S = IObject(arguments[index++])
|
||||
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
|
||||
, length = keys.length
|
||||
, j = 0
|
||||
, key;
|
||||
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
|
||||
} return T;
|
||||
} : $assign;
|
||||
|
||||
/***/ }),
|
||||
/* 24 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||||
var $keys = __webpack_require__(25)
|
||||
, enumBugKeys = __webpack_require__(34);
|
||||
|
||||
module.exports = Object.keys || function keys(O){
|
||||
return $keys(O, enumBugKeys);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 25 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var has = __webpack_require__(26)
|
||||
, toIObject = __webpack_require__(5)
|
||||
, arrayIndexOf = __webpack_require__(28)(false)
|
||||
, IE_PROTO = __webpack_require__(31)('IE_PROTO');
|
||||
|
||||
module.exports = function(object, names){
|
||||
var O = toIObject(object)
|
||||
, i = 0
|
||||
, result = []
|
||||
, key;
|
||||
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while(names.length > i)if(has(O, key = names[i++])){
|
||||
~arrayIndexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 26 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
module.exports = function(it, key){
|
||||
return hasOwnProperty.call(it, key);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 27 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
module.exports = function(it){
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 28 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// false -> Array#indexOf
|
||||
// true -> Array#includes
|
||||
var toIObject = __webpack_require__(5)
|
||||
, toLength = __webpack_require__(29)
|
||||
, toIndex = __webpack_require__(30);
|
||||
module.exports = function(IS_INCLUDES){
|
||||
return function($this, el, fromIndex){
|
||||
var O = toIObject($this)
|
||||
, length = toLength(O.length)
|
||||
, index = toIndex(fromIndex, length)
|
||||
, value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
if(IS_INCLUDES && el != el)while(length > index){
|
||||
value = O[index++];
|
||||
if(value != value)return true;
|
||||
// Array#toIndex ignores holes, Array#includes - not
|
||||
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
||||
if(O[index] === el)return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 29 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.15 ToLength
|
||||
var toInteger = __webpack_require__(8)
|
||||
, min = Math.min;
|
||||
module.exports = function(it){
|
||||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 30 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var toInteger = __webpack_require__(8)
|
||||
, max = Math.max
|
||||
, min = Math.min;
|
||||
module.exports = function(index, length){
|
||||
index = toInteger(index);
|
||||
return index < 0 ? max(index + length, 0) : min(index, length);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 31 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var shared = __webpack_require__(32)('keys')
|
||||
, uid = __webpack_require__(33);
|
||||
module.exports = function(key){
|
||||
return shared[key] || (shared[key] = uid(key));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 32 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__(0)
|
||||
, SHARED = '__core-js_shared__'
|
||||
, store = global[SHARED] || (global[SHARED] = {});
|
||||
module.exports = function(key){
|
||||
return store[key] || (store[key] = {});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 33 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var id = 0
|
||||
, px = Math.random();
|
||||
module.exports = function(key){
|
||||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 34 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// IE 8- don't enum bug keys
|
||||
module.exports = (
|
||||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||||
).split(',');
|
||||
|
||||
/***/ }),
|
||||
/* 35 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = Object.getOwnPropertySymbols;
|
||||
|
||||
/***/ }),
|
||||
/* 36 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = {}.propertyIsEnumerable;
|
||||
|
||||
/***/ }),
|
||||
/* 37 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.13 ToObject(argument)
|
||||
var defined = __webpack_require__(7);
|
||||
module.exports = function(it){
|
||||
return Object(defined(it));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 38 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_38__;
|
||||
|
||||
/***/ }),
|
||||
/* 39 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* eslint no-constant-condition:0 */
|
||||
var findEndOfMath = function findEndOfMath(delimiter, text, startIndex) {
|
||||
// Adapted from
|
||||
// https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx
|
||||
var index = startIndex;
|
||||
var braceLevel = 0;
|
||||
|
||||
var delimLength = delimiter.length;
|
||||
|
||||
while (index < text.length) {
|
||||
var character = text[index];
|
||||
|
||||
if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) {
|
||||
return index;
|
||||
} else if (character === "\\") {
|
||||
index++;
|
||||
} else if (character === "{") {
|
||||
braceLevel++;
|
||||
} else if (character === "}") {
|
||||
braceLevel--;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
var splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) {
|
||||
var finalData = [];
|
||||
|
||||
for (var i = 0; i < startData.length; i++) {
|
||||
if (startData[i].type === "text") {
|
||||
var text = startData[i].data;
|
||||
|
||||
var lookingForLeft = true;
|
||||
var currIndex = 0;
|
||||
var nextIndex = void 0;
|
||||
|
||||
nextIndex = text.indexOf(leftDelim);
|
||||
if (nextIndex !== -1) {
|
||||
currIndex = nextIndex;
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(0, currIndex)
|
||||
});
|
||||
lookingForLeft = false;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (lookingForLeft) {
|
||||
nextIndex = text.indexOf(leftDelim, currIndex);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex, nextIndex)
|
||||
});
|
||||
|
||||
currIndex = nextIndex;
|
||||
} else {
|
||||
nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "math",
|
||||
data: text.slice(currIndex + leftDelim.length, nextIndex),
|
||||
rawData: text.slice(currIndex, nextIndex + rightDelim.length),
|
||||
display: display
|
||||
});
|
||||
|
||||
currIndex = nextIndex + rightDelim.length;
|
||||
}
|
||||
|
||||
lookingForLeft = !lookingForLeft;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex)
|
||||
});
|
||||
} else {
|
||||
finalData.push(startData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return finalData;
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["a"] = (splitAtDelimiters);
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
1
client/katex/contrib/auto-render.min.js
vendored
1
client/katex/contrib/auto-render.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,12 +0,0 @@
|
|||
/* Force selection of entire .katex/.katex-display blocks, so that we can
|
||||
* copy/paste the entire source code. If you omit this CSS, partial
|
||||
* selections of a formula will work, but will copy the ugly HTML
|
||||
* representation instead of the LaTeX source code. (Full selections will
|
||||
* still produce the LaTeX source code.)
|
||||
*/
|
||||
.katex, .katex-display {
|
||||
user-select: all;
|
||||
-moz-user-select: all;
|
||||
-webkit-user-select: all;
|
||||
-ms-user-select: all;
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else {
|
||||
var a = factory();
|
||||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
||||
}
|
||||
})(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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copy_tex_css__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copy_tex_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__copy_tex_css__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__katex2tex__ = __webpack_require__(2);
|
||||
|
||||
|
||||
|
||||
// Global copy handler to modify behavior on .katex elements.
|
||||
document.addEventListener('copy', function (event) {
|
||||
var selection = window.getSelection();
|
||||
if (selection.isCollapsed) {
|
||||
return; // default action OK if selection is empty
|
||||
}
|
||||
var fragment = selection.getRangeAt(0).cloneContents();
|
||||
if (!fragment.querySelector('.katex-mathml')) {
|
||||
return; // default action OK if no .katex-mathml elements
|
||||
}
|
||||
// Preserve usual HTML copy/paste behavior.
|
||||
var html = [];
|
||||
for (var i = 0; i < fragment.childNodes.length; i++) {
|
||||
html.push(fragment.childNodes[i].outerHTML);
|
||||
}
|
||||
event.clipboardData.setData('text/html', html.join(''));
|
||||
// Rewrite plain-text version.
|
||||
event.clipboardData.setData('text/plain', Object(__WEBPACK_IMPORTED_MODULE_1__katex2tex__["a" /* default */])(fragment).textContent);
|
||||
// Prevent normal copy handling.
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export defaultCopyDelimiters */
|
||||
/* unused harmony export katexReplaceWithTex */
|
||||
// Set these to how you want inline and display math to be delimited.
|
||||
var defaultCopyDelimiters = {
|
||||
inline: ['$', '$'], // alternative: ['\(', '\)']
|
||||
display: ['$$', '$$'] // alternative: ['\[', '\]']
|
||||
};
|
||||
|
||||
// Replace .katex elements with their TeX source (<annotation> element).
|
||||
// Modifies fragment in-place. Useful for writing your own 'copy' handler,
|
||||
// as in copy-tex.js.
|
||||
var katexReplaceWithTex = function katexReplaceWithTex(fragment) {
|
||||
var copyDelimiters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCopyDelimiters;
|
||||
|
||||
// Remove .katex-html blocks that are preceded by .katex-mathml blocks
|
||||
// (which will get replaced below).
|
||||
var katexHtml = fragment.querySelectorAll('.katex-mathml + .katex-html');
|
||||
for (var i = 0; i < katexHtml.length; i++) {
|
||||
var element = katexHtml[i];
|
||||
if (element.remove) {
|
||||
element.remove(null);
|
||||
} else {
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
}
|
||||
// Replace .katex-mathml elements with their annotation (TeX source)
|
||||
// descendant, with inline delimiters.
|
||||
var katexMathml = fragment.querySelectorAll('.katex-mathml');
|
||||
for (var _i = 0; _i < katexMathml.length; _i++) {
|
||||
var _element = katexMathml[_i];
|
||||
var texSource = _element.querySelector('annotation');
|
||||
if (texSource) {
|
||||
if (_element.replaceWith) {
|
||||
_element.replaceWith(texSource);
|
||||
} else {
|
||||
_element.parentNode.replaceChild(texSource, _element);
|
||||
}
|
||||
texSource.innerHTML = copyDelimiters.inline[0] + texSource.innerHTML + copyDelimiters.inline[1];
|
||||
}
|
||||
}
|
||||
// Switch display math to display delimiters.
|
||||
var displays = fragment.querySelectorAll('.katex-display annotation');
|
||||
for (var _i2 = 0; _i2 < displays.length; _i2++) {
|
||||
var _element2 = displays[_i2];
|
||||
_element2.innerHTML = copyDelimiters.display[0] + _element2.innerHTML.substr(copyDelimiters.inline[0].length, _element2.innerHTML.length - copyDelimiters.inline[0].length - copyDelimiters.inline[1].length) + copyDelimiters.display[1];
|
||||
}
|
||||
return fragment;
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["a"] = (katexReplaceWithTex);
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
1
client/katex/contrib/copy-tex.min.css
vendored
1
client/katex/contrib/copy-tex.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all}
|
1
client/katex/contrib/copy-tex.min.js
vendored
1
client/katex/contrib/copy-tex.min.js
vendored
|
@ -1 +0,0 @@
|
|||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=(n.n(r),n(2));document.addEventListener("copy",function(e){var t=window.getSelection();if(!t.isCollapsed){var n=t.getRangeAt(0).cloneContents();if(n.querySelector(".katex-mathml")){for(var r=[],i=0;i<n.childNodes.length;i++)r.push(n.childNodes[i].outerHTML);e.clipboardData.setData("text/html",r.join("")),e.clipboardData.setData("text/plain",Object(o.a)(n).textContent),e.preventDefault()}}})},function(e,t){},function(e,t,n){"use strict";var r={inline:["$","$"],display:["$$","$$"]};t.a=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=e.querySelectorAll(".katex-mathml + .katex-html"),o=0;o<n.length;o++){var i=n[o];i.remove?i.remove(null):i.parentNode.removeChild(i)}for(var l=e.querySelectorAll(".katex-mathml"),a=0;a<l.length;a++){var u=l[a],c=u.querySelector("annotation");c&&(u.replaceWith?u.replaceWith(c):u.parentNode.replaceChild(c,u),c.innerHTML=t.inline[0]+c.innerHTML+t.inline[1])}for(var f=e.querySelectorAll(".katex-display annotation"),p=0;p<f.length;p++){var s=f[p];s.innerHTML=t.display[0]+s.innerHTML.substr(t.inline[0].length,s.innerHTML.length-t.inline[0].length-t.inline[1].length)+t.display[1]}return e}}]).default});
|
|
@ -1,113 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("katex"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["katex"], factory);
|
||||
else {
|
||||
var a = typeof exports === 'object' ? factory(require("katex")) : factory(root["katex"]);
|
||||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
||||
}
|
||||
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
|
||||
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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_katex__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_katex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_katex__);
|
||||
|
||||
|
||||
var scripts = document.body.getElementsByTagName("script");
|
||||
scripts = Array.prototype.slice.call(scripts);
|
||||
scripts.forEach(function (script) {
|
||||
if (!script.type || !script.type.match(/math\/tex/i)) {
|
||||
return -1;
|
||||
}
|
||||
var display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null;
|
||||
|
||||
var katexElement = document.createElement(display ? "div" : "span");
|
||||
katexElement.setAttribute("class", display ? "equation" : "inline-equation");
|
||||
try {
|
||||
__WEBPACK_IMPORTED_MODULE_0_katex___default.a.render(script.text, katexElement, { displayMode: display });
|
||||
} catch (err) {
|
||||
//console.error(err); linter doesn't like this
|
||||
katexElement.textContent = script.text;
|
||||
}
|
||||
script.parentNode.replaceChild(katexElement, script);
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],t);else{var r="object"==typeof exports?t(require("katex")):t(e.katex);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r.n(n),i=document.body.getElementsByTagName("script");(i=Array.prototype.slice.call(i)).forEach(function(e){if(!e.type||!e.type.match(/math\/tex/i))return-1;var t=null!=e.type.match(/mode\s*=\s*display(;|\s|\n|$)/),r=document.createElement(t?"div":"span");r.setAttribute("class",t?"equation":"inline-equation");try{o.a.render(e.text,r,{displayMode:t})}catch(t){r.textContent=e.text}e.parentNode.replaceChild(r,e)})},function(t,r){t.exports=e}]).default});
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
client/katex/katex.min.css
vendored
1
client/katex/katex.min.css
vendored
File diff suppressed because one or more lines are too long
1
client/katex/katex.min.js
vendored
1
client/katex/katex.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -2,36 +2,36 @@
|
|||
"short_name": "HC",
|
||||
"name": "Hack-Chat",
|
||||
"icons": [
|
||||
{
|
||||
"src": "imgs/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}
|
||||
{
|
||||
"src": "imgs/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "imgs/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"start_url": "./",
|
||||
"display": "minimal-ui",
|
||||
|
|
1
client/schemes/index.html
Normal file
1
client/schemes/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
105
client/style.css
105
client/style.css
|
@ -2,6 +2,7 @@ body {
|
|||
padding: 0;
|
||||
margin: 0;
|
||||
overflow-y: scroll;
|
||||
font-family: monospace;
|
||||
}
|
||||
body,
|
||||
input,
|
||||
|
@ -43,8 +44,22 @@ a {
|
|||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
ul {
|
||||
padding-left: 0;
|
||||
#sidebar-content ul {
|
||||
padding-inline-start: 20px;
|
||||
}
|
||||
#sidebar-content ul li {
|
||||
list-style: disc outside none;
|
||||
}
|
||||
ul, ol {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
list-style-type: disc;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
padding-inline-start: 40px;
|
||||
}
|
||||
ul li {
|
||||
list-style: inside;
|
||||
|
@ -65,9 +80,6 @@ ul li {
|
|||
.message, .refmessage {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
.refmessage {
|
||||
font-weight: bold;
|
||||
}
|
||||
.nick {
|
||||
float: left;
|
||||
width: 16em;
|
||||
|
@ -113,6 +125,89 @@ ul li {
|
|||
width: 180px;
|
||||
padding-bottom: 10%;
|
||||
}
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
margin: 3px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
blockquote {
|
||||
padding: 3px 10px;
|
||||
margin: 3px;
|
||||
border-left: 5px solid #4e4e4e;
|
||||
}
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
color: #000000;
|
||||
background-color: #4e4e4e;
|
||||
border-radius: 4px;
|
||||
}
|
||||
hr {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 0;
|
||||
border-top: 1px solid #4e4e4e;
|
||||
}
|
||||
mark {
|
||||
background-color: #60ac39;
|
||||
color: black;
|
||||
}
|
||||
pre {
|
||||
display: block;
|
||||
padding: 9.5px;
|
||||
margin: 0 0 10px;
|
||||
font-size: 13px;
|
||||
line-height: 1.42857143;
|
||||
color: #797979;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
background-color: #4e4e4e;
|
||||
border: 1px solid #000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
table {
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin-bottom: 20px;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table > caption + thead > tr:first-child > th, table > colgroup + thead > tr:first-child > th, table > thead:first-child > tr:first-child > th, table > caption + thead > tr:first-child > td, table > colgroup + thead > tr:first-child > td, table > thead:first-child > tr:first-child > td {
|
||||
border-top: 0;
|
||||
}
|
||||
table > thead > tr > th {
|
||||
vertical-align: bottom;
|
||||
border-bottom: 2px solid #4e4e4e;
|
||||
}
|
||||
table > thead > tr > th, table > tbody > tr > th, table > tfoot > tr > th, table > thead > tr > td, table > tbody > tr > td, table > tfoot > tr > td {
|
||||
padding: 8px;
|
||||
line-height: 1.42857143;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #4e4e4e;
|
||||
}
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
td, th {
|
||||
padding: 0;
|
||||
}
|
||||
table > tbody > tr:nth-child(odd) > td, table > tbody > tr:nth-child(odd) > th {
|
||||
background-color: #4e4e4e;
|
||||
}
|
||||
table > thead > tr > th, table > tbody > tr > th, table > tfoot > tr > th, table > thead > tr > td, table > tbody > tr > td, table > tfoot > tr > td {
|
||||
padding: 8px;
|
||||
line-height: 1.42857143;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #4e4e4e;
|
||||
}
|
||||
td, th {
|
||||
padding: 0;
|
||||
}
|
||||
img {
|
||||
max-width: 50%;
|
||||
max-height: 800px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.messages {
|
||||
border: none;
|
||||
|
|
3
client/vendor/hljs/highlight.min.js
vendored
Normal file
3
client/vendor/hljs/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
client/vendor/hljs/index.html
vendored
Normal file
1
client/vendor/hljs/index.html
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
17
client/vendor/hljs/styles/agate.min.css
vendored
Normal file
17
client/vendor/hljs/styles/agate.min.css
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*!
|
||||
* Agate by Taufik Nurrohman <https://github.com/tovic>
|
||||
* ----------------------------------------------------
|
||||
*
|
||||
* #ade5fc
|
||||
* #a2fca2
|
||||
* #c6b4f0
|
||||
* #d36363
|
||||
* #fcc28c
|
||||
* #fc9b9b
|
||||
* #ffa
|
||||
* #fff
|
||||
* #333
|
||||
* #62c8f3
|
||||
* #888
|
||||
*
|
||||
*/.hljs{display:block;overflow-x:auto;padding:0.5em;background:#333;color:white}.hljs-name,.hljs-strong{font-weight:bold}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-tag{color:#62c8f3}.hljs-variable,.hljs-template-variable,.hljs-selector-id,.hljs-selector-class{color:#ade5fc}.hljs-string,.hljs-bullet{color:#a2fca2}.hljs-type,.hljs-title,.hljs-section,.hljs-attribute,.hljs-quote,.hljs-built_in,.hljs-builtin-name{color:#ffa}.hljs-number,.hljs-symbol,.hljs-bullet{color:#d36363}.hljs-keyword,.hljs-selector-tag,.hljs-literal{color:#fcc28c}.hljs-comment,.hljs-deletion,.hljs-code{color:#888}.hljs-regexp,.hljs-link{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background-color:#fc9b9b;color:#333}.hljs-addition{background-color:#a2fca2;color:#333}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}
|
1
client/vendor/hljs/styles/androidstudio.min.css
vendored
Normal file
1
client/vendor/hljs/styles/androidstudio.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{color:#a9b7c6;background:#282b2e;display:block;overflow-x:auto;padding:0.5em}.hljs-number,.hljs-literal,.hljs-symbol,.hljs-bullet{color:#6897BB}.hljs-keyword,.hljs-selector-tag,.hljs-deletion{color:#cc7832}.hljs-variable,.hljs-template-variable,.hljs-link{color:#629755}.hljs-comment,.hljs-quote{color:#808080}.hljs-meta{color:#bbb529}.hljs-string,.hljs-attribute,.hljs-addition{color:#6A8759}.hljs-section,.hljs-title,.hljs-type{color:#ffc66d}.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#e8bf6a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
1
client/vendor/hljs/styles/atom-one-dark.min.css
vendored
Normal file
1
client/vendor/hljs/styles/atom-one-dark.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs-link{text-decoration:underline}
|
1
client/vendor/hljs/styles/darcula.min.css
vendored
Normal file
1
client/vendor/hljs/styles/darcula.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#2b2b2b}.hljs{color:#bababa}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-link,.hljs-number,.hljs-regexp,.hljs-literal{color:#6896ba}.hljs-code,.hljs-selector-class{color:#a6e22e}.hljs-emphasis{font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-section,.hljs-attribute,.hljs-name,.hljs-variable{color:#cb7832}.hljs-params{color:#b9b9b9}.hljs-string{color:#6a8759}.hljs-subst,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-symbol,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-template-tag,.hljs-template-variable,.hljs-addition{color:#e0c46c}.hljs-comment,.hljs-deletion,.hljs-meta{color:#7f7f7f}
|
1
client/vendor/hljs/styles/github.min.css
vendored
Normal file
1
client/vendor/hljs/styles/github.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:bold}.hljs-number,.hljs-literal,.hljs-variable,.hljs-template-variable,.hljs-tag .hljs-attr{color:#008080}.hljs-string,.hljs-doctag{color:#d14}.hljs-title,.hljs-section,.hljs-selector-id{color:#900;font-weight:bold}.hljs-subst{font-weight:normal}.hljs-type,.hljs-class .hljs-title{color:#458;font-weight:bold}.hljs-tag,.hljs-name,.hljs-attribute{color:#000080;font-weight:normal}.hljs-regexp,.hljs-link{color:#009926}.hljs-symbol,.hljs-bullet{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
1
client/vendor/hljs/styles/hybrid.min.css
vendored
Normal file
1
client/vendor/hljs/styles/hybrid.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#1d1f21}.hljs::selection,.hljs span::selection{background:#373b41}.hljs::-moz-selection,.hljs span::-moz-selection{background:#373b41}.hljs{color:#c5c8c6}.hljs-title,.hljs-name{color:#f0c674}.hljs-comment,.hljs-meta,.hljs-meta .hljs-keyword{color:#707880}.hljs-number,.hljs-symbol,.hljs-literal,.hljs-deletion,.hljs-link{color:#c66}.hljs-string,.hljs-doctag,.hljs-addition,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo{color:#b5bd68}.hljs-attribute,.hljs-code,.hljs-selector-id{color:#b294bb}.hljs-keyword,.hljs-selector-tag,.hljs-bullet,.hljs-tag{color:#81a2be}.hljs-subst,.hljs-variable,.hljs-template-tag,.hljs-template-variable{color:#8abeb7}.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-quote,.hljs-section,.hljs-selector-class{color:#de935f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
1
client/vendor/hljs/styles/index.html
vendored
Normal file
1
client/vendor/hljs/styles/index.html
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
client/vendor/hljs/styles/rainbow.min.css
vendored
Normal file
1
client/vendor/hljs/styles/rainbow.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#474949;color:#d1d9e1}.hljs-comment,.hljs-quote{color:#969896;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-type,.hljs-addition{color:#cc99cc}.hljs-number,.hljs-selector-attr,.hljs-selector-pseudo{color:#f99157}.hljs-string,.hljs-doctag,.hljs-regexp{color:#8abeb7}.hljs-title,.hljs-name,.hljs-section,.hljs-built_in{color:#b5bd68}.hljs-variable,.hljs-template-variable,.hljs-selector-id,.hljs-class .hljs-title{color:#ffcc66}.hljs-section,.hljs-name,.hljs-strong{font-weight:bold}.hljs-symbol,.hljs-bullet,.hljs-subst,.hljs-meta,.hljs-link{color:#f99157}.hljs-deletion{color:#dc322f}.hljs-formula{background:#eee8d5}.hljs-attr,.hljs-attribute{color:#81a2be}.hljs-emphasis{font-style:italic}
|
1
client/vendor/hljs/styles/tomorrow.min.css
vendored
Normal file
1
client/vendor/hljs/styles/tomorrow.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs-comment,.hljs-quote{color:#8e908c}.hljs-variable,.hljs-template-variable,.hljs-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-deletion{color:#c82829}.hljs-number,.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-type,.hljs-params,.hljs-meta,.hljs-link{color:#f5871f}.hljs-attribute{color:#eab700}.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#718c00}.hljs-title,.hljs-section{color:#4271ae}.hljs-keyword,.hljs-selector-tag{color:#8959a8}.hljs{display:block;overflow-x:auto;background:white;color:#4d4d4c;padding:0.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
1
client/vendor/hljs/styles/xcode.min.css
vendored
Normal file
1
client/vendor/hljs/styles/xcode.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#fff;color:black}.hljs-comment,.hljs-quote{color:#006a00}.hljs-keyword,.hljs-selector-tag,.hljs-literal{color:#aa0d91}.hljs-name{color:#008}.hljs-variable,.hljs-template-variable{color:#660}.hljs-string{color:#c41a16}.hljs-regexp,.hljs-link{color:#080}.hljs-title,.hljs-tag,.hljs-symbol,.hljs-bullet,.hljs-number,.hljs-meta{color:#1c00cf}.hljs-section,.hljs-class .hljs-title,.hljs-type,.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-params{color:#5c2699}.hljs-attribute,.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-selector-id,.hljs-selector-class{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic}
|
1
client/vendor/hljs/styles/zenburn.min.css
vendored
Normal file
1
client/vendor/hljs/styles/zenburn.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#3f3f3f;color:#dcdcdc}.hljs-keyword,.hljs-selector-tag,.hljs-tag{color:#e3ceab}.hljs-template-tag{color:#dcdcdc}.hljs-number{color:#8cd0d3}.hljs-variable,.hljs-template-variable,.hljs-attribute{color:#efdcbc}.hljs-literal{color:#efefaf}.hljs-subst{color:#8f8f8f}.hljs-title,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-section,.hljs-type{color:#efef8f}.hljs-symbol,.hljs-bullet,.hljs-link{color:#dca3a3}.hljs-deletion,.hljs-string,.hljs-built_in,.hljs-builtin-name{color:#cc9393}.hljs-addition,.hljs-comment,.hljs-quote,.hljs-meta{color:#7f9f7f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
1
client/vendor/index.html
vendored
Normal file
1
client/vendor/index.html
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.ttf
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.woff
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.woff2
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_AMS-Regular.woff2
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
client/vendor/katex/fonts/KaTeX_Main-Bold.ttf
vendored
Normal file
BIN
client/vendor/katex/fonts/KaTeX_Main-Bold.ttf
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user