Added course's notes
This commit is contained in:
1 parent
e07993262c
commit
dcd2c072ae
191 files changed
+42866
-12
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,156 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 230" width="760" height="230"
|
||||
role="img" aria-labelledby="dc-title">
|
||||
<title id="dc-title">Die prozedurale Fassung: in einem einzigen main() wird IO.readln() aufgerufen, dessen Ergebnis an rot13() übergeben und dieses Ergebnis an IO.println(). Ein Thread, ein Prozess, drei direkte Aufrufe.</title>
|
||||
<style><![CDATA[
|
||||
/* figures/diagram.css -- shared look of every built figure.
|
||||
*
|
||||
* build-figures.py drops this file into the style element of every built
|
||||
* svg, so a figure carries its own styling and stays self-contained.
|
||||
* Classes, not per-element fills, do the work: one edit here restyles the
|
||||
* whole book.
|
||||
*
|
||||
* The palette is theme.scss's: teal #20666f for structure, amber #8a5a08 for
|
||||
* the warning accent, ink #1b2430 for text, IBM Plex to match the page.
|
||||
*
|
||||
* Dark theme: the @media block follows the reader's system setting. librsvg
|
||||
* ignores media queries when it makes the pdf, so print always gets the light
|
||||
* theme -- which is what a printed page wants.
|
||||
*/
|
||||
|
||||
svg {
|
||||
font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
|
||||
/* the figure sits on the page, not on a white card of its own */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ---- surfaces ------------------------------------------------------- */
|
||||
|
||||
.box { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-weak { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-accent { fill: #e5eff1; stroke: #20666f; stroke-width: 1.8; }
|
||||
.box-warn { fill: #f8f1e0; stroke: #8a5a08; stroke-width: 1.4; }
|
||||
.box-plain { fill: #fbfcfd; stroke: #dae0e8; stroke-width: 1.2; }
|
||||
.diamond { fill: #e5eff1; stroke: #20666f; stroke-width: 1.4; }
|
||||
.ellipse { fill: #fbfcfd; stroke: #5a6879; stroke-width: 1.2; }
|
||||
|
||||
/* ---- lines ---------------------------------------------------------- */
|
||||
|
||||
.edge { fill: none; stroke: #5a6879; stroke-width: 1.3; }
|
||||
.edge-strong{ fill: none; stroke: #20666f; stroke-width: 1.8; }
|
||||
.edge-warn { fill: none; stroke: #8a5a08; stroke-width: 1.6; }
|
||||
.edge-dash { fill: none; stroke: #5a6879; stroke-width: 1.2; stroke-dasharray: 5 3; }
|
||||
.rule { stroke: #dae0e8; stroke-width: 1; }
|
||||
|
||||
/* ---- text ----------------------------------------------------------- */
|
||||
|
||||
.t { fill: #1b2430; font-size: 13px; }
|
||||
.t-sm { fill: #1b2430; font-size: 11px; }
|
||||
.t-lead { fill: #1b2430; font-size: 14px; font-weight: 600; }
|
||||
.t-mut { fill: #5a6879; font-size: 11px; }
|
||||
.t-key { fill: #1b2430; font-size: 12px; text-decoration: underline; }
|
||||
.t-accent { fill: #20666f; font-size: 12px; font-weight: 600; }
|
||||
.t-warn { fill: #8a5a08; font-size: 12px; font-weight: 600; }
|
||||
.t-mono { fill: #1b2430; font-size: 11.5px;
|
||||
font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }
|
||||
|
||||
.mid { text-anchor: middle; }
|
||||
.end { text-anchor: end; }
|
||||
|
||||
/* ---- interaction ====================================================
|
||||
* A .node groups one box with its labels. Hovering it lifts the whole group
|
||||
* a little, which is enough to follow a path through a busy diagram without
|
||||
* any script. Pointer events stay off the decorative layers so the hover
|
||||
* target is the shape itself.
|
||||
*/
|
||||
|
||||
.node { transition: opacity .12s ease; }
|
||||
.node:hover .box,
|
||||
.node:hover .box-accent,
|
||||
.node:hover .diamond { stroke-width: 2.6; }
|
||||
.node:hover .t, .node:hover .t-lead { fill: #20666f; }
|
||||
|
||||
svg:hover .node:not(:hover) { opacity: .55; }
|
||||
|
||||
/* a figure that marks no nodes must not dim on hover */
|
||||
svg:not(:has(.node)) .node { opacity: 1; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.node { transition: none; }
|
||||
}
|
||||
|
||||
/* ---- dark theme ------------------------------------------------------ */
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.box { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-weak { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-accent { fill: #24363d; stroke: #4c9aa5; }
|
||||
.box-warn { fill: #332a18; stroke: #c99a3a; }
|
||||
.box-plain { fill: #161b22; stroke: #30363d; }
|
||||
.diamond { fill: #24363d; stroke: #4c9aa5; }
|
||||
.ellipse { fill: #161b22; stroke: #8b98a8; }
|
||||
|
||||
.edge { stroke: #8b98a8; }
|
||||
.edge-strong{ stroke: #4c9aa5; }
|
||||
.edge-warn { stroke: #c99a3a; }
|
||||
.edge-dash { stroke: #8b98a8; }
|
||||
.rule { stroke: #30363d; }
|
||||
|
||||
.t, .t-sm, .t-lead, .t-key, .t-mono { fill: #e6edf3; }
|
||||
.t-mut { fill: #8b98a8; }
|
||||
.t-accent { fill: #4c9aa5; }
|
||||
.t-warn { fill: #c99a3a; }
|
||||
|
||||
.node:hover .t, .node:hover .t-lead { fill: #7fc4cf; }
|
||||
|
||||
.arrow { fill: #8b98a8; }
|
||||
.arrow-strong { fill: #4c9aa5; }
|
||||
.arrow-warn { fill: #c99a3a; }
|
||||
}
|
||||
|
||||
/* ---- arrowheads ======================================================
|
||||
* marker contents cannot inherit the referencing element's fill, so each
|
||||
* arrowhead is its own class and is themed alongside the line it ends.
|
||||
*/
|
||||
|
||||
.arrow { fill: #5a6879; }
|
||||
.arrow-strong { fill: #20666f; }
|
||||
.arrow-warn { fill: #8a5a08; }
|
||||
|
||||
]]></style>
|
||||
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5"
|
||||
markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
||||
<path class="arrow" d="M0,0 L10,5 L0,10 z"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<!-- everything happens inside one main(), on one thread -->
|
||||
<rect class="box-plain" x="14" y="16" width="732" height="126" rx="4"/>
|
||||
<text class="t-mut" data-label="frame" x="26" y="36">ein Prozess · ein Thread · ein main()</text>
|
||||
|
||||
<g class="node" data-flow-node="read">
|
||||
<rect class="box" x="40" y="58" width="170" height="52" rx="3"/>
|
||||
<text class="t-mono mid" data-label="read" x="125" y="90">IO.readln()</text>
|
||||
</g>
|
||||
|
||||
<path class="edge" data-flow="1" data-flow-to="rot" d="M210,84 H298" marker-end="url(#a)"/>
|
||||
<text class="t-accent mid" data-label="call1" x="254" y="72">Aufruf</text>
|
||||
|
||||
<g class="node" data-flow-node="rot">
|
||||
<rect class="box" x="300" y="58" width="170" height="52" rx="3"/>
|
||||
<text class="t-mono mid" data-label="rot" x="385" y="90">rot13(text)</text>
|
||||
</g>
|
||||
|
||||
<path class="edge" data-flow="2" data-flow-to="print" d="M470,84 H558" marker-end="url(#a)"/>
|
||||
<text class="t-accent mid" data-label="call2" x="514" y="72">Aufruf</text>
|
||||
|
||||
<g class="node" data-flow-node="print">
|
||||
<rect class="box" x="560" y="58" width="170" height="52" rx="3"/>
|
||||
<text class="t-mono mid" data-label="print" x="645" y="90">IO.println(…)</text>
|
||||
</g>
|
||||
|
||||
<!-- who knows whom -->
|
||||
<text class="t-sm" data-label="knows" x="14" y="176">main() kennt alle drei: ihre Namen, Argument- und Ergebnistypen und dass sie sofort verfügbar sind.</text>
|
||||
<text class="t-mut" data-label="cost" x="14" y="202">Die Verdrahtung steht im Code selbst — Schritt 1 des Tutorials.</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,213 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 700" width="620" height="700"
|
||||
role="img" aria-labelledby="fp-title">
|
||||
<title id="fp-title">Dieselbe Kette als fünf getrennte Prozesse auf einem Rechner: SensorService veröffentlicht eine .msg-Datei in consoleIn/outbox, ein Mediator-Prozess beobachtet dieses Verzeichnis und veröffentlicht eine Kopie in rot13/inbox, ProcessorService veröffentlicht sein Ergebnis in rot13/outbox, ein zweiter Mediator-Prozess verschiebt es nach consoleOut/inbox, und ActuatorService gibt es aus. Die vier Verzeichnisse bilden das Nachrichtenbrett auf einem lokalen Dateisystem.</title>
|
||||
<style><![CDATA[
|
||||
/* figures/diagram.css -- shared look of every built figure.
|
||||
*
|
||||
* build-figures.py drops this file into the style element of every built
|
||||
* svg, so a figure carries its own styling and stays self-contained.
|
||||
* Classes, not per-element fills, do the work: one edit here restyles the
|
||||
* whole book.
|
||||
*
|
||||
* The palette is theme.scss's: teal #20666f for structure, amber #8a5a08 for
|
||||
* the warning accent, ink #1b2430 for text, IBM Plex to match the page.
|
||||
*
|
||||
* Dark theme: the @media block follows the reader's system setting. librsvg
|
||||
* ignores media queries when it makes the pdf, so print always gets the light
|
||||
* theme -- which is what a printed page wants.
|
||||
*/
|
||||
|
||||
svg {
|
||||
font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
|
||||
/* the figure sits on the page, not on a white card of its own */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ---- surfaces ------------------------------------------------------- */
|
||||
|
||||
.box { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-weak { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-accent { fill: #e5eff1; stroke: #20666f; stroke-width: 1.8; }
|
||||
.box-warn { fill: #f8f1e0; stroke: #8a5a08; stroke-width: 1.4; }
|
||||
.box-plain { fill: #fbfcfd; stroke: #dae0e8; stroke-width: 1.2; }
|
||||
.diamond { fill: #e5eff1; stroke: #20666f; stroke-width: 1.4; }
|
||||
.ellipse { fill: #fbfcfd; stroke: #5a6879; stroke-width: 1.2; }
|
||||
|
||||
/* ---- lines ---------------------------------------------------------- */
|
||||
|
||||
.edge { fill: none; stroke: #5a6879; stroke-width: 1.3; }
|
||||
.edge-strong{ fill: none; stroke: #20666f; stroke-width: 1.8; }
|
||||
.edge-warn { fill: none; stroke: #8a5a08; stroke-width: 1.6; }
|
||||
.edge-dash { fill: none; stroke: #5a6879; stroke-width: 1.2; stroke-dasharray: 5 3; }
|
||||
.rule { stroke: #dae0e8; stroke-width: 1; }
|
||||
|
||||
/* ---- text ----------------------------------------------------------- */
|
||||
|
||||
.t { fill: #1b2430; font-size: 13px; }
|
||||
.t-sm { fill: #1b2430; font-size: 11px; }
|
||||
.t-lead { fill: #1b2430; font-size: 14px; font-weight: 600; }
|
||||
.t-mut { fill: #5a6879; font-size: 11px; }
|
||||
.t-key { fill: #1b2430; font-size: 12px; text-decoration: underline; }
|
||||
.t-accent { fill: #20666f; font-size: 12px; font-weight: 600; }
|
||||
.t-warn { fill: #8a5a08; font-size: 12px; font-weight: 600; }
|
||||
.t-mono { fill: #1b2430; font-size: 11.5px;
|
||||
font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }
|
||||
|
||||
.mid { text-anchor: middle; }
|
||||
.end { text-anchor: end; }
|
||||
|
||||
/* ---- interaction ====================================================
|
||||
* A .node groups one box with its labels. Hovering it lifts the whole group
|
||||
* a little, which is enough to follow a path through a busy diagram without
|
||||
* any script. Pointer events stay off the decorative layers so the hover
|
||||
* target is the shape itself.
|
||||
*/
|
||||
|
||||
.node { transition: opacity .12s ease; }
|
||||
.node:hover .box,
|
||||
.node:hover .box-accent,
|
||||
.node:hover .diamond { stroke-width: 2.6; }
|
||||
.node:hover .t, .node:hover .t-lead { fill: #20666f; }
|
||||
|
||||
svg:hover .node:not(:hover) { opacity: .55; }
|
||||
|
||||
/* a figure that marks no nodes must not dim on hover */
|
||||
svg:not(:has(.node)) .node { opacity: 1; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.node { transition: none; }
|
||||
}
|
||||
|
||||
/* ---- dark theme ------------------------------------------------------ */
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.box { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-weak { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-accent { fill: #24363d; stroke: #4c9aa5; }
|
||||
.box-warn { fill: #332a18; stroke: #c99a3a; }
|
||||
.box-plain { fill: #161b22; stroke: #30363d; }
|
||||
.diamond { fill: #24363d; stroke: #4c9aa5; }
|
||||
.ellipse { fill: #161b22; stroke: #8b98a8; }
|
||||
|
||||
.edge { stroke: #8b98a8; }
|
||||
.edge-strong{ stroke: #4c9aa5; }
|
||||
.edge-warn { stroke: #c99a3a; }
|
||||
.edge-dash { stroke: #8b98a8; }
|
||||
.rule { stroke: #30363d; }
|
||||
|
||||
.t, .t-sm, .t-lead, .t-key, .t-mono { fill: #e6edf3; }
|
||||
.t-mut { fill: #8b98a8; }
|
||||
.t-accent { fill: #4c9aa5; }
|
||||
.t-warn { fill: #c99a3a; }
|
||||
|
||||
.node:hover .t, .node:hover .t-lead { fill: #7fc4cf; }
|
||||
|
||||
.arrow { fill: #8b98a8; }
|
||||
.arrow-strong { fill: #4c9aa5; }
|
||||
.arrow-warn { fill: #c99a3a; }
|
||||
}
|
||||
|
||||
/* ---- arrowheads ======================================================
|
||||
* marker contents cannot inherit the referencing element's fill, so each
|
||||
* arrowhead is its own class and is themed alongside the line it ends.
|
||||
*/
|
||||
|
||||
.arrow { fill: #5a6879; }
|
||||
.arrow-strong { fill: #20666f; }
|
||||
.arrow-warn { fill: #8a5a08; }
|
||||
|
||||
]]>
|
||||
[data-label="mediator1"] { font-size: 11px; }
|
||||
[data-label="mediator2"] { font-size: 11px; }</style>
|
||||
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5"
|
||||
markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
||||
<path class="arrow" d="M0,0 L10,5 L0,10 z"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<!-- 1. SensorService (terminal 1) ==================================== -->
|
||||
<g class="node" data-flow-node="sensor">
|
||||
<rect class="box" x="120" y="24" width="300" height="46" rx="3"/>
|
||||
<text class="t-lead mid" data-label="sensor" x="270" y="46">SensorService — ConsoleIn</text>
|
||||
<text class="t-mut mid" data-label="t1" x="270" y="62">Terminal 1</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="1" data-flow-to="outbox1" d="M270,70 V96" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="publish1" x="286" y="88">veröffentlichen (.tmp → .msg)</text>
|
||||
|
||||
<!-- 2. consoleIn/outbox ============================================= -->
|
||||
<g class="node" data-flow-node="outbox1">
|
||||
<rect class="box-plain" x="120" y="98" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="126">consoleIn/outbox/*.msg</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="2" data-flow-to="mediator1" d="M270,142 V168" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="watch1" x="286" y="160">WatchService</text>
|
||||
|
||||
<!-- 3. first mediator process (terminal 2) =========================== -->
|
||||
<g class="node" data-flow-node="mediator1">
|
||||
<rect class="box-accent" x="120" y="170" width="300" height="46" rx="3"/>
|
||||
<text class="t-lead mid" data-label="mediator1" x="270" y="192">Mediator.java consoleIn/outbox rot13/inbox</text>
|
||||
<text class="t-mut mid" data-label="t2" x="270" y="208">Terminal 2</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="3" data-flow-to="inbox2" d="M270,216 V242" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="publish2" x="286" y="234">veröffentlichen</text>
|
||||
|
||||
<!-- 4. rot13/inbox =================================================== -->
|
||||
<g class="node" data-flow-node="inbox2">
|
||||
<rect class="box-plain" x="120" y="244" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="272">rot13/inbox/*.msg</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="4" data-flow-to="processor" d="M270,288 V314" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="watch2" x="286" y="306">WatchService</text>
|
||||
|
||||
<!-- 5. ProcessorService (terminal 3) ================================= -->
|
||||
<g class="node" data-flow-node="processor">
|
||||
<rect class="box" x="120" y="316" width="300" height="46" rx="3"/>
|
||||
<text class="t-lead mid" data-label="processor" x="270" y="338">ProcessorService — ROT13</text>
|
||||
<text class="t-mut mid" data-label="t3" x="270" y="354">Terminal 3</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="5" data-flow-to="outbox2" d="M270,362 V388" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="publish3" x="286" y="380">veröffentlichen</text>
|
||||
|
||||
<!-- 6. rot13/outbox ================================================== -->
|
||||
<g class="node" data-flow-node="outbox2">
|
||||
<rect class="box-plain" x="120" y="390" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="418">rot13/outbox/*.msg</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="6" data-flow-to="mediator2" d="M270,434 V460" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="watch3" x="286" y="452">WatchService</text>
|
||||
|
||||
<!-- 7. second mediator process (terminal 4) ========================== -->
|
||||
<g class="node" data-flow-node="mediator2">
|
||||
<rect class="box-accent" x="120" y="462" width="300" height="46" rx="3"/>
|
||||
<text class="t-lead mid" data-label="mediator2" x="270" y="484">Mediator.java rot13/outbox consoleOut/inbox</text>
|
||||
<text class="t-mut mid" data-label="t4" x="270" y="500">Terminal 4</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="7" data-flow-to="inbox3" d="M270,508 V534" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="publish4" x="286" y="526">veröffentlichen</text>
|
||||
|
||||
<!-- 8. consoleOut/inbox ============================================== -->
|
||||
<g class="node" data-flow-node="inbox3">
|
||||
<rect class="box-plain" x="120" y="536" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="564">consoleOut/inbox/*.msg</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="8" data-flow-to="actuator" d="M270,580 V606" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="watch4" x="286" y="598">WatchService</text>
|
||||
|
||||
<!-- 9. ActuatorService (terminal 5) ================================== -->
|
||||
<g class="node" data-flow-node="actuator">
|
||||
<rect class="box" x="120" y="608" width="300" height="46" rx="3"/>
|
||||
<text class="t-lead mid" data-label="actuator" x="270" y="630">ActuatorService — ConsoleOut</text>
|
||||
<text class="t-mut mid" data-label="t5" x="270" y="646">Terminal 5</text>
|
||||
</g>
|
||||
|
||||
<!-- the four directories belong to one message board on one filesystem -->
|
||||
<path class="edge-dash" d="M436,98 H452 V580 H436"/>
|
||||
<text class="t-mono" x="460" y="330">messageBoard/</text>
|
||||
<text class="t-mut" data-label="board" x="460" y="348">Verzeichnis = Postfach, Datei = Nachricht</text>
|
||||
|
||||
<!-- the five processes are started by hand, one terminal each -->
|
||||
<path class="edge-dash" d="M104,24 H88 V654 H104"/>
|
||||
<text class="t-warn" data-label="topology" x="14" y="686">Fünf von Hand gestartete Prozesse. Die Topologie steckt nun in den zwei Mediator-Befehlszeilen — bei dem, der sie getippt hat.</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,206 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 560 700" width="560" height="700"
|
||||
role="img" aria-labelledby="mj-title">
|
||||
<title id="mj-title">Die vermittelte Fassung in einer JVM: ConsoleIn legt eine Nachricht in consoleIn.outbox, ein Vermittler nimmt sie und legt sie in rot13.inbox, ROT13 nimmt sie und legt sein Ergebnis in rot13.outbox, ein zweiter Vermittler verschiebt es nach consoleOut.inbox, und ConsoleOut nimmt es und gibt es aus.</title>
|
||||
<style><![CDATA[
|
||||
/* figures/diagram.css -- shared look of every built figure.
|
||||
*
|
||||
* build-figures.py drops this file into the style element of every built
|
||||
* svg, so a figure carries its own styling and stays self-contained.
|
||||
* Classes, not per-element fills, do the work: one edit here restyles the
|
||||
* whole book.
|
||||
*
|
||||
* The palette is theme.scss's: teal #20666f for structure, amber #8a5a08 for
|
||||
* the warning accent, ink #1b2430 for text, IBM Plex to match the page.
|
||||
*
|
||||
* Dark theme: the @media block follows the reader's system setting. librsvg
|
||||
* ignores media queries when it makes the pdf, so print always gets the light
|
||||
* theme -- which is what a printed page wants.
|
||||
*/
|
||||
|
||||
svg {
|
||||
font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
|
||||
/* the figure sits on the page, not on a white card of its own */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ---- surfaces ------------------------------------------------------- */
|
||||
|
||||
.box { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-weak { fill: #eef3f7; stroke: #20666f; stroke-width: 1.4; }
|
||||
.box-accent { fill: #e5eff1; stroke: #20666f; stroke-width: 1.8; }
|
||||
.box-warn { fill: #f8f1e0; stroke: #8a5a08; stroke-width: 1.4; }
|
||||
.box-plain { fill: #fbfcfd; stroke: #dae0e8; stroke-width: 1.2; }
|
||||
.diamond { fill: #e5eff1; stroke: #20666f; stroke-width: 1.4; }
|
||||
.ellipse { fill: #fbfcfd; stroke: #5a6879; stroke-width: 1.2; }
|
||||
|
||||
/* ---- lines ---------------------------------------------------------- */
|
||||
|
||||
.edge { fill: none; stroke: #5a6879; stroke-width: 1.3; }
|
||||
.edge-strong{ fill: none; stroke: #20666f; stroke-width: 1.8; }
|
||||
.edge-warn { fill: none; stroke: #8a5a08; stroke-width: 1.6; }
|
||||
.edge-dash { fill: none; stroke: #5a6879; stroke-width: 1.2; stroke-dasharray: 5 3; }
|
||||
.rule { stroke: #dae0e8; stroke-width: 1; }
|
||||
|
||||
/* ---- text ----------------------------------------------------------- */
|
||||
|
||||
.t { fill: #1b2430; font-size: 13px; }
|
||||
.t-sm { fill: #1b2430; font-size: 11px; }
|
||||
.t-lead { fill: #1b2430; font-size: 14px; font-weight: 600; }
|
||||
.t-mut { fill: #5a6879; font-size: 11px; }
|
||||
.t-key { fill: #1b2430; font-size: 12px; text-decoration: underline; }
|
||||
.t-accent { fill: #20666f; font-size: 12px; font-weight: 600; }
|
||||
.t-warn { fill: #8a5a08; font-size: 12px; font-weight: 600; }
|
||||
.t-mono { fill: #1b2430; font-size: 11.5px;
|
||||
font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }
|
||||
|
||||
.mid { text-anchor: middle; }
|
||||
.end { text-anchor: end; }
|
||||
|
||||
/* ---- interaction ====================================================
|
||||
* A .node groups one box with its labels. Hovering it lifts the whole group
|
||||
* a little, which is enough to follow a path through a busy diagram without
|
||||
* any script. Pointer events stay off the decorative layers so the hover
|
||||
* target is the shape itself.
|
||||
*/
|
||||
|
||||
.node { transition: opacity .12s ease; }
|
||||
.node:hover .box,
|
||||
.node:hover .box-accent,
|
||||
.node:hover .diamond { stroke-width: 2.6; }
|
||||
.node:hover .t, .node:hover .t-lead { fill: #20666f; }
|
||||
|
||||
svg:hover .node:not(:hover) { opacity: .55; }
|
||||
|
||||
/* a figure that marks no nodes must not dim on hover */
|
||||
svg:not(:has(.node)) .node { opacity: 1; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.node { transition: none; }
|
||||
}
|
||||
|
||||
/* ---- dark theme ------------------------------------------------------ */
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.box { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-weak { fill: #1d2b33; stroke: #4c9aa5; }
|
||||
.box-accent { fill: #24363d; stroke: #4c9aa5; }
|
||||
.box-warn { fill: #332a18; stroke: #c99a3a; }
|
||||
.box-plain { fill: #161b22; stroke: #30363d; }
|
||||
.diamond { fill: #24363d; stroke: #4c9aa5; }
|
||||
.ellipse { fill: #161b22; stroke: #8b98a8; }
|
||||
|
||||
.edge { stroke: #8b98a8; }
|
||||
.edge-strong{ stroke: #4c9aa5; }
|
||||
.edge-warn { stroke: #c99a3a; }
|
||||
.edge-dash { stroke: #8b98a8; }
|
||||
.rule { stroke: #30363d; }
|
||||
|
||||
.t, .t-sm, .t-lead, .t-key, .t-mono { fill: #e6edf3; }
|
||||
.t-mut { fill: #8b98a8; }
|
||||
.t-accent { fill: #4c9aa5; }
|
||||
.t-warn { fill: #c99a3a; }
|
||||
|
||||
.node:hover .t, .node:hover .t-lead { fill: #7fc4cf; }
|
||||
|
||||
.arrow { fill: #8b98a8; }
|
||||
.arrow-strong { fill: #4c9aa5; }
|
||||
.arrow-warn { fill: #c99a3a; }
|
||||
}
|
||||
|
||||
/* ---- arrowheads ======================================================
|
||||
* marker contents cannot inherit the referencing element's fill, so each
|
||||
* arrowhead is its own class and is themed alongside the line it ends.
|
||||
*/
|
||||
|
||||
.arrow { fill: #5a6879; }
|
||||
.arrow-strong { fill: #20666f; }
|
||||
.arrow-warn { fill: #8a5a08; }
|
||||
|
||||
]]></style>
|
||||
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5"
|
||||
markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
||||
<path class="arrow" d="M0,0 L10,5 L0,10 z"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<!-- one JVM, five virtual threads: the frame the whole chain lives in -->
|
||||
<rect class="box-plain" x="10" y="10" width="540" height="676" rx="4"/>
|
||||
<text class="t-mut" data-label="frame" x="22" y="30">eine JVM · fünf virtuelle Threads · BlockingQueue-Postfächer</text>
|
||||
|
||||
<!-- 1. ConsoleIn ==================================================== -->
|
||||
<g class="node" data-flow-node="consolein">
|
||||
<rect class="box" x="120" y="44" width="300" height="44" rx="3"/>
|
||||
<text class="t-lead mid" data-label="consolein" x="270" y="72">ConsoleIn — „ich lese“</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="1" data-flow-to="outbox1" d="M270,88 V114" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="put1" x="286" y="106">put</text>
|
||||
|
||||
<!-- 2. consoleIn.outbox ============================================= -->
|
||||
<g class="node" data-flow-node="outbox1">
|
||||
<rect class="box-plain" x="120" y="116" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="144">consoleIn.outbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="2" data-flow-to="mediator1" d="M270,160 V186" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="take1" x="286" y="178">take</text>
|
||||
|
||||
<!-- 3. first mediator =============================================== -->
|
||||
<g class="node" data-flow-node="mediator1">
|
||||
<rect class="box-accent" x="120" y="188" width="300" height="44" rx="3"/>
|
||||
<text class="t-lead mid" data-label="mediator1" x="270" y="211">Vermittler</text>
|
||||
<text class="t-mut mid" data-label="route1" x="270" y="226">consoleIn.outbox → rot13.inbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="3" data-flow-to="inbox2" d="M270,232 V258" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="put2" x="286" y="250">put</text>
|
||||
|
||||
<!-- 4. rot13.inbox =================================================== -->
|
||||
<g class="node" data-flow-node="inbox2">
|
||||
<rect class="box-plain" x="120" y="260" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="288">rot13.inbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="4" data-flow-to="rot13" d="M270,304 V330" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="take2" x="286" y="322">take</text>
|
||||
|
||||
<!-- 5. ROT13 ========================================================= -->
|
||||
<g class="node" data-flow-node="rot13">
|
||||
<rect class="box" x="120" y="332" width="300" height="44" rx="3"/>
|
||||
<text class="t-lead mid" data-label="rot13" x="270" y="360">ROT13 — „ich rotiere“</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="5" data-flow-to="outbox2" d="M270,376 V402" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="put3" x="286" y="394">put</text>
|
||||
|
||||
<!-- 6. rot13.outbox ================================================== -->
|
||||
<g class="node" data-flow-node="outbox2">
|
||||
<rect class="box-plain" x="120" y="404" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="432">rot13.outbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="6" data-flow-to="mediator2" d="M270,448 V474" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="take3" x="286" y="466">take</text>
|
||||
|
||||
<!-- 7. second mediator =============================================== -->
|
||||
<g class="node" data-flow-node="mediator2">
|
||||
<rect class="box-accent" x="120" y="476" width="300" height="44" rx="3"/>
|
||||
<text class="t-lead mid" data-label="mediator2" x="270" y="499">Vermittler</text>
|
||||
<text class="t-mut mid" data-label="route2" x="270" y="514">rot13.outbox → consoleOut.inbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="7" data-flow-to="inbox3" d="M270,520 V546" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="put4" x="286" y="538">put</text>
|
||||
|
||||
<!-- 8. consoleOut.inbox ============================================== -->
|
||||
<g class="node" data-flow-node="inbox3">
|
||||
<rect class="box-plain" x="120" y="548" width="300" height="44" rx="3"/>
|
||||
<text class="t-mono mid" x="270" y="576">consoleOut.inbox</text>
|
||||
</g>
|
||||
<path class="edge" data-flow="8" data-flow-to="consoleout" d="M270,592 V618" marker-end="url(#a)"/>
|
||||
<text class="t-accent" data-label="take4" x="286" y="610">take</text>
|
||||
|
||||
<!-- 9. ConsoleOut ==================================================== -->
|
||||
<g class="node" data-flow-node="consoleout">
|
||||
<rect class="box" x="120" y="620" width="300" height="44" rx="3"/>
|
||||
<text class="t-lead mid" data-label="consoleout" x="270" y="648">ConsoleOut — „ich gebe aus“</text>
|
||||
</g>
|
||||
|
||||
<!-- side note: who holds the topology -->
|
||||
<text class="t-warn" data-label="topology" x="22" y="672">Keine Fähigkeit nennt eine andere. Die Topologie steckt nur in den zwei Vermittlern, gestartet in main().</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
+1066
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,222 @@
|
||||
[
|
||||
{
|
||||
"objectID": "index.html",
|
||||
"href": "index.html",
|
||||
"title": "Vom Aufruf zum Ereignis",
|
||||
"section": "",
|
||||
"text": "Über diese Notizen\nDiese Notizen fassen das Tutorial „SIN.04028 — From Calling to Eventing“ zusammen, Schritt für Schritt durchgearbeitet. Das Tutorial selbst liegt neben diesem Buch, in SIN.04028-From-Calling-to-Eventing/README.md, und gehört zur Vorlesung Process Control von Reto Konig an der Universität Freiburg (Herbstsemester 2026).\nDas gebaute Programm ändert sich nie: Sie tippen eine Zeile, sie kommt um 13 Buchstaben verschoben zurück.\nWas sich ändert, ist alles ringsherum. Das Tutorial baut dasselbe System immer wieder neu und stellt dabei drei Fragen, in dieser Reihenfolge:\nJedes Mal, wenn ein Schritt fertig ist, kommt hier eine Zusammenfassung hinzu; das Buch wächst also im Tempo der Arbeit. Jede Zusammenfassung sagt, was der Schritt getan hat, was beim Ausführen beobachtet wurde und was sich architektonisch verschoben hat — meist ein Stück Wissen, das den Besitzer gewechselt hat.",
|
||||
"crumbs": [
|
||||
"[About these notes]{.en}[À propos de ces notes]{.fr}[Über diese Notizen]{.de}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "index.html#sec-diagrams",
|
||||
"href": "index.html#sec-diagrams",
|
||||
"title": "Vom Aufruf zum Ereignis",
|
||||
"section": "Wie die Abbildungen zu lesen sind",
|
||||
"text": "Wie die Abbildungen zu lesen sind\nJede Abbildung existiert einmal als Zeichnung und dreimal als Sprache. In der Webfassung hat eine Abbildung mit Nachrichtenfluss eine kleine Leiste darunter: Abspielen schickt eine Nachricht durch die ganze Kette, Ein Sprung rückt einen einzigen Schritt vor, Zurücksetzen stellt alles zurück. Kästen leuchten auf, wenn die Nachricht sie erreicht; so ist zu sehen, welche Komponente wartet und welche arbeitet.\nIm PDF und in einem Browser ohne JavaScript ist dasselbe Bild da — nur unbewegt. Nichts in diesen Notizen hängt von der Animation ab.",
|
||||
"crumbs": [
|
||||
"[About these notes]{.en}[À propos de ces notes]{.fr}[Über diese Notizen]{.de}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "index.html#sec-build",
|
||||
"href": "index.html#sec-build",
|
||||
"title": "Vom Aufruf zum Ereignis",
|
||||
"section": "Dieses Buch bauen",
|
||||
"text": "Dieses Buch bauen\nDie drei Bücher entstehen aus einer einzigen Quelle:\n./render-all.sh # Abbildungen, dann html + pdf für en, fr, de\n./render-all.sh --serve # …und _book/ auf http://localhost:8000 ausliefern\n_book/ enthält das englische Buch, _book/fr/ das französische und _book/de/ das deutsche; das Sprachmenü in der Seitenleiste wechselt zwischen ihnen und merkt sich die Wahl. Ein einfaches quarto render baut nur Englisch und leert _book/, was die anderen zwei entfernt — also das Skript benutzen.",
|
||||
"crumbs": [
|
||||
"[About these notes]{.en}[À propos de ces notes]{.fr}[Über diese Notizen]{.de}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "00-orientation.html",
|
||||
"href": "00-orientation.html",
|
||||
"title": "1 Schritt 0 — Worum es im Tutorial geht",
|
||||
"section": "",
|
||||
"text": "1.1 Die drei Fragen\nSchritt 0 enthält keinen Code. Er nennt das Thema: nicht ROT13, sondern die Architektur darum herum. Die Funktionalität bleibt über 81 Schritte fast unverändert — genau das macht die Veränderungen ringsherum sichtbar.\nZwei Regeln werden hier gesetzt und gelten für das ganze Tutorial:\nDeshalb beginnt das Tutorial nicht mit MQTT und auch nicht mit dynamischen Abonnements. Es baut zuerst ein System mit absichtlich unbequemen Vermittlern, nimmt es in Betrieb und fragt erst dann, ob sie ihren Platz verdient haben.\nDie zweite Regel betrifft das Vokabular: Intent, Status/State und Event werden erst benannt, nachdem sie benutzt wurden. Sie erscheinen etwa ab Schritt 42, nicht früher.\nDie geplante Route, von Schritt 0 an:\nDer Wortlaut der drei Fragen ist wichtig, und man ersetzt ihn leicht durch eine schwächere Fassung:\n„Kennen“ ist nicht „kommunizieren“: zwei Komponenten können den ganzen Tag Nachrichten austauschen, ohne dass eine die andere nennt. „Über die Verdrahtung entscheiden“ ist nicht „verbinden“: der Teil, der Nachrichten weiterleitet, muss nicht der Teil sein, der die Route gewählt hat. Beide Unterscheidungen werden später konkret — die erste schon in Schritt 1, die zweite in Teil III.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>1</span> <span class='chapter-title'>[Step 0 — What the tutorial is about]{.en}[Étape 0 — De quoi parle le tutoriel]{.fr}[Schritt 0 — Worum es im Tutorial geht]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "00-orientation.html#sec-three-questions",
|
||||
"href": "00-orientation.html#sec-three-questions",
|
||||
"title": "1 Schritt 0 — Worum es im Tutorial geht",
|
||||
"section": "",
|
||||
"text": "Das Tutorial fragt\nEine schwächere Fassung\n\n\n\n\nWer kennt wen?\nwer mit wem kommuniziert\n\n\nWer besitzt was?\nwelche Daten jeder Teil hält\n\n\nWer entscheidet über die Verdrahtung?\nwelcher Teil alles verbindet",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>1</span> <span class='chapter-title'>[Step 0 — What the tutorial is about]{.en}[Étape 0 — De quoi parle le tutoriel]{.fr}[Schritt 0 — Worum es im Tutorial geht]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html",
|
||||
"href": "01-part-i-calls.html",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "",
|
||||
"text": "2.1 Schritt 1 — Ganz unten: einfach aufrufen\nDie Schritte 1 bis 10 bleiben in einer JVM. Das System wird dreimal gebaut: als direkte Aufrufe, als drei Fähigkeiten, die einander nicht kennen wollen, und als dieselben Fähigkeiten, von Vermittlern zusammengeklebt. Nichts ist bisher verteilt, und genau das ist der Punkt: das Einzige, was sich ändert, ist wer wen kennt.\nProceduralRot13.java ist das ganze System in einer kompakten Quelldatei: eine Schleife, die eine Zeile liest, und eine Anweisung, die den rotierten Text ausgibt.\nIO.readln() steht in einer eigenen Zeile, rot13(text) aber ist kein eigener Schritt: es wird innerhalb des Arguments von IO.println aufgerufen. Weder rot13 noch IO.println weiss etwas vom anderen. Wer beide kennt, ist main(): es nennt sie und legt ihre Reihenfolge fest.\nWas main() über rot13 weiss: dass es existiert, wie man es aufruft (ein blosser Name, beide liegen in derselben implizit erzeugten Klasse), welches Argument es nimmt, was es zurückgibt, dass es jetzt sofort verfügbar ist und dass die Ausführung nach der Rückkehr weiterläuft. Nicht bekannt ist, wie rot13 implementiert ist — das Einzige, was es ignorieren darf.\nDie Verfügbarkeitsgarantie lohnt eine eigene Erwähnung, denn sie verschwindet später: main() und rot13 sind zwei Methoden einer bereits geladenen Klasse, aufgerufen im selben Thread, im selben Prozess. Nichts muss zuerst starten, keine Nachricht reist irgendwohin, kein Empfänger muss abonniert sein.\nBeobachtet: eine getippte Zeile erscheint rotiert; Ctrl+D beendet das Programm still, weil IO.readln() null zurückgibt und main() zurückkehrt.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-1",
|
||||
"href": "01-part-i-calls.html#sec-step-1",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "",
|
||||
"text": "void main() {\n while (true) {\n var text = IO.readln();\n\n if (text == null)\n return;\n\n IO.println(rot13(text));\n }\n}\n\n\n\n\n\n\n\n\n\n\nAbbildung 2.1: Die prozedurale Fassung. Die Verdrahtung steht im Code: main() nennt alle drei Teile und legt ihre Reihenfolge fest.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-2",
|
||||
"href": "01-part-i-calls.html#sec-step-2",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.2 Schritt 2 — Drei egoistische Fähigkeiten",
|
||||
"text": "2.2 Schritt 2 — Drei egoistische Fähigkeiten\nEine egoistische Komponente sagt: ich weiss, was ich kann, welche Daten ich annehme und welche ich erzeuge — und den Geschäftsprozess um mich herum möchte ich lieber nicht kennen. Konkret: ConsoleIn darf kein rot13(...) enthalten, und ROT13 kein consoleOut(...).\nDas Entfernen dieser Aufrufe schafft sofort ein Problem, das das Tutorial als Frage stellt: wenn niemand niemanden kennt, wer macht daraus ein System? Zu beachten ist, was die Frage nicht sagt: das Wissen ist nicht verschwunden, es muss woandershin. Es fehlen zwei Verbindungen, nicht eine — ConsoleIn ↔︎ ROT13 und ROT13 ↔︎ ConsoleOut.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-3",
|
||||
"href": "01-part-i-calls.html#sec-step-3",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.3 Schritt 3 — Jeder Fähigkeit ein Postfach geben",
|
||||
"text": "2.3 Schritt 3 — Jeder Fähigkeit ein Postfach geben\nDer kleinste Mechanismus für die fehlenden Verbindungen: eine Nachricht und eine benannte Warteschlange.\nrecord Message(String type, String value) {}\n\nMap<String, BlockingQueue<Message>> mailboxes = new ConcurrentHashMap<>();\n\nBlockingQueue<Message> mailbox(String name) {\n return mailboxes.computeIfAbsent(name, _ -> new LinkedBlockingQueue<>());\n}\nDas Tutorial nennt diese bewusst Postfächer (mailboxes) und nicht Topics, mit Begründung: rufen zwei Leser take() auf demselben Postfach auf, konkurrieren sie — jede Nachricht geht an genau einen von ihnen und wird nicht an beide kopiert. Ein Topic in Publish/Subscribe gäbe jedem Abonnenten seine eigene Kopie. Ein Leser pro Nachricht genügt vorläufig, und die Einschränkung bleibt absichtlich bestehen: sie macht später sichtbar, was Publish/Subscribe wirklich hinzufügt.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-steps-4-6",
|
||||
"href": "01-part-i-calls.html#sec-steps-4-6",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.4 Schritte 4–6 — Die drei Fähigkeiten werden egoistisch",
|
||||
"text": "2.4 Schritte 4–6 — Die drei Fähigkeiten werden egoistisch\nJede Fähigkeit berührt nur noch ihre eigenen Postfachnamen:\n\n\n\nFähigkeit\nliest\nschreibt\n\n\n\n\nConsoleIn\ndie Tastatur\nconsoleIn.outbox\n\n\nROT13\nrot13.inbox\nrot13.outbox\n\n\nConsoleOut\nconsoleOut.inbox\ndie Konsole\n\n\n\nKeine Fähigkeit enthält den Namen einer anderen. Die Zusammenfassung des Tutorials selbst: „drei schön isolierte Fähigkeiten. Und sie tun zusammen absolut nichts.” Nichts bewegt eine Nachricht von consoleIn.outbox nach rot13.inbox oder von rot13.outbox nach consoleOut.inbox.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-7",
|
||||
"href": "01-part-i-calls.html#sec-step-7",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.5 Schritt 7 — Auftritt des Vermittlers",
|
||||
"text": "2.5 Schritt 7 — Auftritt des Vermittlers\nDer kleinstmögliche Klebstoff: eine Schleife, die aus einem Postfach nimmt und in ein anderes legt, ohne etwas über das Durchlaufende zu wissen.\nvoid mediate(String from, String to) {\n while (true)\n mailbox(to).put(mailbox(from).take());\n}\nmain() startet fünf virtuelle Threads: die drei Fähigkeiten plus zwei Vermittler, deren Routen als Argumente übergeben werden — consoleIn.outbox → rot13.inbox und rot13.outbox → consoleOut.inbox.\nBeobachtet: Hello World hinein, Uryyb Jbeyq heraus, genau wie in Schritt 1. Aber Ctrl+D beendet das Programm nicht mehr. Der Thread von ConsoleIn kehrt zurück (er schleift nicht), und die vier anderen Threads hängen blockiert in take() an leeren Postfächern, ohne CPU zu verbrauchen. Am Leben hält den Prozess tatsächlich die letzte Zeile von main(), Thread.currentThread().join(): der Haupt-Thread wartet auf sich selbst, was nie enden kann. Virtuelle Threads sind Daemon-Threads; die vier wartenden Threads allein hätten die JVM also nicht am Laufen gehalten.\n\n\n\n\n\n\nAbbildung 2.2: Die vermittelte Fassung in einer JVM. In der Webfassung schickt Abspielen eine Nachricht durch alle acht Sprünge.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-8",
|
||||
"href": "01-part-i-calls.html#sec-step-8",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.6 Schritt 8 — Nochmals fragen: wer kennt wen?",
|
||||
"text": "2.6 Schritt 8 — Nochmals fragen: wer kennt wen?\nKennt ConsoleIn ROT13? Nein. Kennt ROT13 ConsoleIn oder ConsoleOut? Nein. Ist die Topologie verschwunden? Nein — sie steckt in den zwei mediate(...)-Aufrufen innerhalb von main().\nDas ist das erste grosse Ergebnis des Tutorials:\n\nEntkopplung lässt Wissen oft nicht verschwinden. Sie verschiebt Wissen dorthin, wo es hingehört.\n\nDie Fähigkeit „ROT13 transformiert Text” gehört zu ROT13. Die Topologie ConsoleIn → ROT13 → ConsoleOut gehört zur Systemkomposition. Geändert hat sich seit Schritt 1 nicht, dass die Verdrahtung main() verlassen hat — sie ist noch dort —, sondern dass sie nicht mehr innerhalb einer Fähigkeit steht. Sie ist jetzt Daten: zwei Paare von Postfachnamen. Umverdrahten berührt diese zwei Zeilen und keine einzige Fähigkeit.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-9",
|
||||
"href": "01-part-i-calls.html#sec-step-9",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.7 Schritt 9 — Warum virtuelle Threads?",
|
||||
"text": "2.7 Schritt 9 — Warum virtuelle Threads?\nFünf Schleifen warten nun unbegrenzt: die Tastatur, rot13.inbox, consoleOut.inbox und die Quellen der zwei Vermittler. Virtuelle Threads sind einfach der billige Java-Weg, fünf Wartevorgänge gleichzeitig in einer JVM laufen zu lassen.\nSie sind eine Implementierungsbequemlichkeit, keine Architektur. Die Architektur — wer wen kennt und wo die Verdrahtung liegt — steckt in den Postfachnamen, nicht in den Threads. Der Beleg des Tutorials für die Trennung: dieselbe Architektur läuft in Schritt 11 als getrennte Prozesse, ohne geteilte Threads zwischen den Teilen.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-step-10",
|
||||
"href": "01-part-i-calls.html#sec-step-10",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.8 Schritt 10 — Die Dienste egoistisch halten",
|
||||
"text": "2.8 Schritt 10 — Die Dienste egoistisch halten\nDie naheliegende Abkürzung: der erste Vermittler kopiert Nachrichten nur unverändert — warum ihn also nicht löschen und ROT13 direkt take() auf consoleIn.outbox machen lassen?\nWeil ROT13 dann den Namen consoleIn.outbox enthielte, also wüsste, dass ConsoleIn existiert und wohin es veröffentlicht. Die Topologie wanderte in ROT13 hinein, und ROT13 wäre keine egoistische Fähigkeit mehr. Der Test, der das konkret macht: die Eingabe komme künftig von einer neuen Fähigkeit FileIn, die in fileIn.outbox veröffentlicht.\n\n\n\n\n\n\n\n\n\nmit Vermittler\nmit der Abkürzung\n\n\n\n\nwas sich ändert\nein Argument des Vermittlers\nrunRot13 selbst\n\n\nwer berührt wird\nkeine Fähigkeit\nROT13, dessen Aufgabe unverändert blieb\n\n\n\nDas Tutorial ist ehrlich über den Preis: dieses Design „mag indirekt wirken — sogar etwas eigenartig”, und es verspricht einen anderen Weg, Dienste egoistisch zu halten, ohne Vermittler im Pfad jeder Nachricht.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "01-part-i-calls.html#sec-part-i-result",
|
||||
"href": "01-part-i-calls.html#sec-part-i-result",
|
||||
"title": "2 Teil I — Mit dem beginnen, was man schon kennt",
|
||||
"section": "2.9 Was Teil I verschoben hat",
|
||||
"text": "2.9 Was Teil I verschoben hat\n\n\n\n\n\n\n\n\nStufe\nwo die Topologie liegt\nwer umverdrahten kann\n\n\n\n\nSchritt 1\nim Code der Fähigkeit (IO.println(rot13(text)))\nwer diesen Code ändert\n\n\nSchritte 7–8\nin main(), als Paare von Postfachnamen\nwer main() ändert\n\n\n\nFunktionalität: unverändert. Codezeilen: mehr. Teile, die einander kennen: keine. Das ist der Tauschhandel, den das restliche Tutorial immer wieder prüft.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>2</span> <span class='chapter-title'>[Part I — Start with what you already know]{.en}[Partie I — Commencer par ce que l'on connaît déjà]{.fr}[Teil I — Mit dem beginnen, was man schon kennt]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html",
|
||||
"href": "02-part-ii-processes.html",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "",
|
||||
"text": "3.1 Schritt 11 — Die Komponenten trennen\nDie Schritte 11 bis 18 nehmen die Architektur aus Teil I und verteilen sie auf fünf Betriebssystemprozesse auf einem Rechner. Die Fähigkeiten behalten ihre Postfachnamen; nur der Transport darunter wechselt, von Java-Objekten zu Dateien in Verzeichnissen. Das erste wirklich verteilte Problem tritt hier auf, und es hat nichts mit ROT13 zu tun.\nDrei Prozesse können keine BlockingQueue teilen: jeder java-Befehl startet seine eigene JVM mit eigenem Speicher, die mailboxes-Map existierte also dreimal, und jede Kopie sähe nur ihre eigenen Nachrichten. Ein externer Transport ist nötig.\nTCP würde gehen, MQTT würde gehen. Das Tutorial wählt absichtlich die primitivste Möglichkeit, das Dateisystem, mit einer einzeiligen Begründung: weil man es sehen kann. Nachrichten werden Dateien, die man mit ls auflisten und mit cat lesen kann, während das System läuft. Primitiv heisst hier nicht schlechter; Teil VIII kommt darauf zurück, was das Dateisystem wirklich gut und wirklich schlecht kann.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-steps-12-13",
|
||||
"href": "02-part-ii-processes.html#sec-steps-12-13",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.2 Schritte 12–13 — Ein Verzeichnis wird zum Postfach",
|
||||
"text": "3.2 Schritte 12–13 — Ein Verzeichnis wird zum Postfach\nDie Zuordnung ist eine Zeile lang:\ndirectory = mailbox file = message\npublish = create file receive = watch directory\nmessageBoard/\n├── consoleIn/outbox/\n├── rot13/inbox/\n├── rot13/outbox/\n└── consoleOut/inbox/\nDer Message-Record erhält einen optionalen Zeitstempel, und das Dateiformat bleibt zwei Zeilen plus eine optionale dritte:\nTEXT\nHello World\nTIMESTAMP: 2026-09-22T10:42:12.123Z\nEine handgeschriebene Nachricht darf den Zeitstempel weglassen. Die Marke TIMESTAMP: verhindert, dass eine Inhaltszeile, die zufällig wie ein Datum aussieht, für Metadaten gehalten wird; in diesem winzigen Format ist eine letzte Zeile, die mit TIMESTAMP: beginnt, reserviert.\nJackson könnte hier eingeführt werden und wird es absichtlich nicht. Der Sinn eines lächerlich einfachen Formats ist, dass fast nichts die Architektur verdeckt — die ganze Nachricht ist in jedem Texteditor lesbar, was die Aufmerksamkeit darauf hält, wer mit wem spricht.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-step-14",
|
||||
"href": "02-part-ii-processes.html#sec-step-14",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.3 Schritt 14 — Das erste Problem verteilter Systeme: die Veröffentlichung",
|
||||
"text": "3.3 Schritt 14 — Das erste Problem verteilter Systeme: die Veröffentlichung\nEin Leser, der ein Verzeichnis beobachtet, kann eine Datei entdecken, bevor der Schreiber sie fertig geschrieben hat. Daher ein Veröffentlichungsprotokoll:\n\neine private temporäre Datei erzeugen;\ndie vollständige Nachricht schreiben;\nsie schliessen;\nsie atomar auf ihren endgültigen .msg-Namen umbenennen;\nKonsumenten reagieren nur auf endgültige Dateien.\n\nFiles.writeString(temporary, content);\nFiles.move(temporary, published, StandardCopyOption.ATOMIC_MOVE);\nBeide Hälften sind nötig. Das Umbenennen ist atomar — ein Leser sieht entweder keine .msg-Datei oder die vollständige —, aber es schützt nichts, wenn Leser auch .tmp-Dateien aufgreifen. .tmp und .msg bleiben im selben Verzeichnis, damit der Verschiebevorgang kein Dateisystem überschreitet, wo die Atomarität verloren ginge.\n\nSchreiben und Veröffentlichen sind nicht dieselbe Operation.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-step-15",
|
||||
"href": "02-part-ii-processes.html#sec-step-15",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.4 Schritt 15 — Ein Postfach mit WatchService beobachten",
|
||||
"text": "3.4 Schritt 15 — Ein Postfach mit WatchService beobachten\nJavas eigener Dateisystem-Beobachter liefert die Konsumentenhälfte: ein Verzeichnis für ENTRY_CREATE registrieren, in watcher.take() blockieren und jeden Dateinamen ignorieren, der nicht auf .msg endet.\nDas ergibt auch ein sehr einfaches Einspeisewerkzeug. Mit ActuatorService als laufendem Konsumenten:\nprintf 'TEXT\\nHello from a file' > messageBoard/consoleOut/inbox/manual.tmp\nmv messageBoard/consoleOut/inbox/manual.tmp messageBoard/consoleOut/inbox/manual.msg\nBeobachtet: beim Auftauchen der .tmp-Datei geschieht nichts; die Zeile erscheint in dem Moment, in dem das Umbenennen den .msg-Namen erzeugt. Beide erlaubten Formate funktionieren, mit und ohne abschliessenden Zeitstempel.\nDie architektonische Lehre ist die, die das Tutorial als producer → filesystem → consumer zieht: der Konsument konnte einen Menschen, der mv tippt, nicht von einem echten Dienst unterscheiden. Er kennt sein eigenes Eingangspostfach, nicht den, der hineinschreibt. Der Egoismus hat die Prozessgrenze überlebt.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-steps-16-17",
|
||||
"href": "02-part-ii-processes.html#sec-steps-16-17",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.5 Schritte 16–17 — Dienste und Vermittler werden Prozesse",
|
||||
"text": "3.5 Schritte 16–17 — Dienste und Vermittler werden Prozesse\nDie drei Fähigkeiten werden drei Programme, und der Vermittler eine vierte Art Programm:\n\n\n\n\n\n\n\n\n\nProgramm\nspielt\nliest\nschreibt\n\n\n\n\nSensorService.java\nConsoleIn\ndie Tastatur\nconsoleIn/outbox\n\n\nProcessorService.java\nROT13\nrot13/inbox\nrot13/outbox\n\n\nActuatorService.java\nConsoleOut\nconsoleOut/inbox\ndie Konsole\n\n\nMediator.java <from> <to>\nder Klebstoff\n<from>\n<to>\n\n\n\nDer Vermittler ist generisch: seine Route ist nicht einkompiliert, sie kommt als zwei Startargumente. Doch das Tutorial weist auf eine Asymmetrie hin, die man im Kopf behalten sollte: die drei Fähigkeiten erhalten ihre Arbeit als Nachrichten in einem Postfach, der Vermittler dagegen seine Route als Startkonfiguration — und er hat keinen Namen und kein eigenes Steuerpostfach, in das jemand schreiben könnte.\nPraktische Folge: Argumente werden einmal gelesen, das Ändern der Route eines laufenden Vermittlers heisst also: anhalten und neu starten. Eine Konfigurationsdatei wäre nicht anders — auch sie wird beim Start gelesen. Das Tutorial lässt diesen Punkt absichtlich offen, bis die Kosten der verteilten Vermittler zu spüren waren.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-step-18",
|
||||
"href": "02-part-ii-processes.html#sec-step-18",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.6 Schritt 18 — Die vollständig externe lokale Fassung ausführen",
|
||||
"text": "3.6 Schritt 18 — Die vollständig externe lokale Fassung ausführen\nFünf Terminals, fünf Prozesse, ein lokales Dateisystem dazwischen:\njava SensorService.java # terminal 1\njava Mediator.java consoleIn/outbox rot13/inbox # terminal 2\njava ProcessorService.java # terminal 3\njava Mediator.java rot13/outbox consoleOut/inbox # terminal 4\njava ActuatorService.java # terminal 5\nBeobachtet: Hello World, in Terminal 1 getippt, erschien als Uryyb Jbeyq in Terminal 5. Die drei mittleren Terminals zeigten nichts Neues — jeder Vermittler gibt beim Start eine Zeile „Mediating: …” aus, und ProcessorService gibt überhaupt nichts aus. Danach enthielt jedes der vier Postfachverzeichnisse eine .msg-Datei: dieselbe Zeile, entlang der Kette kopiert.\nNachzählen: fünf Prozesse für das, was Schritt 1 in einer Anweisung tat. Die Anweisung des Tutorials an dieser Stelle lautet nicht, zu optimieren: „We are not done making it painful.”\n\n\n\n\n\n\nAbbildung 3.1: Die fünf Prozesse und die vier Postfachverzeichnisse. In der Webfassung folgt Abspielen einer Textzeile von der Tastatur zur Konsole.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectID": "02-part-ii-processes.html#sec-part-ii-result",
|
||||
"href": "02-part-ii-processes.html#sec-part-ii-result",
|
||||
"title": "3 Teil II — Die Prozessgrenze überschreiten",
|
||||
"section": "3.7 Was Teil II verschoben hat",
|
||||
"text": "3.7 Was Teil II verschoben hat\n\n\n\n\n\n\n\n\nStufe\nwo die Topologie liegt\nwer umverdrahten kann\n\n\n\n\nSchritt 1\nim Code der Fähigkeit\nwer diesen Code ändert\n\n\nSchritte 7–8\nin main(), als Postfachnamen\nwer main() ändert\n\n\nSchritt 18\nin den zwei Befehlszeilen Mediator.java <from> <to>\nwer die Prozesse startet\n\n\n\nDie Topologie hat den Quellcode nun ganz verlassen: keine .java-Datei enthält die Route. Sie steckt in dem, was der Bediener getippt hat — damit ist derzeit ein Mensch der Orchestrator. Was die Fünf-Prozess-Fassung einbringt, ist echt: die Verdrahtung kann sich ändern, ohne ein Programm anzufassen. Was sie kostet, ist ebenso echt: fünf Prozesse, vier Kopien jeder Nachricht und ein Programm, das bei Ctrl+D nicht mehr stehen bleibt.",
|
||||
"crumbs": [
|
||||
"<span class='chapter-number'>3</span> <span class='chapter-title'>[Part II — Cross the process boundary]{.en}[Partie II — Franchir la frontière de processus]{.fr}[Teil II — Die Prozessgrenze überschreiten]{.de}</span>"
|
||||
]
|
||||
}
|
||||
]
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* Bootstrap v5.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2023 The Bootstrap Authors
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap";:root,[data-bs-theme=light]{--bs-blue: #2780e3;--bs-indigo: #6610f2;--bs-purple: #613d7c;--bs-pink: #e83e8c;--bs-red: #ff0039;--bs-orange: #f0ad4e;--bs-yellow: #ff7518;--bs-green: #3fb618;--bs-teal: #20c997;--bs-cyan: #9954bb;--bs-black: #000;--bs-white: #fff;--bs-gray: #6c757d;--bs-gray-dark: #343a40;--bs-gray-100: #f8f9fa;--bs-gray-200: #e9ecef;--bs-gray-300: #dee2e6;--bs-gray-400: #ced4da;--bs-gray-500: #adb5bd;--bs-gray-600: #6c757d;--bs-gray-700: #495057;--bs-gray-800: #343a40;--bs-gray-900: #212529;--bs-default: #5a6879;--bs-primary: #20666f;--bs-secondary: #5a6879;--bs-success: #3fb618;--bs-info: #9954bb;--bs-warning: #ff7518;--bs-danger: #ff0039;--bs-light: #f8f9fa;--bs-dark: #343a40;--bs-default-rgb: 90, 104, 121;--bs-primary-rgb: 32, 102, 111;--bs-secondary-rgb: 90, 104, 121;--bs-success-rgb: 63, 182, 24;--bs-info-rgb: 153, 84, 187;--bs-warning-rgb: 255, 117, 24;--bs-danger-rgb: 255, 0, 57;--bs-light-rgb: 248, 249, 250;--bs-dark-rgb: 52, 58, 64;--bs-primary-text-emphasis: rgb(12.8, 40.8, 44.4);--bs-secondary-text-emphasis: rgb(36, 41.6, 48.4);--bs-success-text-emphasis: rgb(25.2, 72.8, 9.6);--bs-info-text-emphasis: rgb(61.2, 33.6, 74.8);--bs-warning-text-emphasis: rgb(102, 46.8, 9.6);--bs-danger-text-emphasis: rgb(102, 0, 22.8);--bs-light-text-emphasis: #495057;--bs-dark-text-emphasis: #495057;--bs-primary-bg-subtle: rgb(210.4, 224.4, 226.2);--bs-secondary-bg-subtle: rgb(222, 224.8, 228.2);--bs-success-bg-subtle: rgb(216.6, 240.4, 208.8);--bs-info-bg-subtle: rgb(234.6, 220.8, 241.4);--bs-warning-bg-subtle: rgb(255, 227.4, 208.8);--bs-danger-bg-subtle: rgb(255, 204, 215.4);--bs-light-bg-subtle: rgb(251.5, 252, 252.5);--bs-dark-bg-subtle: #ced4da;--bs-primary-border-subtle: rgb(165.8, 193.8, 197.4);--bs-secondary-border-subtle: rgb(189, 194.6, 201.4);--bs-success-border-subtle: rgb(178.2, 225.8, 162.6);--bs-info-border-subtle: rgb(214.2, 186.6, 227.8);--bs-warning-border-subtle: rgb(255, 199.8, 162.6);--bs-danger-border-subtle: rgb(255, 153, 175.8);--bs-light-border-subtle: #e9ecef;--bs-dark-border-subtle: #adb5bd;--bs-white-rgb: 255, 255, 255;--bs-black-rgb: 0, 0, 0;--bs-font-sans-serif: "IBM Plex Sans", system-ui, -apple-system, sans-serif;--bs-font-monospace: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-root-font-size: 17px;--bs-body-font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;--bs-body-font-size:1rem;--bs-body-font-weight: 400;--bs-body-line-height: 1.66;--bs-body-color: #1b2430;--bs-body-color-rgb: 27, 36, 48;--bs-body-bg: #fbfcfd;--bs-body-bg-rgb: 251, 252, 253;--bs-emphasis-color: #000;--bs-emphasis-color-rgb: 0, 0, 0;--bs-secondary-color: rgba(27, 36, 48, 0.75);--bs-secondary-color-rgb: 27, 36, 48;--bs-secondary-bg: #e9ecef;--bs-secondary-bg-rgb: 233, 236, 239;--bs-tertiary-color: rgba(27, 36, 48, 0.5);--bs-tertiary-color-rgb: 27, 36, 48;--bs-tertiary-bg: #f8f9fa;--bs-tertiary-bg-rgb: 248, 249, 250;--bs-heading-color: inherit;--bs-link-color: #20666f;--bs-link-color-rgb: 32, 102, 111;--bs-link-decoration: underline;--bs-link-hover-color: rgb(25.6, 81.6, 88.8);--bs-link-hover-color-rgb: 26, 82, 89;--bs-code-color: #1b2430;--bs-highlight-bg: rgb(255, 227.4, 208.8);--bs-border-width: 1px;--bs-border-style: solid;--bs-border-color: #dae0e8;--bs-border-color-translucent: rgba(0, 0, 0, 0.175);--bs-border-radius: 0.25rem;--bs-border-radius-sm: 0.2em;--bs-border-radius-lg: 0.5rem;--bs-border-radius-xl: 1rem;--bs-border-radius-xxl: 2rem;--bs-border-radius-2xl: var(--bs-border-radius-xxl);--bs-border-radius-pill: 50rem;--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width: 0.25rem;--bs-focus-ring-opacity: 0.25;--bs-focus-ring-color: rgba(32, 102, 111, 0.25);--bs-form-valid-color: #3fb618;--bs-form-valid-border-color: #3fb618;--bs-form-invalid-color: #ff0039;--bs-form-invalid-border-color: #ff0039}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color: #dee2e6;--bs-body-color-rgb: 222, 226, 230;--bs-body-bg: #212529;--bs-body-bg-rgb: 33, 37, 41;--bs-emphasis-color: #fff;--bs-emphasis-color-rgb: 255, 255, 255;--bs-secondary-color: rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb: 222, 226, 230;--bs-secondary-bg: #343a40;--bs-secondary-bg-rgb: 52, 58, 64;--bs-tertiary-color: rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb: 222, 226, 230;--bs-tertiary-bg: rgb(42.5, 47.5, 52.5);--bs-tertiary-bg-rgb: 43, 48, 53;--bs-primary-text-emphasis: rgb(121.2, 163.2, 168.6);--bs-secondary-text-emphasis: rgb(156, 164.4, 174.6);--bs-success-text-emphasis: rgb(139.8, 211.2, 116.4);--bs-info-text-emphasis: rgb(193.8, 152.4,Line truncated
|
||||
*
|
||||
* ansi colors from IPython notebook's
|
||||
*
|
||||
* we also add `bright-[color]-` synonyms for the `-[color]-intense` classes since
|
||||
* that seems to be what ansi_up emits
|
||||
*
|
||||
*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-black,.ansi-bright-black-fg{color:#282c36}.ansi-black-intense-black,.ansi-bright-black-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-red,.ansi-bright-red-fg{color:#b22b31}.ansi-red-intense-red,.ansi-bright-red-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-green,.ansi-bright-green-fg{color:#007427}.ansi-green-intense-green,.ansi-bright-green-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-yellow,.ansi-bright-yellow-fg{color:#b27d12}.ansi-yellow-intense-yellow,.ansi-bright-yellow-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-blue,.ansi-bright-blue-fg{color:#0065ca}.ansi-blue-intense-blue,.ansi-bright-blue-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-magenta,.ansi-bright-magenta-fg{color:#a03196}.ansi-magenta-intense-magenta,.ansi-bright-magenta-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-cyan,.ansi-bright-cyan-fg{color:#258f8f}.ansi-cyan-intense-cyan,.ansi-bright-cyan-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-white,.ansi-bright-white-fg{color:#a1a6b2}.ansi-white-intense-white,.ansi-bright-white-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fbfcfd;--quarto-body-color: #1b2430;--quarto-text-muted: #6c757d;--quarto-border-color: #dae0e8;--quarto-border-width: 1px}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:relative;float:right;background-color:rgba(0,0,0,0)}input[type=checkbox]{margin-right:.5ch}:root{--mermaid-bg-color: #fbfcfd;--mermaid-edge-color: #5a6879;--mermaid-node-fg-color: #1b2430;--mermaid-fg-color: #1b2430;--mermaid-fg-color--lighter: rgb(45.36, 60.48, 80.64);--mermaid-fg-color--lightest: rgb(63.72, 84.96, 113.28);--mermaid-font-family: IBM Plex Sans, system-ui, -apple-system, sans-serif;--mermaid-label-bg-color: #fbfcfd;--mermaid-label-fg-color: #20666f;--mermaid-node-bg-color: rgba(32, 102, 111, 0.1);--mermaid-node-fg-color: #1b2430}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}body.quarto-light .dark-content{display:none !important}body.quarto-dark .light-content{display:none !important}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button-tooltip{font-size:.75em}.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(94, 94, 94)" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5vLine truncated
|
||||
+2106
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap v5.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),s=t=>{t.dispatchEvent(new Event(i))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()})),f.push(e)):e()},g=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,_=(t,e,n=!0)=>{if(!n)return void g(t);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),g(t))};e.addEventListener(i,a),setTimeout((()=>{r||s(e)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=I(t);return C.has(o)||(o=t),[n,s,o]}function S(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(s,{delegateTarget:r}),n.oneOff&&N.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return P(n,{delegateTarget:t}),i.oneOff&&N.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function D(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function $(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&D(t,e,i,r.callable,r.delegationSelector)}function I(t){return t=t.replace(y,""),T[t]||t}const N={on(t,e,i,n){S(t,e,i,n,!1)},one(t,e,i,n){S(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))$(t,l,i,e.slLine truncated
|
||||
//# sourceMappingURL=bootstrap.bundle.min.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* clipboard.js v2.0.11
|
||||
* https://clipboardjs.com/
|
||||
*
|
||||
* Licensed MIT © Zeno Rocha
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:thLine truncated
|
||||
@@ -0,0 +1,86 @@
|
||||
/* exo — exercise cards, hint folds (sequential unlock), solution fold */
|
||||
|
||||
.exo {
|
||||
margin: 1.2rem 0;
|
||||
padding: 0.6rem 0.9rem;
|
||||
border: 1px solid color-mix(in srgb, var(--calc-notecolor, #B45309) 35%, transparent);
|
||||
border-left: 3px solid var(--calc-notecolor, #B45309);
|
||||
border-radius: 0.35rem;
|
||||
scroll-margin-top: 5rem;
|
||||
}
|
||||
/* keep wide content inside the card: display math (and tables/code) scroll
|
||||
on their own rather than spilling past the border. overflow-y stays hidden
|
||||
so Firefox doesn't add a phantom vertical bar, as in .calc */
|
||||
.exo mjx-container[display="true"],
|
||||
.exo .katex-display {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding-bottom: 0.35em; /* keep descenders clear of a horizontal bar */
|
||||
/* a centred overflowing box clips its left side out of reach, so centre
|
||||
only while the formula fits (browsers without `safe` keep plain centring) */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: safe center;
|
||||
}
|
||||
.exo .math.display { display: block; max-width: 100%; }
|
||||
.exo :is(pre, table) { max-width: 100%; overflow-x: auto; }
|
||||
.exo img, .exo svg { max-width: 100%; }
|
||||
|
||||
.exo-head p { margin: 0 0 0.4rem; }
|
||||
.exo-head strong { color: var(--calc-notecolor, #B45309); }
|
||||
|
||||
.exo details {
|
||||
margin: 0.45rem 0;
|
||||
border-radius: 0.3rem;
|
||||
}
|
||||
.exo details > summary {
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.exo details > summary::-webkit-details-marker { display: none; }
|
||||
.exo details > summary::before { content: "▸ "; }
|
||||
.exo details[open] > summary::before { content: "▾ "; }
|
||||
|
||||
/* hints: small highlight boxes */
|
||||
.exo-hint {
|
||||
background: color-mix(in srgb, var(--calc-notecolor, #B45309) 6%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--calc-notecolor, #B45309) 30%, transparent);
|
||||
padding: 0.25rem 0.6rem;
|
||||
}
|
||||
.exo-hint > summary { color: var(--calc-notecolor, #B45309); }
|
||||
|
||||
/* locked hints: unlock one by one */
|
||||
.exo-hint.exo-locked > summary {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.45;
|
||||
}
|
||||
.exo-hint.exo-locked > summary::before { content: "🔒 "; }
|
||||
|
||||
/* solution: closed by default, visually separated */
|
||||
.exo-sol {
|
||||
border-top: 1px dashed color-mix(in srgb, var(--calc-notecolor, #B45309) 40%, transparent);
|
||||
padding: 0.35rem 0.1rem 0.1rem;
|
||||
scroll-margin-top: 5rem;
|
||||
}
|
||||
/* in a numbered part, the fold lines up with the part's text */
|
||||
.exo li > details { margin-left: 0; }
|
||||
|
||||
/* hand-in extracts (handin.sh, html output) */
|
||||
.exo-handin-sol, .exo-handin-hint {
|
||||
margin: 0.6rem 0;
|
||||
padding: 0.2rem 0 0.2rem 0.8rem;
|
||||
border-left: 2px solid var(--calc-notecolor, #B45309);
|
||||
}
|
||||
|
||||
.exo-fold-body { margin-top: 0.3rem; }
|
||||
.exo-fold-body > p:first-child { margin-top: 0; }
|
||||
.exo-fold-body > p:last-child { margin-bottom: 0; }
|
||||
|
||||
@media print {
|
||||
.exo details > summary::before { content: ""; }
|
||||
.exo-hint.exo-locked > summary { opacity: 1; cursor: default; }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// exo — hints unlock one by one within a part; everything unfolds for printing
|
||||
(function () {
|
||||
// block opening a locked hint
|
||||
document.addEventListener("click", function (e) {
|
||||
var s = e.target.closest ? e.target.closest("details.exo-hint.exo-locked > summary") : null;
|
||||
if (s) e.preventDefault();
|
||||
});
|
||||
|
||||
// opening hint n of a part unlocks hint n+1 of the same part, wherever it
|
||||
// sits in the exercise (toggle doesn't bubble: use capture)
|
||||
document.addEventListener("toggle", function (e) {
|
||||
var d = e.target;
|
||||
if (!d.classList || !d.classList.contains("exo-hint") || !d.open) return;
|
||||
var chain = d.getAttribute("data-exo-chain");
|
||||
var n = parseInt(d.getAttribute("data-exo-hint"), 10);
|
||||
if (!chain || isNaN(n)) return;
|
||||
var hints = document.querySelectorAll("details.exo-hint[data-exo-chain]");
|
||||
for (var i = 0; i < hints.length; i++) {
|
||||
if (hints[i].getAttribute("data-exo-chain") === chain &&
|
||||
parseInt(hints[i].getAttribute("data-exo-hint"), 10) === n + 1) {
|
||||
hints[i].classList.remove("exo-locked");
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
||||
// print: open all hints/solutions, restore afterwards
|
||||
window.addEventListener("beforeprint", function () {
|
||||
document.querySelectorAll(".exo details").forEach(function (d) {
|
||||
d.dataset.exoWasOpen = d.open ? "1" : "0";
|
||||
d.open = true;
|
||||
});
|
||||
});
|
||||
window.addEventListener("afterprint", function () {
|
||||
document.querySelectorAll(".exo details").forEach(function (d) {
|
||||
d.open = d.dataset.exoWasOpen === "1";
|
||||
delete d.dataset.exoWasOpen;
|
||||
});
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,77 @@
|
||||
/* glossary — usages, entries, hover tooltip */
|
||||
|
||||
/* usages: dotted underline, keep math color */
|
||||
a.gls-sym,
|
||||
mjx-container a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.gls-sym {
|
||||
border-bottom: 1px dotted currentColor;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* rendered glossary list */
|
||||
.glossary .gls-entry {
|
||||
margin: 0.8rem 0;
|
||||
padding: 0.35rem 0.7rem;
|
||||
border-left: 3px solid var(--calc-notecolor, #B45309);
|
||||
scroll-margin-top: 5rem; /* don't hide behind Quarto's sticky header */
|
||||
}
|
||||
.glossary .gls-entry p { margin: 0 0 0.2rem; }
|
||||
.glossary .gls-entry:target {
|
||||
background: color-mix(in srgb, var(--calc-notecolor, #B45309) 10%, transparent);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
/* floating hover tooltip (filled by glossary.js) */
|
||||
.gls-float {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
max-width: 26rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border: 1px solid var(--calc-notecolor, #B45309);
|
||||
border-radius: 0.4rem;
|
||||
background: var(--bs-body-bg, #fff);
|
||||
color: var(--bs-body-color, #1a1a1a);
|
||||
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
|
||||
font-size: 0.9em;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.gls-float p { margin: 0 0 0.25rem; }
|
||||
.gls-float p:last-child { margin-bottom: 0; }
|
||||
|
||||
/* in-place definition cards and property sub-entries */
|
||||
.gls-inline {
|
||||
margin: 1rem 0;
|
||||
padding: 0.4rem 0.8rem;
|
||||
border-left: 3px solid var(--calc-notecolor, #B45309);
|
||||
scroll-margin-top: 5rem;
|
||||
}
|
||||
.gls-inline p { margin: 0 0 0.3rem; }
|
||||
.gls-inline:target,
|
||||
.gls-prop-entry:target {
|
||||
background: color-mix(in srgb, var(--calc-notecolor, #B45309) 10%, transparent);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.gls-prop-entry {
|
||||
margin: 0.5rem 0 0.5rem 1.2rem;
|
||||
padding: 0.25rem 0.6rem;
|
||||
border-left: 2px solid color-mix(in srgb, var(--calc-notecolor, #B45309) 45%, transparent);
|
||||
font-size: 0.95em;
|
||||
scroll-margin-top: 5rem;
|
||||
}
|
||||
.gls-back {
|
||||
font-size: 0.85em;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
/* standalone property cards keep the section flow (no indent) */
|
||||
.gls-prop-entry.gls-standalone {
|
||||
margin-left: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
.glossary .gls-prop-line {
|
||||
margin: 0.1rem 0 0.1rem 1.2rem;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// glossary — hover tooltip for .gls-sym usages (prose links and MathJax \class nodes)
|
||||
(function () {
|
||||
var tip = null;
|
||||
|
||||
function ensureTip() {
|
||||
if (tip === null) {
|
||||
tip = document.createElement("div");
|
||||
tip.className = "gls-float";
|
||||
tip.style.display = "none";
|
||||
document.body.appendChild(tip);
|
||||
}
|
||||
return tip;
|
||||
}
|
||||
|
||||
function keyOf(el) {
|
||||
if (el.dataset && el.dataset.glsKey) return el.dataset.glsKey;
|
||||
for (var i = 0; i < el.classList.length; i++) {
|
||||
var c = el.classList[i];
|
||||
if (c.indexOf("gls-key-") === 0) return c.slice(8);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function show(target) {
|
||||
var key = keyOf(target);
|
||||
if (!key) return;
|
||||
var entry = document.getElementById("gls-" + key);
|
||||
var t = ensureTip();
|
||||
if (entry) {
|
||||
// for a main entry, don't drag every property into the popup
|
||||
var node = entry.cloneNode(true);
|
||||
node.querySelectorAll(".gls-prop-entry").forEach(function (n) { n.remove(); });
|
||||
t.innerHTML = node.innerHTML;
|
||||
} else if (window.__glsData && window.__glsData[key]) {
|
||||
// entry lives on another page (book chapters render separately)
|
||||
t.innerHTML = window.__glsData[key];
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
t.style.display = "block";
|
||||
if (window.MathJax && window.MathJax.typesetPromise) {
|
||||
window.MathJax.typesetPromise([t]).catch(function () {});
|
||||
}
|
||||
var r = target.getBoundingClientRect();
|
||||
var x = r.left + window.scrollX;
|
||||
var y = r.bottom + window.scrollY + 6;
|
||||
// keep it on screen horizontally
|
||||
var w = t.offsetWidth;
|
||||
var maxX = window.scrollX + document.documentElement.clientWidth - w - 12;
|
||||
t.style.left = Math.max(window.scrollX + 8, Math.min(x, maxX)) + "px";
|
||||
t.style.top = y + "px";
|
||||
}
|
||||
|
||||
function hide() {
|
||||
if (tip !== null) tip.style.display = "none";
|
||||
}
|
||||
|
||||
document.addEventListener("mouseover", function (e) {
|
||||
var el = e.target.closest ? e.target.closest(".gls-sym") : null;
|
||||
if (el) show(el);
|
||||
});
|
||||
document.addEventListener("mouseout", function (e) {
|
||||
var el = e.target.closest ? e.target.closest(".gls-sym") : null;
|
||||
if (el) hide();
|
||||
});
|
||||
document.addEventListener("click", hide);
|
||||
window.addEventListener("scroll", hide, { passive: true });
|
||||
})();
|
||||
@@ -0,0 +1,45 @@
|
||||
/* latex-tables — HTML rendering of LaTeX tabular environments */
|
||||
|
||||
.ltx-table {
|
||||
border-collapse: collapse;
|
||||
margin: 1rem auto;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.ltx-table th,
|
||||
.ltx-table td {
|
||||
padding: 0.35em 0.7em;
|
||||
vertical-align: top;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.ltx-table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* alignment */
|
||||
.ltx-l { text-align: left; }
|
||||
.ltx-c { text-align: center; }
|
||||
.ltx-r { text-align: right; }
|
||||
|
||||
/* vertical rules (from | in the column spec) */
|
||||
.ltx-bl { border-left: 1px solid currentColor; }
|
||||
.ltx-br { border-right: 1px solid currentColor; }
|
||||
|
||||
/* horizontal rules: t = above the row, b = below.
|
||||
1 = \hline / \midrule / \cline, 2 = booktabs \toprule / \bottomrule,
|
||||
d = doubled rule (\hline\hline) */
|
||||
.ltx-t1 { border-top: 1px solid currentColor; }
|
||||
.ltx-b1 { border-bottom: 1px solid currentColor; }
|
||||
.ltx-t2 { border-top: 1.6px solid currentColor; }
|
||||
.ltx-b2 { border-bottom: 1.6px solid currentColor; }
|
||||
.ltx-td { border-top: 3px double currentColor; }
|
||||
.ltx-bd { border-bottom: 3px double currentColor; }
|
||||
|
||||
/* keep wide tables usable on narrow screens */
|
||||
@media (max-width: 700px) {
|
||||
.ltx-table { font-size: 0.9em; }
|
||||
.ltx-table th, .ltx-table td { padding: 0.25em 0.45em; }
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/* calc-notes — HTML layout for the calc / calc* environments */
|
||||
|
||||
.calc {
|
||||
display: grid;
|
||||
/* lhs | rhs | notes | equation number */
|
||||
grid-template-columns: max-content max-content minmax(8rem, 1fr) auto;
|
||||
column-gap: 0.35rem;
|
||||
row-gap: 0.6rem;
|
||||
align-items: baseline;
|
||||
margin: 1rem 0 1.4rem;
|
||||
/* allow horizontal scrolling for very wide equations, but never show a
|
||||
vertical bar (Firefox computes phantom vertical overflow otherwise) */
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding-bottom: 0.4em; /* keep descenders clear of a horizontal bar */
|
||||
}
|
||||
|
||||
.calc-row { display: contents; }
|
||||
|
||||
.calc-lhs { grid-column: 1; justify-self: end; }
|
||||
.calc-rhs { grid-column: 2; justify-self: start; }
|
||||
.calc-full { grid-column: 1 / 3; justify-self: start; }
|
||||
|
||||
/* ---- notes ------------------------------------------------------- */
|
||||
|
||||
.calc-notes {
|
||||
grid-column: 3;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem 0.75rem;
|
||||
align-items: baseline;
|
||||
min-width: 0;
|
||||
padding-left: 0.9rem;
|
||||
}
|
||||
|
||||
.calc-note {
|
||||
color: var(--calc-notecolor, #B45309);
|
||||
font-size: 0.85em;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.calc-note > summary {
|
||||
cursor: pointer;
|
||||
list-style: none; /* remove the default triangle ... */
|
||||
user-select: none;
|
||||
opacity: 0.7;
|
||||
font-style: italic;
|
||||
}
|
||||
.calc-note > summary::-webkit-details-marker { display: none; }
|
||||
.calc-note > summary::before { content: "▸ "; font-style: normal; }
|
||||
.calc-note[open] > summary::before { content: "▾ "; }
|
||||
.calc-note > summary:hover { opacity: 1; }
|
||||
|
||||
.calc-note[open] {
|
||||
background: color-mix(in srgb, var(--calc-notecolor, #B45309) 8%, transparent);
|
||||
border-left: 2px solid var(--calc-notecolor, #B45309);
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.15rem 0.45rem;
|
||||
}
|
||||
|
||||
.calc-note-body { margin-top: 0.1rem; }
|
||||
.calc-note-body p { margin: 0; }
|
||||
|
||||
/* \mnote: math note (no extra styling needed — body is typeset math) */
|
||||
.calc-note-math .calc-note-body { padding: 0.1rem 0; }
|
||||
|
||||
/* ---- calc*: boxed final result ----------------------------------- */
|
||||
|
||||
.calc-box {
|
||||
display: inline-block;
|
||||
border: 1.5px solid currentColor;
|
||||
border-radius: 0.3em;
|
||||
padding: 0.3em 0.65em;
|
||||
margin-top: 0.15em;
|
||||
background: color-mix(in srgb, currentColor 4%, transparent);
|
||||
}
|
||||
|
||||
/* ---- labelled blocks: equation number on the last line ----------- */
|
||||
|
||||
.calc-tag {
|
||||
grid-column: 4;
|
||||
justify-self: end;
|
||||
padding-left: 1rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ---- printing: show notes unfolded, like the PDF ------------------ */
|
||||
|
||||
@media print {
|
||||
.calc-note > summary { display: none; }
|
||||
.calc-note[open] { background: none; border: none; padding: 0; }
|
||||
}
|
||||
|
||||
/* small screens: notes drop under the equation line */
|
||||
@media (max-width: 560px) {
|
||||
.calc { grid-template-columns: max-content 1fr; }
|
||||
.calc-notes { grid-column: 1 / 3; padding-left: 1.5rem; }
|
||||
.calc-full { grid-column: 1 / 3; }
|
||||
.calc-tag { grid-column: 1 / -1; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// calc-notes — open every note before printing, restore afterwards
|
||||
(function () {
|
||||
window.addEventListener("beforeprint", function () {
|
||||
document.querySelectorAll("details.calc-note").forEach(function (d) {
|
||||
d.dataset.calcWasOpen = d.open ? "1" : "0";
|
||||
d.open = true;
|
||||
});
|
||||
});
|
||||
window.addEventListener("afterprint", function () {
|
||||
document.querySelectorAll("details.calc-note").forEach(function (d) {
|
||||
d.open = d.dataset.calcWasOpen === "1";
|
||||
delete d.dataset.calcWasOpen;
|
||||
});
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,9 @@
|
||||
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
||||
//
|
||||
// AnchorJS - v5.0.0 - 2023-01-18
|
||||
// https://www.bryanbraun.com/anchorjs/
|
||||
// Copyright (c) 2023 Bryan Braun; Licensed MIT
|
||||
//
|
||||
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
||||
!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i<e.length;i++)if(this.hasAnchorJSLink(e[i]))p.push(i);else{if(e[i].hasAttribute("id"))o=e[i].getAttribute("id");else if(e[i].hasAttribute("data-anchor-id"))o=e[i].getAttribute("data-anchor-id");else{for(r=a=this.urlify(e[i].textContent),s=0;n=t.indexOf(r=void 0!==n?a+"-"+s:r),s+=1,-1!==n;);n=void 0,t.push(r),e[i].setAttribute("id",r),o=r}(l=document.createElement("a")).className="anchorjs-link "+this.options.class,l.setAttribute("aria-label",this.options.ariaLabel),l.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(l.title=this.options.titleText),c=document.querySelector("base")?window.location.pathname+window.location.search:"",c=this.options.base||c,l.href=c+"#"+o,"always"===this.options.visible&&(l.style.opacity="1"),""===this.options.icon&&(l.style.font="1em/1 anchorjs-icons","left"===this.options.placement)&&(l.style.lineHeight="inherit"),"left"===this.options.placement?(l.style.position="absolute",l.style.marginLeft="-1.25em",l.style.paddingRight=".25em",l.style.paddingLeft=".25em",e[i].insertBefore(l,e[i].firstChild)):(l.style.marginLeft=".1875em",l.style.paddingRight=".1875em",l.style.paddingLeft=".1875em",e[i].appendChild(l))}for(i=0;i<p.length;i++)e.splice(p[i]-i,1);this.elements=this.elements.concat(e)}return this},this.remove=function(A){for(var e,t,o=d(A),i=0;i<o.length;i++)(t=o[i].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(o[i]))&&this.elements.splice(e,1),o[i].removeChild(t));return this},this.removeAll=function(){thisLine truncated
|
||||
// @license-end
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @popperjs/core v2.11.7 - MIT License
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _(e,r,o){return r===H?I(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.lLine truncated
|
||||
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
/* quarto syntax highlight colors */
|
||||
:root {
|
||||
--quarto-hl-ot-color: #003B4F;
|
||||
--quarto-hl-at-color: #657422;
|
||||
--quarto-hl-ss-color: #20794D;
|
||||
--quarto-hl-an-color: #5E5E5E;
|
||||
--quarto-hl-fu-color: #4758AB;
|
||||
--quarto-hl-st-color: #20794D;
|
||||
--quarto-hl-cf-color: #003B4F;
|
||||
--quarto-hl-op-color: #5E5E5E;
|
||||
--quarto-hl-er-color: #AD0000;
|
||||
--quarto-hl-bn-color: #AD0000;
|
||||
--quarto-hl-al-color: #AD0000;
|
||||
--quarto-hl-va-color: #111111;
|
||||
--quarto-hl-bu-color: inherit;
|
||||
--quarto-hl-ex-color: inherit;
|
||||
--quarto-hl-pp-color: #AD0000;
|
||||
--quarto-hl-in-color: #5E5E5E;
|
||||
--quarto-hl-vs-color: #20794D;
|
||||
--quarto-hl-wa-color: #5E5E5E;
|
||||
--quarto-hl-do-color: #5E5E5E;
|
||||
--quarto-hl-im-color: #00769E;
|
||||
--quarto-hl-ch-color: #20794D;
|
||||
--quarto-hl-dt-color: #AD0000;
|
||||
--quarto-hl-fl-color: #AD0000;
|
||||
--quarto-hl-co-color: #5E5E5E;
|
||||
--quarto-hl-cv-color: #5E5E5E;
|
||||
--quarto-hl-cn-color: #8f5902;
|
||||
--quarto-hl-sc-color: #5E5E5E;
|
||||
--quarto-hl-dv-color: #AD0000;
|
||||
--quarto-hl-kw-color: #003B4F;
|
||||
}
|
||||
|
||||
/* other quarto variables */
|
||||
:root {
|
||||
--quarto-font-monospace: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
/* syntax highlight based on Pandoc's rules */
|
||||
pre > code.sourceCode > span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
code.sourceCode > span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
div.sourceCode,
|
||||
div.sourceCode pre.sourceCode {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
/* Normal */
|
||||
code span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
code span.al {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Annotation */
|
||||
code span.an {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Attribute */
|
||||
code span.at {
|
||||
color: #657422;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* BaseN */
|
||||
code span.bn {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* BuiltIn */
|
||||
code span.bu {
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* ControlFlow */
|
||||
code span.cf {
|
||||
color: #003B4F;
|
||||
font-weight: bold;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Char */
|
||||
code span.ch {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Constant */
|
||||
code span.cn {
|
||||
color: #8f5902;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
code span.co {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* CommentVar */
|
||||
code span.cv {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Documentation */
|
||||
code span.do {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* DataType */
|
||||
code span.dt {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* DecVal */
|
||||
code span.dv {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Error */
|
||||
code span.er {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Extension */
|
||||
code span.ex {
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Float */
|
||||
code span.fl {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Function */
|
||||
code span.fu {
|
||||
color: #4758AB;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Import */
|
||||
code span.im {
|
||||
color: #00769E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Information */
|
||||
code span.in {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Keyword */
|
||||
code span.kw {
|
||||
color: #003B4F;
|
||||
font-weight: bold;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Operator */
|
||||
code span.op {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Other */
|
||||
code span.ot {
|
||||
color: #003B4F;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Preprocessor */
|
||||
code span.pp {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* SpecialChar */
|
||||
code span.sc {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* SpecialString */
|
||||
code span.ss {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* String */
|
||||
code span.st {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Variable */
|
||||
code span.va {
|
||||
color: #111111;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* VerbatimString */
|
||||
code span.vs {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
/* Warning */
|
||||
code span.wa {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.prevent-inlining {
|
||||
content: "</";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=39d13593ecb7db6d02e40e1582482a0e.css.map */
|
||||
@@ -0,0 +1,845 @@
|
||||
import * as tabsets from "./tabsets/tabsets.js";
|
||||
|
||||
const sectionChanged = new CustomEvent("quarto-sectionChanged", {
|
||||
detail: {},
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: false,
|
||||
});
|
||||
|
||||
const layoutMarginEls = () => {
|
||||
// Find any conflicting margin elements and add margins to the
|
||||
// top to prevent overlap
|
||||
const marginChildren = window.document.querySelectorAll(
|
||||
".column-margin.column-container > *, .margin-caption, .aside"
|
||||
);
|
||||
|
||||
let lastBottom = 0;
|
||||
for (const marginChild of marginChildren) {
|
||||
if (marginChild.offsetParent !== null) {
|
||||
// clear the top margin so we recompute it
|
||||
marginChild.style.marginTop = null;
|
||||
const top = marginChild.getBoundingClientRect().top + window.scrollY;
|
||||
if (top < lastBottom) {
|
||||
const marginChildStyle = window.getComputedStyle(marginChild);
|
||||
const marginBottom = parseFloat(marginChildStyle["marginBottom"]);
|
||||
const margin = lastBottom - top + marginBottom;
|
||||
marginChild.style.marginTop = `${margin}px`;
|
||||
}
|
||||
const styles = window.getComputedStyle(marginChild);
|
||||
const marginTop = parseFloat(styles["marginTop"]);
|
||||
lastBottom = top + marginChild.getBoundingClientRect().height + marginTop;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", function (_event) {
|
||||
// Recompute the position of margin elements anytime the body size changes
|
||||
if (window.ResizeObserver) {
|
||||
const resizeObserver = new window.ResizeObserver(
|
||||
throttle(() => {
|
||||
layoutMarginEls();
|
||||
if (
|
||||
window.document.body.getBoundingClientRect().width < 990 &&
|
||||
isReaderMode()
|
||||
) {
|
||||
quartoToggleReader();
|
||||
}
|
||||
}, 50)
|
||||
);
|
||||
resizeObserver.observe(window.document.body);
|
||||
}
|
||||
|
||||
const tocEl = window.document.querySelector('nav.toc-active[role="doc-toc"]');
|
||||
const sidebarEl = window.document.getElementById("quarto-sidebar");
|
||||
const leftTocEl = window.document.getElementById("quarto-sidebar-toc-left");
|
||||
const marginSidebarEl = window.document.getElementById(
|
||||
"quarto-margin-sidebar"
|
||||
);
|
||||
// function to determine whether the element has a previous sibling that is active
|
||||
const prevSiblingIsActiveLink = (el) => {
|
||||
const sibling = el.previousElementSibling;
|
||||
if (sibling && sibling.tagName === "A") {
|
||||
return sibling.classList.contains("active");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// dispatch for htmlwidgets
|
||||
// they use slideenter event to trigger resize
|
||||
function fireSlideEnter() {
|
||||
const event = window.document.createEvent("Event");
|
||||
event.initEvent("slideenter", true, true);
|
||||
window.document.dispatchEvent(event);
|
||||
}
|
||||
|
||||
const tabs = window.document.querySelectorAll('a[data-bs-toggle="tab"]');
|
||||
tabs.forEach((tab) => {
|
||||
tab.addEventListener("shown.bs.tab", fireSlideEnter);
|
||||
});
|
||||
|
||||
// dispatch for shiny
|
||||
// they use BS shown and hidden events to trigger rendering
|
||||
function distpatchShinyEvents(previous, current) {
|
||||
if (window.jQuery) {
|
||||
if (previous) {
|
||||
window.jQuery(previous).trigger("hidden");
|
||||
}
|
||||
if (current) {
|
||||
window.jQuery(current).trigger("shown");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tabby.js listener: Trigger event for htmlwidget and shiny
|
||||
document.addEventListener(
|
||||
"tabby",
|
||||
function (event) {
|
||||
fireSlideEnter();
|
||||
distpatchShinyEvents(event.detail.previousTab, event.detail.tab);
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
// Track scrolling and mark TOC links as active
|
||||
// get table of contents and sidebar (bail if we don't have at least one)
|
||||
const tocLinks = tocEl
|
||||
? [...tocEl.querySelectorAll("a[data-scroll-target]")]
|
||||
: [];
|
||||
const makeActive = (link) => tocLinks[link].classList.add("active");
|
||||
const removeActive = (link) => tocLinks[link].classList.remove("active");
|
||||
const removeAllActive = () =>
|
||||
[...Array(tocLinks.length).keys()].forEach((link) => removeActive(link));
|
||||
|
||||
// activate the anchor for a section associated with this TOC entry
|
||||
tocLinks.forEach((link) => {
|
||||
link.addEventListener("click", () => {
|
||||
if (link.href.indexOf("#") !== -1) {
|
||||
const anchor = link.href.split("#")[1];
|
||||
const heading = window.document.querySelector(
|
||||
`[data-anchor-id="${anchor}"]`
|
||||
);
|
||||
if (heading) {
|
||||
// Add the class
|
||||
heading.classList.add("reveal-anchorjs-link");
|
||||
|
||||
// function to show the anchor
|
||||
const handleMouseout = () => {
|
||||
heading.classList.remove("reveal-anchorjs-link");
|
||||
heading.removeEventListener("mouseout", handleMouseout);
|
||||
};
|
||||
|
||||
// add a function to clear the anchor when the user mouses out of it
|
||||
heading.addEventListener("mouseout", handleMouseout);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const sections = tocLinks.map((link) => {
|
||||
const target = link.getAttribute("data-scroll-target");
|
||||
if (target.startsWith("#")) {
|
||||
return window.document.getElementById(decodeURI(`${target.slice(1)}`));
|
||||
} else {
|
||||
return window.document.querySelector(decodeURI(`${target}`));
|
||||
}
|
||||
});
|
||||
|
||||
const sectionMargin = 200;
|
||||
let currentActive = 0;
|
||||
// track whether we've initialized state the first time
|
||||
let init = false;
|
||||
|
||||
const updateActiveLink = () => {
|
||||
// The index from bottom to top (e.g. reversed list)
|
||||
let sectionIndex = -1;
|
||||
if (
|
||||
window.innerHeight + window.pageYOffset >=
|
||||
window.document.body.offsetHeight
|
||||
) {
|
||||
// This is the no-scroll case where last section should be the active one
|
||||
sectionIndex = 0;
|
||||
} else {
|
||||
// This finds the last section visible on screen that should be made active
|
||||
sectionIndex = [...sections].reverse().findIndex((section) => {
|
||||
if (section) {
|
||||
return window.pageYOffset >= section.offsetTop - sectionMargin;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (sectionIndex > -1) {
|
||||
const current = sections.length - sectionIndex - 1;
|
||||
if (current !== currentActive) {
|
||||
removeAllActive();
|
||||
currentActive = current;
|
||||
makeActive(current);
|
||||
if (init) {
|
||||
window.dispatchEvent(sectionChanged);
|
||||
}
|
||||
init = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const inHiddenRegion = (top, bottom, hiddenRegions) => {
|
||||
for (const region of hiddenRegions) {
|
||||
if (top <= region.bottom && bottom >= region.top) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const categorySelector = "header.quarto-title-block .quarto-category";
|
||||
const activateCategories = (href) => {
|
||||
// Find any categories
|
||||
// Surround them with a link pointing back to:
|
||||
// #category=Authoring
|
||||
try {
|
||||
const categoryEls = window.document.querySelectorAll(categorySelector);
|
||||
for (const categoryEl of categoryEls) {
|
||||
const categoryText = categoryEl.textContent;
|
||||
if (categoryText) {
|
||||
const link = `${href}#category=${encodeURIComponent(categoryText)}`;
|
||||
const linkEl = window.document.createElement("a");
|
||||
linkEl.setAttribute("href", link);
|
||||
for (const child of categoryEl.childNodes) {
|
||||
linkEl.append(child);
|
||||
}
|
||||
categoryEl.appendChild(linkEl);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Ignore errors
|
||||
}
|
||||
};
|
||||
function hasTitleCategories() {
|
||||
return window.document.querySelector(categorySelector) !== null;
|
||||
}
|
||||
|
||||
function offsetRelativeUrl(url) {
|
||||
const offset = getMeta("quarto:offset");
|
||||
return offset ? offset + url : url;
|
||||
}
|
||||
|
||||
function offsetAbsoluteUrl(url) {
|
||||
const offset = getMeta("quarto:offset");
|
||||
const baseUrl = new URL(offset, window.location);
|
||||
|
||||
const projRelativeUrl = url.replace(baseUrl, "");
|
||||
if (projRelativeUrl.startsWith("/")) {
|
||||
return projRelativeUrl;
|
||||
} else {
|
||||
return "/" + projRelativeUrl;
|
||||
}
|
||||
}
|
||||
|
||||
// read a meta tag value
|
||||
function getMeta(metaName) {
|
||||
const metas = window.document.getElementsByTagName("meta");
|
||||
for (let i = 0; i < metas.length; i++) {
|
||||
if (metas[i].getAttribute("name") === metaName) {
|
||||
return metas[i].getAttribute("content");
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
async function findAndActivateCategories() {
|
||||
// Categories search with listing only use path without query
|
||||
const currentPagePath = offsetAbsoluteUrl(
|
||||
window.location.origin + window.location.pathname
|
||||
);
|
||||
const response = await fetch(offsetRelativeUrl("listings.json"));
|
||||
if (response.status == 200) {
|
||||
return response.json().then(function (listingPaths) {
|
||||
const listingHrefs = [];
|
||||
for (const listingPath of listingPaths) {
|
||||
const pathWithoutLeadingSlash = listingPath.listing.substring(1);
|
||||
for (const item of listingPath.items) {
|
||||
const encodedItem = encodeURI(item);
|
||||
if (
|
||||
encodedItem === currentPagePath ||
|
||||
encodedItem === currentPagePath + "index.html"
|
||||
) {
|
||||
// Resolve this path against the offset to be sure
|
||||
// we already are using the correct path to the listing
|
||||
// (this adjusts the listing urls to be rooted against
|
||||
// whatever root the page is actually running against)
|
||||
const relative = offsetRelativeUrl(pathWithoutLeadingSlash);
|
||||
const baseUrl = window.location;
|
||||
const resolvedPath = new URL(relative, baseUrl);
|
||||
listingHrefs.push(resolvedPath.pathname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Look up the tree for a nearby linting and use that if we find one
|
||||
const nearestListing = findNearestParentListing(
|
||||
offsetAbsoluteUrl(window.location.pathname),
|
||||
listingHrefs
|
||||
);
|
||||
if (nearestListing) {
|
||||
activateCategories(nearestListing);
|
||||
} else {
|
||||
// See if the referrer is a listing page for this item
|
||||
const referredRelativePath = offsetAbsoluteUrl(document.referrer);
|
||||
const referrerListing = listingHrefs.find((listingHref) => {
|
||||
const isListingReferrer =
|
||||
listingHref === referredRelativePath ||
|
||||
listingHref === referredRelativePath + "index.html";
|
||||
return isListingReferrer;
|
||||
});
|
||||
|
||||
if (referrerListing) {
|
||||
// Try to use the referrer if possible
|
||||
activateCategories(referrerListing);
|
||||
} else if (listingHrefs.length > 0) {
|
||||
// Otherwise, just fall back to the first listing
|
||||
activateCategories(listingHrefs[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (hasTitleCategories()) {
|
||||
findAndActivateCategories();
|
||||
}
|
||||
|
||||
const findNearestParentListing = (href, listingHrefs) => {
|
||||
if (!href || !listingHrefs) {
|
||||
return undefined;
|
||||
}
|
||||
// Look up the tree for a nearby linting and use that if we find one
|
||||
const relativeParts = href.substring(1).split("/");
|
||||
while (relativeParts.length > 0) {
|
||||
const path = relativeParts.join("/");
|
||||
for (const listingHref of listingHrefs) {
|
||||
if (listingHref.startsWith(path)) {
|
||||
return listingHref;
|
||||
}
|
||||
}
|
||||
relativeParts.pop();
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const manageSidebarVisiblity = (el, placeholderDescriptor) => {
|
||||
let isVisible = true;
|
||||
let elRect;
|
||||
|
||||
return (hiddenRegions) => {
|
||||
if (el === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the last element of the TOC
|
||||
const lastChildEl = el.lastElementChild;
|
||||
|
||||
if (lastChildEl) {
|
||||
// Converts the sidebar to a menu
|
||||
const convertToMenu = () => {
|
||||
for (const child of el.children) {
|
||||
child.style.opacity = 0;
|
||||
child.style.overflow = "hidden";
|
||||
child.style.pointerEvents = "none";
|
||||
}
|
||||
|
||||
nexttick(() => {
|
||||
const toggleContainer = window.document.createElement("div");
|
||||
toggleContainer.style.width = "100%";
|
||||
toggleContainer.classList.add("zindex-over-content");
|
||||
toggleContainer.classList.add("quarto-sidebar-toggle");
|
||||
toggleContainer.classList.add("headroom-target"); // Marks this to be managed by headeroom
|
||||
toggleContainer.id = placeholderDescriptor.id;
|
||||
toggleContainer.style.position = "fixed";
|
||||
|
||||
const toggleIcon = window.document.createElement("i");
|
||||
toggleIcon.classList.add("quarto-sidebar-toggle-icon");
|
||||
toggleIcon.classList.add("bi");
|
||||
toggleIcon.classList.add("bi-caret-down-fill");
|
||||
|
||||
const toggleTitle = window.document.createElement("div");
|
||||
const titleEl = window.document.body.querySelector(
|
||||
placeholderDescriptor.titleSelector
|
||||
);
|
||||
if (titleEl) {
|
||||
toggleTitle.append(
|
||||
titleEl.textContent || titleEl.innerText,
|
||||
toggleIcon
|
||||
);
|
||||
}
|
||||
toggleTitle.classList.add("zindex-over-content");
|
||||
toggleTitle.classList.add("quarto-sidebar-toggle-title");
|
||||
toggleContainer.append(toggleTitle);
|
||||
|
||||
const toggleContents = window.document.createElement("div");
|
||||
toggleContents.classList = el.classList;
|
||||
toggleContents.classList.add("zindex-over-content");
|
||||
toggleContents.classList.add("quarto-sidebar-toggle-contents");
|
||||
for (const child of el.children) {
|
||||
if (child.id === "toc-title") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const clone = child.cloneNode(true);
|
||||
clone.style.opacity = 1;
|
||||
clone.style.pointerEvents = null;
|
||||
clone.style.display = null;
|
||||
toggleContents.append(clone);
|
||||
}
|
||||
toggleContents.style.height = "0px";
|
||||
const positionToggle = () => {
|
||||
// position the element (top left of parent, same width as parent)
|
||||
if (!elRect) {
|
||||
elRect = el.getBoundingClientRect();
|
||||
}
|
||||
toggleContainer.style.left = `${elRect.left}px`;
|
||||
toggleContainer.style.top = `${elRect.top}px`;
|
||||
toggleContainer.style.width = `${elRect.width}px`;
|
||||
};
|
||||
positionToggle();
|
||||
|
||||
toggleContainer.append(toggleContents);
|
||||
el.parentElement.prepend(toggleContainer);
|
||||
|
||||
// Process clicks
|
||||
let tocShowing = false;
|
||||
// Allow the caller to control whether this is dismissed
|
||||
// when it is clicked (e.g. sidebar navigation supports
|
||||
// opening and closing the nav tree, so don't dismiss on click)
|
||||
const clickEl = placeholderDescriptor.dismissOnClick
|
||||
? toggleContainer
|
||||
: toggleTitle;
|
||||
|
||||
const closeToggle = () => {
|
||||
if (tocShowing) {
|
||||
toggleContainer.classList.remove("expanded");
|
||||
toggleContents.style.height = "0px";
|
||||
tocShowing = false;
|
||||
}
|
||||
};
|
||||
|
||||
// Get rid of any expanded toggle if the user scrolls
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
throttle(() => {
|
||||
closeToggle();
|
||||
}, 50)
|
||||
);
|
||||
|
||||
// Handle positioning of the toggle
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(() => {
|
||||
elRect = undefined;
|
||||
positionToggle();
|
||||
}, 50)
|
||||
);
|
||||
|
||||
window.addEventListener("quarto-hrChanged", () => {
|
||||
elRect = undefined;
|
||||
});
|
||||
|
||||
// Process the click
|
||||
clickEl.onclick = () => {
|
||||
if (!tocShowing) {
|
||||
toggleContainer.classList.add("expanded");
|
||||
toggleContents.style.height = null;
|
||||
tocShowing = true;
|
||||
} else {
|
||||
closeToggle();
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
// Converts a sidebar from a menu back to a sidebar
|
||||
const convertToSidebar = () => {
|
||||
for (const child of el.children) {
|
||||
child.style.opacity = 1;
|
||||
child.style.overflow = null;
|
||||
child.style.pointerEvents = null;
|
||||
}
|
||||
|
||||
const placeholderEl = window.document.getElementById(
|
||||
placeholderDescriptor.id
|
||||
);
|
||||
if (placeholderEl) {
|
||||
placeholderEl.remove();
|
||||
}
|
||||
|
||||
el.classList.remove("rollup");
|
||||
};
|
||||
|
||||
if (isReaderMode()) {
|
||||
convertToMenu();
|
||||
isVisible = false;
|
||||
} else {
|
||||
// Find the top and bottom o the element that is being managed
|
||||
const elTop = el.offsetTop;
|
||||
const elBottom =
|
||||
elTop + lastChildEl.offsetTop + lastChildEl.offsetHeight;
|
||||
|
||||
if (!isVisible) {
|
||||
// If the element is current not visible reveal if there are
|
||||
// no conflicts with overlay regions
|
||||
if (!inHiddenRegion(elTop, elBottom, hiddenRegions)) {
|
||||
convertToSidebar();
|
||||
isVisible = true;
|
||||
}
|
||||
} else {
|
||||
// If the element is visible, hide it if it conflicts with overlay regions
|
||||
// and insert a placeholder toggle (or if we're in reader mode)
|
||||
if (inHiddenRegion(elTop, elBottom, hiddenRegions)) {
|
||||
convertToMenu();
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const tabEls = document.querySelectorAll('a[data-bs-toggle="tab"]');
|
||||
for (const tabEl of tabEls) {
|
||||
const id = tabEl.getAttribute("data-bs-target");
|
||||
if (id) {
|
||||
const columnEl = document.querySelector(
|
||||
`${id} .column-margin, .tabset-margin-content`
|
||||
);
|
||||
if (columnEl)
|
||||
tabEl.addEventListener("shown.bs.tab", function (event) {
|
||||
const el = event.srcElement;
|
||||
if (el) {
|
||||
const visibleCls = `${el.id}-margin-content`;
|
||||
// walk up until we find a parent tabset
|
||||
let panelTabsetEl = el.parentElement;
|
||||
while (panelTabsetEl) {
|
||||
if (panelTabsetEl.classList.contains("panel-tabset")) {
|
||||
break;
|
||||
}
|
||||
panelTabsetEl = panelTabsetEl.parentElement;
|
||||
}
|
||||
|
||||
if (panelTabsetEl) {
|
||||
const prevSib = panelTabsetEl.previousElementSibling;
|
||||
if (
|
||||
prevSib &&
|
||||
prevSib.classList.contains("tabset-margin-container")
|
||||
) {
|
||||
const childNodes = prevSib.querySelectorAll(
|
||||
".tabset-margin-content"
|
||||
);
|
||||
for (const childEl of childNodes) {
|
||||
if (childEl.classList.contains(visibleCls)) {
|
||||
childEl.classList.remove("collapse");
|
||||
} else {
|
||||
childEl.classList.add("collapse");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
layoutMarginEls();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Manage the visibility of the toc and the sidebar
|
||||
const marginScrollVisibility = manageSidebarVisiblity(marginSidebarEl, {
|
||||
id: "quarto-toc-toggle",
|
||||
titleSelector: "#toc-title",
|
||||
dismissOnClick: true,
|
||||
});
|
||||
const sidebarScrollVisiblity = manageSidebarVisiblity(sidebarEl, {
|
||||
id: "quarto-sidebarnav-toggle",
|
||||
titleSelector: ".title",
|
||||
dismissOnClick: false,
|
||||
});
|
||||
let tocLeftScrollVisibility;
|
||||
if (leftTocEl) {
|
||||
tocLeftScrollVisibility = manageSidebarVisiblity(leftTocEl, {
|
||||
id: "quarto-lefttoc-toggle",
|
||||
titleSelector: "#toc-title",
|
||||
dismissOnClick: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Find the first element that uses formatting in special columns
|
||||
const conflictingEls = window.document.body.querySelectorAll(
|
||||
'[class^="column-"], [class*=" column-"], aside, [class*="margin-caption"], [class*=" margin-caption"], [class*="margin-ref"], [class*=" margin-ref"]'
|
||||
);
|
||||
|
||||
// Filter all the possibly conflicting elements into ones
|
||||
// the do conflict on the left or ride side
|
||||
const arrConflictingEls = Array.from(conflictingEls);
|
||||
const leftSideConflictEls = arrConflictingEls.filter((el) => {
|
||||
if (el.tagName === "ASIDE") {
|
||||
return false;
|
||||
}
|
||||
return Array.from(el.classList).find((className) => {
|
||||
return (
|
||||
className !== "column-body" &&
|
||||
className.startsWith("column-") &&
|
||||
!className.endsWith("right") &&
|
||||
!className.endsWith("container") &&
|
||||
className !== "column-margin"
|
||||
);
|
||||
});
|
||||
});
|
||||
const rightSideConflictEls = arrConflictingEls.filter((el) => {
|
||||
if (el.tagName === "ASIDE") {
|
||||
return true;
|
||||
}
|
||||
|
||||
const hasMarginCaption = Array.from(el.classList).find((className) => {
|
||||
return className == "margin-caption";
|
||||
});
|
||||
if (hasMarginCaption) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return Array.from(el.classList).find((className) => {
|
||||
return (
|
||||
className !== "column-body" &&
|
||||
!className.endsWith("container") &&
|
||||
className.startsWith("column-") &&
|
||||
!className.endsWith("left")
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
const kOverlapPaddingSize = 10;
|
||||
function toRegions(els) {
|
||||
return els.map((el) => {
|
||||
const boundRect = el.getBoundingClientRect();
|
||||
const top =
|
||||
boundRect.top +
|
||||
document.documentElement.scrollTop -
|
||||
kOverlapPaddingSize;
|
||||
return {
|
||||
top,
|
||||
bottom: top + el.scrollHeight + 2 * kOverlapPaddingSize,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
let hasObserved = false;
|
||||
const visibleItemObserver = (els) => {
|
||||
let visibleElements = [...els];
|
||||
const intersectionObserver = new IntersectionObserver(
|
||||
(entries, _observer) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
if (visibleElements.indexOf(entry.target) === -1) {
|
||||
visibleElements.push(entry.target);
|
||||
}
|
||||
} else {
|
||||
visibleElements = visibleElements.filter((visibleEntry) => {
|
||||
return visibleEntry !== entry;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!hasObserved) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
hasObserved = true;
|
||||
},
|
||||
{}
|
||||
);
|
||||
els.forEach((el) => {
|
||||
intersectionObserver.observe(el);
|
||||
});
|
||||
|
||||
return {
|
||||
getVisibleEntries: () => {
|
||||
return visibleElements;
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const rightElementObserver = visibleItemObserver(rightSideConflictEls);
|
||||
const leftElementObserver = visibleItemObserver(leftSideConflictEls);
|
||||
|
||||
const hideOverlappedSidebars = () => {
|
||||
marginScrollVisibility(toRegions(rightElementObserver.getVisibleEntries()));
|
||||
sidebarScrollVisiblity(toRegions(leftElementObserver.getVisibleEntries()));
|
||||
if (tocLeftScrollVisibility) {
|
||||
tocLeftScrollVisibility(
|
||||
toRegions(leftElementObserver.getVisibleEntries())
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
window.quartoToggleReader = () => {
|
||||
// Applies a slow class (or removes it)
|
||||
// to update the transition speed
|
||||
const slowTransition = (slow) => {
|
||||
const manageTransition = (id, slow) => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) {
|
||||
if (slow) {
|
||||
el.classList.add("slow");
|
||||
} else {
|
||||
el.classList.remove("slow");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
manageTransition("TOC", slow);
|
||||
manageTransition("quarto-sidebar", slow);
|
||||
};
|
||||
const readerMode = !isReaderMode();
|
||||
setReaderModeValue(readerMode);
|
||||
|
||||
// If we're entering reader mode, slow the transition
|
||||
if (readerMode) {
|
||||
slowTransition(readerMode);
|
||||
}
|
||||
highlightReaderToggle(readerMode);
|
||||
hideOverlappedSidebars();
|
||||
|
||||
// If we're exiting reader mode, restore the non-slow transition
|
||||
if (!readerMode) {
|
||||
slowTransition(!readerMode);
|
||||
}
|
||||
};
|
||||
|
||||
const highlightReaderToggle = (readerMode) => {
|
||||
const els = document.querySelectorAll(".quarto-reader-toggle");
|
||||
if (els) {
|
||||
els.forEach((el) => {
|
||||
if (readerMode) {
|
||||
el.classList.add("reader");
|
||||
} else {
|
||||
el.classList.remove("reader");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const setReaderModeValue = (val) => {
|
||||
if (window.location.protocol !== "file:") {
|
||||
window.localStorage.setItem("quarto-reader-mode", val);
|
||||
} else {
|
||||
localReaderMode = val;
|
||||
}
|
||||
};
|
||||
|
||||
const isReaderMode = () => {
|
||||
if (window.location.protocol !== "file:") {
|
||||
return window.localStorage.getItem("quarto-reader-mode") === "true";
|
||||
} else {
|
||||
return localReaderMode;
|
||||
}
|
||||
};
|
||||
let localReaderMode = null;
|
||||
|
||||
const tocOpenDepthStr = tocEl?.getAttribute("data-toc-expanded");
|
||||
const tocOpenDepth = tocOpenDepthStr ? Number(tocOpenDepthStr) : 1;
|
||||
|
||||
// Walk the TOC and collapse/expand nodes
|
||||
// Nodes are expanded if:
|
||||
// - they are top level
|
||||
// - they have children that are 'active' links
|
||||
// - they are directly below an link that is 'active'
|
||||
const walk = (el, depth) => {
|
||||
// Tick depth when we enter a UL
|
||||
if (el.tagName === "UL") {
|
||||
depth = depth + 1;
|
||||
}
|
||||
|
||||
// It this is active link
|
||||
let isActiveNode = false;
|
||||
if (el.tagName === "A" && el.classList.contains("active")) {
|
||||
isActiveNode = true;
|
||||
}
|
||||
|
||||
// See if there is an active child to this element
|
||||
let hasActiveChild = false;
|
||||
for (const child of el.children) {
|
||||
hasActiveChild = walk(child, depth) || hasActiveChild;
|
||||
}
|
||||
|
||||
// Process the collapse state if this is an UL
|
||||
if (el.tagName === "UL") {
|
||||
if (tocOpenDepth === -1 && depth > 1) {
|
||||
// toc-expand: false
|
||||
el.classList.add("collapse");
|
||||
} else if (
|
||||
depth <= tocOpenDepth ||
|
||||
hasActiveChild ||
|
||||
prevSiblingIsActiveLink(el)
|
||||
) {
|
||||
el.classList.remove("collapse");
|
||||
} else {
|
||||
el.classList.add("collapse");
|
||||
}
|
||||
|
||||
// untick depth when we leave a UL
|
||||
depth = depth - 1;
|
||||
}
|
||||
return hasActiveChild || isActiveNode;
|
||||
};
|
||||
|
||||
// walk the TOC and expand / collapse any items that should be shown
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
|
||||
// Throttle the scroll event and walk peridiocally
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
throttle(() => {
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
if (!isReaderMode()) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
}, 5)
|
||||
);
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(() => {
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
if (!isReaderMode()) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
}, 10)
|
||||
);
|
||||
hideOverlappedSidebars();
|
||||
highlightReaderToggle(isReaderMode());
|
||||
});
|
||||
|
||||
tabsets.init();
|
||||
|
||||
function throttle(func, wait) {
|
||||
let waiting = false;
|
||||
return function () {
|
||||
if (!waiting) {
|
||||
func.apply(this, arguments);
|
||||
waiting = true;
|
||||
setTimeout(function () {
|
||||
waiting = false;
|
||||
}, wait);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function nexttick(func) {
|
||||
return setTimeout(func, 0);
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
// grouped tabsets
|
||||
|
||||
export function init() {
|
||||
window.addEventListener("pageshow", (_event) => {
|
||||
function getTabSettings() {
|
||||
const data = localStorage.getItem("quarto-persistent-tabsets-data");
|
||||
if (!data) {
|
||||
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
|
||||
return {};
|
||||
}
|
||||
if (data) {
|
||||
return JSON.parse(data);
|
||||
}
|
||||
}
|
||||
|
||||
function setTabSettings(data) {
|
||||
localStorage.setItem(
|
||||
"quarto-persistent-tabsets-data",
|
||||
JSON.stringify(data)
|
||||
);
|
||||
}
|
||||
|
||||
function setTabState(groupName, groupValue) {
|
||||
const data = getTabSettings();
|
||||
data[groupName] = groupValue;
|
||||
setTabSettings(data);
|
||||
}
|
||||
|
||||
function toggleTab(tab, active) {
|
||||
const tabPanelId = tab.getAttribute("aria-controls");
|
||||
const tabPanel = document.getElementById(tabPanelId);
|
||||
if (active) {
|
||||
tab.classList.add("active");
|
||||
tabPanel.classList.add("active");
|
||||
} else {
|
||||
tab.classList.remove("active");
|
||||
tabPanel.classList.remove("active");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAll(selectedGroup, selectorsToSync) {
|
||||
for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
|
||||
const active = selectedGroup === thisGroup;
|
||||
for (const tab of tabs) {
|
||||
toggleTab(tab, active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function findSelectorsToSyncByLanguage() {
|
||||
const result = {};
|
||||
const tabs = Array.from(
|
||||
document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
|
||||
);
|
||||
for (const item of tabs) {
|
||||
const div = item.parentElement.parentElement.parentElement;
|
||||
const group = div.getAttribute("data-group");
|
||||
if (!result[group]) {
|
||||
result[group] = {};
|
||||
}
|
||||
const selectorsToSync = result[group];
|
||||
const value = item.innerHTML;
|
||||
if (!selectorsToSync[value]) {
|
||||
selectorsToSync[value] = [];
|
||||
}
|
||||
selectorsToSync[value].push(item);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function setupSelectorSync() {
|
||||
const selectorsToSync = findSelectorsToSyncByLanguage();
|
||||
Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
|
||||
Object.entries(tabSetsByValue).forEach(([value, items]) => {
|
||||
items.forEach((item) => {
|
||||
item.addEventListener("click", (_event) => {
|
||||
setTabState(group, value);
|
||||
toggleAll(value, selectorsToSync[group]);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
return selectorsToSync;
|
||||
}
|
||||
|
||||
const selectorsToSync = setupSelectorSync();
|
||||
for (const [group, selectedName] of Object.entries(getTabSettings())) {
|
||||
const selectors = selectorsToSync[group];
|
||||
// it's possible that stale state gives us empty selections, so we explicitly check here.
|
||||
if (selectors) {
|
||||
toggleAll(selectedName, selectors);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e=e||self).tippy=t(e.Popper)}(this,(function(e){"use strict";var t={passive:!0,capture:!0},n=function(){return document.body};function r(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function o(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function i(e,t){return"function"==typeof e?e.apply(void 0,t):e}function a(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function s(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function u(e){return[].concat(e)}function c(e,t){-1===e.indexOf(t)&&e.push(t)}function p(e){return e.split("-")[0]}function f(e){return[].slice.call(e)}function l(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function d(){return document.createElement("div")}function v(e){return["Element","Fragment"].some((function(t){return o(e,t)}))}function m(e){return o(e,"MouseEvent")}function g(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function h(e){return v(e)?[e]:function(e){return o(e,"NodeList")}(e)?f(e):Array.isArray(e)?e:f(document.querySelectorAll(e))}function b(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function y(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function w(e){var t,n=u(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function E(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function O(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var x={isTouch:!1},C=0;function T(){x.isTouch||(x.isTouch=!0,window.performance&&document.addEventListener("mousemove",A))}function A(){var e=performance.now();e-C<20&&(x.isTouch=!1,document.removeEventListener("mousemove",A)),C=e}function L(){var e=document.activeElement;if(g(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var D=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,R=Object.assign({appendTo:n,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(R);function P(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=R[o])?r:i);return t}),{});return Object.assign({},e,t)}function j(e,t){var n=Object.assign({},t,{content:i(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(P(Object.assign({},R,{plugins:t}))):k).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function M(e,t){e.innerHTML=t}function V(e){var t=d();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",v(e)?t.appendChild(e):M(t,e)),t}function I(e,t){v(t.content)?(M(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?M(e,t.content):e.textContent=t.content)}function S(e){var t=e.firstElementChild,n=f(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function N(e){var t=d(),n=d();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=d();function o(n,r){var o=S(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==tyLine truncated
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
!function(t,e){"function"==typeof define&&define.amd?define([],e()):"object"==typeof module&&module.exports?module.exports=e():function n(){document&&document.body?t.zenscroll=e():setTimeout(n,9)}()}(this,function(){"use strict";var t=function(t){return t&&"getComputedStyle"in window&&"smooth"===window.getComputedStyle(t)["scroll-behavior"]};if("undefined"==typeof window||!("document"in window))return{};var e=function(e,n,o){n=n||999,o||0===o||(o=9);var i,r=function(t){i=t},u=function(){clearTimeout(i),r(0)},c=function(t){return Math.max(0,e.getTopOf(t)-o)},a=function(o,i,c){if(u(),0===i||i&&i<0||t(e.body))e.toY(o),c&&c();else{var a=e.getY(),f=Math.max(0,o)-a,s=(new Date).getTime();i=i||Math.min(Math.abs(f),n),function t(){r(setTimeout(function(){var n=Math.min(1,((new Date).getTime()-s)/i),o=Math.max(0,Math.floor(a+f*(n<.5?2*n*n:n*(4-2*n)-1)));e.toY(o),n<1&&e.getHeight()+o<e.body.scrollHeight?t():(setTimeout(u,99),c&&c())},9))}()}},f=function(t,e,n){a(c(t),e,n)},s=function(t,n,i){var r=t.getBoundingClientRect().height,u=e.getTopOf(t)+r,s=e.getHeight(),l=e.getY(),d=l+s;c(t)<l||r+o>s?f(t,n,i):u+o>d?a(u-s+o,n,i):i&&i()},l=function(t,n,o,i){a(Math.max(0,e.getTopOf(t)-e.getHeight()/2+(o||t.getBoundingClientRect().height/2)),n,i)};return{setup:function(t,e){return(0===t||t)&&(n=t),(0===e||e)&&(o=e),{defaultDuration:n,edgeOffset:o}},to:f,toY:a,intoView:s,center:l,stop:u,moving:function(){return!!i},getY:e.getY,getTopOf:e.getTopOf}},n=document.documentElement,o=function(){return window.scrollY||n.scrollTop},i=e({body:document.scrollingElement||document.body,toY:function(t){window.scrollTo(0,t)},getY:o,getHeight:function(){return window.innerHeight||n.clientHeight},getTopOf:function(t){return t.getBoundingClientRect().top+o()-n.offsetTop}});if(i.createScroller=function(t,o,i){return e({body:t,toY:function(e){t.scrollTop=e},getY:function(){return t.scrollTop},getHeight:function(){return Math.min(t.clientHeight,window.innerHeight||n.clientHeight)},getTopOf:function(t){return t.offsetTop}},o,i)},"addEventListener"in window&&!window.noZensmooth&&!t(document.body)){var r="history"in window&&"pushState"in history,u=r&&"scrollRestoration"in history;u&&(history.scrollRestoration="auto"),window.addEventListener("load",function(){u&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(t){t.state&&"zenscrollY"in t.state&&i.toY(t.state.zenscrollY)},!1)),window.location.hash&&setTimeout(function(){var t=i.setup().edgeOffset;if(t){var e=document.getElementById(window.location.href.split("#")[1]);if(e){var n=Math.max(0,i.getTopOf(e)-t),o=i.getY()-n;0<=o&&o<9&&window.scrollTo(0,n)}}},9)},!1);var c=new RegExp("(^|\\s)noZensmooth(\\s|$)");window.addEventListener("click",function(t){for(var e=t.target;e&&"A"!==e.tagName;)e=e.parentNode;if(!(!e||1!==t.which||t.shiftKey||t.metaKey||t.ctrlKey||t.altKey)){if(u){var n=history.state&&"object"==typeof history.state?history.state:{};n.zenscrollY=i.getY();try{history.replaceState(n,"")}catch(t){}}var o=e.getAttribute("href")||"";if(0===o.indexOf("#")&&!c.test(e.className)){var a=0,f=document.getElementById(o.substring(1));if("#"!==o){if(!f)return;a=i.getTopOf(f)}t.preventDefault();var s=function(){window.location=o},l=i.setup().edgeOffset;l&&(a=Math.max(0,a-l),r&&(s=function(){history.pushState({},"",o)})),i.toY(a,null,s)}}},!1)}return i});
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
|
||||
* Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}(t):function(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}(t)}function n(t,s,e){var n,o=function(){var n=!1;try{var t={get passive(){n=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){n=!1}return n}(),i=!1,r=d(t),l=r.scrollY(),a={};function c(){var t=Math.round(r.scrollY()),n=r.height(),o=r.scrollHeight();a.scrollY=t,a.lastScrollY=l,a.direction=l<t?"down":"up",a.distance=Math.abs(t-l),a.isOutOfBounds=t<0||o<t+n,a.top=t<=s.offset[a.direction],a.bottom=o<=t+n,a.toleranceExceeded=a.distance>s.tolerance[a.direction],e(a),l=t,i=!1}function h(){i||(i=!0,n=requestAnimationFrame(c))}var u=!!o&&{passive:!0,capture:!1};return t.addEventListener("scroll",h,u),c(),{destroy:function(){cancelAnimationFrame(n),t.removeEventListener("scroll",h,u)}}}function o(t){return t===Object(t)?t:{down:t,up:t}}function s(t,n){n=n||{},Object.assign(this,s.options,n),this.classes=Object.assign({},s.options.classes,n.classes),this.elem=t,this.tolerance=o(this.tolerance),this.offset=o(this.offset),this.initialised=!1,this.frozen=!1}return s.prototype={constructor:s,init:function(){return s.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=n(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},s.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},s.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),s});
|
||||
@@ -0,0 +1,328 @@
|
||||
const headroomChanged = new CustomEvent("quarto-hrChanged", {
|
||||
detail: {},
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: false,
|
||||
});
|
||||
|
||||
const announceDismiss = () => {
|
||||
const annEl = window.document.getElementById("quarto-announcement");
|
||||
if (annEl) {
|
||||
annEl.remove();
|
||||
|
||||
const annId = annEl.getAttribute("data-announcement-id");
|
||||
window.localStorage.setItem(`quarto-announce-${annId}`, "true");
|
||||
}
|
||||
};
|
||||
|
||||
const announceRegister = () => {
|
||||
const annEl = window.document.getElementById("quarto-announcement");
|
||||
if (annEl) {
|
||||
const annId = annEl.getAttribute("data-announcement-id");
|
||||
const isDismissed =
|
||||
window.localStorage.getItem(`quarto-announce-${annId}`) || false;
|
||||
if (isDismissed) {
|
||||
announceDismiss();
|
||||
return;
|
||||
} else {
|
||||
annEl.classList.remove("hidden");
|
||||
}
|
||||
|
||||
const actionEl = annEl.querySelector(".quarto-announcement-action");
|
||||
if (actionEl) {
|
||||
actionEl.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
// Hide the bar immediately
|
||||
announceDismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", function () {
|
||||
let init = false;
|
||||
|
||||
announceRegister();
|
||||
|
||||
// Manage the back to top button, if one is present.
|
||||
let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
const scrollDownBuffer = 5;
|
||||
const scrollUpBuffer = 35;
|
||||
const btn = document.getElementById("quarto-back-to-top");
|
||||
const hideBackToTop = () => {
|
||||
btn.style.display = "none";
|
||||
};
|
||||
const showBackToTop = () => {
|
||||
btn.style.display = "inline-block";
|
||||
};
|
||||
if (btn) {
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
function () {
|
||||
const currentScrollTop =
|
||||
window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
// Shows and hides the button 'intelligently' as the user scrolls
|
||||
if (currentScrollTop - scrollDownBuffer > lastScrollTop) {
|
||||
hideBackToTop();
|
||||
lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
|
||||
} else if (currentScrollTop < lastScrollTop - scrollUpBuffer) {
|
||||
showBackToTop();
|
||||
lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
|
||||
}
|
||||
|
||||
// Show the button at the bottom, hides it at the top
|
||||
if (currentScrollTop <= 0) {
|
||||
hideBackToTop();
|
||||
} else if (
|
||||
window.innerHeight + currentScrollTop >=
|
||||
document.body.offsetHeight
|
||||
) {
|
||||
showBackToTop();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
function throttle(func, wait) {
|
||||
var timeout;
|
||||
return function () {
|
||||
const context = this;
|
||||
const args = arguments;
|
||||
const later = function () {
|
||||
clearTimeout(timeout);
|
||||
timeout = null;
|
||||
func.apply(context, args);
|
||||
};
|
||||
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function headerOffset() {
|
||||
// Set an offset if there is are fixed top navbar
|
||||
const headerEl = window.document.querySelector("header.fixed-top");
|
||||
if (headerEl) {
|
||||
return headerEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function footerOffset() {
|
||||
const footerEl = window.document.querySelector("footer.footer");
|
||||
if (footerEl) {
|
||||
return footerEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function dashboardOffset() {
|
||||
const dashboardNavEl = window.document.getElementById(
|
||||
"quarto-dashboard-header"
|
||||
);
|
||||
if (dashboardNavEl !== null) {
|
||||
return dashboardNavEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function updateDocumentOffsetWithoutAnimation() {
|
||||
updateDocumentOffset(false);
|
||||
}
|
||||
|
||||
function updateDocumentOffset(animated) {
|
||||
// set body offset
|
||||
const topOffset = headerOffset();
|
||||
const bodyOffset = topOffset + footerOffset() + dashboardOffset();
|
||||
const bodyEl = window.document.body;
|
||||
bodyEl.setAttribute("data-bs-offset", topOffset);
|
||||
bodyEl.style.paddingTop = topOffset + "px";
|
||||
|
||||
// deal with sidebar offsets
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
if (!animated) {
|
||||
sidebar.classList.add("notransition");
|
||||
// Remove the no transition class after the animation has time to complete
|
||||
setTimeout(function () {
|
||||
sidebar.classList.remove("notransition");
|
||||
}, 201);
|
||||
}
|
||||
|
||||
if (window.Headroom && sidebar.classList.contains("sidebar-unpinned")) {
|
||||
sidebar.style.top = "0";
|
||||
sidebar.style.maxHeight = "100vh";
|
||||
} else {
|
||||
sidebar.style.top = topOffset + "px";
|
||||
sidebar.style.maxHeight = "calc(100vh - " + topOffset + "px)";
|
||||
}
|
||||
});
|
||||
|
||||
// allow space for footer
|
||||
const mainContainer = window.document.querySelector(".quarto-container");
|
||||
if (mainContainer) {
|
||||
mainContainer.style.minHeight = "calc(100vh - " + bodyOffset + "px)";
|
||||
}
|
||||
|
||||
// link offset
|
||||
let linkStyle = window.document.querySelector("#quarto-target-style");
|
||||
if (!linkStyle) {
|
||||
linkStyle = window.document.createElement("style");
|
||||
linkStyle.setAttribute("id", "quarto-target-style");
|
||||
window.document.head.appendChild(linkStyle);
|
||||
}
|
||||
while (linkStyle.firstChild) {
|
||||
linkStyle.removeChild(linkStyle.firstChild);
|
||||
}
|
||||
if (topOffset > 0) {
|
||||
linkStyle.appendChild(
|
||||
window.document.createTextNode(`
|
||||
section:target::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: ${topOffset}px;
|
||||
margin: -${topOffset}px 0 0;
|
||||
}`)
|
||||
);
|
||||
}
|
||||
if (init) {
|
||||
window.dispatchEvent(headroomChanged);
|
||||
}
|
||||
init = true;
|
||||
}
|
||||
|
||||
// initialize headroom
|
||||
var header = window.document.querySelector("#quarto-header");
|
||||
if (header && window.Headroom) {
|
||||
const headroom = new window.Headroom(header, {
|
||||
tolerance: 5,
|
||||
onPin: function () {
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
sidebar.classList.remove("sidebar-unpinned");
|
||||
});
|
||||
updateDocumentOffset();
|
||||
},
|
||||
onUnpin: function () {
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
sidebar.classList.add("sidebar-unpinned");
|
||||
});
|
||||
updateDocumentOffset();
|
||||
},
|
||||
});
|
||||
headroom.init();
|
||||
|
||||
let frozen = false;
|
||||
window.quartoToggleHeadroom = function () {
|
||||
if (frozen) {
|
||||
headroom.unfreeze();
|
||||
frozen = false;
|
||||
} else {
|
||||
headroom.freeze();
|
||||
frozen = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"hashchange",
|
||||
function (e) {
|
||||
if (
|
||||
getComputedStyle(document.documentElement).scrollBehavior !== "smooth"
|
||||
) {
|
||||
window.scrollTo(0, window.pageYOffset - headerOffset());
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
// Observe size changed for the header
|
||||
const headerEl = window.document.querySelector("header.fixed-top");
|
||||
if (headerEl && window.ResizeObserver) {
|
||||
const observer = new window.ResizeObserver(() => {
|
||||
setTimeout(updateDocumentOffsetWithoutAnimation, 0);
|
||||
});
|
||||
observer.observe(headerEl, {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
characterData: true,
|
||||
});
|
||||
} else {
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(updateDocumentOffsetWithoutAnimation, 50)
|
||||
);
|
||||
}
|
||||
setTimeout(updateDocumentOffsetWithoutAnimation, 250);
|
||||
|
||||
// fixup index.html links if we aren't on the filesystem
|
||||
if (window.location.protocol !== "file:") {
|
||||
const links = window.document.querySelectorAll("a");
|
||||
for (let i = 0; i < links.length; i++) {
|
||||
if (links[i].href) {
|
||||
links[i].dataset.originalHref = links[i].href;
|
||||
// only strip index.html at the end of the path (optionally followed
|
||||
// by a query or fragment) so that files like index.html.md
|
||||
// (alternate-format twins) are left alone (#14667)
|
||||
links[i].href = links[i].href.replace(/\/index\.html(?=[?#]|$)/, "/");
|
||||
}
|
||||
}
|
||||
|
||||
// Fixup any sharing links that require urls
|
||||
// Append url to any sharing urls
|
||||
const sharingLinks = window.document.querySelectorAll(
|
||||
"a.sidebar-tools-main-item, a.quarto-navigation-tool, a.quarto-navbar-tools, a.quarto-navbar-tools-item"
|
||||
);
|
||||
for (let i = 0; i < sharingLinks.length; i++) {
|
||||
const sharingLink = sharingLinks[i];
|
||||
const href = sharingLink.getAttribute("href");
|
||||
if (href) {
|
||||
sharingLink.setAttribute(
|
||||
"href",
|
||||
href.replace("|url|", window.location.href)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Scroll the active navigation item into view, if necessary
|
||||
const navSidebar = window.document.querySelector("nav#quarto-sidebar");
|
||||
if (navSidebar) {
|
||||
// Find the active item
|
||||
const activeItem = navSidebar.querySelector("li.sidebar-item a.active");
|
||||
if (activeItem) {
|
||||
// Wait for the scroll height and height to resolve by observing size changes on the
|
||||
// nav element that is scrollable
|
||||
const resizeObserver = new ResizeObserver((_entries) => {
|
||||
// The bottom of the element
|
||||
const elBottom = activeItem.offsetTop;
|
||||
const viewBottom = navSidebar.scrollTop + navSidebar.clientHeight;
|
||||
|
||||
// The element height and scroll height are the same, then we are still loading
|
||||
if (viewBottom !== navSidebar.scrollHeight) {
|
||||
// Determine if the item isn't visible and scroll to it
|
||||
if (elBottom >= viewBottom) {
|
||||
navSidebar.scrollTop = elBottom;
|
||||
}
|
||||
|
||||
// stop observing now since we've completed the scroll
|
||||
resizeObserver.unobserve(navSidebar);
|
||||
}
|
||||
});
|
||||
resizeObserver.observe(navSidebar);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! @algolia/autocomplete-js 1.19.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/autocomplete-js"]={})}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){return{current:e}}function p(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}function m(e){return e.reduce((function(e,t){return e.concat(t)}),[])}var v=0;function d(){return"autocomplete-".concat(v++)}function y(e,t){return t.reduce((function(e,t){return e&&e[t]}),e)}function b(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function g(e){return e!==Object(e)}function h(e,t){if(e===t)return!0;if(g(e)||g(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if(!(o in t))return!1;if(!h(e[o],t[o]))return!1}return!0}var _=function(){};var O="1.19.1",S=[{segment:"autocomplete-core",version:O}];function j(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.pLine truncated
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)
|
||||
*
|
||||
* Copyright (c) 2022 Kiro Risk (http://kiro.me)
|
||||
* All Rights Reserved. Apache Software License 2.0
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){return Array.isArray?Array.isArray(e):"[object Array]"===b(e)}function g(e){return"string"==typeof e}function y(e){return"number"==typeof e}function p(e){return!0===e||!1===e||function(e){return m(e)&&null!==e}(e)&&"[object Boolean]"==b(e)}function m(e){return"object"===n(e)}function k(e){return null!=e}function M(e){return!e.trim().length}function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var x=function(e){return"Invalid value for key ".concat(e)},w=function(e){return"Pattern length exceeds max of ".concat(e,".")},L=Object.prototype.hasOwnProperty,S=function(){function e(t){var n=this;r(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach((function(e){var t=_(e);i+=t.weight,n._keys.push(t),n._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return o(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function _(e){var t=null,n=null,r=null,i=1,o=null;if(g(e)||v(e))r=e,t=O(e),n=j(e);else{if(!L.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));var c=e.name;if(r=c,L.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(c));t=O(c),n=j(c),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function O(e){return v(e)?e:e.split(".")}function j(e){return v(e)?e.join("."):e}var A={useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,o){if(k(t))if(i[o]){var c=t[i[o]];if(!k(c))return;if(o===i.Line truncated
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user