asciidoctor-revealjs 4.1.0 → 5.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +11 -1350
  3. data/asciidoctor-revealjs.gemspec +0 -2
  4. data/examples/auto-animate-code.adoc +47 -0
  5. data/examples/auto-animate.adoc +351 -0
  6. data/examples/favicon.adoc +13 -0
  7. data/examples/mathjax-cdn.adoc +1 -1
  8. data/examples/mathjax.adoc +1 -1
  9. data/examples/revealjs-custom-theme.adoc +1 -1
  10. data/examples/revealjs-plugin-activation.adoc +3 -2
  11. data/examples/revealjs-plugins/chalkboard/README.md +94 -61
  12. data/examples/revealjs-plugins/chalkboard/img/boardmarker-black.png +0 -0
  13. data/examples/revealjs-plugins/chalkboard/img/boardmarker-blue.png +0 -0
  14. data/examples/revealjs-plugins/chalkboard/img/boardmarker-green.png +0 -0
  15. data/examples/revealjs-plugins/chalkboard/img/boardmarker-orange.png +0 -0
  16. data/examples/revealjs-plugins/chalkboard/img/boardmarker-purple.png +0 -0
  17. data/examples/revealjs-plugins/chalkboard/img/boardmarker-red.png +0 -0
  18. data/examples/revealjs-plugins/chalkboard/img/boardmarker-yellow.png +0 -0
  19. data/examples/revealjs-plugins/chalkboard/img/chalk-blue.png +0 -0
  20. data/examples/revealjs-plugins/chalkboard/img/chalk-green.png +0 -0
  21. data/examples/revealjs-plugins/chalkboard/img/chalk-orange.png +0 -0
  22. data/examples/revealjs-plugins/chalkboard/img/chalk-purple.png +0 -0
  23. data/examples/revealjs-plugins/chalkboard/img/chalk-red.png +0 -0
  24. data/examples/revealjs-plugins/chalkboard/img/{chalk.png → chalk-white.png} +0 -0
  25. data/examples/revealjs-plugins/chalkboard/img/chalk-yellow.png +0 -0
  26. data/examples/revealjs-plugins/chalkboard/plugin.js +1836 -0
  27. data/examples/revealjs-plugins/chalkboard/style.css +38 -0
  28. data/examples/revealjs-plugins/{reveal.js-menu → menu}/LICENSE +1 -1
  29. data/examples/revealjs-plugins/menu/README.md +368 -0
  30. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/LICENSE.txt +0 -0
  31. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/all.css +0 -0
  32. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/brands.css +0 -0
  33. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/fontawesome.css +0 -0
  34. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/regular.css +0 -0
  35. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/solid.css +0 -0
  36. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/svg-with-js.css +0 -0
  37. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.css +0 -0
  38. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.min.css +0 -0
  39. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.eot +0 -0
  40. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.svg +0 -0
  41. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  42. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff +0 -0
  43. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  44. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.eot +0 -0
  45. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.svg +0 -0
  46. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  47. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff +0 -0
  48. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  49. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.eot +0 -0
  50. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.svg +0 -0
  51. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  52. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff +0 -0
  53. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
  54. data/examples/revealjs-plugins/{reveal.js-menu → menu}/menu.css +116 -115
  55. data/examples/revealjs-plugins/menu/menu.esm.js +1 -0
  56. data/examples/revealjs-plugins/menu/menu.js +1 -0
  57. data/examples/revealjs-plugins/menu/plugin.js +1252 -0
  58. data/examples/revealjs-plugins-docinfo-footer.html +20 -0
  59. data/examples/revealjs-plugins.adoc +2 -3
  60. data/examples/search-plugin.adoc +26 -0
  61. data/examples/source-rouge.adoc +1 -1
  62. data/examples/text-formatting.adoc +34 -0
  63. data/lib/asciidoctor-revealjs/converter.rb +1029 -966
  64. data/lib/asciidoctor-revealjs/highlightjs.rb +155 -14
  65. data/lib/asciidoctor-revealjs/version.rb +1 -1
  66. data/templates/asciidoctor-compatibility.css +26 -1
  67. data/templates/document.html.slim +28 -44
  68. data/templates/helpers.rb +83 -9
  69. data/templates/inline_quoted.html.slim +2 -2
  70. data/templates/listing.html.slim +2 -1
  71. data/templates/section.html.slim +7 -1
  72. data/templates/title_slide.html.slim +1 -2
  73. metadata +57 -69
  74. data/examples/revealjs-plugins/chalkboard/chalkboard.js +0 -1288
  75. data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
  76. data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +0 -9
  77. data/examples/revealjs-plugins/reveal.js-menu/README.md +0 -334
  78. data/examples/revealjs-plugins/reveal.js-menu/bower.json +0 -21
  79. data/examples/revealjs-plugins/reveal.js-menu/menu.js +0 -949
  80. data/examples/revealjs-plugins/reveal.js-menu/package.json +0 -22
  81. data/examples/revealjs-plugins-conf.js +0 -10
  82. data/examples/revealjs-plugins.js +0 -2
@@ -1,34 +1,34 @@
1
1
  .slide-menu-wrapper {
2
- font-family: "Source Sans Pro", Helvetica, sans-serif;
2
+ font-family: 'Source Sans Pro', Helvetica, sans-serif;
3
3
  }
4
4
 
5
5
  .slide-menu-wrapper .slide-menu {
6
- background-color: #333;
7
- z-index: 200;
8
- position: fixed;
9
- top: 0;
10
- width: 300px;
11
- height: 100%;
12
- /*overflow-y: scroll;*/
13
- transition: transform 0.3s;
14
- font-size: 16px;
15
- font-weight: normal;
6
+ background-color: #333;
7
+ z-index: 200;
8
+ position: fixed;
9
+ top: 0;
10
+ width: 300px;
11
+ height: 100%;
12
+ /*overflow-y: scroll;*/
13
+ transition: transform 0.3s;
14
+ font-size: 16px;
15
+ font-weight: normal;
16
16
  }
17
17
 
18
18
  .slide-menu-wrapper .slide-menu.slide-menu--wide {
19
- width: 500px;
19
+ width: 500px;
20
20
  }
21
21
 
22
22
  .slide-menu-wrapper .slide-menu.slide-menu--third {
23
- width: 33%;
23
+ width: 33%;
24
24
  }
25
25
 
26
26
  .slide-menu-wrapper .slide-menu.slide-menu--half {
27
- width: 50%;
27
+ width: 50%;
28
28
  }
29
29
 
30
30
  .slide-menu-wrapper .slide-menu.slide-menu--full {
31
- width: 95%;
31
+ width: 95%;
32
32
  }
33
33
 
34
34
  /*
@@ -36,23 +36,23 @@
36
36
  */
37
37
 
38
38
  .slide-menu-wrapper .slide-menu-items {
39
- margin: 0;
40
- padding: 0;
41
- width: 100%;
42
- border-bottom: solid 1px #555;
39
+ margin: 0;
40
+ padding: 0;
41
+ width: 100%;
42
+ border-bottom: solid 1px #555;
43
43
  }
44
44
 
45
- .slide-menu-wrapper .slide-menu-item,
45
+ .slide-menu-wrapper .slide-menu-item,
46
46
  .slide-menu-wrapper .slide-menu-item-vertical {
47
- display: block;
48
- text-align: left;
49
- padding: 10px 18px;
50
- color: #aaa;
51
- cursor: pointer;
47
+ display: block;
48
+ text-align: left;
49
+ padding: 10px 18px;
50
+ color: #aaa;
51
+ cursor: pointer;
52
52
  }
53
53
 
54
54
  .slide-menu-wrapper .slide-menu-item-vertical {
55
- padding-left: 30px;
55
+ padding-left: 30px;
56
56
  }
57
57
 
58
58
  .slide-menu-wrapper .slide-menu--wide .slide-menu-item-vertical,
@@ -60,7 +60,7 @@
60
60
  .slide-menu-wrapper .slide-menu--half .slide-menu-item-vertical,
61
61
  .slide-menu-wrapper .slide-menu--full .slide-menu-item-vertical,
62
62
  .slide-menu-wrapper .slide-menu--custom .slide-menu-item-vertical {
63
- padding-left: 50px;
63
+ padding-left: 50px;
64
64
  }
65
65
 
66
66
  .slide-menu-wrapper .slide-menu-item {
@@ -68,22 +68,22 @@
68
68
  }
69
69
 
70
70
  .slide-menu-wrapper .active-menu-panel li.selected {
71
- background-color: #222;
72
- color: white;
71
+ background-color: #222;
72
+ color: white;
73
73
  }
74
74
 
75
75
  .slide-menu-wrapper .active-menu-panel li.active {
76
- color: #eee;
76
+ color: #eee;
77
77
  }
78
78
 
79
- .slide-menu-wrapper .slide-menu-item.no-title .slide-menu-item-title,
79
+ .slide-menu-wrapper .slide-menu-item.no-title .slide-menu-item-title,
80
80
  .slide-menu-wrapper .slide-menu-item-vertical.no-title .slide-menu-item-title {
81
- font-style: italic;
81
+ font-style: italic;
82
82
  }
83
83
 
84
84
  .slide-menu-wrapper .slide-menu-item-number {
85
- color: #999;
86
- padding-right:6px;
85
+ color: #999;
86
+ padding-right: 6px;
87
87
  }
88
88
 
89
89
  .slide-menu-wrapper .slide-menu-item i.far,
@@ -92,8 +92,8 @@
92
92
  .slide-menu-wrapper .slide-menu-item-vertical i.fas,
93
93
  .slide-menu-wrapper .slide-menu-item svg.svg-inline--fa,
94
94
  .slide-menu-wrapper .slide-menu-item-vertical svg.svg-inline--fa {
95
- padding-right: 12px;
96
- display: none;
95
+ padding-right: 12px;
96
+ display: none;
97
97
  }
98
98
 
99
99
  .slide-menu-wrapper .slide-menu-item.past i.fas.past,
@@ -108,7 +108,7 @@
108
108
  .slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active,
109
109
  .slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future,
110
110
  .slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future {
111
- display: inline-block;
111
+ display: inline-block;
112
112
  }
113
113
 
114
114
  .slide-menu-wrapper .slide-menu-item.past i.fas.past,
@@ -119,14 +119,14 @@
119
119
  .slide-menu-wrapper .slide-menu-item-vertical.past svg.svg-inline--fa.past,
120
120
  .slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future,
121
121
  .slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future {
122
- opacity: 0.4;
122
+ opacity: 0.4;
123
123
  }
124
124
 
125
125
  .slide-menu-wrapper .slide-menu-item.active i.fas.active,
126
126
  .slide-menu-wrapper .slide-menu-item-vertical.active i.fas.active,
127
127
  .slide-menu-wrapper .slide-menu-item.active svg.svg-inline--fa.active,
128
128
  .slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active {
129
- opacity: 0.8;
129
+ opacity: 0.8;
130
130
  }
131
131
 
132
132
  .slide-menu-wrapper .slide-menu--left {
@@ -156,73 +156,76 @@
156
156
  }
157
157
 
158
158
  .slide-menu-wrapper {
159
- transition: transform 0.3s;
159
+ transition: transform 0.3s;
160
160
  }
161
161
 
162
-
163
162
  /*
164
163
  * Toolbar
165
164
  */
