From 203c8a9ed15417531e75bd813086aba391b1aebb Mon Sep 17 00:00:00 2001 From: blu3r4y Date: Thu, 30 Nov 2023 20:59:00 +0000 Subject: [PATCH] deploy: c78aed2e63dc4dd57ef5e612353f3511c5697d92 --- .nojekyll | 0 assets/favicon.35db0ea0.svg | 5 + assets/index.ce52d8e5.css | 16 + assets/index.e0aedfd9.js | 110 ++ excerpt.html | 2352 ++++++++++++++++++++++++++++++++++ images/python-logo.png | Bin 0 -> 11155 bytes images/python-popularity.png | Bin 0 -> 123540 bytes images/python-xkcd.png | Bin 0 -> 90835 bytes index.html | 99 ++ m00_intro.md | 56 + m01_what_is_python.md | 35 + m02_installation.md | 70 + m03_syntax_primer.md | 55 + m04_data_types.md | 256 ++++ m05_collections.md | 242 ++++ m06_input_and_output.md | 131 ++ m07_examples.md | 423 ++++++ m08_functions.md | 202 +++ m09_classes.md | 260 ++++ m10_code_organization.md | 111 ++ m11_libraries.md | 67 + m12_zen_of_python.md | 41 + 22 files changed, 4531 insertions(+) create mode 100644 .nojekyll create mode 100644 assets/favicon.35db0ea0.svg create mode 100644 assets/index.ce52d8e5.css create mode 100644 assets/index.e0aedfd9.js create mode 100644 excerpt.html create mode 100644 images/python-logo.png create mode 100644 images/python-popularity.png create mode 100644 images/python-xkcd.png create mode 100644 index.html create mode 100644 m00_intro.md create mode 100644 m01_what_is_python.md create mode 100644 m02_installation.md create mode 100644 m03_syntax_primer.md create mode 100644 m04_data_types.md create mode 100644 m05_collections.md create mode 100644 m06_input_and_output.md create mode 100644 m07_examples.md create mode 100644 m08_functions.md create mode 100644 m09_classes.md create mode 100644 m10_code_organization.md create mode 100644 m11_libraries.md create mode 100644 m12_zen_of_python.md diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/favicon.35db0ea0.svg b/assets/favicon.35db0ea0.svg new file mode 100644 index 0000000..2a3eb59 --- /dev/null +++ b/assets/favicon.35db0ea0.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/assets/index.ce52d8e5.css b/assets/index.ce52d8e5.css new file mode 100644 index 0000000..5bb4434 --- /dev/null +++ b/assets/index.ce52d8e5.css @@ -0,0 +1,16 @@ +@import"https://fonts.googleapis.com/css?family=News+Cycle:400,700";@import"https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic";/*! +* reveal.js 4.4.0 +* https://revealjs.com +* MIT licensed +* +* Copyright (C) 2011-2022 Hakim El Hattab, https://hakim.se +*/.reveal .r-stretch,.reveal .stretch{max-width:none;max-height:none}.reveal pre.r-stretch code,.reveal pre.stretch code{height:100%;max-height:100%;box-sizing:border-box}.reveal .r-fit-text{display:inline-block;white-space:nowrap}.reveal .r-stack{display:grid}.reveal .r-stack>*{grid-area:1/1;margin:auto}.reveal .r-hstack,.reveal .r-vstack{display:flex}.reveal .r-hstack img,.reveal .r-hstack video,.reveal .r-vstack img,.reveal .r-vstack video{min-width:0;min-height:0;object-fit:contain}.reveal .r-vstack{flex-direction:column;align-items:center;justify-content:center}.reveal .r-hstack{flex-direction:row;align-items:center;justify-content:center}.reveal .items-stretch{align-items:stretch}.reveal .items-start{align-items:flex-start}.reveal .items-center{align-items:center}.reveal .items-end{align-items:flex-end}.reveal .justify-between{justify-content:space-between}.reveal .justify-around{justify-content:space-around}.reveal .justify-start{justify-content:flex-start}.reveal .justify-center{justify-content:center}.reveal .justify-end{justify-content:flex-end}html.reveal-full-page{width:100%;height:100%;height:100vh;height:calc(var(--vh,1vh) * 100);overflow:hidden}.reveal-viewport{height:100%;overflow:hidden;position:relative;line-height:1;margin:0;background-color:#fff;color:#000}.reveal-viewport:fullscreen{top:0!important;left:0!important;width:100%!important;height:100%!important;transform:none!important}.reveal .slides section .fragment{opacity:0;visibility:hidden;transition:all .2s ease;will-change:opacity}.reveal .slides section .fragment.visible{opacity:1;visibility:inherit}.reveal .slides section .fragment.disabled{transition:none}.reveal .slides section .fragment.grow{opacity:1;visibility:inherit}.reveal .slides section .fragment.grow.visible{transform:scale(1.3)}.reveal .slides section .fragment.shrink{opacity:1;visibility:inherit}.reveal .slides section .fragment.shrink.visible{transform:scale(.7)}.reveal .slides section .fragment.zoom-in{transform:scale(.1)}.reveal .slides section .fragment.zoom-in.visible{transform:none}.reveal .slides section .fragment.fade-out{opacity:1;visibility:inherit}.reveal .slides section .fragment.fade-out.visible{opacity:0;visibility:hidden}.reveal .slides section .fragment.semi-fade-out{opacity:1;visibility:inherit}.reveal .slides section .fragment.semi-fade-out.visible{opacity:.5;visibility:inherit}.reveal .slides section .fragment.strike{opacity:1;visibility:inherit}.reveal .slides section .fragment.strike.visible{text-decoration:line-through}.reveal .slides section .fragment.fade-up{transform:translateY(40px)}.reveal .slides section .fragment.fade-up.visible{transform:translate(0)}.reveal .slides section .fragment.fade-down{transform:translateY(-40px)}.reveal .slides section .fragment.fade-down.visible{transform:translate(0)}.reveal .slides section .fragment.fade-right{transform:translate(-40px)}.reveal .slides section .fragment.fade-right.visible{transform:translate(0)}.reveal .slides section .fragment.fade-left{transform:translate(40px)}.reveal .slides section .fragment.fade-left.visible{transform:translate(0)}.reveal .slides section .fragment.current-visible,.reveal .slides section .fragment.fade-in-then-out{opacity:0;visibility:hidden}.reveal .slides section .fragment.current-visible.current-fragment,.reveal .slides section .fragment.fade-in-then-out.current-fragment{opacity:1;visibility:inherit}.reveal .slides section .fragment.fade-in-then-semi-out{opacity:0;visibility:hidden}.reveal .slides section .fragment.fade-in-then-semi-out.visible{opacity:.5;visibility:inherit}.reveal .slides section .fragment.fade-in-then-semi-out.current-fragment{opacity:1;visibility:inherit}.reveal .slides section .fragment.highlight-blue,.reveal .slides section .fragment.highlight-current-blue,.reveal .slides section .fragment.highlight-current-green,.reveal .slides section .fragment.highlight-current-red,.reveal .slides section .fragment.highlight-green,.reveal .slides section .fragment.highlight-red{opacity:1;visibility:inherit}.reveal .slides section .fragment.highlight-red.visible{color:#ff2c2d}.reveal .slides section .fragment.highlight-green.visible{color:#17ff2e}.reveal .slides section .fragment.highlight-blue.visible{color:#1b91ff}.reveal .slides section .fragment.highlight-current-red.current-fragment{color:#ff2c2d}.reveal .slides section .fragment.highlight-current-green.current-fragment{color:#17ff2e}.reveal .slides section .fragment.highlight-current-blue.current-fragment{color:#1b91ff}.reveal:after{content:"";font-style:italic}.reveal iframe{z-index:1}.reveal a{position:relative}@keyframes bounce-right{0%,10%,25%,40%,50%{transform:translate(0)}20%{transform:translate(10px)}30%{transform:translate(-5px)}}@keyframes bounce-left{0%,10%,25%,40%,50%{transform:translate(0)}20%{transform:translate(-10px)}30%{transform:translate(5px)}}@keyframes bounce-down{0%,10%,25%,40%,50%{transform:translateY(0)}20%{transform:translateY(10px)}30%{transform:translateY(-5px)}}.reveal .controls{display:none;position:absolute;top:auto;bottom:12px;right:12px;left:auto;z-index:11;color:#000;pointer-events:none;font-size:10px}.reveal .controls button{position:absolute;padding:0;background-color:transparent;border:0;outline:0;cursor:pointer;color:currentColor;transform:scale(.9999);transition:color .2s ease,opacity .2s ease,transform .2s ease;z-index:2;pointer-events:auto;font-size:inherit;visibility:hidden;opacity:0;-webkit-appearance:none;-webkit-tap-highlight-color:transparent}.reveal .controls .controls-arrow:after,.reveal .controls .controls-arrow:before{content:"";position:absolute;top:0;left:0;width:2.6em;height:.5em;border-radius:.25em;background-color:currentColor;transition:all .15s ease,background-color .8s ease;transform-origin:.2em 50%;will-change:transform}.reveal .controls .controls-arrow{position:relative;width:3.6em;height:3.6em}.reveal .controls .controls-arrow:before{transform:translate(.5em) translateY(1.55em) rotate(45deg)}.reveal .controls .controls-arrow:after{transform:translate(.5em) translateY(1.55em) rotate(-45deg)}.reveal .controls .controls-arrow:hover:before{transform:translate(.5em) translateY(1.55em) rotate(40deg)}.reveal .controls .controls-arrow:hover:after{transform:translate(.5em) translateY(1.55em) rotate(-40deg)}.reveal .controls .controls-arrow:active:before{transform:translate(.5em) translateY(1.55em) rotate(36deg)}.reveal .controls .controls-arrow:active:after{transform:translate(.5em) translateY(1.55em) rotate(-36deg)}.reveal .controls .navigate-left{right:6.4em;bottom:3.2em;transform:translate(-10px)}.reveal .controls .navigate-left.highlight{animation:bounce-left 2s 50 both ease-out}.reveal .controls .navigate-right{right:0;bottom:3.2em;transform:translate(10px)}.reveal .controls .navigate-right .controls-arrow{transform:rotate(180deg)}.reveal .controls .navigate-right.highlight{animation:bounce-right 2s 50 both ease-out}.reveal .controls .navigate-up{right:3.2em;bottom:6.4em;transform:translateY(-10px)}.reveal .controls .navigate-up .controls-arrow{transform:rotate(90deg)}.reveal .controls .navigate-down{right:3.2em;bottom:-1.4em;padding-bottom:1.4em;transform:translateY(10px)}.reveal .controls .navigate-down .controls-arrow{transform:rotate(-90deg)}.reveal .controls .navigate-down.highlight{animation:bounce-down 2s 50 both ease-out}.reveal .controls[data-controls-back-arrows=faded] .navigate-up.enabled{opacity:.3}.reveal .controls[data-controls-back-arrows=faded] .navigate-up.enabled:hover{opacity:1}.reveal .controls[data-controls-back-arrows=hidden] .navigate-up.enabled{opacity:0;visibility:hidden}.reveal .controls .enabled{visibility:visible;opacity:.9;cursor:pointer;transform:none}.reveal .controls .enabled.fragmented{opacity:.5}.reveal .controls .enabled.fragmented:hover,.reveal .controls .enabled:hover{opacity:1}.reveal:not(.rtl) .controls[data-controls-back-arrows=faded] .navigate-left.enabled{opacity:.3}.reveal:not(.rtl) .controls[data-controls-back-arrows=faded] .navigate-left.enabled:hover{opacity:1}.reveal:not(.rtl) .controls[data-controls-back-arrows=hidden] .navigate-left.enabled{opacity:0;visibility:hidden}.reveal.rtl .controls[data-controls-back-arrows=faded] .navigate-right.enabled{opacity:.3}.reveal.rtl .controls[data-controls-back-arrows=faded] .navigate-right.enabled:hover{opacity:1}.reveal.rtl .controls[data-controls-back-arrows=hidden] .navigate-right.enabled{opacity:0;visibility:hidden}.reveal[data-navigation-mode=linear].has-horizontal-slides .navigate-down,.reveal[data-navigation-mode=linear].has-horizontal-slides .navigate-up{display:none}.reveal:not(.has-vertical-slides) .controls .navigate-left,.reveal[data-navigation-mode=linear].has-horizontal-slides .navigate-left{bottom:1.4em;right:5.5em}.reveal:not(.has-vertical-slides) .controls .navigate-right,.reveal[data-navigation-mode=linear].has-horizontal-slides .navigate-right{bottom:1.4em;right:.5em}.reveal:not(.has-horizontal-slides) .controls .navigate-up{right:1.4em;bottom:5em}.reveal:not(.has-horizontal-slides) .controls .navigate-down{right:1.4em;bottom:.5em}.reveal.has-dark-background .controls{color:#fff}.reveal.has-light-background .controls{color:#000}.reveal.no-hover .controls .controls-arrow:active:before,.reveal.no-hover .controls .controls-arrow:hover:before{transform:translate(.5em) translateY(1.55em) rotate(45deg)}.reveal.no-hover .controls .controls-arrow:active:after,.reveal.no-hover .controls .controls-arrow:hover:after{transform:translate(.5em) translateY(1.55em) rotate(-45deg)}@media screen and (min-width:500px){.reveal .controls[data-controls-layout=edges]{top:0;right:0;bottom:0;left:0}.reveal .controls[data-controls-layout=edges] .navigate-down,.reveal .controls[data-controls-layout=edges] .navigate-left,.reveal .controls[data-controls-layout=edges] .navigate-right,.reveal .controls[data-controls-layout=edges] .navigate-up{bottom:auto;right:auto}.reveal .controls[data-controls-layout=edges] .navigate-left{top:50%;left:.8em;margin-top:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-right{top:50%;right:.8em;margin-top:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:.8em;left:50%;margin-left:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:-.3em;left:50%;margin-left:-1.8em}}.reveal .progress{position:absolute;display:none;height:3px;width:100%;bottom:0;left:0;z-index:10;background-color:#0003;color:#fff}.reveal .progress:after{content:"";display:block;position:absolute;height:10px;width:100%;top:-10px}.reveal .progress span{display:block;height:100%;width:100%;background-color:currentColor;transition:transform .8s cubic-bezier(.26,.86,.44,.985);transform-origin:0 0;transform:scaleX(0)}.reveal .slide-number{position:absolute;display:block;right:8px;bottom:8px;z-index:31;font-family:Helvetica,sans-serif;font-size:12px;line-height:1;color:#fff;background-color:#0006;padding:5px}.reveal .slide-number a{color:currentColor}.reveal .slide-number-delimiter{margin:0 3px}.reveal{position:relative;width:100%;height:100%;overflow:hidden;touch-action:pinch-zoom}.reveal.embedded{touch-action:pan-y}.reveal .slides{position:absolute;width:100%;height:100%;top:0;right:0;bottom:0;left:0;margin:auto;pointer-events:none;overflow:visible;z-index:1;text-align:center;perspective:600px;perspective-origin:50% 40%}.reveal .slides>section{perspective:600px}.reveal .slides>section,.reveal .slides>section>section{display:none;position:absolute;width:100%;pointer-events:auto;z-index:10;transform-style:flat;transition:transform-origin .8s cubic-bezier(.26,.86,.44,.985),transform .8s cubic-bezier(.26,.86,.44,.985),visibility .8s cubic-bezier(.26,.86,.44,.985),opacity .8s cubic-bezier(.26,.86,.44,.985)}.reveal[data-transition-speed=fast] .slides section{transition-duration:.4s}.reveal[data-transition-speed=slow] .slides section{transition-duration:1.2s}.reveal .slides section[data-transition-speed=fast]{transition-duration:.4s}.reveal .slides section[data-transition-speed=slow]{transition-duration:1.2s}.reveal .slides>section.stack{padding-top:0;padding-bottom:0;pointer-events:none;height:100%}.reveal .slides>section.present,.reveal .slides>section>section.present{display:block;z-index:11;opacity:1}.reveal .slides>section:empty,.reveal .slides>section>section:empty,.reveal .slides>section>section[data-background-interactive],.reveal .slides>section[data-background-interactive]{pointer-events:none}.reveal.center,.reveal.center .slides,.reveal.center .slides section{min-height:0!important}.reveal .slides>section:not(.present),.reveal .slides>section>section:not(.present){pointer-events:none}.reveal.overview .slides>section,.reveal.overview .slides>section>section{pointer-events:auto}.reveal .slides>section.future,.reveal .slides>section.future>section,.reveal .slides>section.past,.reveal .slides>section.past>section,.reveal .slides>section>section.future,.reveal .slides>section>section.past{opacity:0}.reveal .slides>section[data-transition=slide].past,.reveal .slides>section[data-transition~=slide-out].past,.reveal.slide .slides>section:not([data-transition]).past{transform:translate(-150%)}.reveal .slides>section[data-transition=slide].future,.reveal .slides>section[data-transition~=slide-in].future,.reveal.slide .slides>section:not([data-transition]).future{transform:translate(150%)}.reveal .slides>section>section[data-transition=slide].past,.reveal .slides>section>section[data-transition~=slide-out].past,.reveal.slide .slides>section>section:not([data-transition]).past{transform:translateY(-150%)}.reveal .slides>section>section[data-transition=slide].future,.reveal .slides>section>section[data-transition~=slide-in].future,.reveal.slide .slides>section>section:not([data-transition]).future{transform:translateY(150%)}.reveal .slides>section[data-transition=linear].past,.reveal .slides>section[data-transition~=linear-out].past,.reveal.linear .slides>section:not([data-transition]).past{transform:translate(-150%)}.reveal .slides>section[data-transition=linear].future,.reveal .slides>section[data-transition~=linear-in].future,.reveal.linear .slides>section:not([data-transition]).future{transform:translate(150%)}.reveal .slides>section>section[data-transition=linear].past,.reveal .slides>section>section[data-transition~=linear-out].past,.reveal.linear .slides>section>section:not([data-transition]).past{transform:translateY(-150%)}.reveal .slides>section>section[data-transition=linear].future,.reveal .slides>section>section[data-transition~=linear-in].future,.reveal.linear .slides>section>section:not([data-transition]).future{transform:translateY(150%)}.reveal .slides section[data-transition=default].stack,.reveal.default .slides section.stack{transform-style:preserve-3d}.reveal .slides>section[data-transition=default].past,.reveal .slides>section[data-transition~=default-out].past,.reveal.default .slides>section:not([data-transition]).past{transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=default].future,.reveal .slides>section[data-transition~=default-in].future,.reveal.default .slides>section:not([data-transition]).future{transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=default].past,.reveal .slides>section>section[data-transition~=default-out].past,.reveal.default .slides>section>section:not([data-transition]).past{transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0)}.reveal .slides>section>section[data-transition=default].future,.reveal .slides>section>section[data-transition~=default-in].future,.reveal.default .slides>section>section:not([data-transition]).future{transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0)}.reveal .slides section[data-transition=convex].stack,.reveal.convex .slides section.stack{transform-style:preserve-3d}.reveal .slides>section[data-transition=convex].past,.reveal .slides>section[data-transition~=convex-out].past,.reveal.convex .slides>section:not([data-transition]).past{transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=convex].future,.reveal .slides>section[data-transition~=convex-in].future,.reveal.convex .slides>section:not([data-transition]).future{transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=convex].past,.reveal .slides>section>section[data-transition~=convex-out].past,.reveal.convex .slides>section>section:not([data-transition]).past{transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0)}.reveal .slides>section>section[data-transition=convex].future,.reveal .slides>section>section[data-transition~=convex-in].future,.reveal.convex .slides>section>section:not([data-transition]).future{transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0)}.reveal .slides section[data-transition=concave].stack,.reveal.concave .slides section.stack{transform-style:preserve-3d}.reveal .slides>section[data-transition=concave].past,.reveal .slides>section[data-transition~=concave-out].past,.reveal.concave .slides>section:not([data-transition]).past{transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=concave].future,.reveal .slides>section[data-transition~=concave-in].future,.reveal.concave .slides>section:not([data-transition]).future{transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=concave].past,.reveal .slides>section>section[data-transition~=concave-out].past,.reveal.concave .slides>section>section:not([data-transition]).past{transform:translate3d(0,-80%,0) rotateX(-70deg) translate3d(0,-80%,0)}.reveal .slides>section>section[data-transition=concave].future,.reveal .slides>section>section[data-transition~=concave-in].future,.reveal.concave .slides>section>section:not([data-transition]).future{transform:translate3d(0,80%,0) rotateX(70deg) translate3d(0,80%,0)}.reveal .slides section[data-transition=zoom],.reveal.zoom .slides section:not([data-transition]){transition-timing-function:ease}.reveal .slides>section[data-transition=zoom].past,.reveal .slides>section[data-transition~=zoom-out].past,.reveal.zoom .slides>section:not([data-transition]).past{visibility:hidden;transform:scale(16)}.reveal .slides>section[data-transition=zoom].future,.reveal .slides>section[data-transition~=zoom-in].future,.reveal.zoom .slides>section:not([data-transition]).future{visibility:hidden;transform:scale(.2)}.reveal .slides>section>section[data-transition=zoom].past,.reveal .slides>section>section[data-transition~=zoom-out].past,.reveal.zoom .slides>section>section:not([data-transition]).past{transform:scale(16)}.reveal .slides>section>section[data-transition=zoom].future,.reveal .slides>section>section[data-transition~=zoom-in].future,.reveal.zoom .slides>section>section:not([data-transition]).future{transform:scale(.2)}.reveal.cube .slides{perspective:1300px}.reveal.cube .slides section{padding:30px;min-height:700px;backface-visibility:hidden;box-sizing:border-box;transform-style:preserve-3d}.reveal.center.cube .slides section{min-height:0}.reveal.cube .slides section:not(.stack):before{content:"";position:absolute;display:block;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,.1);border-radius:4px;transform:translateZ(-20px)}.reveal.cube .slides section:not(.stack):after{content:"";position:absolute;display:block;width:90%;height:30px;left:5%;bottom:0;background:0 0;z-index:1;border-radius:4px;box-shadow:0 95px 25px #0003;transform:translateZ(-90px) rotateX(65deg)}.reveal.cube .slides>section.stack{padding:0;background:0 0}.reveal.cube .slides>section.past{transform-origin:100% 0;transform:translate3d(-100%,0,0) rotateY(-90deg)}.reveal.cube .slides>section.future{transform-origin:0 0;transform:translate3d(100%,0,0) rotateY(90deg)}.reveal.cube .slides>section>section.past{transform-origin:0 100%;transform:translate3d(0,-100%,0) rotateX(90deg)}.reveal.cube .slides>section>section.future{transform-origin:0 0;transform:translate3d(0,100%,0) rotateX(-90deg)}.reveal.page .slides{perspective-origin:0 50%;perspective:3000px}.reveal.page .slides section{padding:30px;min-height:700px;box-sizing:border-box;transform-style:preserve-3d}.reveal.page .slides section.past{z-index:12}.reveal.page .slides section:not(.stack):before{content:"";position:absolute;display:block;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,.1);transform:translateZ(-20px)}.reveal.page .slides section:not(.stack):after{content:"";position:absolute;display:block;width:90%;height:30px;left:5%;bottom:0;background:0 0;z-index:1;border-radius:4px;box-shadow:0 95px 25px #0003;-webkit-transform:translateZ(-90px) rotateX(65deg)}.reveal.page .slides>section.stack{padding:0;background:0 0}.reveal.page .slides>section.past{transform-origin:0 0;transform:translate3d(-40%,0,0) rotateY(-80deg)}.reveal.page .slides>section.future{transform-origin:100% 0;transform:translateZ(0)}.reveal.page .slides>section>section.past{transform-origin:0 0;transform:translate3d(0,-40%,0) rotateX(80deg)}.reveal.page .slides>section>section.future{transform-origin:0 100%;transform:translateZ(0)}.reveal .slides section[data-transition=fade],.reveal.fade .slides section:not([data-transition]),.reveal.fade .slides>section>section:not([data-transition]){transform:none;transition:opacity .5s}.reveal.fade.overview .slides section,.reveal.fade.overview .slides>section>section{transition:none}.reveal .slides section[data-transition=none],.reveal.none .slides section:not([data-transition]){transform:none;transition:none}.reveal .pause-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;visibility:hidden;opacity:0;z-index:100;transition:all 1s ease}.reveal .pause-overlay .resume-button{position:absolute;bottom:20px;right:20px;color:#ccc;border-radius:2px;padding:6px 14px;border:2px solid #ccc;font-size:16px;background:0 0;cursor:pointer}.reveal .pause-overlay .resume-button:hover{color:#fff;border-color:#fff}.reveal.paused .pause-overlay{visibility:visible;opacity:1}.reveal .no-transition,.reveal .no-transition *,.reveal .slides.disable-slide-transitions section{transition:none!important}.reveal .slides.disable-slide-transitions section{transform:none!important}.reveal .backgrounds{position:absolute;width:100%;height:100%;top:0;left:0;perspective:600px}.reveal .slide-background{display:none;position:absolute;width:100%;height:100%;opacity:0;visibility:hidden;overflow:hidden;background-color:#0000;transition:all .8s cubic-bezier(.26,.86,.44,.985)}.reveal .slide-background-content{position:absolute;width:100%;height:100%;background-position:50% 50%;background-repeat:no-repeat;background-size:cover}.reveal .slide-background.stack{display:block}.reveal .slide-background.present{opacity:1;visibility:visible;z-index:2}.print-pdf .reveal .slide-background{opacity:1!important;visibility:visible!important}.reveal .slide-background video{position:absolute;width:100%;height:100%;max-width:none;max-height:none;top:0;left:0;object-fit:cover}.reveal .slide-background[data-background-size=contain] video{object-fit:contain}.reveal>.backgrounds .slide-background[data-background-transition=none],.reveal[data-background-transition=none]>.backgrounds .slide-background:not([data-background-transition]){transition:none}.reveal>.backgrounds .slide-background[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background:not([data-background-transition]){opacity:1}.reveal>.backgrounds .slide-background.past[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background.past:not([data-background-transition]){transform:translate(-100%)}.reveal>.backgrounds .slide-background.future[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background.future:not([data-background-transition]){transform:translate(100%)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.past:not([data-background-transition]){transform:translateY(-100%)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.future:not([data-background-transition]){transform:translateY(100%)}.reveal>.backgrounds .slide-background.past[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background.past:not([data-background-transition]){opacity:0;transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal>.backgrounds .slide-background.future[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background.future:not([data-background-transition]){opacity:0;transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.past:not([data-background-transition]){opacity:0;transform:translate3d(0,-100%,0) rotateX(90deg) translate3d(0,-100%,0)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.future:not([data-background-transition]){opacity:0;transform:translate3d(0,100%,0) rotateX(-90deg) translate3d(0,100%,0)}.reveal>.backgrounds .slide-background.past[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background.past:not([data-background-transition]){opacity:0;transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0)}.reveal>.backgrounds .slide-background.future[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background.future:not([data-background-transition]){opacity:0;transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.past:not([data-background-transition]){opacity:0;transform:translate3d(0,-100%,0) rotateX(-90deg) translate3d(0,-100%,0)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.future:not([data-background-transition]){opacity:0;transform:translate3d(0,100%,0) rotateX(90deg) translate3d(0,100%,0)}.reveal>.backgrounds .slide-background[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background:not([data-background-transition]){transition-timing-function:ease}.reveal>.backgrounds .slide-background.past[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background.past:not([data-background-transition]){opacity:0;visibility:hidden;transform:scale(16)}.reveal>.backgrounds .slide-background.future[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background.future:not([data-background-transition]){opacity:0;visibility:hidden;transform:scale(.2)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.past:not([data-background-transition]){opacity:0;visibility:hidden;transform:scale(16)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.future:not([data-background-transition]){opacity:0;visibility:hidden;transform:scale(.2)}.reveal[data-transition-speed=fast]>.backgrounds .slide-background{transition-duration:.4s}.reveal[data-transition-speed=slow]>.backgrounds .slide-background{transition-duration:1.2s}.reveal [data-auto-animate-target^=unmatched]{will-change:opacity}.reveal section[data-auto-animate]:not(.stack):not([data-auto-animate=running]) [data-auto-animate-target^=unmatched]{opacity:0}.reveal.overview{perspective-origin:50% 50%;perspective:700px}.reveal.overview .slides{-moz-transform-style:preserve-3d}.reveal.overview .slides section{height:100%;top:0!important;opacity:1!important;overflow:hidden;visibility:visible!important;cursor:pointer;box-sizing:border-box}.reveal.overview .slides section.present,.reveal.overview .slides section:hover{outline:10px solid rgba(150,150,150,.4);outline-offset:10px}.reveal.overview .slides section .fragment{opacity:1;transition:none}.reveal.overview .slides section:after,.reveal.overview .slides section:before{display:none!important}.reveal.overview .slides>section.stack{padding:0;top:0!important;background:0 0;outline:0;overflow:visible}.reveal.overview .backgrounds{perspective:inherit;-moz-transform-style:preserve-3d}.reveal.overview .backgrounds .slide-background{opacity:1;visibility:visible;outline:10px solid rgba(150,150,150,.1);outline-offset:10px}.reveal.overview .backgrounds .slide-background.stack{overflow:visible}.reveal.overview .slides section,.reveal.overview-deactivating .slides section{transition:none}.reveal.overview .backgrounds .slide-background,.reveal.overview-deactivating .backgrounds .slide-background{transition:none}.reveal.rtl .slides,.reveal.rtl .slides h1,.reveal.rtl .slides h2,.reveal.rtl .slides h3,.reveal.rtl .slides h4,.reveal.rtl .slides h5,.reveal.rtl .slides h6{direction:rtl;font-family:sans-serif}.reveal.rtl code,.reveal.rtl pre{direction:ltr}.reveal.rtl ol,.reveal.rtl ul{text-align:right}.reveal.rtl .progress span{transform-origin:100% 0}.reveal.has-parallax-background .backgrounds{transition:all .8s ease}.reveal.has-parallax-background[data-transition-speed=fast] .backgrounds{transition-duration:.4s}.reveal.has-parallax-background[data-transition-speed=slow] .backgrounds{transition-duration:1.2s}.reveal>.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000;background:rgba(0,0,0,.9);transition:all .3s ease}.reveal>.overlay .spinner{position:absolute;display:block;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;z-index:10;background-image:url(data:image/gif;base64,R0lGODlhIAAgAPMAAJmZmf%2F%2F%2F6%2Bvr8nJybW1tcDAwOjo6Nvb26ioqKOjo7Ozs%2FLy8vz8%2FAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2FhpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh%2BQQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ%2FV%2FnmOM82XiHRLYKhKP1oZmADdEAAAh%2BQQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY%2FCZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB%2BA4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6%2BHo7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq%2BB6QDtuetcaBPnW6%2BO7wDHpIiK9SaVK5GgV543tzjgGcghAgAh%2BQQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK%2B%2BG%2Bw48edZPK%2BM6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE%2BG%2BcD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm%2BFNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk%2BaV%2BoJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0%2FVNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc%2BXiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30%2FiI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE%2FjiuL04RGEBgwWhShRgQExHBAAh%2BQQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR%2BipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY%2BYip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd%2BMFCN6HAAIKgNggY0KtEBAAh%2BQQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1%2BvsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d%2BjYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg%2BygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0%2Bbm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h%2BKr0SJ8MFihpNbx%2B4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX%2BBP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA%3D%3D);visibility:visible;opacity:.6;transition:all .3s ease}.reveal>.overlay header{position:absolute;left:0;top:0;width:100%;padding:5px;z-index:2;box-sizing:border-box}.reveal>.overlay header a{display:inline-block;width:40px;height:40px;line-height:36px;padding:0 10px;float:right;opacity:.6;box-sizing:border-box}.reveal>.overlay header a:hover{opacity:1}.reveal>.overlay header a .icon{display:inline-block;width:20px;height:20px;background-position:50% 50%;background-size:100%;background-repeat:no-repeat}.reveal>.overlay header a.close .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC)}.reveal>.overlay header a.external .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==)}.reveal>.overlay .viewport{position:absolute;display:flex;top:50px;right:0;bottom:0;left:0}.reveal>.overlay.overlay-preview .viewport iframe{width:100%;height:100%;max-width:100%;max-height:100%;border:0;opacity:0;visibility:hidden;transition:all .3s ease}.reveal>.overlay.overlay-preview.loaded .viewport iframe{opacity:1;visibility:visible}.reveal>.overlay.overlay-preview.loaded .viewport-inner{position:absolute;z-index:-1;left:0;top:45%;width:100%;text-align:center;letter-spacing:normal}.reveal>.overlay.overlay-preview .x-frame-error{opacity:0;transition:opacity .3s ease .3s}.reveal>.overlay.overlay-preview.loaded .x-frame-error{opacity:1}.reveal>.overlay.overlay-preview.loaded .spinner{opacity:0;visibility:hidden;transform:scale(.2)}.reveal>.overlay.overlay-help .viewport{overflow:auto;color:#fff}.reveal>.overlay.overlay-help .viewport .viewport-inner{width:600px;margin:auto;padding:20px 20px 80px;text-align:center;letter-spacing:normal}.reveal>.overlay.overlay-help .viewport .viewport-inner .title{font-size:20px}.reveal>.overlay.overlay-help .viewport .viewport-inner table{border:1px solid #fff;border-collapse:collapse;font-size:16px}.reveal>.overlay.overlay-help .viewport .viewport-inner table td,.reveal>.overlay.overlay-help .viewport .viewport-inner table th{width:200px;padding:14px;border:1px solid #fff;vertical-align:middle}.reveal>.overlay.overlay-help .viewport .viewport-inner table th{padding-top:20px;padding-bottom:20px}.reveal .playback{position:absolute;left:15px;bottom:20px;z-index:30;cursor:pointer;transition:all .4s ease;-webkit-tap-highlight-color:transparent}.reveal.overview .playback{opacity:0;visibility:hidden}.reveal .hljs{min-height:100%}.reveal .hljs table{margin:initial}.reveal .hljs-ln-code,.reveal .hljs-ln-numbers{padding:0;border:0}.reveal .hljs-ln-numbers{opacity:.6;padding-right:.75em;text-align:right;vertical-align:top}.reveal .hljs.has-highlights tr:not(.highlight-line){opacity:.4}.reveal .hljs:not(:first-child).fragment{position:absolute;top:0;left:0;width:100%;box-sizing:border-box}.reveal pre[data-auto-animate-target]{overflow:hidden}.reveal pre[data-auto-animate-target] code{height:100%}.reveal .roll{display:inline-block;line-height:1.2;overflow:hidden;vertical-align:top;perspective:400px;perspective-origin:50% 50%}.reveal .roll:hover{background:0 0;text-shadow:none}.reveal .roll span{display:block;position:relative;padding:0 2px;pointer-events:none;transition:all .4s ease;transform-origin:50% 0;transform-style:preserve-3d;backface-visibility:hidden}.reveal .roll:hover span{background:rgba(0,0,0,.5);transform:translateZ(-45px) rotateX(90deg)}.reveal .roll span:after{content:attr(data-title);display:block;position:absolute;left:0;top:0;padding:0 2px;backface-visibility:hidden;transform-origin:50% 0;transform:translate3d(0,110%,0) rotateX(-90deg)}.reveal aside.notes{display:none}.reveal .speaker-notes{display:none;position:absolute;width:33.3333333333%;height:100%;top:0;left:100%;padding:14px 18px;z-index:1;font-size:18px;line-height:1.4;border:1px solid rgba(0,0,0,.05);color:#222;background-color:#f5f5f5;overflow:auto;box-sizing:border-box;text-align:left;font-family:Helvetica,sans-serif;-webkit-overflow-scrolling:touch}.reveal .speaker-notes .notes-placeholder{color:#ccc;font-style:italic}.reveal .speaker-notes:focus{outline:0}.reveal .speaker-notes:before{content:"Speaker notes";display:block;margin-bottom:10px;opacity:.5}.reveal.show-notes{max-width:75%;overflow:visible}.reveal.show-notes .speaker-notes{display:block}@media screen and (min-width:1600px){.reveal .speaker-notes{font-size:20px}}@media screen and (max-width:1024px){.reveal.show-notes{border-left:0;max-width:none;max-height:70%;max-height:70vh;overflow:visible}.reveal.show-notes .speaker-notes{top:100%;left:0;width:100%;height:30vh;border:0}}@media screen and (max-width:600px){.reveal.show-notes{max-height:60%;max-height:60vh}.reveal.show-notes .speaker-notes{top:100%;height:40vh}.reveal .speaker-notes{font-size:14px}}.zoomed .reveal *,.zoomed .reveal :after,.zoomed .reveal :before{backface-visibility:visible!important}.zoomed .reveal .controls,.zoomed .reveal .progress{opacity:0}.zoomed .reveal .roll span{background:0 0}.zoomed .reveal .roll span:after{visibility:hidden}html.print-pdf *{-webkit-print-color-adjust:exact}html.print-pdf{width:100%;height:100%;overflow:visible}html.print-pdf body{margin:0 auto!important;border:0;padding:0;float:none!important;overflow:visible}html.print-pdf .nestedarrow,html.print-pdf .reveal .controls,html.print-pdf .reveal .playback,html.print-pdf .reveal .progress,html.print-pdf .reveal.overview,html.print-pdf .state-background{display:none!important}html.print-pdf .reveal pre code{overflow:hidden!important;font-family:Courier,Courier New,monospace!important}html.print-pdf .reveal{width:auto!important;height:auto!important;overflow:hidden!important}html.print-pdf .reveal .slides{position:static;width:100%!important;height:auto!important;zoom:1!important;pointer-events:initial;left:auto;top:auto;margin:0!important;padding:0!important;overflow:visible;display:block;perspective:none;perspective-origin:50% 50%}html.print-pdf .reveal .slides .pdf-page{position:relative;overflow:hidden;z-index:1;page-break-after:always}html.print-pdf .reveal .slides section{visibility:visible!important;display:block!important;position:absolute!important;margin:0!important;padding:0!important;box-sizing:border-box!important;min-height:1px;opacity:1!important;transform-style:flat!important;transform:none!important}html.print-pdf .reveal section.stack{position:relative!important;margin:0!important;padding:0!important;page-break-after:avoid!important;height:auto!important;min-height:auto!important}html.print-pdf .reveal img{box-shadow:none}html.print-pdf .reveal .backgrounds{display:none}html.print-pdf .reveal .slide-background{display:block!important;position:absolute;top:0;left:0;width:100%;height:100%;z-index:auto!important}html.print-pdf .reveal.show-notes{max-width:none;max-height:none}html.print-pdf .reveal .speaker-notes-pdf{display:block;width:100%;height:auto;max-height:none;top:auto;right:auto;bottom:auto;left:auto;z-index:100}html.print-pdf .reveal .speaker-notes-pdf[data-layout=separate-page]{position:relative;color:inherit;background-color:transparent;padding:20px;page-break-after:always;border:0}html.print-pdf .reveal .slide-number-pdf{display:block;position:absolute;font-size:14px}html.print-pdf .aria-status{display:none}@media print{html:not(.print-pdf){background:#fff;width:auto;height:auto;overflow:visible}html:not(.print-pdf) body{background:#fff;font-size:20pt;width:auto;height:auto;border:0;margin:0 5%;padding:0;overflow:visible;float:none!important}html:not(.print-pdf) .controls,html:not(.print-pdf) .fork-reveal,html:not(.print-pdf) .nestedarrow,html:not(.print-pdf) .reveal .backgrounds,html:not(.print-pdf) .reveal .progress,html:not(.print-pdf) .reveal .slide-number,html:not(.print-pdf) .share-reveal,html:not(.print-pdf) .state-background{display:none!important}html:not(.print-pdf) body,html:not(.print-pdf) li,html:not(.print-pdf) p,html:not(.print-pdf) td{font-size:20pt!important;color:#000}html:not(.print-pdf) h1,html:not(.print-pdf) h2,html:not(.print-pdf) h3,html:not(.print-pdf) h4,html:not(.print-pdf) h5,html:not(.print-pdf) h6{color:#000!important;height:auto;line-height:normal;text-align:left;letter-spacing:normal}html:not(.print-pdf) h1{font-size:28pt!important}html:not(.print-pdf) h2{font-size:24pt!important}html:not(.print-pdf) h3{font-size:22pt!important}html:not(.print-pdf) h4{font-size:22pt!important;font-variant:small-caps}html:not(.print-pdf) h5{font-size:21pt!important}html:not(.print-pdf) h6{font-size:20pt!important;font-style:italic}html:not(.print-pdf) a:link,html:not(.print-pdf) a:visited{color:#000!important;font-weight:700;text-decoration:underline}html:not(.print-pdf) div,html:not(.print-pdf) ol,html:not(.print-pdf) p,html:not(.print-pdf) ul{visibility:visible;position:static;width:auto;height:auto;display:block;overflow:visible;margin:0;text-align:left!important}html:not(.print-pdf) .reveal pre,html:not(.print-pdf) .reveal table{margin-left:0;margin-right:0}html:not(.print-pdf) .reveal pre code{padding:20px}html:not(.print-pdf) .reveal blockquote{margin:20px 0}html:not(.print-pdf) .reveal .slides{position:static!important;width:auto!important;height:auto!important;left:0!important;top:0!important;margin-left:0!important;margin-top:0!important;padding:0!important;zoom:1!important;transform:none!important;overflow:visible!important;display:block!important;text-align:left!important;perspective:none;perspective-origin:50% 50%}html:not(.print-pdf) .reveal .slides section{visibility:visible!important;position:static!important;width:auto!important;height:auto!important;display:block!important;overflow:visible!important;left:0!important;top:0!important;margin-left:0!important;margin-top:0!important;padding:60px 20px!important;z-index:auto!important;opacity:1!important;page-break-after:always!important;transform-style:flat!important;transform:none!important;transition:none!important}html:not(.print-pdf) .reveal .slides section.stack{padding:0!important}html:not(.print-pdf) .reveal section:last-of-type{page-break-after:avoid!important}html:not(.print-pdf) .reveal section .fragment{opacity:1!important;visibility:visible!important;transform:none!important}html:not(.print-pdf) .reveal .r-fit-text{white-space:normal!important}html:not(.print-pdf) .reveal section img{display:block;margin:15px 0;background:#fff;border:1px solid #666;box-shadow:none}html:not(.print-pdf) .reveal section small{font-size:.8em}html:not(.print-pdf) .reveal .hljs{max-height:100%;white-space:pre-wrap;word-wrap:break-word;word-break:break-word;font-size:15pt}html:not(.print-pdf) .reveal .hljs .hljs-ln-numbers{white-space:nowrap}html:not(.print-pdf) .reveal .hljs td{font-size:inherit!important;color:inherit!important}}section.has-dark-background,section.has-dark-background h1,section.has-dark-background h2,section.has-dark-background h3,section.has-dark-background h4,section.has-dark-background h5,section.has-dark-background h6{color:#fff}:root{--r-background-color: #fff;--r-main-font: Lato, sans-serif;--r-main-font-size: 40px;--r-main-color: #000;--r-block-margin: 20px;--r-heading-margin: 0 0 20px 0;--r-heading-font: News Cycle, Impact, sans-serif;--r-heading-color: #000;--r-heading-line-height: 1.2;--r-heading-letter-spacing: normal;--r-heading-text-transform: none;--r-heading-text-shadow: none;--r-heading-font-weight: normal;--r-heading1-text-shadow: none;--r-heading1-size: 3.77em;--r-heading2-size: 2.11em;--r-heading3-size: 1.55em;--r-heading4-size: 1em;--r-code-font: monospace;--r-link-color: #00008B;--r-link-color-dark: #00003f;--r-link-color-hover: #0000f1;--r-selection-background-color: rgba(0, 0, 0, .99);--r-selection-color: #fff}.reveal-viewport{background:#fff;background-color:var(--r-background-color)}.reveal{font-family:var(--r-main-font);font-size:var(--r-main-font-size);font-weight:400;color:var(--r-main-color)}.reveal ::selection{color:var(--r-selection-color);background:var(--r-selection-background-color);text-shadow:none}.reveal ::-moz-selection{color:var(--r-selection-color);background:var(--r-selection-background-color);text-shadow:none}.reveal .slides section,.reveal .slides section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:var(--r-heading-margin);color:var(--r-heading-color);font-family:var(--r-heading-font);font-weight:var(--r-heading-font-weight);line-height:var(--r-heading-line-height);letter-spacing:var(--r-heading-letter-spacing);text-transform:var(--r-heading-text-transform);text-shadow:var(--r-heading-text-shadow);word-wrap:break-word}.reveal h1{font-size:var(--r-heading1-size)}.reveal h2{font-size:var(--r-heading2-size)}.reveal h3{font-size:var(--r-heading3-size)}.reveal h4{font-size:var(--r-heading4-size)}.reveal h1{text-shadow:var(--r-heading1-text-shadow)}.reveal p{margin:var(--r-block-margin) 0;line-height:1.3}.reveal h1:last-child,.reveal h2:last-child,.reveal h3:last-child,.reveal h4:last-child,.reveal h5:last-child,.reveal h6:last-child{margin-bottom:0}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:700}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:700}.reveal dd{margin-left:40px}.reveal blockquote{display:block;position:relative;width:70%;margin:var(--r-block-margin) auto;padding:5px;font-style:italic;background:rgba(255,255,255,.05);box-shadow:0 0 2px #0003}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:var(--r-block-margin) auto;text-align:left;font-size:.55em;font-family:var(--r-code-font);line-height:1.2em;word-wrap:break-word;box-shadow:0 5px 15px #00000026}.reveal code{font-family:var(--r-code-font);text-transform:none;tab-size:2}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal}.reveal .code-wrapper{white-space:normal}.reveal .code-wrapper code{white-space:pre}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:700}.reveal table th,.reveal table td{text-align:left;padding:.2em .5em;border-bottom:1px solid}.reveal table th[align=center],.reveal table td[align=center]{text-align:center}.reveal table th[align=right],.reveal table td[align=right]{text-align:right}.reveal table tbody tr:last-child th,.reveal table tbody tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super;font-size:smaller}.reveal sub{vertical-align:sub;font-size:smaller}.reveal small{display:inline-block;font-size:.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal img{margin:var(--r-block-margin) 0}.reveal a{color:var(--r-link-color);text-decoration:none;transition:color .15s ease}.reveal a:hover{color:var(--r-link-color-hover);text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:var(--r-link-color-dark)}.reveal .r-frame{border:4px solid var(--r-main-color);box-shadow:0 0 10px #00000026}.reveal a .r-frame{transition:all .15s linear}.reveal a:hover .r-frame{border-color:var(--r-link-color);box-shadow:0 0 20px #0000008c}.reveal .controls{color:var(--r-link-color)}.reveal .progress{background:rgba(0,0,0,.2);color:var(--r-link-color)}@media print{.backgrounds{background-color:var(--r-background-color)}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub Dark + Description: Dark theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Outdated base version: https://github.com/primer/github-syntax-dark + Current colors taken from GitHub's CSS +*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}:root{--r-main-font-size: 20px;--r-heading-margin: 10px 0 20px 0}.reveal .slides{text-align:left}.reveal ul li{margin-bottom:5px}.reveal .headline{background-color:#2196f3;color:#fff!important;padding:0 5px;font-weight:700!important}.reveal .headline:first-letter{font-weight:400!important}.reveal small{margin-top:15px}.reveal img{display:block;max-width:50%;margin-top:.5em}.reveal img.center{margin:.5em auto 0}.reveal pre{box-shadow:0 5px 15px #0000000d;line-height:1.05em}.reveal p:not(.snippet) code,.reveal li code{padding:2px 4px;color:#1f1f1f;background-color:#f0f0f0;border-radius:4px}.reveal .snippet{padding:10px;color:#1f1f1f;font-weight:700;background-color:#f3e5f5;border-radius:4px}.reveal .sidebyside{display:flex;align-items:flex-start;align-content:flex-start;justify-content:space-evenly;gap:1em}.reveal pre{font-size:75%}.reveal .sidebyside pre{font-size:65%}::-webkit-scrollbar{width:20px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#a4a4a4;border-radius:20px;border:6px solid transparent;background-clip:content-box}::-webkit-scrollbar-thumb:hover{background-color:#757575} diff --git a/assets/index.e0aedfd9.js b/assets/index.e0aedfd9.js new file mode 100644 index 0000000..049bbbc --- /dev/null +++ b/assets/index.e0aedfd9.js @@ -0,0 +1,110 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerpolicy&&(r.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?r.credentials="include":i.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(i){if(i.ep)return;i.ep=!0;const r=n(i);fetch(i.href,r)}})();/*! +* reveal.js 4.4.0 +* https://revealjs.com +* MIT licensed +* +* Copyright (C) 2011-2022 Hakim El Hattab, https://hakim.se +*/const Ge=(e,t)=>{for(let n in t)e[n]=t[n];return e},U=(e,t)=>Array.from(e.querySelectorAll(t)),Pt=(e,t,n)=>{n?e.classList.add(t):e.classList.remove(t)},Be=e=>{if(typeof e=="string"){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},Oe=(e,t)=>{e.style.transform=t},ft=(e,t)=>{let n=e.matches||e.matchesSelector||e.msMatchesSelector;return!(!n||!n.call(e,t))},le=(e,t)=>{if(typeof e.closest=="function")return e.closest(t);for(;e;){if(ft(e,t))return e;e=e.parentNode}return null},gi=(e,t,n,a="")=>{let i=e.querySelectorAll("."+n);for(let s=0;s{let t=document.createElement("style");return t.type="text/css",e&&e.length>0&&(t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))),document.head.appendChild(t),t},Vn=()=>{let e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,t=>{e[t.split("=").shift()]=t.split("=").pop()});for(let t in e){let n=e[t];e[t]=Be(unescape(n))}return e.dependencies!==void 0&&delete e.dependencies,e},Ei=(e,t=0)=>{if(e){let n,a=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",n=t-e.parentNode.offsetHeight,e.style.height=a+"px",e.parentNode.style.removeProperty("height"),n}return t},Si={mp4:"video/mp4",m4a:"video/mp4",ogv:"video/ogg",mpeg:"video/mpeg",webm:"video/webm"},Tt=navigator.userAgent,Ye=/(iphone|ipod|ipad|android)/gi.test(Tt)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;/chrome/i.test(Tt)&&/edge/i.test(Tt);const ya=/android/gi.test(Tt);var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});var zn=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};return typeof T=="string"?H(t(document.querySelectorAll(T)),F):H([T],F)[0]}}(typeof window>"u"?null:window);class hi{constructor(t){this.Reveal=t,this.startEmbeddedIframe=this.startEmbeddedIframe.bind(this)}shouldPreload(t){let n=this.Reveal.getConfig().preloadIframes;return typeof n!="boolean"&&(n=t.hasAttribute("data-preload")),n}load(t,n={}){t.style.display=this.Reveal.getConfig().display,U(t,"img[data-src], video[data-src], audio[data-src], iframe[data-src]").forEach(i=>{(i.tagName!=="IFRAME"||this.shouldPreload(i))&&(i.setAttribute("src",i.getAttribute("data-src")),i.setAttribute("data-lazy-loaded",""),i.removeAttribute("data-src"))}),U(t,"video, audio").forEach(i=>{let r=0;U(i,"source[data-src]").forEach(s=>{s.setAttribute("src",s.getAttribute("data-src")),s.removeAttribute("data-src"),s.setAttribute("data-lazy-loaded",""),r+=1}),Ye&&i.tagName==="VIDEO"&&i.setAttribute("playsinline",""),r>0&&i.load()});let a=t.slideBackgroundElement;if(a){a.style.display="block";let i=t.slideBackgroundContentElement,r=t.getAttribute("data-background-iframe");if(a.hasAttribute("data-loaded")===!1){a.setAttribute("data-loaded","true");let o=t.getAttribute("data-background-image"),l=t.getAttribute("data-background-video"),d=t.hasAttribute("data-background-video-loop"),u=t.hasAttribute("data-background-video-muted");if(o)/^data:/.test(o.trim())?i.style.backgroundImage=`url(${o.trim()})`:i.style.backgroundImage=o.split(",").map(c=>`url(${encodeURI(c.trim())})`).join(",");else if(l&&!this.Reveal.isSpeakerNotes()){let c=document.createElement("video");d&&c.setAttribute("loop",""),u&&(c.muted=!0),Ye&&(c.muted=!0,c.setAttribute("playsinline","")),l.split(",").forEach(m=>{let p=((_="")=>Si[_.split(".").pop()])(m);c.innerHTML+=p?``:``}),i.appendChild(c)}else if(r&&n.excludeIframes!==!0){let c=document.createElement("iframe");c.setAttribute("allowfullscreen",""),c.setAttribute("mozallowfullscreen",""),c.setAttribute("webkitallowfullscreen",""),c.setAttribute("allow","autoplay"),c.setAttribute("data-src",r),c.style.width="100%",c.style.height="100%",c.style.maxHeight="100%",c.style.maxWidth="100%",i.appendChild(c)}}let s=i.querySelector("iframe[data-src]");s&&this.shouldPreload(a)&&!/autoplay=(1|true|yes)/gi.test(r)&&s.getAttribute("src")!==r&&s.setAttribute("src",r)}this.layout(t)}layout(t){Array.from(t.querySelectorAll(".r-fit-text")).forEach(n=>{bi(n,{minSize:24,maxSize:.8*this.Reveal.getConfig().height,observeMutations:!1,observeWindow:!1})})}unload(t){t.style.display="none";let n=this.Reveal.getSlideBackground(t);n&&(n.style.display="none",U(n,"iframe[src]").forEach(a=>{a.removeAttribute("src")})),U(t,"video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]").forEach(a=>{a.setAttribute("data-src",a.getAttribute("src")),a.removeAttribute("src")}),U(t,"video[data-lazy-loaded] source[src], audio source[src]").forEach(a=>{a.setAttribute("data-src",a.getAttribute("src")),a.removeAttribute("src")})}formatEmbeddedContent(){let t=(n,a,i)=>{U(this.Reveal.getSlidesElement(),"iframe["+n+'*="'+a+'"]').forEach(r=>{let s=r.getAttribute(n);s&&s.indexOf(i)===-1&&r.setAttribute(n,s+(/\?/.test(s)?"&":"?")+i)})};t("src","youtube.com/embed/","enablejsapi=1"),t("data-src","youtube.com/embed/","enablejsapi=1"),t("src","player.vimeo.com/","api=1"),t("data-src","player.vimeo.com/","api=1")}startEmbeddedContent(t){t&&!this.Reveal.isSpeakerNotes()&&(U(t,'img[src$=".gif"]').forEach(n=>{n.setAttribute("src",n.getAttribute("src"))}),U(t,"video, audio").forEach(n=>{if(le(n,".fragment")&&!le(n,".fragment.visible"))return;let a=this.Reveal.getConfig().autoPlayMedia;if(typeof a!="boolean"&&(a=n.hasAttribute("data-autoplay")||!!le(n,".slide-background")),a&&typeof n.play=="function")if(n.readyState>1)this.startEmbeddedMedia({target:n});else if(Ye){let i=n.play();i&&typeof i.catch=="function"&&n.controls===!1&&i.catch(()=>{n.controls=!0,n.addEventListener("play",()=>{n.controls=!1})})}else n.removeEventListener("loadeddata",this.startEmbeddedMedia),n.addEventListener("loadeddata",this.startEmbeddedMedia)}),U(t,"iframe[src]").forEach(n=>{le(n,".fragment")&&!le(n,".fragment.visible")||this.startEmbeddedIframe({target:n})}),U(t,"iframe[data-src]").forEach(n=>{le(n,".fragment")&&!le(n,".fragment.visible")||n.getAttribute("src")!==n.getAttribute("data-src")&&(n.removeEventListener("load",this.startEmbeddedIframe),n.addEventListener("load",this.startEmbeddedIframe),n.setAttribute("src",n.getAttribute("data-src")))}))}startEmbeddedMedia(t){let n=!!le(t.target,"html"),a=!!le(t.target,".present");n&&a&&(t.target.currentTime=0,t.target.play()),t.target.removeEventListener("loadeddata",this.startEmbeddedMedia)}startEmbeddedIframe(t){let n=t.target;if(n&&n.contentWindow){let a=!!le(t.target,"html"),i=!!le(t.target,".present");if(a&&i){let r=this.Reveal.getConfig().autoPlayMedia;typeof r!="boolean"&&(r=n.hasAttribute("data-autoplay")||!!le(n,".slide-background")),/youtube\.com\/embed\//.test(n.getAttribute("src"))&&r?n.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(n.getAttribute("src"))&&r?n.contentWindow.postMessage('{"method":"play"}',"*"):n.contentWindow.postMessage("slide:start","*")}}}stopEmbeddedContent(t,n={}){n=Ge({unloadIframes:!0},n),t&&t.parentNode&&(U(t,"video, audio").forEach(a=>{a.hasAttribute("data-ignore")||typeof a.pause!="function"||(a.setAttribute("data-paused-by-reveal",""),a.pause())}),U(t,"iframe").forEach(a=>{a.contentWindow&&a.contentWindow.postMessage("slide:stop","*"),a.removeEventListener("load",this.startEmbeddedIframe)}),U(t,'iframe[src*="youtube.com/embed/"]').forEach(a=>{!a.hasAttribute("data-ignore")&&a.contentWindow&&typeof a.contentWindow.postMessage=="function"&&a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),U(t,'iframe[src*="player.vimeo.com/"]').forEach(a=>{!a.hasAttribute("data-ignore")&&a.contentWindow&&typeof a.contentWindow.postMessage=="function"&&a.contentWindow.postMessage('{"method":"pause"}',"*")}),n.unloadIframes===!0&&U(t,"iframe[data-src]").forEach(a=>{a.setAttribute("src","about:blank"),a.removeAttribute("src")}))}}class fi{constructor(t){this.Reveal=t}render(){this.element=document.createElement("div"),this.element.className="slide-number",this.Reveal.getRevealElement().appendChild(this.element)}configure(t,n){let a="none";t.slideNumber&&!this.Reveal.isPrintingPDF()&&(t.showSlideNumber==="all"||t.showSlideNumber==="speaker"&&this.Reveal.isSpeakerNotes())&&(a="block"),this.element.style.display=a}update(){this.Reveal.getConfig().slideNumber&&this.element&&(this.element.innerHTML=this.getSlideNumber())}getSlideNumber(t=this.Reveal.getCurrentSlide()){let n,a=this.Reveal.getConfig(),i="h.v";if(typeof a.slideNumber=="function")n=a.slideNumber(t);else{typeof a.slideNumber=="string"&&(i=a.slideNumber),/c/.test(i)||this.Reveal.getHorizontalSlides().length!==1||(i="c");let s=t&&t.dataset.visibility==="uncounted"?0:1;switch(n=[],i){case"c":n.push(this.Reveal.getSlidePastCount(t)+s);break;case"c/t":n.push(this.Reveal.getSlidePastCount(t)+s,"/",this.Reveal.getTotalSlides());break;default:let o=this.Reveal.getIndices(t);n.push(o.h+s);let l=i==="h/v"?"/":".";this.Reveal.isVerticalSlide(t)&&n.push(l,o.v+1)}}let r="#"+this.Reveal.location.getHash(t);return this.formatNumber(n[0],n[1],n[2],r)}formatNumber(t,n,a,i="#"+this.Reveal.location.getHash()){return typeof a!="number"||isNaN(a)?` + ${t} + `:` + ${t} + ${n} + ${a} + `}destroy(){this.element.remove()}}const kt=e=>{let t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};let n=e.match(/^#([0-9a-f]{6})$/i);if(n&&n[1])return n=n[1],{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16)};let a=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(a)return{r:parseInt(a[1],10),g:parseInt(a[2],10),b:parseInt(a[3],10)};let i=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return i?{r:parseInt(i[1],10),g:parseInt(i[2],10),b:parseInt(i[3],10),a:parseFloat(i[4])}:null};class Ti{constructor(t){this.Reveal=t}render(){this.element=document.createElement("div"),this.element.className="backgrounds",this.Reveal.getRevealElement().appendChild(this.element)}create(){this.element.innerHTML="",this.element.classList.add("no-transition"),this.Reveal.getHorizontalSlides().forEach(t=>{let n=this.createBackground(t,this.element);U(t,"section").forEach(a=>{this.createBackground(a,n),n.classList.add("stack")})}),this.Reveal.getConfig().parallaxBackgroundImage?(this.element.style.backgroundImage='url("'+this.Reveal.getConfig().parallaxBackgroundImage+'")',this.element.style.backgroundSize=this.Reveal.getConfig().parallaxBackgroundSize,this.element.style.backgroundRepeat=this.Reveal.getConfig().parallaxBackgroundRepeat,this.element.style.backgroundPosition=this.Reveal.getConfig().parallaxBackgroundPosition,setTimeout(()=>{this.Reveal.getRevealElement().classList.add("has-parallax-background")},1)):(this.element.style.backgroundImage="",this.Reveal.getRevealElement().classList.remove("has-parallax-background"))}createBackground(t,n){let a=document.createElement("div");a.className="slide-background "+t.className.replace(/present|past|future/,"");let i=document.createElement("div");return i.className="slide-background-content",a.appendChild(i),n.appendChild(a),t.slideBackgroundElement=a,t.slideBackgroundContentElement=i,this.sync(t),a}sync(t){const n=t.slideBackgroundElement,a=t.slideBackgroundContentElement,i={background:t.getAttribute("data-background"),backgroundSize:t.getAttribute("data-background-size"),backgroundImage:t.getAttribute("data-background-image"),backgroundVideo:t.getAttribute("data-background-video"),backgroundIframe:t.getAttribute("data-background-iframe"),backgroundColor:t.getAttribute("data-background-color"),backgroundGradient:t.getAttribute("data-background-gradient"),backgroundRepeat:t.getAttribute("data-background-repeat"),backgroundPosition:t.getAttribute("data-background-position"),backgroundTransition:t.getAttribute("data-background-transition"),backgroundOpacity:t.getAttribute("data-background-opacity")},r=t.hasAttribute("data-preload");t.classList.remove("has-dark-background"),t.classList.remove("has-light-background"),n.removeAttribute("data-loaded"),n.removeAttribute("data-background-hash"),n.removeAttribute("data-background-size"),n.removeAttribute("data-background-transition"),n.style.backgroundColor="",a.style.backgroundSize="",a.style.backgroundRepeat="",a.style.backgroundPosition="",a.style.backgroundImage="",a.style.opacity="",a.innerHTML="",i.background&&(/^(http|file|\/\/)/gi.test(i.background)||/\.(svg|png|jpg|jpeg|gif|bmp|webp)([?#\s]|$)/gi.test(i.background)?t.setAttribute("data-background-image",i.background):n.style.background=i.background),(i.background||i.backgroundColor||i.backgroundGradient||i.backgroundImage||i.backgroundVideo||i.backgroundIframe)&&n.setAttribute("data-background-hash",i.background+i.backgroundSize+i.backgroundImage+i.backgroundVideo+i.backgroundIframe+i.backgroundColor+i.backgroundGradient+i.backgroundRepeat+i.backgroundPosition+i.backgroundTransition+i.backgroundOpacity),i.backgroundSize&&n.setAttribute("data-background-size",i.backgroundSize),i.backgroundColor&&(n.style.backgroundColor=i.backgroundColor),i.backgroundGradient&&(n.style.backgroundImage=i.backgroundGradient),i.backgroundTransition&&n.setAttribute("data-background-transition",i.backgroundTransition),r&&n.setAttribute("data-preload",""),i.backgroundSize&&(a.style.backgroundSize=i.backgroundSize),i.backgroundRepeat&&(a.style.backgroundRepeat=i.backgroundRepeat),i.backgroundPosition&&(a.style.backgroundPosition=i.backgroundPosition),i.backgroundOpacity&&(a.style.opacity=i.backgroundOpacity);let s=i.backgroundColor;if(!s||!kt(s)){let l=window.getComputedStyle(n);l&&l.backgroundColor&&(s=l.backgroundColor)}if(s){const l=kt(s);l&&l.a!==0&&(typeof(o=s)=="string"&&(o=kt(o)),(o?(299*o.r+587*o.g+114*o.b)/1e3:null)<128?t.classList.add("has-dark-background"):t.classList.add("has-light-background"))}var o}update(t=!1){let n=this.Reveal.getCurrentSlide(),a=this.Reveal.getIndices(),i=null,r=this.Reveal.getConfig().rtl?"future":"past",s=this.Reveal.getConfig().rtl?"past":"future";if(Array.from(this.element.childNodes).forEach((o,l)=>{o.classList.remove("past","present","future"),la.h?o.classList.add(s):(o.classList.add("present"),i=o),(t||l===a.h)&&U(o,".slide-background").forEach((d,u)=>{d.classList.remove("past","present","future"),ua.v?d.classList.add("future"):(d.classList.add("present"),l===a.h&&(i=d))})}),this.previousBackground&&this.Reveal.slideContent.stopEmbeddedContent(this.previousBackground,{unloadIframes:!this.Reveal.slideContent.shouldPreload(this.previousBackground)}),i){this.Reveal.slideContent.startEmbeddedContent(i);let o=i.querySelector(".slide-background-content");if(o){let u=o.style.backgroundImage||"";/\.gif/i.test(u)&&(o.style.backgroundImage="",window.getComputedStyle(o).opacity,o.style.backgroundImage=u)}let l=this.previousBackground?this.previousBackground.getAttribute("data-background-hash"):null,d=i.getAttribute("data-background-hash");d&&d===l&&i!==this.previousBackground&&this.element.classList.add("no-transition"),this.previousBackground=i}n&&["has-light-background","has-dark-background"].forEach(o=>{n.classList.contains(o)?this.Reveal.getRevealElement().classList.add(o):this.Reveal.getRevealElement().classList.remove(o)},this),setTimeout(()=>{this.element.classList.remove("no-transition")},1)}updateParallax(){let t=this.Reveal.getIndices();if(this.Reveal.getConfig().parallaxBackgroundImage){let n,a,i=this.Reveal.getHorizontalSlides(),r=this.Reveal.getVerticalSlides(),s=this.element.style.backgroundSize.split(" ");s.length===1?n=a=parseInt(s[0],10):(n=parseInt(s[0],10),a=parseInt(s[1],10));let o,l,d=this.element.offsetWidth,u=i.length;o=typeof this.Reveal.getConfig().parallaxBackgroundHorizontal=="number"?this.Reveal.getConfig().parallaxBackgroundHorizontal:u>1?(n-d)/(u-1):0,l=o*t.h*-1;let c,m,p=this.element.offsetHeight,_=r.length;c=typeof this.Reveal.getConfig().parallaxBackgroundVertical=="number"?this.Reveal.getConfig().parallaxBackgroundVertical:(a-p)/(_-1),m=_>0?c*t.v:0,this.element.style.backgroundPosition=l+"px "+-m+"px"}}destroy(){this.element.remove()}}const vi=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener|showPreview/,$n=/fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;let Wn=0;class Ri{constructor(t){this.Reveal=t}run(t,n){this.reset();let a=this.Reveal.getSlides(),i=a.indexOf(n),r=a.indexOf(t);if(t.hasAttribute("data-auto-animate")&&n.hasAttribute("data-auto-animate")&&t.getAttribute("data-auto-animate-id")===n.getAttribute("data-auto-animate-id")&&!(i>r?n:t).hasAttribute("data-auto-animate-restart")){this.autoAnimateStyleSheet=this.autoAnimateStyleSheet||Jt();let s=this.getAutoAnimateOptions(n);t.dataset.autoAnimate="pending",n.dataset.autoAnimate="pending",s.slideDirection=i>r?"forward":"backward";let o=t.style.display==="none";o&&(t.style.display=this.Reveal.getConfig().display);let l=this.getAutoAnimatableElements(t,n).map(d=>this.autoAnimateElements(d.from,d.to,d.options||{},s,Wn++));if(o&&(t.style.display="none"),n.dataset.autoAnimateUnmatched!=="false"&&this.Reveal.getConfig().autoAnimateUnmatched===!0){let d=.8*s.duration,u=.2*s.duration;this.getUnmatchedAutoAnimateElements(n).forEach(c=>{let m=this.getAutoAnimateOptions(c,s),p="unmatched";m.duration===s.duration&&m.delay===s.delay||(p="unmatched-"+Wn++,l.push(`[data-auto-animate="running"] [data-auto-animate-target="${p}"] { transition: opacity ${m.duration}s ease ${m.delay}s; }`)),c.dataset.autoAnimateTarget=p},this),l.push(`[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${d}s ease ${u}s; }`)}this.autoAnimateStyleSheet.innerHTML=l.join(""),requestAnimationFrame(()=>{this.autoAnimateStyleSheet&&(getComputedStyle(this.autoAnimateStyleSheet).fontWeight,n.dataset.autoAnimate="running")}),this.Reveal.dispatchEvent({type:"autoanimate",data:{fromSlide:t,toSlide:n,sheet:this.autoAnimateStyleSheet}})}}reset(){U(this.Reveal.getRevealElement(),'[data-auto-animate]:not([data-auto-animate=""])').forEach(t=>{t.dataset.autoAnimate=""}),U(this.Reveal.getRevealElement(),"[data-auto-animate-target]").forEach(t=>{delete t.dataset.autoAnimateTarget}),this.autoAnimateStyleSheet&&this.autoAnimateStyleSheet.parentNode&&(this.autoAnimateStyleSheet.parentNode.removeChild(this.autoAnimateStyleSheet),this.autoAnimateStyleSheet=null)}autoAnimateElements(t,n,a,i,r){t.dataset.autoAnimateTarget="",n.dataset.autoAnimateTarget=r;let s=this.getAutoAnimateOptions(n,i);a.delay!==void 0&&(s.delay=a.delay),a.duration!==void 0&&(s.duration=a.duration),a.easing!==void 0&&(s.easing=a.easing);let o=this.getAutoAnimatableProperties("from",t,a),l=this.getAutoAnimatableProperties("to",n,a);if(n.classList.contains("fragment")&&(delete l.styles.opacity,t.classList.contains("fragment"))&&(t.className.match($n)||[""])[0]===(n.className.match($n)||[""])[0]&&i.slideDirection==="forward"&&n.classList.add("visible","disabled"),a.translate!==!1||a.scale!==!1){let c=this.Reveal.getScale(),m={x:(o.x-l.x)/c,y:(o.y-l.y)/c,scaleX:o.width/l.width,scaleY:o.height/l.height};m.x=Math.round(1e3*m.x)/1e3,m.y=Math.round(1e3*m.y)/1e3,m.scaleX=Math.round(1e3*m.scaleX)/1e3,m.scaleX=Math.round(1e3*m.scaleX)/1e3;let p=a.translate!==!1&&(m.x!==0||m.y!==0),_=a.scale!==!1&&(m.scaleX!==0||m.scaleY!==0);if(p||_){let S=[];p&&S.push(`translate(${m.x}px, ${m.y}px)`),_&&S.push(`scale(${m.scaleX}, ${m.scaleY})`),o.styles.transform=S.join(" "),o.styles["transform-origin"]="top left",l.styles.transform="none"}}for(let c in l.styles){const m=l.styles[c],p=o.styles[c];m===p?delete l.styles[c]:(m.explicitValue===!0&&(l.styles[c]=m.value),p.explicitValue===!0&&(o.styles[c]=p.value))}let d="",u=Object.keys(l.styles);return u.length>0&&(o.styles.transition="none",l.styles.transition=`all ${s.duration}s ${s.easing} ${s.delay}s`,l.styles["transition-property"]=u.join(", "),l.styles["will-change"]=u.join(", "),d='[data-auto-animate-target="'+r+'"] {'+Object.keys(o.styles).map(c=>c+": "+o.styles[c]+" !important;").join("")+'}[data-auto-animate="running"] [data-auto-animate-target="'+r+'"] {'+Object.keys(l.styles).map(c=>c+": "+l.styles[c]+" !important;").join("")+"}"),d}getAutoAnimateOptions(t,n){let a={easing:this.Reveal.getConfig().autoAnimateEasing,duration:this.Reveal.getConfig().autoAnimateDuration,delay:0};if(a=Ge(a,n),t.parentNode){let i=le(t.parentNode,"[data-auto-animate-target]");i&&(a=this.getAutoAnimateOptions(i,a))}return t.dataset.autoAnimateEasing&&(a.easing=t.dataset.autoAnimateEasing),t.dataset.autoAnimateDuration&&(a.duration=parseFloat(t.dataset.autoAnimateDuration)),t.dataset.autoAnimateDelay&&(a.delay=parseFloat(t.dataset.autoAnimateDelay)),a}getAutoAnimatableProperties(t,n,a){let i=this.Reveal.getConfig(),r={styles:[]};if(a.translate!==!1||a.scale!==!1){let o;if(typeof a.measure=="function")o=a.measure(n);else if(i.center)o=n.getBoundingClientRect();else{let l=this.Reveal.getScale();o={x:n.offsetLeft*l,y:n.offsetTop*l,width:n.offsetWidth*l,height:n.offsetHeight*l}}r.x=o.x,r.y=o.y,r.width=o.width,r.height=o.height}const s=getComputedStyle(n);return(a.styles||i.autoAnimateStyles).forEach(o=>{let l;typeof o=="string"&&(o={property:o}),o.from!==void 0&&t==="from"?l={value:o.from,explicitValue:!0}:o.to!==void 0&&t==="to"?l={value:o.to,explicitValue:!0}:(o.property==="line-height"&&(l=parseFloat(s["line-height"])/parseFloat(s["font-size"])),isNaN(l)&&(l=s[o.property])),l!==""&&(r.styles[o.property]=l)}),r}getAutoAnimatableElements(t,n){let a=(typeof this.Reveal.getConfig().autoAnimateMatcher=="function"?this.Reveal.getConfig().autoAnimateMatcher:this.getAutoAnimatePairs).call(this,t,n),i=[];return a.filter((r,s)=>{if(i.indexOf(r.to)===-1)return i.push(r.to),!0})}getAutoAnimatePairs(t,n){let a=[];const i="h1, h2, h3, h4, h5, h6, p, li";return this.findAutoAnimateMatches(a,t,n,"[data-id]",r=>r.nodeName+":::"+r.getAttribute("data-id")),this.findAutoAnimateMatches(a,t,n,i,r=>r.nodeName+":::"+r.innerText),this.findAutoAnimateMatches(a,t,n,"img, video, iframe",r=>r.nodeName+":::"+(r.getAttribute("src")||r.getAttribute("data-src"))),this.findAutoAnimateMatches(a,t,n,"pre",r=>r.nodeName+":::"+r.innerText),a.forEach(r=>{ft(r.from,i)?r.options={scale:!1}:ft(r.from,"pre")&&(r.options={scale:!1,styles:["width","height"]},this.findAutoAnimateMatches(a,r.from,r.to,".hljs .hljs-ln-code",s=>s.textContent,{scale:!1,styles:[],measure:this.getLocalBoundingBox.bind(this)}),this.findAutoAnimateMatches(a,r.from,r.to,".hljs .hljs-ln-line[data-line-number]",s=>s.getAttribute("data-line-number"),{scale:!1,styles:["width"],measure:this.getLocalBoundingBox.bind(this)}))},this),a}getLocalBoundingBox(t){const n=this.Reveal.getScale();return{x:Math.round(t.offsetLeft*n*100)/100,y:Math.round(t.offsetTop*n*100)/100,width:Math.round(t.offsetWidth*n*100)/100,height:Math.round(t.offsetHeight*n*100)/100}}findAutoAnimateMatches(t,n,a,i,r,s){let o={},l={};[].slice.call(n.querySelectorAll(i)).forEach((d,u)=>{const c=r(d);typeof c=="string"&&c.length&&(o[c]=o[c]||[],o[c].push(d))}),[].slice.call(a.querySelectorAll(i)).forEach((d,u)=>{const c=r(d);let m;if(l[c]=l[c]||[],l[c].push(d),o[c]){const p=l[c].length-1,_=o[c].length-1;o[c][p]?(m=o[c][p],o[c][p]=null):o[c][_]&&(m=o[c][_],o[c][_]=null)}m&&t.push({from:m,to:d,options:s})})}getUnmatchedAutoAnimateElements(t){return[].slice.call(t.children).reduce((n,a)=>{const i=a.querySelector("[data-auto-animate-target]");return a.hasAttribute("data-auto-animate-target")||i||n.push(a),a.querySelector("[data-auto-animate-target]")&&(n=n.concat(this.getUnmatchedAutoAnimateElements(a))),n},[])}}class Ci{constructor(t){this.Reveal=t}configure(t,n){t.fragments===!1?this.disable():n.fragments===!1&&this.enable()}disable(){U(this.Reveal.getSlidesElement(),".fragment").forEach(t=>{t.classList.add("visible"),t.classList.remove("current-fragment")})}enable(){U(this.Reveal.getSlidesElement(),".fragment").forEach(t=>{t.classList.remove("visible"),t.classList.remove("current-fragment")})}availableRoutes(){let t=this.Reveal.getCurrentSlide();if(t&&this.Reveal.getConfig().fragments){let n=t.querySelectorAll(".fragment:not(.disabled)"),a=t.querySelectorAll(".fragment:not(.disabled):not(.visible)");return{prev:n.length-a.length>0,next:!!a.length}}return{prev:!1,next:!1}}sort(t,n=!1){t=Array.from(t);let a=[],i=[],r=[];t.forEach(o=>{if(o.hasAttribute("data-fragment-index")){let l=parseInt(o.getAttribute("data-fragment-index"),10);a[l]||(a[l]=[]),a[l].push(o)}else i.push([o])}),a=a.concat(i);let s=0;return a.forEach(o=>{o.forEach(l=>{r.push(l),l.setAttribute("data-fragment-index",s)}),s++}),n===!0?a:r}sortAll(){this.Reveal.getHorizontalSlides().forEach(t=>{let n=U(t,"section");n.forEach((a,i)=>{this.sort(a.querySelectorAll(".fragment"))},this),n.length===0&&this.sort(t.querySelectorAll(".fragment"))})}update(t,n){let a={shown:[],hidden:[]},i=this.Reveal.getCurrentSlide();if(i&&this.Reveal.getConfig().fragments&&(n=n||this.sort(i.querySelectorAll(".fragment"))).length){let r=0;if(typeof t!="number"){let s=this.sort(i.querySelectorAll(".fragment.visible")).pop();s&&(t=parseInt(s.getAttribute("data-fragment-index")||0,10))}Array.from(n).forEach((s,o)=>{if(s.hasAttribute("data-fragment-index")&&(o=parseInt(s.getAttribute("data-fragment-index"),10)),r=Math.max(r,o),o<=t){let l=s.classList.contains("visible");s.classList.add("visible"),s.classList.remove("current-fragment"),o===t&&(this.Reveal.announceStatus(this.Reveal.getStatusText(s)),s.classList.add("current-fragment"),this.Reveal.slideContent.startEmbeddedContent(s)),l||(a.shown.push(s),this.Reveal.dispatchEvent({target:s,type:"visible",bubbles:!1}))}else{let l=s.classList.contains("visible");s.classList.remove("visible"),s.classList.remove("current-fragment"),l&&(this.Reveal.slideContent.stopEmbeddedContent(s),a.hidden.push(s),this.Reveal.dispatchEvent({target:s,type:"hidden",bubbles:!1}))}}),t=typeof t=="number"?t:-1,t=Math.max(Math.min(t,r),-1),i.setAttribute("data-fragment",t)}return a}sync(t=this.Reveal.getCurrentSlide()){return this.sort(t.querySelectorAll(".fragment"))}goto(t,n=0){let a=this.Reveal.getCurrentSlide();if(a&&this.Reveal.getConfig().fragments){let i=this.sort(a.querySelectorAll(".fragment:not(.disabled)"));if(i.length){if(typeof t!="number"){let s=this.sort(a.querySelectorAll(".fragment:not(.disabled).visible")).pop();t=s?parseInt(s.getAttribute("data-fragment-index")||0,10):-1}t+=n;let r=this.update(t,i);return r.hidden.length&&this.Reveal.dispatchEvent({type:"fragmenthidden",data:{fragment:r.hidden[0],fragments:r.hidden}}),r.shown.length&&this.Reveal.dispatchEvent({type:"fragmentshown",data:{fragment:r.shown[0],fragments:r.shown}}),this.Reveal.controls.update(),this.Reveal.progress.update(),this.Reveal.getConfig().fragmentInURL&&this.Reveal.location.writeURL(),!(!r.shown.length&&!r.hidden.length)}}return!1}next(){return this.goto(null,1)}prev(){return this.goto(null,-1)}}class Ni{constructor(t){this.Reveal=t,this.active=!1,this.onSlideClicked=this.onSlideClicked.bind(this)}activate(){if(this.Reveal.getConfig().overview&&!this.isActive()){this.active=!0,this.Reveal.getRevealElement().classList.add("overview"),this.Reveal.cancelAutoSlide(),this.Reveal.getSlidesElement().appendChild(this.Reveal.getBackgroundsElement()),U(this.Reveal.getRevealElement(),".slides section").forEach(i=>{i.classList.contains("stack")||i.addEventListener("click",this.onSlideClicked,!0)});const t=70,n=this.Reveal.getComputedSlideSize();this.overviewSlideWidth=n.width+t,this.overviewSlideHeight=n.height+t,this.Reveal.getConfig().rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.Reveal.updateSlidesVisibility(),this.layout(),this.update(),this.Reveal.layout();const a=this.Reveal.getIndices();this.Reveal.dispatchEvent({type:"overviewshown",data:{indexh:a.h,indexv:a.v,currentSlide:this.Reveal.getCurrentSlide()}})}}layout(){this.Reveal.getHorizontalSlides().forEach((t,n)=>{t.setAttribute("data-index-h",n),Oe(t,"translate3d("+n*this.overviewSlideWidth+"px, 0, 0)"),t.classList.contains("stack")&&U(t,"section").forEach((a,i)=>{a.setAttribute("data-index-h",n),a.setAttribute("data-index-v",i),Oe(a,"translate3d(0, "+i*this.overviewSlideHeight+"px, 0)")})}),Array.from(this.Reveal.getBackgroundsElement().childNodes).forEach((t,n)=>{Oe(t,"translate3d("+n*this.overviewSlideWidth+"px, 0, 0)"),U(t,".slide-background").forEach((a,i)=>{Oe(a,"translate3d(0, "+i*this.overviewSlideHeight+"px, 0)")})})}update(){const t=Math.min(window.innerWidth,window.innerHeight),n=Math.max(t/5,150)/t,a=this.Reveal.getIndices();this.Reveal.transformSlides({overview:["scale("+n+")","translateX("+-a.h*this.overviewSlideWidth+"px)","translateY("+-a.v*this.overviewSlideHeight+"px)"].join(" ")})}deactivate(){if(this.Reveal.getConfig().overview){this.active=!1,this.Reveal.getRevealElement().classList.remove("overview"),this.Reveal.getRevealElement().classList.add("overview-deactivating"),setTimeout(()=>{this.Reveal.getRevealElement().classList.remove("overview-deactivating")},1),this.Reveal.getRevealElement().appendChild(this.Reveal.getBackgroundsElement()),U(this.Reveal.getRevealElement(),".slides section").forEach(n=>{Oe(n,""),n.removeEventListener("click",this.onSlideClicked,!0)}),U(this.Reveal.getBackgroundsElement(),".slide-background").forEach(n=>{Oe(n,"")}),this.Reveal.transformSlides({overview:""});const t=this.Reveal.getIndices();this.Reveal.slide(t.h,t.v),this.Reveal.layout(),this.Reveal.cueAutoSlide(),this.Reveal.dispatchEvent({type:"overviewhidden",data:{indexh:t.h,indexv:t.v,currentSlide:this.Reveal.getCurrentSlide()}})}}toggle(t){typeof t=="boolean"?t?this.activate():this.deactivate():this.isActive()?this.deactivate():this.activate()}isActive(){return this.active}onSlideClicked(t){if(this.isActive()){t.preventDefault();let n=t.target;for(;n&&!n.nodeName.match(/section/gi);)n=n.parentNode;if(n&&!n.classList.contains("disabled")&&(this.deactivate(),n.nodeName.match(/section/gi))){let a=parseInt(n.getAttribute("data-index-h"),10),i=parseInt(n.getAttribute("data-index-v"),10);this.Reveal.slide(a,i)}}}}class Oi{constructor(t){this.Reveal=t,this.shortcuts={},this.bindings={},this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onDocumentKeyPress=this.onDocumentKeyPress.bind(this)}configure(t,n){t.navigationMode==="linear"?(this.shortcuts["→ , ↓ , SPACE , N , L , J"]="Next slide",this.shortcuts["← , ↑ , P , H , K"]="Previous slide"):(this.shortcuts["N , SPACE"]="Next slide",this.shortcuts["P , Shift SPACE"]="Previous slide",this.shortcuts["← , H"]="Navigate left",this.shortcuts["→ , L"]="Navigate right",this.shortcuts["↑ , K"]="Navigate up",this.shortcuts["↓ , J"]="Navigate down"),this.shortcuts["Alt + ←/↑/→/↓"]="Navigate without fragments",this.shortcuts["Shift + ←/↑/→/↓"]="Jump to first/last slide",this.shortcuts["B , ."]="Pause",this.shortcuts.F="Fullscreen",this.shortcuts["ESC, O"]="Slide overview"}bind(){document.addEventListener("keydown",this.onDocumentKeyDown,!1),document.addEventListener("keypress",this.onDocumentKeyPress,!1)}unbind(){document.removeEventListener("keydown",this.onDocumentKeyDown,!1),document.removeEventListener("keypress",this.onDocumentKeyPress,!1)}addKeyBinding(t,n){typeof t=="object"&&t.keyCode?this.bindings[t.keyCode]={callback:n,key:t.key,description:t.description}:this.bindings[t]={callback:n,key:null,description:null}}removeKeyBinding(t){delete this.bindings[t]}triggerKey(t){this.onDocumentKeyDown({keyCode:t})}registerKeyboardShortcut(t,n){this.shortcuts[t]=n}getShortcuts(){return this.shortcuts}getBindings(){return this.bindings}onDocumentKeyPress(t){t.shiftKey&&t.charCode===63&&this.Reveal.toggleHelp()}onDocumentKeyDown(t){let n=this.Reveal.getConfig();if(typeof n.keyboardCondition=="function"&&n.keyboardCondition(t)===!1||n.keyboardCondition==="focused"&&!this.Reveal.isFocused())return!0;let a=t.keyCode,i=!this.Reveal.isAutoSliding();this.Reveal.onUserInput(t);let r=document.activeElement&&document.activeElement.isContentEditable===!0,s=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),o=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),l=!([32,37,38,39,40,78,80].indexOf(t.keyCode)!==-1&&t.shiftKey||t.altKey)&&(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey);if(r||s||o||l)return;let d,u=[66,86,190,191];if(typeof n.keyboard=="object")for(d in n.keyboard)n.keyboard[d]==="togglePause"&&u.push(parseInt(d,10));if(this.Reveal.isPaused()&&u.indexOf(a)===-1)return!1;let c=n.navigationMode==="linear"||!this.Reveal.hasHorizontalSlides()||!this.Reveal.hasVerticalSlides(),m=!1;if(typeof n.keyboard=="object"){for(d in n.keyboard)if(parseInt(d,10)===a){let p=n.keyboard[d];typeof p=="function"?p.apply(null,[t]):typeof p=="string"&&typeof this.Reveal[p]=="function"&&this.Reveal[p].call(),m=!0}}if(m===!1){for(d in this.bindings)if(parseInt(d,10)===a){let p=this.bindings[d].callback;typeof p=="function"?p.apply(null,[t]):typeof p=="string"&&typeof this.Reveal[p]=="function"&&this.Reveal[p].call(),m=!0}}m===!1&&(m=!0,a===80||a===33?this.Reveal.prev({skipFragments:t.altKey}):a===78||a===34?this.Reveal.next({skipFragments:t.altKey}):a===72||a===37?t.shiftKey?this.Reveal.slide(0):!this.Reveal.overview.isActive()&&c?this.Reveal.prev({skipFragments:t.altKey}):this.Reveal.left({skipFragments:t.altKey}):a===76||a===39?t.shiftKey?this.Reveal.slide(this.Reveal.getHorizontalSlides().length-1):!this.Reveal.overview.isActive()&&c?this.Reveal.next({skipFragments:t.altKey}):this.Reveal.right({skipFragments:t.altKey}):a===75||a===38?t.shiftKey?this.Reveal.slide(void 0,0):!this.Reveal.overview.isActive()&&c?this.Reveal.prev({skipFragments:t.altKey}):this.Reveal.up({skipFragments:t.altKey}):a===74||a===40?t.shiftKey?this.Reveal.slide(void 0,Number.MAX_VALUE):!this.Reveal.overview.isActive()&&c?this.Reveal.next({skipFragments:t.altKey}):this.Reveal.down({skipFragments:t.altKey}):a===36?this.Reveal.slide(0):a===35?this.Reveal.slide(this.Reveal.getHorizontalSlides().length-1):a===32?(this.Reveal.overview.isActive()&&this.Reveal.overview.deactivate(),t.shiftKey?this.Reveal.prev({skipFragments:t.altKey}):this.Reveal.next({skipFragments:t.altKey})):a===58||a===59||a===66||a===86||a===190||a===191?this.Reveal.togglePause():a===70?(p=>{let _=(p=p||document.documentElement).requestFullscreen||p.webkitRequestFullscreen||p.webkitRequestFullScreen||p.mozRequestFullScreen||p.msRequestFullscreen;_&&_.apply(p)})(n.embedded?this.Reveal.getViewportElement():document.documentElement):a===65?n.autoSlideStoppable&&this.Reveal.toggleAutoSlide(i):m=!1),m?t.preventDefault&&t.preventDefault():a!==27&&a!==79||(this.Reveal.closeOverlay()===!1&&this.Reveal.overview.toggle(),t.preventDefault&&t.preventDefault()),this.Reveal.cueAutoSlide()}}class yi{constructor(t){var n,a,i;i=1e3,(a="MAX_REPLACE_STATE_FREQUENCY")in(n=this)?Object.defineProperty(n,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[a]=i,this.Reveal=t,this.writeURLTimeout=0,this.replaceStateTimestamp=0,this.onWindowHashChange=this.onWindowHashChange.bind(this)}bind(){window.addEventListener("hashchange",this.onWindowHashChange,!1)}unbind(){window.removeEventListener("hashchange",this.onWindowHashChange,!1)}getIndicesFromHash(t=window.location.hash){let n=t.replace(/^#\/?/,""),a=n.split("/");if(/^[0-9]*$/.test(a[0])||!n.length){const i=this.Reveal.getConfig();let r,s=i.hashOneBasedIndex?1:0,o=parseInt(a[0],10)-s||0,l=parseInt(a[1],10)-s||0;return i.fragmentInURL&&(r=parseInt(a[2],10),isNaN(r)&&(r=void 0)),{h:o,v:l,f:r}}{let i,r;/\/[-\d]+$/g.test(n)&&(r=parseInt(n.split("/").pop(),10),r=isNaN(r)?void 0:r,n=n.split("/").shift());try{i=document.getElementById(decodeURIComponent(n))}catch{}if(i)return{...this.Reveal.getIndices(i),f:r}}return null}readURL(){const t=this.Reveal.getIndices(),n=this.getIndicesFromHash();n?n.h===t.h&&n.v===t.v&&n.f===void 0||this.Reveal.slide(n.h,n.v,n.f):this.Reveal.slide(t.h||0,t.v||0)}writeURL(t){let n=this.Reveal.getConfig(),a=this.Reveal.getCurrentSlide();if(clearTimeout(this.writeURLTimeout),typeof t=="number")this.writeURLTimeout=setTimeout(this.writeURL,t);else if(a){let i=this.getHash();n.history?window.location.hash=i:n.hash&&(i==="/"?this.debouncedReplaceState(window.location.pathname+window.location.search):this.debouncedReplaceState("#"+i))}}replaceState(t){window.history.replaceState(null,null,t),this.replaceStateTimestamp=Date.now()}debouncedReplaceState(t){clearTimeout(this.replaceStateTimeout),Date.now()-this.replaceStateTimestamp>this.MAX_REPLACE_STATE_FREQUENCY?this.replaceState(t):this.replaceStateTimeout=setTimeout(()=>this.replaceState(t),this.MAX_REPLACE_STATE_FREQUENCY)}getHash(t){let n="/",a=t||this.Reveal.getCurrentSlide(),i=a?a.getAttribute("id"):null;i&&(i=encodeURIComponent(i));let r=this.Reveal.getIndices(t);if(this.Reveal.getConfig().fragmentInURL||(r.f=void 0),typeof i=="string"&&i.length)n="/"+i,r.f>=0&&(n+="/"+r.f);else{let s=this.Reveal.getConfig().hashOneBasedIndex?1:0;(r.h>0||r.v>0||r.f>=0)&&(n+=r.h+s),(r.v>0||r.f>=0)&&(n+="/"+(r.v+s)),r.f>=0&&(n+="/"+r.f)}return n}onWindowHashChange(t){this.readURL()}}class Ai{constructor(t){this.Reveal=t,this.onNavigateLeftClicked=this.onNavigateLeftClicked.bind(this),this.onNavigateRightClicked=this.onNavigateRightClicked.bind(this),this.onNavigateUpClicked=this.onNavigateUpClicked.bind(this),this.onNavigateDownClicked=this.onNavigateDownClicked.bind(this),this.onNavigatePrevClicked=this.onNavigatePrevClicked.bind(this),this.onNavigateNextClicked=this.onNavigateNextClicked.bind(this)}render(){const t=this.Reveal.getConfig().rtl,n=this.Reveal.getRevealElement();this.element=document.createElement("aside"),this.element.className="controls",this.element.innerHTML=` + + + `,this.Reveal.getRevealElement().appendChild(this.element),this.controlsLeft=U(n,".navigate-left"),this.controlsRight=U(n,".navigate-right"),this.controlsUp=U(n,".navigate-up"),this.controlsDown=U(n,".navigate-down"),this.controlsPrev=U(n,".navigate-prev"),this.controlsNext=U(n,".navigate-next"),this.controlsRightArrow=this.element.querySelector(".navigate-right"),this.controlsLeftArrow=this.element.querySelector(".navigate-left"),this.controlsDownArrow=this.element.querySelector(".navigate-down")}configure(t,n){this.element.style.display=t.controls?"block":"none",this.element.setAttribute("data-controls-layout",t.controlsLayout),this.element.setAttribute("data-controls-back-arrows",t.controlsBackArrows)}bind(){let t=["touchstart","click"];ya&&(t=["touchstart"]),t.forEach(n=>{this.controlsLeft.forEach(a=>a.addEventListener(n,this.onNavigateLeftClicked,!1)),this.controlsRight.forEach(a=>a.addEventListener(n,this.onNavigateRightClicked,!1)),this.controlsUp.forEach(a=>a.addEventListener(n,this.onNavigateUpClicked,!1)),this.controlsDown.forEach(a=>a.addEventListener(n,this.onNavigateDownClicked,!1)),this.controlsPrev.forEach(a=>a.addEventListener(n,this.onNavigatePrevClicked,!1)),this.controlsNext.forEach(a=>a.addEventListener(n,this.onNavigateNextClicked,!1))})}unbind(){["touchstart","click"].forEach(t=>{this.controlsLeft.forEach(n=>n.removeEventListener(t,this.onNavigateLeftClicked,!1)),this.controlsRight.forEach(n=>n.removeEventListener(t,this.onNavigateRightClicked,!1)),this.controlsUp.forEach(n=>n.removeEventListener(t,this.onNavigateUpClicked,!1)),this.controlsDown.forEach(n=>n.removeEventListener(t,this.onNavigateDownClicked,!1)),this.controlsPrev.forEach(n=>n.removeEventListener(t,this.onNavigatePrevClicked,!1)),this.controlsNext.forEach(n=>n.removeEventListener(t,this.onNavigateNextClicked,!1))})}update(){let t=this.Reveal.availableRoutes();[...this.controlsLeft,...this.controlsRight,...this.controlsUp,...this.controlsDown,...this.controlsPrev,...this.controlsNext].forEach(a=>{a.classList.remove("enabled","fragmented"),a.setAttribute("disabled","disabled")}),t.left&&this.controlsLeft.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")}),t.right&&this.controlsRight.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")}),t.up&&this.controlsUp.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")}),t.down&&this.controlsDown.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")}),(t.left||t.up)&&this.controlsPrev.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")}),(t.right||t.down)&&this.controlsNext.forEach(a=>{a.classList.add("enabled"),a.removeAttribute("disabled")});let n=this.Reveal.getCurrentSlide();if(n){let a=this.Reveal.fragments.availableRoutes();a.prev&&this.controlsPrev.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")}),a.next&&this.controlsNext.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")}),this.Reveal.isVerticalSlide(n)?(a.prev&&this.controlsUp.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")}),a.next&&this.controlsDown.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")})):(a.prev&&this.controlsLeft.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")}),a.next&&this.controlsRight.forEach(i=>{i.classList.add("fragmented","enabled"),i.removeAttribute("disabled")}))}if(this.Reveal.getConfig().controlsTutorial){let a=this.Reveal.getIndices();!this.Reveal.hasNavigatedVertically()&&t.down?this.controlsDownArrow.classList.add("highlight"):(this.controlsDownArrow.classList.remove("highlight"),this.Reveal.getConfig().rtl?!this.Reveal.hasNavigatedHorizontally()&&t.left&&a.v===0?this.controlsLeftArrow.classList.add("highlight"):this.controlsLeftArrow.classList.remove("highlight"):!this.Reveal.hasNavigatedHorizontally()&&t.right&&a.v===0?this.controlsRightArrow.classList.add("highlight"):this.controlsRightArrow.classList.remove("highlight"))}}destroy(){this.unbind(),this.element.remove()}onNavigateLeftClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.getConfig().navigationMode==="linear"?this.Reveal.prev():this.Reveal.left()}onNavigateRightClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.getConfig().navigationMode==="linear"?this.Reveal.next():this.Reveal.right()}onNavigateUpClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.up()}onNavigateDownClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.down()}onNavigatePrevClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.prev()}onNavigateNextClicked(t){t.preventDefault(),this.Reveal.onUserInput(),this.Reveal.next()}}class Ii{constructor(t){this.Reveal=t,this.onProgressClicked=this.onProgressClicked.bind(this)}render(){this.element=document.createElement("div"),this.element.className="progress",this.Reveal.getRevealElement().appendChild(this.element),this.bar=document.createElement("span"),this.element.appendChild(this.bar)}configure(t,n){this.element.style.display=t.progress?"block":"none"}bind(){this.Reveal.getConfig().progress&&this.element&&this.element.addEventListener("click",this.onProgressClicked,!1)}unbind(){this.Reveal.getConfig().progress&&this.element&&this.element.removeEventListener("click",this.onProgressClicked,!1)}update(){if(this.Reveal.getConfig().progress&&this.bar){let t=this.Reveal.getProgress();this.Reveal.getTotalSlides()<2&&(t=0),this.bar.style.transform="scaleX("+t+")"}}getMaxWidth(){return this.Reveal.getRevealElement().offsetWidth}onProgressClicked(t){this.Reveal.onUserInput(t),t.preventDefault();let n=this.Reveal.getSlides(),a=n.length,i=Math.floor(t.clientX/this.getMaxWidth()*a);this.Reveal.getConfig().rtl&&(i=a-i);let r=this.Reveal.getIndices(n[i]);this.Reveal.slide(r.h,r.v)}destroy(){this.element.remove()}}class Di{constructor(t){this.Reveal=t,this.lastMouseWheelStep=0,this.cursorHidden=!1,this.cursorInactiveTimeout=0,this.onDocumentCursorActive=this.onDocumentCursorActive.bind(this),this.onDocumentMouseScroll=this.onDocumentMouseScroll.bind(this)}configure(t,n){t.mouseWheel?(document.addEventListener("DOMMouseScroll",this.onDocumentMouseScroll,!1),document.addEventListener("mousewheel",this.onDocumentMouseScroll,!1)):(document.removeEventListener("DOMMouseScroll",this.onDocumentMouseScroll,!1),document.removeEventListener("mousewheel",this.onDocumentMouseScroll,!1)),t.hideInactiveCursor?(document.addEventListener("mousemove",this.onDocumentCursorActive,!1),document.addEventListener("mousedown",this.onDocumentCursorActive,!1)):(this.showCursor(),document.removeEventListener("mousemove",this.onDocumentCursorActive,!1),document.removeEventListener("mousedown",this.onDocumentCursorActive,!1))}showCursor(){this.cursorHidden&&(this.cursorHidden=!1,this.Reveal.getRevealElement().style.cursor="")}hideCursor(){this.cursorHidden===!1&&(this.cursorHidden=!0,this.Reveal.getRevealElement().style.cursor="none")}destroy(){this.showCursor(),document.removeEventListener("DOMMouseScroll",this.onDocumentMouseScroll,!1),document.removeEventListener("mousewheel",this.onDocumentMouseScroll,!1),document.removeEventListener("mousemove",this.onDocumentCursorActive,!1),document.removeEventListener("mousedown",this.onDocumentCursorActive,!1)}onDocumentCursorActive(t){this.showCursor(),clearTimeout(this.cursorInactiveTimeout),this.cursorInactiveTimeout=setTimeout(this.hideCursor.bind(this),this.Reveal.getConfig().hideCursorTime)}onDocumentMouseScroll(t){if(Date.now()-this.lastMouseWheelStep>1e3){this.lastMouseWheelStep=Date.now();let n=t.detail||-t.wheelDelta;n>0?this.Reveal.next():n<0&&this.Reveal.prev()}}}const Qn=(e,t)=>{const n=document.createElement("script");n.type="text/javascript",n.async=!1,n.defer=!1,n.src=e,typeof t=="function"&&(n.onload=n.onreadystatechange=i=>{(i.type==="load"||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=n.onerror=null,t())},n.onerror=i=>{n.onload=n.onreadystatechange=n.onerror=null,t(new Error("Failed loading script: "+n.src+` +`+i))});const a=document.querySelector("head");a.insertBefore(n,a.lastChild)};class wi{constructor(t){this.Reveal=t,this.state="idle",this.registeredPlugins={},this.asyncDependencies=[]}load(t,n){return this.state="loading",t.forEach(this.registerPlugin.bind(this)),new Promise(a=>{let i=[],r=0;if(n.forEach(s=>{s.condition&&!s.condition()||(s.async?this.asyncDependencies.push(s):i.push(s))}),i.length){r=i.length;const s=o=>{o&&typeof o.callback=="function"&&o.callback(),--r==0&&this.initPlugins().then(a)};i.forEach(o=>{typeof o.id=="string"?(this.registerPlugin(o),s(o)):typeof o.src=="string"?Qn(o.src,()=>s(o)):(console.warn("Unrecognized plugin format",o),s())})}else this.initPlugins().then(a)})}initPlugins(){return new Promise(t=>{let n=Object.values(this.registeredPlugins),a=n.length;if(a===0)this.loadAsync().then(t);else{let i,r=()=>{--a==0?this.loadAsync().then(t):i()},s=0;i=()=>{let o=n[s++];if(typeof o.init=="function"){let l=o.init(this.Reveal);l&&typeof l.then=="function"?l.then(r):r()}else r()},i()}})}loadAsync(){return this.state="loaded",this.asyncDependencies.length&&this.asyncDependencies.forEach(t=>{Qn(t.src,t.callback)}),Promise.resolve()}registerPlugin(t){arguments.length===2&&typeof arguments[0]=="string"?(t=arguments[1]).id=arguments[0]:typeof t=="function"&&(t=t());let n=t.id;typeof n!="string"?console.warn("Unrecognized plugin format; can't find plugin.id",t):this.registeredPlugins[n]===void 0?(this.registeredPlugins[n]=t,this.state==="loaded"&&typeof t.init=="function"&&t.init(this.Reveal)):console.warn('reveal.js: "'+n+'" plugin has already been registered')}hasPlugin(t){return!!this.registeredPlugins[t]}getPlugin(t){return this.registeredPlugins[t]}getRegisteredPlugins(){return this.registeredPlugins}destroy(){Object.values(this.registeredPlugins).forEach(t=>{typeof t.destroy=="function"&&t.destroy()}),this.registeredPlugins={},this.asyncDependencies=[]}}class xi{constructor(t){this.Reveal=t}async setupPDF(){const t=this.Reveal.getConfig(),n=U(this.Reveal.getRevealElement(),".slides section"),a=t.slideNumber&&/all|print/i.test(t.showSlideNumber),i=this.Reveal.getComputedSlideSize(window.innerWidth,window.innerHeight),r=Math.floor(i.width*(1+t.margin)),s=Math.floor(i.height*(1+t.margin)),o=i.width,l=i.height;await new Promise(requestAnimationFrame),Jt("@page{size:"+r+"px "+s+"px; margin: 0px;}"),Jt(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+o+"px; max-height:"+l+"px}"),document.documentElement.classList.add("print-pdf"),document.body.style.width=r+"px",document.body.style.height=s+"px";const d=document.querySelector(".reveal-viewport");let u;if(d){const S=window.getComputedStyle(d);S&&S.background&&(u=S.background)}await new Promise(requestAnimationFrame),this.Reveal.layoutSlideContents(o,l),await new Promise(requestAnimationFrame);const c=n.map(S=>S.scrollHeight),m=[],p=n[0].parentNode;let _=1;n.forEach(function(S,v){if(S.classList.contains("stack")===!1){let f=(r-o)/2,y=(s-l)/2;const A=c[v];let O=Math.max(Math.ceil(A/s),1);O=Math.min(O,t.pdfMaxPagesPerSlide),(O===1&&t.center||S.classList.contains("center"))&&(y=Math.max((s-A)/2,0));const I=document.createElement("div");if(m.push(I),I.className="pdf-page",I.style.height=(s+t.pdfPageHeightOffset)*O+"px",u&&(I.style.background=u),I.appendChild(S),S.style.left=f+"px",S.style.top=y+"px",S.style.width=o+"px",this.Reveal.slideContent.layout(S),S.slideBackgroundElement&&I.insertBefore(S.slideBackgroundElement,S),t.showNotes){const D=this.Reveal.getSlideNotes(S);if(D){const h=typeof t.showNotes=="string"?t.showNotes:"inline",R=document.createElement("div");R.classList.add("speaker-notes"),R.classList.add("speaker-notes-pdf"),R.setAttribute("data-layout",h),R.innerHTML=D,h==="separate-page"?m.push(R):(R.style.left=8+"px",R.style.bottom=8+"px",R.style.width=r-2*8+"px",I.appendChild(R))}}if(a){const D=document.createElement("div");D.classList.add("slide-number"),D.classList.add("slide-number-pdf"),D.innerHTML=_++,I.appendChild(D)}if(t.pdfSeparateFragments){const D=this.Reveal.fragments.sort(I.querySelectorAll(".fragment"),!0);let w;D.forEach(function(h,R){w&&w.forEach(function(H){H.classList.remove("current-fragment")}),h.forEach(function(H){H.classList.add("visible","current-fragment")},this);const M=I.cloneNode(!0);if(a){const H=R+1;M.querySelector(".slide-number-pdf").innerHTML+="."+H}m.push(M),w=h},this),D.forEach(function(h){h.forEach(function(R){R.classList.remove("visible","current-fragment")})})}else U(I,".fragment:not(.fade-out)").forEach(function(D){D.classList.add("visible")})}},this),await new Promise(requestAnimationFrame),m.forEach(S=>p.appendChild(S)),this.Reveal.slideContent.layout(this.Reveal.getSlidesElement()),this.Reveal.dispatchEvent({type:"pdf-ready"})}isPrintingPDF(){return/print-pdf/gi.test(window.location.search)}}class Mi{constructor(t){this.Reveal=t,this.touchStartX=0,this.touchStartY=0,this.touchStartCount=0,this.touchCaptured=!1,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)}bind(){let t=this.Reveal.getRevealElement();"onpointerdown"in window?(t.addEventListener("pointerdown",this.onPointerDown,!1),t.addEventListener("pointermove",this.onPointerMove,!1),t.addEventListener("pointerup",this.onPointerUp,!1)):window.navigator.msPointerEnabled?(t.addEventListener("MSPointerDown",this.onPointerDown,!1),t.addEventListener("MSPointerMove",this.onPointerMove,!1),t.addEventListener("MSPointerUp",this.onPointerUp,!1)):(t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1))}unbind(){let t=this.Reveal.getRevealElement();t.removeEventListener("pointerdown",this.onPointerDown,!1),t.removeEventListener("pointermove",this.onPointerMove,!1),t.removeEventListener("pointerup",this.onPointerUp,!1),t.removeEventListener("MSPointerDown",this.onPointerDown,!1),t.removeEventListener("MSPointerMove",this.onPointerMove,!1),t.removeEventListener("MSPointerUp",this.onPointerUp,!1),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1)}isSwipePrevented(t){if(ft(t,"video, audio"))return!0;for(;t&&typeof t.hasAttribute=="function";){if(t.hasAttribute("data-prevent-swipe"))return!0;t=t.parentNode}return!1}onTouchStart(t){if(this.isSwipePrevented(t.target))return!0;this.touchStartX=t.touches[0].clientX,this.touchStartY=t.touches[0].clientY,this.touchStartCount=t.touches.length}onTouchMove(t){if(this.isSwipePrevented(t.target))return!0;let n=this.Reveal.getConfig();if(this.touchCaptured)ya&&t.preventDefault();else{this.Reveal.onUserInput(t);let a=t.touches[0].clientX,i=t.touches[0].clientY;if(t.touches.length===1&&this.touchStartCount!==2){let r=this.Reveal.availableRoutes({includeFragments:!0}),s=a-this.touchStartX,o=i-this.touchStartY;s>40&&Math.abs(s)>Math.abs(o)?(this.touchCaptured=!0,n.navigationMode==="linear"?n.rtl?this.Reveal.next():this.Reveal.prev():this.Reveal.left()):s<-40&&Math.abs(s)>Math.abs(o)?(this.touchCaptured=!0,n.navigationMode==="linear"?n.rtl?this.Reveal.prev():this.Reveal.next():this.Reveal.right()):o>40&&r.up?(this.touchCaptured=!0,n.navigationMode==="linear"?this.Reveal.prev():this.Reveal.up()):o<-40&&r.down&&(this.touchCaptured=!0,n.navigationMode==="linear"?this.Reveal.next():this.Reveal.down()),n.embedded?(this.touchCaptured||this.Reveal.isVerticalSlide())&&t.preventDefault():t.preventDefault()}}}onTouchEnd(t){this.touchCaptured=!1}onPointerDown(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&t.pointerType!=="touch"||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],this.onTouchStart(t))}onPointerMove(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&t.pointerType!=="touch"||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],this.onTouchMove(t))}onPointerUp(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&t.pointerType!=="touch"||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],this.onTouchEnd(t))}}class Li{constructor(t){this.Reveal=t,this.onRevealPointerDown=this.onRevealPointerDown.bind(this),this.onDocumentPointerDown=this.onDocumentPointerDown.bind(this)}configure(t,n){t.embedded?this.blur():(this.focus(),this.unbind())}bind(){this.Reveal.getConfig().embedded&&this.Reveal.getRevealElement().addEventListener("pointerdown",this.onRevealPointerDown,!1)}unbind(){this.Reveal.getRevealElement().removeEventListener("pointerdown",this.onRevealPointerDown,!1),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!1)}focus(){this.state!=="focus"&&(this.Reveal.getRevealElement().classList.add("focused"),document.addEventListener("pointerdown",this.onDocumentPointerDown,!1)),this.state="focus"}blur(){this.state!=="blur"&&(this.Reveal.getRevealElement().classList.remove("focused"),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!1)),this.state="blur"}isFocused(){return this.state==="focus"}destroy(){this.Reveal.getRevealElement().classList.remove("focused")}onRevealPointerDown(t){this.focus()}onDocumentPointerDown(t){let n=le(t.target,".reveal");n&&n===this.Reveal.getRevealElement()||this.blur()}}class Pi{constructor(t){this.Reveal=t}render(){this.element=document.createElement("div"),this.element.className="speaker-notes",this.element.setAttribute("data-prevent-swipe",""),this.element.setAttribute("tabindex","0"),this.Reveal.getRevealElement().appendChild(this.element)}configure(t,n){t.showNotes&&this.element.setAttribute("data-layout",typeof t.showNotes=="string"?t.showNotes:"inline")}update(){this.Reveal.getConfig().showNotes&&this.element&&this.Reveal.getCurrentSlide()&&!this.Reveal.print.isPrintingPDF()&&(this.element.innerHTML=this.getSlideNotes()||'No notes on this slide.')}updateVisibility(){this.Reveal.getConfig().showNotes&&this.hasNotes()&&!this.Reveal.print.isPrintingPDF()?this.Reveal.getRevealElement().classList.add("show-notes"):this.Reveal.getRevealElement().classList.remove("show-notes")}hasNotes(){return this.Reveal.getSlidesElement().querySelectorAll("[data-notes], aside.notes").length>0}isSpeakerNotesWindow(){return!!window.location.search.match(/receiver/gi)}getSlideNotes(t=this.Reveal.getCurrentSlide()){if(t.hasAttribute("data-notes"))return t.getAttribute("data-notes");let n=t.querySelectorAll("aside.notes");return n?Array.from(n).map(a=>a.innerHTML).join(` +`):null}destroy(){this.element.remove()}}class ki{constructor(t,n){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=t,this.progressCheck=n,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}setPlaying(t){const n=this.playing;this.playing=t,!n&&this.playing?this.animate():this.render()}animate(){const t=this.progress;this.progress=this.progressCheck(),t>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&requestAnimationFrame(this.animate.bind(this))}render(){let t=this.playing?this.progress:0,n=this.diameter2-this.thickness,a=this.diameter2,i=this.diameter2,r=28;this.progressOffset+=.1*(1-this.progressOffset);const s=-Math.PI/2+t*(2*Math.PI),o=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(a,i,n+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(a,i,n,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(a,i,n,o,s,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(a-14,i-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,r),this.context.fillRect(18,0,10,r)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,r),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()}on(t,n){this.canvas.addEventListener(t,n,!1)}off(t,n){this.canvas.removeEventListener(t,n,!1)}destroy(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)}}var Ui={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,respondToHashChanges:!0,history:!1,keyboard:!0,keyboardCondition:null,disableLayout:!1,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!0,embedded:!1,help:!0,pause:!0,showNotes:!1,showHiddenSlides:!1,autoPlayMedia:null,preloadIframes:null,autoAnimate:!0,autoAnimateMatcher:null,autoAnimateEasing:"ease",autoAnimateDuration:1,autoAnimateUnmatched:!0,autoAnimateStyles:["opacity","color","background-color","padding","font-size","line-height","letter-spacing","border-width","border-color","border-radius","outline","outline-offset"],autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,mobileViewDistance:2,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[],plugins:[]};function Ia(e,t){arguments.length<2&&(t=arguments[0],e=document.querySelector(".reveal"));const n={};let a,i,r,s,o,l={},d=!1,u={hasNavigatedHorizontally:!1,hasNavigatedVertically:!1},c=[],m=1,p={layout:"",overview:""},_={},S="idle",v=0,f=0,y=-1,A=!1,O=new hi(n),I=new fi(n),D=new Ri(n),w=new Ti(n),h=new Ci(n),R=new Ni(n),M=new Oi(n),H=new yi(n),q=new Ai(n),T=new Ii(n),F=new Di(n),G=new wi(n),$=new xi(n),ee=new Li(n),W=new Mi(n),j=new Pi(n);function De(g){if(!e)throw'Unable to find presentation root (
).';if(_.wrapper=e,_.slides=e.querySelector(".slides"),!_.slides)throw'Unable to find slides container (
).';return l={...Ui,...l,...t,...g,...Vn()},pe(),window.addEventListener("load",Pe,!1),G.load(l.plugins,l.dependencies).then(Nt),new Promise(b=>n.on("ready",b))}function pe(){l.embedded===!0?_.viewport=le(e,".reveal-viewport")||e:(_.viewport=document.body,document.documentElement.classList.add("reveal-full-page")),_.viewport.classList.add("reveal-viewport")}function Nt(){d=!0,Ve(),V(),ze(),Me(),Re(),si(),Le(),H.readURL(),w.update(!0),setTimeout(()=>{_.slides.classList.remove("no-transition"),_.wrapper.classList.add("ready"),oe({type:"ready",data:{indexh:a,indexv:i,currentSlide:s}})},1),$.isPrintingPDF()&&(P(),document.readyState==="complete"?$.setupPDF():window.addEventListener("load",()=>{$.setupPDF()}))}function Ve(){l.showHiddenSlides||U(_.wrapper,'section[data-visibility="hidden"]').forEach(g=>{g.parentNode.removeChild(g)})}function V(){_.slides.classList.add("no-transition"),Ye?_.wrapper.classList.add("no-hover"):_.wrapper.classList.remove("no-hover"),w.render(),I.render(),q.render(),T.render(),j.render(),_.pauseOverlay=gi(_.wrapper,"div","pause-overlay",l.controls?'':null),_.statusElement=Je(),_.wrapper.setAttribute("role","application")}function Je(){let g=_.wrapper.querySelector(".aria-status");return g||(g=document.createElement("div"),g.style.position="absolute",g.style.height="1px",g.style.width="1px",g.style.overflow="hidden",g.style.clip="rect( 1px, 1px, 1px, 1px )",g.classList.add("aria-status"),g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true"),_.wrapper.appendChild(g)),g}function re(g){_.statusElement.textContent=g}function J(g){let b="";if(g.nodeType===3)b+=g.textContent;else if(g.nodeType===1){let C=g.getAttribute("aria-hidden"),N=window.getComputedStyle(g).display==="none";C==="true"||N||Array.from(g.childNodes).forEach(k=>{b+=J(k)})}return b=b.trim(),b===""?"":b+" "}function Me(){setInterval(()=>{_.wrapper.scrollTop===0&&_.wrapper.scrollLeft===0||(_.wrapper.scrollTop=0,_.wrapper.scrollLeft=0)},1e3)}function Re(){document.addEventListener("fullscreenchange",it),document.addEventListener("webkitfullscreenchange",it)}function ze(){l.postMessage&&window.addEventListener("message",Un,!1)}function Le(g){const b={...l};if(typeof g=="object"&&Ge(l,g),n.isReady()===!1)return;const C=_.wrapper.querySelectorAll(".slides section").length;_.wrapper.classList.remove(b.transition),_.wrapper.classList.add(l.transition),_.wrapper.setAttribute("data-transition-speed",l.transitionSpeed),_.wrapper.setAttribute("data-background-transition",l.backgroundTransition),_.viewport.style.setProperty("--slide-width",l.width+"px"),_.viewport.style.setProperty("--slide-height",l.height+"px"),l.shuffle&&At(),Pt(_.wrapper,"embedded",l.embedded),Pt(_.wrapper,"rtl",l.rtl),Pt(_.wrapper,"center",l.center),l.pause===!1&&We(),l.previewLinks?(mn(),Ot("[data-preview-link=false]")):(Ot(),mn("[data-preview-link]:not([data-preview-link=false])")),D.reset(),o&&(o.destroy(),o=null),C>1&&l.autoSlide&&l.autoSlideStoppable&&(o=new ki(_.wrapper,()=>Math.min(Math.max((Date.now()-y)/v,0),1)),o.on("click",mi),A=!1),l.navigationMode!=="default"?_.wrapper.setAttribute("data-navigation-mode",l.navigationMode):_.wrapper.removeAttribute("data-navigation-mode"),j.configure(l,b),ee.configure(l,b),F.configure(l,b),q.configure(l,b),T.configure(l,b),M.configure(l,b),h.configure(l,b),I.configure(l,b),Cn()}function L(){window.addEventListener("resize",Gn,!1),l.touch&&W.bind(),l.keyboard&&M.bind(),l.progress&&T.bind(),l.respondToHashChanges&&H.bind(),q.bind(),ee.bind(),_.slides.addEventListener("click",Bn,!1),_.slides.addEventListener("transitionend",Fn,!1),_.pauseOverlay.addEventListener("click",We,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",Yn,!1)}function P(){W.unbind(),ee.unbind(),M.unbind(),q.unbind(),T.unbind(),H.unbind(),window.removeEventListener("resize",Gn,!1),_.slides.removeEventListener("click",Bn,!1),_.slides.removeEventListener("transitionend",Fn,!1),_.pauseOverlay.removeEventListener("click",We,!1)}function z(){P(),et(),Ot(),j.destroy(),ee.destroy(),G.destroy(),F.destroy(),q.destroy(),T.destroy(),w.destroy(),I.destroy(),document.removeEventListener("fullscreenchange",it),document.removeEventListener("webkitfullscreenchange",it),document.removeEventListener("visibilitychange",Yn,!1),window.removeEventListener("message",Un,!1),window.removeEventListener("load",Pe,!1),_.pauseOverlay&&_.pauseOverlay.remove(),_.statusElement&&_.statusElement.remove(),document.documentElement.classList.remove("reveal-full-page"),_.wrapper.classList.remove("ready","center","has-horizontal-slides","has-vertical-slides"),_.wrapper.removeAttribute("data-transition-speed"),_.wrapper.removeAttribute("data-background-transition"),_.viewport.classList.remove("reveal-viewport"),_.viewport.style.removeProperty("--slide-width"),_.viewport.style.removeProperty("--slide-height"),_.slides.style.removeProperty("width"),_.slides.style.removeProperty("height"),_.slides.style.removeProperty("zoom"),_.slides.style.removeProperty("left"),_.slides.style.removeProperty("top"),_.slides.style.removeProperty("bottom"),_.slides.style.removeProperty("right"),_.slides.style.removeProperty("transform"),Array.from(_.wrapper.querySelectorAll(".slides section")).forEach(g=>{g.style.removeProperty("display"),g.style.removeProperty("top"),g.removeAttribute("hidden"),g.removeAttribute("aria-hidden")})}function K(g,b,C){e.addEventListener(g,b,C)}function ae(g,b,C){e.removeEventListener(g,b,C)}function ge(g){typeof g.layout=="string"&&(p.layout=g.layout),typeof g.overview=="string"&&(p.overview=g.overview),p.layout?Oe(_.slides,p.layout+" "+p.overview):Oe(_.slides,p.overview)}function oe({target:g=_.wrapper,type:b,data:C,bubbles:N=!0}){let k=document.createEvent("HTMLEvents",1,2);return k.initEvent(b,N,!0),Ge(k,C),g.dispatchEvent(k),g===_.wrapper&&un(b),k}function un(g,b){if(l.postMessageEvents&&window.parent!==window.self){let C={namespace:"reveal",eventName:g,state:Pn()};Ge(C,b),window.parent.postMessage(JSON.stringify(C),"*")}}function mn(g="a"){Array.from(_.wrapper.querySelectorAll(g)).forEach(b=>{/^(http|www)/gi.test(b.getAttribute("href"))&&b.addEventListener("click",Hn,!1)})}function Ot(g="a"){Array.from(_.wrapper.querySelectorAll(g)).forEach(b=>{/^(http|www)/gi.test(b.getAttribute("href"))&&b.removeEventListener("click",Hn,!1)})}function pn(g){be(),_.overlay=document.createElement("div"),_.overlay.classList.add("overlay"),_.overlay.classList.add("overlay-preview"),_.wrapper.appendChild(_.overlay),_.overlay.innerHTML=`
+ + +
+
+
+ + + Unable to load iframe. This is likely due to the site's policy (x-frame-options). + +
`,_.overlay.querySelector("iframe").addEventListener("load",b=>{_.overlay.classList.add("loaded")},!1),_.overlay.querySelector(".close").addEventListener("click",b=>{be(),b.preventDefault()},!1),_.overlay.querySelector(".external").addEventListener("click",b=>{be()},!1)}function ni(g){typeof g=="boolean"?g?gn():be():_.overlay?be():gn()}function gn(){if(l.help){be(),_.overlay=document.createElement("div"),_.overlay.classList.add("overlay"),_.overlay.classList.add("overlay-help"),_.wrapper.appendChild(_.overlay);let g='

Keyboard Shortcuts


',b=M.getShortcuts(),C=M.getBindings();g+="";for(let N in b)g+=``;for(let N in C)C[N].key&&C[N].description&&(g+=``);g+="
KEYACTION
${N}${b[N]}
${C[N].key}${C[N].description}
",_.overlay.innerHTML=` +
+ +
+
+
${g}
+
+ `,_.overlay.querySelector(".close").addEventListener("click",N=>{be(),N.preventDefault()},!1)}}function be(){return!!_.overlay&&(_.overlay.parentNode.removeChild(_.overlay),_.overlay=null,!0)}function Pe(){if(_.wrapper&&!$.isPrintingPDF()){if(!l.disableLayout){Ye&&!l.embedded&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const g=Sn(),b=m;En(l.width,l.height),_.slides.style.width=g.width+"px",_.slides.style.height=g.height+"px",m=Math.min(g.presentationWidth/g.width,g.presentationHeight/g.height),m=Math.max(m,l.minScale),m=Math.min(m,l.maxScale),m===1?(_.slides.style.zoom="",_.slides.style.left="",_.slides.style.top="",_.slides.style.bottom="",_.slides.style.right="",ge({layout:""})):(_.slides.style.zoom="",_.slides.style.left="50%",_.slides.style.top="50%",_.slides.style.bottom="auto",_.slides.style.right="auto",ge({layout:"translate(-50%, -50%) scale("+m+")"}));const C=Array.from(_.wrapper.querySelectorAll(".slides section"));for(let N=0,k=C.length;N .stretch, section > .r-stretch").forEach(C=>{let N=Ei(C,b);if(/(img|video)/gi.test(C.nodeName)){const k=C.naturalWidth||C.videoWidth,Q=C.naturalHeight||C.videoHeight,ie=Math.min(g/k,N/Q);C.style.width=k*ie+"px",C.style.height=Q*ie+"px"}else C.style.width=g+"px",C.style.height=N+"px"})}function Sn(g,b){const C={width:l.width,height:l.height,presentationWidth:g||_.wrapper.offsetWidth,presentationHeight:b||_.wrapper.offsetHeight};return C.presentationWidth-=C.presentationWidth*l.margin,C.presentationHeight-=C.presentationHeight*l.margin,typeof C.width=="string"&&/%$/.test(C.width)&&(C.width=parseInt(C.width,10)/100*C.presentationWidth),typeof C.height=="string"&&/%$/.test(C.height)&&(C.height=parseInt(C.height,10)/100*C.presentationHeight),C}function bn(g,b){typeof g=="object"&&typeof g.setAttribute=="function"&&g.setAttribute("data-previous-indexv",b||0)}function hn(g){if(typeof g=="object"&&typeof g.setAttribute=="function"&&g.classList.contains("stack")){const b=g.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(g.getAttribute(b)||0,10)}return 0}function $e(g=s){return g&&g.parentNode&&!!g.parentNode.nodeName.match(/section/i)}function fn(){return!(!s||!$e(s))&&!s.nextElementSibling}function Tn(){return a===0&&i===0}function yt(){return!!s&&!s.nextElementSibling&&(!$e(s)||!s.parentNode.nextElementSibling)}function vn(){if(l.pause){const g=_.wrapper.classList.contains("paused");et(),_.wrapper.classList.add("paused"),g===!1&&oe({type:"paused"})}}function We(){const g=_.wrapper.classList.contains("paused");_.wrapper.classList.remove("paused"),ke(),g&&oe({type:"resumed"})}function Rn(g){typeof g=="boolean"?g?vn():We():Qe()?We():vn()}function Qe(){return _.wrapper.classList.contains("paused")}function ai(g){typeof g=="boolean"?g?nt():tt():A?nt():tt()}function ii(){return!(!v||A)}function Ee(g,b,C,N){if(oe({type:"beforeslidechange",data:{indexh:g===void 0?a:g,indexv:b===void 0?i:b,origin:N}}).defaultPrevented)return;r=s;const k=_.wrapper.querySelectorAll(".slides>section");if(k.length===0)return;b!==void 0||R.isActive()||(b=hn(k[g])),r&&r.parentNode&&r.parentNode.classList.contains("stack")&&bn(r.parentNode,i);const Q=c.concat();c.length=0;let ie=a||0,de=i||0;a=Nn(".slides>section",g===void 0?a:g),i=Nn(".slides>section.present>section",b===void 0?i:b);let fe=a!==ie||i!==de;fe||(r=null);let we=k[a];s=we.querySelectorAll("section")[i]||we;let te=!1;fe&&r&&s&&!R.isActive()&&(r.hasAttribute("data-auto-animate")&&s.hasAttribute("data-auto-animate")&&r.getAttribute("data-auto-animate-id")===s.getAttribute("data-auto-animate-id")&&!(a>ie||i>de?s:r).hasAttribute("data-auto-animate-restart")&&(te=!0,_.slides.classList.add("disable-slide-transitions")),S="running"),It(),Pe(),R.isActive()&&R.update(),C!==void 0&&h.goto(C),r&&r!==s&&(r.classList.remove("present"),r.setAttribute("aria-hidden","true"),Tn()&&setTimeout(()=>{li().forEach(Se=>{bn(Se,0)})},0));e:for(let Se=0,pi=c.length;Se{re(J(s))}),T.update(),q.update(),j.update(),w.update(),w.updateParallax(),I.update(),h.update(),H.writeURL(),ke(),te&&(setTimeout(()=>{_.slides.classList.remove("disable-slide-transitions")},0),l.autoAnimate&&D.run(r,s))}function Cn(){P(),L(),Pe(),v=l.autoSlide,ke(),w.create(),H.writeURL(),h.sortAll(),q.update(),T.update(),It(),j.update(),j.updateVisibility(),w.update(!0),I.update(),O.formatEmbeddedContent(),l.autoPlayMedia===!1?O.stopEmbeddedContent(s,{unloadIframes:!1}):O.startEmbeddedContent(s),R.isActive()&&R.layout()}function ri(g=s){w.sync(g),h.sync(g),O.load(g),w.update(),j.update()}function si(){Ce().forEach(g=>{U(g,"section").forEach((b,C)=>{C>0&&(b.classList.remove("present"),b.classList.remove("past"),b.classList.add("future"),b.setAttribute("aria-hidden","true"))})})}function At(g=Ce()){g.forEach((b,C)=>{let N=g[Math.floor(Math.random()*g.length)];N.parentNode===b.parentNode&&b.parentNode.insertBefore(b,N);let k=b.querySelectorAll("section");k.length&&At(k)})}function Nn(g,b){let C=U(_.wrapper,g),N=C.length,k=$.isPrintingPDF(),Q=!1,ie=!1;if(N){l.loop&&(b>=N&&(Q=!0),(b%=N)<0&&(b=N+b,ie=!0)),b=Math.max(Math.min(b,N-1),0);for(let _e=0;_eb?(te.classList.add(Se?"past":"future"),l.fragments&&yn(te)):_e===b&&l.fragments&&(Q?yn(te):ie&&On(te))}let de=C[b],fe=de.classList.contains("present");de.classList.add("present"),de.removeAttribute("hidden"),de.removeAttribute("aria-hidden"),fe||oe({target:de,type:"visible",bubbles:!1});let we=de.getAttribute("data-state");we&&(c=c.concat(we.split(" ")))}else b=0;return b}function On(g){U(g,".fragment").forEach(b=>{b.classList.add("visible"),b.classList.remove("current-fragment")})}function yn(g){U(g,".fragment.visible").forEach(b=>{b.classList.remove("visible","current-fragment")})}function It(){let g,b,C=Ce(),N=C.length;if(N&&a!==void 0){let k=R.isActive()?10:l.viewDistance;Ye&&(k=R.isActive()?6:l.mobileViewDistance),$.isPrintingPDF()&&(k=Number.MAX_VALUE);for(let Q=0;Qsection"),C=_.wrapper.querySelectorAll(".slides>section.present>section"),N={left:a>0,right:a0,down:i1&&(N.left=!0,N.right=!0),C.length>1&&(N.up=!0,N.down=!0)),b.length>1&&l.navigationMode==="linear"&&(N.right=N.right||N.down,N.left=N.left||N.up),g===!0){let k=h.availableRoutes();N.left=N.left||k.prev,N.up=N.up||k.prev,N.down=N.down||k.next,N.right=N.right||k.next}if(l.rtl){let k=N.left;N.left=N.right,N.right=k}return N}function An(g=s){let b=Ce(),C=0;e:for(let N=0;N0){let N=.9;b+=s.querySelectorAll(".fragment.visible").length/C.length*N}}return Math.min(b/(g-1),1)}function In(g){let b,C=a,N=i;if(g){let k=$e(g),Q=k?g.parentNode:g,ie=Ce();C=Math.max(ie.indexOf(Q),0),N=void 0,k&&(N=Math.max(U(g.parentNode,"section").indexOf(g),0))}if(!g&&s&&s.querySelectorAll(".fragment").length>0){let k=s.querySelector(".current-fragment");b=k&&k.hasAttribute("data-fragment-index")?parseInt(k.getAttribute("data-fragment-index"),10):s.querySelectorAll(".fragment.visible").length-1}return{h:C,v:N,f:b}}function Dt(){return U(_.wrapper,'.slides section:not(.stack):not([data-visibility="uncounted"])')}function Ce(){return U(_.wrapper,".slides>section")}function Dn(){return U(_.wrapper,".slides>section>section")}function li(){return U(_.wrapper,".slides>section.stack")}function wn(){return Ce().length>1}function xn(){return Dn().length>1}function ci(){return Dt().map(g=>{let b={};for(let C=0;C{k.hasAttribute("data-autoplay")&&v&&1e3*k.duration/k.playbackRate>v&&(v=1e3*k.duration/k.playbackRate+1e3)})),!v||A||Qe()||R.isActive()||yt()&&!h.availableRoutes().next&&l.loop!==!0||(f=setTimeout(()=>{typeof l.autoSlideMethod=="function"?l.autoSlideMethod():Lt(),ke()},v),y=Date.now()),o&&o.setPlaying(f!==-1)}}function et(){clearTimeout(f),f=-1}function tt(){v&&!A&&(A=!0,oe({type:"autoslidepaused"}),clearTimeout(f),o&&o.setPlaying(!1))}function nt(){v&&A&&(A=!1,oe({type:"autoslideresumed"}),ke())}function at({skipFragments:g=!1}={}){u.hasNavigatedHorizontally=!0,l.rtl?(R.isActive()||g||h.next()===!1)&&he().left&&Ee(a+1,l.navigationMode==="grid"?i:void 0):(R.isActive()||g||h.prev()===!1)&&he().left&&Ee(a-1,l.navigationMode==="grid"?i:void 0)}function wt({skipFragments:g=!1}={}){u.hasNavigatedHorizontally=!0,l.rtl?(R.isActive()||g||h.prev()===!1)&&he().right&&Ee(a-1,l.navigationMode==="grid"?i:void 0):(R.isActive()||g||h.next()===!1)&&he().right&&Ee(a+1,l.navigationMode==="grid"?i:void 0)}function xt({skipFragments:g=!1}={}){(R.isActive()||g||h.prev()===!1)&&he().up&&Ee(a,i-1)}function Mt({skipFragments:g=!1}={}){u.hasNavigatedVertically=!0,(R.isActive()||g||h.next()===!1)&&he().down&&Ee(a,i+1)}function kn({skipFragments:g=!1}={}){if(g||h.prev()===!1)if(he().up)xt({skipFragments:g});else{let b;if(b=l.rtl?U(_.wrapper,".slides>section.future").pop():U(_.wrapper,".slides>section.past").pop(),b&&b.classList.contains("stack")){let C=b.querySelectorAll("section").length-1||void 0;Ee(a-1,C)}else at({skipFragments:g})}}function Lt({skipFragments:g=!1}={}){if(u.hasNavigatedHorizontally=!0,u.hasNavigatedVertically=!0,g||h.next()===!1){let b=he();b.down&&b.right&&l.loop&&fn()&&(b.down=!1),b.down?Mt({skipFragments:g}):l.rtl?at({skipFragments:g}):wt({skipFragments:g})}}function ui(g){l.autoSlideStoppable&&tt()}function Un(g){let b=g.data;if(typeof b=="string"&&b.charAt(0)==="{"&&b.charAt(b.length-1)==="}"&&(b=JSON.parse(b),b.method&&typeof n[b.method]=="function"))if(vi.test(b.method)===!1){const C=n[b.method].apply(n,b.args);un("callback",{method:b.method,result:C})}else console.warn('reveal.js: "'+b.method+'" is is blacklisted from the postMessage API')}function Fn(g){S==="running"&&/section/gi.test(g.target.nodeName)&&(S="idle",oe({type:"slidetransitionend",data:{indexh:a,indexv:i,previousSlide:r,currentSlide:s}}))}function Bn(g){const b=le(g.target,'a[href^="#"]');if(b){const C=b.getAttribute("href"),N=H.getIndicesFromHash(C);N&&(n.slide(N.h,N.v,N.f),g.preventDefault())}}function Gn(g){Pe()}function Yn(g){document.hidden===!1&&document.activeElement!==document.body&&(typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.body.focus())}function it(g){(document.fullscreenElement||document.webkitFullscreenElement)===_.wrapper&&(g.stopImmediatePropagation(),setTimeout(()=>{n.layout(),n.focus.focus()},1))}function Hn(g){if(g.currentTarget&&g.currentTarget.hasAttribute("href")){let b=g.currentTarget.getAttribute("href");b&&(pn(b),g.preventDefault())}}function mi(g){yt()&&l.loop===!1?(Ee(0,0),nt()):A?nt():tt()}const qn={VERSION:"4.4.0",initialize:De,configure:Le,destroy:z,sync:Cn,syncSlide:ri,syncFragments:h.sync.bind(h),slide:Ee,left:at,right:wt,up:xt,down:Mt,prev:kn,next:Lt,navigateLeft:at,navigateRight:wt,navigateUp:xt,navigateDown:Mt,navigatePrev:kn,navigateNext:Lt,navigateFragment:h.goto.bind(h),prevFragment:h.prev.bind(h),nextFragment:h.next.bind(h),on:K,off:ae,addEventListener:K,removeEventListener:ae,layout:Pe,shuffle:At,availableRoutes:he,availableFragments:h.availableRoutes.bind(h),toggleHelp:ni,toggleOverview:R.toggle.bind(R),togglePause:Rn,toggleAutoSlide:ai,isFirstSlide:Tn,isLastSlide:yt,isLastVerticalSlide:fn,isVerticalSlide:$e,isPaused:Qe,isAutoSliding:ii,isSpeakerNotes:j.isSpeakerNotesWindow.bind(j),isOverview:R.isActive.bind(R),isFocused:ee.isFocused.bind(ee),isPrintingPDF:$.isPrintingPDF.bind($),isReady:()=>d,loadSlide:O.load.bind(O),unloadSlide:O.unload.bind(O),showPreview:pn,hidePreview:be,addEventListeners:L,removeEventListeners:P,dispatchEvent:oe,getState:Pn,setState:di,getProgress:oi,getIndices:In,getSlidesAttributes:ci,getSlidePastCount:An,getTotalSlides:Mn,getSlide:Ln,getPreviousSlide:()=>r,getCurrentSlide:()=>s,getSlideBackground:_i,getSlideNotes:j.getSlideNotes.bind(j),getSlides:Dt,getHorizontalSlides:Ce,getVerticalSlides:Dn,hasHorizontalSlides:wn,hasVerticalSlides:xn,hasNavigatedHorizontally:()=>u.hasNavigatedHorizontally,hasNavigatedVertically:()=>u.hasNavigatedVertically,addKeyBinding:M.addKeyBinding.bind(M),removeKeyBinding:M.removeKeyBinding.bind(M),triggerKey:M.triggerKey.bind(M),registerKeyboardShortcut:M.registerKeyboardShortcut.bind(M),getComputedSlideSize:Sn,getScale:()=>m,getConfig:()=>l,getQueryHash:Vn,getSlidePath:H.getHash.bind(H),getRevealElement:()=>e,getSlidesElement:()=>_.slides,getViewportElement:()=>_.viewport,getBackgroundsElement:()=>w.element,registerPlugin:G.registerPlugin.bind(G),hasPlugin:G.hasPlugin.bind(G),getPlugin:G.getPlugin.bind(G),getPlugins:G.getRegisteredPlugins.bind(G)};return Ge(n,{...qn,announceStatus:re,getStatusText:J,print:$,focus:ee,progress:T,controls:q,location:H,overview:R,fragments:h,slideContent:O,slideNumber:I,onUserInput:ui,closeOverlay:be,updateSlidesVisibility:It,layoutSlideContents:En,transformSlides:ge,cueAutoSlide:ke,cancelAutoSlide:et}),qn}let Ne=Ia,Kn=[];Ne.initialize=e=>(Object.assign(Ne,new Ia(document.querySelector(".reveal"),e)),Kn.map(t=>t(Ne)),Ne.initialize()),["configure","on","off","addEventListener","removeEventListener","registerPlugin"].forEach(e=>{Ne[e]=(...t)=>{Kn.push(n=>n[e].call(null,...t))}}),Ne.isReady=()=>!1,Ne.VERSION="4.4.0";function Fi(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let qe={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Bi=/[&<>"']/,Gi=/[&<>"']/g,Yi=/[<>"']|&(?!#?\w+;)/,Hi=/[<>"']|&(?!#?\w+;)/g,qi={"&":"&","<":"<",">":">",'"':""","'":"'"},jn=e=>qi[e];function se(e,t){if(t){if(Bi.test(e))return e.replace(Gi,jn)}else if(Yi.test(e))return e.replace(Hi,jn);return e}const Vi=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Da(e){return e.replace(Vi,(t,n)=>(n=n.toLowerCase())==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):"")}const zi=/(^|[^\[])\^/g;function Z(e,t){e=e.source||e,t=t||"";const n={replace:(a,i)=>(i=(i=i.source||i).replace(zi,"$1"),e=e.replace(a,i),n),getRegex:()=>new RegExp(e,t)};return n}const $i=/[^\w:]/g,Wi=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Xn(e,t,n){if(e){let a;try{a=decodeURIComponent(Da(n)).replace($i,"").toLowerCase()}catch{return null}if(a.indexOf("javascript:")===0||a.indexOf("vbscript:")===0||a.indexOf("data:")===0)return null}t&&!Wi.test(n)&&(n=function(a,i){st[" "+a]||(Qi.test(a)?st[" "+a]=a+"/":st[" "+a]=bt(a,"/",!0));const r=(a=st[" "+a]).indexOf(":")===-1;return i.substring(0,2)==="//"?r?i:a.replace(Ki,"$1")+i:i.charAt(0)==="/"?r?i:a.replace(ji,"$1")+i:a+i}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const st={},Qi=/^[^:]+:\/*[^/]*$/,Ki=/^([^:]+:)[\s\S]*$/,ji=/^([^:]+:\/*[^/]*)[\s\S]*$/,vt={exec:function(){}};function me(e){let t,n,a=1;for(;a{let o=!1,l=r;for(;--l>=0&&s[l]==="\\";)o=!o;return o?"|":" |"}).split(/ \|/);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function ea(e,t,n,a){const i=t.href,r=t.title?se(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){a.state.inLink=!0;const o={type:"link",raw:n,href:i,title:r,text:s,tokens:a.inlineTokens(s,[])};return a.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:r,text:se(s)}}class en{constructor(t){this.options=t||qe}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const a=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?a:bt(a,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const a=n[0],i=function(r,s){const o=r.match(/^(\s+)(?:```)/);if(o===null)return s;const l=o[1];return s.split(` +`).map(d=>{const u=d.match(/^\s+/);if(u===null)return d;const[c]=u;return c.length>=l.length?d.slice(l.length):d}).join(` +`)}(a,n[3]||"");return{type:"code",raw:a,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let a=n[2].trim();if(/#$/.test(a)){const r=bt(a,"#");this.options.pedantic?a=r.trim():r&&!/ $/.test(r)||(a=r.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:a,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const a=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(a,[]),text:a}}}list(t){let n=this.rules.block.list.exec(t);if(n){let a,i,r,s,o,l,d,u,c,m,p,_,S=n[1].trim();const v=S.length>1,f={type:"list",raw:"",ordered:v,start:v?+S.slice(0,-1):"",loose:!1,items:[]};S=v?`\\d{1,9}\\${S.slice(-1)}`:`\\${S}`,this.options.pedantic&&(S=v?S:"[*+-]");const y=new RegExp(`^( {0,3}${S})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(_=!1,n=y.exec(t))&&!this.rules.block.hr.test(t);){if(a=n[0],t=t.substring(a.length),u=n[2].split(` +`,1)[0],c=t.split(` +`,1)[0],this.options.pedantic?(s=2,p=u.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,p=u.slice(s),s+=n[1].length),l=!1,!u&&/^ *$/.test(c)&&(a+=c+` +`,t=t.substring(c.length+1),_=!0),!_){const O=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(m=t.split(` +`,1)[0],u=m,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!O.test(u));){if(u.search(/[^ ]/)>=s||!u.trim())p+=` +`+u.slice(s);else{if(l)break;p+=` +`+u}l||u.trim()||(l=!0),a+=m+` +`,t=t.substring(m.length+1)}}f.loose||(d?f.loose=!0:/\n *\n *$/.test(a)&&(d=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(p),i&&(r=i[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:a,task:!!i,checked:r,loose:!1,text:p}),f.raw+=a}f.items[f.items.length-1].raw=a.trimRight(),f.items[f.items.length-1].text=p.trimRight(),f.raw=f.raw.trimRight();const A=f.items.length;for(o=0;oD.type==="space"),I=O.every(D=>{const w=D.raw.split("");let h=0;for(const R of w)if(R===` +`&&(h+=1),h>1)return!0;return!1});!f.loose&&O.length&&I&&(f.loose=!0,f.items[o].loose=!0)}return f}}html(t){const n=this.rules.block.html.exec(t);if(n){const a={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(a.type="paragraph",a.text=this.options.sanitizer?this.options.sanitizer(n[0]):se(n[0]),a.tokens=[],this.lexer.inline(a.text,a.tokens)),a}}def(t){const n=this.rules.block.def.exec(t);if(n)return n[3]&&(n[3]=n[3].substring(1,n[3].length-1)),{type:"def",tag:n[1].toLowerCase().replace(/\s+/g," "),raw:n[0],href:n[2],title:n[3]}}table(t){const n=this.rules.block.table.exec(t);if(n){const a={type:"table",header:Zn(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(a.header.length===a.align.length){a.raw=n[0];let i,r,s,o,l=a.align.length;for(i=0;i({text:d}));for(l=a.header.length,r=0;r/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):se(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const a=n[2].trim();if(!this.options.pedantic&&/^$/.test(a))return;const s=bt(a.slice(0,-1),"\\");if((a.length-s.length)%2==0)return}else{const s=function(o,l){if(o.indexOf(l[1])===-1)return-1;const d=o.length;let u=0,c=0;for(;c-1){const o=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,o).trim(),n[3]=""}}let i=n[2],r="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],r=s[3])}else r=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(a)?i.slice(1):i.slice(1,-1)),ea(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let i=(a[2]||a[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const r=a[0].charAt(0);return{type:"text",raw:r,text:r}}return ea(a,i,a[0],this.lexer)}}emStrong(t,n,a=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&a.match(/[\p{L}\p{N}]/u))return;const r=i[1]||i[2]||"";if(!r||r&&(a===""||this.rules.inline.punctuation.exec(a))){const s=i[0].length-1;let o,l,d=s,u=0;const c=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+s);(i=c.exec(n))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=o.length,i[3]||i[4]){d+=l;continue}if((i[5]||i[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(d-=l,d>0)continue;if(l=Math.min(l,l+d+u),Math.min(s,l)%2){const p=t.slice(1,s+i.index+l);return{type:"em",raw:t.slice(0,s+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}const m=t.slice(2,s+i.index+l-1);return{type:"strong",raw:t.slice(0,s+i.index+l+1),text:m,tokens:this.lexer.inlineTokens(m,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let a=n[2].replace(/\n/g," ");const i=/[^ ]/.test(a),r=/^ /.test(a)&&/ $/.test(a);return i&&r&&(a=a.substring(1,a.length-1)),a=se(a,!0),{type:"codespan",raw:n[0],text:a}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const a=this.rules.inline.autolink.exec(t);if(a){let i,r;return a[2]==="@"?(i=se(this.options.mangle?n(a[1]):a[1]),r="mailto:"+i):(i=se(a[1]),r=i),{type:"link",raw:a[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let a;if(a=this.rules.inline.url.exec(t)){let i,r;if(a[2]==="@")i=se(this.options.mangle?n(a[0]):a[0]),r="mailto:"+i;else{let s;do s=a[0],a[0]=this.rules.inline._backpedal.exec(a[0])[0];while(s!==a[0]);i=se(a[0]),r=a[1]==="www."?"http://"+i:i}return{type:"link",raw:a[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const a=this.rules.inline.text.exec(t);if(a){let i;return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):se(a[0]):a[0]:se(this.options.smartypants?n(a[0]):a[0]),{type:"text",raw:a[0],text:i}}}}const B={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:vt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};B.def=Z(B.def).replace("label",B._label).replace("title",B._title).getRegex(),B.bullet=/(?:[*+-]|\d{1,9}[.)])/,B.listItemStart=Z(/^( *)(bull) */).replace("bull",B.bullet).getRegex(),B.list=Z(B.list).replace(/bull/g,B.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+B.def.source+")").getRegex(),B._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",B._comment=/|$)/,B.html=Z(B.html,"i").replace("comment",B._comment).replace("tag",B._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B.paragraph=Z(B._paragraph).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.blockquote=Z(B.blockquote).replace("paragraph",B.paragraph).getRegex(),B.normal=me({},B),B.gfm=me({},B.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),B.gfm.table=Z(B.gfm.table).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.gfm.paragraph=Z(B._paragraph).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",B.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",B._tag).getRegex(),B.pedantic=me({},B.normal,{html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",B._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vt,paragraph:Z(B.normal._paragraph).replace("hr",B.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",B.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const x={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:vt,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:vt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),a+="&#"+n+";";return a}x._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",x.punctuation=Z(x.punctuation).replace(/punctuation/g,x._punctuation).getRegex(),x.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,x.escapedEmSt=/\\\*|\\_/g,x._comment=Z(B._comment).replace("(?:-->|$)","-->").getRegex(),x.emStrong.lDelim=Z(x.emStrong.lDelim).replace(/punct/g,x._punctuation).getRegex(),x.emStrong.rDelimAst=Z(x.emStrong.rDelimAst,"g").replace(/punct/g,x._punctuation).getRegex(),x.emStrong.rDelimUnd=Z(x.emStrong.rDelimUnd,"g").replace(/punct/g,x._punctuation).getRegex(),x._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,x._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,x._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,x.autolink=Z(x.autolink).replace("scheme",x._scheme).replace("email",x._email).getRegex(),x._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,x.tag=Z(x.tag).replace("comment",x._comment).replace("attribute",x._attribute).getRegex(),x._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,x._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,x._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,x.link=Z(x.link).replace("label",x._label).replace("href",x._href).replace("title",x._title).getRegex(),x.reflink=Z(x.reflink).replace("label",x._label).replace("ref",B._label).getRegex(),x.nolink=Z(x.nolink).replace("ref",B._label).getRegex(),x.reflinkSearch=Z(x.reflinkSearch,"g").replace("reflink",x.reflink).replace("nolink",x.nolink).getRegex(),x.normal=me({},x),x.pedantic=me({},x.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",x._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x._label).getRegex()}),x.gfm=me({},x.normal,{escape:Z(x.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\!!(a=o.call({lexer:this},t,n))&&(t=t.substring(a.raw.length),n.push(a),!0))))if(a=this.tokenizer.space(t))t=t.substring(a.raw.length),a.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(a);else if(a=this.tokenizer.code(t))t=t.substring(a.raw.length),i=n[n.length-1],!i||i.type!=="paragraph"&&i.type!=="text"?n.push(a):(i.raw+=` +`+a.raw,i.text+=` +`+a.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(a=this.tokenizer.fences(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.heading(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.hr(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.blockquote(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.list(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.html(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.def(t))t=t.substring(a.raw.length),i=n[n.length-1],!i||i.type!=="paragraph"&&i.type!=="text"?this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title}):(i.raw+=` +`+a.raw,i.text+=` +`+a.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(a=this.tokenizer.table(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.lheading(t))t=t.substring(a.raw.length),n.push(a);else{if(r=t,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const l=t.slice(1);let d;this.options.extensions.startBlock.forEach(function(u){d=u.call({lexer:this},l),typeof d=="number"&&d>=0&&(o=Math.min(o,d))}),o<1/0&&o>=0&&(r=t.substring(0,o+1))}if(this.state.top&&(a=this.tokenizer.paragraph(r)))i=n[n.length-1],s&&i.type==="paragraph"?(i.raw+=` +`+a.raw,i.text+=` +`+a.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(a),s=r.length!==t.length,t=t.substring(a.raw.length);else if(a=this.tokenizer.text(t))t=t.substring(a.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=` +`+a.raw,i.text+=` +`+a.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(a);else if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}throw new Error(o)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let a,i,r,s,o,l,d=t;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(d))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,s.index)+"["+Jn("a",s[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(d))!=null;)d=d.slice(0,s.index)+"["+Jn("a",s[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(d))!=null;)d=d.slice(0,s.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(o||(l=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>!!(a=u.call({lexer:this},t,n))&&(t=t.substring(a.raw.length),n.push(a),!0))))if(a=this.tokenizer.escape(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.tag(t))t=t.substring(a.raw.length),i=n[n.length-1],i&&a.type==="text"&&i.type==="text"?(i.raw+=a.raw,i.text+=a.text):n.push(a);else if(a=this.tokenizer.link(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(a.raw.length),i=n[n.length-1],i&&a.type==="text"&&i.type==="text"?(i.raw+=a.raw,i.text+=a.text):n.push(a);else if(a=this.tokenizer.emStrong(t,d,l))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.codespan(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.br(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.del(t))t=t.substring(a.raw.length),n.push(a);else if(a=this.tokenizer.autolink(t,ta))t=t.substring(a.raw.length),n.push(a);else if(this.state.inLink||!(a=this.tokenizer.url(t,ta))){if(r=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const c=t.slice(1);let m;this.options.extensions.startInline.forEach(function(p){m=p.call({lexer:this},c),typeof m=="number"&&m>=0&&(u=Math.min(u,m))}),u<1/0&&u>=0&&(r=t.substring(0,u+1))}if(a=this.tokenizer.inlineText(r,Xi))t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(l=a.raw.slice(-1)),o=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=a.raw,i.text+=a.text):n.push(a);else if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else t=t.substring(a.raw.length),n.push(a);return n}}class tn{constructor(t){this.options=t||qe}code(t,n,a){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const r=this.options.highlight(t,i);r!=null&&r!==t&&(a=!0,t=r)}return t=t.replace(/\n$/,"")+` +`,i?'
'+(a?t:se(t,!0))+`
+`:"
"+(a?t:se(t,!0))+`
+`}blockquote(t){return`
+`+t+`
+`}html(t){return t}heading(t,n,a,i){return this.options.headerIds?"'+t+" +`:""+t+" +`}hr(){return this.options.xhtml?`
+`:`
+`}list(t,n,a){const i=n?"ol":"ul";return"<"+i+(n&&a!==1?' start="'+a+'"':"")+`> +`+t+" +`}listitem(t){return"
  • "+t+`
  • +`}checkbox(t){return" "}paragraph(t){return"

    "+t+`

    +`}table(t,n){return n&&(n=""+n+""),` + +`+t+` +`+n+`
    +`}tablerow(t){return` +`+t+` +`}tablecell(t,n){const a=n.header?"th":"td";return(n.align?"<"+a+' align="'+n.align+'">':"<"+a+">")+t+" +`}strong(t){return""+t+""}em(t){return""+t+""}codespan(t){return""+t+""}br(){return this.options.xhtml?"
    ":"
    "}del(t){return""+t+""}link(t,n,a){if((t=Xn(this.options.sanitize,this.options.baseUrl,t))===null)return a;let i='",i}image(t,n,a){if((t=Xn(this.options.sanitize,this.options.baseUrl,t))===null)return a;let i=''+a+'":">",i}text(t){return t}}class xa{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,a){return""+a}image(t,n,a){return""+a}br(){return""}}class Ma{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let a=t,i=0;if(this.seen.hasOwnProperty(a)){i=this.seen[t];do i++,a=t+"-"+i;while(this.seen.hasOwnProperty(a))}return n||(this.seen[t]=i,this.seen[a]=0),a}slug(t,n={}){const a=this.serialize(t);return this.getNextSafeSlug(a,n.dryrun)}}class Ie{constructor(t){this.options=t||qe,this.options.renderer=this.options.renderer||new tn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xa,this.slugger=new Ma}static parse(t,n){return new Ie(n).parse(t)}static parseInline(t,n){return new Ie(n).parseInline(t)}parse(t,n=!0){let a,i,r,s,o,l,d,u,c,m,p,_,S,v,f,y,A,O,I,D="";const w=t.length;for(a=0;a0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=O+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=O+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:O}):v+=O),v+=this.parse(f.tokens,S),c+=this.renderer.listitem(v,A,y);D+=this.renderer.list(c,p,_);continue;case"html":D+=this.renderer.html(m.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(m.tokens));continue;case"text":for(c=m.tokens?this.parseInline(m.tokens):m.text;a+1{a(o.text,o.lang,function(l,d){if(l)return r(l);d!=null&&d!==o.text&&(o.text=d,o.escaped=!0),s--,s===0&&r()})},0))}),void(s===0&&r())}try{const a=Ae.lex(e,t);return t.walkTokens&&Y.walkTokens(a,t.walkTokens),Ie.parse(a,t)}catch(a){if(a.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

    An error occurred:

    "+se(a.message+"",!0)+"
    ";throw a}}Y.options=Y.setOptions=function(e){var t;return me(Y.defaults,e),t=Y.defaults,qe=t,Y},Y.getDefaults=Fi,Y.defaults=qe,Y.use=function(...e){const t=me({},...e),n=Y.defaults.extensions||{renderers:{},childTokens:{}};let a;e.forEach(i=>{if(i.extensions&&(a=!0,i.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if(r.renderer){const s=n.renderers?n.renderers[r.name]:null;n.renderers[r.name]=s?function(...o){let l=r.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderer}if(r.tokenizer){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[r.level]?n[r.level].unshift(r.tokenizer):n[r.level]=[r.tokenizer],r.start&&(r.level==="block"?n.startBlock?n.startBlock.push(r.start):n.startBlock=[r.start]:r.level==="inline"&&(n.startInline?n.startInline.push(r.start):n.startInline=[r.start]))}r.childTokens&&(n.childTokens[r.name]=r.childTokens)})),i.renderer){const r=Y.defaults.renderer||new tn;for(const s in i.renderer){const o=r[s];r[s]=(...l)=>{let d=i.renderer[s].apply(r,l);return d===!1&&(d=o.apply(r,l)),d}}t.renderer=r}if(i.tokenizer){const r=Y.defaults.tokenizer||new en;for(const s in i.tokenizer){const o=r[s];r[s]=(...l)=>{let d=i.tokenizer[s].apply(r,l);return d===!1&&(d=o.apply(r,l)),d}}t.tokenizer=r}if(i.walkTokens){const r=Y.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),r&&r.call(this,s)}}a&&(t.extensions=n),Y.setOptions(t)})},Y.walkTokens=function(e,t){for(const n of e)switch(t.call(Y,n),n.type){case"table":for(const a of n.header)Y.walkTokens(a.tokens,t);for(const a of n.rows)for(const i of a)Y.walkTokens(i.tokens,t);break;case"list":Y.walkTokens(n.items,t);break;default:Y.defaults.extensions&&Y.defaults.extensions.childTokens&&Y.defaults.extensions.childTokens[n.type]?Y.defaults.extensions.childTokens[n.type].forEach(function(a){Y.walkTokens(n[a],t)}):n.tokens&&Y.walkTokens(n.tokens,t)}},Y.parseInline=function(e,t){if(e==null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");wa(t=me({},Y.defaults,t||{}));try{const n=Ae.lexInline(e,t);return t.walkTokens&&Y.walkTokens(n,t.walkTokens),Ie.parseInline(n,t)}catch(n){if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

    An error occurred:

    "+se(n.message+"",!0)+"
    ";throw n}},Y.Parser=Ie,Y.parser=Ie.parse,Y.Renderer=tn,Y.TextRenderer=xa,Y.Lexer=Ae,Y.lexer=Ae.lex,Y.Tokenizer=en,Y.Slugger=Ma,Y.parse=Y;/*! + * The reveal.js markdown plugin. Handles parsing of + * markdown inside of presentations as well as loading + * of external markdown documents. + */const Ut=/\[([\s\d,|-]*)\]/,Zi={"&":"&","<":"<",">":">",'"':""","'":"'"},Ji=()=>{let e;function t(u){var c=(u.querySelector("[data-template]")||u.querySelector("script")||u).textContent,m=(c=c.replace(new RegExp("__SCRIPT_END__","g"),"<\/script>")).match(/^\n?(\s*)/)[1].length,p=c.match(/^\n?(\t*)/)[1].length;return p>0?c=c.replace(new RegExp("\\n?\\t{"+p+"}","g"),` +`):m>1&&(c=c.replace(new RegExp("\\n? {"+m+"}","g"),` +`)),c}function n(u){for(var c=u.attributes,m=[],p=0,_=c.length;p<_;p++){var S=c[p].name,v=c[p].value;/data\-(markdown|separator|vertical|notes)/gi.test(S)||(v?m.push(S+'="'+v+'"'):m.push(S))}return m.join(" ")}function a(u){return(u=u||{}).separator=u.separator||`\r? +---\r? +`,u.notesSeparator=u.notesSeparator||"notes?:",u.attributes=u.attributes||"",u}function i(u,c){c=a(c);var m=u.split(new RegExp(c.notesSeparator,"mgi"));return m.length===2&&(u=m[0]+'"),' + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + diff --git a/m00_intro.md b/m00_intro.md new file mode 100644 index 0000000..dedba89 --- /dev/null +++ b/m00_intro.md @@ -0,0 +1,56 @@ +# 🐍 Python for Java Developers + + + +🧑 Mario Kahlhofer +📧 [mario.kahlhofer@dynatrace.com](mailto:mario.kahlhofer@dynatrace.com) +🌎 [github.com/blu3r4y/python-for-java-developers](https://github.com/blu3r4y/python-for-java-developers) + +![xkcd Comic](images/python-xkcd.png) + +(c) [https://xkcd.com/353](https://xkcd.com/353) + +--- + + + +## Agenda + +- [What is Python?](#-what-is-python) +- [Installation](#-installation) +- [Syntax Primer](#-syntax-primer) +- [Data Types](#-data-types) +- [Collections](#-collections) +- [Input and Output](#-input-and-output) +- [Examples](#-examples) +- [Functions](#-functions) +- [Classes](#-classes) +- [Code Organization](#-code-organization) +- [Libraries](#-libraries) +- [Zen of Python](#-zen-of-python) + +--- + + + +## Literature + +### Books and Resources + +- 📚 Sarda, Deepak. **Python for the Busy Java Developer.** Apress, 2017. + DOI: [10.1007/978-1-4842-3234-7](https://doi.org/10.1007/978-1-4842-3234-7) + _(sadly, uses the deprecated Python 2 syntax)_ +- 🌍 **Real Python Tutorials.** [realpython.com](https://realpython.com/) + +### Official Documentation + +- "How can I achieve X?" ... [docs.python.org/3/faq/programming.html](https://docs.python.org/3/faq/programming.html) +- "Why is Y different in Python?" ... [docs.python.org/3/faq/design.html](https://docs.python.org/3/faq/design.html) +- "What does the standard library offer?" ... [docs.python.org/3/library](https://docs.python.org/3/library) +- "What does term X mean?" ... [docs.python.org/3/glossary.html](https://docs.python.org/3/glossary.html) + +### Cheat Sheets + +- [gto76.github.io/python-cheatsheet](https://gto76.github.io/python-cheatsheet) +- [pythoncheatsheet.org](https://www.pythoncheatsheet.org) +- [pythonsheets.com](https://www.pythonsheets.com/) diff --git a/m01_what_is_python.md b/m01_what_is_python.md new file mode 100644 index 0000000..d3d3210 --- /dev/null +++ b/m01_what_is_python.md @@ -0,0 +1,35 @@ + + +# 🐍 What is Python? + + + +![Python Logo](images/python-logo.png) + +Python is a **mature, general-purpose, object-oriented, dynamically-typed** programming language. + +- released in 1991, four years before Java +- dominant in machine learning, statistics, and data analytics +- popular alternative to MATLAB or Octave +- gaining in popularity year after year + +![Python Popularity](images/python-popularity.png) + +--- + +## Comparison to Java + +### Similarities + +- general-purpose, both having a large standard library +- object-oriented +- garbage-collected + +### Differences + +- **dynamically-typed**, and not strongly-typed + _("type checks will only happen at runtime")_ +- **interpreted with [CPython](https://github.com/python/cpython)**, and not just-in-time compiled with a JVM + _("more flexibility, but slower execution times")_ +- **interactive mode** provided out of the box + _("i will show you that soon")_ diff --git a/m02_installation.md b/m02_installation.md new file mode 100644 index 0000000..e7e6e1d --- /dev/null +++ b/m02_installation.md @@ -0,0 +1,70 @@ + + +# 🐍 Installation + + + +Go to [python.org](https://www.python.org/) and install the 64-bit version of Python 3.8 or newer. + +🚫 **Do NOT use Python 2.7 or older anymore!** + +### Usage + +- `python` can be used from the command line directly +- `pip` is the most popular package manager for Python, pulling packages from [pypi.org](http://pypi.org/) + +The most popular IDEs are [IntelliJ PyCharm](https://www.jetbrains.com/pycharm/) or [Visual Studio Code](https://code.visualstudio.com/). + +
    + +### What is Anaconda? + +If you intend to use lots of scientific packages, you can install [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) as an alternative. +`numpy` / `scipy` / `sympy` / `tensorflow` / ... usually work out of the box with Anaconda, especially on Windows. + +- `conda` is the package manager used by Anaconda, pulling packages from [anaconda.org](https://anaconda.org/anaconda/repo) + +
    + +--- + +## Jupyter Notebooks + +Notebooks let you mix code and documentation, usually for prototyping or documentation purposes. + +
    + +### Installation + +**Jupyter Notebooks** are the "classic" notebooks and **Jupyter Labs** is the new IDE-like successor of them. + +```sh +pip install jupyter jupyterlab + +# or, if that doesn't work +python -m pip install jupyter jupyterlab +``` + +
    +
    + +### Usage + +You may want to open `*.ipynb` notebook files directly within [VS Code](https://code.visualstudio.com/docs/datascience/jupyter-notebooks) or [PyCharm](https://www.jetbrains.com/help/pycharm/jupyter-notebook-support.html). +Alternatively, you can start a stand-alone instance in the browser from the command line. + +```sh +python -m juypter notebook [--notebook-dir ] +python -m jupyter lab [--notebook-dir ] +``` + +
    +
    + +### Try it now + +📜 `./python/m02_jupyter_introduction.ipynb` + + + +
    diff --git a/m03_syntax_primer.md b/m03_syntax_primer.md new file mode 100644 index 0000000..5fde7ea --- /dev/null +++ b/m03_syntax_primer.md @@ -0,0 +1,55 @@ + + +# 🐍 Syntax Primer + + + +
    + +```java +// ./java/M03_MaximumValue.java#L5-L15 + +List numbers = Arrays.asList(1, -10, 0, -5, -1000, 100, 7); + +int maximum = numbers.get(0); + +for (int number : numbers) { + if (number > maximum) { + maximum = number; + } +} + +System.out.println("The maximum value is " + maximum); +``` + +```py +# ./python/m03_maximum_value.py + +numbers = [1, -10, 0, -5, -1000, 100, 7] + +maximum = numbers[0] + +for number in numbers: + if number > maximum: + maximum = number + +print("The maximum value is", maximum) + +``` + +
    + +
    + +### What do we notice here? + +- There are no semicolons `;` +- There are no types +- There are no braces `{ }` but blocks that are started by a colon `:` +- There are no parentheses `( )` around the expressions +- A list - one of many [**built-in types**](https://docs.python.org/3/library/stdtypes.html) in Python - is initialized with square brackets `[ ]` + ... actually, there are no arrays in Python +- The `for` and `if` syntax is slightly different +- Comments are written with the hashtag symbol `#` + +
    diff --git a/m04_data_types.md b/m04_data_types.md new file mode 100644 index 0000000..d7a7f48 --- /dev/null +++ b/m04_data_types.md @@ -0,0 +1,256 @@ + + +# 🐍 Data Types + + + +We will only look into a few non-container data types of Python, which Java would call [**primitive types**](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html). \* +Find all "built-in types" at [docs.python.org/3/library/stdtypes.html](https://docs.python.org/3/library/stdtypes.html) + +- Numeric Types +- Text Types +- Boolean Types + +💡 **In Python, you do not specify types explicitly!** +Although, you can have [**type hints**](https://docs.python.org/3/library/typing.html). + +\* You can think of a variable in Python as a "tag" or "name" that is attached to some object, and NOT as the "container" that holds some value. All types in Python are essentially objects, even the numeric, text, and boolean ones. However, don't wrap your head around this too much - as you will see, things turn out to behave quite similar to Java. + +
    + +### Python is dynamically-typed + +Unlike Java, you can re-assign values of different types to the same variable as you wish. \*\* + +```py +x = 1416787301 +x = "is" +x = True +``` + +\*\* Speaking in the notion of "tags" and "names", this means that you can freely re-assign the "tag" or "name" to point to a different location. + +
    + +--- + +## Numeric Types 1/4 + +There are only exist the three numeric types `float` / `int` / `complex` in Python. + +- `float` types in Python ➡ are equal to `double` types in Java \* +- There are NO `short` / `int` / `long` / "`float`" / `double` types in Python + +```py +my_int = 5 +my_float = 3.141 +my_complex = 1 + 2j + +# there are also some useful ways to write numbers +speed_of_light = 299_792_458 +us_national_debt = 28.9e+12 +ascii_symbol = 0x3f +input_bitmask = 0b1011_1001 +``` + +\* "Floating point numbers are usually implemented using `double` in C; information about the precision and internal representation of floating point numbers for the machine on which your program is running is available in `sys.float_info`" - see [docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex) + +--- + +## Numeric Types 2/4: Arbitrary Precision Integers + +Integers in Python allow computations beyond usual integer limits without loss of precision. + +```py +# ./python/m04_arbitrary_precision_integers.py + +lightyear_to_meter = 9_460_730_472_580_800 +min_milky_way_diameter = 170_000 * lightyear_to_meter + +min_milky_way_diameter_plus_one = min_milky_way_diameter + 1 + +print("Woooooow, the milky way is at least", min_milky_way_diameter, "meters in diameter!") +print("Adding one meter on that, we are at", min_milky_way_diameter_plus_one, "meters.") + +# > Woooooow, the milky way is at least 1608324180338736000000 meters in diameter! +# > Adding one meter on that, we are at 1608324180338736000001 meters. + +``` + +--- + +## Numeric Types 3/4: Mathematical Expressions + +Find them all at [docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex) + +```py [|6-8|10-12|14-17|19-20|] +# ./python/m04_mathematical_expressions.py + +x = 10.5 +y = -3 + +print("x + y =", x + y) # addition +print("x - y =", x - y) # subtraction +print("x * y =", x * y) # multiplication + +print("x / y =", x / y) # normal division +print("x // y =", x // y) # integer division +print("x % y =", x % y) # modulo + +print("abs(y) =", abs(y)) +print("int(x) =", int(x)) # convert to integer +print("float(y) =", float(y)) # convert to float +print("complex(x, y) =", complex(x, y)) # convert to complex + +print("pow(x, 3) =", pow(x, 3)) # exponentiation +print("x ** 3 =", x ** 3) # exponentiation (alternative syntax) + +``` + +--- + +## Numeric Types 4/4: Mathematical Functions + +Find them all at [docs.python.org/3/library/math.html](https://docs.python.org/3/library/math.html) + +```py +# ./python/m04_mathematical_functions.py + +# we use function from this built-in package +import math + +print("sqrt(16) =", math.sqrt(16)) +print("5! =", math.factorial(5)) +print("log(e) =", math.log(math.e)) +print("sin(pi / 2) =", math.sin(math.pi / 2)) + +``` + +--- + +## Text Types + +Strings in Python are [**immutable**](https://docs.python.org/3/glossary.html#term-immutable)\* - just like in Java. +When you modify strings, new memory is allocated. + +```py +first_string = "Hello World" +second_string = 'Hello Python' + +multi_line_strings = """This can even +hold line breaks +now""" +``` + +\* Immutable, i.e., unchangeable, objects can not be modified after their creation. + +
    + +### String Conversion + +Many types in Python can be converted to a string with `str()` - similar to `.toString()` in Java. +As seen in the example, if you concatenate a string with a non-string, you even have to. \*\* + +
    + +```java +// ./java/M04_StringConversion.java#L3-L4 + +int num = 42; +System.out.println("The number is " + num); +``` + +```py +# ./python/m04_string_conversion.py + +num = 42 +print("The number is " + str(num)) + +# alternative, which ONLY works for print() +print("The number is", num) + +# print("The number is " + num) +# 💥 TypeError: can only concatenate str (not "int") to str + +``` + +
    + +
    + +--- + +### String Concatenation + +Use `str.join()` in Python to concatenate a large number of strings. \* + +
    + +```java +// ./java/M04_StringConcatenation.java#L3-L8 + +String a = "How"; +String b = "to"; +String c = "concatenate"; +String d = "strings"; + +String result = String.join(" ", a, b, c, d); +``` + +```py +# ./python/m04_string_concatenation.py#L1-L7 + +a = "How" +b = "to" +c = "concatenate" +d = "strings" + +# we learn more about lists in the next modules ... +result = " ".join([a, b, c, d]) +``` + +
    + +\* The equivalent of a [`StringBuilder`](https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html) in Java would be [`io.StringIO`](https://docs.python.org/3.9/library/io.html#io.StringIO) in Python. + +--- + +## Boolean Types + +```py +# ./python/m04_boolean_expressions.py + +x = True +y = False + +print("x or y =", x or y) # logical or +print("x and y =", x and y) # logical and +print("not x =", not x) # logical not + +``` + +
    + +### Bitwise Expressions + +You can also perform binary computations with bitwise operators. +Find them all at [docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types](https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types) + +```py +# ./python/m04_bitwise_expressions.py + +port = 0b1011_1011 +bitmask = 0b0010_0000 + +is_bit_set = port & (bitmask >> 1) + +# we learn more about formatting in the next module ... +print("dec:", is_bit_set) +print(f"bin: {is_bit_set:08b}") + +# > dec: 16 +# > bin: 00010000 + +``` + +
    diff --git a/m05_collections.md b/m05_collections.md new file mode 100644 index 0000000..c39ec5d --- /dev/null +++ b/m05_collections.md @@ -0,0 +1,242 @@ + + +# 🐍 Collections + + + +We will only look into a few collection types of Python. +Find them all at [docs.python.org/3/library/stdtypes.html](https://docs.python.org/3/library/stdtypes.html) + +- **Lists and arrays** in Java ➡ are just `list` in Python (but, there is also `tuple`) +- **Maps** in Java ➡ are `dict` in Python +- **Sets** in Java ➡ are also `set` in Python + +--- + +## Lists 1/2 + +Lists hold multiple elements in a specific order. +Unlike arrays, they can change in size at any time. + +```py [|3-5|8-9|11|13-14|16-17|] +# ./python/m05_list_operations.py#L1-L15 + +numbers = [1, 2, 3, 4, 5] +names = ["Janine", "Ali", "Alice"] +mixed = [1, 2, "Max", 3.141] + + +names[0] # get element by index +names[0] = "Peter" # set element at index + +names[-1] # use negative indexes to count from the end + +names.append(-5) # add element to the end of the list +names.insert(1, "Bob") # add element at specific index + +names.remove(-5) # remove the first occurrence from the list +del names[0] # remove by index +``` + +
    + +### What do we notice here? + +- Collections in Python are allowed to contain mixed types of data + +
    + +--- + +## Lists 2/2: More list operations + +Learn about all list operations at [docs.python.org/3/tutorial/datastructures.html#more-on-lists](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists). + +```py [|3-4|6-7|9-10|] +# ./python/m05_list_operations.py#L18-L26 + +"Alice" in names # check for existence +"Mario" not in names # ... and non-existence + +numbers.count(1) # the number of times this item is in the list +len(numbers) # total number of elements in the list + +# merge two lists into one +merged = [1, 2, 3] + [4, 5, 6] + +``` + +--- + +## Tuples 1/2 + +Tuples hold two or more objects together in an efficient manner. They have NO direct equivalent in Java. +Use them to group together small number of elements, e.g., when returning multiple values from a method. + +```py +pair = ("Jonas", 12) # create a tuple +pair[0] # get element by index, similar to lists +``` + +
    + +💡 **Tuples are always [immutable](https://docs.python.org/3/glossary.html#term-immutable)!** + +You can NOT modify, append, or delete anything from them after you created one. + +```py +# pair[1] = 13 +# 💥 TypeError: 'tuple' object does not support item assignment + +# pair.append(123) +# 💥 AttributeError: 'tuple' object has no attribute 'append' +``` + +However, you can convert tuples to lists. + +```py +numbers = (10, 11, 12) +list(numbers) + +# and back again ... +letters = ["A", "B", "C"] +tuple(letters) +``` + +
    + +--- + +## Tuples 2/2: Collection Destructuring + +**Destructuring** helps you to quickly retrieve elements from list-like types in Python. + +```py [|3-6|9-14|17-22|] +# ./python/m05_destructuring.py + +x, y = 1, 2 +print(x, y) + +# > 1 2 + + +numbers = [1, 2, 3] +x, y, z = numbers + +print(x, y, z) + +# > 1 2 3 + + +pair = ("Jonas", 12) +name, age = pair + +print(name, age) + +# > Jonas 12 + +``` + +
    + +### What do we notice here? + +- Actually, whenever you use a comma `,` in such contexts, a `tuple` is used implicitly. + +
    + +--- + +## Dictionaries + +Dictionaries map keys to values. + +```py [|3-10|13-15|17-19|21-22|] +# ./python/m05_dict_operations.py + +grades = { + "math": 2, + "programming": 1, + "literature": 3 +} + +# alternative syntax +grades = dict(math=2, programming=1, literature=3) + + +grades["math"] # get elements by key +grades["math"] = 5 # set elements by key +grades["electronics"] = 4 # add a new element + +# remove an element (will raise an error if the key does not exist) +if "math" in grades: + del grades["math"] + +grades.keys() # get all the keys as a list +grades.values() # get all the values as a list + +``` + +--- + +## Sets 1/2 + +Sets hold multiple elements, without duplicates, but also without order. + +```py [|3|5-6|8|10-12|] +# ./python/m05_set_operations.py#L1-L10 + +numbers = {1, 1, 2, 3, 5} # notice how the '1' is only appended once after all + +numbers.add(7) # add new elements +numbers.add(1) # add elements that already exist (no effect) + +1 in numbers # check for existence (much faster than with lists) + +# remove elements (will raise an error if the element does not exist) +if 2 in numbers: + numbers.remove(2) +``` + +
    + +💡 **You can NOT retrieve elements by index from a set!** + +```py +# numbers[0] +# 💥 TypeError: 'set' object is not subscriptable +``` + +You must iterate over them or convert the set to a list with `list(elements)` + +```py +# ./python/m05_set_operations.py#L12-L14 + +# iterate over set elements +for val in numbers: + print(val) +``` + +
    + +--- + +## Sets 2/2: Set Arithmetic + +Sets are handy when you want to apply operations from set theory. + +```py +# ./python/m05_set_arithmetic.py + +a = {1, 2, 3, 4, 5} +b = {4, 5, 6, 7, 8} + +print("a | b =", a | b) # union +print("a & b =", a & b) # intersection +print("a - b =", a - b) # difference + +# > a | b = {1, 2, 3, 4, 5, 6, 7, 8} +# > a & b = {4, 5} +# > a - b = {1, 2, 3} + +``` diff --git a/m06_input_and_output.md b/m06_input_and_output.md new file mode 100644 index 0000000..1c1a938 --- /dev/null +++ b/m06_input_and_output.md @@ -0,0 +1,131 @@ + + +# 🐍 Input and Output + + + +## Input + +You can read input from the command line with `input()` + +```py +# ./python/m06_input.py#L1-L2 + +name = input("Please enter your name: ") +print("Your name is", name) +``` + +
    + +💡 **Don't forget data type conversions!** + +```py +# ./python/m06_input.py#L4-L11 + +# this function will always give you a string +number = input("Please enter a number: ") + +as_int = int(number) +as_float = float(number) + +print(as_int, as_float) + +``` + +
    + +--- + +## Output 1/2 + +You output something to the command line with `print()` + +```py +# ./python/m06_output.py#L1-L14 + +pi = 3.141 + +print(pi) +print() +print("The value of pi is", pi) + +# > 3.141 +# > +# > The value of pi is 3.141 + +print("I hate: ", end="") +print("line breaks") + +# > I hate: line breaks +``` + +Among many alternatives, [**format strings**](https://docs.python.org/3/library/string.html#string-formatting) are the recommended way to format output. + +```py +# ./python/m06_output.py#L17-L19 + +print(f"The value of pi is {pi} and the value of tau is {2 * pi}") + +# > The value of pi is 3.141 and the value of tau is 6.282 +``` + +--- + +## Output 2/2: Number Formatting + +Look them up when you need it at [gto76.github.io/python-cheatsheet/#format](https://gto76.github.io/python-cheatsheet/#format) + +```py +# ./python/m06_number_formatting.py + +pi = 3.14159265359 +print(pi) + +# > 3.14159265359 + +print(f"{pi:.0f}") # no decimal places +print(f"{pi:.2f}") # two decimal places +print(f"{pi:.3e}") # scientific notation + +# > 3 +# > 3.14 +# > 3.142e+00 + +ratio = 0.25 +print(f"{ratio:.1%}") # percentage + +# > 25.0% + +``` + +--- + +## Reading and Writing Files + +Among many, here is one way to read and write a file in Python. +Learn more at [docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files). + +```py [|5-7|9-11|] +# ./python/m06_file_io.py#L3-L11 + +filename = "m06_file_io.txt" + +with open(filename, "w+") as f: + f.write("Hello\n") + f.write("File!\n") + +with open(filename, "r") as f: + for line in f.read().splitlines(): + print(line) +``` + +
    + +### What do we notice here? + +- The default file mode is `r` for reading - use `w` for writing, `w+` for reading and writing \* +- The default encoding is `ascii`, use the `encoding="utf-8"` [**keyword argument**](https://docs.python.org/3/glossary.html#term-argument) otherwise + +\* Read about possible modes at [gto76.github.io/python-cheatsheet/#open](https://gto76.github.io/python-cheatsheet/#open). + +
    diff --git a/m07_examples.md b/m07_examples.md new file mode 100644 index 0000000..1431d0a --- /dev/null +++ b/m07_examples.md @@ -0,0 +1,423 @@ + + +# 🐍 Examples + + + +## Basic Control Flow + +
    + +```java +// ./java/M07_BasicControlFlow.java#L3-L17 + +int x = 0; + +switch (x) { + case 0: + System.out.println("The value is 0"); + break; + case 1: + System.out.println("The value is 1"); + break; + case 2: + System.out.println("The value is 2"); + break; + default: + System.out.println("The value is something else"); +} +``` + +```py +# ./python/m07_basic_control_flow.py + +x = 0 + +if x == 0: + print("The value is 0") +elif x == 1: + print("The value is 1") +elif x == 2: + print("The value is 2") +else: + print("The value is something else") + +``` + +
    + +
    + +### What do we notice here? + +- Python has no `switch` expression, you have to make a cascade of `if` / `elif` / `else` statements \* + +\* Actually, if you are using **Python 3.10** or newer, there are the new `match` and `case` statements now. + +
    + +--- + +## Sum of all Digits + +
    + +```java +// ./java/M07_SumOfAllDigits.java#L6-L18 + +Scanner scanner = new Scanner(System.in); +System.out.print("Enter a number: "); +int n = scanner.nextInt(); +scanner.close(); + +int digitSum = 0; + +while (n > 0) { + digitSum += n % 10; + n = n / 10; +} + +System.out.println("The digit sum is " + digitSum); +``` + +```py +# ./python/m07_sum_of_all_digits.py + +n = int(input('Enter a number: ')) + +digit_sum = 0 + +while n > 0: + digit_sum += n % 10 + n = n // 10 + +print("The digit sum is ", digit_sum) + +``` + +
    + +
    + +### What do we notice here? + +- Reading from user input is done with `input()` and can also output a prompt +- The `while` loop also exists in Python +- We use an explicit integer division `//` in Python, but use a normal division `/` in Java + +```py +# unlike Java, a division will alwasy give you a float data type +assert 5 / 2 == 2.5 + +# unless you want an explicit integer division +assert 5 // 2 == 2 +``` + +\* `assert` will raise an `AssertionError` if the condition is `False` - use it to check assumptions in your code. + +
    + +--- + +## Iterating over Elements 1/2: By Value + +
    + +```java +// ./java/M07_IteratingElementsByValue.java#L3-L7 + +String[] names = {"Lisa", "John", "Susan", "Alex"}; + +for (String name : names) { + System.out.println(name); +} +``` + +```py +# ./python/m07_iterating_elements_by_value.py + +names = ["Lisa", "John", "Susan", "Alex"] + +for name in names: + print(name) + +``` + +
    + +
    + +### What do we notice here? + +- Iteration over a list of elements is quite similar in Java and python + +
    + +--- + +## Iterating over Elements 2/2: By Index + +
    + +```java +// ./java/M07_IteratingElementsByIndex.java#L3-L7 + +int[] numbers = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + +for (int i = 5; i < 8; i++) { + System.out.println(numbers[i]); +} +``` + +```py +# ./python/m07_iterating_elements_by_index.py + +numbers = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + +for i in range(5, 8): + print(numbers[i]) + +``` + +
    + +
    + +### What do we notice here? + +- Python only supports the `x in y` syntax with a `for` loop +- To replicate the behavior you might know, you have to use `range(start, stop)`, + which will give you numbers from `start` to `stop - 1` + +
    +
    + +💡 **Actually, `range()` will give you an [iterator](https://docs.python.org/3/glossary.html#term-iterator)!** + +If you really want the numbers in a list, you have to convert the result. + +```py +# iterators only allow getting the next element with next() +range(5, 8) + +# lists allow arbitrary access by index +list(range(5, 8)) +``` + +
    + +--- + +## 🐍 Advanced Operations on Sequences + + + +## Sequence Slicing 1/2 + +Examples like the one before are usually solved by slicing list-like collections. +This is also very useful for mathematical applications, e.g. when working with a lot of arrays and matrices. + +```py +# ./python/m07_sequence_slicing.py#L1-L5 + +numbers = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + +numbers[5:8] # give me a new COPY of the list, starting at index 5, and ending at index 7 + +# > [15, 16, 17] +``` + +
    + +The following variants are supported: + +- `a[start:stop:step]` +- `a[start:stop]` +- `a[start:]` +- `a[:stop]` +- `a[:]` + +**The `stop` index is always exclusive**, i.e. the element at index `stop` is not part of the resulting slice. + +
    + +--- + +## Sequence Slicing 2/2: Examples + + + +```py +numbers = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] +``` + +```py [|3-4|6-7|9-10|] +# ./python/m07_sequence_slicing.py#L7-L14 + +numbers[1:] # all except the 1st item > [11, 12, 13, 14, 15, 16, 17, 18, 19, 20] +numbers[:3] # the first three items > [10, 11, 12] + +numbers[:-1] # all except the last item > [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] +numbers[-2:] # the last two items > [19, 20] + +numbers[::2] # every 2nd item > [10, 12, 14, 16, 18, 20] +numbers[1::2] # every 2nd, but start at 2 > [11, 13, 15, 17, 19] +``` + +
    + +This also works with strings because they are just a list of characters. + +```py +# ./python/m07_sequence_slicing.py#L17-L20 + +name = "Hello World" +name[1:-1] + +# > 'ello Worl' +``` + +
    + +--- + +## Sequence Reversing + +- Use `reversed(a)` to iterate over the sequence in reverse order +- Use `a.reverse()` on the object to reverse the items in-place +- Slice out a reversed copy of the elements with `a[::-1]` + +```py [|5-6|8-9|11-12|] +# ./python/m07_sequence_reversing.py + +numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +# iterator that iterates the list in reverse order +reversed(numbers) + +# reverse the list in-place +numbers.reverse() + +# slice a reversed copy of the elements +numbers[::-1] + +``` + +--- + +## Sequence Sorting + +- Use `sorted(a)` to get a sorted list of the elements +- Use `a.sort()` to sort the sequence in-place +- Use the `reverse=True` [**keyword argument**](https://docs.python.org/3/glossary.html#term-argument) to reverse the sorting order + +```py [|5-7|9-11|] +# ./python/m07_sequence_sorting.py + +numbers = [1, -10, 20, 11, 19, 0, -5, -1000, 100, 7] + +# get a sorted list of the elements +sorted(numbers) +sorted(numbers, reverse=True) + +# sort the list in-place +numbers.sort() +numbers.sort(reverse=True) + +``` + +--- + +## Enumerating over Elements + +
    + +```java +// ./java/M07_EnumeratingOverElements.java#L3-L9 + +String[] names = {"Lisa", "John", "Susan", "Alex"}; + +int i = 0; +while (i < names.length) { + System.out.println(i + " " + names[i]); + i++; +} +``` + +```py +# ./python/m07_enumerating_over_elements.py + +names = ["Lisa", "John", "Susan", "Alex"] + +for i, name in enumerate(names): + print(i, name) + +``` + +
    + +
    + +### What do we notice here? + +- Our loop iterates over two values now - `enumerate()` creates tuples for us here + +
    + +--- + +## Price Tax Computation + +
    + +```java +// ./java/M07_PriceTax.java#L5-L16 + +List prices = Arrays.asList(12.3, 5.2, 8.7, 1.2, 8.0); +List gross = new ArrayList(); + +for (double price : prices) { + if (price > 8) { + gross.add(price * 1.2); + } +} + +for (double price : gross) { + System.out.println(price); +} +``` + +```py +# ./python/m07_price_tax.py#L1-L8 + +prices = [12.3, 5.2, 8.7, 1.2, 8.0] +gross = [] + +for price in prices: + if price > 8: + gross.append(price * 1.2) + +print(gross) + +``` + +
    + +
    + +### 💡 List Comprehension + +List comprehensions map each value in a list to a new value and thus create a new list. \* + +`[x for x in sequence]` + +```py +# ./python/m07_price_tax.py#L11-L12 + +prices = [12.3, 5.2, 8.7, 1.2, 8.0] +gross = [price * 1.2 for price in prices if price > 8] +``` + +\* Python offers a lot of features for functional programming, like [`map`](https://docs.python.org/3/library/functions.html#map) / [`filter`](https://docs.python.org/3/library/functions.html#filter) / [`reduce`](https://docs.python.org/3/library/functools.html#functools.reduce) / [`zip`](https://docs.python.org/3/library/functions.html#zip) / [`all`](https://docs.python.org/3/library/functions.html#all) / [`any`](https://docs.python.org/3/library/functions.html#any) / ... + +
    diff --git a/m08_functions.md b/m08_functions.md new file mode 100644 index 0000000..8543a46 --- /dev/null +++ b/m08_functions.md @@ -0,0 +1,202 @@ + + +# 🐍 Functions + + + +
    + +```java +// ./java/M08_RectangleFunctions.java#L2-L16 + +static double area(double a, double b) { + return a * b; +} + +static boolean isSquare(double a, double b) { + return a == b; +} + +public static void main(String[] args) { + System.out.println("area(1, 5) = " + area(1, 5)); + System.out.println("area(1.5, 2.3) = " + area(1.5, 2.3)); + + System.out.println("isSquare(1, 5) = " + isSquare(1, 5)); + System.out.println("isSquare(5, 5) = " + isSquare(5, 5)); +} +``` + +```py +# ./python/m08_rectangle_functions.py#L1-L13 + +def area(a, b): + return a * b + + +def is_square(a, b): + return a == b + + +print("area(1, 5) =", area(1, 5)) +print("area(1.5, 2.3) =", area(1.5, 2.3)) + +print("is_square(1, 5) =", is_square(1, 5)) +print("is_square(5, 5) =", is_square(5, 5)) +``` + +
    + +
    + +### What do we notice here? + +- Functions are defined with `def` +- Python does not have any access modifiers nor the `static` keyword +- You don't have to specify any types on the function parameters - this is called [**duck-typing**](https://docs.python.org/3/glossary.html#term-duck-typing) + +
    + +--- + +## Pass by "Object Reference" / "Assignment" + +In a nutshell, Python has the same passing behavior as Java - although, Python lacks [**primitive types**](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html). + +
    + +```java [|3-9|12-18|] +// ./java/M08_PassByObjectReference.java#L4-L20 + +static void replace(List numbers) { + numbers = Arrays.asList(42, 43, 44); +} + +static void append(List numbers) { + numbers.add(42); +} + +public static void main(String[] args) { + List oneTwoThree = new LinkedList<>(Arrays.asList(1, 2, 3)); + + replace(oneTwoThree); + System.out.println(Arrays.toString(oneTwoThree.toArray())); + + append(oneTwoThree); + System.out.println(Arrays.toString(oneTwoThree.toArray())); +} +``` + +```py [|3-8|11-17|] +# ./python/m08_pass_by_object_reference.py + +def replace(numbers): + numbers = [42, 43, 44] + + +def append(numbers): + numbers.append(42) + + +one_two_three = [1, 2, 3] + +replace(one_two_three) +print(one_two_three) # > [1, 2, 3] + +append(one_two_three) +print(one_two_three) # > [1, 2, 3, 42] + +``` + +
    + +
    + +**Arguments are ALWAYS passed by-value**, in Java and also in Python. +When your argument is an object, the reference to that object is passed. + +- In Java, when you pass a primitive type like `int`, the value is copied. +- Python has NO primitives. If you pass an `int`, the object reference is passed and NO data is copied. + But, since `int` is [**immutable**](https://docs.python.org/3/reference/datamodel.html), you can't change the value of the original object either. \* + +\* From here on, things get complicated. Learn more about the technical details by [Robert Heaton. 2014. "Is Python pass-by-reference or pass-by-value?"](https://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-dick/)
    and [Sreejith Kesavan. 2012. "Understanding Python Variables and Memory Management"](http://foobarnbaz.com/2012/07/08/understanding-python-variables/). +
    + +
    + +--- + +## What else is different with Python functions? 1/3 + +
    + +You can specify argument names explicitly - and even change their order. + +```py +# ./python/m08_rectangle_functions.py#L17-L18 + +area(a=2, b=5) +area(b=5, a=2) +``` + +
    +
    + +You can specify default values for arguments. + +```py +# ./python/m08_function_differences.py#L1-L12 + +def function_with_default_args(x, y, name="Unknown User", factor=1.2): + result = x * y * factor + print(f"Hello {name}, your result is {result}") + + +function_with_default_args(1, 2) +function_with_default_args(1, 2, name="Mario") +function_with_default_args(1, 2, factor=10) + +# > Hello Unknown User, your result is 2.4 +# > Hello Mario, your result is 2.4 +# > Hello Unknown User, your result is 20 +``` + +
    + +--- + +## What else is different with Python functions? 2/3 + +You can return multiple results with tuples and destructuring. + +```py +# ./python/m08_function_differences.py#L15-L30 + +def function_with_two_return_values(radius): + pi = 3.14159 + + circumference = 2 * pi * radius + area = pi * radius ** 2 + + return circumference, area + + +c, a = function_with_two_return_values(5) + +print("circumference", c) +print("area", a) + +# > circumference 31.4159 +# > area 78.53975 +``` + +--- + +## What else is different with Python functions? 3/3 + +- You can declare functions inside functions +- You can declare anonymous functions, called [**lambda expressions**](https://docs.python.org/3/reference/expressions.html#lambda) +- You can overwrite and change functions on-the-fly, just like variables + _("functions are first-class-citizens in Python")_ +- You can use **[`*args` and `**kwargs`](https://docs.python.org/3/glossary.html#term-parameter)** to work with almost arbitrary input parameters, which you already did use in the `print()` function for example + +Learn more about funtions at [docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions](https://docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions). diff --git a/m09_classes.md b/m09_classes.md new file mode 100644 index 0000000..292b0a8 --- /dev/null +++ b/m09_classes.md @@ -0,0 +1,260 @@ + + +# 🐍 Classes + + + +Python is object-oriented, but follows a more lean approach towards classes. + +
    + +```java +// ./java/M09_PassengersProgram.java#L3-L40 + +class Passenger { + + final String firstName; + final String lastName; + + Passenger(String firstName, String lastName) { + this.firstName = firstName; + this.lastName = lastName; + } + + void display() { + System.out.printf("%s %s %n", firstName, lastName); + } + + static Passenger fromInput() { + Scanner scanner = new Scanner(System.in); + + System.out.print("Enter first name: "); + String firstName = scanner.nextLine(); + System.out.print("Enter last name: "); + String lastName = scanner.nextLine(); + + scanner.close(); + + return new Passenger(firstName, lastName); + } +} + +class PassengersProgram { + + public static void main(String[] args) { + Passenger lisa = new Passenger("Lisa", "Ha"); + Passenger user = Passenger.fromInput(); + + lisa.display(); + user.display(); + } +} +``` + +```py [|3|4-6|8-9|11-16|20-24|19|] +# ./python/m09_passengers_program.py + +class Passenger: + def __init__(self, first_name, last_name): + self.first_name = first_name + self.last_name = last_name + + def display(self): + print(f"Passenger: {self.first_name} {self.last_name}") + + @staticmethod + def from_input(): + first_name = input("Enter first name: ") + last_name = input("Enter last name: ") + + return Passenger(first_name, last_name) + + +if __name__ == "__main__": + lisa = Passenger("Lisa", "Ha") + user = Passenger.from_input() + + lisa.display() + user.display() + +``` + +
    + +--- + +### What do we notice here? + +
    + +#### Constructors + +- There is only one **constructor** that is called `__init__` with a mandatory `self` parameter +- Python does not support constructor overloading or **method overloading** +- We don't explicitly define the **class properties** `first_name` and `last_name`, + but you create them on-the-fly in the constructor or elsewhere + +
    +
    + +#### Functions and methods + +- What makes a function a method is only governed by the explicit `self` parameter +- You must always use `self.` if you want to access class properties +- There are no access modifiers and there is also no `final` in Python + +
    +
    + +#### Static methods + +- A **static method** needs the `@staticmethod` [**decorator**](https://docs.python.org/3/glossary.html#term-decorator) and omits the `self` parameter +- A static method just means that it won't access any class properties + +
    +
    + +#### Instantiation + +- Creating a new object works similar, but you omit the `new` keyword +- The `main` method in Python is actually a condition - we will learn more in the next modules + +
    + +--- + +## Informal Interfaces + +
    + +```java +// ./java/M09_ShapesProgram.java + +interface Shape { + double area(); +} + +class Circle implements Shape { + + final double radius; + + Circle(double radius) { + this.radius = radius; + } + + @Override + public double area() { + return 3.14159 * radius * radius; + } +} + +class Square implements Shape { + + final double length; + + Square(double length) { + this.length = length; + } + + @Override + public double area() { + return length * length; + } +} + +class ShapesProgram { + + public static void main(String[] args) { + Shape[] shapes = { new Circle(5), new Square(10) }; + for (Shape shape : shapes) { + System.out.println(shape.area()); + } + } +} + +``` + +```py [|3-5|8-13|16-21|24-26|] +# ./python/m09_shapes_program.py + +class Shape: + def area(self): + pass + + +class Circle(Shape): + def __init__(self, radius): + self.radius = radius + + def area(self): + return 3.14159 * self.radius * self.radius + + +class Square(Shape): + def __init__(self, length): + self.length = length + + def area(self): + return self.length * self.length + + +shapes = [Circle(5), Square(10)] +for shape in shapes: + print(shape.area()) + +``` + +
    + +
    + +### What do we notice here? + +- There is no `interface` type in Python, instead we use a normal `class` and inhert from it +- Methods are overridden without an explicit annotation - they are always replaced +- No type checks are enforced by Python, try removing `Shape` or renaming the `area()` method ... + +
    + +--- + +## Duck-Typing + +Since there is NO type-checking at compile-time, we may also solely rely on [**duck-typing**](https://docs.python.org/3/glossary.html#term-duck-typing). +An `AttributeError` is thrown at runtime, if the method you are calling wouldn't exist. \* + +```py [|3-16|19-21|21|] +# ./python/m09_shapes_duck_typing.py + +class Circle: + def __init__(self, radius): + self.radius = radius + + def area(self): + return 3.14159 * self.radius * self.radius + + +class Square: + def __init__(self, length): + self.length = length + + def area(self): + return self.length * self.length + + +shapes = [Circle(5), Square(10)] +for shape in shapes: + print(shape.area()) + +``` + +
    + +### But, how can I have a "real" interfaces and inheritance in Python? + +- Use abstract classes via the [**`abc` module**](https://docs.python.org/3/library/abc.html) +- Learn more about formal interfaces at [realpython.com/python-interface](https://realpython.com/python-interface/) + +
    + +\* Look into [**type hints**](https://docs.python.org/3/library/typing.html) to have better type-checking at runtime and even before you run your code. diff --git a/m10_code_organization.md b/m10_code_organization.md new file mode 100644 index 0000000..b4efe0a --- /dev/null +++ b/m10_code_organization.md @@ -0,0 +1,111 @@ + + +# 🐍 Code Organization + + + +Let's take a quick interactive look at how one would create a Python project consisting of multiple files. + +### Running Python Scripts + +📜 `./python/m10_multiple_scripts` + + + +### Packages and Modules + +📜 `./python/m10_demo_project` + + + +Learn about more **best practices** at [docs.python-guide.org/writing/structure](https://docs.python-guide.org/writing/structure/) + +--- + +## Running Python Scripts + +Your code is always executed from top to bottom. + +```sh +python script.py +``` + +
    + +### The Main "Function" + +The `__main__` condition that you write, will only evaluate to `True` when that script is executed directly. + +```py +# ./python/m10_multiple_scripts/main.py#L5-L6 + +if __name__ == "__main__": + print("This will only run if you specifically started the interpretor on this file.") +``` + +With that, you mainly differentiate if a script is run directly, or being imported. +Upon import, the `__main__` condition of the importee will evaluate to `False`. + +```py +# ./python/m10_multiple_scripts/imports.py + +import main + +# you might also want to try out these: +# import script +# from main import test_variable + +if __name__ == "__main__": + print("The value of the test variable is:", main.test_variable) + +``` + +
    + +--- + +## Packages and Modules + +You should structure your code into [**packages**](https://docs.python.org/3/glossary.html#term-package) ("directories") and [**modules**](https://docs.python.org/3/glossary.html#term-module) ("Python files"). + +```text +. +├── README.md <-- brief description +├── requirements.txt <-- list of dependencies (list package names and versions) +├── graphics +│ ├── __init__.py +│ └── parabola.py +└── user <-- a package named 'user' + ├── __init__.py <-- will be executed when you 'import user' + └── app.py <-- a module named 'app' +``` + +
    + +Dependencies are usually listed in a `requirements.txt` file and are installed with `pip`. \* + +```sh +python -m pip install -r requirements.txt +``` + +
    +
    + +### Running Python Modules + +You run modules when your code consists of multiple files. + +```sh +python -m user.app +``` + +When you run a module, your root package is loaded into the [**import path**](https://docs.python.org/3/glossary.html#term-import-path) of the interpreter. +Thus, on each `import` statement you write, packages and modules will be found and imported. + +
    + +
    + +\* Note that `pip` is a package by itself and that we use the module mode to run it. Many modules are also added to your system path upon installation, which allows you to run them directly from the command line, e.g. with `pip` instead of `python -m pip`. + +
    diff --git a/m11_libraries.md b/m11_libraries.md new file mode 100644 index 0000000..e365c2d --- /dev/null +++ b/m11_libraries.md @@ -0,0 +1,67 @@ + + +# 🐍 Libraries + + + +Don't re-invent the wheel for various tasks, have a look at what packages exist already. + +### Recommended Packages + +- `numpy` & `scipy` - high-performance numerical computations, multi-dimensional arrays +- `matplotlib` & `seaborn` & `plotly` & `bokeh` - graphical visualization for mathematicians +- `pandas` - work with tabular data +- `sympy` - symbolic mathematics +- `networkx` - graphs and networks +- `requests` - network requests, download files +- `tkinter` & `pyqt` - graphical user interfaces + +💡 **Install new packages with `pip`** + +```sh +python -m pip install +``` + +--- + +## Library Usage + +
    + +### Compute and show a parabola with `numpy` and `matplotlib` + +```py +# ./python/m11_numpy_demo.py + +import matplotlib.pyplot as plt +import numpy as np + +# get 1000 numbers between -5 and 5 +xs = np.linspace(-5, 5, 1000) + +# apply a function on this numpy array +ys = xs ** 2 - 1 + +# show a figure +plt.plot(xs, ys) +plt.show() + +``` + +
    +
    + +### Read a tabular dataset with `pandas` + +```py +# ./python/m11_pandas_demo.py + +import pandas as pd + +# quickly read a csv file +df = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data") +print(df) + +``` + +
    diff --git a/m12_zen_of_python.md b/m12_zen_of_python.md new file mode 100644 index 0000000..a817f06 --- /dev/null +++ b/m12_zen_of_python.md @@ -0,0 +1,41 @@ + + +# 🐍 Zen of Python + + + +
    + +If you ever need help, type `help` - use the [resources mentioned in the beginning](#-literature) - or, ask Google. + +```py +help(sorted) + +# > Help on built-in function sorted in module builtins: +# > +# > sorted(iterable, /, *, key=None, reverse=False) +# > Return a new list containing all items from the iterable in ascending order. +# > +# > A custom key function can be supplied to customize the sort order, and the +# > reverse flag can be set to request the result in descending order. +``` + +
    +
    + +Never forget the [**Zen of Python**](https://www.python.org/dev/peps/pep-0020/). + +```py +import this +``` + +
    +
    + +And also try out this one. + +```py +import antigravity +``` + +