diff --git a/00-course-info/weekly-outline.xlsx b/00-course-info/weekly-outline.xlsx index 050be66..9d8ea98 100644 Binary files a/00-course-info/weekly-outline.xlsx and b/00-course-info/weekly-outline.xlsx differ diff --git a/2024/01-writing-about-data/011-writing-about-data.html b/2024/01-writing-about-data/011-writing-about-data.html index 61ae664..466a4ee 100644 --- a/2024/01-writing-about-data/011-writing-about-data.html +++ b/2024/01-writing-about-data/011-writing-about-data.html @@ -1,1139 +1,323 @@ - - + + + + + + + + + + Writing about Data + + + + + + + + + + + + - - - + div.callout-tip.callout-style-default .callout-title { + background-color: #ccf1e3 + } - Writing about Data - - - - - - - - - - - - + div.callout-caution { + border-left-color: #fd7e14 !important; + } + + div.callout-caution .callout-icon::before { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAACV0lEQVRYCdVWzWoUQRCuqp2ICBLJXgITZL1EfQDBW/bkzUMUD7klD+ATSHBEfAIfQO+iXsWDxJsHL96EHAwhgzlkg8nBg25XWb0zIb0zs9muYYWkoKeru+vn664fBqElyZNuyh167NXJ8Ut8McjbmEraKHkd7uAnAFku+VWdb3reSmRV8PKSLfZ0Gjn3a6Xlcq9YGb6tADjn+lUfTXtVmaZ1KwBIvFI11rRXlWlatwIAAv2asaa9mlB9wwygiDX26qaw1yYPzFXg2N1GgG0FMF8Oj+VIx7E/03lHx8UhvYyNZLN7BwSPgekXXLribw7w5/c8EF+DBK5idvDVYtEEwMeYefjjLAdEyQ3M9nfOkgnPTEkYU+sxMq0BxNR6jExrAI31H1rzvLEfRIdgcv1XEdj6QTQAS2wtstEALLG1yEZ3QhH6oDX7ExBSFEkFINXH98NTrme5IOaaA7kIfiu2L8A3qhH9zRbukdCqdsA98TdElyeMe5BI8Rs2xHRIsoTSSVFfCFCWGPn9XHb4cdobRIWABNf0add9jakDjQJpJ1bTXOJXnnRXHRf+dNL1ZV1MBRCXhMbaHqGI1JkKIL7+i8uffuP6wVQAzO7+qVEbF6NbS0LJureYcWXUUhH66nLR5rYmva+2tjRFtojkM2aD76HEGAD3tPtKM309FJg5j/K682ywcWJ3PASCcycH/22u+Bh7Aa0ehM2Fu4z0SAE81HF9RkB21c5bEn4Dzw+/qNOyXr3DCTQDMBOdhi4nAgiFDGCinIa2owCEChUwD8qzd03PG+qdW/4fDzjUMcE1ZpIAAAAASUVORK5CYII='); + } + + div.callout-caution.callout-style-default .callout-title { + background-color: #ffe5d0 + } + + + .reveal div.sourceCode { + margin: 0; + overflow: auto; + } + .reveal div.hanging-indent { + margin-left: 1em; + text-indent: -1em; + } + .reveal .slide:not(.center) { + height: 100%; + } + .reveal .slide.scrollable { + overflow-y: auto; + } + .reveal .footnotes { + height: 100%; + overflow-y: auto; + } + .reveal .slide .absolute { + position: absolute; + display: block; + } + .reveal .footnotes ol { + counter-reset: ol; + list-style-type: none; + margin-left: 0; + } + .reveal .footnotes ol li:before { + counter-increment: ol; + content: counter(ol) ". "; + } + .reveal .footnotes ol li > p:first-child { + display: inline-block; + } + .reveal .slide ul, + .reveal .slide ol { + margin-bottom: 0.5em; + } + .reveal .slide ul li, + .reveal .slide ol li { + margin-top: 0.4em; + margin-bottom: 0.2em; + } + .reveal .slide ul[role="tablist"] li { + margin-bottom: 0; + } + .reveal .slide ul li > *:first-child, + .reveal .slide ol li > *:first-child { + margin-block-start: 0; + } + .reveal .slide ul li > *:last-child, + .reveal .slide ol li > *:last-child { + margin-block-end: 0; + } + .reveal .slide .columns:nth-child(3) { + margin-block-start: 0.8em; + } + .reveal blockquote { + box-shadow: none; + } + .reveal .tippy-content>* { + margin-top: 0.2em; + margin-bottom: 0.7em; + } + .reveal .tippy-content>*:last-child { + margin-bottom: 0.2em; + } + .reveal .slide > img.stretch.quarto-figure-center, + .reveal .slide > img.r-stretch.quarto-figure-center { + display: block; + margin-left: auto; + margin-right: auto; + } + .reveal .slide > img.stretch.quarto-figure-left, + .reveal .slide > img.r-stretch.quarto-figure-left { + display: block; + margin-left: 0; + margin-right: auto; + } + .reveal .slide > img.stretch.quarto-figure-right, + .reveal .slide > img.r-stretch.quarto-figure-right { + display: block; + margin-left: auto; + margin-right: 0; + } +
@@ -1147,8 +331,8 @@

Writing about Data

-
-

Monday, April 3rd1

+
+

Wednesday, April 3rd1

Today we will…

-
-

#privlagealert

-
-
-

I am a

-
    -
  • white
  • -
  • straight
  • -
  • cisgender
  • -
  • middle class
  • -
  • highly educated
  • -
  • American
  • -
-

lady

-
-

I’m doing the best I can when I talk about issues of race, class, gender, and other sensitive topics. But you should always feel free to call me out (publicly or privately)

-
-
-

Sometimes data is collected intentionally

-
+

Brainstorm!

-


-

Make a list of all the places you left “data exhaust” today/this week

+
+ +

Main communication types in this class

@@ -1227,7 +394,7 @@

Main communication types in this class

Scientific writing

-

+

Chan, J. K., Trinder, J., Andrewes, H. E., Colrain, I. M., & Nicholas, C. L. (2013). The acute effects of alcohol on sleep architecture in late adolescence. Alcoholism: Clinical and Experimental Research, 37(10), 1720-1728.1

@@ -1237,7 +404,7 @@

Scientific writing

Data journalism

-

+

California Knew the Carr Wildfire Could Happen. It Failed to Prevent it.1

Keith Schneider ProPublica December 18, 2018

@@ -1246,13 +413,13 @@

Data journalism

(and also, data viz!)1

-

+

Goofy stuff

-

+

The Unlikely Odds of Making it Big on TikTok1

Matt Daniels, The Pudding July 2022

@@ -1268,24 +435,26 @@

-

Syllabus

+

Syllabus

-
+

Brainstorm!

-


-

How would you describe your experience with writing?

+
+ +

Tips for success


-

Voice Dream Reader App

+

Voice Dream Reader App


-

Grammarly

+

Grammarly


-

Keep track of important deadlines

+

Keep track of important deadlines


-

Ask when clarification is needed

+

Ask when clarification is needed


Be creative!

@@ -1293,18 +462,19 @@

Tips for success

To do

Grade contract (Canvas Quiz Submission)

    -
  • Due Wednesday, 4/5 at 12pm
  • +
  • Due Thursday, 4/4 at 11:59pm
  • +
+

Form groups (Google form + Submit confirmation screenshot to Canvas)

+
    +
  • Due Friday, 4/5 at 11:59pm
+

Review group report Data Proposal instructions (start brainstorming!)

Read

  • Data is, or Data are?
  • FiveThirtyEight: Data is vs Data are
  • -
  • How to Lie with Statistics ch. 1
    -
  • -
  • CwD ch 1. Reading science articles
  • -
  • CwD ch. 10.3 Editing with others
  • +
  • CwD ch. 2, 3.1 - 3.3
-

Review final technical report project outline & instructions (start brainstorming!)

@@ -1314,831 +484,19 @@

To do

- + - - - - - + + + + + - - - - + + + + ' ); + + var leadingWs = text.match( /^\n?(\s*)/ )[1].length, + leadingTabs = text.match( /^\n?(\t*)/ )[1].length; + + if( leadingTabs > 0 ) { + text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' ); + } + else if( leadingWs > 1 ) { + text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' ); + } + + return text; + + } + + /** + * Given a markdown slide section element, this will + * return all arguments that aren't related to markdown + * parsing. Used to forward any other user-defined arguments + * to the output markdown slide. + */ + function getForwardedAttributes( section ) { + + var attributes = section.attributes; + var result = []; + + for( var i = 0, len = attributes.length; i < len; i++ ) { + var name = attributes[i].name, + value = attributes[i].value; + + // disregard attributes that are used for markdown loading/parsing + if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue; + + if( value ) { + result.push( name + '="' + value + '"' ); + } + else { + result.push( name ); + } + } + + return result.join( ' ' ); + + } + + /** + * Inspects the given options and fills out default + * values for what's not defined. + */ + function getSlidifyOptions( options ) { + + options = options || {}; + options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR; + options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR; + options.attributes = options.attributes || ''; + + return options; + + } + + /** + * Helper function for constructing a markdown slide. + */ + function createMarkdownSlide( content, options ) { + + options = getSlidifyOptions( options ); + + var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) ); + + if( notesMatch.length === 2 ) { + content = notesMatch[0] + ''; + } + + // prevent script end tags in the content from interfering + // with parsing + content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER ); + + return ''; + + } + + /** + * Parses a data string into multiple slides based + * on the passed in separator arguments. + */ + function slidify( markdown, options ) { + + options = getSlidifyOptions( options ); + + var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ), + horizontalSeparatorRegex = new RegExp( options.separator ); + + var matches, + lastIndex = 0, + isHorizontal, + wasHorizontal = true, + content, + sectionStack = []; + + // iterate until all blocks between separators are stacked up + while( matches = separatorRegex.exec( markdown ) ) { + var notes = null; + + // determine direction (horizontal by default) + isHorizontal = horizontalSeparatorRegex.test( matches[0] ); + + if( !isHorizontal && wasHorizontal ) { + // create vertical stack + sectionStack.push( [] ); + } + + // pluck slide content from markdown input + content = markdown.substring( lastIndex, matches.index ); + + if( isHorizontal && wasHorizontal ) { + // add to horizontal stack + sectionStack.push( content ); + } + else { + // add to vertical stack + sectionStack[sectionStack.length-1].push( content ); + } + + lastIndex = separatorRegex.lastIndex; + wasHorizontal = isHorizontal; + } + + // add the remaining slide + ( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) ); + + var markdownSections = ''; + + // flatten the hierarchical stack, and insert
tags + for( var i = 0, len = sectionStack.length; i < len; i++ ) { + // vertical + if( sectionStack[i] instanceof Array ) { + markdownSections += '
'; + + sectionStack[i].forEach( function( child ) { + markdownSections += '
' + createMarkdownSlide( child, options ) + '
'; + } ); + + markdownSections += '
'; + } + else { + markdownSections += '
' + createMarkdownSlide( sectionStack[i], options ) + '
'; + } + } + + return markdownSections; + + } + + /** + * Parses any current data-markdown slides, splits + * multi-slide markdown into separate sections and + * handles loading of external markdown. + */ + function processSlides( scope ) { + + return new Promise( function( resolve ) { + + var externalPromises = []; + + [].slice.call( scope.querySelectorAll( 'section[data-markdown]:not([data-markdown-parsed])') ).forEach( function( section, i ) { + + if( section.getAttribute( 'data-markdown' ).length ) { + + externalPromises.push( loadExternalMarkdown( section ).then( + + // Finished loading external file + function( xhr, url ) { + section.outerHTML = slidify( xhr.responseText, { + separator: section.getAttribute( 'data-separator' ), + verticalSeparator: section.getAttribute( 'data-separator-vertical' ), + notesSeparator: section.getAttribute( 'data-separator-notes' ), + attributes: getForwardedAttributes( section ) + }); + }, + + // Failed to load markdown + function( xhr, url ) { + section.outerHTML = '
' + + 'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' + + 'Check your browser\'s JavaScript console for more details.' + + '

Remember that you need to serve the presentation HTML from a HTTP server.

' + + '
'; + } + + ) ); + + } + else { + + section.outerHTML = slidify( getMarkdownFromSlide( section ), { + separator: section.getAttribute( 'data-separator' ), + verticalSeparator: section.getAttribute( 'data-separator-vertical' ), + notesSeparator: section.getAttribute( 'data-separator-notes' ), + attributes: getForwardedAttributes( section ) + }); + + } + + }); + + Promise.all( externalPromises ).then( resolve ); + + } ); + + } + + function loadExternalMarkdown( section ) { + + return new Promise( function( resolve, reject ) { + + var xhr = new XMLHttpRequest(), + url = section.getAttribute( 'data-markdown' ); + + var datacharset = section.getAttribute( 'data-charset' ); + + // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes + if( datacharset != null && datacharset != '' ) { + xhr.overrideMimeType( 'text/html; charset=' + datacharset ); + } + + xhr.onreadystatechange = function( section, xhr ) { + if( xhr.readyState === 4 ) { + // file protocol yields status code 0 (useful for local debug, mobile applications etc.) + if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) { + + resolve( xhr, url ); + + } + else { + + reject( xhr, url ); + + } + } + }.bind( this, section, xhr ); + + xhr.open( 'GET', url, true ); + + try { + xhr.send(); + } + catch ( e ) { + console.warn( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e ); + resolve( xhr, url ); + } + + } ); + + } + + /** + * Check if a node value has the attributes pattern. + * If yes, extract it and add that value as one or several attributes + * to the target element. + * + * You need Cache Killer on Chrome to see the effect on any FOM transformation + * directly on refresh (F5) + * http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277 + */ + function addAttributeInElement( node, elementTarget, separator ) { + + var mardownClassesInElementsRegex = new RegExp( separator, 'mg' ); + var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' ); + var nodeValue = node.nodeValue; + var matches, + matchesClass; + if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) { + + var classes = matches[1]; + nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex ); + node.nodeValue = nodeValue; + while( matchesClass = mardownClassRegex.exec( classes ) ) { + if( matchesClass[2] ) { + elementTarget.setAttribute( matchesClass[1], matchesClass[2] ); + } else { + elementTarget.setAttribute( matchesClass[3], "" ); + } + } + return true; + } + return false; + } + + /** + * Add attributes to the parent element of a text node, + * or the element of an attribute node. + */ + function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) { + + if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) { + var previousParentElement = element; + for( var i = 0; i < element.childNodes.length; i++ ) { + var childElement = element.childNodes[i]; + if ( i > 0 ) { + var j = i - 1; + while ( j >= 0 ) { + var aPreviousChildElement = element.childNodes[j]; + if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) { + previousParentElement = aPreviousChildElement; + break; + } + j = j - 1; + } + } + var parentSection = section; + if( childElement.nodeName == "section" ) { + parentSection = childElement ; + previousParentElement = childElement ; + } + if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) { + addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes ); + } + } + } + + if ( element.nodeType == Node.COMMENT_NODE ) { + if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) { + addAttributeInElement( element, section, separatorSectionAttributes ); + } + } + } + + /** + * Converts any current data-markdown slides in the + * DOM to HTML. + */ + function convertSlides() { + + var sections = deck.getRevealElement().querySelectorAll( '[data-markdown]:not([data-markdown-parsed])'); + + [].slice.call( sections ).forEach( function( section ) { + + section.setAttribute( 'data-markdown-parsed', true ) + + var notes = section.querySelector( 'aside.notes' ); + var markdown = getMarkdownFromSlide( section ); + + section.innerHTML = marked( markdown ); + addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) || + section.parentNode.getAttribute( 'data-element-attributes' ) || + DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR, + section.getAttribute( 'data-attributes' ) || + section.parentNode.getAttribute( 'data-attributes' ) || + DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR); + + // If there were notes, we need to re-add them after + // having overwritten the section's HTML + if( notes ) { + section.appendChild( notes ); + } + + } ); + + return Promise.resolve(); + + } + + function escapeForHTML( input ) { + + return input.replace( /([&<>'"])/g, char => HTML_ESCAPE_MAP[char] ); + + } + + return { + id: 'markdown', + + /** + * Starts processing and converting Markdown within the + * current reveal.js deck. + */ + init: function( reveal ) { + + deck = reveal; + + let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown || {}; + + if( !renderer ) { + renderer = new marked.Renderer(); + + renderer.code = ( code, language ) => { + + // Off by default + let lineNumbers = ''; + + // Users can opt in to show line numbers and highlight + // specific lines. + // ```javascript [] show line numbers + // ```javascript [1,4-8] highlights lines 1 and 4-8 + if( CODE_LINE_NUMBER_REGEX.test( language ) ) { + lineNumbers = language.match( CODE_LINE_NUMBER_REGEX )[1].trim(); + lineNumbers = `data-line-numbers="${lineNumbers}"`; + language = language.replace( CODE_LINE_NUMBER_REGEX, '' ).trim(); + } + + // Escape before this gets injected into the DOM to + // avoid having the HTML parser alter our code before + // highlight.js is able to read it + code = escapeForHTML( code ); + + return `
${code}
`; + }; + } + + if( animateLists === true ) { + renderer.listitem = text => `
  • ${text}
  • `; + } + + marked.setOptions( { + renderer, + ...markedOptions + } ); + + return processSlides( deck.getRevealElement() ).then( convertSlides ); + + }, + + // TODO: Do these belong in the API? + processSlides: processSlides, + convertSlides: convertSlides, + slidify: slidify, + marked: marked + } + +}; + +export default Plugin; diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/katex.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/katex.js new file mode 100644 index 0000000..a8b47c4 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/katex.js @@ -0,0 +1,96 @@ +/** + * A plugin which enables rendering of math equations inside + * of reveal.js slides. Essentially a thin wrapper for KaTeX. + * + * @author Hakim El Hattab + * @author Gerhard Burger + */ +export const KaTeX = () => { + let deck; + + let defaultOptions = { + version: 'latest', + delimiters: [ + {left: '$$', right: '$$', display: true}, // Note: $$ has to come before $ + {left: '$', right: '$', display: false}, + {left: '\\(', right: '\\)', display: false}, + {left: '\\[', right: '\\]', display: true} + ], + ignoredTags: ['script', 'noscript', 'style', 'textarea', 'pre'] + } + + const loadCss = src => { + let link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = src; + document.head.appendChild(link); + }; + + /** + * Loads a JavaScript file and returns a Promise for when it is loaded + * Credits: https://aaronsmith.online/easily-load-an-external-script-using-javascript/ + */ + const loadScript = src => { + return new Promise((resolve, reject) => { + const script = document.createElement('script') + script.type = 'text/javascript' + script.onload = resolve + script.onerror = reject + script.src = src + document.head.append(script) + }) + }; + + async function loadScripts(urls) { + for(const url of urls) { + await loadScript(url); + } + } + + return { + id: 'katex', + + init: function (reveal) { + + deck = reveal; + + let revealOptions = deck.getConfig().katex || {}; + + let options = {...defaultOptions, ...revealOptions}; + const {local, version, extensions, ...katexOptions} = options; + + let baseUrl = options.local || 'https://cdn.jsdelivr.net/npm/katex'; + let versionString = options.local ? '' : '@' + options.version; + + let cssUrl = baseUrl + versionString + '/dist/katex.min.css'; + let katexUrl = baseUrl + versionString + '/dist/katex.min.js'; + let mhchemUrl = baseUrl + versionString + '/dist/contrib/mhchem.min.js' + let karUrl = baseUrl + versionString + '/dist/contrib/auto-render.min.js'; + + let katexScripts = [katexUrl]; + if(options.extensions && options.extensions.includes("mhchem")) { + katexScripts.push(mhchemUrl); + } + katexScripts.push(karUrl); + + const renderMath = () => { + renderMathInElement(reveal.getSlidesElement(), katexOptions); + deck.layout(); + } + + loadCss(cssUrl); + + // For some reason dynamically loading with defer attribute doesn't result in the expected behavior, the below code does + loadScripts(katexScripts).then(() => { + if( deck.isReady() ) { + renderMath(); + } + else { + deck.on( 'ready', renderMath.bind( this ) ); + } + }); + + } + } + +}; diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/math.esm.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/math.esm.js new file mode 100644 index 0000000..a0d1468 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/math/math.esm.js @@ -0,0 +1 @@ +var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),r={},o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={},c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,f=u&&!c.call({1:2},1);a.f=f?function(t){var e=u(this,t);return!!e&&e.enumerable}:c;var s=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},l={}.toString,p=function(t){return l.call(t).slice(8,-1)},h=p,v="".split,d=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==h(t)?v.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=d,m=y,b=function(t){return g(m(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=w,x=function(t,e){if(!j(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!j(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!j(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!j(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},O=y,E=function(t){return Object(O(t))},S=E,T={}.hasOwnProperty,P=function(t,e){return T.call(S(t),e)},_=w,k=n.document,L=_(k)&&_(k.createElement),M=function(t){return L?k.createElement(t):{}},A=M,I=!i&&!o((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),R=i,C=a,N=s,F=b,J=x,D=P,$=I,G=Object.getOwnPropertyDescriptor;r.f=R?G:function(t,e){if(t=F(t),e=J(e,!0),$)try{return G(t,e)}catch(t){}if(D(t,e))return N(!C.f.call(t,e),t[e])};var H={},z=w,W=function(t){if(!z(t))throw TypeError(String(t)+" is not an object");return t},q=i,U=I,K=W,Q=x,X=Object.defineProperty;H.f=q?X:function(t,e,n){if(K(t),e=Q(e,!0),K(n),U)try{return X(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Y=H,B=s,V=i?function(t,e,n){return Y.f(t,e,B(1,n))}:function(t,e,n){return t[e]=n,t},Z={exports:{}},tt=n,et=V,nt=function(t,e){try{et(tt,t,e)}catch(n){tt[t]=e}return e},rt=nt,ot=n["__core-js_shared__"]||rt("__core-js_shared__",{}),it=ot,at=Function.toString;"function"!=typeof it.inspectSource&&(it.inspectSource=function(t){return at.call(t)});var ct=it.inspectSource,ut=ct,ft=n.WeakMap,st="function"==typeof ft&&/native code/.test(ut(ft)),lt={exports:{}},pt=ot;(lt.exports=function(t,e){return pt[t]||(pt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var ht,vt,dt,yt=0,gt=Math.random(),mt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++yt+gt).toString(36)},bt=lt.exports,wt=mt,jt=bt("keys"),xt=function(t){return jt[t]||(jt[t]=wt(t))},Ot={},Et=st,St=w,Tt=V,Pt=P,_t=ot,kt=xt,Lt=Ot,Mt=n.WeakMap;if(Et||_t.state){var At=_t.state||(_t.state=new Mt),It=At.get,Rt=At.has,Ct=At.set;ht=function(t,e){if(Rt.call(At,t))throw new TypeError("Object already initialized");return e.facade=t,Ct.call(At,t,e),e},vt=function(t){return It.call(At,t)||{}},dt=function(t){return Rt.call(At,t)}}else{var Nt=kt("state");Lt[Nt]=!0,ht=function(t,e){if(Pt(t,Nt))throw new TypeError("Object already initialized");return e.facade=t,Tt(t,Nt,e),e},vt=function(t){return Pt(t,Nt)?t[Nt]:{}},dt=function(t){return Pt(t,Nt)}}var Ft={set:ht,get:vt,has:dt,enforce:function(t){return dt(t)?vt(t):ht(t,{})},getterFor:function(t){return function(e){var n;if(!St(e)||(n=vt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Jt=n,Dt=V,$t=P,Gt=nt,Ht=ct,zt=Ft.get,Wt=Ft.enforce,qt=String(String).split("String");(Z.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||$t(n,"name")||Dt(n,"name",e),(o=Wt(n)).source||(o.source=qt.join("string"==typeof e?e:""))),t!==Jt?(i?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=n:Dt(t,e,n)):a?t[e]=n:Gt(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&zt(this).source||Ht(this)}));var Ut=n,Kt=n,Qt=function(t){return"function"==typeof t?t:void 0},Xt=function(t,e){return arguments.length<2?Qt(Ut[t])||Qt(Kt[t]):Ut[t]&&Ut[t][e]||Kt[t]&&Kt[t][e]},Yt={},Bt=Math.ceil,Vt=Math.floor,Zt=function(t){return isNaN(t=+t)?0:(t>0?Vt:Bt)(t)},te=Zt,ee=Math.min,ne=function(t){return t>0?ee(te(t),9007199254740991):0},re=Zt,oe=Math.max,ie=Math.min,ae=b,ce=ne,ue=function(t,e){var n=re(t);return n<0?oe(n+e,0):ie(n,e)},fe=function(t){return function(e,n,r){var o,i=ae(e),a=ce(i.length),c=ue(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},se={includes:fe(!0),indexOf:fe(!1)},le=P,pe=b,he=se.indexOf,ve=Ot,de=function(t,e){var n,r=pe(t),o=0,i=[];for(n in r)!le(ve,n)&&le(r,n)&&i.push(n);for(;e.length>o;)le(r,n=e[o++])&&(~he(i,n)||i.push(n));return i},ye=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ge=de,me=ye.concat("length","prototype");Yt.f=Object.getOwnPropertyNames||function(t){return ge(t,me)};var be={};be.f=Object.getOwnPropertySymbols;var we=Yt,je=be,xe=W,Oe=Xt("Reflect","ownKeys")||function(t){var e=we.f(xe(t)),n=je.f;return n?e.concat(n(t)):e},Ee=P,Se=Oe,Te=r,Pe=H,_e=o,ke=/#|\.prototype\./,Le=function(t,e){var n=Ae[Me(t)];return n==Re||n!=Ie&&("function"==typeof e?_e(e):!!e)},Me=Le.normalize=function(t){return String(t).replace(ke,".").toLowerCase()},Ae=Le.data={},Ie=Le.NATIVE="N",Re=Le.POLYFILL="P",Ce=Le,Ne=n,Fe=r.f,Je=V,De=Z.exports,$e=nt,Ge=function(t,e){for(var n=Se(e),r=Pe.f,o=Te.f,i=0;io;)for(var c,u=Ze(arguments[o++]),f=i?Xe(u).concat(i(u)):Xe(u),s=f.length,l=0;s>l;)c=f[l++],Ke&&!a.call(u,c)||(n[c]=u[c]);return n}:tn;function rn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function on(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}ze({target:"Object",stat:!0,forced:Object.assign!==nn},{assign:nn});!function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=S(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=s(t,e,n);if("normal"===u.type){if(r=n.done?v:p,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=v,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",v="completed",d={};function y(){}function g(){}function m(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,j=w&&w(w(k([])));j&&j!==n&&r.call(j,i)&&(b=j);var x=m.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function k(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(u&&f){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}({exports:{}});var pn,hn,vn=Xt("navigator","userAgent")||"",dn=vn,yn=n.process,gn=yn&&yn.versions,mn=gn&&gn.v8;mn?hn=(pn=mn.split("."))[0]<4?1:pn[0]+pn[1]:dn&&(!(pn=dn.match(/Edge\/(\d+)/))||pn[1]>=74)&&(pn=dn.match(/Chrome\/(\d+)/))&&(hn=pn[1]);var bn=hn&&+hn,wn=bn,jn=o,xn=!!Object.getOwnPropertySymbols&&!jn((function(){return!String(Symbol())||!Symbol.sham&&wn&&wn<41})),On=xn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,En=n,Sn=lt.exports,Tn=P,Pn=mt,_n=xn,kn=On,Ln=Sn("wks"),Mn=En.Symbol,An=kn?Mn:Mn&&Mn.withoutSetter||Pn,In=function(t){return Tn(Ln,t)&&(_n||"string"==typeof Ln[t])||(_n&&Tn(Mn,t)?Ln[t]=Mn[t]:Ln[t]=An("Symbol."+t)),Ln[t]},Rn={};Rn[In("toStringTag")]="z";var Cn="[object z]"===String(Rn),Nn=Cn,Fn=p,Jn=In("toStringTag"),Dn="Arguments"==Fn(function(){return arguments}()),$n=Nn?Fn:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Jn))?n:Dn?Fn(e):"Object"==(r=Fn(e))&&"function"==typeof e.callee?"Arguments":r},Gn=$n,Hn=Cn?{}.toString:function(){return"[object "+Gn(this)+"]"},zn=Cn,Wn=Z.exports,qn=Hn;zn||Wn(Object.prototype,"toString",qn,{unsafe:!0});var Un=n.Promise,Kn=Z.exports,Qn=w,Xn=W,Yn=function(t){if(!Qn(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Bn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Xn(n),Yn(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Vn=H.f,Zn=P,tr=In("toStringTag"),er=Xt,nr=H,rr=i,or=In("species"),ir=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ar={},cr=ar,ur=In("iterator"),fr=Array.prototype,sr=ir,lr=function(t,e,n){if(sr(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},pr=$n,hr=ar,vr=In("iterator"),dr=W,yr=W,gr=function(t){return void 0!==t&&(cr.Array===t||fr[ur]===t)},mr=ne,br=lr,wr=function(t){if(null!=t)return t[vr]||t["@@iterator"]||hr[pr(t)]},jr=function(t){var e=t.return;if(void 0!==e)return dr(e.call(t)).value},xr=function(t,e){this.stopped=t,this.result=e},Or=In("iterator"),Er=!1;try{var Sr=0,Tr={next:function(){return{done:!!Sr++}},return:function(){Er=!0}};Tr[Or]=function(){return this},Array.from(Tr,(function(){throw 2}))}catch(t){}var Pr,_r,kr,Lr=W,Mr=ir,Ar=In("species"),Ir=Xt("document","documentElement"),Rr=/(?:iphone|ipod|ipad).*applewebkit/i.test(vn),Cr="process"==p(n.process),Nr=n,Fr=o,Jr=lr,Dr=Ir,$r=M,Gr=Rr,Hr=Cr,zr=Nr.location,Wr=Nr.setImmediate,qr=Nr.clearImmediate,Ur=Nr.process,Kr=Nr.MessageChannel,Qr=Nr.Dispatch,Xr=0,Yr={},Br=function(t){if(Yr.hasOwnProperty(t)){var e=Yr[t];delete Yr[t],e()}},Vr=function(t){return function(){Br(t)}},Zr=function(t){Br(t.data)},to=function(t){Nr.postMessage(t+"",zr.protocol+"//"+zr.host)};Wr&&qr||(Wr=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yr[++Xr]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Pr(Xr),Xr},qr=function(t){delete Yr[t]},Hr?Pr=function(t){Ur.nextTick(Vr(t))}:Qr&&Qr.now?Pr=function(t){Qr.now(Vr(t))}:Kr&&!Gr?(kr=(_r=new Kr).port2,_r.port1.onmessage=Zr,Pr=Jr(kr.postMessage,kr,1)):Nr.addEventListener&&"function"==typeof postMessage&&!Nr.importScripts&&zr&&"file:"!==zr.protocol&&!Fr(to)?(Pr=to,Nr.addEventListener("message",Zr,!1)):Pr="onreadystatechange"in $r("script")?function(t){Dr.appendChild($r("script")).onreadystatechange=function(){Dr.removeChild(this),Br(t)}}:function(t){setTimeout(Vr(t),0)});var eo,no,ro,oo,io,ao,co,uo,fo={set:Wr,clear:qr},so=/web0s(?!.*chrome)/i.test(vn),lo=n,po=r.f,ho=fo.set,vo=Rr,yo=so,go=Cr,mo=lo.MutationObserver||lo.WebKitMutationObserver,bo=lo.document,wo=lo.process,jo=lo.Promise,xo=po(lo,"queueMicrotask"),Oo=xo&&xo.value;Oo||(eo=function(){var t,e;for(go&&(t=wo.domain)&&t.exit();no;){e=no.fn,no=no.next;try{e()}catch(t){throw no?oo():ro=void 0,t}}ro=void 0,t&&t.enter()},vo||go||yo||!mo||!bo?jo&&jo.resolve?((co=jo.resolve(void 0)).constructor=jo,uo=co.then,oo=function(){uo.call(co,eo)}):oo=go?function(){wo.nextTick(eo)}:function(){ho.call(lo,eo)}:(io=!0,ao=bo.createTextNode(""),new mo(eo).observe(ao,{characterData:!0}),oo=function(){ao.data=io=!io}));var Eo=Oo||function(t){var e={fn:t,next:void 0};ro&&(ro.next=e),no||(no=e,oo()),ro=e},So={},To=ir,Po=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=To(e),this.reject=To(n)};So.f=function(t){return new Po(t)};var _o,ko,Lo,Mo,Ao=W,Io=w,Ro=So,Co=n,No="object"==typeof window,Fo=ze,Jo=n,Do=Xt,$o=Un,Go=Z.exports,Ho=function(t,e,n){for(var r in e)Kn(t,r,e[r],n);return t},zo=Bn,Wo=function(t,e,n){t&&!Zn(t=n?t:t.prototype,tr)&&Vn(t,tr,{configurable:!0,value:e})},qo=function(t){var e=er(t),n=nr.f;rr&&e&&!e[or]&&n(e,or,{configurable:!0,get:function(){return this}})},Uo=w,Ko=ir,Qo=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Xo=ct,Yo=function(t,e,n){var r,o,i,a,c,u,f,s=n&&n.that,l=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),v=br(e,s,1+l+h),d=function(t){return r&&jr(r),new xr(!0,t)},y=function(t){return l?(yr(t),h?v(t[0],t[1],d):v(t[0],t[1])):h?v(t,d):v(t)};if(p)r=t;else{if("function"!=typeof(o=wr(t)))throw TypeError("Target is not iterable");if(gr(o)){for(i=0,a=mr(t.length);a>i;i++)if((c=y(t[i]))&&c instanceof xr)return c;return new xr(!1)}r=o.call(t)}for(u=r.next;!(f=u.call(r)).done;){try{c=y(f.value)}catch(t){throw jr(r),t}if("object"==typeof c&&c&&c instanceof xr)return c}return new xr(!1)},Bo=function(t,e){if(!e&&!Er)return!1;var n=!1;try{var r={};r[Or]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Vo=function(t,e){var n,r=Lr(t).constructor;return void 0===r||null==(n=Lr(r)[Ar])?e:Mr(n)},Zo=fo.set,ti=Eo,ei=function(t,e){if(Ao(t),Io(e)&&e.constructor===t)return e;var n=Ro.f(t);return(0,n.resolve)(e),n.promise},ni=function(t,e){var n=Co.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},ri=So,oi=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ii=Ft,ai=Ce,ci=No,ui=Cr,fi=bn,si=In("species"),li="Promise",pi=ii.get,hi=ii.set,vi=ii.getterFor(li),di=$o&&$o.prototype,yi=$o,gi=di,mi=Jo.TypeError,bi=Jo.document,wi=Jo.process,ji=ri.f,xi=ji,Oi=!!(bi&&bi.createEvent&&Jo.dispatchEvent),Ei="function"==typeof PromiseRejectionEvent,Si=!1,Ti=ai(li,(function(){var t=Xo(yi)!==String(yi);if(!t&&66===fi)return!0;if(fi>=51&&/native code/.test(yi))return!1;var e=new yi((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(e.constructor={})[si]=n,!(Si=e.then((function(){}))instanceof n)||!t&&ci&&!Ei})),Pi=Ti||!Bo((function(t){yi.all(t).catch((function(){}))})),_i=function(t){var e;return!(!Uo(t)||"function"!=typeof(e=t.then))&&e},ki=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;ti((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,c,u,f=n[i++],s=o?f.ok:f.fail,l=f.resolve,p=f.reject,h=f.domain;try{s?(o||(2===t.rejection&&Ii(t),t.rejection=1),!0===s?a=r:(h&&h.enter(),a=s(r),h&&(h.exit(),u=!0)),a===f.promise?p(mi("Promise-chain cycle")):(c=_i(a))?c.call(a,l,p):l(a)):p(r)}catch(t){h&&!u&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&Mi(t)}))}},Li=function(t,e,n){var r,o;Oi?((r=bi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Jo.dispatchEvent(r)):r={promise:e,reason:n},!Ei&&(o=Jo["on"+t])?o(r):"unhandledrejection"===t&&ni("Unhandled promise rejection",n)},Mi=function(t){Zo.call(Jo,(function(){var e,n=t.facade,r=t.value;if(Ai(t)&&(e=oi((function(){ui?wi.emit("unhandledRejection",r,n):Li("unhandledrejection",n,r)})),t.rejection=ui||Ai(t)?2:1,e.error))throw e.value}))},Ai=function(t){return 1!==t.rejection&&!t.parent},Ii=function(t){Zo.call(Jo,(function(){var e=t.facade;ui?wi.emit("rejectionHandled",e):Li("rejectionhandled",e,t.value)}))},Ri=function(t,e,n){return function(r){t(e,r,n)}},Ci=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ki(t,!0))},Ni=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw mi("Promise can't be resolved itself");var r=_i(e);r?ti((function(){var n={done:!1};try{r.call(e,Ri(Ni,n,t),Ri(Ci,n,t))}catch(e){Ci(n,e,t)}})):(t.value=e,t.state=1,ki(t,!1))}catch(e){Ci({done:!1},e,t)}}};if(Ti&&(gi=(yi=function(t){Qo(this,yi,li),Ko(t),_o.call(this);var e=pi(this);try{t(Ri(Ni,e),Ri(Ci,e))}catch(t){Ci(e,t)}}).prototype,(_o=function(t){hi(this,{type:li,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ho(gi,{then:function(t,e){var n=vi(this),r=ji(Vo(this,yi));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=ui?wi.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ki(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ko=function(){var t=new _o,e=pi(t);this.promise=t,this.resolve=Ri(Ni,e),this.reject=Ri(Ci,e)},ri.f=ji=function(t){return t===yi||t===Lo?new ko(t):xi(t)},"function"==typeof $o&&di!==Object.prototype)){Mo=di.then,Si||(Go(di,"then",(function(t,e){var n=this;return new yi((function(t,e){Mo.call(n,t,e)})).then(t,e)}),{unsafe:!0}),Go(di,"catch",gi.catch,{unsafe:!0}));try{delete di.constructor}catch(t){}zo&&zo(di,gi)}Fo({global:!0,wrap:!0,forced:Ti},{Promise:yi}),Wo(yi,li,!1),qo(li),Lo=Do(li),Fo({target:li,stat:!0,forced:Ti},{reject:function(t){var e=ji(this);return e.reject.call(void 0,t),e.promise}}),Fo({target:li,stat:!0,forced:Ti},{resolve:function(t){return ei(this,t)}}),Fo({target:li,stat:!0,forced:Pi},{all:function(t){var e=this,n=ji(e),r=n.resolve,o=n.reject,i=oi((function(){var n=Ko(e.resolve),i=[],a=0,c=1;Yo(t,(function(t){var u=a++,f=!1;i.push(void 0),c++,n.call(e,t).then((function(t){f||(f=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=ji(e),r=n.reject,o=oi((function(){var o=Ko(e.resolve);Yo(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Fi,Ji=H,Di=W,$i=Ue,Gi=i?Object.defineProperties:function(t,e){Di(t);for(var n,r=$i(e),o=r.length,i=0;o>i;)Ji.f(t,n=r[i++],e[n]);return t},Hi=W,zi=Gi,Wi=ye,qi=Ot,Ui=Ir,Ki=M,Qi=xt("IE_PROTO"),Xi=function(){},Yi=function(t){return" + + \ No newline at end of file diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/pdfexport.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/pdfexport.js new file mode 100644 index 0000000..bf9104c --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/pdfexport.js @@ -0,0 +1,111 @@ +var PdfExport = ( function( _Reveal ){ + + var Reveal = _Reveal; + var setStylesheet = null; + var installAltKeyBindings = null; + + function getRevealJsPath(){ + var regex = /\b[^/]+\/reveal.css$/i; + var script = Array.from( document.querySelectorAll( 'link' ) ).find( function( e ){ + return e.attributes.href && e.attributes.href.value.search( regex ) >= 0; + }); + if( !script ){ + console.error( 'reveal.css could not be found in included elements. Did you rename this file?' ); + return ''; + } + return script.attributes.href.value.replace( regex, '' ); + } + + function setStylesheet3( pdfExport ){ + var link = document.querySelector( '#print' ); + if( !link ){ + link = document.createElement( 'link' ); + link.rel = 'stylesheet'; + link.id = 'print'; + document.querySelector( 'head' ).appendChild( link ); + } + var style = 'paper'; + if( pdfExport ){ + style = 'pdf'; + } + link.href = getRevealJsPath() + 'css/print/' + style + '.css'; + } + + function setStylesheet4( pdfExport ){ + } + + function installAltKeyBindings3(){ + } + + function installAltKeyBindings4(){ + if( isPrintingPDF() ){ + var config = Reveal.getConfig(); + var shortcut = config.pdfExportShortcut || 'E'; + window.addEventListener( 'keydown', function( e ){ + if( e.target.nodeName.toUpperCase() == 'BODY' + && ( e.key.toUpperCase() == shortcut.toUpperCase() || e.keyCode == shortcut.toUpperCase().charCodeAt( 0 ) ) ){ + e.preventDefault(); + togglePdfExport(); + return false; + } + }, true ); + } + } + + function isPrintingPDF(){ + return ( /print-pdf/gi ).test( window.location.search ); + } + + function togglePdfExport(){ + var url_doc = new URL( document.URL ); + var query_doc = new URLSearchParams( url_doc.searchParams ); + if( isPrintingPDF() ){ + query_doc.delete( 'print-pdf' ); + }else{ + query_doc.set( 'print-pdf', '' ); + } + url_doc.search = ( query_doc.toString() ? '?' + query_doc.toString() : '' ); + window.location.href = url_doc.toString(); + } + + function installKeyBindings(){ + var config = Reveal.getConfig(); + var shortcut = config.pdfExportShortcut || 'E'; + Reveal.addKeyBinding({ + keyCode: shortcut.toUpperCase().charCodeAt( 0 ), + key: shortcut.toUpperCase(), + description: 'PDF export mode' + }, togglePdfExport ); + installAltKeyBindings(); + } + + function install(){ + installKeyBindings(); + setStylesheet( isPrintingPDF() ); + } + + var Plugin = { + } + + if( Reveal && Reveal.VERSION && Reveal.VERSION.length && Reveal.VERSION[ 0 ] == '3' ){ + // reveal 3.x + setStylesheet = setStylesheet3; + installAltKeyBindings = installAltKeyBindings3; + install(); + }else{ + // must be reveal 4.x + setStylesheet = setStylesheet4; + installAltKeyBindings = installAltKeyBindings4; + Plugin.id = 'pdf-export'; + Plugin.init = function( _Reveal ){ + Reveal = _Reveal; + install(); + }; + Plugin.togglePdfExport = function () { + togglePdfExport(); + }; + } + + return Plugin; + +})( Reveal ); diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/plugin.yml b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/plugin.yml new file mode 100644 index 0000000..f6db9d0 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/pdf-export/plugin.yml @@ -0,0 +1,2 @@ +name: PdfExport +script: pdfexport.js diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css new file mode 100644 index 0000000..e8410fe --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css @@ -0,0 +1,31 @@ +.reveal + div.sourceCode + pre + code.has-line-highlights + > span:not(.highlight-line) { + opacity: 0.4; +} + +.reveal pre.numberSource { + padding-left: 0; +} + +.reveal pre.numberSource code > span { + left: -2.1em; +} + +pre.numberSource code > span > a:first-child::before { + left: -0.7em; +} + +.reveal pre > code:not(:first-child).fragment { + position: absolute; + top: 0; + left: 0; + width: 100%; + box-sizing: border-box; +} + +.reveal div.sourceCode pre code { + min-height: 100%; +} diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js new file mode 100644 index 0000000..5bffdc7 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js @@ -0,0 +1,351 @@ +window.QuartoLineHighlight = function () { + function isPrintView() { + return /print-pdf/gi.test(window.location.search); + } + + const delimiters = { + step: "|", + line: ",", + lineRange: "-", + }; + + const regex = new RegExp( + "^[\\d" + Object.values(delimiters).join("") + "]+$" + ); + + function handleLinesSelector(deck, attr) { + // if we are in printview with pdfSeparateFragments: false + // then we'll also want to supress + if (regex.test(attr)) { + if (isPrintView() && deck.getConfig().pdfSeparateFragments !== true) { + return false; + } else { + return true; + } + } else { + return false; + } + } + + const kCodeLineNumbersAttr = "data-code-line-numbers"; + const kFragmentIndex = "data-fragment-index"; + + function initQuartoLineHighlight(deck) { + const divSourceCode = deck + .getRevealElement() + .querySelectorAll("div.sourceCode"); + // Process each div created by Pandoc highlighting - numbered line are already included. + divSourceCode.forEach((el) => { + if (el.hasAttribute(kCodeLineNumbersAttr)) { + const codeLineAttr = el.getAttribute(kCodeLineNumbersAttr); + el.removeAttribute("data-code-line-numbers"); + if (handleLinesSelector(deck, codeLineAttr)) { + // Only process if attr is a string to select lines to highlights + // e.g "1|3,6|8-11" + const codeBlock = el.querySelectorAll("pre code"); + codeBlock.forEach((code) => { + // move attributes on code block + code.setAttribute(kCodeLineNumbersAttr, codeLineAttr); + + const scrollState = { currentBlock: code }; + + // Check if there are steps and duplicate code block accordingly + const highlightSteps = splitLineNumbers(codeLineAttr); + if (highlightSteps.length > 1) { + // If the original code block has a fragment-index, + // each clone should follow in an incremental sequence + let fragmentIndex = parseInt( + code.getAttribute(kFragmentIndex), + 10 + ); + fragmentIndex = + typeof fragmentIndex !== "number" || isNaN(fragmentIndex) + ? null + : fragmentIndex; + + let stepN = 1; + highlightSteps.slice(1).forEach( + // Generate fragments for all steps except the original block + (step) => { + var fragmentBlock = code.cloneNode(true); + fragmentBlock.setAttribute( + "data-code-line-numbers", + joinLineNumbers([step]) + ); + fragmentBlock.classList.add("fragment"); + + // Pandoc sets id on spans we need to keep unique + fragmentBlock + .querySelectorAll(":scope > span") + .forEach((span) => { + if (span.hasAttribute("id")) { + span.setAttribute( + "id", + span.getAttribute("id").concat("-" + stepN) + ); + } + }); + stepN = ++stepN; + + // Add duplicated element after existing one + code.parentNode.appendChild(fragmentBlock); + + // Each new element is highlighted based on the new attributes value + highlightCodeBlock(fragmentBlock); + + if (typeof fragmentIndex === "number") { + fragmentBlock.setAttribute(kFragmentIndex, fragmentIndex); + fragmentIndex += 1; + } else { + fragmentBlock.removeAttribute(kFragmentIndex); + } + + // Scroll highlights into view as we step through them + fragmentBlock.addEventListener( + "visible", + scrollHighlightedLineIntoView.bind( + this, + fragmentBlock, + scrollState + ) + ); + fragmentBlock.addEventListener( + "hidden", + scrollHighlightedLineIntoView.bind( + this, + fragmentBlock.previousSibling, + scrollState + ) + ); + } + ); + code.removeAttribute(kFragmentIndex); + code.setAttribute( + kCodeLineNumbersAttr, + joinLineNumbers([highlightSteps[0]]) + ); + } + + // Scroll the first highlight into view when the slide becomes visible. + const slide = + typeof code.closest === "function" + ? code.closest("section:not(.stack)") + : null; + if (slide) { + const scrollFirstHighlightIntoView = function () { + scrollHighlightedLineIntoView(code, scrollState, true); + slide.removeEventListener( + "visible", + scrollFirstHighlightIntoView + ); + }; + slide.addEventListener("visible", scrollFirstHighlightIntoView); + } + + highlightCodeBlock(code); + }); + } + } + }); + } + + function highlightCodeBlock(codeBlock) { + const highlightSteps = splitLineNumbers( + codeBlock.getAttribute(kCodeLineNumbersAttr) + ); + + if (highlightSteps.length) { + // If we have at least one step, we generate fragments + highlightSteps[0].forEach((highlight) => { + // Add expected class on
     for reveal CSS
    +        codeBlock.parentNode.classList.add("code-wrapper");
    +
    +        // Select lines to highlight
    +        spanToHighlight = [];
    +        if (typeof highlight.last === "number") {
    +          spanToHighlight = [].slice.call(
    +            codeBlock.querySelectorAll(
    +              ":scope > span:nth-child(n+" +
    +                highlight.first +
    +                "):nth-child(-n+" +
    +                highlight.last +
    +                ")"
    +            )
    +          );
    +        } else if (typeof highlight.first === "number") {
    +          spanToHighlight = [].slice.call(
    +            codeBlock.querySelectorAll(
    +              ":scope > span:nth-child(" + highlight.first + ")"
    +            )
    +          );
    +        }
    +        if (spanToHighlight.length) {
    +          // Add a class on  and  to select line to highlight
    +          spanToHighlight.forEach((span) =>
    +            span.classList.add("highlight-line")
    +          );
    +          codeBlock.classList.add("has-line-highlights");
    +        }
    +      });
    +    }
    +  }
    +
    +  /**
    +   * Animates scrolling to the first highlighted line
    +   * in the given code block.
    +   */
    +  function scrollHighlightedLineIntoView(block, scrollState, skipAnimation) {
    +    window.cancelAnimationFrame(scrollState.animationFrameID);
    +
    +    // Match the scroll position of the currently visible
    +    // code block
    +    if (scrollState.currentBlock) {
    +      block.scrollTop = scrollState.currentBlock.scrollTop;
    +    }
    +
    +    // Remember the current code block so that we can match
    +    // its scroll position when showing/hiding fragments
    +    scrollState.currentBlock = block;
    +
    +    const highlightBounds = getHighlightedLineBounds(block);
    +    let viewportHeight = block.offsetHeight;
    +
    +    // Subtract padding from the viewport height
    +    const blockStyles = window.getComputedStyle(block);
    +    viewportHeight -=
    +      parseInt(blockStyles.paddingTop) + parseInt(blockStyles.paddingBottom);
    +
    +    // Scroll position which centers all highlights
    +    const startTop = block.scrollTop;
    +    let targetTop =
    +      highlightBounds.top +
    +      (Math.min(highlightBounds.bottom - highlightBounds.top, viewportHeight) -
    +        viewportHeight) /
    +        2;
    +
    +    // Make sure the scroll target is within bounds
    +    targetTop = Math.max(
    +      Math.min(targetTop, block.scrollHeight - viewportHeight),
    +      0
    +    );
    +
    +    if (skipAnimation === true || startTop === targetTop) {
    +      block.scrollTop = targetTop;
    +    } else {
    +      // Don't attempt to scroll if there is no overflow
    +      if (block.scrollHeight <= viewportHeight) return;
    +
    +      let time = 0;
    +
    +      const animate = function () {
    +        time = Math.min(time + 0.02, 1);
    +
    +        // Update our eased scroll position
    +        block.scrollTop =
    +          startTop + (targetTop - startTop) * easeInOutQuart(time);
    +
    +        // Keep animating unless we've reached the end
    +        if (time < 1) {
    +          scrollState.animationFrameID = requestAnimationFrame(animate);
    +        }
    +      };
    +
    +      animate();
    +    }
    +  }
    +
    +  function getHighlightedLineBounds(block) {
    +    const highlightedLines = block.querySelectorAll(".highlight-line");
    +    if (highlightedLines.length === 0) {
    +      return { top: 0, bottom: 0 };
    +    } else {
    +      const firstHighlight = highlightedLines[0];
    +      const lastHighlight = highlightedLines[highlightedLines.length - 1];
    +
    +      return {
    +        top: firstHighlight.offsetTop,
    +        bottom: lastHighlight.offsetTop + lastHighlight.offsetHeight,
    +      };
    +    }
    +  }
    +
    +  /**
    +   * The easing function used when scrolling.
    +   */
    +  function easeInOutQuart(t) {
    +    // easeInOutQuart
    +    return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
    +  }
    +
    +  function splitLineNumbers(lineNumbersAttr) {
    +    // remove space
    +    lineNumbersAttr = lineNumbersAttr.replace("/s/g", "");
    +    // seperate steps (for fragment)
    +    lineNumbersAttr = lineNumbersAttr.split(delimiters.step);
    +
    +    // for each step, calculate first and last line, if any
    +    return lineNumbersAttr.map((highlights) => {
    +      // detect lines
    +      const lines = highlights.split(delimiters.line);
    +      return lines.map((range) => {
    +        if (/^[\d-]+$/.test(range)) {
    +          range = range.split(delimiters.lineRange);
    +          const firstLine = parseInt(range[0], 10);
    +          const lastLine = range[1] ? parseInt(range[1], 10) : undefined;
    +          return {
    +            first: firstLine,
    +            last: lastLine,
    +          };
    +        } else {
    +          return {};
    +        }
    +      });
    +    });
    +  }
    +
    +  function joinLineNumbers(splittedLineNumbers) {
    +    return splittedLineNumbers
    +      .map(function (highlights) {
    +        return highlights
    +          .map(function (highlight) {
    +            // Line range
    +            if (typeof highlight.last === "number") {
    +              return highlight.first + delimiters.lineRange + highlight.last;
    +            }
    +            // Single line
    +            else if (typeof highlight.first === "number") {
    +              return highlight.first;
    +            }
    +            // All lines
    +            else {
    +              return "";
    +            }
    +          })
    +          .join(delimiters.line);
    +      })
    +      .join(delimiters.step);
    +  }
    +
    +  return {
    +    id: "quarto-line-highlight",
    +    init: function (deck) {
    +      initQuartoLineHighlight(deck);
    +
    +      // If we're printing to PDF, scroll the code highlights of
    +      // all blocks in the deck into view at once
    +      deck.on("pdf-ready", function () {
    +        [].slice
    +          .call(
    +            deck
    +              .getRevealElement()
    +              .querySelectorAll(
    +                "pre code[data-code-line-numbers].current-fragment"
    +              )
    +          )
    +          .forEach(function (block) {
    +            scrollHighlightedLineIntoView(block, {}, true);
    +          });
    +      });
    +    },
    +  };
    +};
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/plugin.yml b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/plugin.yml
    new file mode 100644
    index 0000000..ca20686
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-line-highlight/plugin.yml
    @@ -0,0 +1,4 @@
    +# adapted from https://github.com/hakimel/reveal.js/tree/master/plugin/highlight
    +name: QuartoLineHighlight
    +script: line-highlight.js
    +stylesheet: line-highlight.css
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/footer.css b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/footer.css
    new file mode 100644
    index 0000000..390d5b3
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/footer.css
    @@ -0,0 +1,110 @@
    +.reveal .slide-logo {
    +  display: block;
    +  position: fixed;
    +  bottom: 0;
    +  right: 12px;
    +  max-height: 2.2rem;
    +  height: 100%;
    +  width: auto;
    +  z-index: 2;
    +}
    +
    +.reveal .footer {
    +  display: block;
    +  position: fixed;
    +  bottom: 18px;
    +  width: 100%;
    +  margin: 0 auto;
    +  text-align: center;
    +  font-size: 18px;
    +  z-index: 2;
    +}
    +
    +.reveal .footer > * {
    +  margin-top: 0;
    +  margin-bottom: 0;
    +}
    +
    +.reveal .slide .footer {
    +  display: none;
    +}
    +
    +.reveal .slide-number {
    +  bottom: 10px;
    +  right: 10px;
    +  font-size: 16px;
    +  background-color: transparent;
    +}
    +
    +.reveal.has-logo .slide-number {
    +  bottom: initial;
    +  top: 8px;
    +  right: 8px;
    +}
    +
    +.reveal .slide-number .slide-number-delimiter {
    +  margin: 0;
    +}
    +
    +.reveal .slide-menu-button {
    +  left: 8px;
    +  bottom: 8px;
    +}
    +
    +.reveal .slide-chalkboard-buttons {
    +  position: fixed;
    +  left: 12px;
    +  bottom: 8px;
    +  z-index: 30;
    +  font-size: 24px;
    +}
    +
    +.reveal .slide-chalkboard-buttons.slide-menu-offset {
    +  left: 54px;
    +}
    +
    +.reveal .slide-chalkboard-buttons > span {
    +  margin-right: 14px;
    +  cursor: pointer;
    +}
    +
    +@media screen and (max-width: 800px) {
    +  .reveal .slide-logo {
    +    max-height: 1.1rem;
    +    bottom: -2px;
    +    right: 10px;
    +  }
    +  .reveal .footer {
    +    font-size: 14px;
    +    bottom: 12px;
    +  }
    +  .reveal .slide-number {
    +    font-size: 12px;
    +    bottom: 7px;
    +  }
    +  .reveal .slide-menu-button .fas::before {
    +    height: 1.3rem;
    +    width: 1.3rem;
    +    vertical-align: -0.125em;
    +    background-size: 1.3rem 1.3rem;
    +  }
    +
    +  .reveal .slide-chalkboard-buttons .fas::before {
    +    height: 0.95rem;
    +    width: 0.95rem;
    +    background-size: 0.95rem 0.95rem;
    +    vertical-align: -0em;
    +  }
    +
    +  .reveal .slide-chalkboard-buttons.slide-menu-offset {
    +    left: 36px;
    +  }
    +  .reveal .slide-chalkboard-buttons > span {
    +    margin-right: 9px;
    +  }
    +}
    +
    +html.print-pdf .reveal .slide-menu-button,
    +html.print-pdf .reveal .slide-chalkboard-buttons {
    +  display: none;
    +}
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/plugin.yml b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/plugin.yml
    new file mode 100644
    index 0000000..546956e
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/plugin.yml
    @@ -0,0 +1,5 @@
    +name: QuartoSupport
    +script: support.js
    +stylesheet: footer.css
    +config:
    +  smaller: false
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/support.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/support.js
    new file mode 100644
    index 0000000..9adc921
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/quarto-support/support.js
    @@ -0,0 +1,290 @@
    +// catch all plugin for various quarto features
    +window.QuartoSupport = function () {
    +  function isPrintView() {
    +    return /print-pdf/gi.test(window.location.search);
    +  }
    +
    +  // implement controlsAudo
    +  function controlsAuto(deck) {
    +    const config = deck.getConfig();
    +    if (config.controlsAuto === true) {
    +      const iframe = window.location !== window.parent.location;
    +      const localhost =
    +        window.location.hostname === "localhost" ||
    +        window.location.hostname === "127.0.0.1";
    +      deck.configure({
    +        controls:
    +          (iframe && !localhost) ||
    +          (deck.hasVerticalSlides() && config.navigationMode !== "linear"),
    +      });
    +    }
    +  }
    +
    +  // helper to provide event handlers for all links in a container
    +  function handleLinkClickEvents(deck, container) {
    +    Array.from(container.querySelectorAll("a")).forEach((el) => {
    +      const url = el.getAttribute("href");
    +      if (/^(http|www)/gi.test(url)) {
    +        el.addEventListener(
    +          "click",
    +          (ev) => {
    +            const fullscreen = !!window.document.fullscreen;
    +            const dataPreviewLink = el.getAttribute("data-preview-link");
    +
    +            // if there is a local specifcation then use that
    +            if (dataPreviewLink) {
    +              if (
    +                dataPreviewLink === "true" ||
    +                (dataPreviewLink === "auto" && fullscreen)
    +              ) {
    +                ev.preventDefault();
    +                deck.showPreview(url);
    +                return false;
    +              }
    +            } else {
    +              const previewLinks = !!deck.getConfig().previewLinks;
    +              const previewLinksAuto =
    +                deck.getConfig().previewLinksAuto === true;
    +              if (previewLinks == true || (previewLinksAuto && fullscreen)) {
    +                ev.preventDefault();
    +                deck.showPreview(url);
    +                return false;
    +              }
    +            }
    +
    +            // if the deck is in an iframe we want to open it externally
    +            // (don't do this when in vscode though as it has its own
    +            // handler for opening links externally that will be play)
    +            const iframe = window.location !== window.parent.location;
    +            if (
    +              iframe &&
    +              !window.location.search.includes("quartoPreviewReqId=")
    +            ) {
    +              ev.preventDefault();
    +              ev.stopImmediatePropagation();
    +              window.open(url, "_blank");
    +              return false;
    +            }
    +
    +            // if the user has set data-preview-link to "auto" we need to handle the event
    +            // (because reveal will interpret "auto" as true)
    +            if (dataPreviewLink === "auto") {
    +              ev.preventDefault();
    +              ev.stopImmediatePropagation();
    +              const target =
    +                el.getAttribute("target") ||
    +                (ev.ctrlKey || ev.metaKey ? "_blank" : "");
    +              if (target) {
    +                window.open(url, target);
    +              } else {
    +                window.location.href = url;
    +              }
    +              return false;
    +            }
    +          },
    +          false
    +        );
    +      }
    +    });
    +  }
    +
    +  // implement previewLinksAuto
    +  function previewLinksAuto(deck) {
    +    handleLinkClickEvents(deck, deck.getRevealElement());
    +  }
    +
    +  // apply styles
    +  function applyGlobalStyles(deck) {
    +    if (deck.getConfig()["smaller"] === true) {
    +      const revealParent = deck.getRevealElement();
    +      revealParent.classList.add("smaller");
    +    }
    +  }
    +
    +  // add logo image
    +  function addLogoImage(deck) {
    +    const revealParent = deck.getRevealElement();
    +    const logoImg = document.querySelector(".slide-logo");
    +    if (logoImg) {
    +      revealParent.appendChild(logoImg);
    +      revealParent.classList.add("has-logo");
    +    }
    +  }
    +
    +  // add footer text
    +  function addFooter(deck) {
    +    const revealParent = deck.getRevealElement();
    +    const defaultFooterDiv = document.querySelector(".footer-default");
    +    if (defaultFooterDiv) {
    +      revealParent.appendChild(defaultFooterDiv);
    +      handleLinkClickEvents(deck, defaultFooterDiv);
    +      if (!isPrintView()) {
    +        deck.on("slidechanged", function (ev) {
    +          const prevSlideFooter = document.querySelector(
    +            ".reveal > .footer:not(.footer-default)"
    +          );
    +          if (prevSlideFooter) {
    +            prevSlideFooter.remove();
    +          }
    +          const currentSlideFooter = ev.currentSlide.querySelector(".footer");
    +          if (currentSlideFooter) {
    +            defaultFooterDiv.style.display = "none";
    +            const slideFooter = currentSlideFooter.cloneNode(true);
    +            handleLinkClickEvents(deck, slideFooter);
    +            deck.getRevealElement().appendChild(slideFooter);
    +          } else {
    +            defaultFooterDiv.style.display = "block";
    +          }
    +        });
    +      }
    +    }
    +  }
    +
    +  // add chalkboard buttons
    +  function addChalkboardButtons(deck) {
    +    const chalkboard = deck.getPlugin("RevealChalkboard");
    +    if (chalkboard && !isPrintView()) {
    +      const revealParent = deck.getRevealElement();
    +      const chalkboardDiv = document.createElement("div");
    +      chalkboardDiv.classList.add("slide-chalkboard-buttons");
    +      if (document.querySelector(".slide-menu-button")) {
    +        chalkboardDiv.classList.add("slide-menu-offset");
    +      }
    +      // add buttons
    +      const buttons = [
    +        {
    +          icon: "easel2",
    +          title: "Toggle Chalkboard (b)",
    +          onclick: chalkboard.toggleChalkboard,
    +        },
    +        {
    +          icon: "brush",
    +          title: "Toggle Notes Canvas (c)",
    +          onclick: chalkboard.toggleNotesCanvas,
    +        },
    +      ];
    +      buttons.forEach(function (button) {
    +        const span = document.createElement("span");
    +        span.title = button.title;
    +        const icon = document.createElement("i");
    +        icon.classList.add("fas");
    +        icon.classList.add("fa-" + button.icon);
    +        span.appendChild(icon);
    +        span.onclick = function (event) {
    +          event.preventDefault();
    +          button.onclick();
    +        };
    +        chalkboardDiv.appendChild(span);
    +      });
    +      revealParent.appendChild(chalkboardDiv);
    +      const config = deck.getConfig();
    +      if (!config.chalkboard.buttons) {
    +        chalkboardDiv.classList.add("hidden");
    +      }
    +
    +      // show and hide chalkboard buttons on slidechange
    +      deck.on("slidechanged", function (ev) {
    +        const config = deck.getConfig();
    +        let buttons = !!config.chalkboard.buttons;
    +        const slideButtons = ev.currentSlide.getAttribute(
    +          "data-chalkboard-buttons"
    +        );
    +        if (slideButtons) {
    +          if (slideButtons === "true" || slideButtons === "1") {
    +            buttons = true;
    +          } else if (slideButtons === "false" || slideButtons === "0") {
    +            buttons = false;
    +          }
    +        }
    +        if (buttons) {
    +          chalkboardDiv.classList.remove("hidden");
    +        } else {
    +          chalkboardDiv.classList.add("hidden");
    +        }
    +      });
    +    }
    +  }
    +
    +  function handleTabbyClicks() {
    +    const tabs = document.querySelectorAll(".panel-tabset-tabby > li > a");
    +    for (let i = 0; i < tabs.length; i++) {
    +      const tab = tabs[i];
    +      tab.onclick = function (ev) {
    +        ev.preventDefault();
    +        ev.stopPropagation();
    +        return false;
    +      };
    +    }
    +  }
    +
    +  function fixupForPrint(deck) {
    +    if (isPrintView()) {
    +      const slides = deck.getSlides();
    +      slides.forEach(function (slide) {
    +        slide.removeAttribute("data-auto-animate");
    +      });
    +      window.document.querySelectorAll(".hljs").forEach(function (el) {
    +        el.classList.remove("hljs");
    +      });
    +      window.document.querySelectorAll(".hljs-ln-code").forEach(function (el) {
    +        el.classList.remove("hljs-ln-code");
    +      });
    +    }
    +  }
    +
    +  function handleSlideChanges(deck) {
    +    // dispatch for htmlwidgets
    +    const fireSlideEnter = () => {
    +      const event = window.document.createEvent("Event");
    +      event.initEvent("slideenter", true, true);
    +      window.document.dispatchEvent(event);
    +    };
    +
    +    const fireSlideChanged = (previousSlide, currentSlide) => {
    +      fireSlideEnter();
    +
    +      // dispatch for shiny
    +      if (window.jQuery) {
    +        if (previousSlide) {
    +          window.jQuery(previousSlide).trigger("hidden");
    +        }
    +        if (currentSlide) {
    +          window.jQuery(currentSlide).trigger("shown");
    +        }
    +      }
    +    };
    +
    +    // fire slideEnter for tabby tab activations (for htmlwidget resize behavior)
    +    document.addEventListener("tabby", fireSlideEnter, false);
    +
    +    deck.on("slidechanged", function (event) {
    +      fireSlideChanged(event.previousSlide, event.currentSlide);
    +    });
    +  }
    +
    +  function workaroundMermaidDistance(deck) {
    +    if (window.document.querySelector("pre.mermaid-js")) {
    +      const slideCount = deck.getTotalSlides();
    +      deck.configure({
    +        mobileViewDistance: slideCount,
    +        viewDistance: slideCount,
    +      });
    +    }
    +  }
    +
    +  return {
    +    id: "quarto-support",
    +    init: function (deck) {
    +      controlsAuto(deck);
    +      previewLinksAuto(deck);
    +      fixupForPrint(deck);
    +      applyGlobalStyles(deck);
    +      addLogoImage(deck);
    +      addFooter(deck);
    +      addChalkboardButtons(deck);
    +      handleTabbyClicks();
    +      handleSlideChanges(deck);
    +      workaroundMermaidDistance(deck);
    +    },
    +  };
    +};
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.css b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.css
    new file mode 100644
    index 0000000..5a300fd
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.css
    @@ -0,0 +1,346 @@
    +.slide-menu-wrapper {
    +  font-family: 'Source Sans Pro', Helvetica, sans-serif;
    +}
    +
    +.slide-menu-wrapper .slide-menu {
    +  background-color: #333;
    +  z-index: 200;
    +  position: fixed;
    +  top: 0;
    +  width: 300px;
    +  height: 100%;
    +  /*overflow-y: scroll;*/
    +  transition: transform 0.3s;
    +  font-size: 16px;
    +  font-weight: normal;
    +}
    +
    +.slide-menu-wrapper .slide-menu.slide-menu--wide {
    +  width: 500px;
    +}
    +
    +.slide-menu-wrapper .slide-menu.slide-menu--third {
    +  width: 33%;
    +}
    +
    +.slide-menu-wrapper .slide-menu.slide-menu--half {
    +  width: 50%;
    +}
    +
    +.slide-menu-wrapper .slide-menu.slide-menu--full {
    +  width: 95%;
    +}
    +
    +/*
    + * Slides menu
    + */
    +
    +.slide-menu-wrapper .slide-menu-items {
    +  margin: 0;
    +  padding: 0;
    +  width: 100%;
    +  border-bottom: solid 1px #555;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item,
    +.slide-menu-wrapper .slide-menu-item-vertical {
    +  display: block;
    +  text-align: left;
    +  padding: 10px 18px;
    +  color: #aaa;
    +  cursor: pointer;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item-vertical {
    +  padding-left: 30px;
    +}
    +
    +.slide-menu-wrapper .slide-menu--wide .slide-menu-item-vertical,
    +.slide-menu-wrapper .slide-menu--third .slide-menu-item-vertical,
    +.slide-menu-wrapper .slide-menu--half .slide-menu-item-vertical,
    +.slide-menu-wrapper .slide-menu--full .slide-menu-item-vertical,
    +.slide-menu-wrapper .slide-menu--custom .slide-menu-item-vertical {
    +  padding-left: 50px;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item {
    +  border-top: solid 1px #555;
    +}
    +
    +.slide-menu-wrapper .active-menu-panel li.selected {
    +  background-color: #222;
    +  color: white;
    +}
    +
    +.slide-menu-wrapper .active-menu-panel li.active {
    +  color: #eee;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item.no-title .slide-menu-item-title,
    +.slide-menu-wrapper .slide-menu-item-vertical.no-title .slide-menu-item-title {
    +  font-style: italic;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item-number {
    +  color: #999;
    +  padding-right: 6px;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item i.far,
    +.slide-menu-wrapper .slide-menu-item i.fas,
    +.slide-menu-wrapper .slide-menu-item-vertical i.far,
    +.slide-menu-wrapper .slide-menu-item-vertical i.fas,
    +.slide-menu-wrapper .slide-menu-item svg.svg-inline--fa,
    +.slide-menu-wrapper .slide-menu-item-vertical svg.svg-inline--fa {
    +  padding-right: 12px;
    +  display: none;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item.past i.fas.past,
    +.slide-menu-wrapper .slide-menu-item-vertical.past i.fas.past,
    +.slide-menu-wrapper .slide-menu-item.active i.fas.active,
    +.slide-menu-wrapper .slide-menu-item-vertical.active i.fas.active,
    +.slide-menu-wrapper .slide-menu-item.future i.far.future,
    +.slide-menu-wrapper .slide-menu-item-vertical.future i.far.future,
    +.slide-menu-wrapper .slide-menu-item.past svg.svg-inline--fa.past,
    +.slide-menu-wrapper .slide-menu-item-vertical.past svg.svg-inline--fa.past,
    +.slide-menu-wrapper .slide-menu-item.active svg.svg-inline--fa.active,
    +.slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active,
    +.slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future,
    +.slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future {
    +  display: inline-block;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item.past i.fas.past,
    +.slide-menu-wrapper .slide-menu-item-vertical.past i.fas.past,
    +.slide-menu-wrapper .slide-menu-item.future i.far.future,
    +.slide-menu-wrapper .slide-menu-item-vertical.future i.far.future,
    +.slide-menu-wrapper .slide-menu-item.past svg.svg-inline--fa.past,
    +.slide-menu-wrapper .slide-menu-item-vertical.past svg.svg-inline--fa.past,
    +.slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future,
    +.slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future {
    +  opacity: 0.4;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item.active i.fas.active,
    +.slide-menu-wrapper .slide-menu-item-vertical.active i.fas.active,
    +.slide-menu-wrapper .slide-menu-item.active svg.svg-inline--fa.active,
    +.slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active {
    +  opacity: 0.8;
    +}
    +
    +.slide-menu-wrapper .slide-menu--left {
    +  left: 0;
    +  -webkit-transform: translateX(-100%);
    +  -ms-transform: translateX(-100%);
    +  transform: translateX(-100%);
    +}
    +
    +.slide-menu-wrapper .slide-menu--left.active {
    +  -webkit-transform: translateX(0);
    +  -ms-transform: translateX(0);
    +  transform: translateX(0);
    +}
    +
    +.slide-menu-wrapper .slide-menu--right {
    +  right: 0;
    +  -webkit-transform: translateX(100%);
    +  -ms-transform: translateX(100%);
    +  transform: translateX(100%);
    +}
    +
    +.slide-menu-wrapper .slide-menu--right.active {
    +  -webkit-transform: translateX(0);
    +  -ms-transform: translateX(0);
    +  transform: translateX(0);
    +}
    +
    +.slide-menu-wrapper {
    +  transition: transform 0.3s;
    +}
    +
    +/*
    + * Toolbar
    + */
    +.slide-menu-wrapper .slide-menu-toolbar {
    +  height: 60px;
    +  width: 100%;
    +  font-size: 12px;
    +  display: table;
    +  table-layout: fixed; /* ensures equal width */
    +  margin: 0;
    +  padding: 0;
    +  border-bottom: solid 2px #666;
    +}
    +
    +.slide-menu-wrapper .slide-menu-toolbar > li {
    +  display: table-cell;
    +  line-height: 150%;
    +  text-align: center;
    +  vertical-align: middle;
    +  cursor: pointer;
    +  color: #aaa;
    +  border-radius: 3px;
    +}
    +
    +.slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button i,
    +.slide-menu-wrapper
    +  .slide-menu-toolbar
    +  > li.toolbar-panel-button
    +  svg.svg-inline--fa {
    +  font-size: 1.7em;
    +}
    +
    +.slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button {
    +  color: white;
    +  text-shadow: 0 1px black;
    +  text-decoration: underline;
    +}
    +
    +.slide-menu-toolbar > li.toolbar-panel-button:hover {
    +  color: white;
    +}
    +
    +.slide-menu-toolbar
    +  > li.toolbar-panel-button:hover
    +  span.slide-menu-toolbar-label,
    +.slide-menu-wrapper
    +  .slide-menu-toolbar
    +  > li.active-toolbar-button
    +  span.slide-menu-toolbar-label {
    +  visibility: visible;
    +}
    +
    +/*
    + * Panels
    + */
    +.slide-menu-wrapper .slide-menu-panel {
    +  position: absolute;
    +  width: 100%;
    +  visibility: hidden;
    +  height: calc(100% - 60px);
    +  overflow-x: hidden;
    +  overflow-y: auto;
    +  color: #aaa;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel.active-menu-panel {
    +  visibility: visible;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel h1,
    +.slide-menu-wrapper .slide-menu-panel h2,
    +.slide-menu-wrapper .slide-menu-panel h3,
    +.slide-menu-wrapper .slide-menu-panel h4,
    +.slide-menu-wrapper .slide-menu-panel h5,
    +.slide-menu-wrapper .slide-menu-panel h6 {
    +  margin: 20px 0 10px 0;
    +  color: #fff;
    +  line-height: 1.2;
    +  letter-spacing: normal;
    +  text-shadow: none;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel h1 {
    +  font-size: 1.6em;
    +}
    +.slide-menu-wrapper .slide-menu-panel h2 {
    +  font-size: 1.4em;
    +}
    +.slide-menu-wrapper .slide-menu-panel h3 {
    +  font-size: 1.3em;
    +}
    +.slide-menu-wrapper .slide-menu-panel h4 {
    +  font-size: 1.1em;
    +}
    +.slide-menu-wrapper .slide-menu-panel h5 {
    +  font-size: 1em;
    +}
    +.slide-menu-wrapper .slide-menu-panel h6 {
    +  font-size: 0.9em;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel p {
    +  margin: 10px 0 5px 0;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel a {
    +  color: #ccc;
    +  text-decoration: underline;
    +}
    +
    +.slide-menu-wrapper .slide-menu-panel a:hover {
    +  color: white;
    +}
    +
    +.slide-menu-wrapper .slide-menu-item a {
    +  text-decoration: none;
    +}
    +
    +.slide-menu-wrapper .slide-menu-custom-panel {
    +  width: calc(100% - 20px);
    +  padding-left: 10px;
    +  padding-right: 10px;
    +}
    +
    +.slide-menu-wrapper .slide-menu-custom-panel .slide-menu-items {
    +  width: calc(100% + 20px);
    +  margin-left: -10px;
    +  margin-right: 10px;
    +}
    +
    +/*
    + * Theme and Transitions buttons
    + */
    +
    +.slide-menu-wrapper div[data-panel='Themes'] li,
    +.slide-menu-wrapper div[data-panel='Transitions'] li {
    +  display: block;
    +  text-align: left;
    +  cursor: pointer;
    +  color: #848484;
    +}
    +
    +/*
    + * Menu controls
    + */
    +.reveal .slide-menu-button {
    +  position: fixed;
    +  left: 30px;
    +  bottom: 30px;
    +  z-index: 30;
    +  font-size: 24px;
    +}
    +
    +/*
    + * Menu overlay
    + */
    +
    +.slide-menu-wrapper .slide-menu-overlay {
    +  position: fixed;
    +  z-index: 199;
    +  top: 0;
    +  left: 0;
    +  overflow: hidden;
    +  width: 0;
    +  height: 0;
    +  background-color: #000;
    +  opacity: 0;
    +  transition: opacity 0.3s, width 0s 0.3s, height 0s 0.3s;
    +}
    +
    +.slide-menu-wrapper .slide-menu-overlay.active {
    +  width: 100%;
    +  height: 100%;
    +  opacity: 0.7;
    +  transition: opacity 0.3s;
    +}
    +
    +/*
    + * Hide menu for pdf printing
    + */
    +body.print-pdf .slide-menu-wrapper .slide-menu,
    +body.print-pdf .reveal .slide-menu-button,
    +body.print-pdf .slide-menu-wrapper .slide-menu-overlay {
    +  display: none;
    +}
    diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.js
    new file mode 100644
    index 0000000..5369df3
    --- /dev/null
    +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/menu.js
    @@ -0,0 +1 @@
    +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).RevealMenu=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!o.call({1:2},1)?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,f=function(e){return u.call(e).slice(8,-1)},d="".split,p=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==f(e)?d.call(e,""):Object(e)}:Object,h=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},m=function(e){return p(h(e))},v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=function(e,t){if(!v(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!v(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},S=r.document,E=v(S)&&v(S.createElement),x=!a&&!i((function(){return 7!=Object.defineProperty((e="div",E?S.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),w=Object.getOwnPropertyDescriptor,L={f:a?w:function(e,t){if(e=m(e),t=g(t,!0),x)try{return w(e,t)}catch(e){}if(b(e,t))return c(!l.f.call(e,t),e[t])}},T=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},C=Object.defineProperty,O={f:a?C:function(e,t,n){if(T(e),t=g(t,!0),T(n),x)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},A=a?function(e,t,n){return O.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},k=function(e,t){try{A(r,e,t)}catch(n){r[e]=t}return t},I=r["__core-js_shared__"]||k("__core-js_shared__",{}),P=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(e){return P.call(e)});var M,R,j,N,_=I.inspectSource,F=r.WeakMap,W="function"==typeof F&&/native code/.test(_(F)),H=t((function(e){(e.exports=function(e,t){return I[e]||(I[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),U=0,$=Math.random(),D=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++U+$).toString(36)},q=H("keys"),B={},G=r.WeakMap;if(W){var V=new G,K=V.get,z=V.has,X=V.set;M=function(e,t){return X.call(V,e,t),t},R=function(e){return K.call(V,e)||{}},j=function(e){return z.call(V,e)}}else{var Y=q[N="state"]||(q[N]=D(N));B[Y]=!0,M=function(e,t){return A(e,Y,t),t},R=function(e){return b(e,Y)?e[Y]:{}},j=function(e){return b(e,Y)}}var J={set:M,get:R,has:j,enforce:function(e){return j(e)?R(e):M(e,{})},getterFor:function(e){return function(t){var n;if(!v(t)||(n=R(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Z=t((function(e){var t=J.get,n=J.enforce,i=String(String).split("String");(e.exports=function(e,t,a,o){var s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||b(a,"name")||A(a,"name",t),n(a).source=i.join("string"==typeof t?t:"")),e!==r?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=a:A(e,t,a)):l?e[t]=a:k(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||_(this)}))})),Q=r,ee=function(e){return"function"==typeof e?e:void 0},te=function(e,t){return arguments.length<2?ee(Q[e])||ee(r[e]):Q[e]&&Q[e][t]||r[e]&&r[e][t]},ne=Math.ceil,re=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},ae=Math.min,oe=function(e){return e>0?ae(ie(e),9007199254740991):0},se=Math.max,le=Math.min,ce=function(e,t){var n=ie(e);return n<0?se(n+t,0):le(n,t)},ue=function(e){return function(t,n,r){var i,a=m(t),o=oe(a.length),s=ce(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},fe={includes:ue(!0),indexOf:ue(!1)},de=fe.indexOf,pe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),he={f:Object.getOwnPropertyNames||function(e){return function(e,t){var n,r=m(e),i=0,a=[];for(n in r)!b(B,n)&&b(r,n)&&a.push(n);for(;t.length>i;)b(r,n=t[i++])&&(~de(a,n)||a.push(n));return a}(e,pe)}},me={f:Object.getOwnPropertySymbols},ve=te("Reflect","ownKeys")||function(e){var t=he.f(T(e)),n=me.f;return n?t.concat(n(e)):t},ge=function(e,t){for(var n=ve(t),r=O.f,i=L.f,a=0;ay;y++)if((o||y in m)&&(d=v(f=m[y],y,h),e))if(t)S[y]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:We.call(S,f)}else if(i)return!1;return a?-1:r||i?i:S}},Ue={forEach:He(0),map:He(1),filter:He(2),some:He(3),every:He(4),find:He(5),findIndex:He(6)},$e=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},De=Object.defineProperty,qe={},Be=function(e){throw e},Ge=function(e,t){if(b(qe,e))return qe[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Be,s=b(t,1)?t[1]:void 0;return qe[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?De(e,1,{enumerable:!0,get:Be}):e[1]=1,n.call(e,o,s)}))},Ve=Ue.every,Ke=$e("every"),ze=Ge("every");Ce({target:"Array",proto:!0,forced:!Ke||!ze},{every:function(e){return Ve(this,e,arguments.length>1?arguments[1]:void 0)}});var Xe,Ye,Je=te("navigator","userAgent")||"",Ze=r.process,Qe=Ze&&Ze.versions,et=Qe&&Qe.v8;et?Ye=(Xe=et.split("."))[0]+Xe[1]:Je&&(!(Xe=Je.match(/Edge\/(\d+)/))||Xe[1]>=74)&&(Xe=Je.match(/Chrome\/(\d+)/))&&(Ye=Xe[1]);var tt=Ye&&+Ye,nt=Ne("species"),rt=function(e){return tt>=51||!i((function(){var t=[];return(t.constructor={})[nt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},it=Ue.filter,at=rt("filter"),ot=Ge("filter");Ce({target:"Array",proto:!0,forced:!at||!ot},{filter:function(e){return it(this,e,arguments.length>1?arguments[1]:void 0)}});var st=Ue.forEach,lt=$e("forEach"),ct=Ge("forEach"),ut=lt&&ct?[].forEach:function(e){return st(this,e,arguments.length>1?arguments[1]:void 0)};Ce({target:"Array",proto:!0,forced:[].forEach!=ut},{forEach:ut});var ft=fe.indexOf,dt=[].indexOf,pt=!!dt&&1/[1].indexOf(1,-0)<0,ht=$e("indexOf"),mt=Ge("indexOf",{ACCESSORS:!0,1:0});Ce({target:"Array",proto:!0,forced:pt||!ht||!mt},{indexOf:function(e){return pt?dt.apply(this,arguments)||0:ft(this,e,arguments.length>1?arguments[1]:void 0)}}),Ce({target:"Array",stat:!0},{isArray:ke});var vt=[].join,gt=p!=Object,yt=$e("join",",");Ce({target:"Array",proto:!0,forced:gt||!yt},{join:function(e){return vt.call(m(this),void 0===e?",":e)}});var bt=Math.min,St=[].lastIndexOf,Et=!!St&&1/[1].lastIndexOf(1,-0)<0,xt=$e("lastIndexOf"),wt=Ge("indexOf",{ACCESSORS:!0,1:0}),Lt=Et||!xt||!wt?function(e){if(Et)return St.apply(this,arguments)||0;var t=m(this),n=oe(t.length),r=n-1;for(arguments.length>1&&(r=bt(r,ie(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:St;Ce({target:"Array",proto:!0,forced:Lt!==[].lastIndexOf},{lastIndexOf:Lt});var Tt=Ue.map,Ct=rt("map"),Ot=Ge("map");Ce({target:"Array",proto:!0,forced:!Ct||!Ot},{map:function(e){return Tt(this,e,arguments.length>1?arguments[1]:void 0)}});var At=function(e,t,n){var r=g(t);r in e?O.f(e,r,c(0,n)):e[r]=n},kt=rt("slice"),It=Ge("slice",{ACCESSORS:!0,0:0,1:2}),Pt=Ne("species"),Mt=[].slice,Rt=Math.max;Ce({target:"Array",proto:!0,forced:!kt||!It},{slice:function(e,t){var n,r,i,a=m(this),o=oe(a.length),s=ce(e,o),l=ce(void 0===t?o:t,o);if(ke(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!ke(n.prototype)?v(n)&&null===(n=n[Pt])&&(n=void 0):n=void 0,n===Array||void 0===n))return Mt.call(a,s,l);for(r=new(void 0===n?Array:n)(Rt(l-s,0)),i=0;s>>0||(Qt.test(n)?16:10))}:Zt;Ce({global:!0,forced:parseInt!=en},{parseInt:en});var tn=function(){var e=T(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function nn(e,t){return RegExp(e,t)}var rn,an,on={UNSUPPORTED_Y:i((function(){var e=nn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=nn("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},sn=RegExp.prototype.exec,ln=String.prototype.replace,cn=sn,un=(rn=/a/,an=/b*/g,sn.call(rn,"a"),sn.call(an,"a"),0!==rn.lastIndex||0!==an.lastIndex),fn=on.UNSUPPORTED_Y||on.BROKEN_CARET,dn=void 0!==/()??/.exec("")[1];(un||dn||fn)&&(cn=function(e){var t,n,r,i,a=this,o=fn&&a.sticky,s=tn.call(a),l=a.source,c=0,u=e;return o&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),u=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),n=new RegExp("^(?:"+l+")",s)),dn&&(n=new RegExp("^"+l+"$(?!\\s)",s)),un&&(t=a.lastIndex),r=sn.call(o?n:a,u),o?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:un&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),dn&&r&&r.length>1&&ln.call(r[0],n,(function(){for(i=1;i1?arguments[1]:void 0,r=oe(t.length),i=void 0===n?r:xn(oe(n),r),a=String(e);return En?En.call(t,a,i):t.slice(i-a.length,i)===a}});var Ln=Ne("species"),Tn=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),Cn="$0"==="a".replace(/./,"$0"),On=Ne("replace"),An=!!/./[On]&&""===/./[On]("a","$0"),kn=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),In=function(e,t,n,r){var a=Ne(e),o=!i((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=o&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ln]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!o||!s||"replace"===e&&(!Tn||!Cn||An)||"split"===e&&!kn){var l=/./[a],c=n(a,""[e],(function(e,t,n,r,i){return t.exec===pn?o&&!i?{done:!0,value:l.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Cn,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:An}),u=c[0],f=c[1];Z(String.prototype,e,u),Z(RegExp.prototype,a,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&A(RegExp.prototype[a],"sham",!0)},Pn=function(e){return function(t,n){var r,i,a=String(h(t)),o=ie(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},Mn={codeAt:Pn(!1),charAt:Pn(!0)}.charAt,Rn=function(e,t,n){return t+(n?Mn(e,t).length:1)},jn=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==f(e))throw TypeError("RegExp#exec called on incompatible receiver");return pn.call(e,t)},Nn=Math.max,_n=Math.min,Fn=Math.floor,Wn=/\$([$&'`]|\d\d?|<[^>]*>)/g,Hn=/\$([$&'`]|\d\d?)/g;In("replace",2,(function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=r.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(n,r){var i=h(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!i&&a||"string"==typeof r&&-1===r.indexOf(o)){var l=n(t,e,this,r);if(l.done)return l.value}var c=T(e),u=String(this),f="function"==typeof r;f||(r=String(r));var d=c.global;if(d){var p=c.unicode;c.lastIndex=0}for(var h=[];;){var m=jn(c,u);if(null===m)break;if(h.push(m),!d)break;""===String(m[0])&&(c.lastIndex=Rn(u,oe(c.lastIndex),p))}for(var v,g="",y=0,b=0;b=y&&(g+=u.slice(y,E)+O,y=E+S.length)}return g+u.slice(y)}];function s(e,n,r,i,a,o){var s=r+e.length,l=i.length,c=Hn;return void 0!==a&&(a=Ae(a),c=Wn),t.call(o,c,(function(t,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>l){var f=Fn(u/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}c=i[u-1]}return void 0===c?"":c}))}}));var Un=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};In("search",1,(function(e,t,n){return[function(t){var n=h(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=T(e),a=String(this),o=i.lastIndex;Un(o,0)||(i.lastIndex=0);var s=jn(i,a);return Un(i.lastIndex,o)||(i.lastIndex=o),null===s?-1:s.index}]}));var $n=Ne("species"),Dn=[].push,qn=Math.min,Bn=!i((function(){return!RegExp(4294967295,"y")}));In("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(h(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!vn(e))return t.call(r,e,i);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,f=new RegExp(e.source,c+"g");(a=pn.call(f,r))&&!((o=f.lastIndex)>u&&(l.push(r.slice(u,a.index)),a.length>1&&a.index=i));)f.lastIndex===a.index&&f.lastIndex++;return u===r.length?!s&&f.test("")||l.push(""):l.push(r.slice(u)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=h(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var o=T(e),s=String(this),l=function(e,t){var n,r=T(e).constructor;return void 0===r||null==(n=T(r)[$n])?t:Oe(n)}(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Bn?"y":"g"),f=new l(Bn?o:"^(?:"+o.source+")",u),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===s.length)return null===jn(f,s)?[s]:[];for(var p=0,h=0,m=[];h1?arguments[1]:void 0,t.length)),r=String(e);return Vn?Vn.call(t,r,n):t.slice(n,n+r.length)===r}});var Xn,Yn=Kt.trim;Ce({target:"String",proto:!0,forced:(Xn="trim",i((function(){return!!Dt[Xn]()||"​…᠎"!="​…᠎"[Xn]()||Dt[Xn].name!==Xn})))},{trim:function(){return Yn(this)}});for(var Jn in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Zn=r[Jn],Qn=Zn&&Zn.prototype;if(Qn&&Qn.forEach!==ut)try{A(Qn,"forEach",ut)}catch(e){Qn.forEach=ut}}var er=[].slice,tr=function(e){return function(t,n){var r=arguments.length>2,i=r?er.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};Ce({global:!0,bind:!0,forced:/MSIE .\./.test(Je)},{setTimeout:tr(r.setTimeout),setInterval:tr(r.setInterval)});return String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(t||0,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),function(){var e,t,n,r,i=(e=/(msie) ([\w.]+)/.exec(window.navigator.userAgent.toLowerCase()))&&"msie"===e[1]?parseFloat(e[2]):null,a=!1;function o(e){(r=e.menu||{}).path=r.path||function(){var e;if(document.querySelector('script[src$="menu.js"]')){var t=document.querySelector('script[src$="menu.js"]');t&&(e=t.src.slice(0,-7))}else e=("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("menu.js",document.baseURI).href).slice(0,("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("menu.js",document.baseURI).href).lastIndexOf("/")+1);return e}()||"plugin/menu/",r.path.endsWith("/")||(r.path+="/"),void 0===r.side&&(r.side="left"),void 0===r.numbers&&(r.numbers=!1),"string"!=typeof r.titleSelector&&(r.titleSelector="h1, h2, h3, h4, h5"),void 0===r.hideMissingTitles&&(r.hideMissingTitles=!1),void 0===r.useTextContentForMissingTitles&&(r.useTextContentForMissingTitles=!1),void 0===r.markers&&(r.markers=!0),"string"!=typeof r.themesPath&&(r.themesPath="dist/theme/"),r.themesPath.endsWith("/")||(r.themesPath+="/"),O("link#theme")||(r.themes=!1),!0===r.themes?r.themes=[{name:"Black",theme:r.themesPath+"black.css"},{name:"White",theme:r.themesPath+"white.css"},{name:"League",theme:r.themesPath+"league.css"},{name:"Sky",theme:r.themesPath+"sky.css"},{name:"Beige",theme:r.themesPath+"beige.css"},{name:"Simple",theme:r.themesPath+"simple.css"},{name:"Serif",theme:r.themesPath+"serif.css"},{name:"Blood",theme:r.themesPath+"blood.css"},{name:"Night",theme:r.themesPath+"night.css"},{name:"Moon",theme:r.themesPath+"moon.css"},{name:"Solarized",theme:r.themesPath+"solarized.css"}]:Array.isArray(r.themes)||(r.themes=!1),void 0===r.transitions&&(r.transitions=!1),!0===r.transitions?r.transitions=["None","Fade","Slide","Convex","Concave","Zoom"]:!1===r.transitions||Array.isArray(r.transitions)&&r.transitions.every((function(e){return"string"==typeof e}))||(console.error("reveal.js-menu error: transitions config value must be 'true' or an array of strings, eg ['None', 'Fade', 'Slide')"),r.transitions=!1),i&&i<=9&&(r.transitions=!1),void 0===r.openButton&&(r.openButton=!0),void 0===r.openSlideNumber&&(r.openSlideNumber=!1),void 0===r.keyboard&&(r.keyboard=!0),void 0===r.sticky&&(r.sticky=!1),void 0===r.autoOpen&&(r.autoOpen=!0),void 0===r.delayInit&&(r.delayInit=!1),void 0===r.openOnInit&&(r.openOnInit=!1)}var s=!0;function l(){s=!1}function c(){O("nav.slide-menu").addEventListener("mousemove",(function e(t){O("nav.slide-menu").removeEventListener("mousemove",e),s=!0}))}function u(e){var t=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:n,left:t}}(e).top-e.offsetParent.offsetTop;if(t<0)return-t;var n=e.offsetParent.offsetHeight-(e.offsetTop-e.offsetParent.scrollTop+e.offsetHeight);return n<0?n:0}function f(e){var t=u(e);t&&(l(),e.scrollIntoView(t>0),c())}function d(e){l(),e.offsetParent.scrollTop=e.offsetTop,c()}function p(e){l(),e.offsetParent.scrollTop=e.offsetTop-e.offsetParent.offsetHeight+e.offsetHeight,c()}function h(e){e.classList.add("selected"),f(e),r.sticky&&r.autoOpen&&E(e)}function m(e){if(b())switch(e.stopImmediatePropagation(),e.keyCode){case 72:case 37:!function(){var e=parseInt(O(".active-toolbar-button").getAttribute("data-button"))-1;e<0&&(e=T-1);S(null,O('.toolbar-panel-button[data-button="'+e+'"]').getAttribute("data-panel"))}();break;case 76:case 39:l=(parseInt(O(".active-toolbar-button").getAttribute("data-button"))+1)%T,S(null,O('.toolbar-panel-button[data-button="'+l+'"]').getAttribute("data-panel"));break;case 75:case 38:if(s=O(".active-menu-panel .slide-menu-items li.selected")||O(".active-menu-panel .slide-menu-items li.active"))A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(O('.active-menu-panel .slide-menu-items li[data-item="'+(parseInt(s.getAttribute("data-item"))-1)+'"]')||s);else(o=O(".active-menu-panel .slide-menu-items li.slide-menu-item"))&&h(o);break;case 74:case 40:if(s=O(".active-menu-panel .slide-menu-items li.selected")||O(".active-menu-panel .slide-menu-items li.active"))A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(O('.active-menu-panel .slide-menu-items li[data-item="'+(parseInt(s.getAttribute("data-item"))+1)+'"]')||s);else(o=O(".active-menu-panel .slide-menu-items li.slide-menu-item"))&&h(o);break;case 33:case 85:var t=A(".active-menu-panel .slide-menu-items li").filter((function(e){return u(e)>0})),n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})),r=t.length>0&&Math.abs(u(t[t.length-1]))0&&(p(r),r=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[0]==r?t[t.length-1]:n[0]),A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(r),d(r));break;case 34:case 68:n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)}));var i=A(".active-menu-panel .slide-menu-items li").filter((function(e){return u(e)<0})),a=i.length>0&&Math.abs(u(i[0]))0&&(d(a),a=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[n.length-1]==a?i[0]:n[n.length-1]),A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(a),p(a));break;case 36:A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),(o=O(".active-menu-panel .slide-menu-items li:first-of-type"))&&(o.classList.add("selected"),f(o));break;case 35:var o;A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),(o=O(".active-menu-panel .slide-menu-items:last-of-type li:last-of-type"))&&(o.classList.add("selected"),f(o));break;case 32:case 13:var s;(s=O(".active-menu-panel .slide-menu-items li.selected"))&&E(s,!0);break;case 27:g(null,!0)}var l}function v(e){(e&&e.preventDefault(),b())||(O("body").classList.add("slide-menu-active"),O(".reveal").classList.add("has-"+r.effect+"-"+r.side),O(".slide-menu").classList.add("active"),O(".slide-menu-overlay").classList.add("active"),r.themes&&(A('div[data-panel="Themes"] li').forEach((function(e){e.classList.remove("active")})),A('li[data-theme="'+O("link#theme").getAttribute("href")+'"]').forEach((function(e){e.classList.add("active")}))),r.transitions&&(A('div[data-panel="Transitions"] li').forEach((function(e){e.classList.remove("active")})),A('li[data-transition="'+n.transition+'"]').forEach((function(e){e.classList.add("active")}))),A(".slide-menu-panel li.active").forEach((function(e){e.classList.add("selected"),f(e)})))}function g(e,t){e&&e.preventDefault(),r.sticky&&!t||(O("body").classList.remove("slide-menu-active"),O(".reveal").classList.remove("has-"+r.effect+"-"+r.side),O(".slide-menu").classList.remove("active"),O(".slide-menu-overlay").classList.remove("active"),A(".slide-menu-panel li.selected").forEach((function(e){e.classList.remove("selected")})))}function y(e){b()?g(e,!0):v(e)}function b(){return O("body").classList.contains("slide-menu-active")}function S(e,t){v(e);var n=t;"string"!=typeof t&&(n=e.currentTarget.getAttribute("data-panel")),O(".slide-menu-toolbar > li.active-toolbar-button").classList.remove("active-toolbar-button"),O('li[data-panel="'+n+'"]').classList.add("active-toolbar-button"),O(".slide-menu-panel.active-menu-panel").classList.remove("active-menu-panel"),O('div[data-panel="'+n+'"]').classList.add("active-menu-panel")}function E(e,n){var i=parseInt(e.getAttribute("data-slide-h")),a=parseInt(e.getAttribute("data-slide-v")),o=e.getAttribute("data-theme"),s=e.getAttribute("data-highlight-theme"),l=e.getAttribute("data-transition");isNaN(i)||isNaN(a)||t.slide(i,a),o&&I("theme",o),s&&I("highlight-theme",s),l&&t.configure({transition:l});var c=O("a",e);c&&(n||!r.sticky||r.autoOpen&&c.href.startsWith("#")||c.href.startsWith(window.location.origin+window.location.pathname+"#"))&&c.click(),g()}function x(e){"A"!==e.target.nodeName&&e.preventDefault(),E(e.currentTarget)}function w(){var e=t.getState();A("li.slide-menu-item, li.slide-menu-item-vertical").forEach((function(t){t.classList.remove("past"),t.classList.remove("active"),t.classList.remove("future");var n=parseInt(t.getAttribute("data-slide-h")),r=parseInt(t.getAttribute("data-slide-v"));n",s.appendChild(k("br"),O("i",s)),s.appendChild(k("span",{class:"slide-menu-toolbar-label"},e),O("i",s)),s.onclick=i,d.appendChild(s),s},i=function(e,i,a,o,s){function l(e,t){if(""===e)return null;var n=t?O(e,i):O(e);return n?n.textContent:null}var c=i.getAttribute("data-menu-title")||l(".menu-title",i)||l(r.titleSelector,i);if(!c&&r.useTextContentForMissingTitles&&(c=i.textContent.trim())&&(c=c.split("\n").map((function(e){return e.trim()})).join(" ").trim().replace(/^(.{16}[^\s]*).*/,"$1").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"..."),!c){if(r.hideMissingTitles)return"";e+=" no-title",c="Slide "+(a+1)}var u=k("li",{class:e,"data-item":a,"data-slide-h":o,"data-slide-v":void 0===s?0:s});if(r.markers&&(u.appendChild(k("i",{class:"fas fa-check-circle fa-fw past"})),u.appendChild(k("i",{class:"fas fa-arrow-alt-circle-right fa-fw active"})),u.appendChild(k("i",{class:"far fa-circle fa-fw future"}))),r.numbers){var f=[],d="h.v";switch("string"==typeof r.numbers?d=r.numbers:"string"==typeof n.slideNumber&&(d=n.slideNumber),d){case"c":f.push(a+1);break;case"c/t":f.push(a+1,"/",t.getTotalSlides());break;case"h/v":f.push(o+1),"number"!=typeof s||isNaN(s)||f.push("/",s+1);break;default:f.push(o+1),"number"!=typeof s||isNaN(s)||f.push(".",s+1)}u.appendChild(k("span",{class:"slide-menu-item-number"},f.join("")+". "))}return u.appendChild(k("span",{class:"slide-menu-item-title"},c)),u},o=function(e){s&&(A(".active-menu-panel .slide-menu-items li.selected").forEach((function(e){e.classList.remove("selected")})),e.currentTarget.classList.add("selected"))},l=O(".reveal").parentElement,c=k("div",{class:"slide-menu-wrapper"});l.appendChild(c);var u=k("nav",{class:"slide-menu slide-menu--"+r.side});"string"==typeof r.width&&(-1!=["normal","wide","third","half","full"].indexOf(r.width)?u.classList.add("slide-menu--"+r.width):(u.classList.add("slide-menu--custom"),u.style.width=r.width)),c.appendChild(u),L();var f=k("div",{class:"slide-menu-overlay"});c.appendChild(f),f.onclick=function(){g(null,!0)};var d=k("ol",{class:"slide-menu-toolbar"});O(".slide-menu").appendChild(d),e("Slides","Slides","fa-images","fas",S,!0),r.custom&&r.custom.forEach((function(t,n,r){e(t.title,"Custom"+n,t.icon,null,S)})),r.themes&&e("Themes","Themes","fa-adjust","fas",S),r.transitions&&e("Transitions","Transitions","fa-sticky-note","fas",S);var p=k("li",{id:"close",class:"toolbar-panel-button"});if(p.appendChild(k("i",{class:"fas fa-times"})),p.appendChild(k("br")),p.appendChild(k("span",{class:"slide-menu-toolbar-label"},"Close")),p.onclick=function(){g(null,!0)},d.appendChild(p),function e(){if(document.querySelector("section[data-markdown]:not([data-markdown-parsed])"))setTimeout(e,100);else{var t=k("div",{"data-panel":"Slides",class:"slide-menu-panel active-menu-panel"});t.appendChild(k("ul",{class:"slide-menu-items"})),u.appendChild(t);var n=O('.slide-menu-panel[data-panel="Slides"] > .slide-menu-items'),r=0;A(".slides > section").forEach((function(e,t){var a=A("section",e);if(a.length>0)a.forEach((function(e,a){var o=i(0===a?"slide-menu-item":"slide-menu-item-vertical",e,r,t,a);o&&n.appendChild(o),r++}));else{var o=i("slide-menu-item",e,r,t);o&&n.appendChild(o),r++}})),A(".slide-menu-item, .slide-menu-item-vertical").forEach((function(e){e.onclick=x})),w()}}(),t.addEventListener("slidechanged",w),r.custom){var h=function(){this.status>=200&&this.status<300?(this.panel.innerHTML=this.responseText,C(this.panel)):I(this)},E=function(){I(this)},C=function(e){A("ul.slide-menu-items li.slide-menu-item",e).forEach((function(e,t){e.setAttribute("data-item",t+1),e.onclick=x,e.addEventListener("mouseenter",o)}))},I=function(e){var t="

    ERROR: The attempt to fetch "+e.responseURL+" failed with HTTP status "+e.status+" ("+e.statusText+").

    Remember that you need to serve the presentation HTML from a HTTP server.

    ";e.panel.innerHTML=t};r.custom.forEach((function(e,t,n){var r=k("div",{"data-panel":"Custom"+t,class:"slide-menu-panel slide-menu-custom-panel"});e.content?(r.innerHTML=e.content,C(r)):e.src&&function(e,t){var n=new XMLHttpRequest;n.panel=e,n.arguments=Array.prototype.slice.call(arguments,2),n.onload=h,n.onerror=E,n.open("get",t,!0),n.send(null)}(r,e.src),u.appendChild(r)}))}if(r.themes){var P=k("div",{class:"slide-menu-panel","data-panel":"Themes"});u.appendChild(P);var M=k("ul",{class:"slide-menu-items"});P.appendChild(M),r.themes.forEach((function(e,t){var n={class:"slide-menu-item","data-item":""+(t+1)};e.theme&&(n["data-theme"]=e.theme),e.highlightTheme&&(n["data-highlight-theme"]=e.highlightTheme);var r=k("li",n,e.name);M.appendChild(r),r.onclick=x}))}if(r.transitions){P=k("div",{class:"slide-menu-panel","data-panel":"Transitions"});u.appendChild(P);M=k("ul",{class:"slide-menu-items"});P.appendChild(M),r.transitions.forEach((function(e,t){var n=k("li",{class:"slide-menu-item","data-transition":e.toLowerCase(),"data-item":""+(t+1)},e);M.appendChild(n),n.onclick=x}))}if(r.openButton){var R=k("div",{class:"slide-menu-button"}),j=k("a",{href:"#"});j.appendChild(k("i",{class:"fas fa-bars"})),R.appendChild(j),O(".reveal").appendChild(R),R.onclick=v}if(r.openSlideNumber)O("div.slide-number").onclick=v;A(".slide-menu-panel .slide-menu-items li").forEach((function(e){e.addEventListener("mouseenter",o)}))}if(r.keyboard){if(document.addEventListener("keydown",m,!1),window.addEventListener("message",(function(e){var t;try{t=JSON.parse(e.data)}catch(e){}t&&"triggerKey"===t.method&&m({keyCode:t.args[0],stopImmediatePropagation:function(){}})})),n.keyboardCondition&&"function"==typeof n.keyboardCondition){var N=n.keyboardCondition;n.keyboardCondition=function(e){return N(e)&&(!b()||77==e.keyCode)}}else n.keyboardCondition=function(e){return!b()||77==e.keyCode};t.addKeyBinding({keyCode:77,key:"M",description:"Toggle menu"},y)}r.openOnInit&&v(),a=!0}function O(e,t){return t||(t=document),t.querySelector(e)}function A(e,t){return t||(t=document),Array.prototype.slice.call(t.querySelectorAll(e))}function k(e,t,n){var r=document.createElement(e);return t&&Object.getOwnPropertyNames(t).forEach((function(e){r.setAttribute(e,t[e])})),n&&(r.innerHTML=n),r}function I(e,t){var n=O("link#"+e),r=n.parentElement,i=n.nextElementSibling;n.remove();var a=n.cloneNode();a.setAttribute("href",t),a.onload=function(){L()},r.insertBefore(a,i)}function P(e,t,n){n.call()}function M(){var e,a,o,s=!i||i>=9;t.isSpeakerNotes()&&window.location.search.endsWith("controls=false")&&(s=!1),s&&(r.delayInit||C(),e="menu-ready",(o=document.createEvent("HTMLEvents",1,2)).initEvent(e,!0,!0),function(e,t){for(var n in t)e[n]=t[n]}(o,a),document.querySelector(".reveal").dispatchEvent(o),n.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:e,state:t.getState()}),"*"))}return{id:"menu",init:function(e){o(n=(t=e).getConfig()),P(r.path+"menu.css","stylesheet",(function(){void 0===r.loadIcons||r.loadIcons?P(r.path+"font-awesome/css/all.css","stylesheet",M):M()}))},toggle:y,openMenu:v,closeMenu:g,openPanel:S,isOpen:b,initialiseMenu:C,isMenuInitialised:function(){return a}}}})); diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/plugin.yml b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/plugin.yml new file mode 100644 index 0000000..3f4b90a --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/plugin.yml @@ -0,0 +1,9 @@ +name: RevealMenu +script: [menu.js, quarto-menu.js] +stylesheet: [menu.css, quarto-menu.css] +config: + menu: + side: "left" + useTextContentForMissingTitles: true + markers: false + loadIcons: false diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css new file mode 100644 index 0000000..eec145c --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css @@ -0,0 +1,68 @@ +.slide-menu-wrapper .slide-tool-item { + display: block; + text-align: left; + padding: 10px 18px; + color: #aaa; + cursor: pointer; + border-top: solid 1px #555; +} + +.slide-menu-wrapper .slide-tool-item a { + text-decoration: none; +} + +.slide-menu-wrapper .slide-tool-item kbd { + font-family: monospace; + margin-right: 10px; + padding: 3px 8px; + color: inherit; + border: 1px solid; + border-radius: 5px; + border-color: #555; +} + +.slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button { + text-decoration: none; +} + +.reveal .slide-menu-button { + left: 8px; + bottom: 8px; +} + +.reveal .slide-menu-button .fas::before, +.reveal .slide-chalkboard-buttons .fas::before, +.slide-menu-wrapper .slide-menu-toolbar .fas::before { + display: inline-block; + height: 2.2rem; + width: 2.2rem; + content: ""; + vertical-align: -0.125em; + background-repeat: no-repeat; + background-size: 2.2rem 2.2rem; +} + +.reveal .slide-chalkboard-buttons .fas::before { + height: 1.45rem; + width: 1.45rem; + background-size: 1.45rem 1.45rem; + vertical-align: 0.1em; +} + +.slide-menu-wrapper .slide-menu-toolbar .fas::before { + height: 1.8rem; + width: 1.8rem; + background-size: 1.8rem 1.8rem; +} + +.slide-menu-wrapper .slide-menu-toolbar .fa-images::before { + background-image: url('data:image/svg+xml,'); +} + +.slide-menu-wrapper .slide-menu-toolbar .fa-gear::before { + background-image: url('data:image/svg+xml,'); +} + +.slide-menu-wrapper .slide-menu-toolbar .fa-times::before { + background-image: url('data:image/svg+xml,'); +} diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js new file mode 100644 index 0000000..9674053 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js @@ -0,0 +1,43 @@ +window.revealMenuToolHandler = function (handler) { + return function (event) { + event.preventDefault(); + handler(); + Reveal.getPlugin("menu").closeMenu(); + }; +}; + +window.RevealMenuToolHandlers = { + fullscreen: revealMenuToolHandler(function () { + const element = document.documentElement; + const requestMethod = + element.requestFullscreen || + element.webkitRequestFullscreen || + element.webkitRequestFullScreen || + element.mozRequestFullScreen || + element.msRequestFullscreen; + if (requestMethod) { + requestMethod.apply(element); + } + }), + speakerMode: revealMenuToolHandler(function () { + Reveal.getPlugin("notes").open(); + }), + keyboardHelp: revealMenuToolHandler(function () { + Reveal.toggleHelp(true); + }), + overview: revealMenuToolHandler(function () { + Reveal.toggleOverview(true); + }), + toggleChalkboard: revealMenuToolHandler(function () { + RevealChalkboard.toggleChalkboard(); + }), + toggleNotesCanvas: revealMenuToolHandler(function () { + RevealChalkboard.toggleNotesCanvas(); + }), + downloadDrawings: revealMenuToolHandler(function () { + RevealChalkboard.download(); + }), + togglePdfExport: revealMenuToolHandler(function () { + PdfExport.togglePdfExport(); + }), +}; diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/plugin.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/plugin.js new file mode 100644 index 0000000..5d09ce6 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/plugin.js @@ -0,0 +1,243 @@ +/*! + * Handles finding a text string anywhere in the slides and showing the next occurrence to the user + * by navigatating to that slide and highlighting it. + * + * @author Jon Snyder , February 2013 + */ + +const Plugin = () => { + + // The reveal.js instance this plugin is attached to + let deck; + + let searchElement; + let searchButton; + let searchInput; + + let matchedSlides; + let currentMatchedIndex; + let searchboxDirty; + let hilitor; + + function render() { + + searchElement = document.createElement( 'div' ); + searchElement.classList.add( 'searchbox' ); + searchElement.style.position = 'absolute'; + searchElement.style.top = '10px'; + searchElement.style.right = '10px'; + searchElement.style.zIndex = 10; + + //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: + searchElement.innerHTML = ` +
    `; + + searchInput = searchElement.querySelector( '.searchinput' ); + searchInput.style.width = '240px'; + searchInput.style.fontSize = '14px'; + searchInput.style.padding = '4px 6px'; + searchInput.style.color = '#000'; + searchInput.style.background = '#fff'; + searchInput.style.borderRadius = '2px'; + searchInput.style.border = '0'; + searchInput.style.outline = '0'; + searchInput.style.boxShadow = '0 2px 18px rgba(0, 0, 0, 0.2)'; + searchInput.style['-webkit-appearance'] = 'none'; + + deck.getRevealElement().appendChild( searchElement ); + + // searchButton.addEventListener( 'click', function(event) { + // doSearch(); + // }, false ); + + searchInput.addEventListener( 'keyup', function( event ) { + switch (event.keyCode) { + case 13: + event.preventDefault(); + doSearch(); + searchboxDirty = false; + break; + default: + searchboxDirty = true; + } + }, false ); + + closeSearch(); + + } + + function openSearch() { + if( !searchElement ) render(); + + searchElement.style.display = 'inline'; + searchInput.focus(); + searchInput.select(); + } + + function closeSearch() { + if( !searchElement ) render(); + + searchElement.style.display = 'none'; + if(hilitor) hilitor.remove(); + } + + function toggleSearch() { + if( !searchElement ) render(); + + if (searchElement.style.display !== 'inline') { + openSearch(); + } + else { + closeSearch(); + } + } + + function doSearch() { + //if there's been a change in the search term, perform a new search: + if (searchboxDirty) { + var searchstring = searchInput.value; + + if (searchstring === '') { + if(hilitor) hilitor.remove(); + matchedSlides = null; + } + else { + //find the keyword amongst the slides + hilitor = new Hilitor("slidecontent"); + matchedSlides = hilitor.apply(searchstring); + currentMatchedIndex = 0; + } + } + + if (matchedSlides) { + //navigate to the next slide that has the keyword, wrapping to the first if necessary + if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) { + currentMatchedIndex = 0; + } + if (matchedSlides.length > currentMatchedIndex) { + deck.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v); + currentMatchedIndex++; + } + } + } + + // Original JavaScript code by Chirp Internet: www.chirp.com.au + // Please acknowledge use of this code by including this header. + // 2/2013 jon: modified regex to display any match, not restricted to word boundaries. + function Hilitor(id, tag) { + + var targetNode = document.getElementById(id) || document.body; + var hiliteTag = tag || "EM"; + var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$"); + var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; + var wordColor = []; + var colorIdx = 0; + var matchRegex = ""; + var matchingSlides = []; + + this.setRegex = function(input) + { + input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); + matchRegex = new RegExp("(" + input + ")","i"); + } + + this.getRegex = function() + { + return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); + } + + // recursively apply word highlighting + this.hiliteWords = function(node) + { + if(node == undefined || !node) return; + if(!matchRegex) return; + if(skipTags.test(node.nodeName)) return; + + if(node.hasChildNodes()) { + for(var i=0; i < node.childNodes.length; i++) + this.hiliteWords(node.childNodes[i]); + } + if(node.nodeType == 3) { // NODE_TEXT + var nv, regs; + if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { + //find the slide's section element and save it in our list of matching slides + var secnode = node; + while (secnode != null && secnode.nodeName != 'SECTION') { + secnode = secnode.parentNode; + } + + var slideIndex = deck.getIndices(secnode); + var slidelen = matchingSlides.length; + var alreadyAdded = false; + for (var i=0; i < slidelen; i++) { + if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { + alreadyAdded = true; + } + } + if (! alreadyAdded) { + matchingSlides.push(slideIndex); + } + + if(!wordColor[regs[0].toLowerCase()]) { + wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; + } + + var match = document.createElement(hiliteTag); + match.appendChild(document.createTextNode(regs[0])); + match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; + match.style.fontStyle = "inherit"; + match.style.color = "#000"; + + var after = node.splitText(regs.index); + after.nodeValue = after.nodeValue.substring(regs[0].length); + node.parentNode.insertBefore(match, after); + } + } + }; + + // remove highlighting + this.remove = function() + { + var arr = document.getElementsByTagName(hiliteTag); + var el; + while(arr.length && (el = arr[0])) { + el.parentNode.replaceChild(el.firstChild, el); + } + }; + + // start highlighting at target node + this.apply = function(input) + { + if(input == undefined || !input) return; + this.remove(); + this.setRegex(input); + this.hiliteWords(targetNode); + return matchingSlides; + }; + + } + + return { + + id: 'search', + + init: reveal => { + + deck = reveal; + deck.registerKeyboardShortcut( 'CTRL + Shift + F', 'Search' ); + + document.addEventListener( 'keydown', function( event ) { + if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f + event.preventDefault(); + toggleSearch(); + } + }, false ); + + }, + + open: openSearch + + } +}; + +export default Plugin; \ No newline at end of file diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/search.esm.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/search.esm.js new file mode 100644 index 0000000..b401a70 --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/search/search.esm.js @@ -0,0 +1,7 @@ +var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){try{return!!e()}catch(e){return!0}},n=!t((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i=t,c=/#|\.prototype\./,a=function(e,t){var n=l[u(e)];return n==s||n!=f&&("function"==typeof t?i(t):!!t)},u=a.normalize=function(e){return String(e).replace(c,".").toLowerCase()},l=a.data={},f=a.NATIVE="N",s=a.POLYFILL="P",p=a,g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},d=g,h=function(e){if(!d(e))throw TypeError(String(e)+" is not an object");return e},y=g,v=h,x=function(e){if(!y(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},b=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return v(n),x(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),E=g,m=b,S={},w=g,O=o.document,R=w(O)&&w(O.createElement),T=function(e){return R?O.createElement(e):{}},_=!n&&!t((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),j=g,P=function(e,t){if(!j(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!j(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},I=n,C=_,N=h,A=P,k=Object.defineProperty;S.f=I?k:function(e,t,n){if(N(e),t=A(t,!0),N(n),C)try{return k(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var $={},L=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},M=L,U=function(e){return Object(M(e))},D=U,F={}.hasOwnProperty,z=function(e,t){return F.call(D(e),t)},K={}.toString,B=function(e){return K.call(e).slice(8,-1)},W=B,G="".split,V=t((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==W(e)?G.call(e,""):Object(e)}:Object,Y=L,q=function(e){return V(Y(e))},X=Math.ceil,H=Math.floor,J=function(e){return isNaN(e=+e)?0:(e>0?H:X)(e)},Q=J,Z=Math.min,ee=function(e){return e>0?Z(Q(e),9007199254740991):0},te=J,ne=Math.max,re=Math.min,oe=q,ie=ee,ce=function(e,t){var n=te(e);return n<0?ne(n+t,0):re(n,t)},ae=function(e){return function(t,n,r){var o,i=oe(t),c=ie(i.length),a=ce(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ue={includes:ae(!0),indexOf:ae(!1)},le={},fe=z,se=q,pe=ue.indexOf,ge=le,de=function(e,t){var n,r=se(e),o=0,i=[];for(n in r)!fe(ge,n)&&fe(r,n)&&i.push(n);for(;t.length>o;)fe(r,n=t[o++])&&(~pe(i,n)||i.push(n));return i},he=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");$.f=Object.getOwnPropertyNames||function(e){return de(e,he)};var ye={exports:{}},ve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xe=S,be=ve,Ee=n?function(e,t,n){return xe.f(e,t,be(1,n))}:function(e,t,n){return e[t]=n,e},me=o,Se=Ee,we=function(e,t){try{Se(me,e,t)}catch(n){me[e]=t}return t},Oe=we,Re=o["__core-js_shared__"]||Oe("__core-js_shared__",{}),Te=Re;(ye.exports=function(e,t){return Te[e]||(Te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var _e,je,Pe=0,Ie=Math.random(),Ce=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Pe+Ie).toString(36)},Ne=o,Ae=o,ke=function(e){return"function"==typeof e?e:void 0},$e=function(e,t){return arguments.length<2?ke(Ne[e])||ke(Ae[e]):Ne[e]&&Ne[e][t]||Ae[e]&&Ae[e][t]},Le=$e("navigator","userAgent")||"",Me=o.process,Ue=Me&&Me.versions,De=Ue&&Ue.v8;De?je=(_e=De.split("."))[0]<4?1:_e[0]+_e[1]:Le&&(!(_e=Le.match(/Edge\/(\d+)/))||_e[1]>=74)&&(_e=Le.match(/Chrome\/(\d+)/))&&(je=_e[1]);var Fe=je&&+je,ze=t,Ke=!!Object.getOwnPropertySymbols&&!ze((function(){return!String(Symbol())||!Symbol.sham&&Fe&&Fe<41})),Be=Ke&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,We=o,Ge=ye.exports,Ve=z,Ye=Ce,qe=Ke,Xe=Be,He=Ge("wks"),Je=We.Symbol,Qe=Xe?Je:Je&&Je.withoutSetter||Ye,Ze=function(e){return Ve(He,e)&&(qe||"string"==typeof He[e])||(qe&&Ve(Je,e)?He[e]=Je[e]:He[e]=Qe("Symbol."+e)),He[e]},et=g,tt=B,nt=Ze("match"),rt=h,ot=function(){var e=rt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},it={},ct=t;function at(e,t){return RegExp(e,t)}it.UNSUPPORTED_Y=ct((function(){var e=at("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),it.BROKEN_CARET=ct((function(){var e=at("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var ut={exports:{}},lt=Re,ft=Function.toString;"function"!=typeof lt.inspectSource&&(lt.inspectSource=function(e){return ft.call(e)});var st,pt,gt,dt=lt.inspectSource,ht=dt,yt=o.WeakMap,vt="function"==typeof yt&&/native code/.test(ht(yt)),xt=ye.exports,bt=Ce,Et=xt("keys"),mt=vt,St=g,wt=Ee,Ot=z,Rt=Re,Tt=function(e){return Et[e]||(Et[e]=bt(e))},_t=le,jt=o.WeakMap;if(mt||Rt.state){var Pt=Rt.state||(Rt.state=new jt),It=Pt.get,Ct=Pt.has,Nt=Pt.set;st=function(e,t){if(Ct.call(Pt,e))throw new TypeError("Object already initialized");return t.facade=e,Nt.call(Pt,e,t),t},pt=function(e){return It.call(Pt,e)||{}},gt=function(e){return Ct.call(Pt,e)}}else{var At=Tt("state");_t[At]=!0,st=function(e,t){if(Ot(e,At))throw new TypeError("Object already initialized");return t.facade=e,wt(e,At,t),t},pt=function(e){return Ot(e,At)?e[At]:{}},gt=function(e){return Ot(e,At)}}var kt={set:st,get:pt,has:gt,enforce:function(e){return gt(e)?pt(e):st(e,{})},getterFor:function(e){return function(t){var n;if(!St(t)||(n=pt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},$t=o,Lt=Ee,Mt=z,Ut=we,Dt=dt,Ft=kt.get,zt=kt.enforce,Kt=String(String).split("String");(ut.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,c=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Mt(n,"name")||Lt(n,"name",t),(o=zt(n)).source||(o.source=Kt.join("string"==typeof t?t:""))),e!==$t?(i?!a&&e[t]&&(c=!0):delete e[t],c?e[t]=n:Lt(e,t,n)):c?e[t]=n:Ut(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ft(this).source||Dt(this)}));var Bt=$e,Wt=S,Gt=n,Vt=Ze("species"),Yt=n,qt=o,Xt=p,Ht=function(e,t,n){var r,o;return m&&"function"==typeof(r=t.constructor)&&r!==n&&E(o=r.prototype)&&o!==n.prototype&&m(e,o),e},Jt=S.f,Qt=$.f,Zt=function(e){var t;return et(e)&&(void 0!==(t=e[nt])?!!t:"RegExp"==tt(e))},en=ot,tn=it,nn=ut.exports,rn=t,on=kt.enforce,cn=function(e){var t=Bt(e),n=Wt.f;Gt&&t&&!t[Vt]&&n(t,Vt,{configurable:!0,get:function(){return this}})},an=Ze("match"),un=qt.RegExp,ln=un.prototype,fn=/a/g,sn=/a/g,pn=new un(fn)!==fn,gn=tn.UNSUPPORTED_Y;if(Yt&&Xt("RegExp",!pn||gn||rn((function(){return sn[an]=!1,un(fn)!=fn||un(sn)==sn||"/a/i"!=un(fn,"i")})))){for(var dn=function(e,t){var n,r=this instanceof dn,o=Zt(e),i=void 0===t;if(!r&&o&&e.constructor===dn&&i)return e;pn?o&&!i&&(e=e.source):e instanceof dn&&(i&&(t=en.call(e)),e=e.source),gn&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=Ht(pn?new un(e,t):un(e,t),r?this:ln,dn);gn&&n&&(on(c).sticky=!0);return c},hn=function(e){e in dn||Jt(dn,e,{configurable:!0,get:function(){return un[e]},set:function(t){un[e]=t}})},yn=Qt(un),vn=0;yn.length>vn;)hn(yn[vn++]);ln.constructor=dn,dn.prototype=ln,nn(qt,"RegExp",dn)}cn("RegExp");var xn={},bn={},En={}.propertyIsEnumerable,mn=Object.getOwnPropertyDescriptor,Sn=mn&&!En.call({1:2},1);bn.f=Sn?function(e){var t=mn(this,e);return!!t&&t.enumerable}:En;var wn=n,On=bn,Rn=ve,Tn=q,_n=P,jn=z,Pn=_,In=Object.getOwnPropertyDescriptor;xn.f=wn?In:function(e,t){if(e=Tn(e),t=_n(t,!0),Pn)try{return In(e,t)}catch(e){}if(jn(e,t))return Rn(!On.f.call(e,t),e[t])};var Cn={};Cn.f=Object.getOwnPropertySymbols;var Nn=$,An=Cn,kn=h,$n=$e("Reflect","ownKeys")||function(e){var t=Nn.f(kn(e)),n=An.f;return n?t.concat(n(e)):t},Ln=z,Mn=$n,Un=xn,Dn=S,Fn=o,zn=xn.f,Kn=Ee,Bn=ut.exports,Wn=we,Gn=function(e,t){for(var n=Mn(t),r=Dn.f,o=Un.f,i=0;i0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),n=new RegExp("^(?:"+u+")",a)),tr&&(n=new RegExp("^"+u+"$(?!\\s)",a)),Zn&&(t=i.lastIndex),r=Hn.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Zn&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),tr&&r&&r.length>1&&Jn.call(r[0],n,(function(){for(o=1;o")})),br="$0"==="a".replace(/./,"$0"),Er=dr("replace"),mr=!!/./[Er]&&""===/./[Er]("a","$0"),Sr=!gr((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),wr=J,Or=L,Rr=function(e){return function(t,n){var r,o,i=String(Or(t)),c=wr(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Tr={codeAt:Rr(!1),charAt:Rr(!0)}.charAt,_r=U,jr=Math.floor,Pr="".replace,Ir=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cr=/\$([$&'`]|\d{1,2})/g,Nr=B,Ar=nr,kr=function(e,t,n,r){var o=dr(e),i=!gr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=i&&!gr((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[yr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!c||"replace"===e&&(!xr||!br||mr)||"split"===e&&!Sr){var a=/./[o],u=n(o,""[e],(function(e,t,n,r,o){var c=t.exec;return c===pr||c===vr.exec?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:br,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:mr}),l=u[0],f=u[1];sr(String.prototype,e,l),sr(vr,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&hr(vr[o],"sham",!0)},$r=h,Lr=ee,Mr=J,Ur=L,Dr=function(e,t,n){return t+(n?Tr(e,t).length:1)},Fr=function(e,t,n,r,o,i){var c=n+e.length,a=r.length,u=Cr;return void 0!==o&&(o=_r(o),u=Ir),Pr.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(c);case"<":l=o[u.slice(1,-1)];break;default:var f=+u;if(0===f)return i;if(f>a){var s=jr(f/10);return 0===s?i:s<=a?void 0===r[s-1]?u.charAt(1):r[s-1]+u.charAt(1):i}l=r[f-1]}return void 0===l?"":l}))},zr=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Nr(e))throw TypeError("RegExp#exec called on incompatible receiver");return Ar.call(e,t)},Kr=Math.max,Br=Math.min;kr("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=Ur(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(t,e,this,r);if(a.done)return a.value}var u=$r(e),l=String(this),f="function"==typeof r;f||(r=String(r));var s=u.global;if(s){var p=u.unicode;u.lastIndex=0}for(var g=[];;){var d=zr(u,l);if(null===d)break;if(g.push(d),!s)break;""===String(d[0])&&(u.lastIndex=Dr(l,Lr(u.lastIndex),p))}for(var h,y="",v=0,x=0;x=v&&(y+=l.slice(v,E)+R,v=E+b.length)}return y+l.slice(v)}]}));var Wr={};Wr[Ze("toStringTag")]="z";var Gr="[object z]"===String(Wr),Vr=Gr,Yr=B,qr=Ze("toStringTag"),Xr="Arguments"==Yr(function(){return arguments}()),Hr=Vr?Yr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),qr))?n:Xr?Yr(t):"Object"==(r=Yr(t))&&"function"==typeof t.callee?"Arguments":r},Jr=Gr?{}.toString:function(){return"[object "+Hr(this)+"]"},Qr=Gr,Zr=ut.exports,eo=Jr;Qr||Zr(Object.prototype,"toString",eo,{unsafe:!0}) +/*! + * Handles finding a text string anywhere in the slides and showing the next occurrence to the user + * by navigatating to that slide and highlighting it. + * + * @author Jon Snyder , February 2013 + */;export default function(){var e,t,n,r,o,i,c;function a(){(t=document.createElement("div")).classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='\n\t\t',(n=t.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 13:t.preventDefault(),function(){if(i){var t=n.value;""===t?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(t),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(e.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function u(){t||a(),t.style.display="inline",n.focus(),n.select()}function l(){t||a(),t.style.display="none",c&&c.remove()}function f(t,n){var r=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],a=[],u=0,l="",f=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+e+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&l&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n0?H:X)(e)},Q=J,Z=Math.min,ee=function(e){return e>0?Z(Q(e),9007199254740991):0},te=J,ne=Math.max,re=Math.min,oe=q,ie=ee,ce=function(e,t){var n=te(e);return n<0?ne(n+t,0):re(n,t)},ae=function(e){return function(t,n,r){var o,i=oe(t),c=ie(i.length),a=ce(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ue={includes:ae(!0),indexOf:ae(!1)},le={},fe=z,se=q,pe=ue.indexOf,de=le,ge=function(e,t){var n,r=se(e),o=0,i=[];for(n in r)!fe(de,n)&&fe(r,n)&&i.push(n);for(;t.length>o;)fe(r,n=t[o++])&&(~pe(i,n)||i.push(n));return i},he=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");$.f=Object.getOwnPropertyNames||function(e){return ge(e,he)};var ye={exports:{}},ve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xe=S,be=ve,me=n?function(e,t,n){return xe.f(e,t,be(1,n))}:function(e,t,n){return e[t]=n,e},Ee=o,Se=me,we=function(e,t){try{Se(Ee,e,t)}catch(n){Ee[e]=t}return t},Oe=we,Re="__core-js_shared__",Te=o[Re]||Oe(Re,{}),_e=Te;(ye.exports=function(e,t){return _e[e]||(_e[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var je,Pe,Ie=0,Ce=Math.random(),Ne=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ie+Ce).toString(36)},Ae=o,ke=o,$e=function(e){return"function"==typeof e?e:void 0},Le=function(e,t){return arguments.length<2?$e(Ae[e])||$e(ke[e]):Ae[e]&&Ae[e][t]||ke[e]&&ke[e][t]},Me=Le("navigator","userAgent")||"",Ue=o.process,De=Ue&&Ue.versions,Fe=De&&De.v8;Fe?Pe=(je=Fe.split("."))[0]<4?1:je[0]+je[1]:Me&&(!(je=Me.match(/Edge\/(\d+)/))||je[1]>=74)&&(je=Me.match(/Chrome\/(\d+)/))&&(Pe=je[1]);var ze=Pe&&+Pe,Ke=t,Be=!!Object.getOwnPropertySymbols&&!Ke((function(){return!String(Symbol())||!Symbol.sham&&ze&&ze<41})),We=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=o,Ve=ye.exports,Ye=z,qe=Ne,Xe=Be,He=We,Je=Ve("wks"),Qe=Ge.Symbol,Ze=He?Qe:Qe&&Qe.withoutSetter||qe,et=function(e){return Ye(Je,e)&&(Xe||"string"==typeof Je[e])||(Xe&&Ye(Qe,e)?Je[e]=Qe[e]:Je[e]=Ze("Symbol."+e)),Je[e]},tt=d,nt=B,rt=et("match"),ot=h,it=function(){var e=ot(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ct={},at=t;function ut(e,t){return RegExp(e,t)}ct.UNSUPPORTED_Y=at((function(){var e=ut("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ct.BROKEN_CARET=at((function(){var e=ut("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var lt={exports:{}},ft=Te,st=Function.toString;"function"!=typeof ft.inspectSource&&(ft.inspectSource=function(e){return st.call(e)});var pt,dt,gt,ht=ft.inspectSource,yt=ht,vt=o.WeakMap,xt="function"==typeof vt&&/native code/.test(yt(vt)),bt=ye.exports,mt=Ne,Et=bt("keys"),St=xt,wt=d,Ot=me,Rt=z,Tt=Te,_t=function(e){return Et[e]||(Et[e]=mt(e))},jt=le,Pt="Object already initialized",It=o.WeakMap;if(St||Tt.state){var Ct=Tt.state||(Tt.state=new It),Nt=Ct.get,At=Ct.has,kt=Ct.set;pt=function(e,t){if(At.call(Ct,e))throw new TypeError(Pt);return t.facade=e,kt.call(Ct,e,t),t},dt=function(e){return Nt.call(Ct,e)||{}},gt=function(e){return At.call(Ct,e)}}else{var $t=_t("state");jt[$t]=!0,pt=function(e,t){if(Rt(e,$t))throw new TypeError(Pt);return t.facade=e,Ot(e,$t,t),t},dt=function(e){return Rt(e,$t)?e[$t]:{}},gt=function(e){return Rt(e,$t)}}var Lt={set:pt,get:dt,has:gt,enforce:function(e){return gt(e)?dt(e):pt(e,{})},getterFor:function(e){return function(t){var n;if(!wt(t)||(n=dt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Mt=o,Ut=me,Dt=z,Ft=we,zt=ht,Kt=Lt.get,Bt=Lt.enforce,Wt=String(String).split("String");(lt.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,c=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Dt(n,"name")||Ut(n,"name",t),(o=Bt(n)).source||(o.source=Wt.join("string"==typeof t?t:""))),e!==Mt?(i?!a&&e[t]&&(c=!0):delete e[t],c?e[t]=n:Ut(e,t,n)):c?e[t]=n:Ft(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Kt(this).source||zt(this)}));var Gt=Le,Vt=S,Yt=n,qt=et("species"),Xt=n,Ht=o,Jt=p,Qt=function(e,t,n){var r,o;return E&&"function"==typeof(r=t.constructor)&&r!==n&&m(o=r.prototype)&&o!==n.prototype&&E(e,o),e},Zt=S.f,en=$.f,tn=function(e){var t;return tt(e)&&(void 0!==(t=e[rt])?!!t:"RegExp"==nt(e))},nn=it,rn=ct,on=lt.exports,cn=t,an=Lt.enforce,un=function(e){var t=Gt(e),n=Vt.f;Yt&&t&&!t[qt]&&n(t,qt,{configurable:!0,get:function(){return this}})},ln=et("match"),fn=Ht.RegExp,sn=fn.prototype,pn=/a/g,dn=/a/g,gn=new fn(pn)!==pn,hn=rn.UNSUPPORTED_Y;if(Xt&&Jt("RegExp",!gn||hn||cn((function(){return dn[ln]=!1,fn(pn)!=pn||fn(dn)==dn||"/a/i"!=fn(pn,"i")})))){for(var yn=function(e,t){var n,r=this instanceof yn,o=tn(e),i=void 0===t;if(!r&&o&&e.constructor===yn&&i)return e;gn?o&&!i&&(e=e.source):e instanceof yn&&(i&&(t=nn.call(e)),e=e.source),hn&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=Qt(gn?new fn(e,t):fn(e,t),r?this:sn,yn);hn&&n&&(an(c).sticky=!0);return c},vn=function(e){e in yn||Zt(yn,e,{configurable:!0,get:function(){return fn[e]},set:function(t){fn[e]=t}})},xn=en(fn),bn=0;xn.length>bn;)vn(xn[bn++]);sn.constructor=yn,yn.prototype=sn,on(Ht,"RegExp",yn)}un("RegExp");var mn={},En={},Sn={}.propertyIsEnumerable,wn=Object.getOwnPropertyDescriptor,On=wn&&!Sn.call({1:2},1);En.f=On?function(e){var t=wn(this,e);return!!t&&t.enumerable}:Sn;var Rn=n,Tn=En,_n=ve,jn=q,Pn=P,In=z,Cn=_,Nn=Object.getOwnPropertyDescriptor;mn.f=Rn?Nn:function(e,t){if(e=jn(e),t=Pn(t,!0),Cn)try{return Nn(e,t)}catch(e){}if(In(e,t))return _n(!Tn.f.call(e,t),e[t])};var An={};An.f=Object.getOwnPropertySymbols;var kn=$,$n=An,Ln=h,Mn=Le("Reflect","ownKeys")||function(e){var t=kn.f(Ln(e)),n=$n.f;return n?t.concat(n(e)):t},Un=z,Dn=Mn,Fn=mn,zn=S,Kn=o,Bn=mn.f,Wn=me,Gn=lt.exports,Vn=we,Yn=function(e,t){for(var n=Dn(t),r=zn.f,o=Fn.f,i=0;i0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),n=new RegExp("^(?:"+u+")",a)),rr&&(n=new RegExp("^"+u+"$(?!\\s)",a)),tr&&(t=i.lastIndex),r=Qn.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:tr&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),rr&&r&&r.length>1&&Zn.call(r[0],n,(function(){for(o=1;o")})),Sr="$0"==="a".replace(/./,"$0"),wr=vr("replace"),Or=!!/./[wr]&&""===/./[wr]("a","$0"),Rr=!yr((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Tr=J,_r=L,jr=function(e){return function(t,n){var r,o,i=String(_r(t)),c=Tr(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Pr={codeAt:jr(!1),charAt:jr(!0)}.charAt,Ir=U,Cr=Math.floor,Nr="".replace,Ar=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kr=/\$([$&'`]|\d{1,2})/g,$r=B,Lr=or,Mr=function(e,t,n,r){var o=vr(e),i=!yr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=i&&!yr((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[br]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!c||"replace"===e&&(!Er||!Sr||Or)||"split"===e&&!Rr){var a=/./[o],u=n(o,""[e],(function(e,t,n,r,o){var c=t.exec;return c===hr||c===mr.exec?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Sr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Or}),l=u[0],f=u[1];gr(String.prototype,e,l),gr(mr,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&xr(mr[o],"sham",!0)},Ur=h,Dr=ee,Fr=J,zr=L,Kr=function(e,t,n){return t+(n?Pr(e,t).length:1)},Br=function(e,t,n,r,o,i){var c=n+e.length,a=r.length,u=kr;return void 0!==o&&(o=Ir(o),u=Ar),Nr.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(c);case"<":l=o[u.slice(1,-1)];break;default:var f=+u;if(0===f)return i;if(f>a){var s=Cr(f/10);return 0===s?i:s<=a?void 0===r[s-1]?u.charAt(1):r[s-1]+u.charAt(1):i}l=r[f-1]}return void 0===l?"":l}))},Wr=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==$r(e))throw TypeError("RegExp#exec called on incompatible receiver");return Lr.call(e,t)},Gr=Math.max,Vr=Math.min;Mr("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=zr(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(t,e,this,r);if(a.done)return a.value}var u=Ur(e),l=String(this),f="function"==typeof r;f||(r=String(r));var s=u.global;if(s){var p=u.unicode;u.lastIndex=0}for(var d=[];;){var g=Wr(u,l);if(null===g)break;if(d.push(g),!s)break;""===String(g[0])&&(u.lastIndex=Kr(l,Dr(u.lastIndex),p))}for(var h,y="",v=0,x=0;x=v&&(y+=l.slice(v,m)+R,v=m+b.length)}return y+l.slice(v)}]}));var Yr={};Yr[et("toStringTag")]="z";var qr="[object z]"===String(Yr),Xr=qr,Hr=B,Jr=et("toStringTag"),Qr="Arguments"==Hr(function(){return arguments}()),Zr=Xr?Hr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Jr))?n:Qr?Hr(t):"Object"==(r=Hr(t))&&"function"==typeof t.callee?"Arguments":r},eo=qr?{}.toString:function(){return"[object "+Zr(this)+"]"},to=qr,no=lt.exports,ro=eo;to||no(Object.prototype,"toString",ro,{unsafe:!0}) +/*! + * Handles finding a text string anywhere in the slides and showing the next occurrence to the user + * by navigatating to that slide and highlighting it. + * + * @author Jon Snyder , February 2013 + */;return function(){var e,t,n,r,o,i,c;function a(){(t=document.createElement("div")).classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='\n\t\t',(n=t.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 13:t.preventDefault(),function(){if(i){var t=n.value;""===t?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(t),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(e.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function u(){t||a(),t.style.display="inline",n.focus(),n.select()}function l(){t||a(),t.style.display="none",c&&c.remove()}function f(t,n){var r=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],a=[],u=0,l="",f=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+e+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&l&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n { + + zoom.reset(); + + } + +}; + +export default () => Plugin; + +/*! + * zoom.js 0.3 (modified for use with reveal.js) + * http://lab.hakim.se/zoom-js + * MIT licensed + * + * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se + */ +var zoom = (function(){ + + // The current zoom level (scale) + var level = 1; + + // The current mouse position, used for panning + var mouseX = 0, + mouseY = 0; + + // Timeout before pan is activated + var panEngageTimeout = -1, + panUpdateInterval = -1; + + // Check for transform support so that we can fallback otherwise + var supportsTransforms = 'transform' in document.body.style; + + if( supportsTransforms ) { + // The easing that will be applied when we zoom in/out + document.body.style.transition = 'transform 0.8s ease'; + } + + // Zoom out if the user hits escape + document.addEventListener( 'keyup', function( event ) { + if( level !== 1 && event.keyCode === 27 ) { + zoom.out(); + } + } ); + + // Monitor mouse movement for panning + document.addEventListener( 'mousemove', function( event ) { + if( level !== 1 ) { + mouseX = event.clientX; + mouseY = event.clientY; + } + } ); + + /** + * Applies the CSS required to zoom in, prefers the use of CSS3 + * transforms but falls back on zoom for IE. + * + * @param {Object} rect + * @param {Number} scale + */ + function magnify( rect, scale ) { + + var scrollOffset = getScrollOffset(); + + // Ensure a width/height is set + rect.width = rect.width || 1; + rect.height = rect.height || 1; + + // Center the rect within the zoomed viewport + rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2; + rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2; + + if( supportsTransforms ) { + // Reset + if( scale === 1 ) { + document.body.style.transform = ''; + } + // Scale + else { + var origin = scrollOffset.x +'px '+ scrollOffset.y +'px', + transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')'; + + document.body.style.transformOrigin = origin; + document.body.style.transform = transform; + } + } + else { + // Reset + if( scale === 1 ) { + document.body.style.position = ''; + document.body.style.left = ''; + document.body.style.top = ''; + document.body.style.width = ''; + document.body.style.height = ''; + document.body.style.zoom = ''; + } + // Scale + else { + document.body.style.position = 'relative'; + document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px'; + document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px'; + document.body.style.width = ( scale * 100 ) + '%'; + document.body.style.height = ( scale * 100 ) + '%'; + document.body.style.zoom = scale; + } + } + + level = scale; + + if( document.documentElement.classList ) { + if( level !== 1 ) { + document.documentElement.classList.add( 'zoomed' ); + } + else { + document.documentElement.classList.remove( 'zoomed' ); + } + } + } + + /** + * Pan the document when the mosue cursor approaches the edges + * of the window. + */ + function pan() { + var range = 0.12, + rangeX = window.innerWidth * range, + rangeY = window.innerHeight * range, + scrollOffset = getScrollOffset(); + + // Up + if( mouseY < rangeY ) { + window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) ); + } + // Down + else if( mouseY > window.innerHeight - rangeY ) { + window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) ); + } + + // Left + if( mouseX < rangeX ) { + window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y ); + } + // Right + else if( mouseX > window.innerWidth - rangeX ) { + window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y ); + } + } + + function getScrollOffset() { + return { + x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset, + y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset + } + } + + return { + /** + * Zooms in on either a rectangle or HTML element. + * + * @param {Object} options + * - element: HTML element to zoom in on + * OR + * - x/y: coordinates in non-transformed space to zoom in on + * - width/height: the portion of the screen to zoom in on + * - scale: can be used instead of width/height to explicitly set scale + */ + to: function( options ) { + + // Due to an implementation limitation we can't zoom in + // to another element without zooming out first + if( level !== 1 ) { + zoom.out(); + } + else { + options.x = options.x || 0; + options.y = options.y || 0; + + // If an element is set, that takes precedence + if( !!options.element ) { + // Space around the zoomed in element to leave on screen + var padding = 20; + var bounds = options.element.getBoundingClientRect(); + + options.x = bounds.left - padding; + options.y = bounds.top - padding; + options.width = bounds.width + ( padding * 2 ); + options.height = bounds.height + ( padding * 2 ); + } + + // If width/height values are set, calculate scale from those values + if( options.width !== undefined && options.height !== undefined ) { + options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 ); + } + + if( options.scale > 1 ) { + options.x *= options.scale; + options.y *= options.scale; + + magnify( options, options.scale ); + + if( options.pan !== false ) { + + // Wait with engaging panning as it may conflict with the + // zoom transition + panEngageTimeout = setTimeout( function() { + panUpdateInterval = setInterval( pan, 1000 / 60 ); + }, 800 ); + + } + } + } + }, + + /** + * Resets the document zoom state to its default. + */ + out: function() { + clearTimeout( panEngageTimeout ); + clearInterval( panUpdateInterval ); + + magnify( { x: 0, y: 0 }, 1 ); + + level = 1; + }, + + // Alias + magnify: function( options ) { this.to( options ) }, + reset: function() { this.out() }, + + zoomLevel: function() { + return level; + } + } + +})(); diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.esm.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.esm.js new file mode 100644 index 0000000..c0e8d7b --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.esm.js @@ -0,0 +1,4 @@ +/*! + * reveal.js Zoom plugin + */ +var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(n){var o=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:o)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;n[i]&&!e.isOverview()&&(n.preventDefault(),t.to({x:n.clientX,y:n.clientY,scale:d,pan:!1}))}))},destroy:function(){t.reset()}},t=function(){var e=1,n=0,o=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,n){var o=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*n)/2,t.y-=(window.innerHeight-t.height*n)/2,l)if(1===n)document.body.style.transform="";else{var i=o.x+"px "+o.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+n+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===n?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(o.x+t.x)/n+"px",document.body.style.top=-(o.y+t.y)/n+"px",document.body.style.width=100*n+"%",document.body.style.height=100*n+"%",document.body.style.zoom=n);e=n,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();owindow.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-o)/i)*(14/e)),nwindow.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-n)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(n){1!==e&&27===n.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(n=t.clientX,o=t.clientY)})),{to:function(n){if(1!==e)t.out();else{if(n.x=n.x||0,n.y=n.y||0,n.element){var o=n.element.getBoundingClientRect();n.x=o.left-20,n.y=o.top-20,n.width=o.width+40,n.height=o.height+40}void 0!==n.width&&void 0!==n.height&&(n.scale=Math.max(Math.min(window.innerWidth/n.width,window.innerHeight/n.height),1)),n.scale>1&&(n.x*=n.scale,n.y*=n.scale,s(n,n.scale),!1!==n.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();export default function(){return e} diff --git a/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.js b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.js new file mode 100644 index 0000000..b52804d --- /dev/null +++ b/2024/01-writing-about-data/011-writing-about-data_files/libs/revealjs/plugin/zoom/zoom.js @@ -0,0 +1,4 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealZoom=t()}(this,(function(){"use strict"; +/*! + * reveal.js Zoom plugin + */var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(o){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;o[i]&&!e.isOverview()&&(o.preventDefault(),t.to({x:o.clientX,y:o.clientY,scale:d,pan:!1}))}))},destroy:function(){t.reset()}},t=function(){var e=1,o=0,n=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,o){var n=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,l)if(1===o)document.body.style.transform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();nwindow.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),owindow.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(o){1!==e&&27===o.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(o=t.clientX,n=t.clientY)})),{to:function(o){if(1!==e)t.out();else{if(o.x=o.x||0,o.y=o.y||0,o.element){var n=o.element.getBoundingClientRect();o.x=n.left-20,o.y=n.top-20,o.width=n.width+40,o.height=n.height+40}void 0!==o.width&&void 0!==o.height&&(o.scale=Math.max(Math.min(window.innerWidth/o.width,window.innerHeight/o.height),1)),o.scale>1&&(o.x*=o.scale,o.y*=o.scale,s(o,o.scale),!1!==o.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();return function(){return e}})); diff --git a/2024/01-writing-about-data/012-desiging-a-study.html b/2024/01-writing-about-data/012-desiging-a-study.html deleted file mode 100644 index f96c9b6..0000000 --- a/2024/01-writing-about-data/012-desiging-a-study.html +++ /dev/null @@ -1,2662 +0,0 @@ - - - - - - - - - - - - Designing a Study - - - - - - - - - - - - - - - -
    -
    - -
    -

    Designing a Study

    -

    Stat 365: Statistical Communication

    - -
    -
    - -
    -
    -

    Wednesday, April 5th

    -

    Today we will…

    -
      -
    • Designing a study
    • -
    • Writing a protocol
    • -
    • Importance of reproducibility
    • -
    • Introduce final technical report project
    • -
    -
    -
    -
    -

    Study Design

    - -
    -
    -

    Class Data Collection

    -

    Please write down your answers to the two questions on the peice of paper you have been given.

    -
    -
    -
    -
    - -
    -

    Warning

    -
    -
    -

    You will be asked to submit your answers to a Canvas quiz after class, so please hold onto or take a picture of your answers!

    -
    -
    -
    -
    -
    -

    Posing Reserach Question

    -
      -
    1. Identify the observational units and variables.
    2. -
    -

    What is the statistical (research) question being investigated?

    -
      -
    1. Is this an observational study or a randomized experiment? Explain.

    2. -
    3. In collecting these data, did we make use of random sampling, random assignment, both, or neither?

    4. -
    5. What is the primary purpose of the type of randomness that was used in collecting these data?

    6. -
    7. If analysis of the data reveals that the difference between the two groups is “statistically significant,” would you have reason to conclude that one treatment caused smaller/larger responses on the task? Explain.

    8. -
    9. To what population would you feel comfortable generalizing the results of this study? Explain.

    10. -
    -
    -
    -

    Observational Units and Variables

    -

    For each of the following questions, identify the relevant observational units and variables.

    -
    -
    -
    -
    - -
    -

    Note

    -
    -
    -

    Also classify each variable as numerical or categorical (also binary?). For studies with more than one variable, also identify the explanatory and response variables.

    -
    -
    -
    -
      -
    • What is the average amount of a transaction at the Subway restaurant on campus?

    • -
    • Are Reese’s Pieces candies equally likely to be orange, brown, or yellow?

    • -
    • Can the price at which a grandfather clock sells at auction be predicted from its age, number of bidders, and country of manufacture?

    • -
    -
    -
    -

    Statistical Terminology – “Random”

    -
      -
    • On a scale of 0 – 10, how important do you consider the word “random” in statistics?

    • -
    • What do you think “random” means in everyday usage? How about in slang usage?

    • -
    • In what ways is “random” used in statistics?

    • -
    • Would you say that the everyday usage of “random” is a help or a hindrance when trying to communicate statistical uses of the word? Explain.

    • -
    -
    -
    -

    Scope of Inference

    -
    - -
    -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    -

    Research Protocols

    - -
    -
    -

    Recipes: Chocolate Chip Cookies1

    -
    - -
    -
    -
    -
    -
      -
    • 2 1/4 cups Gold Medal™ all-purpose flour
    • -
    • 1 teaspoon baking soda
    • -
    • 1/2 teaspoon salt
    • -
    • 1 cup butter, softened
    • -
    • 3/4 cup granulated sugar
    • -
    • 3/4 cup packed brown sugar
    • -
    -
    -
      -
    • 1 egg
    • -
    • 1 teaspoon vanilla
    • -
    • 2 cups semisweet chocolate chips
    • -
    • 1 cup coarsely chopped nuts, if desired
    • -
    -
    -
    -
    -
    -
      -
    1. Heat oven.
    2. -
    3. Mix ingredients together.
    4. -
    5. Place dough on a pan.
    6. -
    7. Bake in oven and let cool.
    8. -
    9. Store cookies.
    10. -
    -

    Brainstorm!

    -

    Do you feel confident in your skills to make amazing chocolate chip cookies?

    -

    What questions do you have about how to successfully bake the cookies?

    -
    -
    -
      -
    1. Heat oven to 375°F. In small bowl, mix flour, baking soda and salt; set aside.
    2. -
    3. In large bowl, beat softened butter and sugars with electric mixer on medium speed, or mix with spoon about 1 minute or until fluffy, scraping side of bowl occasionally.
    4. -
    5. Beat in egg and vanilla until smooth. Stir in flour mixture just until blended (dough will be stiff). Stir in chocolate chips and nuts.
    6. -
    7. Onto ungreased cookie sheets, drop dough by rounded tablespoonfuls 2 inches apart.
    8. -
    9. Bake 8 to 10 minutes or until light brown (centers will be soft). Cool 2 minutes; remove from cookie sheet to cooling rack. Cool completely, about 30 minutes. Store covered in airtight container.
    10. -
    -
    -
    -
    -
    -
    -

    What is a Research Protocol?

    -

    The research protocol is a document that outlines the study plan and includes:

    -
      -
    • Background information
    • -
    • Rationale for the study
    • -
    • Objective(s) of the study
    • -
    • Study design
    • -
    • Methodology used
    • -
    • Statistical considerations
    • -
    -

    It should be designed to provide a satisfactory answer to the research question.

    -
    -
    -
    -
    - -
    -

    Note

    -
    -
    -

    The protocol in effect is the cookbook for conducting your study

    -
    -
    -
    -
    -
    -

    Why is a research protocol important?

    -

    A research protocol is important because it:

    -
      -
    • It helps to ensure that the study is conducted safely and efficiently.
    • -
    • It helps to ensure that the study is conducted ethically and with the highest standards of scientific rigor.
    • -
    • The protocol serves as a binding document for the study, outlining what can and cannot be studied.
    • -
    • It is typically developed with input from multiple experts in the field to ensure all aspects of the study are covered.
    • -
    -
    -
    -

    Institutional Review Boards (IRB) and Human Subjects 1

    -
    -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    -
    -
      -
    • The IRB ensures that research involving human subjects meets federal, state, and institutional regulations.
    • -
    • The research protocol is the most critical document in your application with your IRB.
    • -
    • It is the responsibility of the researcher to obtain informed consent from study participants and maintain confidentiality throughout the study.
    • -
    -
    -
    -
    -
    -

    Research Proposal vs Research Protocol

    - - - - - - - - - - - - - - - - - -
    Research ProposalResearch Protocol
    A research proposal is written to persuade the grant committee, university department, instructors, etc.A research protocol is written to detail a study’s execution plan to meet specified ethical norms for participating subjects.
    Research proposals are submitted to funding bodiesResearch protocols are submitted to Institutional Review Boards (IRBs) within universities and research centers.
    -
    -
    -

    Research protocol components1

    -
      -
    • Put the methodology in context
    • -
    • Materials and tools
    • -
    • A chronology of steps
    • -
    • Notes, recipes, tips, and tricks
    • -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    -
    -
    -

    Reproduciblility!

    -

    Reproducibility in scientific research is important in order for other researchers to be able to replicate your study results. This includes:

    -
      -
    • A detailed Research Protocol
    • -
    • Organized and clear documentation of the study -
        -
      • Data storage
      • -
      • Analyses
      • -
      • Results
      • -
      • Documents
      • -
    • -
    -
    -
    -

    Final technical report project

    -


    -

    Brainstorm project topics!

    -
    -
    -

    To do

    -
    -
    -

    Mandela Age Survey

    -
      -
    • Due Thursday, 4/6 at 12pm
    • -
    -

    Initial Proposal

    -
      -
    • Due Monday, 4/10 at 12pm
    • -
    -

    Formal Protocol

    -
      -
    • Due Thursday, 4/13 at 11:59pm
    • -
    -

    Peer Review of Formal Protocol

    -
      -
    • Opens on Canvas Friday, 4/14 at 8am
    • -
    • Due Tuesday, 4/16 at 11:59pm
    • -
    -
    -

    Read

    -
      -
    • CwD (ch 2)
    • -
    • Numbers in the Newsroom (ch 1, optional: ch 2)
    • -
    -
    -
    - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/2024/01-writing-about-data/012-desiging-a-study.qmd b/2024/01-writing-about-data/012-desiging-a-study.qmd deleted file mode 100644 index fd6ad6d..0000000 --- a/2024/01-writing-about-data/012-desiging-a-study.qmd +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: "Designing a Study" -subtitle: "Stat 365: Statistical Communication" -format: - revealjs: - theme: [default, ../slide_custom.scss] - auto-stretch: false - # chalkboard: true -editor: source -self-contained: true -execute: - echo: true ---- - -## Wednesday, April 5th - -Today we will... - -- Designing a study -- Writing a protocol -- Importance of reproducibility -- Introduce final technical report project - -# Study Design - -## Class Data Collection - -Please write down your answers to the two questions on the peice of paper you have been given. - -::: callout-warning -You will be asked to submit your answers to a Canvas quiz after class, so please hold onto or take a picture of your answers! -::: - -## `r fontawesome::fa("brain")` Posing Reserach Question - -1. Identify the observational units and variables. - -### What is the statistical (research) question being investigated? - -2. Is this an observational study or a randomized experiment? Explain. - -3. In collecting these data, did we make use of random sampling, random assignment, both, or neither? - -4. What is the primary purpose of the type of randomness that was used in collecting these data? - -5. If analysis of the data reveals that the difference between the two groups is "statistically significant," would you have reason to conclude that one treatment caused smaller/larger responses on the task? Explain. - -6. To what population would you feel comfortable generalizing the results of this study? Explain. - -## Observational Units and Variables - -For each of the following questions, identify the relevant observational units and variables. - -::: callout-note -Also classify each variable as numerical or categorical (also binary?). For studies with more than one variable, also identify the explanatory and response variables. -::: - -- What is the average amount of a transaction at the Subway restaurant on campus? - -- Are Reese's Pieces candies equally likely to be orange, brown, or yellow? - -- Can the price at which a grandfather clock sells at auction be predicted from its age, number of bidders, and country of manufacture? - -## `r fontawesome::fa("brain")` Statistical Terminology -- "Random" - -- On a scale of 0 -- 10, how important do you consider the word "random" in statistics? - -- What do you think "random" means in everyday usage? How about in slang usage? - -- In what ways is "random" used in statistics? - -- Would you say that the everyday usage of "random" is a help or a hindrance when trying to communicate statistical uses of the word? Explain. - -## Scope of Inference - -::: panel-tabset -### Experiment vs Observation - -```{r} -#| fig-align: center -#| out-width: 70% -#| echo: false -knitr::include_graphics("https://imgs.xkcd.com/comics/correlation_2x.png") -``` - - - - - -### Generalization to a Population - -```{r} -#| fig-align: center -#| out-width: 50% -#| echo: false -knitr::include_graphics("https://imgs.xkcd.com/comics/selection_bias.png") -``` - - - - - - -::: - -# Research Protocols - -## Recipes: Chocolate Chip Cookies[^1] - -[^1]: https://www.bettycrocker.com/recipes/ultimate-chocolate-chip-cookies/77c14e03-d8b0-4844-846d-f19304f61c57 - -::: panel-tabset -### Ingredients - -::: columns -::: column -- 2 1/4 cups Gold Medal™ all-purpose flour -- 1 teaspoon baking soda -- 1/2 teaspoon salt -- 1 cup butter, softened -- 3/4 cup granulated sugar -- 3/4 cup packed brown sugar -::: - -::: column -- 1 egg -- 1 teaspoon vanilla -- 2 cups semisweet chocolate chips -- 1 cup coarsely chopped nuts, if desired -::: -::: - -### Instructions - -1. Heat oven. -2. Mix ingredients together. -3. Place dough on a pan. -4. Bake in oven and let cool. -5. Store cookies. - -#### `r fontawesome::fa("brain")` Brainstorm! - -`r fontawesome::fa("question")` Do you feel confident in your skills to make amazing chocolate chip cookies? - -`r fontawesome::fa("question")` What questions do you have about how to successfully bake the cookies? - -### Detailed Instructions - -1. Heat oven to 375°F. In small bowl, mix flour, baking soda and salt; set aside. -2. In large bowl, beat softened butter and sugars with electric mixer on medium speed, or mix with spoon about 1 minute or until fluffy, scraping side of bowl occasionally. -3. Beat in egg and vanilla until smooth. Stir in flour mixture just until blended (dough will be stiff). Stir in chocolate chips and nuts. -4. Onto ungreased cookie sheets, drop dough by rounded tablespoonfuls 2 inches apart. -5. Bake 8 to 10 minutes or until light brown (centers will be soft). Cool 2 minutes; remove from cookie sheet to cooling rack. Cool completely, about 30 minutes. Store covered in airtight container. -::: - -## What is a Research Protocol? - -The research protocol is a document that outlines the study plan and includes: - -- Background information -- Rationale for the study -- Objective(s) of the study -- Study design -- Methodology used -- Statistical considerations - -It should be designed to provide a satisfactory answer to the research question. - -::: callout-note -The protocol in effect is the cookbook for conducting your study -::: - -## Why is a research protocol important? - -A research protocol is important because it: - -- It helps to ensure that the study is conducted safely and efficiently. -- It helps to ensure that the study is conducted ethically and with the highest standards of scientific rigor. -- The protocol serves as a binding document for the study, outlining what can and cannot be studied. -- It is typically developed with input from multiple experts in the field to ensure all aspects of the study are covered. - -## Institutional Review Boards (IRB) and Human Subjects [^2] - -[^2]: https://research.calpoly.edu/HS-guidelines#Guidelines_for_Protocol_Development - -::: columns -::: column -```{r} -#| fig-align: center -#| out-width: 60% -#| echo: false -knitr::include_graphics("https://www.explainxkcd.com/wiki/images/3/3c/snack.png") -``` -::: - -::: column -- The IRB ensures that research involving human subjects meets federal, state, and institutional regulations. -- The research protocol is the most critical document in your application with your IRB. -- It is the responsibility of the researcher to obtain informed consent from study participants and maintain confidentiality throughout the study. -::: -::: - -## Research Proposal vs Research Protocol - -| Research Proposal | Research Protocol | -|----------------------------------------|--------------------------------| -| A [research proposal](https://www.enago.com/academy/six-tips-to-writing-a-research-proposal/) is written to persuade the grant committee, university department, instructors, etc. | A research protocol is written to detail a study's execution plan to meet specified ethical norms for participating subjects. | -| Research proposals are submitted to funding bodies | Research protocols are submitted to Institutional Review Boards (IRBs) within universities and research centers. | - -## Research protocol components[^3] - -[^3]: https://www.aje.com/arc/how-to-write-an-easily-reproducible-protocol/ - -- Put the methodology in context -- Materials and tools -- A chronology of steps -- Notes, recipes, tips, and tricks - -```{r} -#| fig-align: center -#| out-width: 70% -#| echo: false -knitr::include_graphics("https://imgs.xkcd.com/comics/to_taste.png") -``` - -## Reproduciblility! - -Reproducibility in scientific research is important in order for other researchers to be able to replicate your study results. This includes: - -- A detailed Research Protocol -- Organized and clear documentation of the study - - Data storage - - Analyses - - Results - - Documents - -## [Final technical report project](https://earobinson95.github.io/stat365-calpoly/99-final-project/final-project-instructions.html) - -
    - -### `r fontawesome::fa("brain")` Brainstorm project topics! {style="text-align: center;"} - -## To do - -::: columns -::: column - - -`r fontawesome::fa("calendar")` **Mandela Age Survey** - -- Due Thursday, 4/6 at 12pm - -`r fontawesome::fa("brain")` **Initial Proposal** - -- Due Monday, 4/10 at 12pm - -`r fontawesome::fa("list")` **Formal Protocol** - -- Due Thursday, 4/13 at 11:59pm - -`r fontawesome::fa("user-group")` **Peer Review of Formal Protocol** - -- Opens on Canvas Friday, 4/14 at 8am -- Due Tuesday, 4/16 at 11:59pm -::: - -::: column -`r fontawesome::fa("book-open")` **Read** - -- CwD (ch 2) -- Numbers in the Newsroom (ch 1, *optional: ch 2*) -::: -::: diff --git a/2024/01-writing-about-data/mentimeter-qr.png b/2024/01-writing-about-data/mentimeter-qr.png new file mode 100644 index 0000000..a1cf901 Binary files /dev/null and b/2024/01-writing-about-data/mentimeter-qr.png differ diff --git a/2024/98-grade-boosters/.gitignore b/2024/98-grade-boosters/.gitignore index 357eb9c..41df124 100644 --- a/2024/98-grade-boosters/.gitignore +++ b/2024/98-grade-boosters/.gitignore @@ -1 +1,2 @@ comic-characters +dear-data-text.pdf diff --git a/2024/98-grade-boosters/dear-data.html b/2024/98-grade-boosters/dear-data.html index 9eb0c52..3adc534 100644 --- a/2024/98-grade-boosters/dear-data.html +++ b/2024/98-grade-boosters/dear-data.html @@ -3018,7 +3018,7 @@

    Dear Data

    In this booster condition, you will create a hand-drawn visualization about data from your own life. This assignment is inspired by Giorgia Lupi and Stefanie Posavec’s book, Dear Data, so you may want to look to their work for ideas.

    -

    In the selection of the text I’ve posted to Canvas (COMING SOON!), they suggest:

    +

    In the selection of the text I’ve posted to Canvas (Dr. Robinson has the book in her office if you want to stop by and look through it), they suggest:

    • see the world as a data collector
    • begin with a question
    • diff --git a/2024/98-grade-boosters/dear-data.qmd b/2024/98-grade-boosters/dear-data.qmd index 9a3d771..56d352c 100644 --- a/2024/98-grade-boosters/dear-data.qmd +++ b/2024/98-grade-boosters/dear-data.qmd @@ -17,7 +17,7 @@ execute: In this booster condition, you will create a hand-drawn visualization about data from your own life. This assignment is inspired by Giorgia Lupi and Stefanie Posavec’s book, Dear Data, so you may want to look to their work for ideas. -In the selection of the text I’ve posted to Canvas (COMING SOON!), they suggest: +In the selection of the text I’ve posted to Canvas *(Dr. Robinson has the book in her office if you want to stop by and look through it)*, they suggest: - see the world as a data collector - begin with a question diff --git a/2024/99-final-project/final-project-instructions-old.qmd b/2024/99-final-project/final-project-instructions-old.qmd new file mode 100644 index 0000000..c9fea7a --- /dev/null +++ b/2024/99-final-project/final-project-instructions-old.qmd @@ -0,0 +1,515 @@ +--- +title: "Group Report" +subtitle: "Stat 365: Statistical Communciation" +format: + html: + toc: true + number-sections: true + number-offset: 1 + self-contained: true + theme: + light: flatly + dark: darkly +editor: source +--- + +::: callout-note +You can choose to use whichever document editors (Word, Google Docs, Quarto) and statistical software programs (R, SAS, Python, JMP, Minitab) you are most comfortable using as long as they can appropriately carry out your analysis. However, you must submit all documents as .pdf file extensions so I can provide written feedback within Canvas via my iPad. + +If you have the background and skills, I do encourage you to use a scripting language (R, SAS, Python), and good graphing tools (ggplot2, Tableau, Datawrapper). I will expect more than the default graphics produced by JMP. +::: + +# Important Dates {.unnumbered} + +*Due dates may be subject to change, but only to your benefit* + ++----------------------------------------------+-------------------------------+ +| Component | Due Date | ++==============================================+===============================+ +| Group Formation | Friday, April 5 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Data Proposal (in groups) | Thursday, April 11 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| One number story (individually) | Thursday, April 25 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Data Narrative Visualization (individually) | Thursday, May 9 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Group Storyboard (in groups) | Thursday, May 23 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Draft Report (in groups) | Thursday, May 30 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Final Report (in groups) | Wednesday, June 12 at 11:59pm | ++----------------------------------------------+-------------------------------+ +| Collaboration Reflection | Wednesday, June 12 at 11:59pm | ++----------------------------------------------+-------------------------------+ + +# Reproducibe Workflow {.unnumbered} + +As a part of this project, you will demonstrate reproducible workflows and research. Following the guidelines in [Third Time's a Charm: A Tripartite Approach for Teaching Project Organization to Students](https://amstat.tandfonline.com/doi/epdf/10.1080/26939169.2022.2118644?needAccess=true&role=button), your root project folder should include: + +- `README.txt` file to orient someone to the electronic files or for processes that will be repeated throughout a study (e.g., specific data cleaning rules and scoring algorithm at multiple time points). Ideally the root project folder will be stored on a secure server and/or cloud location (such as Git repository or OneDrive) that meets all project regulatory needs with access limited to approved team members while allowing for version control. + +and the following sub-folders + +- `data` stores all data sets associated with the project (including original, analytic data sets, format files, etc.). The data folder should have a sub-folder where an original, raw, uneditable version of the data is archived and used for import into statistical software (similar to data and data_raw approach in R packages, Wickham, Bryan, and Barrett2022). Projects with many different data sources can have a separate sub-folder for each source + +- `documents` stores all of the written documents for the project. There may be sub-folders for references (statistical and/or domain), article or conference submissions, primary literature/scoring manuals for psychometric scales and other constructs, etc. Importantly, you must document decisions and revised analytic plans during the course of the project. + +- `results` stores all output from the scripts and any derived tables and figures. Spreadsheets, Word tables, RTF files, plots, figures, PDFs of output, all are stored in this folder. If statistical scripts directly produced it or it was created from results derived from statistical scripts, the files should go in this folder. + +- `scripts` stores all statistical programs/syntax/scripts/code (called "scripts" hereafter) used for the project (and statistical scripts should be used as much as possible when handling data!). Much of the documentation of our work is included in statistical scripts tailored to each individual project. Script file names should explicitly describe what step in the research process the script is for and what the script is intended to do, from reading in the original data to creating the analytic data set to summary statistics to multi-variable modeling. RMarkdownfiles / Quarto files (except for your technical report document(s) if using this document editor for your formal writing) should be stored here as well (Baumeret al 2014; Dvoraketal 2019; Allaireetal 2022). + +- Always use good programming practice, which includes: informative script headers, readable code, use of comments,and creation of separate scripts for distinct parts of the project. See CwD ch. 8 about documenting your code. + +- If you are using a non-scripted language (JMP, Minitab, etc.) please make sure to include a document which describes the steps you took in analyzing the data. + +In your final submission, you will turn in a .zip file of your project folder in order for me to evaluate your organization and workflow. + +# Study Proposal {.unnumbered} + + + + + + + + + + + + + + + +For your technical report assignment, you will be required to propose a research project that can be easily executed within 1-2 days. Your project should be: + +- an experiment with +- a quantitative response variable (other ideas for response variables are also welcome), +- and a categorical explanatory variable that compares two or more groups. + +You should aim to collect approximately 50 observations. + +To ensure you have a well-developed proposal, review [Cal Poly's Guidelines for Protocol Development](https://research.calpoly.edu/HS-guidelines#_Guidelines_for_Protocol) and this [article](https://www.aje.com/arc/how-to-write-an-easily-reproducible-protocol/) on how to write an easily reproducible protocol. + +::: callout-note +Some parts (e.g., Human subjects) may be less relevant to you and that's fine! I would focus less on criteria for approval, and more on providing enough details that someone else could carry out the study you have designed (4(a), (c), (d)). +::: + +::: {.callout-tip collapse="true"} +## Considerations for the research protocol + +- Put the methodology in context + - Research question and objectives +- Research Design + - The choice of the design should be explained in relation to the study objectives (treatments, response, observations, etc.) +- Materials and tools + - If you will be using subjects/participants, the following questions should be answered: -- What are the criteria for inclusion or selection? -- What are the criteria for exclusion? +- A chronology of steps + - Think like a detailed recipe. + - Provide information and justification about sample size. +- Notes, recipes, tips, and tricks +::: + +**Deliverables**: + +- Submit a brief **initial proposal** (research question, explanatory and response variables, and a very brief explanation of the data collection process -- sample size, materials, etc.) for feedback from myself by **Monday, 4/12 at 12pm** +- and a **formal study protocol** (as if to a Human Subjects Review board) by **Thursday, 4/15 at 11:59pm**. + +Your formal study protocol will be peer-reviewed by a fellow student who will (ideally) conduct a pilot study, gathering about 5 observations. If materials or time constraint, do not conduct the pilot study, but instead ask questions as if you were to conduct the pilot study. + +::: callout-note +Any written document you submit to me should be well written (grammar, spelling, complete sentences, etc.). +::: + +### Peer review formal study protocol {.unnumbered} + +For the technical report project, the peer review process will begin on **Friday, 4/14 at 8am**. You will be able to access the assigned protocol by clicking on a link under *"Assigned Peer Reviews"* on the right-hand side of the assignment. You will then fill out a rubric (*"Show Rubric"*) and add comments to provide constructive feedback to your peer. + ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| Criteria | Evidence | Weak Evidence | No Evidence | ++=======================================================================================================+==========+===============+=============+ +| **Details** | | | | +| | | | | +| How well did the protocol answer questions you had about collecting the data? | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| **Instructions** | | | | +| | | | | +| Were the instructions concise and easy to follow? | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| **Context** | | | | +| | | | | +| Did the protocol start with a description of the "context"/why the data were being collected? | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| **Definitions** | | | | +| | | | | +| Were all necessary definitions and descriptions (e.g., of equipment) clearly provided? | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| **Step-by-step** | | | | +| | | | | +| Were step-by-step instructions provided? | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ +| **Other advice** | | | | +| | | | | +| Please describe any other questions or advice you have for the project before data collection begins! | | | | ++-------------------------------------------------------------------------------------------------------+----------+---------------+-------------+ + +Please email me right away if you have any problems with this process. + +# Data Collection {.unnumbered} + +Collecting high-quality data is crucial for the success of your technical report project. After receiving peer-reviewed feedback, you should conduct your study and collect data meeting the specified sample size and following the protocol outlined in your study proposal. Keep in mind any suggestions or comments from the peer review process. + +Store your data in a tidy format in a `.csv` or `.xlsx` file, and save it within your `data` folder as your original data file in accordance with reproducibility guidelines. + +# Final Technical Report {.unnumbered} + +The final technical report is the ultimate goal of your research project. In this assignment, you will produce a scientific journal-style article, which will demonstrate your research findings and conclusions. You will be supported with guidelines and resources to facilitate the writing process. Throughout the quarter, you will receive feedback and guidance to ensure that you produce a high-quality report. + +I have outlined the different sections and components that are expected in the final technical report below. + +## Abstract / Executive Summary + +::: callout-warning +While the abstract is the first thing a reader sees, this will be the last piece we write. +::: + +The Abstract/Executive Summary is a brief, non-technical summary of your research project, and should be around 150-250 words in length. Its purpose is to provide an overview of your project and its significance to the reader. + +To create a compelling and accurate abstract, you should consider the following guidelines: + +- Write a stand-alone summary of the project that can be understood without reading the full report. +- Be clear and concise, avoiding technical language and jargon. +- Discuss the project's objectives, purpose, background, and why it is important. +- Describe the data and methods used in the project, including who, what, when, where, how, and the sample size. +- Highlight the key findings and results of the project. +- Conclude with recommendations or conclusions that relate to the project's objectives. +- Avoid introducing any new information that is not discussed in the main report. + +## Introduction + +The introduction section is where you will hook your reader and draw them into your research project. + +This section should: + +- Begin with an attention-grabbing opening statement to engage the reader. +- Provide background information on the topic and describe any existing theories, research or literature that are relevant to the study. +- State the research question and explain how the study aims to answer it. +- Highlight the significance of the study by identifying the potential benefits and contributions to the field +- Provide an overview of the structure of the report, outlining the major sections and their content (tell the reader what you are going to tell them). + +## Data and Methods + +In the Data and Methods section of your technical report, you will describe the design of your study and the methods used to collect and analyze the data. + +Here are some key components to include: + +- A concise overview of your research question and hypothesis +- Details on the sample size and selection process, including any inclusion/exclusion criteria +- A description of the data collection methods used, including measurement tools and techniques +- A description of the variables used and their definitions. +- An explanation of any data manipulations made before analysis, including any constructed variables. +- An explanation of how the data were analyzed, including any statistical tests used to determine significance +- A discussion of any potential flaws or limitations in the study design, including any data that was excluded or removed +- (Optional) The use of tables or diagrams to help illustrate your experimental design. + +Remember to keep supporting or background data not critical to the flow of the main report in appendices and to reference data from other sources so readers can locate it. + +::: {.callout-tip collapse="true"} +### Tip: Remember to focus on the When, Where, How, Who, What: + +- When and where did the study take place? + - Was there randomness or more of a convenience sample? +- Who are the subjects under study? ("subjects" don't have to be people) + - Any inclusion/exclusion criteria? +- What procedures were used to select subjects and collect measurements? +- Exactly how were the outcomes measured, describe any measurement devices, units of measure +- Describe the treatments + - Include copies of any surveys/questions + - Include photographic evidence? +- Describe the randomization +- What are the outcomes and covariates? +- What are the potential flaws/limitations? +- Were any observations removed? (If so, why?) +::: + +::: callout-note +Remember to be thorough yet concise! +::: + +### Table of Summary Statistics {.unnumbered} + +Your Data and Methods section should include a descriptive statistics table to summarize your data. For quantitative response variables, this will typically involve comparing means, medians, and other summary statistics such as standard deviations and five number summaries. For categorical response variables, you will compare proportions, being cautious to interpret proportions and percentages appropriately, especially differences. To do this effectively, I recommend creating a table that presents your results in a clear and concise format. + +Here are some key considerations to keep in mind: + +- Use headings and captions to clearly label the table and help the reader understand the content. +- Keep the table simple and easy to read, avoiding unnecessary detail or clutter. +- Be sure to provide appropriate units of measure and any relevant notes or explanations. +- Consider highlighting key results or differences to draw the reader's attention. + +Review the lecture slides and podcasts from the *Chicago Guide to Writing About Numbers* (Chapters 6 and 7) for additional guidance and *Show Me the Numbers* by Stephen Few as a supplemental resource + +## Results and Discussion + +The Results and Discussion section of your technical report is where you will present your findings and explain what they mean in the context of your research question and hypothesis. Keep in mind that you should assume a reasonably educated audience, but avoid technical jargon and use formal language in the active voice ("by Zombies" test). This section should engage the reader's interest and be succinct, so it's important to focus on the flow and readability of your report. + +While separating the results and discussion sections is a common practice, you can choose to integrate them together. It's also possible to separate the exploration data analysis from the inferential analysis, but make sure not to be too repetitive. In this section, you should provide a clear and concise overview of your findings and explain their significance in the context of the research question. Make sure to refer back to your hypothesis and discuss whether your findings support or refute it. Finally, be sure to highlight any limitations or potential sources of error in your study. + +### Results + +The results section is where you present your findings and interpretation of the data you have collected. This section should be well-organized and easy to follow, with clear graphs and tables that effectively illustrate your analysis. + +Here are some key components of the results section: + +- Begin with an introduction that provides some context to your output. Then, provide an analysis of your data and mention which package(s) you used. Avoid including every data analysis result, but be sure to make all methods clear. +- Include high-quality graphs and tables to effectively summarize your results. +- Interpret your findings using GEE or ADEPT strategies. Summarize your results both technically and in a way that a non-statistician can understand. +- Discuss what you observe and summarize your findings, including any overall patterns and any exceptions, as well as the strengths and limitations of your data collection and analysis methods. +- Provide a graph and summary statistics of your response variable across groups. Use a histogram or dot plot for quantitative data (means and SDs), and a bar graph for categorical data (conditional proportions of successes). Create effective, high-quality visuals with value ordering, color use, and correct units of measurement (not too many significant digits). +- Test for statistical significance by comparing your groups and provide confidence intervals. Ensure that your analysis matches your graphs (e.g., compared two groups on a quantitative response, look at a two-sample t-test). Avoid shocking the reader with surprising analysis results based on what you pointed out in the graphs. + +Summarize your statistical significance and the size of the "effect," focusing mainly on the facts. The discussion section will have more interpretation. + +### Discussion + +The discussion section is where you interpret your findings and summarize what you learned from the analysis about your overall research question. In this section, you can also discuss the strengths and limitations of your study and provide directions for future research. + +Here are the key components of the discussion section: + +- Interpret your findings and summarize what you learned from the analysis about your overall research question. + - Did the data behave as you expected? + - Is the result statistically significant? How large is the effect? Would you consider it practically significant? How are you deciding? (Do you need to bring in any subject-matter knowledge here?) + - Use examples or analogies to help clarify your points and make your discussion more accessible to a broader audience. +- Strengths (don't restate but interpret) of data collection and analysis methods + - Can you draw cause-and-effect conclusions? + - To what population are you willing to generalize? + - How does your study contribute to the existing knowledge base and the larger context? +- Critically assess any limitations or potential biases and how they impacted the interpretation of your findings. + - Note any deficiencies or unexplained data. + - Any issues with the analysis methods used? + - Any other potential sources of error or biases? +- Suggest directions for future research and identify areas that require further investigation. + +## Conclusion + +The conclusion section is the final chance to leave a lasting impression on your readers and drive home the significance of your research. Here are some tips for crafting a strong conclusion: + +- Recap the main points of your study, including any important findings or trends (tell them what you told them) +- Discuss the scope of your conclusions, and **justify your reasoning**. Can you generalize your results to a larger population? Can you infer causality? Explain why or why not. +- Consider the practical significance of your results, and explain how you are measuring this. Are the results meaningful in a real-world context? +- Return to the big picture, and address the research question. Have you answered it? Can you make any recommendations based on your findings? +- Finally, offer suggestions for future research that could build on your study and address any lingering questions or uncertainties. + +## References + +The reference section is an essential part of your academic work and should be included following APA citation style. It should contain a list of all the sources you have used, including textbooks, research papers, and statistical software or packages. By including a reference section, you provide your readers with the opportunity to access and verify the information you have used. + +## Appendix + +An appendix is a supplementary section that provides additional information to support your research. + +Your appendix should include: + +- The appendix may include the original research protocol. +- Additional relevant documentation that provides further insight into your research methodology and analysis. +- A raw data file, which contains the original data collected during your research. + +# Final Submission {.unnumbered} + +Your submission should include + +1. Final report (see draft rubric below) as .pdf file +2. The .zip folder of your project folder demonstrating your reproducible workflow + - Documents sub folder contains a version of your report showing track changes in individual pieces -- clearly labeled + - Documents sub folder contains a brief discussion of changes made to original pieces of report along the way -- clearly labeled + +**Formatting:** Your final report should use + +- 12 point font +- 1 inch margins +- Reasonable font choice +- Double spaced pdf file +- If you have references, use APA citations + +**Contents:** Your final report should have the sections and related contents as described above. + +**Revisions:** You should also be submitting your discussion of the changes you made and any annotated previous versions within the document subfolder of the .zip file + +# Editing Checklist {.unnumbered} + +- Title page lists the title, authors, affiliation, date. +- Active voice ("by Zombies" test); professional tone; no personal opinions +- Concise (vs. use of unnecessary words) +- Gender-neutral wording +- Acronyms and Abbreviations defined the first time used +- Subject/verb agreement +- Correct spelling (don't rely only on spell checker) +- Correct use of punctuation and grammar +- Figures and Tables numbered and in correct location (include captions, figure alt. text, and in text references to these additional aids). +- Supporting documentation in appendices +- Figures, tables, and appendices referred to accurately. +- Bulleted and numbered lists have parallel construction and consistent punctuation. +- Use brief, descriptive (left-justified, bold, title capitalization) headings to help readers navigate easily through the document. Heading levels follow sequentially. If you create one subhead, you must have at least two. For example, don't create heading 1.1.1 without a heading 1.1.2. If information for only one subhead exists, it should all appear under the main heading, 1.1. +- Follows basic rules for + - Commas + - Colons + - Semicolons + - Hyphens + - Acronyms + - Numbers (writing the word vs. the numeral) + - Equations (using symbols) + - Units of measure + +# Final Report Rubric {.unnumbered} + +To meet the requirements for the contract, this project must: + +- be turned in on time, + +- include all components described above + +- Meet quality guidelines laid out in the following rubric. In order to meet "satisfactory" for your contracted grade: + + - A must receive all 3's (or above) on the main components, and demonstration of all additional writing/project components + + - A- must receive all 3s (or above) on the main components with at most one 2, and demonstration of all additional writing/project components. + + - B+ must receive all 3s (or above) on the main components with at most three 2s, and demonstration of all additional writing/project components. + + - B must receive all 2s (or above), and demonstration of all additional writing/project components. + + - B- must receive all 2s (or above) with a most one 1, and demonstration of all additional writing/project components. + + - C+ must receive all 2s (or above) with a most three 1s, and missing demonstration for at most 4 additional writing/project components. + + - C must receive all 1s (or above), and missing demonstration for at most 4 additional writing/project components. + + - C- must receive all 1s (or above) with at most one 0, and missing demonstration for at most 4 additional writing/project components. + + - D+ is the *maximum* grade you might obtain from no final submission. In this case grade evaluation will be determined by your previously submitted drafts and other course work. + +This means that if you are aiming for an A, complete three booster activities, miss no more than 3 assignments, meet "satisfactory" on your mini-projects, but receive all 2s on your final technical report, you will get a B in the course. Similarly, if you complete one booster activity, miss no more than 3 assignments, meet "satisfactory" on your mini-projects, and receive all 3's on your final technical report, you will get a B+ in the course. + +Any deviation to these guidelines will be to your benefit. + +
      + +*The table below outlines the main components of your technical report:* + +::: column-page ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| Main Component | 4 - above and beyond evidence | 3 - strong evidence | 2 - moderate evidence | 1 - weak evidence | 0 - no evidence | +| | | | | | | +| | | (a 3 is considered full credit) | | | | ++==================================================================================================+===============================+=================================+=======================+===================+=================+ +| **Abstract/Executive summary *(\~120 words, limit 250 words)*** | | | | | | +| | | | | | | +| Plain language, Overview, Engaging | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| **Introduction** | | | | | | +| | | | | | | +| Clarify objectives / research question, but not too much detail | | | | | | +| | | | | | | +| Tell me the structure of the paper | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| **Data and Methods** | | | | | | +| | | | | | | +| Ws | | | | | | +| | | | | | | +| Study design details | | | | | | +| | | | | | | +| Study design issues (e.g., missing data) | | | | | | +| | | | | | | +| Analytic sample, representativeness (inclusion/exclusion criteria) | | | | | | +| | | | | | | +| Variables/Units/Getting to know your data | | | | | | +| | | | | | | +| Outliers | | | | | | +| | | | | | | +| Name of statistical methods (and reference) | | | | | | +| | | | | | | +| Critique of statistical methods/validity | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| **Results** | | | | | | +| | | | | | | +| Include graphical summaries of your data and statistical analyses | | | | | | +| | | | | | | +| Quality/Effectiveness of visuals/tables | | | | | | +| | | | | | | +| e.g., units of measurement, not too many significant digits, value ordering, use of color | | | | | | +| | | | | | | +| Titles/Axis labels/Annotations/Legends/Captions/Alt Text/Scaling | | | | | | +| | | | | | | +| Figures and Tables in line with text | | | | | | +| | | | | | | +| Introductory sentences of tables, charts, comparisons (refer to them as Figure 1, Table 1, etc.) | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| **Discussion** | | | | | | +| | | | | | | +| Summaries of major findings | | | | | | +| | | | | | | +| Effective comparisons | | | | | | +| | | | | | | +| Direction, magnitude, significance | | | | | | +| | | | | | | +| Generalizations, Examples, and Exceptions | | | | | | +| | | | | | | +| Interpretation of numeric evidence | | | | | | +| | | | | | | +| Connections to research questions | | | | | | +| | | | | | | +| Reflection on strengths, limitations | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +| **Conclusion** | | | | | | +| | | | | | | +| *Briefly* restate the RQ and what you did/found. | | | | | | +| | | | | | | +| Scope of conclusions | | | | | | +| | | | | | | +| Substantive significance | | | | | | +| | | | | | | +| Recommend appropriate action?/Directions for future research | | | | | | ++--------------------------------------------------------------------------------------------------+-------------------------------+---------------------------------+-----------------------+-------------------+-----------------+ +::: + +
      + +*In addition to the main components of the technical report, you must demonstrate competency (moderate or strong evidence) of the following written and project parts:* + +::: column-page ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| Writing/Project Component | Moderate or Strong Evidence | Weak or no Evidence | ++========================================================================+=============================+=====================+ +| **Reproducibility** | | | +| | | | +| .zip folder containing: README, data, documents, results, and scripts | | | +| | | | +| Good programming practices and code/analysis documentation | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Revisions** | | | +| | | | +| Copy or original drafts with track changes | | | +| | | | +| Discussion of edits made along the way | | | +| | | | +| *Should easily be found in the `documents` subfolder of the .zip file* | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Title page** | | | +| | | | +| Title, Author, Course, University Affiliation, Date | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Overall Clarity** | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Appearance** | | | +| | | | +| e.g. section headings, page breaks, details, figure/table numbers | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Overall cohesion/flow of story** | | | +| | | | +| e.g., Transition sentences | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Grammar/Spelling/Appropriateness of vocabulary/Punctuation** | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +| **Correct use of statistical language** | | | ++------------------------------------------------------------------------+-----------------------------+---------------------+ +:::