166
165
  .slide-menu-wrapper .slide-menu-toolbar {
167
- height: 60px;
168
- width: 100%;
169
- font-size: 12px;
170
- display: table;
171
- table-layout: fixed; /* ensures equal width */
172
- margin: 0;
173
- padding: 0;
174
- border-bottom: solid 2px #666;
166
+ height: 60px;
167
+ width: 100%;
168
+ font-size: 12px;
169
+ display: table;
170
+ table-layout: fixed; /* ensures equal width */
171
+ margin: 0;
172
+ padding: 0;
173
+ border-bottom: solid 2px #666;
175
174
  }
176
175
 
177
176
  .slide-menu-wrapper .slide-menu-toolbar > li {
178
- display: table-cell;
179
- line-height: 150%;
180
- text-align: center;
181
- vertical-align: middle;
182
- cursor: pointer;
183
- color: #aaa;
184
- border-radius: 3px;
185
- padding-top: 16px;
177
+ display: table-cell;
178
+ line-height: 150%;
179
+ text-align: center;
180
+ vertical-align: middle;
181
+ cursor: pointer;
182
+ color: #aaa;
183
+ border-radius: 3px;
186
184
  }
187
185
 
188
186
  .slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button i,
189
- .slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button svg.svg-inline--fa {
190
- font-size: 1.7em;
191
- }
192
-
193
- .slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button span.slide-menu-toolbar-label {
194
- visibility: hidden;
187
+ .slide-menu-wrapper
188
+ .slide-menu-toolbar
189
+ > li.toolbar-panel-button
190
+ svg.svg-inline--fa {
191
+ font-size: 1.7em;
195
192
  }
196
193
 
197
194
  .slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button {
198
- color: white;
199
- text-shadow: 0 1px black;
195
+ color: white;
196
+ text-shadow: 0 1px black;
197
+ text-decoration: underline;
200
198
  }
201
199
 
202
200
  .slide-menu-toolbar > li.toolbar-panel-button:hover {
203
- color: white;
201
+ color: white;
204
202
  }
205
203
 
206
- .slide-menu-toolbar > li.toolbar-panel-button:hover span.slide-menu-toolbar-label,
207
- .slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button span.slide-menu-toolbar-label {
208
- visibility: visible;
204
+ .slide-menu-toolbar
205
+ > li.toolbar-panel-button:hover
206
+ span.slide-menu-toolbar-label,
207
+ .slide-menu-wrapper
208
+ .slide-menu-toolbar
209
+ > li.active-toolbar-button
210
+ span.slide-menu-toolbar-label {
211
+ visibility: visible;
209
212
  }
210
213
 
211
214
  /*
212
215
  * Panels
213
216
  */
214
217
  .slide-menu-wrapper .slide-menu-panel {
215
- position: absolute;
216
- width: 100%;
217
- visibility: hidden;
218
- height: calc(100% - 60px);
219
- overflow-x: hidden;
220
- overflow-y: auto;
221
- color: #AAA;
218
+ position: absolute;
219
+ width: 100%;
220
+ visibility: hidden;
221
+ height: calc(100% - 60px);
222
+ overflow-x: hidden;
223
+ overflow-y: auto;
224
+ color: #aaa;
222
225
  }
223
226
 
224
227
  .slide-menu-wrapper .slide-menu-panel.active-menu-panel {
225
- visibility: visible;
228
+ visibility: visible;
226
229
  }
227
230
 
228
231
  .slide-menu-wrapper .slide-menu-panel h1,
@@ -231,83 +234,82 @@
231
234
  .slide-menu-wrapper .slide-menu-panel h4,
232
235
  .slide-menu-wrapper .slide-menu-panel h5,
233
236
  .slide-menu-wrapper .slide-menu-panel h6 {
234
- margin: 20px 0 10px 0;
235
- color: #FFF;
236
- line-height: 1.2;
237
- letter-spacing: normal;
238
- text-shadow: none;
237
+ margin: 20px 0 10px 0;
238
+ color: #fff;
239
+ line-height: 1.2;
240
+ letter-spacing: normal;
241
+ text-shadow: none;
239
242
  }
240
243
 
241
244
  .slide-menu-wrapper .slide-menu-panel h1 {
242
- font-size: 1.6em;
245
+ font-size: 1.6em;
243
246
  }
244
247
  .slide-menu-wrapper .slide-menu-panel h2 {
245
- font-size: 1.4em;
248
+ font-size: 1.4em;
246
249
  }
247
250
  .slide-menu-wrapper .slide-menu-panel h3 {
248
- font-size: 1.3em;
251
+ font-size: 1.3em;
249
252
  }
250
253
  .slide-menu-wrapper .slide-menu-panel h4 {
251
- font-size: 1.1em;
254
+ font-size: 1.1em;
252
255
  }
253
256
  .slide-menu-wrapper .slide-menu-panel h5 {
254
- font-size: 1em;
257
+ font-size: 1em;
255
258
  }
256
259
  .slide-menu-wrapper .slide-menu-panel h6 {
257
- font-size: 0.9em;
260
+ font-size: 0.9em;
258
261
  }
259
262
 
260
263
  .slide-menu-wrapper .slide-menu-panel p {
261
- margin: 10px 0 5px 0;
264
+ margin: 10px 0 5px 0;
262
265
  }
263
266
 
264
267
  .slide-menu-wrapper .slide-menu-panel a {
265
- color: #CCC;
266
- text-decoration: underline;
268
+ color: #ccc;
269
+ text-decoration: underline;
267
270
  }
268
271
 
269
272
  .slide-menu-wrapper .slide-menu-panel a:hover {
270
- color: white;
273
+ color: white;
271
274
  }
272
275
 
273
276
  .slide-menu-wrapper .slide-menu-item a {
274
- text-decoration: none;
277
+ text-decoration: none;
275
278
  }
276
279
 
277
280
  .slide-menu-wrapper .slide-menu-custom-panel {
278
- width: calc(100% - 20px);
279
- padding-left: 10px;
280
- padding-right: 10px;
281
+ width: calc(100% - 20px);
282
+ padding-left: 10px;
283
+ padding-right: 10px;
281
284
  }
282
285
 
283
286
  .slide-menu-wrapper .slide-menu-custom-panel .slide-menu-items {
284
- width: calc(100% + 20px);
285
- margin-left: -10px;
286
- margin-right: 10px;
287
+ width: calc(100% + 20px);
288
+ margin-left: -10px;
289
+ margin-right: 10px;
287
290
  }
288
291
 
289
-
290
292
  /*
291
293
  * Theme and Transitions buttons
292
294
  */
293
295
 
294
- .slide-menu-wrapper div[data-panel="Themes"] li,
295
- .slide-menu-wrapper div[data-panel="Transitions"] li {
296
- display: block;
297
- text-align: left;
298
- cursor: pointer;
299
- color: #848484;
296
+ .slide-menu-wrapper div[data-panel='Themes'] li,
297
+ .slide-menu-wrapper div[data-panel='Transitions'] li {
298
+ display: block;
299
+ text-align: left;
300
+ cursor: pointer;
301
+ color: #848484;
300
302
  }
301
303
 
302
304
  /*
303
305
  * Menu controls
304
306
  */
305
307
  .reveal .slide-menu-button {
306
- position: fixed;
307
- left: 30px;
308
- bottom: 30px;
309
- z-index: 30;
310
- font-size: 24px;
308
+ position: fixed;
309
+ left: 30px;
310
+ bottom: 30px;
311
+ z-index: 30;
312
+ font-size: 24px;
311
313
  }
312
314
 
313
315
  /*
@@ -339,7 +341,6 @@
339
341
  */
340
342
  body.print-pdf .slide-menu-wrapper .slide-menu,
341
343
  body.print-pdf .reveal .slide-menu-button,
342
- body.print-pdf .slide-menu-wrapper .slide-menu-overlay
343
- {
344
- display: none;
345
- }
344
+ body.print-pdf .slide-menu-wrapper .slide-menu-overlay {
345
+ display: none;
346
+ }
@@ -0,0 +1 @@
1
+ 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},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),r=function(e){try{return!!e()}catch(e){return!0}},a=!r((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=r((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,i;if(t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!v(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},S=i.document,E=v(S)&&v(S.createElement),x=!a&&!r((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(i,e,t)}catch(n){i[e]=t}return t},I=i["__core-js_shared__"]||k("__core-js_shared__",{}),P=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(e){return P.call(e)});var M,N,R,j,_=I.inspectSource,F=i.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)"})})),$=0,D=Math.random(),B=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++$+D).toString(36)},q=H("keys"),U={},G=i.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},N=function(e){return K.call(V,e)||{}},R=function(e){return z.call(V,e)}}else{var Y=q[j="state"]||(q[j]=B(j));U[Y]=!0,M=function(e,t){return A(e,Y,t),t},N=function(e){return b(e,Y)?e[Y]:{}},R=function(e){return b(e,Y)}}var J={set:M,get:N,has:R,enforce:function(e){return R(e)?N(e):M(e,{})},getterFor:function(e){return function(t){var n;if(!v(t)||(n=N(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Z=t((function(e){var t=J.get,n=J.enforce,r=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=r.join("string"==typeof t?t:"")),e!==i?(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=i,ee=function(e){return"function"==typeof e?e:void 0},te=function(e,t){return arguments.length<2?ee(Q[e])||ee(i[e]):Q[e]&&Q[e][t]||i[e]&&i[e][t]},ne=Math.ceil,ie=Math.floor,re=function(e){return isNaN(e=+e)?0:(e>0?ie:ne)(e)},ae=Math.min,oe=function(e){return e>0?ae(re(e),9007199254740991):0},se=Math.max,le=Math.min,ce=function(e,t){var n=re(e);return n<0?se(n+t,0):le(n,t)},ue=function(e){return function(t,n,i){var r,a=m(t),o=oe(a.length),s=ce(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)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,i=m(e),r=0,a=[];for(n in i)!b(U,n)&&b(i,n)&&a.push(n);for(;t.length>r;)b(i,n=t[r++])&&(~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),i=O.f,r=L.f,a=0;a<n.length;a++){var o=n[a];b(e,o)||i(e,o,r(t,o))}},ye=/#|\.prototype\./,be=function(e,t){var n=Ee[Se(e)];return n==we||n!=xe&&("function"==typeof t?r(t):!!t)},Se=be.normalize=function(e){return String(e).replace(ye,".").toLowerCase()},Ee=be.data={},xe=be.NATIVE="N",we=be.POLYFILL="P",Le=be,Te=L.f,Ce=function(e,t){var n,r,a,o,s,l=e.target,c=e.global,u=e.stat;if(n=c?i:u?i[l]||k(l,{}):(i[l]||{}).prototype)for(r in t){if(o=t[r],a=e.noTargetGet?(s=Te(n,r))&&s.value:n[r],!Le(c?r:l+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof o==typeof a)continue;ge(o,a)}(e.sham||a&&a.sham)&&A(o,"sham",!0),Z(n,r,o,e)}},Oe=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Ae=function(e){return Object(h(e))},ke=Array.isArray||function(e){return"Array"==f(e)},Ie=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())})),Pe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=H("wks"),Ne=i.Symbol,Re=Pe?Ne:Ne&&Ne.withoutSetter||B,je=function(e){return b(Me,e)||(Ie&&b(Ne,e)?Me[e]=Ne[e]:Me[e]=Re("Symbol."+e)),Me[e]},_e=je("species"),Fe=function(e,t){var n;return ke(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!ke(n.prototype)?v(n)&&null===(n=n[_e])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},We=[].push,He=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,a=6==e,o=5==e||a;return function(s,l,c,u){for(var f,d,h=Ae(s),m=p(h),v=function(e,t,n){if(Oe(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}(l,c,3),g=oe(m.length),y=0,b=u||Fe,S=t?b(s,g):n?b(s,0):void 0;g>y;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(r)return!1;return a?-1:i||r?r:S}},$e={forEach:He(0),map:He(1),filter:He(2),some:He(3),every:He(4),find:He(5),findIndex:He(6)},De=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))},Be=Object.defineProperty,qe={},Ue=function(e){throw e},Ge=function(e,t){if(b(qe,e))return qe[e];t||(t={});var n=[][e],i=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Ue,s=b(t,1)?t[1]:void 0;return qe[e]=!!n&&!r((function(){if(i&&!a)return!0;var e={length:-1};i?Be(e,1,{enumerable:!0,get:Ue}):e[1]=1,n.call(e,o,s)}))},Ve=$e.every,Ke=De("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=i.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=je("species"),it=function(e){return tt>=51||!r((function(){var t=[];return(t.constructor={})[nt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},rt=$e.filter,at=it("filter"),ot=Ge("filter");Ce({target:"Array",proto:!0,forced:!at||!ot},{filter:function(e){return rt(this,e,arguments.length>1?arguments[1]:void 0)}});var st=$e.forEach,lt=De("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=De("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=De("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=De("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),i=n-1;for(arguments.length>1&&(i=bt(i,re(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:St;Ce({target:"Array",proto:!0,forced:Lt!==[].lastIndexOf},{lastIndexOf:Lt});var Tt=$e.map,Ct=it("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 i=g(t);i in e?O.f(e,i,c(0,n)):e[i]=n},kt=it("slice"),It=Ge("slice",{ACCESSORS:!0,0:0,1:2}),Pt=je("species"),Mt=[].slice,Nt=Math.max;Ce({target:"Array",proto:!0,forced:!kt||!It},{slice:function(e,t){var n,i,r,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(i=new(void 0===n?Array:n)(Nt(l-s,0)),r=0;s<l;s++,r++)s in a&&At(i,r,a[s]);return i.length=r,i}});var Rt=O.f,jt=Function.prototype,_t=jt.toString,Ft=/^\s*function ([^ (]*)/;a&&!("name"in jt)&&Rt(jt,"name",{configurable:!0,get:function(){try{return _t.call(this).match(Ft)[1]}catch(e){return""}}});var Wt=he.f,Ht={}.toString,$t="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Dt=function(e){return $t&&"[object Window]"==Ht.call(e)?function(e){try{return Wt(e)}catch(e){return $t.slice()}}(e):Wt(m(e))};Ce({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Dt});var Bt="\t\n\v\f\r                 \u2028\u2029\ufeff",qt="["+Bt+"]",Ut=RegExp("^"+qt+qt+"*"),Gt=RegExp(qt+qt+"*$"),Vt=function(e){return function(t){var n=String(h(t));return 1&e&&(n=n.replace(Ut,"")),2&e&&(n=n.replace(Gt,"")),n}},Kt={start:Vt(1),end:Vt(2),trim:Vt(3)},zt=Kt.trim,Xt=i.parseFloat,Yt=1/Xt(Bt+"-0")!=-1/0?function(e){var t=zt(String(e)),n=Xt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Xt;Ce({global:!0,forced:parseFloat!=Yt},{parseFloat:Yt});var Jt=Kt.trim,Zt=i.parseInt,Qt=/^[+-]?0[Xx]/,en=8!==Zt(Bt+"08")||22!==Zt(Bt+"0x16")?function(e,t){var n=Jt(String(e));return Zt(n,t>>>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:r((function(){var e=nn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:r((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,i,r,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),i=sn.call(o?n:a,u),o?i?(i.input=i.input.slice(c),i[0]=i[0].slice(c),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:un&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),dn&&i&&i.length>1&&ln.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i});var pn=cn;Ce({target:"RegExp",proto:!0,forced:/./.exec!==pn},{exec:pn});var hn,mn=je("match"),vn=function(e){var t;return v(e)&&(void 0!==(t=e[mn])?!!t:"RegExp"==f(e))},gn=function(e){if(vn(e))throw TypeError("The method doesn't accept regular expressions");return e},yn=je("match"),bn=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[yn]=!1,"/./"[e](t)}catch(e){}}return!1},Sn=L.f,En="".endsWith,xn=Math.min,wn=bn("endsWith");Ce({target:"String",proto:!0,forced:!!(wn||(hn=Sn(String.prototype,"endsWith"),!hn||hn.writable))&&!wn},{endsWith:function(e){var t=String(h(this));gn(e);var n=arguments.length>1?arguments[1]:void 0,i=oe(t.length),r=void 0===n?i:xn(oe(n),i),a=String(e);return En?En.call(t,a,r):t.slice(r-a.length,r)===a}});var Ln=je("species"),Tn=!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Cn="$0"==="a".replace(/./,"$0"),On=je("replace"),An=!!/./[On]&&""===/./[On]("a","$0"),kn=!r((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,i){var a=je(e),o=!r((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=o&&!r((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,i,r){return t.exec===pn?o&&!r?{done:!0,value:l.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{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)})}i&&A(RegExp.prototype[a],"sham",!0)},Pn=function(e){return function(t,n){var i,r,a=String(h(t)),o=re(n),s=a.length;return o<0||o>=s?e?"":void 0:(i=a.charCodeAt(o))<55296||i>56319||o+1===s||(r=a.charCodeAt(o+1))<56320||r>57343?e?a.charAt(o):i:e?a.slice(o,o+2):r-56320+(i-55296<<10)+65536}},Mn={codeAt:Pn(!1),charAt:Pn(!0)}.charAt,Nn=function(e,t,n){return t+(n?Mn(e,t).length:1)},Rn=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==f(e))throw TypeError("RegExp#exec called on incompatible receiver");return pn.call(e,t)},jn=Math.max,_n=Math.min,Fn=Math.floor,Wn=/\$([$&'`]|\d\d?|<[^>]*>)/g,Hn=/\$([$&'`]|\d\d?)/g;In("replace",2,(function(e,t,n,i){var r=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=i.REPLACE_KEEPS_$0,o=r?"$":"$0";return[function(n,i){var r=h(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!r&&a||"string"==typeof i&&-1===i.indexOf(o)){var l=n(t,e,this,i);if(l.done)return l.value}var c=T(e),u=String(this),f="function"==typeof i;f||(i=String(i));var d=c.global;if(d){var p=c.unicode;c.lastIndex=0}for(var h=[];;){var m=Rn(c,u);if(null===m)break;if(h.push(m),!d)break;""===String(m[0])&&(c.lastIndex=Nn(u,oe(c.lastIndex),p))}for(var v,g="",y=0,b=0;b<h.length;b++){m=h[b];for(var S=String(m[0]),E=jn(_n(re(m.index),u.length),0),x=[],w=1;w<m.length;w++)x.push(void 0===(v=m[w])?v:String(v));var L=m.groups;if(f){var C=[S].concat(x,E,u);void 0!==L&&C.push(L);var O=String(i.apply(void 0,C))}else O=s(S,u,E,x,L,i);E>=y&&(g+=u.slice(y,E)+O,y=E+S.length)}return g+u.slice(y)}];function s(e,n,i,r,a,o){var s=i+e.length,l=r.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,i);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===r[f-1]?o.charAt(1):r[f-1]+o.charAt(1):t}c=r[u-1]}return void 0===c?"":c}))}}));var $n=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),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var r=T(e),a=String(this),o=r.lastIndex;$n(o,0)||(r.lastIndex=0);var s=Rn(r,a);return $n(r.lastIndex,o)||(r.lastIndex=o),null===s?-1:s.index}]}));var Dn=je("species"),Bn=[].push,qn=Math.min,Un=!r((function(){return!RegExp(4294967295,"y")}));In("split",2,(function(e,t,n){var i;return i="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 i=String(h(this)),r=void 0===n?4294967295:n>>>0;if(0===r)return[];if(void 0===e)return[i];if(!vn(e))return t.call(i,e,r);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,i))&&!((o=f.lastIndex)>u&&(l.push(i.slice(u,a.index)),a.length>1&&a.index<i.length&&Bn.apply(l,a.slice(1)),s=a[0].length,u=o,l.length>=r));)f.lastIndex===a.index&&f.lastIndex++;return u===i.length?!s&&f.test("")||l.push(""):l.push(i.slice(u)),l.length>r?l.slice(0,r):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 r=h(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,r,n):i.call(String(r),t,n)},function(e,r){var a=n(i,e,this,r,i!==t);if(a.done)return a.value;var o=T(e),s=String(this),l=function(e,t){var n,i=T(e).constructor;return void 0===i||null==(n=T(i)[Dn])?t:Oe(n)}(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Un?"y":"g"),f=new l(Un?o:"^(?:"+o.source+")",u),d=void 0===r?4294967295:r>>>0;if(0===d)return[];if(0===s.length)return null===Rn(f,s)?[s]:[];for(var p=0,h=0,m=[];h<s.length;){f.lastIndex=Un?h:0;var v,g=Rn(f,Un?s:s.slice(h));if(null===g||(v=qn(oe(f.lastIndex+(Un?0:h)),s.length))===p)h=Nn(s,h,c);else{if(m.push(s.slice(p,h)),m.length===d)return m;for(var y=1;y<=g.length-1;y++)if(m.push(g[y]),m.length===d)return m;h=p=v}}return m.push(s.slice(p)),m}]}),!Un);var Gn=L.f,Vn="".startsWith,Kn=Math.min,zn=bn("startsWith");Ce({target:"String",proto:!0,forced:!(!zn&&!!function(){var e=Gn(String.prototype,"startsWith");return e&&!e.writable}())&&!zn},{startsWith:function(e){var t=String(h(this));gn(e);var n=oe(Kn(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return Vn?Vn.call(t,i,n):t.slice(n,n+i.length)===i}});var Xn,Yn=Kt.trim;Ce({target:"String",proto:!0,forced:(Xn="trim",r((function(){return!!Bt[Xn]()||"​…᠎"!="​…᠎"[Xn]()||Bt[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=i[Jn],Qn=Zn&&Zn.prototype;if(Qn&&Qn.forEach!==ut)try{A(Qn,"forEach",ut)}catch(e){Qn.forEach=ut}}var ei=[].slice,ti=function(e){return function(t,n){var i=arguments.length>2,r=i?ei.call(arguments,2):void 0;return e(i?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};Ce({global:!0,bind:!0,forced:/MSIE .\./.test(Je)},{setTimeout:ti(i.setTimeout),setInterval:ti(i.setInterval)});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});export default function(){var e,t,n,i,r=(e=/(msie) ([\w.]+)/.exec(window.navigator.userAgent.toLowerCase()))&&"msie"===e[1]?parseFloat(e[2]):null,a=!1;function o(e){(i=e.menu||{}).path=i.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=import.meta.url.slice(0,import.meta.url.lastIndexOf("/")+1);return e}()||"plugin/menu/",i.path.endsWith("/")||(i.path+="/"),void 0===i.side&&(i.side="left"),void 0===i.numbers&&(i.numbers=!1),"string"!=typeof i.titleSelector&&(i.titleSelector="h1, h2, h3, h4, h5"),void 0===i.hideMissingTitles&&(i.hideMissingTitles=!1),void 0===i.useTextContentForMissingTitles&&(i.useTextContentForMissingTitles=!1),void 0===i.markers&&(i.markers=!0),"string"!=typeof i.themesPath&&(i.themesPath="dist/theme/"),i.themesPath.endsWith("/")||(i.themesPath+="/"),O("link#theme")||(i.themes=!1),!0===i.themes?i.themes=[{name:"Black",theme:i.themesPath+"black.css"},{name:"White",theme:i.themesPath+"white.css"},{name:"League",theme:i.themesPath+"league.css"},{name:"Sky",theme:i.themesPath+"sky.css"},{name:"Beige",theme:i.themesPath+"beige.css"},{name:"Simple",theme:i.themesPath+"simple.css"},{name:"Serif",theme:i.themesPath+"serif.css"},{name:"Blood",theme:i.themesPath+"blood.css"},{name:"Night",theme:i.themesPath+"night.css"},{name:"Moon",theme:i.themesPath+"moon.css"},{name:"Solarized",theme:i.themesPath+"solarized.css"}]:Array.isArray(i.themes)||(i.themes=!1),void 0===i.transitions&&(i.transitions=!1),!0===i.transitions?i.transitions=["None","Fade","Slide","Convex","Concave","Zoom"]:!1===i.transitions||Array.isArray(i.transitions)&&i.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')"),i.transitions=!1),r&&r<=9&&(i.transitions=!1),void 0===i.openButton&&(i.openButton=!0),void 0===i.openSlideNumber&&(i.openSlideNumber=!1),void 0===i.keyboard&&(i.keyboard=!0),void 0===i.sticky&&(i.sticky=!1),void 0===i.autoOpen&&(i.autoOpen=!0),void 0===i.delayInit&&(i.delayInit=!1),void 0===i.openOnInit&&(i.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),i.sticky&&i.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)})),i=t.length>0&&Math.abs(u(t[t.length-1]))<t[t.length-1].clientHeight?t[t.length-1]:n[0];i&&(i.classList.contains("selected")&&t.length>0&&(p(i),i=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[0]==i?t[t.length-1]:n[0]),A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(i),d(i));break;case 34:case 68:n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)}));var r=A(".active-menu-panel .slide-menu-items li").filter((function(e){return u(e)<0})),a=r.length>0&&Math.abs(u(r[0]))<r[0].clientHeight?r[0]:n[n.length-1];a&&(a.classList.contains("selected")&&r.length>0&&(d(a),a=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[n.length-1]==a?r[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-"+i.effect+"-"+i.side),O(".slide-menu").classList.add("active"),O(".slide-menu-overlay").classList.add("active"),i.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")}))),i.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(),i.sticky&&!t||(O("body").classList.remove("slide-menu-active"),O(".reveal").classList.remove("has-"+i.effect+"-"+i.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 r=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(r)||isNaN(a)||t.slide(r,a),o&&I("theme",o),s&&I("highlight-theme",s),l&&t.configure({transition:l});var c=O("a",e);c&&(n||!i.sticky||i.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")),i=parseInt(t.getAttribute("data-slide-v"));n<e.indexh||n===e.indexh&&i<e.indexv?t.classList.add("past"):n===e.indexh&&i===e.indexv?t.classList.add("active"):t.classList.add("future")}))}function L(){var e=window.getComputedStyle(O(".reveal"));O(".slide-menu").style.fontFamily=e.fontFamily}var T=0;function C(){if(!a){var e=function(e,t,n,i,r,a){var o={"data-button":""+T++,class:"toolbar-panel-button"+(a?" active-toolbar-button":"")};t&&(o["data-panel"]=t);var s=k("li",o);return n.startsWith("fa-")?s.appendChild(k("i",{class:i+" "+n})):s.innerHTML=n+"</i>",s.appendChild(k("br"),O("i",s)),s.appendChild(k("span",{class:"slide-menu-toolbar-label"},e),O("i",s)),s.onclick=r,d.appendChild(s),s},r=function(e,r,a,o,s){function l(e,t){if(""===e)return null;var n=t?O(e,r):O(e);return n?n.textContent:null}var c=r.getAttribute("data-menu-title")||l(".menu-title",r)||l(i.titleSelector,r);if(!c&&i.useTextContentForMissingTitles&&(c=r.textContent.trim())&&(c=c.split("\n").map((function(e){return e.trim()})).join(" ").trim().replace(/^(.{16}[^\s]*).*/,"$1").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")+"..."),!c){if(i.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(i.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"}))),i.numbers){var f=[],d="h.v";switch("string"==typeof i.numbers?d=i.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--"+i.side});"string"==typeof i.width&&(-1!=["normal","wide","third","half","full"].indexOf(i.width)?u.classList.add("slide-menu--"+i.width):(u.classList.add("slide-menu--custom"),u.style.width=i.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),i.custom&&i.custom.forEach((function(t,n,i){e(t.title,"Custom"+n,t.icon,null,S)})),i.themes&&e("Themes","Themes","fa-adjust","fas",S),i.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'),i=0;A(".slides > section").forEach((function(e,t){var a=A("section",e);if(a.length>0)a.forEach((function(e,a){var o=r(0===a?"slide-menu-item":"slide-menu-item-vertical",e,i,t,a);o&&n.appendChild(o),i++}));else{var o=r("slide-menu-item",e,i,t);o&&n.appendChild(o),i++}})),A(".slide-menu-item, .slide-menu-item-vertical").forEach((function(e){e.onclick=x})),w()}}(),t.addEventListener("slidechanged",w),i.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="<p>ERROR: The attempt to fetch "+e.responseURL+" failed with HTTP status "+e.status+" ("+e.statusText+").</p><p>Remember that you need to serve the presentation HTML from a HTTP server.</p>";e.panel.innerHTML=t};i.custom.forEach((function(e,t,n){var i=k("div",{"data-panel":"Custom"+t,class:"slide-menu-panel slide-menu-custom-panel"});e.content?(i.innerHTML=e.content,C(i)):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)}(i,e.src),u.appendChild(i)}))}if(i.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),i.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 i=k("li",n,e.name);M.appendChild(i),i.onclick=x}))}if(i.transitions){P=k("div",{class:"slide-menu-panel","data-panel":"Transitions"});u.appendChild(P);M=k("ul",{class:"slide-menu-items"});P.appendChild(M),i.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(i.openButton){var N=k("div",{class:"slide-menu-button"}),R=k("a",{href:"#"});R.appendChild(k("i",{class:"fas fa-bars"})),N.appendChild(R),O(".reveal").appendChild(N),N.onclick=v}if(i.openSlideNumber)O("div.slide-number").onclick=v;A(".slide-menu-panel .slide-menu-items li").forEach((function(e){e.addEventListener("mouseenter",o)}))}if(i.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 j=n.keyboardCondition;n.keyboardCondition=function(e){return j(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)}i.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 i=document.createElement(e);return t&&Object.getOwnPropertyNames(t).forEach((function(e){i.setAttribute(e,t[e])})),n&&(i.innerHTML=n),i}function I(e,t){var n=O("link#"+e),i=n.parentElement,r=n.nextElementSibling;n.remove();var a=n.cloneNode();a.setAttribute("href",t),a.onload=function(){L()},i.insertBefore(a,r)}function P(e,t,n){var i,r=document.querySelector("head");"script"===t?((i=document.createElement("script")).type="text/javascript",i.src=e):"stylesheet"===t&&((i=document.createElement("link")).rel="stylesheet",i.href=e);var a=function(){"function"==typeof n&&(n.call(),n=null)};i.onload=a,i.onreadystatechange=function(){"loaded"===this.readyState&&a()},r.appendChild(i)}function M(){var e,a,o,s=!r||r>=9;t.isSpeakerNotes()&&window.location.search.endsWith("controls=false")&&(s=!1),s&&(i.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(i.path+"menu.css","stylesheet",(function(){void 0===i.loadIcons||i.loadIcons?P(i.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}}}
@@ -0,0 +1 @@
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;a<n.length;a++){var o=n[a];b(e,o)||r(e,o,i(t,o))}},ye=/#|\.prototype\./,be=function(e,t){var n=Ee[Se(e)];return n==we||n!=xe&&("function"==typeof t?i(t):!!t)},Se=be.normalize=function(e){return String(e).replace(ye,".").toLowerCase()},Ee=be.data={},xe=be.NATIVE="N",we=be.POLYFILL="P",Le=be,Te=L.f,Ce=function(e,t){var n,i,a,o,s,l=e.target,c=e.global,u=e.stat;if(n=c?r:u?r[l]||k(l,{}):(r[l]||{}).prototype)for(i in t){if(o=t[i],a=e.noTargetGet?(s=Te(n,i))&&s.value:n[i],!Le(c?i:l+(u?".":"#")+i,e.forced)&&void 0!==a){if(typeof o==typeof a)continue;ge(o,a)}(e.sham||a&&a.sham)&&A(o,"sham",!0),Z(n,i,o,e)}},Oe=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Ae=function(e){return Object(h(e))},ke=Array.isArray||function(e){return"Array"==f(e)},Ie=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Pe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=H("wks"),Re=r.Symbol,je=Pe?Re:Re&&Re.withoutSetter||D,Ne=function(e){return b(Me,e)||(Ie&&b(Re,e)?Me[e]=Re[e]:Me[e]=je("Symbol."+e)),Me[e]},_e=Ne("species"),Fe=function(e,t){var n;return ke(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!ke(n.prototype)?v(n)&&null===(n=n[_e])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},We=[].push,He=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=5==e||a;return function(s,l,c,u){for(var f,d,h=Ae(s),m=p(h),v=function(e,t,n){if(Oe(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}(l,c,3),g=oe(m.length),y=0,b=u||Fe,S=t?b(s,g):n?b(s,0):void 0;g>y;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<l;s++,i++)s in a&&At(r,i,a[s]);return r.length=i,r}});var jt=O.f,Nt=Function.prototype,_t=Nt.toString,Ft=/^\s*function ([^ (]*)/;a&&!("name"in Nt)&&jt(Nt,"name",{configurable:!0,get:function(){try{return _t.call(this).match(Ft)[1]}catch(e){return""}}});var Wt=he.f,Ht={}.toString,Ut="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$t=function(e){return Ut&&"[object Window]"==Ht.call(e)?function(e){try{return Wt(e)}catch(e){return Ut.slice()}}(e):Wt(m(e))};Ce({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:$t});var Dt="\t\n\v\f\r                 \u2028\u2029\ufeff",qt="["+Dt+"]",Bt=RegExp("^"+qt+qt+"*"),Gt=RegExp(qt+qt+"*$"),Vt=function(e){return function(t){var n=String(h(t));return 1&e&&(n=n.replace(Bt,"")),2&e&&(n=n.replace(Gt,"")),n}},Kt={start:Vt(1),end:Vt(2),trim:Vt(3)},zt=Kt.trim,Xt=r.parseFloat,Yt=1/Xt(Dt+"-0")!=-1/0?function(e){var t=zt(String(e)),n=Xt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Xt;Ce({global:!0,forced:parseFloat!=Yt},{parseFloat:Yt});var Jt=Kt.trim,Zt=r.parseInt,Qt=/^[+-]?0[Xx]/,en=8!==Zt(Dt+"08")||22!==Zt(Dt+"0x16")?function(e,t){var n=Jt(String(e));return Zt(n,t>>>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;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var pn=cn;Ce({target:"RegExp",proto:!0,forced:/./.exec!==pn},{exec:pn});var hn,mn=Ne("match"),vn=function(e){var t;return v(e)&&(void 0!==(t=e[mn])?!!t:"RegExp"==f(e))},gn=function(e){if(vn(e))throw TypeError("The method doesn't accept regular expressions");return e},yn=Ne("match"),bn=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[yn]=!1,"/./"[e](t)}catch(e){}}return!1},Sn=L.f,En="".endsWith,xn=Math.min,wn=bn("endsWith");Ce({target:"String",proto:!0,forced:!!(wn||(hn=Sn(String.prototype,"endsWith"),!hn||hn.writable))&&!wn},{endsWith:function(e){var t=String(h(this));gn(e);var n=arguments.length>1?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,"$<a>")})),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<h.length;b++){m=h[b];for(var S=String(m[0]),E=Nn(_n(ie(m.index),u.length),0),x=[],w=1;w<m.length;w++)x.push(void 0===(v=m[w])?v:String(v));var L=m.groups;if(f){var C=[S].concat(x,E,u);void 0!==L&&C.push(L);var O=String(r.apply(void 0,C))}else O=s(S,u,E,x,L,r);E>=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<r.length&&Dn.apply(l,a.slice(1)),s=a[0].length,u=o,l.length>=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=[];h<s.length;){f.lastIndex=Bn?h:0;var v,g=jn(f,Bn?s:s.slice(h));if(null===g||(v=qn(oe(f.lastIndex+(Bn?0:h)),s.length))===p)h=Rn(s,h,c);else{if(m.push(s.slice(p,h)),m.length===d)return m;for(var y=1;y<=g.length-1;y++)if(m.push(g[y]),m.length===d)return m;h=p=v}}return m.push(s.slice(p)),m}]}),!Bn);var Gn=L.f,Vn="".startsWith,Kn=Math.min,zn=bn("startsWith");Ce({target:"String",proto:!0,forced:!(!zn&&!!function(){var e=Gn(String.prototype,"startsWith");return e&&!e.writable}())&&!zn},{startsWith:function(e){var t=String(h(this));gn(e);var n=oe(Kn(arguments.length>1?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]))<t[t.length-1].clientHeight?t[t.length-1]:n[0];r&&(r.classList.contains("selected")&&t.length>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]))<i[0].clientHeight?i[0]:n[n.length-1];a&&(a.classList.contains("selected")&&i.length>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<e.indexh||n===e.indexh&&r<e.indexv?t.classList.add("past"):n===e.indexh&&r===e.indexv?t.classList.add("active"):t.classList.add("future")}))}function L(){var e=window.getComputedStyle(O(".reveal"));O(".slide-menu").style.fontFamily=e.fontFamily}var T=0;function C(){if(!a){var e=function(e,t,n,r,i,a){var o={"data-button":""+T++,class:"toolbar-panel-button"+(a?" active-toolbar-button":"")};t&&(o["data-panel"]=t);var s=k("li",o);return n.startsWith("fa-")?s.appendChild(k("i",{class:r+" "+n})):s.innerHTML=n+"</i>",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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")+"..."),!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="<p>ERROR: The attempt to fetch "+e.responseURL+" failed with HTTP status "+e.status+" ("+e.statusText+").</p><p>Remember that you need to serve the presentation HTML from a HTTP server.</p>";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){var r,i=document.querySelector("head");"script"===t?((r=document.createElement("script")).type="text/javascript",r.src=e):"stylesheet"===t&&((r=document.createElement("link")).rel="stylesheet",r.href=e);var a=function(){"function"==typeof n&&(n.call(),n=null)};r.onload=a,r.onreadystatechange=function(){"loaded"===this.readyState&&a()},i.appendChild(r)}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}}}}));
@@ -0,0 +1,1252 @@
1
+ /*
2
+ * Reveal.js menu plugin
3
+ * MIT licensed
4
+ * (c) Greg Denehy 2020
5
+ */
6
+
7
+ const Plugin = () => {
8
+ const ieVersion = (function () {
9
+ let browser = /(msie) ([\w.]+)/.exec(
10
+ window.navigator.userAgent.toLowerCase()
11
+ );
12
+ if (browser && browser[1] === 'msie') {
13
+ return parseFloat(browser[2]);
14
+ }
15
+ return null;
16
+ })();
17
+
18
+ var deck;
19
+ var config;
20
+ var options;
21
+ var initialised = false;
22
+
23
+ function scriptPath() {
24
+ // obtain plugin path from the script element
25
+ var path;
26
+
27
+ const script = document.querySelector('script[src$="menu.js"]');
28
+ if (script) {
29
+ var sel = document.querySelector('script[src$="menu.js"]');
30
+ if (sel) {
31
+ path = sel.src.slice(0, -7);
32
+ }
33
+ } else {
34
+ path = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);
35
+ }
36
+
37
+ return path;
38
+ }
39
+
40
+ function initOptions(config) {
41
+ options = config.menu || {};
42
+ options.path = options.path || scriptPath() || 'plugin/menu/';
43
+ if (!options.path.endsWith('/')) {
44
+ options.path += '/';
45
+ }
46
+
47
+ // Set defaults
48
+ if (options.side === undefined) options.side = 'left';
49
+
50
+ if (options.numbers === undefined) options.numbers = false;
51
+
52
+ if (typeof options.titleSelector !== 'string')
53
+ options.titleSelector = 'h1, h2, h3, h4, h5';
54
+
55
+ if (options.hideMissingTitles === undefined)
56
+ options.hideMissingTitles = false;
57
+
58
+ if (options.useTextContentForMissingTitles === undefined)
59
+ options.useTextContentForMissingTitles = false;
60
+
61
+ if (options.markers === undefined) options.markers = true;
62
+
63
+ if (typeof options.themesPath !== 'string')
64
+ options.themesPath = 'dist/theme/';
65
+ if (!options.themesPath.endsWith('/')) options.themesPath += '/';
66
+
67
+ if (!select('link#theme')) options.themes = false;
68
+ if (options.themes === true) {
69
+ options.themes = [
70
+ { name: 'Black', theme: options.themesPath + 'black.css' },
71
+ { name: 'White', theme: options.themesPath + 'white.css' },
72
+ { name: 'League', theme: options.themesPath + 'league.css' },
73
+ { name: 'Sky', theme: options.themesPath + 'sky.css' },
74
+ { name: 'Beige', theme: options.themesPath + 'beige.css' },
75
+ { name: 'Simple', theme: options.themesPath + 'simple.css' },
76
+ { name: 'Serif', theme: options.themesPath + 'serif.css' },
77
+ { name: 'Blood', theme: options.themesPath + 'blood.css' },
78
+ { name: 'Night', theme: options.themesPath + 'night.css' },
79
+ { name: 'Moon', theme: options.themesPath + 'moon.css' },
80
+ { name: 'Solarized', theme: options.themesPath + 'solarized.css' }
81
+ ];
82
+ } else if (!Array.isArray(options.themes)) {
83
+ options.themes = false;
84
+ }
85
+
86
+ if (options.transitions === undefined) options.transitions = false;
87
+ if (options.transitions === true) {
88
+ options.transitions = [
89
+ 'None',
90
+ 'Fade',
91
+ 'Slide',
92
+ 'Convex',
93
+ 'Concave',
94
+ 'Zoom'
95
+ ];
96
+ } else if (
97
+ options.transitions !== false &&
98
+ (!Array.isArray(options.transitions) ||
99
+ !options.transitions.every(function (e) {
100
+ return typeof e === 'string';
101
+ }))
102
+ ) {
103
+ console.error(
104
+ "reveal.js-menu error: transitions config value must be 'true' or an array of strings, eg ['None', 'Fade', 'Slide')"
105
+ );
106
+ options.transitions = false;
107
+ }
108
+ if (ieVersion && ieVersion <= 9) {
109
+ // transitions aren't support in IE9 anyway, so no point in showing them
110
+ options.transitions = false;
111
+ }
112
+
113
+ if (typeof options.openButton === 'undefined') options.openButton = true;
114
+
115
+ if (typeof options.openSlideNumber === 'undefined')
116
+ options.openSlideNumber = false;
117
+
118
+ if (typeof options.keyboard === 'undefined') options.keyboard = true;
119
+
120
+ if (typeof options.sticky === 'undefined') options.sticky = false;
121
+
122
+ if (typeof options.autoOpen === 'undefined') options.autoOpen = true;
123
+
124
+ if (typeof options.delayInit === 'undefined') options.delayInit = false;
125
+
126
+ if (typeof options.openOnInit === 'undefined') options.openOnInit = false;
127
+ }
128
+
129
+ var mouseSelectionEnabled = true;
130
+ function disableMouseSelection() {
131
+ mouseSelectionEnabled = false;
132
+ }
133
+
134
+ function reenableMouseSelection() {
135
+ // wait until the mouse has moved before re-enabling mouse selection
136
+ // to avoid selections on scroll
137
+ select('nav.slide-menu').addEventListener('mousemove', function fn(e) {
138
+ select('nav.slide-menu').removeEventListener('mousemove', fn);
139
+ //XXX this should select the item under the mouse
140
+ mouseSelectionEnabled = true;
141
+ });
142
+ }
143
+
144
+ //
145
+ // Keyboard handling
146
+ //
147
+ function getOffset(el) {
148
+ var _x = 0;
149
+ var _y = 0;
150
+ while (el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) {
151
+ _x += el.offsetLeft - el.scrollLeft;
152
+ _y += el.offsetTop - el.scrollTop;
153
+ el = el.offsetParent;
154
+ }
155
+ return { top: _y, left: _x };
156
+ }
157
+
158
+ function visibleOffset(el) {
159
+ var offsetFromTop = getOffset(el).top - el.offsetParent.offsetTop;
160
+ if (offsetFromTop < 0) return -offsetFromTop;
161
+ var offsetFromBottom =
162
+ el.offsetParent.offsetHeight -
163
+ (el.offsetTop - el.offsetParent.scrollTop + el.offsetHeight);
164
+ if (offsetFromBottom < 0) return offsetFromBottom;
165
+ return 0;
166
+ }
167
+
168
+ function keepVisible(el) {
169
+ var offset = visibleOffset(el);
170
+ if (offset) {
171
+ disableMouseSelection();
172
+ el.scrollIntoView(offset > 0);
173
+ reenableMouseSelection();
174
+ }
175
+ }
176
+
177
+ function scrollItemToTop(el) {
178
+ disableMouseSelection();
179
+ el.offsetParent.scrollTop = el.offsetTop;
180
+ reenableMouseSelection();
181
+ }
182
+
183
+ function scrollItemToBottom(el) {
184
+ disableMouseSelection();
185
+ el.offsetParent.scrollTop =
186
+ el.offsetTop - el.offsetParent.offsetHeight + el.offsetHeight;
187
+ reenableMouseSelection();
188
+ }
189
+
190
+ function selectItem(el) {
191
+ el.classList.add('selected');
192
+ keepVisible(el);
193
+ if (options.sticky && options.autoOpen) openItem(el);
194
+ }
195
+
196
+ function onDocumentKeyDown(event) {
197
+ // opening menu is handled by registering key binding with Reveal below
198
+ if (isOpen()) {
199
+ event.stopImmediatePropagation();
200
+ switch (event.keyCode) {
201
+ // case 77:
202
+ // closeMenu();
203
+ // break;
204
+ // h, left - change panel
205
+ case 72:
206
+ case 37:
207
+ prevPanel();
208
+ break;
209
+ // l, right - change panel
210
+ case 76:
211
+ case 39:
212
+ nextPanel();
213
+ break;
214
+ // k, up
215
+ case 75:
216
+ case 38:
217
+ var currItem =
218
+ select('.active-menu-panel .slide-menu-items li.selected') ||
219
+ select('.active-menu-panel .slide-menu-items li.active');
220
+ if (currItem) {
221
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
222
+ function (item) {
223
+ item.classList.remove('selected');
224
+ }
225
+ );
226
+ var nextItem =
227
+ select(
228
+ '.active-menu-panel .slide-menu-items li[data-item="' +
229
+ (parseInt(currItem.getAttribute('data-item')) - 1) +
230
+ '"]'
231
+ ) || currItem;
232
+ selectItem(nextItem);
233
+ } else {
234
+ var item = select(
235
+ '.active-menu-panel .slide-menu-items li.slide-menu-item'
236
+ );
237
+ if (item) selectItem(item);
238
+ }
239
+ break;
240
+ // j, down
241
+ case 74:
242
+ case 40:
243
+ var currItem =
244
+ select('.active-menu-panel .slide-menu-items li.selected') ||
245
+ select('.active-menu-panel .slide-menu-items li.active');
246
+ if (currItem) {
247
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
248
+ function (item) {
249
+ item.classList.remove('selected');
250
+ }
251
+ );
252
+ var nextItem =
253
+ select(
254
+ '.active-menu-panel .slide-menu-items li[data-item="' +
255
+ (parseInt(currItem.getAttribute('data-item')) + 1) +
256
+ '"]'
257
+ ) || currItem;
258
+ selectItem(nextItem);
259
+ } else {
260
+ var item = select(
261
+ '.active-menu-panel .slide-menu-items li.slide-menu-item'
262
+ );
263
+ if (item) selectItem(item);
264
+ }
265
+ break;
266
+ // pageup, u
267
+ case 33:
268
+ case 85:
269
+ var itemsAbove = selectAll(
270
+ '.active-menu-panel .slide-menu-items li'
271
+ ).filter(function (item) {
272
+ return visibleOffset(item) > 0;
273
+ });
274
+ var visibleItems = selectAll(
275
+ '.active-menu-panel .slide-menu-items li'
276
+ ).filter(function (item) {
277
+ return visibleOffset(item) == 0;
278
+ });
279
+
280
+ var firstVisible =
281
+ itemsAbove.length > 0 &&
282
+ Math.abs(visibleOffset(itemsAbove[itemsAbove.length - 1])) <
283
+ itemsAbove[itemsAbove.length - 1].clientHeight
284
+ ? itemsAbove[itemsAbove.length - 1]
285
+ : visibleItems[0];
286
+ if (firstVisible) {
287
+ if (
288
+ firstVisible.classList.contains('selected') &&
289
+ itemsAbove.length > 0
290
+ ) {
291
+ // at top of viewport already, page scroll (if not at start)
292
+ // ...move selected item to bottom, and change selection to last fully visible item at top
293
+ scrollItemToBottom(firstVisible);
294
+ visibleItems = selectAll(
295
+ '.active-menu-panel .slide-menu-items li'
296
+ ).filter(function (item) {
297
+ return visibleOffset(item) == 0;
298
+ });
299
+ if (visibleItems[0] == firstVisible) {
300
+ // prev item is still beyond the viewport (for custom panels)
301
+ firstVisible = itemsAbove[itemsAbove.length - 1];
302
+ } else {
303
+ firstVisible = visibleItems[0];
304
+ }
305
+ }
306
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
307
+ function (item) {
308
+ item.classList.remove('selected');
309
+ }
310
+ );
311
+ selectItem(firstVisible);
312
+ // ensure selected item is positioned at the top of the viewport
313
+ scrollItemToTop(firstVisible);
314
+ }
315
+ break;
316
+ // pagedown, d
317
+ case 34:
318
+ case 68:
319
+ var visibleItems = selectAll(
320
+ '.active-menu-panel .slide-menu-items li'
321
+ ).filter(function (item) {
322
+ return visibleOffset(item) == 0;
323
+ });
324
+ var itemsBelow = selectAll(
325
+ '.active-menu-panel .slide-menu-items li'
326
+ ).filter(function (item) {
327
+ return visibleOffset(item) < 0;
328
+ });
329
+
330
+ var lastVisible =
331
+ itemsBelow.length > 0 &&
332
+ Math.abs(visibleOffset(itemsBelow[0])) < itemsBelow[0].clientHeight
333
+ ? itemsBelow[0]
334
+ : visibleItems[visibleItems.length - 1];
335
+ if (lastVisible) {
336
+ if (
337
+ lastVisible.classList.contains('selected') &&
338
+ itemsBelow.length > 0
339
+ ) {
340
+ // at bottom of viewport already, page scroll (if not at end)
341
+ // ...move selected item to top, and change selection to last fully visible item at bottom
342
+ scrollItemToTop(lastVisible);
343
+ visibleItems = selectAll(
344
+ '.active-menu-panel .slide-menu-items li'
345
+ ).filter(function (item) {
346
+ return visibleOffset(item) == 0;
347
+ });
348
+ if (visibleItems[visibleItems.length - 1] == lastVisible) {
349
+ // next item is still beyond the viewport (for custom panels)
350
+ lastVisible = itemsBelow[0];
351
+ } else {
352
+ lastVisible = visibleItems[visibleItems.length - 1];
353
+ }
354
+ }
355
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
356
+ function (item) {
357
+ item.classList.remove('selected');
358
+ }
359
+ );
360
+ selectItem(lastVisible);
361
+ // ensure selected item is positioned at the bottom of the viewport
362
+ scrollItemToBottom(lastVisible);
363
+ }
364
+ break;
365
+ // home
366
+ case 36:
367
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
368
+ function (item) {
369
+ item.classList.remove('selected');
370
+ }
371
+ );
372
+ var item = select(
373
+ '.active-menu-panel .slide-menu-items li:first-of-type'
374
+ );
375
+ if (item) {
376
+ item.classList.add('selected');
377
+ keepVisible(item);
378
+ }
379
+ break;
380
+ // end
381
+ case 35:
382
+ selectAll('.active-menu-panel .slide-menu-items li').forEach(
383
+ function (item) {
384
+ item.classList.remove('selected');
385
+ }
386
+ );
387
+ var item = select(
388
+ '.active-menu-panel .slide-menu-items:last-of-type li:last-of-type'
389
+ );
390
+ if (item) {
391
+ item.classList.add('selected');
392
+ keepVisible(item);
393
+ }
394
+ break;
395
+ // space, return
396
+ case 32:
397
+ case 13:
398
+ var currItem = select(
399
+ '.active-menu-panel .slide-menu-items li.selected'
400
+ );
401
+ if (currItem) {
402
+ openItem(currItem, true);
403
+ }
404
+ break;
405
+ // esc
406
+ case 27:
407
+ closeMenu(null, true);
408
+ break;
409
+ }
410
+ }
411
+ }
412
+
413
+ //
414
+ // Utilty functions
415
+ //
416
+
417
+ function openMenu(event) {
418
+ if (event) event.preventDefault();
419
+ if (!isOpen()) {
420
+ select('body').classList.add('slide-menu-active');
421
+ select('.reveal').classList.add(
422
+ 'has-' + options.effect + '-' + options.side
423
+ );
424
+ select('.slide-menu').classList.add('active');
425
+ select('.slide-menu-overlay').classList.add('active');
426
+
427
+ // identify active theme
428
+ if (options.themes) {
429
+ selectAll('div[data-panel="Themes"] li').forEach(function (i) {
430
+ i.classList.remove('active');
431
+ });
432
+ selectAll(
433
+ 'li[data-theme="' + select('link#theme').getAttribute('href') + '"]'
434
+ ).forEach(function (i) {
435
+ i.classList.add('active');
436
+ });
437
+ }
438
+
439
+ // identify active transition
440
+ if (options.transitions) {
441
+ selectAll('div[data-panel="Transitions"] li').forEach(function (i) {
442
+ i.classList.remove('active');
443
+ });
444
+ selectAll('li[data-transition="' + config.transition + '"]').forEach(
445
+ function (i) {
446
+ i.classList.add('active');
447
+ }
448
+ );
449
+ }
450
+
451
+ // set item selections to match active items
452
+ var items = selectAll('.slide-menu-panel li.active');
453
+ items.forEach(function (i) {
454
+ i.classList.add('selected');
455
+ keepVisible(i);
456
+ });
457
+ }
458
+ }
459
+
460
+ function closeMenu(event, force) {
461
+ if (event) event.preventDefault();
462
+ if (!options.sticky || force) {
463
+ select('body').classList.remove('slide-menu-active');
464
+ select('.reveal').classList.remove(
465
+ 'has-' + options.effect + '-' + options.side
466
+ );
467
+ select('.slide-menu').classList.remove('active');
468
+ select('.slide-menu-overlay').classList.remove('active');
469
+ selectAll('.slide-menu-panel li.selected').forEach(function (i) {
470
+ i.classList.remove('selected');
471
+ });
472
+ }
473
+ }
474
+
475
+ function toggleMenu(event) {
476
+ if (isOpen()) {
477
+ closeMenu(event, true);
478
+ } else {
479
+ openMenu(event);
480
+ }
481
+ }
482
+
483
+ function isOpen() {
484
+ return select('body').classList.contains('slide-menu-active');
485
+ }
486
+
487
+ function openPanel(event, ref) {
488
+ openMenu(event);
489
+ var panel = ref;
490
+ if (typeof ref !== 'string') {
491
+ panel = event.currentTarget.getAttribute('data-panel');
492
+ }
493
+ select('.slide-menu-toolbar > li.active-toolbar-button').classList.remove(
494
+ 'active-toolbar-button'
495
+ );
496
+ select('li[data-panel="' + panel + '"]').classList.add(
497
+ 'active-toolbar-button'
498
+ );
499
+ select('.slide-menu-panel.active-menu-panel').classList.remove(
500
+ 'active-menu-panel'
501
+ );
502
+ select('div[data-panel="' + panel + '"]').classList.add(
503
+ 'active-menu-panel'
504
+ );
505
+ }
506
+
507
+ function nextPanel() {
508
+ var next =
509
+ (parseInt(select('.active-toolbar-button').getAttribute('data-button')) +
510
+ 1) %
511
+ buttons;
512
+ openPanel(
513
+ null,
514
+ select('.toolbar-panel-button[data-button="' + next + '"]').getAttribute(
515
+ 'data-panel'
516
+ )
517
+ );
518
+ }
519
+
520
+ function prevPanel() {
521
+ var next =
522
+ parseInt(select('.active-toolbar-button').getAttribute('data-button')) -
523
+ 1;
524
+ if (next < 0) {
525
+ next = buttons - 1;
526
+ }
527
+ openPanel(
528
+ null,
529
+ select('.toolbar-panel-button[data-button="' + next + '"]').getAttribute(
530
+ 'data-panel'
531
+ )
532
+ );
533
+ }
534
+
535
+ function openItem(item, force) {
536
+ var h = parseInt(item.getAttribute('data-slide-h'));
537
+ var v = parseInt(item.getAttribute('data-slide-v'));
538
+ var theme = item.getAttribute('data-theme');
539
+ var highlightTheme = item.getAttribute('data-highlight-theme');
540
+ var transition = item.getAttribute('data-transition');
541
+
542
+ if (!isNaN(h) && !isNaN(v)) {
543
+ deck.slide(h, v);
544
+ }
545
+
546
+ if (theme) {
547
+ changeStylesheet('theme', theme);
548
+ }
549
+
550
+ if (highlightTheme) {
551
+ changeStylesheet('highlight-theme', highlightTheme);
552
+ }
553
+
554
+ if (transition) {
555
+ deck.configure({ transition: transition });
556
+ }
557
+
558
+ var link = select('a', item);
559
+ if (link) {
560
+ if (
561
+ force ||
562
+ !options.sticky ||
563
+ (options.autoOpen && link.href.startsWith('#')) ||
564
+ link.href.startsWith(
565
+ window.location.origin + window.location.pathname + '#'
566
+ )
567
+ ) {
568
+ link.click();
569
+ }
570
+ }
571
+
572
+ closeMenu();
573
+ }
574
+
575
+ function clicked(event) {
576
+ if (event.target.nodeName !== 'A') {
577
+ event.preventDefault();
578
+ }
579
+ openItem(event.currentTarget);
580
+ }
581
+
582
+ function highlightCurrentSlide() {
583
+ var state = deck.getState();
584
+ selectAll('li.slide-menu-item, li.slide-menu-item-vertical').forEach(
585
+ function (item) {
586
+ item.classList.remove('past');
587
+ item.classList.remove('active');
588
+ item.classList.remove('future');
589
+
590
+ var h = parseInt(item.getAttribute('data-slide-h'));
591
+ var v = parseInt(item.getAttribute('data-slide-v'));
592
+ if (h < state.indexh || (h === state.indexh && v < state.indexv)) {
593
+ item.classList.add('past');
594
+ } else if (h === state.indexh && v === state.indexv) {
595
+ item.classList.add('active');
596
+ } else {
597
+ item.classList.add('future');
598
+ }
599
+ }
600
+ );
601
+ }
602
+
603
+ function matchRevealStyle() {
604
+ var revealStyle = window.getComputedStyle(select('.reveal'));
605
+ var element = select('.slide-menu');
606
+ element.style.fontFamily = revealStyle.fontFamily;
607
+ //XXX could adjust the complete menu style to match the theme, ie colors, etc
608
+ }
609
+
610
+ var buttons = 0;
611
+ function initMenu() {
612
+ if (!initialised) {
613
+ var parent = select('.reveal').parentElement;
614
+ var top = create('div', { class: 'slide-menu-wrapper' });
615
+ parent.appendChild(top);
616
+ var panels = create('nav', {
617
+ class: 'slide-menu slide-menu--' + options.side
618
+ });
619
+ if (typeof options.width === 'string') {
620
+ if (
621
+ ['normal', 'wide', 'third', 'half', 'full'].indexOf(options.width) !=
622
+ -1
623
+ ) {
624
+ panels.classList.add('slide-menu--' + options.width);
625
+ } else {
626
+ panels.classList.add('slide-menu--custom');
627
+ panels.style.width = options.width;
628
+ }
629
+ }
630
+ top.appendChild(panels);
631
+ matchRevealStyle();
632
+ var overlay = create('div', { class: 'slide-menu-overlay' });
633
+ top.appendChild(overlay);
634
+ overlay.onclick = function () {
635
+ closeMenu(null, true);
636
+ };
637
+
638
+ var toolbar = create('ol', { class: 'slide-menu-toolbar' });
639
+ select('.slide-menu').appendChild(toolbar);
640
+
641
+ function addToolbarButton(title, ref, icon, style, fn, active) {
642
+ var attrs = {
643
+ 'data-button': '' + buttons++,
644
+ class:
645
+ 'toolbar-panel-button' + (active ? ' active-toolbar-button' : '')
646
+ };
647
+ if (ref) {
648
+ attrs['data-panel'] = ref;
649
+ }
650
+ var button = create('li', attrs);
651
+
652
+ if (icon.startsWith('fa-')) {
653
+ button.appendChild(create('i', { class: style + ' ' + icon }));
654
+ } else {
655
+ button.innerHTML = icon + '</i>';
656
+ }
657
+ button.appendChild(create('br'), select('i', button));
658
+ button.appendChild(
659
+ create('span', { class: 'slide-menu-toolbar-label' }, title),
660
+ select('i', button)
661
+ );
662
+ button.onclick = fn;
663
+ toolbar.appendChild(button);
664
+ return button;
665
+ }
666
+
667
+ addToolbarButton('Slides', 'Slides', 'fa-images', 'fas', openPanel, true);
668
+
669
+ if (options.custom) {
670
+ options.custom.forEach(function (element, index, array) {
671
+ addToolbarButton(
672
+ element.title,
673
+ 'Custom' + index,
674
+ element.icon,
675
+ null,
676
+ openPanel
677
+ );
678
+ });
679
+ }
680
+
681
+ if (options.themes) {
682
+ addToolbarButton('Themes', 'Themes', 'fa-adjust', 'fas', openPanel);
683
+ }
684
+ if (options.transitions) {
685
+ addToolbarButton(
686
+ 'Transitions',
687
+ 'Transitions',
688
+ 'fa-sticky-note',
689
+ 'fas',
690
+ openPanel
691
+ );
692
+ }
693
+ var button = create('li', {
694
+ id: 'close',
695
+ class: 'toolbar-panel-button'
696
+ });
697
+ button.appendChild(create('i', { class: 'fas fa-times' }));
698
+ button.appendChild(create('br'));
699
+ button.appendChild(
700
+ create('span', { class: 'slide-menu-toolbar-label' }, 'Close')
701
+ );
702
+ button.onclick = function () {
703
+ closeMenu(null, true);
704
+ };
705
+ toolbar.appendChild(button);
706
+
707
+ //
708
+ // Slide links
709
+ //
710
+ function generateItem(type, section, i, h, v) {
711
+ var link = '/#/' + h;
712
+ if (typeof v === 'number' && !isNaN(v)) link += '/' + v;
713
+
714
+ function text(selector, parent) {
715
+ if (selector === '') return null;
716
+ var el = parent ? select(selector, section) : select(selector);
717
+ if (el) return el.textContent;
718
+ return null;
719
+ }
720
+ var title =
721
+ section.getAttribute('data-menu-title') ||
722
+ text('.menu-title', section) ||
723
+ text(options.titleSelector, section);
724
+
725
+ if (!title && options.useTextContentForMissingTitles) {
726
+ // attempt to figure out a title based on the text in the slide
727
+ title = section.textContent.trim();
728
+ if (title) {
729
+ title =
730
+ title
731
+ .split('\n')
732
+ .map(function (t) {
733
+ return t.trim();
734
+ })
735
+ .join(' ')
736
+ .trim()
737
+ .replace(/^(.{16}[^\s]*).*/, '$1') // limit to 16 chars plus any consecutive non-whitespace chars (to avoid breaking words)
738
+ .replace(/&/g, '&amp;')
739
+ .replace(/</g, '&lt;')
740
+ .replace(/>/g, '&gt;')
741
+ .replace(/"/g, '&quot;')
742
+ .replace(/'/g, '&#039;') + '...';
743
+ }
744
+ }
745
+
746
+ if (!title) {
747
+ if (options.hideMissingTitles) return '';
748
+ type += ' no-title';
749
+ title = 'Slide ' + (i + 1);
750
+ }
751
+
752
+ var item = create('li', {
753
+ class: type,
754
+ 'data-item': i,
755
+ 'data-slide-h': h,
756
+ 'data-slide-v': v === undefined ? 0 : v
757
+ });
758
+
759
+ if (options.markers) {
760
+ item.appendChild(
761
+ create('i', { class: 'fas fa-check-circle fa-fw past' })
762
+ );
763
+ item.appendChild(
764
+ create('i', {
765
+ class: 'fas fa-arrow-alt-circle-right fa-fw active'
766
+ })
767
+ );
768
+ item.appendChild(
769
+ create('i', { class: 'far fa-circle fa-fw future' })
770
+ );
771
+ }
772
+
773
+ if (options.numbers) {
774
+ // Number formatting taken from reveal.js
775
+ var value = [];
776
+ var format = 'h.v';
777
+
778
+ // Check if a custom number format is available
779
+ if (typeof options.numbers === 'string') {
780
+ format = options.numbers;
781
+ } else if (typeof config.slideNumber === 'string') {
782
+ // Take user defined number format for slides
783
+ format = config.slideNumber;
784
+ }
785
+
786
+ switch (format) {
787
+ case 'c':
788
+ value.push(i + 1);
789
+ break;
790
+ case 'c/t':
791
+ value.push(i + 1, '/', deck.getTotalSlides());
792
+ break;
793
+ case 'h/v':
794
+ value.push(h + 1);
795
+ if (typeof v === 'number' && !isNaN(v)) value.push('/', v + 1);
796
+ break;
797
+ default:
798
+ value.push(h + 1);
799
+ if (typeof v === 'number' && !isNaN(v)) value.push('.', v + 1);
800
+ }
801
+
802
+ item.appendChild(
803
+ create(
804
+ 'span',
805
+ { class: 'slide-menu-item-number' },
806
+ value.join('') + '. '
807
+ )
808
+ );
809
+ }
810
+
811
+ item.appendChild(
812
+ create('span', { class: 'slide-menu-item-title' }, title)
813
+ );
814
+
815
+ return item;
816
+ }
817
+
818
+ function createSlideMenu() {
819
+ if (
820
+ !document.querySelector(
821
+ 'section[data-markdown]:not([data-markdown-parsed])'
822
+ )
823
+ ) {
824
+ var panel = create('div', {
825
+ 'data-panel': 'Slides',
826
+ class: 'slide-menu-panel active-menu-panel'
827
+ });
828
+ panel.appendChild(create('ul', { class: 'slide-menu-items' }));
829
+ panels.appendChild(panel);
830
+ var items = select(
831
+ '.slide-menu-panel[data-panel="Slides"] > .slide-menu-items'
832
+ );
833
+ var slideCount = 0;
834
+ selectAll('.slides > section').forEach(function (section, h) {
835
+ var subsections = selectAll('section', section);
836
+ if (subsections.length > 0) {
837
+ subsections.forEach(function (subsection, v) {
838
+ var type =
839
+ v === 0 ? 'slide-menu-item' : 'slide-menu-item-vertical';
840
+ var item = generateItem(type, subsection, slideCount, h, v);
841
+ if (item) {
842
+ items.appendChild(item);
843
+ }
844
+ slideCount++;
845
+ });
846
+ } else {
847
+ var item = generateItem(
848
+ 'slide-menu-item',
849
+ section,
850
+ slideCount,
851
+ h
852
+ );
853
+ if (item) {
854
+ items.appendChild(item);
855
+ }
856
+ slideCount++;
857
+ }
858
+ });
859
+ selectAll('.slide-menu-item, .slide-menu-item-vertical').forEach(
860
+ function (i) {
861
+ i.onclick = clicked;
862
+ }
863
+ );
864
+ highlightCurrentSlide();
865
+ } else {
866
+ // wait for markdown to be loaded and parsed
867
+ setTimeout(createSlideMenu, 100);
868
+ }
869
+ }
870
+
871
+ createSlideMenu();
872
+ deck.addEventListener('slidechanged', highlightCurrentSlide);
873
+
874
+ //
875
+ // Custom menu panels
876
+ //
877
+ if (options.custom) {
878
+ function xhrSuccess() {
879
+ if (this.status >= 200 && this.status < 300) {
880
+ this.panel.innerHTML = this.responseText;
881
+ enableCustomLinks(this.panel);
882
+ } else {
883
+ showErrorMsg(this);
884
+ }
885
+ }
886
+ function xhrError() {
887
+ showErrorMsg(this);
888
+ }
889
+ function loadCustomPanelContent(panel, sURL) {
890
+ var oReq = new XMLHttpRequest();
891
+ oReq.panel = panel;
892
+ oReq.arguments = Array.prototype.slice.call(arguments, 2);
893
+ oReq.onload = xhrSuccess;
894
+ oReq.onerror = xhrError;
895
+ oReq.open('get', sURL, true);
896
+ oReq.send(null);
897
+ }
898
+ function enableCustomLinks(panel) {
899
+ selectAll('ul.slide-menu-items li.slide-menu-item', panel).forEach(
900
+ function (item, i) {
901
+ item.setAttribute('data-item', i + 1);
902
+ item.onclick = clicked;
903
+ item.addEventListener('mouseenter', handleMouseHighlight);
904
+ }
905
+ );
906
+ }
907
+
908
+ function showErrorMsg(response) {
909
+ var msg =
910
+ '<p>ERROR: The attempt to fetch ' +
911
+ response.responseURL +
912
+ ' failed with HTTP status ' +
913
+ response.status +
914
+ ' (' +
915
+ response.statusText +
916
+ ').</p>' +
917
+ '<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>';
918
+ response.panel.innerHTML = msg;
919
+ }
920
+
921
+ options.custom.forEach(function (element, index, array) {
922
+ var panel = create('div', {
923
+ 'data-panel': 'Custom' + index,
924
+ class: 'slide-menu-panel slide-menu-custom-panel'
925
+ });
926
+ if (element.content) {
927
+ panel.innerHTML = element.content;
928
+ enableCustomLinks(panel);
929
+ } else if (element.src) {
930
+ loadCustomPanelContent(panel, element.src);
931
+ }
932
+ panels.appendChild(panel);
933
+ });
934
+ }
935
+
936
+ //
937
+ // Themes
938
+ //
939
+ if (options.themes) {
940
+ var panel = create('div', {
941
+ class: 'slide-menu-panel',
942
+ 'data-panel': 'Themes'
943
+ });
944
+ panels.appendChild(panel);
945
+ var menu = create('ul', { class: 'slide-menu-items' });
946
+ panel.appendChild(menu);
947
+ options.themes.forEach(function (t, i) {
948
+ var attrs = {
949
+ class: 'slide-menu-item',
950
+ 'data-item': '' + (i + 1)
951
+ };
952
+ if (t.theme) {
953
+ attrs['data-theme'] = t.theme;
954
+ }
955
+ if (t.highlightTheme) {
956
+ attrs['data-highlight-theme'] = t.highlightTheme;
957
+ }
958
+ var item = create('li', attrs, t.name);
959
+ menu.appendChild(item);
960
+ item.onclick = clicked;
961
+ });
962
+ }
963
+
964
+ //
965
+ // Transitions
966
+ //
967
+ if (options.transitions) {
968
+ var panel = create('div', {
969
+ class: 'slide-menu-panel',
970
+ 'data-panel': 'Transitions'
971
+ });
972
+ panels.appendChild(panel);
973
+ var menu = create('ul', { class: 'slide-menu-items' });
974
+ panel.appendChild(menu);
975
+ options.transitions.forEach(function (name, i) {
976
+ var item = create(
977
+ 'li',
978
+ {
979
+ class: 'slide-menu-item',
980
+ 'data-transition': name.toLowerCase(),
981
+ 'data-item': '' + (i + 1)
982
+ },
983
+ name
984
+ );
985
+ menu.appendChild(item);
986
+ item.onclick = clicked;
987
+ });
988
+ }
989
+
990
+ //
991
+ // Open menu options
992
+ //
993
+ if (options.openButton) {
994
+ // add menu button
995
+ var div = create('div', { class: 'slide-menu-button' });
996
+ var link = create('a', { href: '#' });
997
+ link.appendChild(create('i', { class: 'fas fa-bars' }));
998
+ div.appendChild(link);
999
+ select('.reveal').appendChild(div);
1000
+ div.onclick = openMenu;
1001
+ }
1002
+
1003
+ if (options.openSlideNumber) {
1004
+ var slideNumber = select('div.slide-number');
1005
+ slideNumber.onclick = openMenu;
1006
+ }
1007
+
1008
+ //
1009
+ // Handle mouse overs
1010
+ //
1011
+ selectAll('.slide-menu-panel .slide-menu-items li').forEach(function (
1012
+ item
1013
+ ) {
1014
+ item.addEventListener('mouseenter', handleMouseHighlight);
1015
+ });
1016
+
1017
+ function handleMouseHighlight(event) {
1018
+ if (mouseSelectionEnabled) {
1019
+ selectAll('.active-menu-panel .slide-menu-items li.selected').forEach(
1020
+ function (i) {
1021
+ i.classList.remove('selected');
1022
+ }
1023
+ );
1024
+ event.currentTarget.classList.add('selected');
1025
+ }
1026
+ }
1027
+ }
1028
+
1029
+ if (options.keyboard) {
1030
+ //XXX add keyboard option for custom key codes, etc.
1031
+
1032
+ document.addEventListener('keydown', onDocumentKeyDown, false);
1033
+
1034
+ // handle key presses within speaker notes
1035
+ window.addEventListener('message', function (event) {
1036
+ var data;
1037
+ try {
1038
+ data = JSON.parse(event.data);
1039
+ } catch (e) {}
1040
+ if (data && data.method === 'triggerKey') {
1041
+ onDocumentKeyDown({
1042
+ keyCode: data.args[0],
1043
+ stopImmediatePropagation: function () {}
1044
+ });
1045
+ }
1046
+ });
1047
+
1048
+ // Prevent reveal from processing keyboard events when the menu is open
1049
+ if (
1050
+ config.keyboardCondition &&
1051
+ typeof config.keyboardCondition === 'function'
1052
+ ) {
1053
+ // combine user defined keyboard condition with the menu's own condition
1054
+ var userCondition = config.keyboardCondition;
1055
+ config.keyboardCondition = function (event) {
1056
+ return userCondition(event) && (!isOpen() || event.keyCode == 77);
1057
+ };
1058
+ } else {
1059
+ config.keyboardCondition = function (event) {
1060
+ return !isOpen() || event.keyCode == 77;
1061
+ };
1062
+ }
1063
+
1064
+ deck.addKeyBinding(
1065
+ { keyCode: 77, key: 'M', description: 'Toggle menu' },
1066
+ toggleMenu
1067
+ );
1068
+ }
1069
+
1070
+ if (options.openOnInit) {
1071
+ openMenu();
1072
+ }
1073
+
1074
+ initialised = true;
1075
+ }
1076
+
1077
+ /**
1078
+ * Extend object a with the properties of object b.
1079
+ * If there's a conflict, object b takes precedence.
1080
+ */
1081
+ function extend(a, b) {
1082
+ for (var i in b) {
1083
+ a[i] = b[i];
1084
+ }
1085
+ }
1086
+
1087
+ /**
1088
+ * Dispatches an event of the specified type from the
1089
+ * reveal DOM element.
1090
+ */
1091
+ function dispatchEvent(type, args) {
1092
+ var event = document.createEvent('HTMLEvents', 1, 2);
1093
+ event.initEvent(type, true, true);
1094
+ extend(event, args);
1095
+ document.querySelector('.reveal').dispatchEvent(event);
1096
+
1097
+ // If we're in an iframe, post each reveal.js event to the
1098
+ // parent window. Used by the notes plugin
1099
+ if (config.postMessageEvents && window.parent !== window.self) {
1100
+ window.parent.postMessage(
1101
+ JSON.stringify({
1102
+ namespace: 'reveal',
1103
+ eventName: type,
1104
+ state: deck.getState()
1105
+ }),
1106
+ '*'
1107
+ );
1108
+ }
1109
+ }
1110
+
1111
+ function select(selector, el) {
1112
+ if (!el) {
1113
+ el = document;
1114
+ }
1115
+ return el.querySelector(selector);
1116
+ }
1117
+
1118
+ function selectAll(selector, el) {
1119
+ if (!el) {
1120
+ el = document;
1121
+ }
1122
+ return Array.prototype.slice.call(el.querySelectorAll(selector));
1123
+ }
1124
+
1125
+ function create(tagName, attrs, content) {
1126
+ var el = document.createElement(tagName);
1127
+ if (attrs) {
1128
+ Object.getOwnPropertyNames(attrs).forEach(function (n) {
1129
+ el.setAttribute(n, attrs[n]);
1130
+ });
1131
+ }
1132
+ if (content) el.innerHTML = content;
1133
+ return el;
1134
+ }
1135
+
1136
+ function changeStylesheet(id, href) {
1137
+ // take note of the previous theme and remove it, then create a new stylesheet reference and insert it
1138
+ // this is required to force a load event so we can change the menu style to match the new style
1139
+ var stylesheet = select('link#' + id);
1140
+ var parent = stylesheet.parentElement;
1141
+ var sibling = stylesheet.nextElementSibling;
1142
+ stylesheet.remove();
1143
+
1144
+ var newStylesheet = stylesheet.cloneNode();
1145
+ newStylesheet.setAttribute('href', href);
1146
+ newStylesheet.onload = function () {
1147
+ matchRevealStyle();
1148
+ };
1149
+ parent.insertBefore(newStylesheet, sibling);
1150
+ }
1151
+
1152
+ // modified from math plugin
1153
+ function loadResource(url, type, callback) {
1154
+ var head = document.querySelector('head');
1155
+ var resource;
1156
+
1157
+ if (type === 'script') {
1158
+ resource = document.createElement('script');
1159
+ resource.type = 'text/javascript';
1160
+ resource.src = url;
1161
+ } else if (type === 'stylesheet') {
1162
+ resource = document.createElement('link');
1163
+ resource.rel = 'stylesheet';
1164
+ resource.href = url;
1165
+ }
1166
+
1167
+ // Wrapper for callback to make sure it only fires once
1168
+ var finish = function () {
1169
+ if (typeof callback === 'function') {
1170
+ callback.call();
1171
+ callback = null;
1172
+ }
1173
+ };
1174
+
1175
+ resource.onload = finish;
1176
+
1177
+ // IE
1178
+ resource.onreadystatechange = function () {
1179
+ if (this.readyState === 'loaded') {
1180
+ finish();
1181
+ }
1182
+ };
1183
+
1184
+ // Normal browsers
1185
+ head.appendChild(resource);
1186
+ }
1187
+
1188
+ function loadPlugin() {
1189
+ // does not support IE8 or below
1190
+ var supported = !ieVersion || ieVersion >= 9;
1191
+
1192
+ // do not load the menu in the upcoming slide panel in the speaker notes
1193
+ if (
1194
+ deck.isSpeakerNotes() &&
1195
+ window.location.search.endsWith('controls=false')
1196
+ ) {
1197
+ supported = false;
1198
+ }
1199
+
1200
+ if (supported) {
1201
+ if (!options.delayInit) initMenu();
1202
+ dispatchEvent('menu-ready');
1203
+ }
1204
+ }
1205
+
1206
+ return {
1207
+ id: 'menu',
1208
+ init: reveal => {
1209
+ deck = reveal;
1210
+ config = deck.getConfig();
1211
+ initOptions(config);
1212
+ loadResource(options.path + 'menu.css', 'stylesheet', function () {
1213
+ if (options.loadIcons === undefined || options.loadIcons) {
1214
+ loadResource(
1215
+ options.path + 'font-awesome/css/all.css',
1216
+ 'stylesheet',
1217
+ loadPlugin
1218
+ );
1219
+ } else {
1220
+ loadPlugin();
1221
+ }
1222
+ });
1223
+ },
1224
+
1225
+ toggle: toggleMenu,
1226
+ openMenu: openMenu,
1227
+ closeMenu: closeMenu,
1228
+ openPanel: openPanel,
1229
+ isOpen: isOpen,
1230
+ initialiseMenu: initMenu,
1231
+ isMenuInitialised: function () {
1232
+ return initialised;
1233
+ }
1234
+ };
1235
+ };
1236
+
1237
+ // polyfill
1238
+ if (!String.prototype.startsWith) {
1239
+ String.prototype.startsWith = function (searchString, position) {
1240
+ return this.substr(position || 0, searchString.length) === searchString;
1241
+ };
1242
+ }
1243
+ if (!String.prototype.endsWith) {
1244
+ String.prototype.endsWith = function (search, this_len) {
1245
+ if (this_len === undefined || this_len > this.length) {
1246
+ this_len = this.length;
1247
+ }
1248
+ return this.substring(this_len - search.length, this_len) === search;
1249
+ };
1250
+ }
1251
+
1252
+ export default Plugin;