Initial commit
160
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/README.md
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
# Chalkboard
|
||||
|
||||
With this plugin you can add a chalkboard to reveal.js. The plugin provides two possibilities to include handwritten notes to your presentation:
|
||||
|
||||
- you can make notes directly on the slides, e.g. to comment on certain aspects,
|
||||
- you can open a chalkboard or whiteboard on which you can make notes.
|
||||
|
||||
The main use case in mind when implementing the plugin is classroom usage in which you may want to explain some course content and quickly need to make some notes.
|
||||
|
||||
The plugin records all drawings made so that they can be play backed using the `autoSlide` feature or the `audio-slideshow` plugin.
|
||||
|
||||
[Check out the live demo](https://rajgoel.github.io/reveal.js-demos/chalkboard-demo.html)
|
||||
|
||||
The chalkboard effect is based on [Chalkboard](https://github.com/mmoustafa/Chalkboard) by Mohamed Moustafa.
|
||||
|
||||
## Installation
|
||||
|
||||
Copy the file `plugin.js` and the `img` directory into the plugin folder of your reveal.js presentation, i.e. `plugin/chalkboard` and load the plugin as shown below.
|
||||
|
||||
```html
|
||||
<script src="plugin/chalkboard/plugin.js"></script>
|
||||
<script src="plugin/chalkboard/customcontrols.js"></script>
|
||||
|
||||
<script>
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
plugins: [ RevealChalkboard, RevealCustomControls ],
|
||||
// ...
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
The following stylesheet
|
||||
```html
|
||||
<link rel="stylesheet" href="plugin/chalkboard/style.css">
|
||||
<link rel="stylesheet" href="plugin/customcontrols/style.css">
|
||||
```
|
||||
has to be included to the `head` section of you HTML-file.
|
||||
|
||||
|
||||
In order to include buttons for opening and closing the notes canvas or the chalkboard you should make sure that `font-awesome` is available. The easiest way is to include
|
||||
```
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
```
|
||||
to the ```head``` section of you HTML-file.
|
||||
|
||||
## Usage
|
||||
|
||||
### Mouse or touch
|
||||
- Click on the pen symbols at the bottom left to toggle the notes canvas or chalkboard
|
||||
- Click on the color picker at the left to change the color (the color picker is only visible if the notes canvas or chalkboard is active)
|
||||
- Click on the up/down arrows on the left to the switch among multiple chalkboardd (the up/down arrows are only available for the chlakboard)
|
||||
- Click the left mouse button and drag to write on notes canvas or chalkboard
|
||||
- Click the right mouse button and drag to wipe away previous drawings
|
||||
- Touch and move to write on notes canvas or chalkboard
|
||||
- Touch and hold for half a second, then move to wipe away previous drawings
|
||||
|
||||
### Keyboard
|
||||
- Press the 'BACKSPACE' key to delete all chalkboard drawings
|
||||
- Press the 'DEL' key to clear the notes canvas or chalkboard
|
||||
- Press the 'c' key to toggle the notes canvas
|
||||
- Press the 'b' key to toggle the chalkboard
|
||||
- Press the 'd' key to download drawings
|
||||
- Press the 'x' key to cycle colors forward
|
||||
- Press the 'y' key to cycle colors backward
|
||||
|
||||
## Playback
|
||||
|
||||
If the `autoSlide` feature is set or if the `audio-slideshow` plugin is used, pre-recorded chalkboard drawings can be played. The slideshow plays back the user interaction with the chalkboard in the same way as it was conducted when recording the data.
|
||||
|
||||
## Multiplexing
|
||||
|
||||
The plugin supports multiplexing via the [`multiplex` plugin](https://github.com/reveal/multiplex) or the [`seminar` plugin](https://github.com/rajgoel/reveal.js-plugins/tree/master/seminar).
|
||||
|
||||
## PDF-Export
|
||||
|
||||
If the slideshow is opened in [print mode](https://revealjs.com/pdf-export/), the chalkboard drawings in the session storage (see `storage` option - print version must be opened in the same tab or window as the original slideshow) or provided in a file (see `src` option) are included in the PDF-file. Each drawing on the chalkboard is added after the slide that was shown when opening the chalkboard. Drawings on the notes canvas are not included in the PDF-file.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
The plugin has several configuration options:
|
||||
|
||||
- ```boardmarkerWidth```: an integer, the drawing width of the boardmarker; larger values draw thicker lines.
|
||||
- ```chalkWidth```: an integer, the drawing width of the chalk; larger values draw thicker lines.
|
||||
- ```chalkEffect```: a float in the range ```[0.0, 1.0]```, the intesity of the chalk effect on the chalk board. Full effect (default) ```1.0```, no effect ```0.0```.
|
||||
- ```storage```: Optional variable name for session storage of drawings.
|
||||
- ```src```: Optional filename for pre-recorded drawings.
|
||||
- ```readOnly```: Configuation option allowing to prevent changes to existing drawings. If set to ```true``` no changes can be made, if set to false ```false``` changes can be made, if unset or set to ```undefined``` no changes to the drawings can be made after returning to a slide or fragment for which drawings had been recorded before. In any case the recorded drawings for a slide or fragment can be cleared by pressing the 'DEL' key (i.e. by using the ```RevealChalkboard.clear()``` function).
|
||||
- ```transition```: Gives the duration (in milliseconds) of the transition for a slide change, so that the notes canvas is drawn after the transition is completed.
|
||||
- ```theme```: Can be set to either ```"chalkboard"``` or ```"whiteboard"```.
|
||||
|
||||
The following configuration options allow to change the appearance of the notes canvas and the chalkboard. All of these options require two values, the first gives the value for the notes canvas, the second for the chalkboard.
|
||||
|
||||
- ```background```: The first value expects a (semi-)transparent color which is used to provide visual feedback that the notes canvas is enabled, the second value expects a filename to a background image for the chalkboard.
|
||||
- ```grid```: By default whiteboard and chalkboard themes include a grid pattern on the background. This pattern can be modified by setting the color, the distance between lines, and the line width, e.g. ```{ color: 'rgb(127,127,255,0.1)', distance: 40, width: 2}```. Alternatively, the grid can be removed by setting the value to ```false```.
|
||||
- ```eraser```: An image path and radius for the eraser.
|
||||
- ```boardmarkers```: A list of boardmarkers with given color and cursor.
|
||||
- ```chalks```: A list of chalks with given color and cursor.
|
||||
- ```rememberColor```: Whether to remember the last selected color for the slide canvas or the board.
|
||||
|
||||
All of the configurations are optional and the default values shown below are used if the options are not provided.
|
||||
|
||||
```javascript
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
chalkboard: {
|
||||
boardmarkerWidth: 3,
|
||||
chalkWidth: 7,
|
||||
chalkEffect: 1.0,
|
||||
storage: null,
|
||||
src: null,
|
||||
readOnly: undefined,
|
||||
transition: 800,
|
||||
theme: "chalkboard",
|
||||
background: [ 'rgba(127,127,127,.1)' , path + 'img/blackboard.png' ],
|
||||
grid: { color: 'rgb(50,50,10,0.5)', distance: 80, width: 2},
|
||||
eraser: { src: path + 'img/sponge.png', radius: 20},
|
||||
boardmarkers : [
|
||||
{ color: 'rgba(100,100,100,1)', cursor: 'url(' + path + 'img/boardmarker-black.png), auto'},
|
||||
{ color: 'rgba(30,144,255, 1)', cursor: 'url(' + path + 'img/boardmarker-blue.png), auto'},
|
||||
{ color: 'rgba(220,20,60,1)', cursor: 'url(' + path + 'img/boardmarker-red.png), auto'},
|
||||
{ color: 'rgba(50,205,50,1)', cursor: 'url(' + path + 'img/boardmarker-green.png), auto'},
|
||||
{ color: 'rgba(255,140,0,1)', cursor: 'url(' + path + 'img/boardmarker-orange.png), auto'},
|
||||
{ color: 'rgba(150,0,20150,1)', cursor: 'url(' + path + 'img/boardmarker-purple.png), auto'},
|
||||
{ color: 'rgba(255,220,0,1)', cursor: 'url(' + path + 'img/boardmarker-yellow.png), auto'}
|
||||
],
|
||||
chalks: [
|
||||
{ color: 'rgba(255,255,255,0.5)', cursor: 'url(' + path + 'img/chalk-white.png), auto'},
|
||||
{ color: 'rgba(96, 154, 244, 0.5)', cursor: 'url(' + path + 'img/chalk-blue.png), auto'},
|
||||
{ color: 'rgba(237, 20, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-red.png), auto'},
|
||||
{ color: 'rgba(20, 237, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-green.png), auto'},
|
||||
{ color: 'rgba(220, 133, 41, 0.5)', cursor: 'url(' + path + 'img/chalk-orange.png), auto'},
|
||||
{ color: 'rgba(220,0,220,0.5)', cursor: 'url(' + path + 'img/chalk-purple.png), auto'},
|
||||
{ color: 'rgba(255,220,0,0.5)', cursor: 'url(' + path + 'img/chalk-yellow.png), auto'}
|
||||
]
|
||||
},
|
||||
customcontrols: {
|
||||
controls: [
|
||||
{ icon: '<i class="fa fa-pen-square"></i>',
|
||||
title: 'Toggle chalkboard (B)',
|
||||
action: 'RevealChalkboard.toggleChalkboard();'
|
||||
},
|
||||
{ icon: '<i class="fa fa-pen"></i>',
|
||||
title: 'Toggle notes canvas (C)',
|
||||
action: 'RevealChalkboard.toggleNotesCanvas();'
|
||||
}
|
||||
]
|
||||
},
|
||||
// ...
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT licensed
|
||||
|
||||
Copyright (C) 2021 Asvin Goel
|
38
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/_style.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
div.palette, div.boardhandle {
|
||||
position: absolute;
|
||||
/*
|
||||
height: 260px;
|
||||
margin: -130px 0 0 0px;
|
||||
*/
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 24px;
|
||||
border-radius: 10px;
|
||||
border-top: 4px solid #222;
|
||||
border-right: 4px solid #222;
|
||||
border-bottom: 4px solid #222;
|
||||
background: black;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
div.palette {
|
||||
left: -10px;
|
||||
padding-left:10px;
|
||||
}
|
||||
|
||||
div.boardhandle {
|
||||
right: -10px;
|
||||
padding-right:10px;
|
||||
}
|
||||
|
||||
div.palette > ul,
|
||||
div.boardhandle > ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.palette > ul > li,
|
||||
div.boardhandle > ul > li {
|
||||
margin: 10px;
|
||||
}
|
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/blackboard.png
vendored
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-black.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-blue.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-green.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-orange.png
vendored
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-purple.png
vendored
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-red.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/boardmarker-yellow.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-blue.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-green.png
vendored
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-orange.png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-purple.png
vendored
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-red.png
vendored
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-white.png
vendored
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/chalk-yellow.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/sponge.png
vendored
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/img/whiteboard.png
vendored
Normal file
After Width: | Height: | Size: 33 KiB |
1812
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/plugin (copy).js
vendored
Normal file
1976
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/plugin.js
vendored
Normal file
44
.obsidian/plugins/obsidian-advanced-slides/plugin/chalkboard/style.css
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
div.palette, div.boardhandle {
|
||||
position: absolute;
|
||||
/*
|
||||
height: 260px;
|
||||
margin: -130px 0 0 0px;
|
||||
*/
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 24px;
|
||||
border-radius: 10px;
|
||||
border-top: 4px solid #222;
|
||||
border-right: 4px solid #222;
|
||||
border-bottom: 4px solid #222;
|
||||
background: black;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
div.palette {
|
||||
left: -10px;
|
||||
padding-left:10px;
|
||||
}
|
||||
|
||||
div.boardhandle {
|
||||
right: -10px;
|
||||
padding-right:10px;
|
||||
}
|
||||
|
||||
div.palette > ul,
|
||||
div.boardhandle > ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.palette > ul > li,
|
||||
div.boardhandle > ul > li {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div.palette, div.boardhandle, .chalkboard-button {
|
||||
display: none!important;
|
||||
}
|
||||
}
|
129
.obsidian/plugins/obsidian-advanced-slides/plugin/chart/README.md
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
# Chart
|
||||
|
||||
A plugin for [Reveal.js](https://github.com/hakimel/reveal.js) allowing to easily add charts using [Chart.js](http://www.chartjs.org/).
|
||||
|
||||
[Check out the live demo](https://rajgoel.github.io/reveal.js-demos/chart-demo.html)
|
||||
|
||||
## Installation
|
||||
|
||||
Copy the file `plugin.js` into the plugin folder of your reveal.js presentation, i.e. `plugin/chart`.
|
||||
|
||||
Add the plugin and Chart.js to the dependencies in your presentation, as below.
|
||||
|
||||
```html
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.2.0/chart.min.js"></script>
|
||||
<script src="plugin/chart/plugin.js"></script>
|
||||
|
||||
<script>
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
plugins: [ RevealChart ],
|
||||
// ...
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The plugin has several parameters that you can set for your presentation by providing an `chart` option in the reveal.js initialization options. Note that all configuration parameters are optional and the defaults of Chart.js will be used for parameters that are not specified.
|
||||
|
||||
|
||||
```javascript
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
chart: {
|
||||
defaults: {
|
||||
color: 'lightgray', // color of labels
|
||||
scale: {
|
||||
beginAtZero: true,
|
||||
ticks: { stepSize: 1 },
|
||||
grid: { color: "lightgray" } , // color of grid lines
|
||||
},
|
||||
},
|
||||
line: { borderColor: [ "rgba(20,220,220,.8)" , "rgba(220,120,120,.8)", "rgba(20,120,220,.8)" ], "borderDash": [ [5,10], [0,0] ] },
|
||||
bar: { backgroundColor: [ "rgba(20,220,220,.8)" , "rgba(220,120,120,.8)", "rgba(20,120,220,.8)" ]},
|
||||
pie: { backgroundColor: [ ["rgba(0,0,0,.8)" , "rgba(220,20,20,.8)", "rgba(20,220,20,.8)", "rgba(220,220,20,.8)", "rgba(20,20,220,.8)"] ]},
|
||||
},
|
||||
// ...
|
||||
});
|
||||
```
|
||||
The `defaults` parameter will overwrite `Chart.defaults`. Furthermore, for any chart type, e.g. line, bar, etc., the parameters for the individual datasets can be specified. Where Chart.js allows to specify a single parameter for a particular dataset, the plugin allows to specify an array of values for this parameter, which will automatically be assigned to the different datasets. Note that if there are more datasets than elements in the array, the plugin will start again with the first value in the array.
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
A chart can be included in a slide by adding a `canvas` element with the `data-chart` attribute set to the desired chart type.
|
||||
|
||||
The chart can be configured within the canvas body by a JSON string embedded into an HTML comment.
|
||||
|
||||
```html
|
||||
<canvas data-chart="line" >
|
||||
<!--
|
||||
{
|
||||
"data": {
|
||||
"labels": ["January"," February"," March"," April"," May"," June"," July"],
|
||||
"datasets":[
|
||||
{
|
||||
"data":[65,59,80,81,56,55,40],
|
||||
"label":"My first dataset","backgroundColor":"rgba(20,220,220,.8)"
|
||||
},
|
||||
{
|
||||
"data":[28,48,40,19,86,27,90],
|
||||
"label":"My second dataset","backgroundColor":"rgba(220,120,120,.8)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
-->
|
||||
</canvas>
|
||||
```
|
||||
It is possible to provide the chart data by comma separated values and use the JSON string within the HTML comment to configure the chart layout.
|
||||
|
||||
```html
|
||||
<canvas class="stretch" data-chart="line">
|
||||
My first dataset, 65, 59, 80, 81, 56, 55, 40
|
||||
<!-- This is a comment that will be ignored -->
|
||||
My second dataset, 28, 48, 40, 19, 86, 27, 90
|
||||
<!--
|
||||
{
|
||||
"data" : {
|
||||
"labels" : ["Enero", "Febrero", "Marzo", "Avril", "Mayo", "Junio", "Julio"],
|
||||
"datasets" : [{ "borderColor": "#0f0", "borderDash": ["5","10"] }, { "borderColor": "#0ff" } ]
|
||||
}
|
||||
}
|
||||
-->
|
||||
</canvas>
|
||||
```
|
||||
|
||||
The layout configuration provided in `chart` parameter (see Configuration) will be used by default and only those parameters that are specified in a JSON string are used to overwrite the default values. If no JSON string is provided to configure the chart layout the default configuration is used. Note, that if no labels for the data points are provided by a JSON string, the plugin expects that the first row provides table headers.
|
||||
|
||||
```html
|
||||
<canvas data-chart="line">
|
||||
Month, January, February, March, April, May, June, July
|
||||
My first dataset, 65, 59, 80, 81, 56, 55, 40
|
||||
My second dataset, 28, 48, 40, 19, 86, 27, 90
|
||||
</canvas>
|
||||
```
|
||||
|
||||
The chart data can also be provided in an external CSV file. To include external data, the filename must be specified using the `data-chart-src` attribute of the `canvas` element. The CSV file is expected to only contain data values, whereas options for drawing the chart can be given as described above.
|
||||
|
||||
```html
|
||||
<canvas data-chart="bar" data-chart-src="chart/data.csv">
|
||||
<!--
|
||||
{
|
||||
"data" : {
|
||||
"datasets" : [{ "backgroundColor": "#0f0" }, { "backgroundColor": "#0ff" } ]
|
||||
},
|
||||
"options": { "scales": { "x": { "stacked": true }, "y": { "stacked": true } } }
|
||||
}
|
||||
-->
|
||||
</canvas>
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT licensed
|
||||
|
||||
Copyright (C) 2021 Asvin Goel
|
13
.obsidian/plugins/obsidian-advanced-slides/plugin/chart/chart.min.js
vendored
Normal file
198
.obsidian/plugins/obsidian-advanced-slides/plugin/chart/plugin.js
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
/*****************************************************************
|
||||
** Author: Asvin Goel, goel@telematique.eu
|
||||
** Fixed for Reveal4: kotborealis@awooo.ru
|
||||
**
|
||||
** A plugin for reveal.js allowing to integrate Chart.js
|
||||
**
|
||||
** Version: 1.3.1
|
||||
**
|
||||
** License: MIT license (see LICENSE.md)
|
||||
**
|
||||
******************************************************************/
|
||||
|
||||
/**
|
||||
* Reveal Plugin
|
||||
* https://revealjs.com/creating-plugins/
|
||||
*/
|
||||
window.RevealChart = window.RevealChart || {
|
||||
id: 'RevealChart',
|
||||
init: function(deck) {
|
||||
initChart(deck);
|
||||
},
|
||||
update: function(canvas, idx, data) { update(canvas, idx, data); },
|
||||
};
|
||||
|
||||
const initChart = function(Reveal){
|
||||
function parseJSON(str) {
|
||||
var json;
|
||||
try {
|
||||
json = JSON.parse(str);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/*
|
||||
* Recursively merge properties of two objects
|
||||
*/
|
||||
function mergeRecursive(obj1, obj2) {
|
||||
|
||||
for (var p in obj2) {
|
||||
try {
|
||||
// Property in destination object set; update its value.
|
||||
if ( obj1[p] !== null && typeof obj1[p] === 'object' && typeof obj2[p] === 'object' ) {
|
||||
obj1[p] = mergeRecursive(obj1[p], obj2[p]);
|
||||
}
|
||||
else {
|
||||
obj1[p] = obj2[p];
|
||||
}
|
||||
} catch(e) {
|
||||
// Property in destination object not set; create it and set its value.
|
||||
obj1[p] = obj2[p];
|
||||
}
|
||||
}
|
||||
|
||||
return obj1;
|
||||
}
|
||||
|
||||
|
||||
function createChart(canvas, CSV, comments) {
|
||||
canvas.chart = null;
|
||||
var ctx = canvas.getContext("2d");
|
||||
var chartOptions = { responsive: true, maintainAspectRatio: false };
|
||||
var chartData = { labels: null, datasets: []};
|
||||
if ( comments !== null ) for (var j = 0; j < comments.length; j++ ){
|
||||
comments[j] = comments[j].replace(/<!--/,'');
|
||||
comments[j] = comments[j].replace(/-->/,'');
|
||||
var config = parseJSON(comments[j]);
|
||||
if ( config ) {
|
||||
if ( config.data ) {
|
||||
mergeRecursive( chartData, config.data);
|
||||
}
|
||||
if ( config.options ) {
|
||||
mergeRecursive( chartOptions, config.options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var lines = CSV.split('\n').filter(function(v){return v!==''});
|
||||
// if labels are not defined, get them from first line
|
||||
if ( chartData.labels === null && lines.length > 0 ) {
|
||||
chartData.labels = lines[0].split(',');
|
||||
chartData.labels.shift();
|
||||
lines.shift();
|
||||
}
|
||||
// get data values
|
||||
for (var j = 0; j < lines.length; j++ ){
|
||||
if (chartData.datasets.length <= j) chartData.datasets[j] = {};
|
||||
chartData.datasets[j].data = lines[j].split(','); //.filter(function(v){return v!==''});
|
||||
chartData.datasets[j].label = chartData.datasets[j].data[0];
|
||||
chartData.datasets[j].data.shift();
|
||||
for (var k = 0; k < chartData.datasets[j].data.length; k++ ){
|
||||
chartData.datasets[j].data[k] = Number(chartData.datasets[j].data[k]);
|
||||
}
|
||||
}
|
||||
|
||||
// add chart options
|
||||
var config = chartConfig[canvas.getAttribute("data-chart")];
|
||||
if ( config ) {
|
||||
for (var j = 0; j < chartData.datasets.length; j++ ){
|
||||
for (var attrname in config) {
|
||||
if ( !chartData.datasets[j][attrname] ) {
|
||||
chartData.datasets[j][attrname] = config[attrname][j%config[attrname].length];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
canvas.chart = new Chart(ctx, { type: canvas.getAttribute("data-chart"), data: chartData, options: chartOptions });
|
||||
|
||||
}
|
||||
|
||||
function updateChart(canvas, idx, data) {
|
||||
canvas.chart.data.datasets[idx].data = data;
|
||||
recreateChart( canvas );
|
||||
}
|
||||
|
||||
var initializeCharts = function(){
|
||||
// Get all canvases
|
||||
var canvases = document.querySelectorAll("canvas");
|
||||
for (var i = 0; i < canvases.length; i++ ){
|
||||
// check if canvas has data-chart attribute
|
||||
if ( canvases[i].hasAttribute("data-chart") ){
|
||||
var CSV = canvases[i].innerHTML.trim();
|
||||
var comments = CSV.match(/<!--[\s\S]*?-->/g);
|
||||
CSV = CSV.replace(/<!--[\s\S]*?-->/g,'').replace(/^\s*\n/gm, "")
|
||||
if ( ! canvases[i].hasAttribute("data-chart-src") ) {
|
||||
createChart(canvases[i], CSV, comments);
|
||||
}
|
||||
else {
|
||||
var canvas = canvases[i];
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
if (xhr.readyState === 4) {
|
||||
createChart(canvas, xhr.responseText, comments);
|
||||
}
|
||||
else {
|
||||
console.warn( 'Failed to get file ' + canvas.getAttribute("data-chart-src") +". ReadyState: " + xhr.readyState + ", Status: " + xhr.status);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.open( 'GET', canvas.getAttribute("data-chart-src"), false );
|
||||
try {
|
||||
xhr.send();
|
||||
}
|
||||
catch ( error ) {
|
||||
console.warn( 'Failed to get file ' + canvas.getAttribute("data-chart-src") + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + error );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function recreateChart(canvas) {
|
||||
// clear data to redraw animation
|
||||
var data = canvas.chart.data.datasets;
|
||||
canvas.chart.data.datasets = [];
|
||||
canvas.chart.update();
|
||||
canvas.style.visibility = "hidden";
|
||||
setTimeout( function(canvas, data) {
|
||||
canvas.chart.data.datasets = data;
|
||||
canvas.style.visibility = "visible";
|
||||
canvas.chart.update();
|
||||
}, 500, canvas, data); // wait for slide transition to re-add data and animation
|
||||
/*
|
||||
var config = canvas.chart.config;
|
||||
canvas.chart.destroy();
|
||||
setTimeout( function() { canvas.chart = new Chart(canvas, config);}, 500); // wait for slide transition
|
||||
*/
|
||||
}
|
||||
|
||||
// check if chart option is given or not
|
||||
var chartConfig = Reveal.getConfig().chart || {};
|
||||
|
||||
// set global chart options
|
||||
var config = chartConfig.defaults;
|
||||
if ( config ) {
|
||||
mergeRecursive(Chart.defaults, config);
|
||||
}
|
||||
|
||||
Reveal.addEventListener('ready', function(){
|
||||
initializeCharts();
|
||||
Reveal.addEventListener('slidechanged', function(){
|
||||
var canvases = Reveal.getCurrentSlide().querySelectorAll("canvas[data-chart]");
|
||||
for (var i = 0; i < canvases.length; i++ ){
|
||||
if ( canvases[i].chart && canvases[i].chart.config.options.animation !== false ) {
|
||||
recreateChart( canvases[i] );
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
this.update = updateChart;
|
||||
|
||||
return this;
|
||||
};
|
72
.obsidian/plugins/obsidian-advanced-slides/plugin/customcontrols/README.md
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# Custom controls
|
||||
|
||||
This plugin allows to add responsive custom controls to reveal.js which allow arbitrary positioning, layout, and behaviour of the controls.
|
||||
|
||||
[Check out the live demo](https://rajgoel.github.io/reveal.js-demos/customcontrols-demo.html)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Copy the files `plugin.js` and `style.css` into the plugin folder of your reveal.js presentation, i.e. ```plugin/customcontrols``` and load the plugin as shown below.
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="plugin/customcontrols/style.css">
|
||||
<script src="plugin/customcontrols/plugin.js"></script>
|
||||
|
||||
<script>
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
plugins: [ RevealCustomControls ],
|
||||
// ...
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
Note, without configuration you need to add
|
||||
|
||||
```javascript
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
```
|
||||
|
||||
between ```<head>``` and ```</head>``` of your HTML file because the defaults use [Font Awesome](http://fontawesome.io/).
|
||||
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
The plugin can be configured by adding custom controls and changing the layout of the slide number, e.g., by:
|
||||
|
||||
|
||||
```javascript
|
||||
Reveal.initialize({
|
||||
// ...
|
||||
customcontrols: {
|
||||
controls: [
|
||||
{
|
||||
id: 'toggle-overview',
|
||||
title: 'Toggle overview (O)',
|
||||
icon: '<i class="fa fa-th"></i>',
|
||||
action: 'Reveal.toggleOverview();'
|
||||
},
|
||||
{ icon: '<i class="fa fa-pen-square"></i>',
|
||||
title: 'Toggle chalkboard (B)',
|
||||
action: 'RevealChalkboard.toggleChalkboard();'
|
||||
},
|
||||
{ icon: '<i class="fa fa-pen"></i>',
|
||||
title: 'Toggle notes canvas (C)',
|
||||
action: 'RevealChalkboard.toggleNotesCanvas();'
|
||||
}
|
||||
]
|
||||
},
|
||||
// ...
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
The `id` and `title` are optional. The configuration should be self explaining and any number of controls can be added. The style file can be altered to control the layout and responsiveness of the custom controls.
|
||||
|
||||
## License
|
||||
|
||||
MIT licensed
|
||||
|
||||
Copyright (C) 2020 Asvin Goel
|
69
.obsidian/plugins/obsidian-advanced-slides/plugin/customcontrols/plugin.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/*****************************************************************
|
||||
** Author: Asvin Goel, goel@telematique.eu
|
||||
**
|
||||
** A plugin replacing the default controls by custom controls.
|
||||
**
|
||||
** Version: 2.0.0
|
||||
**
|
||||
** License: MIT license (see LICENSE.md)
|
||||
**
|
||||
******************************************************************/
|
||||
window.RevealCustomControls = window.RevealCustomControls || {
|
||||
id: 'RevealCustomControls',
|
||||
init: function(deck) {
|
||||
initCustomControls(deck);
|
||||
}
|
||||
};
|
||||
|
||||
const initCustomControls = function(Reveal){
|
||||
var config = Reveal.getConfig().customcontrols || {};
|
||||
|
||||
var collapseIcon = config.collapseIcon || '<i class="fa fa-chevron-down"></i>';
|
||||
var expandIcon = config.expandIcon || '<i class="fa fa-chevron-up"></i>';
|
||||
var tooltip = config.tooltip || 'Show/hide controls';
|
||||
|
||||
var div = document.createElement( 'div' );
|
||||
div.id = 'customcontrols';
|
||||
|
||||
var toggleButton = document.createElement( 'button' );
|
||||
toggleButton.title = tooltip;
|
||||
toggleButton.innerHTML = '<span id="collapse-customcontrols">' + collapseIcon + '</span>' + '<span id="expand-customcontrols">' + expandIcon + '</span>';
|
||||
|
||||
toggleButton.addEventListener('click', function( event ) {
|
||||
var div = document.querySelector("div#customcontrols");
|
||||
if ( div.classList.contains('collapsed') ) {
|
||||
div.classList.remove('collapsed');
|
||||
}
|
||||
else {
|
||||
div.classList.add('collapsed');
|
||||
}
|
||||
});
|
||||
|
||||
div.appendChild(toggleButton);
|
||||
|
||||
var controls = document.createElement( 'ul' );
|
||||
for (var i = 0; i < config.controls.length; i++ ) {
|
||||
var control = document.createElement( 'li' );
|
||||
if ( config.controls[i].id ) {
|
||||
control.id = config.controls[i].id;
|
||||
}
|
||||
control.innerHTML = '<button ' + ( config.controls[i].title ? 'title="' + config.controls[i].title + '" ': '' ) + 'onclick="' + config.controls[i].action + '">' + config.controls[i].icon + '</button>';
|
||||
controls.appendChild( control );
|
||||
}
|
||||
div.appendChild( controls );
|
||||
|
||||
|
||||
document.querySelector(".reveal").appendChild( div );
|
||||
|
||||
document.addEventListener( 'resize', function( event ) {
|
||||
// expand controls to make sure they are visible
|
||||
var div = document.querySelector("div#customcontrols.collapsed");
|
||||
if ( div ) {
|
||||
div.classList.remove('collapsed');
|
||||
}
|
||||
} );
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
|
62
.obsidian/plugins/obsidian-advanced-slides/plugin/customcontrols/style.css
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
#customcontrols {
|
||||
z-index: 40;
|
||||
position: fixed;
|
||||
left: 70px;
|
||||
bottom: 30px;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#customcontrols button {
|
||||
background: none;
|
||||
color: var(--r-link-color);
|
||||
border: none;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
outline: inherit;
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
#customcontrols button:hover {
|
||||
color: var(--r-link-color-hover);
|
||||
}
|
||||
|
||||
#customcontrols > ul {
|
||||
position: fixed;
|
||||
left: 54px;
|
||||
bottom: 64px;
|
||||
list-style-type: none;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid var(--r-link-color);
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background-color: var(--r-background-color)
|
||||
}
|
||||
|
||||
#customcontrols ul > li {
|
||||
margin: 0px 5px;
|
||||
padding: 0px 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#customcontrols.collapsed #collapse-customcontrols, #customcontrols.collapsed > ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#customcontrols:not(.collapsed) #expand-customcontrols {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 500px) {
|
||||
#customcontrols > button {
|
||||
display: none;
|
||||
}
|
||||
#customcontrols > ul {
|
||||
bottom: 20px;
|
||||
border: none;
|
||||
background: none;
|
||||
}
|
||||
}
|
144
.obsidian/plugins/obsidian-advanced-slides/plugin/elapsed-time-bar/elapsed-time-bar.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
var ElapsedTimeBar = {
|
||||
// default value
|
||||
barColor: 'rgb(200,0,0)',
|
||||
pausedBarColor: 'rgba(200,0,0,.6)',
|
||||
|
||||
isPaused: false,
|
||||
isFinished: false,
|
||||
|
||||
allottedTime: null,
|
||||
timeProgressBar: null,
|
||||
startTime: null,
|
||||
pauseTime: null,
|
||||
pauseTimeDuration: 0,
|
||||
|
||||
/**
|
||||
* initialize elements
|
||||
*/
|
||||
handleReady() {
|
||||
var config = Reveal.getConfig();
|
||||
|
||||
// activate this plugin if config.allottedTime exists.
|
||||
if (!config.allottedTime) {
|
||||
console.warn('Failed to start ElapsedTimeBar plugin. "allottedTime" property is required.');
|
||||
return;
|
||||
}
|
||||
|
||||
// set configurations
|
||||
this.barColor = config.barColor || this.barColor;
|
||||
this.pausedBarColor = config.pausedBarColor || this.pausedBarColor;
|
||||
|
||||
// calc barHeight from config.barHeight or page-progress container
|
||||
var barHeight;
|
||||
var pageProgressContainer = document.querySelector('.progress');
|
||||
if (config.progressBarHeight) {
|
||||
barHeight = parseInt(config.progressBarHeight, 10) + 'px';
|
||||
|
||||
// override height of page-progress container
|
||||
pageProgressContainer && (pageProgressContainer.style.height = barHeight);
|
||||
} else if (config.progress && pageProgressContainer) {
|
||||
// get height from page-progress container
|
||||
barHeight = pageProgressContainer.getBoundingClientRect().height + 'px';
|
||||
} else {
|
||||
// default
|
||||
barHeight = '3px';
|
||||
}
|
||||
|
||||
// create container of time-progress
|
||||
var timeProgressContainer = document.createElement('div');
|
||||
timeProgressContainer.classList.add('progress');
|
||||
Object.entries({
|
||||
display: 'block',
|
||||
position: 'fixed',
|
||||
bottom: config.progress ? barHeight : 0,
|
||||
width: '100%',
|
||||
height: barHeight
|
||||
}).forEach(([k, v]) => {
|
||||
timeProgressContainer.style[k] = v;
|
||||
});
|
||||
document.querySelector('.reveal').appendChild(timeProgressContainer);
|
||||
|
||||
// create content of time-progress
|
||||
this.timeProgressBar = document.createElement('div');
|
||||
Object.entries({
|
||||
height: '100%',
|
||||
willChange: 'width'
|
||||
}).forEach(([k, v]) => {
|
||||
this.timeProgressBar.style[k] = v;
|
||||
});
|
||||
timeProgressContainer.appendChild(this.timeProgressBar);
|
||||
|
||||
// start timer
|
||||
this.start(config.allottedTime);
|
||||
},
|
||||
|
||||
/**
|
||||
* update repeatedly using requestAnimationFrame.
|
||||
*/
|
||||
loop() {
|
||||
if (this.isPaused) return;
|
||||
var now = +new Date();
|
||||
var elapsedTime = now - this.startTime - this.pauseTimeDuration;
|
||||
if (elapsedTime > this.allottedTime) {
|
||||
this.timeProgressBar.style.width = '100%';
|
||||
this.isFinished = true;
|
||||
} else {
|
||||
this.timeProgressBar.style.width = elapsedTime / this.allottedTime * 100 + '%';
|
||||
requestAnimationFrame(this.loop.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* set color of progress bar
|
||||
*/
|
||||
setBarColor() {
|
||||
if (this.isPaused) {
|
||||
this.timeProgressBar.style.backgroundColor = this.pausedBarColor;
|
||||
} else {
|
||||
this.timeProgressBar.style.backgroundColor = this.barColor;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* start(reset) timer with new allotted time.
|
||||
* @param {number} allottedTime
|
||||
* @param {number} [elapsedTime=0]
|
||||
*/
|
||||
start(allottedTime, elapsedTime = 0) {
|
||||
this.isFinished = false;
|
||||
this.isPaused = false;
|
||||
this.allottedTime = allottedTime;
|
||||
this.startTime = +new Date() - elapsedTime;
|
||||
this.pauseTimeDuration = 0;
|
||||
this.setBarColor();
|
||||
this.loop();
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.start(this.allottedTime);
|
||||
},
|
||||
|
||||
pause() {
|
||||
if (this.isPaused) return;
|
||||
this.isPaused = true;
|
||||
this.pauseTime = +new Date();
|
||||
this.setBarColor();
|
||||
},
|
||||
|
||||
resume() {
|
||||
if (!this.isPaused) return;
|
||||
|
||||
// add paused time duration
|
||||
this.isPaused = false;
|
||||
this.pauseTimeDuration += new Date() - this.pauseTime;
|
||||
this.pauseTime = null;
|
||||
this.setBarColor();
|
||||
this.loop();
|
||||
}
|
||||
};
|
||||
|
||||
if (Reveal.isReady()) {
|
||||
ElapsedTimeBar.handleReady();
|
||||
} else {
|
||||
Reveal.addEventListener('ready', () => ElapsedTimeBar.handleReady());
|
||||
}
|
5
.obsidian/plugins/obsidian-advanced-slides/plugin/highlight/highlight.esm.js
vendored
Normal file
5
.obsidian/plugins/obsidian-advanced-slides/plugin/highlight/highlight.js
vendored
Normal file
71
.obsidian/plugins/obsidian-advanced-slides/plugin/highlight/monokai.css
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
439
.obsidian/plugins/obsidian-advanced-slides/plugin/highlight/plugin.js
vendored
Normal file
@@ -0,0 +1,439 @@
|
||||
import hljs from 'highlight.js';
|
||||
|
||||
/* highlightjs-line-numbers.js 2.8.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
|
||||
!function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a<o&&(i=o,o=a,a=i,i=l,l=s,s=i);0!==n.indexOf(l);)l=l.slice(1);for(;-1===n.lastIndexOf(s);)s=s.slice(0,-1);for(var c=l,u=function(e){for(var n=e;"TABLE"!==n.nodeName;)n=n.parentNode;return n}(t),d=o+1;d<a;++d){var f=p('.{0}[{1}="{2}"]',[h,m,d]);c+="\n"+u.querySelector(f).textContent}return c+="\n"+s}function n(e){try{var n=o.querySelectorAll("code.hljs,code.nohighlight");for(var t in n)n.hasOwnProperty(t)&&(n[t].classList.contains("nohljsln")||d(n[t],e))}catch(e){r.console.error("LineNumbers error: ",e)}}function d(e,n){if("object"==typeof e)e.innerHTML=f(e,n)}function f(e,n){var t,r,o=(t=e,{singleLine:function(e){return!!e.singleLine&&e.singleLine}(r=(r=n)||{}),startFrom:function(e,n){var t=1;isFinite(n.startFrom)&&(t=n.startFrom);var r=function(e,n){return e.hasAttribute(n)?e.getAttribute(n):null}(e,"data-ln-start-from");return null!==r&&(t=function(e,n){if(!e)return n;var t=Number(e);return isFinite(t)?t:n}(r,1)),t}(t,r)});return function e(n){var t=n.childNodes;for(var r in t){var o;t.hasOwnProperty(r)&&(o=t[r],0<(o.textContent.trim().match(a)||[]).length&&(0<o.childNodes.length?e(o):v(o.parentNode)))}}(e),function(e,n){var t=g(e);""===t[t.length-1].trim()&&t.pop();if(1<t.length||n.singleLine){for(var r="",o=0,a=t.length;o<a;o++)r+=p('<tr><td class="{0} {1}" {3}="{5}"><div class="{2}" {3}="{5}"></div></td><td class="{0} {4}" {3}="{5}">{6}</td></tr>',[l,s,c,m,h,o+n.startFrom,0<t[o].length?t[o]:" "]);return p('<table class="{0}">{1}</table>',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r<t.length;r++){o+=p('<span class="{0}">{1}</span>\n',[n,0<t[r].length?t[r]:" "])}e.innerHTML=o.trim()}}function g(e){return 0===e.length?[]:e.split(a)}function p(e,t){return e.replace(/\{(\d+)\}/g,function(e,n){return void 0!==t[n]?t[n]:e})}hljs?(hljs.initLineNumbersOnLoad=function(e){"interactive"===o.readyState||"complete"===o.readyState?n(e):r.addEventListener("DOMContentLoaded",function(){n(e)})},hljs.lineNumbersBlock=d,hljs.lineNumbersValue=function(e,n){if("string"!=typeof e)return;var t=document.createElement("code");return t.innerHTML=e,f(t,n)},(e=o.createElement("style")).type="text/css",e.innerHTML=p(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[i,c,m]),o.getElementsByTagName("head")[0].appendChild(e)):r.console.error("highlight.js not detected!"),document.addEventListener("copy",function(e){var n,t=window.getSelection();!function(e){for(var n=e;n;){if(n.className&&-1!==n.className.indexOf("hljs-ln-code"))return 1;n=n.parentNode}}(t.anchorNode)||(n=-1!==window.navigator.userAgent.indexOf("Edge")?u(t):t.toString(),e.clipboardData.setData("text/plain",n),e.preventDefault())})}(window,document);
|
||||
|
||||
|
||||
/*!
|
||||
* reveal.js plugin that adds syntax highlight support.
|
||||
*/
|
||||
|
||||
const Plugin = {
|
||||
|
||||
id: 'highlight',
|
||||
|
||||
HIGHLIGHT_STEP_DELIMITER: '|',
|
||||
HIGHLIGHT_LINE_DELIMITER: ',',
|
||||
HIGHLIGHT_LINE_RANGE_DELIMITER: '-',
|
||||
|
||||
hljs,
|
||||
|
||||
/**
|
||||
* Highlights code blocks withing the given deck.
|
||||
*
|
||||
* Note that this can be called multiple times if
|
||||
* there are multiple presentations on one page.
|
||||
*
|
||||
* @param {Reveal} reveal the reveal.js instance
|
||||
*/
|
||||
init: function( reveal ) {
|
||||
|
||||
// Read the plugin config options and provide fallbacks
|
||||
let config = reveal.getConfig().highlight || {};
|
||||
|
||||
config.highlightOnLoad = typeof config.highlightOnLoad === 'boolean' ? config.highlightOnLoad : true;
|
||||
config.escapeHTML = typeof config.escapeHTML === 'boolean' ? config.escapeHTML : true;
|
||||
|
||||
Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
|
||||
|
||||
block.parentNode.classList.add('code-wrapper');
|
||||
|
||||
// Code can optionally be wrapped in script template to avoid
|
||||
// HTML being parsed by the browser (i.e. when you need to
|
||||
// include <, > or & in your code).
|
||||
let substitute = block.querySelector( 'script[type="text/template"]' );
|
||||
if( substitute ) {
|
||||
// textContent handles the HTML entity escapes for us
|
||||
block.textContent = substitute.innerHTML;
|
||||
}
|
||||
|
||||
// Trim whitespace if the "data-trim" attribute is present
|
||||
if( block.hasAttribute( 'data-trim' ) && typeof block.innerHTML.trim === 'function' ) {
|
||||
block.innerHTML = betterTrim( block );
|
||||
}
|
||||
|
||||
// Escape HTML tags unless the "data-noescape" attrbute is present
|
||||
if( config.escapeHTML && !block.hasAttribute( 'data-noescape' )) {
|
||||
block.innerHTML = block.innerHTML.replace( /</g,"<").replace(/>/g, '>' );
|
||||
}
|
||||
|
||||
// Re-highlight when focus is lost (for contenteditable code)
|
||||
block.addEventListener( 'focusout', function( event ) {
|
||||
hljs.highlightElement( event.currentTarget );
|
||||
}, false );
|
||||
|
||||
} );
|
||||
|
||||
// Triggers a callback function before we trigger highlighting
|
||||
if( typeof config.beforeHighlight === 'function' ) {
|
||||
config.beforeHighlight( hljs );
|
||||
}
|
||||
|
||||
// Run initial highlighting for all code
|
||||
if( config.highlightOnLoad ) {
|
||||
Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
|
||||
Plugin.highlightBlock( block );
|
||||
} );
|
||||
}
|
||||
|
||||
// If we're printing to PDF, scroll the code highlights of
|
||||
// all blocks in the deck into view at once
|
||||
reveal.on( 'pdf-ready', function() {
|
||||
[].slice.call( reveal.getRevealElement().querySelectorAll( 'pre code[data-line-numbers].current-fragment' ) ).forEach( function( block ) {
|
||||
Plugin.scrollHighlightedLineIntoView( block, {}, true );
|
||||
} );
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Highlights a code block. If the <code> node has the
|
||||
* 'data-line-numbers' attribute we also generate slide
|
||||
* numbers.
|
||||
*
|
||||
* If the block contains multiple line highlight steps,
|
||||
* we clone the block and create a fragment for each step.
|
||||
*/
|
||||
highlightBlock: function( block ) {
|
||||
|
||||
hljs.highlightElement( block );
|
||||
|
||||
// Don't generate line numbers for empty code blocks
|
||||
if( block.innerHTML.trim().length === 0 ) return;
|
||||
|
||||
if( block.hasAttribute( 'data-line-numbers' ) ) {
|
||||
hljs.lineNumbersBlock( block, { singleLine: true } );
|
||||
|
||||
var scrollState = { currentBlock: block };
|
||||
|
||||
// If there is more than one highlight step, generate
|
||||
// fragments
|
||||
var highlightSteps = Plugin.deserializeHighlightSteps( block.getAttribute( 'data-line-numbers' ) );
|
||||
if( highlightSteps.length > 1 ) {
|
||||
|
||||
// If the original code block has a fragment-index,
|
||||
// each clone should follow in an incremental sequence
|
||||
var fragmentIndex = parseInt( block.getAttribute( 'data-fragment-index' ), 10 );
|
||||
|
||||
if( typeof fragmentIndex !== 'number' || isNaN( fragmentIndex ) ) {
|
||||
fragmentIndex = null;
|
||||
}
|
||||
|
||||
// Generate fragments for all steps except the original block
|
||||
highlightSteps.slice(1).forEach( function( highlight ) {
|
||||
|
||||
var fragmentBlock = block.cloneNode( true );
|
||||
fragmentBlock.setAttribute( 'data-line-numbers', Plugin.serializeHighlightSteps( [ highlight ] ) );
|
||||
fragmentBlock.classList.add( 'fragment' );
|
||||
block.parentNode.appendChild( fragmentBlock );
|
||||
Plugin.highlightLines( fragmentBlock );
|
||||
|
||||
if( typeof fragmentIndex === 'number' ) {
|
||||
fragmentBlock.setAttribute( 'data-fragment-index', fragmentIndex );
|
||||
fragmentIndex += 1;
|
||||
}
|
||||
else {
|
||||
fragmentBlock.removeAttribute( 'data-fragment-index' );
|
||||
}
|
||||
|
||||
// Scroll highlights into view as we step through them
|
||||
fragmentBlock.addEventListener( 'visible', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock, scrollState ) );
|
||||
fragmentBlock.addEventListener( 'hidden', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock.previousSibling, scrollState ) );
|
||||
|
||||
} );
|
||||
|
||||
block.removeAttribute( 'data-fragment-index' );
|
||||
block.setAttribute( 'data-line-numbers', Plugin.serializeHighlightSteps( [ highlightSteps[0] ] ) );
|
||||
|
||||
}
|
||||
|
||||
// Scroll the first highlight into view when the slide
|
||||
// becomes visible. Note supported in IE11 since it lacks
|
||||
// support for Element.closest.
|
||||
var slide = typeof block.closest === 'function' ? block.closest( 'section:not(.stack)' ) : null;
|
||||
if( slide ) {
|
||||
var scrollFirstHighlightIntoView = function() {
|
||||
Plugin.scrollHighlightedLineIntoView( block, scrollState, true );
|
||||
slide.removeEventListener( 'visible', scrollFirstHighlightIntoView );
|
||||
}
|
||||
slide.addEventListener( 'visible', scrollFirstHighlightIntoView );
|
||||
}
|
||||
|
||||
Plugin.highlightLines( block );
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Animates scrolling to the first highlighted line
|
||||
* in the given code block.
|
||||
*/
|
||||
scrollHighlightedLineIntoView: function( block, scrollState, skipAnimation ) {
|
||||
|
||||
cancelAnimationFrame( scrollState.animationFrameID );
|
||||
|
||||
// Match the scroll position of the currently visible
|
||||
// code block
|
||||
if( scrollState.currentBlock ) {
|
||||
block.scrollTop = scrollState.currentBlock.scrollTop;
|
||||
}
|
||||
|
||||
// Remember the current code block so that we can match
|
||||
// its scroll position when showing/hiding fragments
|
||||
scrollState.currentBlock = block;
|
||||
|
||||
var highlightBounds = this.getHighlightedLineBounds( block )
|
||||
var viewportHeight = block.offsetHeight;
|
||||
|
||||
// Subtract padding from the viewport height
|
||||
var blockStyles = getComputedStyle( block );
|
||||
viewportHeight -= parseInt( blockStyles.paddingTop ) + parseInt( blockStyles.paddingBottom );
|
||||
|
||||
// Scroll position which centers all highlights
|
||||
var startTop = block.scrollTop;
|
||||
var targetTop = highlightBounds.top + ( Math.min( highlightBounds.bottom - highlightBounds.top, viewportHeight ) - viewportHeight ) / 2;
|
||||
|
||||
// Account for offsets in position applied to the
|
||||
// <table> that holds our lines of code
|
||||
var lineTable = block.querySelector( '.hljs-ln' );
|
||||
if( lineTable ) targetTop += lineTable.offsetTop - parseInt( blockStyles.paddingTop );
|
||||
|
||||
// Make sure the scroll target is within bounds
|
||||
targetTop = Math.max( Math.min( targetTop, block.scrollHeight - viewportHeight ), 0 );
|
||||
|
||||
if( skipAnimation === true || startTop === targetTop ) {
|
||||
block.scrollTop = targetTop;
|
||||
}
|
||||
else {
|
||||
|
||||
// Don't attempt to scroll if there is no overflow
|
||||
if( block.scrollHeight <= viewportHeight ) return;
|
||||
|
||||
var time = 0;
|
||||
var animate = function() {
|
||||
time = Math.min( time + 0.02, 1 );
|
||||
|
||||
// Update our eased scroll position
|
||||
block.scrollTop = startTop + ( targetTop - startTop ) * Plugin.easeInOutQuart( time );
|
||||
|
||||
// Keep animating unless we've reached the end
|
||||
if( time < 1 ) {
|
||||
scrollState.animationFrameID = requestAnimationFrame( animate );
|
||||
}
|
||||
};
|
||||
|
||||
animate();
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The easing function used when scrolling.
|
||||
*/
|
||||
easeInOutQuart: function( t ) {
|
||||
|
||||
// easeInOutQuart
|
||||
return t<.5 ? 8*t*t*t*t : 1-8*(--t)*t*t*t;
|
||||
|
||||
},
|
||||
|
||||
getHighlightedLineBounds: function( block ) {
|
||||
|
||||
var highlightedLines = block.querySelectorAll( '.highlight-line' );
|
||||
if( highlightedLines.length === 0 ) {
|
||||
return { top: 0, bottom: 0 };
|
||||
}
|
||||
else {
|
||||
var firstHighlight = highlightedLines[0];
|
||||
var lastHighlight = highlightedLines[ highlightedLines.length -1 ];
|
||||
|
||||
return {
|
||||
top: firstHighlight.offsetTop,
|
||||
bottom: lastHighlight.offsetTop + lastHighlight.offsetHeight
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Visually emphasize specific lines within a code block.
|
||||
* This only works on blocks with line numbering turned on.
|
||||
*
|
||||
* @param {HTMLElement} block a <code> block
|
||||
* @param {String} [linesToHighlight] The lines that should be
|
||||
* highlighted in this format:
|
||||
* "1" = highlights line 1
|
||||
* "2,5" = highlights lines 2 & 5
|
||||
* "2,5-7" = highlights lines 2, 5, 6 & 7
|
||||
*/
|
||||
highlightLines: function( block, linesToHighlight ) {
|
||||
|
||||
var highlightSteps = Plugin.deserializeHighlightSteps( linesToHighlight || block.getAttribute( 'data-line-numbers' ) );
|
||||
|
||||
if( highlightSteps.length ) {
|
||||
|
||||
highlightSteps[0].forEach( function( highlight ) {
|
||||
|
||||
var elementsToHighlight = [];
|
||||
|
||||
// Highlight a range
|
||||
if( typeof highlight.end === 'number' ) {
|
||||
elementsToHighlight = [].slice.call( block.querySelectorAll( 'table tr:nth-child(n+'+highlight.start+'):nth-child(-n+'+highlight.end+')' ) );
|
||||
}
|
||||
// Highlight a single line
|
||||
else if( typeof highlight.start === 'number' ) {
|
||||
elementsToHighlight = [].slice.call( block.querySelectorAll( 'table tr:nth-child('+highlight.start+')' ) );
|
||||
}
|
||||
|
||||
if( elementsToHighlight.length ) {
|
||||
elementsToHighlight.forEach( function( lineElement ) {
|
||||
lineElement.classList.add( 'highlight-line' );
|
||||
} );
|
||||
|
||||
block.classList.add( 'has-highlights' );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses and formats a user-defined string of line
|
||||
* numbers to highlight.
|
||||
*
|
||||
* @example
|
||||
* Plugin.deserializeHighlightSteps( '1,2|3,5-10' )
|
||||
* // [
|
||||
* // [ { start: 1 }, { start: 2 } ],
|
||||
* // [ { start: 3 }, { start: 5, end: 10 } ]
|
||||
* // ]
|
||||
*/
|
||||
deserializeHighlightSteps: function( highlightSteps ) {
|
||||
|
||||
// Remove whitespace
|
||||
highlightSteps = highlightSteps.replace( /\s/g, '' );
|
||||
|
||||
// Divide up our line number groups
|
||||
highlightSteps = highlightSteps.split( Plugin.HIGHLIGHT_STEP_DELIMITER );
|
||||
|
||||
return highlightSteps.map( function( highlights ) {
|
||||
|
||||
return highlights.split( Plugin.HIGHLIGHT_LINE_DELIMITER ).map( function( highlight ) {
|
||||
|
||||
// Parse valid line numbers
|
||||
if( /^[\d-]+$/.test( highlight ) ) {
|
||||
|
||||
highlight = highlight.split( Plugin.HIGHLIGHT_LINE_RANGE_DELIMITER );
|
||||
|
||||
var lineStart = parseInt( highlight[0], 10 ),
|
||||
lineEnd = parseInt( highlight[1], 10 );
|
||||
|
||||
if( isNaN( lineEnd ) ) {
|
||||
return {
|
||||
start: lineStart
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
start: lineStart,
|
||||
end: lineEnd
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
// If no line numbers are provided, no code will be highlighted
|
||||
else {
|
||||
|
||||
return {};
|
||||
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Serializes parsed line number data into a string so
|
||||
* that we can store it in the DOM.
|
||||
*/
|
||||
serializeHighlightSteps: function( highlightSteps ) {
|
||||
|
||||
return highlightSteps.map( function( highlights ) {
|
||||
|
||||
return highlights.map( function( highlight ) {
|
||||
|
||||
// Line range
|
||||
if( typeof highlight.end === 'number' ) {
|
||||
return highlight.start + Plugin.HIGHLIGHT_LINE_RANGE_DELIMITER + highlight.end;
|
||||
}
|
||||
// Single line
|
||||
else if( typeof highlight.start === 'number' ) {
|
||||
return highlight.start;
|
||||
}
|
||||
// All lines
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
|
||||
} ).join( Plugin.HIGHLIGHT_LINE_DELIMITER );
|
||||
|
||||
} ).join( Plugin.HIGHLIGHT_STEP_DELIMITER );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Function to perform a better "data-trim" on code snippets
|
||||
// Will slice an indentation amount on each line of the snippet (amount based on the line having the lowest indentation length)
|
||||
function betterTrim(snippetEl) {
|
||||
// Helper functions
|
||||
function trimLeft(val) {
|
||||
// Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
|
||||
return val.replace(/^[\s\uFEFF\xA0]+/g, '');
|
||||
}
|
||||
function trimLineBreaks(input) {
|
||||
var lines = input.split('\n');
|
||||
|
||||
// Trim line-breaks from the beginning
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
if (lines[i].trim() === '') {
|
||||
lines.splice(i--, 1);
|
||||
} else break;
|
||||
}
|
||||
|
||||
// Trim line-breaks from the end
|
||||
for (var i = lines.length-1; i >= 0; i--) {
|
||||
if (lines[i].trim() === '') {
|
||||
lines.splice(i, 1);
|
||||
} else break;
|
||||
}
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
// Main function for betterTrim()
|
||||
return (function(snippetEl) {
|
||||
var content = trimLineBreaks(snippetEl.innerHTML);
|
||||
var lines = content.split('\n');
|
||||
// Calculate the minimum amount to remove on each line start of the snippet (can be 0)
|
||||
var pad = lines.reduce(function(acc, line) {
|
||||
if (line.length > 0 && trimLeft(line).length > 0 && acc > line.length - trimLeft(line).length) {
|
||||
return line.length - trimLeft(line).length;
|
||||
}
|
||||
return acc;
|
||||
}, Number.POSITIVE_INFINITY);
|
||||
// Slice each line with this amount
|
||||
return lines.map(function(line, index) {
|
||||
return line.slice(pad);
|
||||
})
|
||||
.join('\n');
|
||||
})(snippetEl);
|
||||
}
|
||||
|
||||
export default () => Plugin;
|
80
.obsidian/plugins/obsidian-advanced-slides/plugin/highlight/zenburn.css
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
|
||||
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
||||
based on dark.css by Ivan Sagalaev
|
||||
|
||||
*/
|
||||
|
||||
.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
.obsidian/plugins/obsidian-advanced-slides/plugin/markdown/markdown.esm.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/markdown/markdown.js
vendored
Normal file
475
.obsidian/plugins/obsidian-advanced-slides/plugin/markdown/plugin.js
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
/*!
|
||||
* The reveal.js markdown plugin. Handles parsing of
|
||||
* markdown inside of presentations as well as loading
|
||||
* of external markdown documents.
|
||||
*/
|
||||
|
||||
import { marked } from 'marked';
|
||||
|
||||
const DEFAULT_SLIDE_SEPARATOR = '\r?\n---\r?\n',
|
||||
DEFAULT_NOTES_SEPARATOR = 'notes?:',
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$';
|
||||
|
||||
const SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__';
|
||||
|
||||
const CODE_LINE_NUMBER_REGEX = /\[([\s\d,|-]*)\]/;
|
||||
|
||||
const HTML_ESCAPE_MAP = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
|
||||
const Plugin = () => {
|
||||
|
||||
// The reveal.js instance this plugin is attached to
|
||||
let deck;
|
||||
|
||||
/**
|
||||
* Retrieves the markdown contents of a slide section
|
||||
* element. Normalizes leading tabs/whitespace.
|
||||
*/
|
||||
function getMarkdownFromSlide( section ) {
|
||||
|
||||
// look for a <script> or <textarea data-template> wrapper
|
||||
var template = section.querySelector( '[data-template]' ) || section.querySelector( 'script' );
|
||||
|
||||
// strip leading whitespace so it isn't evaluated as code
|
||||
var text = ( template || section ).textContent;
|
||||
|
||||
// restore script end tags
|
||||
text = text.replace( new RegExp( SCRIPT_END_PLACEHOLDER, 'g' ), '</script>' );
|
||||
|
||||
var leadingWs = text.match( /^\n?(\s*)/ )[1].length,
|
||||
leadingTabs = text.match( /^\n?(\t*)/ )[1].length;
|
||||
|
||||
if( leadingTabs > 0 ) {
|
||||
text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
|
||||
}
|
||||
else if( leadingWs > 1 ) {
|
||||
text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' );
|
||||
}
|
||||
|
||||
return text;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a markdown slide section element, this will
|
||||
* return all arguments that aren't related to markdown
|
||||
* parsing. Used to forward any other user-defined arguments
|
||||
* to the output markdown slide.
|
||||
*/
|
||||
function getForwardedAttributes( section ) {
|
||||
|
||||
var attributes = section.attributes;
|
||||
var result = [];
|
||||
|
||||
for( var i = 0, len = attributes.length; i < len; i++ ) {
|
||||
var name = attributes[i].name,
|
||||
value = attributes[i].value;
|
||||
|
||||
// disregard attributes that are used for markdown loading/parsing
|
||||
if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue;
|
||||
|
||||
if( value ) {
|
||||
result.push( name + '="' + value + '"' );
|
||||
}
|
||||
else {
|
||||
result.push( name );
|
||||
}
|
||||
}
|
||||
|
||||
return result.join( ' ' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspects the given options and fills out default
|
||||
* values for what's not defined.
|
||||
*/
|
||||
function getSlidifyOptions( options ) {
|
||||
|
||||
options = options || {};
|
||||
options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR;
|
||||
options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR;
|
||||
options.attributes = options.attributes || '';
|
||||
|
||||
return options;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for constructing a markdown slide.
|
||||
*/
|
||||
function createMarkdownSlide( content, options ) {
|
||||
|
||||
options = getSlidifyOptions( options );
|
||||
|
||||
var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) );
|
||||
|
||||
if( notesMatch.length === 2 ) {
|
||||
content = notesMatch[0] + '<aside class="notes">' + marked(notesMatch[1].trim()) + '</aside>';
|
||||
}
|
||||
|
||||
// prevent script end tags in the content from interfering
|
||||
// with parsing
|
||||
content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER );
|
||||
|
||||
return '<script type="text/template">' + content + '</script>';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a data string into multiple slides based
|
||||
* on the passed in separator arguments.
|
||||
*/
|
||||
function slidify( markdown, options ) {
|
||||
|
||||
options = getSlidifyOptions( options );
|
||||
|
||||
var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
|
||||
horizontalSeparatorRegex = new RegExp( options.separator );
|
||||
|
||||
var matches,
|
||||
lastIndex = 0,
|
||||
isHorizontal,
|
||||
wasHorizontal = true,
|
||||
content,
|
||||
sectionStack = [];
|
||||
|
||||
// iterate until all blocks between separators are stacked up
|
||||
while( matches = separatorRegex.exec( markdown ) ) {
|
||||
var notes = null;
|
||||
|
||||
// determine direction (horizontal by default)
|
||||
isHorizontal = horizontalSeparatorRegex.test( matches[0] );
|
||||
|
||||
if( !isHorizontal && wasHorizontal ) {
|
||||
// create vertical stack
|
||||
sectionStack.push( [] );
|
||||
}
|
||||
|
||||
// pluck slide content from markdown input
|
||||
content = markdown.substring( lastIndex, matches.index );
|
||||
|
||||
if( isHorizontal && wasHorizontal ) {
|
||||
// add to horizontal stack
|
||||
sectionStack.push( content );
|
||||
}
|
||||
else {
|
||||
// add to vertical stack
|
||||
sectionStack[sectionStack.length-1].push( content );
|
||||
}
|
||||
|
||||
lastIndex = separatorRegex.lastIndex;
|
||||
wasHorizontal = isHorizontal;
|
||||
}
|
||||
|
||||
// add the remaining slide
|
||||
( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) );
|
||||
|
||||
var markdownSections = '';
|
||||
|
||||
// flatten the hierarchical stack, and insert <section data-markdown> tags
|
||||
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
|
||||
// vertical
|
||||
if( sectionStack[i] instanceof Array ) {
|
||||
markdownSections += '<section '+ options.attributes +'>';
|
||||
|
||||
sectionStack[i].forEach( function( child ) {
|
||||
markdownSections += '<section data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
|
||||
} );
|
||||
|
||||
markdownSections += '</section>';
|
||||
}
|
||||
else {
|
||||
markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i], options ) + '</section>';
|
||||
}
|
||||
}
|
||||
|
||||
return markdownSections;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses any current data-markdown slides, splits
|
||||
* multi-slide markdown into separate sections and
|
||||
* handles loading of external markdown.
|
||||
*/
|
||||
function processSlides( scope ) {
|
||||
|
||||
return new Promise( function( resolve ) {
|
||||
|
||||
var externalPromises = [];
|
||||
|
||||
[].slice.call( scope.querySelectorAll( 'section[data-markdown]:not([data-markdown-parsed])') ).forEach( function( section, i ) {
|
||||
|
||||
if( section.getAttribute( 'data-markdown' ).length ) {
|
||||
|
||||
externalPromises.push( loadExternalMarkdown( section ).then(
|
||||
|
||||
// Finished loading external file
|
||||
function( xhr, url ) {
|
||||
section.outerHTML = slidify( xhr.responseText, {
|
||||
separator: section.getAttribute( 'data-separator' ),
|
||||
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
|
||||
notesSeparator: section.getAttribute( 'data-separator-notes' ),
|
||||
attributes: getForwardedAttributes( section )
|
||||
});
|
||||
},
|
||||
|
||||
// Failed to load markdown
|
||||
function( xhr, url ) {
|
||||
section.outerHTML = '<section data-state="alert">' +
|
||||
'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' +
|
||||
'Check your browser\'s JavaScript console for more details.' +
|
||||
'<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>' +
|
||||
'</section>';
|
||||
}
|
||||
|
||||
) );
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
section.outerHTML = slidify( getMarkdownFromSlide( section ), {
|
||||
separator: section.getAttribute( 'data-separator' ),
|
||||
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
|
||||
notesSeparator: section.getAttribute( 'data-separator-notes' ),
|
||||
attributes: getForwardedAttributes( section )
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Promise.all( externalPromises ).then( resolve );
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
function loadExternalMarkdown( section ) {
|
||||
|
||||
return new Promise( function( resolve, reject ) {
|
||||
|
||||
var xhr = new XMLHttpRequest(),
|
||||
url = section.getAttribute( 'data-markdown' );
|
||||
|
||||
var datacharset = section.getAttribute( 'data-charset' );
|
||||
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
|
||||
if( datacharset != null && datacharset != '' ) {
|
||||
xhr.overrideMimeType( 'text/html; charset=' + datacharset );
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function( section, xhr ) {
|
||||
if( xhr.readyState === 4 ) {
|
||||
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
|
||||
if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) {
|
||||
|
||||
resolve( xhr, url );
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
reject( xhr, url );
|
||||
|
||||
}
|
||||
}
|
||||
}.bind( this, section, xhr );
|
||||
|
||||
xhr.open( 'GET', url, true );
|
||||
|
||||
try {
|
||||
xhr.send();
|
||||
}
|
||||
catch ( e ) {
|
||||
console.warn( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
|
||||
resolve( xhr, url );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a node value has the attributes pattern.
|
||||
* If yes, extract it and add that value as one or several attributes
|
||||
* to the target element.
|
||||
*
|
||||
* You need Cache Killer on Chrome to see the effect on any FOM transformation
|
||||
* directly on refresh (F5)
|
||||
* http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277
|
||||
*/
|
||||
function addAttributeInElement( node, elementTarget, separator ) {
|
||||
|
||||
var mardownClassesInElementsRegex = new RegExp( separator, 'mg' );
|
||||
var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' );
|
||||
var nodeValue = node.nodeValue;
|
||||
var matches,
|
||||
matchesClass;
|
||||
if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) {
|
||||
|
||||
var classes = matches[1];
|
||||
nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex );
|
||||
node.nodeValue = nodeValue;
|
||||
while( matchesClass = mardownClassRegex.exec( classes ) ) {
|
||||
if( matchesClass[2] ) {
|
||||
elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
|
||||
} else {
|
||||
elementTarget.setAttribute( matchesClass[3], "" );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add attributes to the parent element of a text node,
|
||||
* or the element of an attribute node.
|
||||
*/
|
||||
function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
|
||||
|
||||
if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) {
|
||||
var previousParentElement = element;
|
||||
for( var i = 0; i < element.childNodes.length; i++ ) {
|
||||
var childElement = element.childNodes[i];
|
||||
if ( i > 0 ) {
|
||||
var j = i - 1;
|
||||
while ( j >= 0 ) {
|
||||
var aPreviousChildElement = element.childNodes[j];
|
||||
if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) {
|
||||
previousParentElement = aPreviousChildElement;
|
||||
break;
|
||||
}
|
||||
j = j - 1;
|
||||
}
|
||||
}
|
||||
var parentSection = section;
|
||||
if( childElement.nodeName == "section" ) {
|
||||
parentSection = childElement ;
|
||||
previousParentElement = childElement ;
|
||||
}
|
||||
if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) {
|
||||
addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( element.nodeType == Node.COMMENT_NODE ) {
|
||||
if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) {
|
||||
addAttributeInElement( element, section, separatorSectionAttributes );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts any current data-markdown slides in the
|
||||
* DOM to HTML.
|
||||
*/
|
||||
function convertSlides() {
|
||||
|
||||
var sections = deck.getRevealElement().querySelectorAll( '[data-markdown]:not([data-markdown-parsed])');
|
||||
|
||||
[].slice.call( sections ).forEach( function( section ) {
|
||||
|
||||
section.setAttribute( 'data-markdown-parsed', true )
|
||||
|
||||
var notes = section.querySelector( 'aside.notes' );
|
||||
var markdown = getMarkdownFromSlide( section );
|
||||
|
||||
section.innerHTML = marked( markdown );
|
||||
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
|
||||
section.getAttribute( 'data-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-attributes' ) ||
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
|
||||
|
||||
// If there were notes, we need to re-add them after
|
||||
// having overwritten the section's HTML
|
||||
if( notes ) {
|
||||
section.appendChild( notes );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
return Promise.resolve();
|
||||
|
||||
}
|
||||
|
||||
function escapeForHTML( input ) {
|
||||
|
||||
return input.replace( /([&<>'"])/g, char => HTML_ESCAPE_MAP[char] );
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
id: 'markdown',
|
||||
|
||||
/**
|
||||
* Starts processing and converting Markdown within the
|
||||
* current reveal.js deck.
|
||||
*/
|
||||
init: function( reveal ) {
|
||||
|
||||
deck = reveal;
|
||||
|
||||
let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown || {};
|
||||
|
||||
if( !renderer ) {
|
||||
renderer = new marked.Renderer();
|
||||
|
||||
renderer.code = ( code, language ) => {
|
||||
|
||||
// Off by default
|
||||
let lineNumbers = '';
|
||||
|
||||
// Users can opt in to show line numbers and highlight
|
||||
// specific lines.
|
||||
// ```javascript [] show line numbers
|
||||
// ```javascript [1,4-8] highlights lines 1 and 4-8
|
||||
if( CODE_LINE_NUMBER_REGEX.test( language ) ) {
|
||||
lineNumbers = language.match( CODE_LINE_NUMBER_REGEX )[1].trim();
|
||||
lineNumbers = `data-line-numbers="${lineNumbers}"`;
|
||||
language = language.replace( CODE_LINE_NUMBER_REGEX, '' ).trim();
|
||||
}
|
||||
|
||||
// Escape before this gets injected into the DOM to
|
||||
// avoid having the HTML parser alter our code before
|
||||
// highlight.js is able to read it
|
||||
code = escapeForHTML( code );
|
||||
|
||||
return `<pre><code ${lineNumbers} class="${language}">${code}</code></pre>`;
|
||||
};
|
||||
}
|
||||
|
||||
if( animateLists === true ) {
|
||||
renderer.listitem = text => `<li class="fragment">${text}</li>`;
|
||||
}
|
||||
|
||||
marked.setOptions( {
|
||||
renderer,
|
||||
...markedOptions
|
||||
} );
|
||||
|
||||
return processSlides( deck.getRevealElement() ).then( convertSlides );
|
||||
|
||||
},
|
||||
|
||||
// TODO: Do these belong in the API?
|
||||
processSlides: processSlides,
|
||||
convertSlides: convertSlides,
|
||||
slidify: slidify,
|
||||
marked: marked
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default Plugin;
|
96
.obsidian/plugins/obsidian-advanced-slides/plugin/math/katex.js
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* A plugin which enables rendering of math equations inside
|
||||
* of reveal.js slides. Essentially a thin wrapper for KaTeX.
|
||||
*
|
||||
* @author Hakim El Hattab
|
||||
* @author Gerhard Burger
|
||||
*/
|
||||
export const KaTeX = () => {
|
||||
let deck;
|
||||
|
||||
let defaultOptions = {
|
||||
version: 'latest',
|
||||
delimiters: [
|
||||
{left: '$$', right: '$$', display: true}, // Note: $$ has to come before $
|
||||
{left: '$', right: '$', display: false},
|
||||
{left: '\\(', right: '\\)', display: false},
|
||||
{left: '\\[', right: '\\]', display: true}
|
||||
],
|
||||
ignoredTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||
}
|
||||
|
||||
const loadCss = src => {
|
||||
let link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = src;
|
||||
document.head.appendChild(link);
|
||||
};
|
||||
|
||||
/**
|
||||
* Loads a JavaScript file and returns a Promise for when it is loaded
|
||||
* Credits: https://aaronsmith.online/easily-load-an-external-script-using-javascript/
|
||||
*/
|
||||
const loadScript = src => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script')
|
||||
script.type = 'text/javascript'
|
||||
script.onload = resolve
|
||||
script.onerror = reject
|
||||
script.src = src
|
||||
document.head.append(script)
|
||||
})
|
||||
};
|
||||
|
||||
async function loadScripts(urls) {
|
||||
for(const url of urls) {
|
||||
await loadScript(url);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
id: 'katex',
|
||||
|
||||
init: function (reveal) {
|
||||
|
||||
deck = reveal;
|
||||
|
||||
let revealOptions = deck.getConfig().katex || {};
|
||||
|
||||
let options = {...defaultOptions, ...revealOptions};
|
||||
const {local, version, extensions, ...katexOptions} = options;
|
||||
|
||||
let baseUrl = options.local || 'https://cdn.jsdelivr.net/npm/katex';
|
||||
let versionString = options.local ? '' : '@' + options.version;
|
||||
|
||||
let cssUrl = baseUrl + versionString + '/dist/katex.min.css';
|
||||
let katexUrl = baseUrl + versionString + '/dist/katex.min.js';
|
||||
let mhchemUrl = baseUrl + versionString + '/dist/contrib/mhchem.min.js'
|
||||
let karUrl = baseUrl + versionString + '/dist/contrib/auto-render.min.js';
|
||||
|
||||
let katexScripts = [katexUrl];
|
||||
if(options.extensions && options.extensions.includes("mhchem")) {
|
||||
katexScripts.push(mhchemUrl);
|
||||
}
|
||||
katexScripts.push(karUrl);
|
||||
|
||||
const renderMath = () => {
|
||||
renderMathInElement(reveal.getSlidesElement(), katexOptions);
|
||||
deck.layout();
|
||||
}
|
||||
|
||||
loadCss(cssUrl);
|
||||
|
||||
// For some reason dynamically loading with defer attribute doesn't result in the expected behavior, the below code does
|
||||
loadScripts(katexScripts).then(() => {
|
||||
if( deck.isReady() ) {
|
||||
renderMath();
|
||||
}
|
||||
else {
|
||||
deck.on( 'ready', renderMath.bind( this ) );
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/math.esm.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/math.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/a11y/assistive-mml.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/a11y/complexity.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/a11y/explorer.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/a11y/semantic-enrich.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/adaptors/liteDOM.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/core.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/asciimath.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/mml.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/mml/entities.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/mml/extensions/mml3.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex-base.js
vendored
Normal file
34
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex-full.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,o={669:function(t,a,o){Object.defineProperty(a,"__esModule",{value:!0}),a.ActionConfiguration=a.ActionMethods=void 0;var e=o(251),n=o(193),i=o(871),r=o(360);a.ActionMethods={},a.ActionMethods.Macro=r.default.Macro,a.ActionMethods.Toggle=function(t,a){for(var o,e=[];"\\endtoggle"!==(o=t.GetArgument(a));)e.push(new n.default(o,t.stack.env,t.configuration).mml());t.Push(t.create("node","maction",e,{actiontype:"toggle"}))},a.ActionMethods.Mathtip=function(t,a){var o=t.ParseArg(a),e=t.ParseArg(a);t.Push(t.create("node","maction",[o,e],{actiontype:"tooltip"}))},new i.CommandMap("action-macros",{toggle:"Toggle",mathtip:"Mathtip",texttip:["Macro","\\mathtip{#1}{\\text{#2}}",2]},a.ActionMethods),a.ActionConfiguration=e.Configuration.create("action",{handler:{macro:["action-macros"]}})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},193:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.TexParser.default},360:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.base.BaseMethods.default}},e={};function n(t){var a=e[t];if(void 0!==a)return a.exports;var i=e[t]={exports:{}};return o[t](i,i.exports,n),i.exports}t=n(955),a=n(669),(0,t.r8)({_:{input:{tex:{action:{ActionConfiguration:a}}}}})}();
|
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/ams.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/amscd.js
vendored
Normal file
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/bbox.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,e={133:function(t,a,e){Object.defineProperty(a,"__esModule",{value:!0}),a.BboxConfiguration=a.BboxMethods=void 0;var o=e(251),n=e(871),i=e(402);a.BboxMethods={},a.BboxMethods.BBox=function(t,a){for(var e,o,n,u=t.GetBrackets(a,""),l=t.ParseArg(a),x=u.split(/,/),M=0,c=x.length;M<c;M++){var s=x[M].trim(),f=s.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(f){if(e)throw new i.default("MultipleBBoxProperty","%1 specified twice in %2","Padding",a);var d=p(f[1]+f[3]);d&&(e={height:"+"+d,depth:"+"+d,lspace:d,width:"+"+2*parseInt(f[1],10)+f[3]})}else if(s.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)){if(o)throw new i.default("MultipleBBoxProperty","%1 specified twice in %2","Background",a);o=s}else if(s.match(/^[-a-z]+:/i)){if(n)throw new i.default("MultipleBBoxProperty","%1 specified twice in %2","Style",a);n=r(s)}else if(""!==s)throw new i.default("InvalidBBoxProperty",'"%1" doesn\'t look like a color, a padding dimension, or a style',s)}e&&(l=t.create("node","mpadded",[l],e)),(o||n)&&(e={},o&&Object.assign(e,{mathbackground:o}),n&&Object.assign(e,{style:n}),l=t.create("node","mstyle",[l],e)),t.Push(l)};var r=function(t){return t},p=function(t){return t};new n.CommandMap("bbox",{bbox:"BBox"},a.BboxMethods),a.BboxConfiguration=o.Configuration.create("bbox",{handler:{macro:["bbox"]}})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},402:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.TexError.default}},o={};function n(t){var a=o[t];if(void 0!==a)return a.exports;var i=o[t]={exports:{}};return e[t](i,i.exports,n),i.exports}t=n(955),a=n(133),(0,t.r8)({_:{input:{tex:{bbox:{BboxConfiguration:a}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,o={986:function(t,a,o){var e=this&&this.__values||function(t){var a="function"==typeof Symbol&&Symbol.iterator,o=a&&t[a],e=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(a,"__esModule",{value:!0}),a.BoldsymbolConfiguration=a.rewriteBoldTokens=a.createBoldToken=a.BoldsymbolMethods=void 0;var n=o(251),r=o(748),i=o(108),l=o(871),s=o(348),u={};function d(t,a,o,e){var n=s.NodeFactory.createToken(t,a,o,e);return"mtext"!==a&&t.configuration.parser.stack.env.boldsymbol&&(r.default.setProperty(n,"fixBold",!0),t.configuration.addNode("fixBold",n)),n}function x(t){var a,o;try{for(var n=e(t.data.getList("fixBold")),l=n.next();!l.done;l=n.next()){var s=l.value;if(r.default.getProperty(s,"fixBold")){var d=r.default.getAttribute(s,"mathvariant");null==d?r.default.setAttribute(s,"mathvariant",i.TexConstant.Variant.BOLD):r.default.setAttribute(s,"mathvariant",u[d]||d),r.default.removeProperties(s,"fixBold")}}}catch(t){a={error:t}}finally{try{l&&!l.done&&(o=n.return)&&o.call(n)}finally{if(a)throw a.error}}}u[i.TexConstant.Variant.NORMAL]=i.TexConstant.Variant.BOLD,u[i.TexConstant.Variant.ITALIC]=i.TexConstant.Variant.BOLDITALIC,u[i.TexConstant.Variant.FRAKTUR]=i.TexConstant.Variant.BOLDFRAKTUR,u[i.TexConstant.Variant.SCRIPT]=i.TexConstant.Variant.BOLDSCRIPT,u[i.TexConstant.Variant.SANSSERIF]=i.TexConstant.Variant.BOLDSANSSERIF,u["-tex-calligraphic"]="-tex-bold-calligraphic",u["-tex-oldstyle"]="-tex-bold-oldstyle",u["-tex-mathit"]=i.TexConstant.Variant.BOLDITALIC,a.BoldsymbolMethods={},a.BoldsymbolMethods.Boldsymbol=function(t,a){var o=t.stack.env.boldsymbol;t.stack.env.boldsymbol=!0;var e=t.ParseArg(a);t.stack.env.boldsymbol=o,t.Push(e)},new l.CommandMap("boldsymbol",{boldsymbol:"Boldsymbol"},a.BoldsymbolMethods),a.createBoldToken=d,a.rewriteBoldTokens=x,a.BoldsymbolConfiguration=n.Configuration.create("boldsymbol",{handler:{macro:["boldsymbol"]},nodes:{token:d},postprocessors:[x]})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},348:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.NodeFactory=MathJax._.input.tex.NodeFactory.NodeFactory},748:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.NodeUtil.default},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},108:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.TexConstant=MathJax._.input.tex.TexConstants.TexConstant}},e={};function n(t){var a=e[t];if(void 0!==a)return a.exports;var r=e[t]={exports:{}};return o[t].call(r.exports,r,r.exports,n),r.exports}t=n(955),a=n(986),(0,t.r8)({_:{input:{tex:{boldsymbol:{BoldsymbolConfiguration:a}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,e={774:function(t,a,e){Object.defineProperty(a,"__esModule",{value:!0}),a.CancelConfiguration=a.CancelMethods=void 0;var n=e(251),o=e(108),i=e(871),c=e(398),r=e(975);a.CancelMethods={},a.CancelMethods.Cancel=function(t,a,e){var n=t.GetBrackets(a,""),o=t.ParseArg(a),i=c.default.keyvalOptions(n,r.ENCLOSE_OPTIONS);i.notation=e,t.Push(t.create("node","menclose",[o],i))},a.CancelMethods.CancelTo=function(t,a){var e=t.GetBrackets(a,""),n=t.ParseArg(a),i=t.ParseArg(a),l=c.default.keyvalOptions(e,r.ENCLOSE_OPTIONS);l.notation=[o.TexConstant.Notation.UPDIAGONALSTRIKE,o.TexConstant.Notation.UPDIAGONALARROW,o.TexConstant.Notation.NORTHEASTARROW].join(" "),n=t.create("node","mpadded",[n],{depth:"-.1em",height:"+.1em",voffset:".1em"}),t.Push(t.create("node","msup",[t.create("node","menclose",[i],l),n]))},new i.CommandMap("cancel",{cancel:["Cancel",o.TexConstant.Notation.UPDIAGONALSTRIKE],bcancel:["Cancel",o.TexConstant.Notation.DOWNDIAGONALSTRIKE],xcancel:["Cancel",o.TexConstant.Notation.UPDIAGONALSTRIKE+" "+o.TexConstant.Notation.DOWNDIAGONALSTRIKE],cancelto:"CancelTo"},a.CancelMethods),a.CancelConfiguration=n.Configuration.create("cancel",{handler:{macro:["cancel"]}})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},398:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.ParseUtil.default},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},108:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.TexConstant=MathJax._.input.tex.TexConstants.TexConstant},975:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.ENCLOSE_OPTIONS=MathJax._.input.tex.enclose.EncloseConfiguration.ENCLOSE_OPTIONS,a.EncloseMethods=MathJax._.input.tex.enclose.EncloseConfiguration.EncloseMethods,a.EncloseConfiguration=MathJax._.input.tex.enclose.EncloseConfiguration.EncloseConfiguration}},n={};function o(t){var a=n[t];if(void 0!==a)return a.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,o),i.exports}t=o(955),a=o(774),(0,t.r8)({_:{input:{tex:{cancel:{CancelConfiguration:a}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e,t,a={286:function(e,t,a){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.CenternotConfiguration=t.filterCenterOver=void 0;var r=a(251),o=a(193),i=a(748),u=a(871),l=a(360);function p(e){var t,a,r=e.data;try{for(var o=n(r.getList("centerOver")),u=o.next();!u.done;u=o.next()){var l=u.value,p=i.default.getTexClass(l.childNodes[0].childNodes[0]);null!==p&&i.default.setProperties(l.parent.parent.parent.parent.parent.parent,{texClass:p})}}catch(e){t={error:e}}finally{try{u&&!u.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}}new u.CommandMap("centernot",{centerOver:"CenterOver",centernot:["Macro","\\centerOver{#1}{{\u29f8}}",1]},{CenterOver:function(e,t){var a="{"+e.GetArgument(t)+"}",n=e.ParseArg(t),r=new o.default(a,e.stack.env,e.configuration).mml(),i=e.create("node","TeXAtom",[new o.default(a,e.stack.env,e.configuration).mml(),e.create("node","mpadded",[e.create("node","mpadded",[n],{width:0,lspace:"-.5width"}),e.create("node","mphantom",[r])],{width:0,lspace:"-.5width"})]);e.configuration.addNode("centerOver",r),e.Push(i)},Macro:l.default.Macro}),t.filterCenterOver=p,t.CenternotConfiguration=r.Configuration.create("centernot",{handler:{macro:["centernot"]},postprocessors:[p]})},955:function(e,t){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,t.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=MathJax._.input.tex.Configuration.Configuration,t.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,t.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},748:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=MathJax._.input.tex.NodeUtil.default},871:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,t.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,t.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,t.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,t.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,t.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,t.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,t.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},193:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=MathJax._.input.tex.TexParser.default},360:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=MathJax._.input.tex.base.BaseMethods.default}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return a[e].call(o.exports,o,o.exports,r),o.exports}e=r(955),t=r(286),(0,e.r8)({_:{input:{tex:{centernot:{CenternotConfiguration:t}}}}})}();
|
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/color.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var o,a,t={888:function(o,a,t){Object.defineProperty(a,"__esModule",{value:!0}),a.ColorConfiguration=a.ColorV2Methods=void 0;var n=t(871),e=t(251);a.ColorV2Methods={Color:function(o,a){var t=o.GetArgument(a),n=o.stack.env.color;o.stack.env.color=t;var e=o.ParseArg(a);n?o.stack.env.color=n:delete o.stack.env.color;var r=o.create("node","mstyle",[e],{mathcolor:t});o.Push(r)}},new n.CommandMap("colorv2",{color:"Color"},a.ColorV2Methods),a.ColorConfiguration=e.Configuration.create("colorv2",{handler:{macro:["colorv2"]}})},955:function(o,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(o,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(o,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap}},n={};function e(o){var a=n[o];if(void 0!==a)return a.exports;var r=n[o]={exports:{}};return t[o](r,r.exports,e),r.exports}o=e(955),a=e(888),(0,o.r8)({_:{input:{tex:{colorv2:{ColorV2Configuration:a}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,e={359:function(t,a,e){var n,o=this&&this.__values||function(t){var a="function"==typeof Symbol&&Symbol.iterator,e=a&&t[a],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(a,"__esModule",{value:!0}),a.ConfigMacrosConfiguration=void 0;var i=e(251),r=e(74),p=e(871),l=e(945),s=e(924),u=e(432),c=e(975),M="configmacros-map",f="configmacros-env-map";a.ConfigMacrosConfiguration=i.Configuration.create("configmacros",{init:function(t){new p.CommandMap(M,{},{}),new p.EnvironmentMap(f,l.default.environment,{},{}),t.append(i.Configuration.local({handler:{macro:[M],environment:[f]},priority:3}))},config:function(t,a){!function(t){var a,e,n=t.parseOptions.handlers.retrieve(M),i=t.parseOptions.options.macros;try{for(var r=o(Object.keys(i)),p=r.next();!p.done;p=r.next()){var l=p.value,c="string"==typeof i[l]?[i[l]]:i[l],f=Array.isArray(c[2])?new s.Macro(l,u.default.MacroWithTemplate,c.slice(0,2).concat(c[2])):new s.Macro(l,u.default.Macro,c);n.add(l,f)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}}(a),function(t){var a,e,n=t.parseOptions.handlers.retrieve(f),i=t.parseOptions.options.environments;try{for(var r=o(Object.keys(i)),p=r.next();!p.done;p=r.next()){var l=p.value;n.add(l,new s.Macro(l,u.default.BeginEnv,[!0].concat(i[l])))}}catch(t){a={error:t}}finally{try{p&&!p.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}}(a)},items:(n={},n[c.BeginEnvItem.prototype.kind]=c.BeginEnvItem,n),options:{macros:r.expandable({}),environments:r.expandable({})}})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},74:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.isObject=MathJax._.util.Options.isObject,a.APPEND=MathJax._.util.Options.APPEND,a.REMOVE=MathJax._.util.Options.REMOVE,a.OPTIONS=MathJax._.util.Options.OPTIONS,a.Expandable=MathJax._.util.Options.Expandable,a.expandable=MathJax._.util.Options.expandable,a.makeArray=MathJax._.util.Options.makeArray,a.keys=MathJax._.util.Options.keys,a.copy=MathJax._.util.Options.copy,a.insert=MathJax._.util.Options.insert,a.defaultOptions=MathJax._.util.Options.defaultOptions,a.userOptions=MathJax._.util.Options.userOptions,a.selectOptions=MathJax._.util.Options.selectOptions,a.selectOptionsFromKeys=MathJax._.util.Options.selectOptionsFromKeys,a.separateOptions=MathJax._.util.Options.separateOptions,a.lookup=MathJax._.util.Options.lookup},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},945:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.ParseMethods.default},924:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Symbol=MathJax._.input.tex.Symbol.Symbol,a.Macro=MathJax._.input.tex.Symbol.Macro},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},975:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.BeginEnvItem=MathJax._.input.tex.newcommand.NewcommandItems.BeginEnvItem},432:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.newcommand.NewcommandMethods.default}},n={};function o(t){var a=n[t];if(void 0!==a)return a.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,o),i.exports}t=o(955),a=o(359),(0,t.r8)({_:{input:{tex:{configmacros:{ConfigMacrosConfiguration:a}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var a,t,e={272:function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.EncloseConfiguration=t.EncloseMethods=t.ENCLOSE_OPTIONS=void 0;var o=e(251),n=e(871),r=e(398);t.ENCLOSE_OPTIONS={"data-arrowhead":1,color:1,mathcolor:1,background:1,mathbackground:1,"data-padding":1,"data-thickness":1},t.EncloseMethods={},t.EncloseMethods.Enclose=function(a,e){var o=a.GetArgument(e).replace(/,/g," "),n=a.GetBrackets(e,""),i=a.ParseArg(e),l=r.default.keyvalOptions(n,t.ENCLOSE_OPTIONS);l.notation=o,a.Push(a.create("node","menclose",[i],l))},new n.CommandMap("enclose",{enclose:"Enclose"},t.EncloseMethods),t.EncloseConfiguration=o.Configuration.create("enclose",{handler:{macro:["enclose"]}})},955:function(a,t){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,t.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=MathJax._.input.tex.Configuration.Configuration,t.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,t.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},398:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=MathJax._.input.tex.ParseUtil.default},871:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,t.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,t.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,t.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,t.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,t.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,t.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,t.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap}},o={};function n(a){var t=o[a];if(void 0!==t)return t.exports;var r=o[a]={exports:{}};return e[a](r,r.exports,n),r.exports}a=n(955),t=n(272),(0,a.r8)({_:{input:{tex:{enclose:{EncloseConfiguration:t}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,e,a={646:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.ExtpfeilConfiguration=e.ExtpfeilMethods=void 0;var o=a(251),n=a(871),r=a(939),i=a(892),u=a(417),x=a(402);e.ExtpfeilMethods={},e.ExtpfeilMethods.xArrow=r.AmsMethods.xArrow,e.ExtpfeilMethods.NewExtArrow=function(t,a){var o=t.GetArgument(a),n=t.GetArgument(a),r=t.GetArgument(a);if(!o.match(/^\\([a-z]+|.)$/i))throw new x.default("NewextarrowArg1","First argument to %1 must be a control sequence name",a);if(!n.match(/^(\d+),(\d+)$/))throw new x.default("NewextarrowArg2","Second argument to %1 must be two integers separated by a comma",a);if(!r.match(/^(\d+|0x[0-9A-F]+)$/i))throw new x.default("NewextarrowArg3","Third argument to %1 must be a unicode character number",a);o=o.substr(1);var u=n.split(",");i.default.addMacro(t,o,e.ExtpfeilMethods.xArrow,[parseInt(r),parseInt(u[0]),parseInt(u[1])])},new n.CommandMap("extpfeil",{xtwoheadrightarrow:["xArrow",8608,12,16],xtwoheadleftarrow:["xArrow",8606,17,13],xmapsto:["xArrow",8614,6,7],xlongequal:["xArrow",61,7,7],xtofrom:["xArrow",8644,12,12],Newextarrow:"NewExtArrow"},e.ExtpfeilMethods);e.ExtpfeilConfiguration=o.Configuration.create("extpfeil",{handler:{macro:["extpfeil"]},init:function(t){u.NewcommandConfiguration.init(t)}})},955:function(t,e){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,e.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=MathJax._.input.tex.Configuration.Configuration,e.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,e.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,e.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,e.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,e.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,e.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,e.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,e.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,e.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},402:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=MathJax._.input.tex.TexError.default},939:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AmsMethods=MathJax._.input.tex.ams.AmsMethods.AmsMethods,e.NEW_OPS=MathJax._.input.tex.ams.AmsMethods.NEW_OPS},417:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.NewcommandConfiguration=MathJax._.input.tex.newcommand.NewcommandConfiguration.NewcommandConfiguration},892:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=MathJax._.input.tex.newcommand.NewcommandUtil.default}},o={};function n(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return a[t](r,r.exports,n),r.exports}t=n(955),e=n(646),(0,t.r8)({_:{input:{tex:{extpfeil:{ExtpfeilConfiguration:e}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var a,t,n={82:function(a,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.GensymbConfiguration=void 0;var e=n(251),o=n(108);new(n(871).CharacterMap)("gensymb-symbols",(function(a,t){var n=t.attributes||{};n.mathvariant=o.TexConstant.Variant.NORMAL,n.class="MathML-Unit";var e=a.create("token","mi",n,t.char);a.Push(e)}),{ohm:"\u2126",degree:"\xb0",celsius:"\u2103",perthousand:"\u2030",micro:"\xb5"}),t.GensymbConfiguration=e.Configuration.create("gensymb",{handler:{macro:["gensymb-symbols"]}})},955:function(a,t){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,t.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=MathJax._.input.tex.Configuration.Configuration,t.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,t.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,t.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,t.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,t.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,t.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,t.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,t.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,t.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},108:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TexConstant=MathJax._.input.tex.TexConstants.TexConstant}},e={};function o(a){var t=e[a];if(void 0!==t)return t.exports;var i=e[a]={exports:{}};return n[a](i,i.exports,o),i.exports}a=o(955),t=o(82),(0,a.r8)({_:{input:{tex:{gensymb:{GensymbConfiguration:t}}}}})}();
|
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/html.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,e,n={738:function(t,a,e){Object.defineProperty(a,"__esModule",{value:!0}),a.HtmlConfiguration=void 0;var n=e(251),r=e(871),o=e(248);new r.CommandMap("html_macros",{href:"Href",class:"Class",style:"Style",cssId:"Id"},o.default),a.HtmlConfiguration=n.Configuration.create("html",{handler:{macro:["html_macros"]}})},248:function(t,a,e){Object.defineProperty(a,"__esModule",{value:!0});var n=e(748),r={Href:function(t,a){var e=t.GetArgument(a),r=o(t,a);n.default.setAttribute(r,"href",e),t.Push(r)},Class:function(t,a){var e=t.GetArgument(a),r=o(t,a),i=n.default.getAttribute(r,"class");i&&(e=i+" "+e),n.default.setAttribute(r,"class",e),t.Push(r)},Style:function(t,a){var e=t.GetArgument(a),r=o(t,a),i=n.default.getAttribute(r,"style");i&&(";"!==e.charAt(e.length-1)&&(e+=";"),e=i+" "+e),n.default.setAttribute(r,"style",e),t.Push(r)},Id:function(t,a){var e=t.GetArgument(a),r=o(t,a);n.default.setAttribute(r,"id",e),t.Push(r)}},o=function(t,a){var e=t.ParseArg(a);if(!n.default.isInferred(e))return e;var r=n.default.getChildren(e);if(1===r.length)return r[0];var o=t.create("node","mrow");return n.default.copyChildren(e,o),n.default.copyAttributes(e,o),o};a.default=r},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},748:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.NodeUtil.default},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap}},r={};function o(t){var a=r[t];if(void 0!==a)return a.exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}t=o(955),a=o(738),e=o(248),(0,t.r8)({_:{input:{tex:{html:{HtmlConfiguration:a,HtmlMethods:e}}}}})}();
|
34
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/mhchem.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var o,n,r={634:function(o,n,r){Object.defineProperty(n,"__esModule",{value:!0}),n.NoErrorsConfiguration=void 0;var t=r(251);n.NoErrorsConfiguration=t.Configuration.create("noerrors",{nodes:{error:function(o,n,r,t){var e=o.create("token","mtext",{},t.replace(/\n/g," "));return o.create("node","merror",[e],{"data-mjx-error":n,title:n})}}})},955:function(o,n){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,n.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(o,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Configuration=MathJax._.input.tex.Configuration.Configuration,n.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,n.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration}},t={};function e(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return r[o](a,a.exports,e),a.exports}o=e(955),n=e(634),(0,o.r8)({_:{input:{tex:{noerrors:{NoErrorsConfiguration:n}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n,o,t={999:function(n,o,t){var e=this&&this.__values||function(n){var o="function"==typeof Symbol&&Symbol.iterator,t=o&&n[o],e=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.NoUndefinedConfiguration=void 0;var r=t(251);o.NoUndefinedConfiguration=r.Configuration.create("noundefined",{fallback:{macro:function(n,o){var t,r,i=n.create("text","\\"+o),a=n.options.noundefined||{},u={};try{for(var f=e(["color","background","size"]),l=f.next();!l.done;l=f.next()){var c=l.value;a[c]&&(u["math"+c]=a[c])}}catch(n){t={error:n}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}n.Push(n.create("node","mtext",[],u,i))}},options:{noundefined:{color:"red",background:"",size:""}},priority:3})},955:function(n,o){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,o.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Configuration=MathJax._.input.tex.Configuration.Configuration,o.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,o.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}n=r(955),o=r(999),(0,n.r8)({_:{input:{tex:{noundefined:{NoUndefinedConfiguration:o}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,o,n={941:function(t,o,n){var a,r=this&&this.__extends||(a=function(t,o){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}a(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)});Object.defineProperty(o,"__esModule",{value:!0}),o.TagFormatConfiguration=o.tagformatConfig=void 0;var e=n(251),i=n(680),s=0;function u(t,o){var n=o.parseOptions.options.tags;"base"!==n&&t.tags.hasOwnProperty(n)&&i.TagsFactory.add(n,t.tags[n]);var a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype.formatNumber=function(t){return o.parseOptions.options.tagformat.number(t)},n.prototype.formatTag=function(t){return o.parseOptions.options.tagformat.tag(t)},n.prototype.formatId=function(t){return o.parseOptions.options.tagformat.id(t)},n.prototype.formatUrl=function(t,n){return o.parseOptions.options.tagformat.url(t,n)},n}(i.TagsFactory.create(o.parseOptions.options.tags).constructor),e="configTags-"+ ++s;i.TagsFactory.add(e,a),o.parseOptions.options.tags=e}o.tagformatConfig=u,o.TagFormatConfiguration=e.Configuration.create("tagformat",{config:[u,10],options:{tagformat:{number:function(t){return t.toString()},tag:function(t){return"("+t+")"},id:function(t){return"mjx-eqn:"+t.replace(/\s/g,"_")},url:function(t,o){return o+"#"+encodeURIComponent(t)}}}})},955:function(t,o){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,o.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Configuration=MathJax._.input.tex.Configuration.Configuration,o.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,o.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},680:function(t,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Label=MathJax._.input.tex.Tags.Label,o.TagInfo=MathJax._.input.tex.Tags.TagInfo,o.AbstractTags=MathJax._.input.tex.Tags.AbstractTags,o.NoTags=MathJax._.input.tex.Tags.NoTags,o.AllTags=MathJax._.input.tex.Tags.AllTags,o.TagsFactory=MathJax._.input.tex.Tags.TagsFactory}},a={};function r(t){var o=a[t];if(void 0!==o)return o.exports;var e=a[t]={exports:{}};return n[t].call(e.exports,e,e.exports,r),e.exports}t=r(955),o=r(941),(0,t.r8)({_:{input:{tex:{tagformat:{TagFormatConfiguration:o}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,e,a={376:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeConfiguration=e.UnicodeMethods=void 0;var n=a(251),o=a(402),i=a(871),r=a(398),u=a(748),l=a(992);e.UnicodeMethods={};var c={};e.UnicodeMethods.Unicode=function(t,e){var a=t.GetBrackets(e),n=null,i=null;a&&(a.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)?(n=a.replace(/ /g,"").split(/,/),i=t.GetBrackets(e)):i=a);var p=r.default.trimSpaces(t.GetArgument(e)).replace(/^0x/,"x");if(!p.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/))throw new o.default("BadUnicode","Argument to \\unicode must be a number");var M=parseInt(p.match(/^x/)?"0"+p:p);c[M]?i||(i=c[M][2]):c[M]=[800,200,i,M],n&&(c[M][0]=Math.floor(1e3*parseFloat(n[0])),c[M][1]=Math.floor(1e3*parseFloat(n[1])));var d=t.stack.env.font,s={};i?(c[M][2]=s.fontfamily=i.replace(/'/g,"'"),d&&(d.match(/bold/)&&(s.fontweight="bold"),d.match(/italic|-mathit/)&&(s.fontstyle="italic"))):d&&(s.mathvariant=d);var x=t.create("token","mtext",s,l.numeric(p));u.default.setProperty(x,"unicode",!0),t.Push(x)},new i.CommandMap("unicode",{unicode:"Unicode"},e.UnicodeMethods),e.UnicodeConfiguration=n.Configuration.create("unicode",{handler:{macro:["unicode"]}})},955:function(t,e){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,e.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},992:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.options=MathJax._.util.Entities.options,e.entities=MathJax._.util.Entities.entities,e.add=MathJax._.util.Entities.add,e.remove=MathJax._.util.Entities.remove,e.translate=MathJax._.util.Entities.translate,e.numeric=MathJax._.util.Entities.numeric},251:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=MathJax._.input.tex.Configuration.Configuration,e.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,e.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},748:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=MathJax._.input.tex.NodeUtil.default},398:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=MathJax._.input.tex.ParseUtil.default},871:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,e.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,e.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,e.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,e.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,e.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,e.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,e.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},402:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=MathJax._.input.tex.TexError.default}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return a[t](i,i.exports,o),i.exports}t=o(955),e=o(376),(0,t.r8)({_:{input:{tex:{unicode:{UnicodeConfiguration:e}}}}})}();
|
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var a,t,p={927:function(a,t,p){Object.defineProperty(t,"__esModule",{value:!0}),t.UpgreekConfiguration=void 0;var e=p(251),n=p(871),o=p(108);new n.CharacterMap("upgreek",(function(a,t){var p=t.attributes||{};p.mathvariant=o.TexConstant.Variant.NORMAL;var e=a.create("token","mi",p,t.char);a.Push(e)}),{upalpha:"\u03b1",upbeta:"\u03b2",upgamma:"\u03b3",updelta:"\u03b4",upepsilon:"\u03f5",upzeta:"\u03b6",upeta:"\u03b7",uptheta:"\u03b8",upiota:"\u03b9",upkappa:"\u03ba",uplambda:"\u03bb",upmu:"\u03bc",upnu:"\u03bd",upxi:"\u03be",upomicron:"\u03bf",uppi:"\u03c0",uprho:"\u03c1",upsigma:"\u03c3",uptau:"\u03c4",upupsilon:"\u03c5",upphi:"\u03d5",upchi:"\u03c7",uppsi:"\u03c8",upomega:"\u03c9",upvarepsilon:"\u03b5",upvartheta:"\u03d1",upvarpi:"\u03d6",upvarrho:"\u03f1",upvarsigma:"\u03c2",upvarphi:"\u03c6",Upgamma:"\u0393",Updelta:"\u0394",Uptheta:"\u0398",Uplambda:"\u039b",Upxi:"\u039e",Uppi:"\u03a0",Upsigma:"\u03a3",Upupsilon:"\u03a5",Upphi:"\u03a6",Uppsi:"\u03a8",Upomega:"\u03a9"}),t.UpgreekConfiguration=e.Configuration.create("upgreek",{handler:{macro:["upgreek"]}})},955:function(a,t){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,t.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=MathJax._.input.tex.Configuration.Configuration,t.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,t.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,t.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,t.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,t.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,t.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,t.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,t.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,t.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},108:function(a,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TexConstant=MathJax._.input.tex.TexConstants.TexConstant}},e={};function n(a){var t=e[a];if(void 0!==t)return t.exports;var o=e[a]={exports:{}};return p[a](o,o.exports,n),o.exports}a=n(955),t=n(927),(0,a.r8)({_:{input:{tex:{upgreek:{UpgreekConfiguration:t}}}}})}();
|
1
.obsidian/plugins/obsidian-advanced-slides/plugin/math/mathjax/input/tex/extensions/verb.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,a,e={768:function(t,a,e){Object.defineProperty(a,"__esModule",{value:!0}),a.VerbConfiguration=a.VerbMethods=void 0;var n=e(251),o=e(108),r=e(871),i=e(402);a.VerbMethods={},a.VerbMethods.Verb=function(t,a){var e=t.GetNext(),n=++t.i;if(""===e)throw new i.default("MissingArgFor","Missing argument for %1",a);for(;t.i<t.string.length&&t.string.charAt(t.i)!==e;)t.i++;if(t.i===t.string.length)throw new i.default("NoClosingDelim","Can't find closing delimiter for %1",t.currentCS);var r=t.string.slice(n,t.i).replace(/ /g,"\xa0");t.i++,t.Push(t.create("token","mtext",{mathvariant:o.TexConstant.Variant.MONOSPACE},r))},new r.CommandMap("verb",{verb:"Verb"},a.VerbMethods),a.VerbConfiguration=n.Configuration.create("verb",{handler:{macro:["verb"]}})},955:function(t,a){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,a.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Configuration=MathJax._.input.tex.Configuration.Configuration,a.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,a.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration},871:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.AbstractSymbolMap=MathJax._.input.tex.SymbolMap.AbstractSymbolMap,a.RegExpMap=MathJax._.input.tex.SymbolMap.RegExpMap,a.AbstractParseMap=MathJax._.input.tex.SymbolMap.AbstractParseMap,a.CharacterMap=MathJax._.input.tex.SymbolMap.CharacterMap,a.DelimiterMap=MathJax._.input.tex.SymbolMap.DelimiterMap,a.MacroMap=MathJax._.input.tex.SymbolMap.MacroMap,a.CommandMap=MathJax._.input.tex.SymbolMap.CommandMap,a.EnvironmentMap=MathJax._.input.tex.SymbolMap.EnvironmentMap},108:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.TexConstant=MathJax._.input.tex.TexConstants.TexConstant},402:function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=MathJax._.input.tex.TexError.default}},n={};function o(t){var a=n[t];if(void 0!==a)return a.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}t=o(955),a=o(768),(0,t.r8)({_:{input:{tex:{verb:{VerbConfiguration:a}}}}})}();
|