clean-jsdoc-theme 3.3.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +1 -1
  3. package/README.md +203 -310
  4. package/jsdoc-config.json +7 -5
  5. package/minify.js +48 -0
  6. package/package.json +10 -6
  7. package/publish.js +805 -870
  8. package/static/fonts/Inconsolata-Regular.ttf +0 -0
  9. package/static/fonts/OpenSans-Regular.ttf +0 -0
  10. package/static/fonts/WorkSans-Bold.ttf +0 -0
  11. package/static/scripts/core.js +576 -0
  12. package/static/scripts/core.min.js +23 -0
  13. package/static/scripts/resize.js +59 -54
  14. package/static/scripts/search.js +217 -56
  15. package/static/scripts/search.min.js +11 -0
  16. package/static/scripts/third-party/hljs-line-num.js +1 -0
  17. package/static/scripts/third-party/hljs.js +1173 -0
  18. package/static/scripts/third-party/popper.js +6 -0
  19. package/static/scripts/third-party/tippy.js +2 -0
  20. package/static/scripts/third-party/tocbot.js +1 -0
  21. package/static/styles/clean-jsdoc-theme-base.css +738 -190
  22. package/static/styles/clean-jsdoc-theme-dark.css +208 -121
  23. package/static/styles/clean-jsdoc-theme-light.css +241 -168
  24. package/static/styles/clean-jsdoc-theme.min.css +1 -0
  25. package/tmpl/container.tmpl +13 -12
  26. package/tmpl/details.tmpl +16 -16
  27. package/tmpl/examples.tmpl +3 -1
  28. package/tmpl/icons.tmpl +43 -5
  29. package/tmpl/layout.tmpl +60 -79
  30. package/tmpl/members.tmpl +1 -2
  31. package/tmpl/method.tmpl +3 -4
  32. package/tmpl/mobile-sidebar.tmpl +21 -0
  33. package/tmpl/navbar-actions.tmpl +19 -0
  34. package/tmpl/navbar-menu.tmpl +21 -0
  35. package/tmpl/navbar.tmpl +14 -0
  36. package/tmpl/returns.tmpl +1 -1
  37. package/tmpl/search.tmpl +17 -0
  38. package/tmpl/sidebar-items.tmpl +24 -0
  39. package/tmpl/sidebar-title.tmpl +10 -0
  40. package/tmpl/sidebar.tmpl +9 -0
  41. package/tmpl/source.tmpl +7 -2
  42. package/tmpl/toc.tmpl +4 -0
  43. package/helpers/navbarBuilder.js +0 -0
  44. package/static/fonts/MavenPro-Regular.ttf +0 -0
  45. package/static/fonts/Montserrat-Regular.ttf +0 -0
  46. package/static/fonts/Muli-Black.ttf +0 -0
  47. package/static/fonts/OFL-hind.txt +0 -93
  48. package/static/fonts/OFL-montserrat.txt +0 -93
  49. package/static/scripts/fix-code-block.js +0 -53
  50. package/static/scripts/fix-navbar.js +0 -25
  51. package/static/scripts/linenumber.js +0 -25
  52. package/static/scripts/misc.js +0 -217
  53. package/static/scripts/third-party/lang-css.js +0 -2
  54. package/static/scripts/third-party/prettify.js +0 -28
  55. package/static/styles/reset.css +0 -351
  56. package/static/styles/third-party/ionicons.min.css +0 -11
  57. package/static/styles/third-party/prettify-jsdoc.css +0 -111
  58. package/static/styles/third-party/prettify-tomorrow.css +0 -5
@@ -1,85 +1,90 @@
1
1
  /* global document */
2
+ // This file is @deprecated
2
3
 
3
4
  var NAVBAR_OPTIONS = {};
4
5
 
5
6
  (function() {
6
- var NAVBAR_RESIZE_LOCAL_STORAGE_KEY = 'NAVBAR_RESIZE_LOCAL_STORAGE_KEY';
7
+ var NAVBAR_RESIZE_LOCAL_STORAGE_KEY = 'NAVBAR_RESIZE_LOCAL_STORAGE_KEY';
7
8
 
8
- var navbar = document.querySelector('#navbar');
9
- var footer = document.querySelector('#footer');
10
- var mainSection = document.querySelector('#main');
11
- // eslint-disable-next-line no-undef
12
- var localStorageResizeObject = JSON.parse(localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY));
9
+ var navbar = document.querySelector('#navbar');
10
+ var footer = document.querySelector('#footer');
11
+ var mainSection = document.querySelector('#main');
12
+ // eslint-disable-next-line no-undef
13
+ var localStorageResizeObject = JSON.parse(
14
+ localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY)
15
+ );
13
16
 
14
- /**
17
+ /**
15
18
  * Check whether we have any resize value in local storage or not.
16
19
  * If we have resize value then resize the navbar.
17
20
  **/
18
- if (localStorageResizeObject) {
19
- navbar.style.width = localStorageResizeObject.width;
20
- mainSection.style.marginLeft = localStorageResizeObject.width;
21
- footer.style.marginLeft = localStorageResizeObject.width;
22
- }
21
+ if (localStorageResizeObject) {
22
+ navbar.style.width = localStorageResizeObject.width;
23
+ mainSection.style.marginLeft = localStorageResizeObject.width;
24
+ footer.style.marginLeft = localStorageResizeObject.width;
25
+ }
23
26
 
24
- var navbarSlider = document.querySelector('#navbar-resize');
27
+ var navbarSlider = document.querySelector('#navbar-resize');
25
28
 
26
- function resizeNavbar(event) {
27
- var pageX = event.pageX,
28
- pageXPlusPx = event.pageX + 'px',
29
- min = Number.parseInt(NAVBAR_OPTIONS.min, 10) || 300,
30
- max = Number.parseInt(NAVBAR_OPTIONS.max, 10) || 600;
29
+ function resizeNavbar(event) {
30
+ var pageX = event.pageX,
31
+ pageXPlusPx = event.pageX + 'px',
32
+ min = Number.parseInt(NAVBAR_OPTIONS.min, 10) || 300,
33
+ max = Number.parseInt(NAVBAR_OPTIONS.max, 10) || 600;
31
34
 
32
- /**
35
+ /**
33
36
  * Just to add some checks. If min is smaller then 10 then
34
37
  * user may accidentally end up reducing the size of navbar
35
38
  * less than 10. In that case user will not able to resize navbar
36
39
  * because navbar slider will be hidden.
37
40
  */
38
- if (min < 10) { min = 10; }
41
+ if (min < 10) {
42
+ min = 10;
43
+ }
39
44
 
40
- /**
45
+ /**
41
46
  * Only resize if pageX in range between min and max
42
47
  * allowed value.
43
48
  */
44
- if (min < pageX && pageX < max) {
45
- navbar.style.width = pageXPlusPx;
46
- mainSection.style.marginLeft = pageXPlusPx;
47
- footer.style.marginLeft = pageXPlusPx;
48
- }
49
- }
50
-
51
-
52
- function setupEventListeners() {
53
- // eslint-disable-next-line no-undef
54
- window.addEventListener('mousemove', resizeNavbar);
55
- // eslint-disable-next-line no-undef
56
- window.addEventListener('touchmove', resizeNavbar);
57
- }
58
-
59
- function afterRemovingEventListeners() {
60
- // eslint-disable-next-line no-undef
61
- localStorage.setItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY, JSON.stringify({
62
- width: navbar.style.width
63
- }));
64
- }
65
-
66
- function removeEventListeners() {
67
- // eslint-disable-next-line no-undef
68
- window.removeEventListener('mousemove', resizeNavbar);
69
- // eslint-disable-next-line no-undef
70
- window.removeEventListener('touchend', resizeNavbar);
71
- afterRemovingEventListeners();
49
+ if (min < pageX && pageX < max) {
50
+ navbar.style.width = pageXPlusPx;
51
+ mainSection.style.marginLeft = pageXPlusPx;
52
+ footer.style.marginLeft = pageXPlusPx;
72
53
  }
54
+ }
73
55
 
56
+ function setupEventListeners() {
57
+ // eslint-disable-next-line no-undef
58
+ window.addEventListener('mousemove', resizeNavbar);
59
+ // eslint-disable-next-line no-undef
60
+ window.addEventListener('touchmove', resizeNavbar);
61
+ }
74
62
 
75
- navbarSlider.addEventListener('mousedown', setupEventListeners);
76
- navbarSlider.addEventListener('touchstart', setupEventListeners);
63
+ function afterRemovingEventListeners() {
64
+ // eslint-disable-next-line no-undef
65
+ localStorage.setItem(
66
+ NAVBAR_RESIZE_LOCAL_STORAGE_KEY,
67
+ JSON.stringify({
68
+ width: navbar.style.width
69
+ })
70
+ );
71
+ }
72
+
73
+ function removeEventListeners() {
77
74
  // eslint-disable-next-line no-undef
78
- window.addEventListener('mouseup', removeEventListeners);
75
+ window.removeEventListener('mousemove', resizeNavbar);
76
+ // eslint-disable-next-line no-undef
77
+ window.removeEventListener('touchend', resizeNavbar);
78
+ afterRemovingEventListeners();
79
+ }
80
+
81
+ navbarSlider.addEventListener('mousedown', setupEventListeners);
82
+ navbarSlider.addEventListener('touchstart', setupEventListeners);
83
+ // eslint-disable-next-line no-undef
84
+ window.addEventListener('mouseup', removeEventListeners);
79
85
  })();
80
86
 
81
-
82
87
  // eslint-disable-next-line no-unused-vars
83
88
  function setupResizeOptions(options) {
84
- NAVBAR_OPTIONS = options;
89
+ NAVBAR_OPTIONS = options;
85
90
  }
@@ -1,83 +1,244 @@
1
1
  /* global document */
2
- function hideSearchList() {
3
- document.getElementById('search-item-ul').style.display = 'none';
2
+
3
+ var searchData;
4
+
5
+ function hideSearch() {
6
+ var container = document.querySelector('#search-container');
7
+
8
+ // eslint-disable-next-line no-undef
9
+ if (window.location.hash === '#search') {
10
+ // eslint-disable-next-line no-undef
11
+ history.go(-1);
12
+ }
13
+
14
+ // eslint-disable-next-line no-undef
15
+ window.onhashchange = null;
16
+
17
+ if (container) {
18
+ container.style.display = 'none';
19
+ }
4
20
  }
5
21
 
6
- function showSearchList() {
7
- document.getElementById('search-item-ul').style.display = 'block';
22
+ function listenKey(event) {
23
+ if (event.key === 'Escape') {
24
+ hideSearch();
25
+ // eslint-disable-next-line no-undef
26
+ window.removeEventListener('keyup', listenKey);
27
+ }
8
28
  }
9
29
 
10
- function checkClick(e) {
11
- if ( e.target.id !== 'search-box-input') {
12
- setTimeout(function() {
13
- hideSearchList();
14
- }, 60);
30
+ function showSearch() {
31
+ var container = document.querySelector('#search-container');
32
+ var input = document.querySelector('#search-input');
15
33
 
16
- /* eslint-disable-next-line */
17
- window.removeEventListener('click', checkClick);
18
- }
34
+ // eslint-disable-next-line no-undef
35
+ window.onhashchange = hideSearch;
36
+
37
+ // eslint-disable-next-line no-undef
38
+ if (window.location.hash !== '#search') {
39
+ // eslint-disable-next-line no-undef
40
+ history.pushState(null, null, '#search');
41
+ }
42
+
43
+ if (container) {
44
+ container.style.display = 'flex';
45
+ // eslint-disable-next-line no-undef
46
+ window.addEventListener('keyup', listenKey);
47
+ }
48
+
49
+ if (input) {
50
+ input.focus();
51
+ }
52
+ }
53
+
54
+ function fetchAllData(obj = {}) {
55
+ // eslint-disable-next-line no-undef
56
+ var url = baseURL + 'data/search.json';
57
+
58
+ fetch(url)
59
+ .then(function(d) {
60
+ return d.json();
61
+ })
62
+ .then(function(d) {
63
+ searchData = d.list;
64
+ if (typeof obj.onSuccess === 'function') {
65
+ obj.onSuccess(d.list);
66
+ }
67
+ })
68
+ .catch(function(error) {
69
+ console.error(error);
70
+ if (typeof obj.onError === 'function') {
71
+ obj.onError();
72
+ }
73
+ });
19
74
  }
20
75
 
21
- function search(list, options, keys, searchKey) {
22
- var defaultOptions = {
23
- shouldSort: true,
24
- threshold: 0.4,
25
- location: 0,
26
- distance: 100,
27
- maxPatternLength: 32,
28
- minMatchCharLength: 1,
29
- keys: keys
30
- };
76
+ function buildSearchResult(result) {
77
+ var output = '';
31
78
 
32
- var op = Object.assign({}, defaultOptions, options);
79
+ for (const res of result) {
80
+ var data = res.item;
81
+ var link = res.item.link.replace('<a href="', '').replace(/">.*/, '');
33
82
 
34
- // eslint-disable-next-line no-undef
35
- var searchIndex = Fuse.createIndex(op.keys, list);
83
+ output += `
84
+
85
+ <a href="${link}" class="search-result-item">
86
+ <div class="search-result-item-title">
87
+ ${data.title}
88
+ </div>
89
+ <div class="search-result-item-p">
90
+ ${data.description ? data.description : 'No description available.'}
91
+ </div>
92
+ </a>
93
+ `;
94
+ }
95
+
96
+ return output;
97
+ }
98
+
99
+ function getSearchResult(list, keys, searchKey) {
100
+ var defaultOptions = {
101
+ shouldSort: true,
102
+ threshold: 0.4,
103
+ location: 0,
104
+ distance: 100,
105
+ maxPatternLength: 32,
106
+ minMatchCharLength: 1,
107
+ keys: keys
108
+ };
109
+
110
+ // var op = Object.assign({}, defaultOptions, options);
111
+ var op = defaultOptions;
36
112
 
37
- /* eslint-disable-next-line */
113
+ // eslint-disable-next-line no-undef
114
+ var searchIndex = Fuse.createIndex(op.keys, list);
115
+
116
+ /* eslint-disable-next-line */
38
117
  var fuse = new Fuse(list, op, searchIndex);
39
118
 
40
- var result = fuse.search(searchKey);
119
+ var result = fuse.search(searchKey);
120
+
121
+ if (result.length > 20) {
122
+ result = result.slice(0, 20);
123
+ }
124
+
125
+ return result;
126
+ }
41
127
 
42
- console.log(result, result.length);
43
- if (result.length > 20) { result = result.slice(0, 20); }
128
+ function debounce(func, wait, immediate) {
129
+ var timeout;
130
+
131
+ return function() {
132
+ // eslint-disable-next-line consistent-this, no-invalid-this
133
+ var context = this,
134
+ args = arguments;
135
+
136
+ clearTimeout(timeout);
137
+ timeout = setTimeout(function() {
138
+ timeout = null;
139
+ if (!immediate) {
140
+ func.apply(context, args);
141
+ }
142
+ }, wait);
143
+ if (immediate && !timeout) {
144
+ func.apply(context, args);
145
+ }
146
+ };
147
+ }
44
148
 
45
- console.log(result);
46
- var searchUL = document.getElementById('search-item-ul');
149
+ function search(event) {
150
+ var value = event.target.value;
151
+ var resultBox = document.querySelector('#search-result-c');
152
+ var keys = ['title', 'description'];
47
153
 
48
- searchUL.innerHTML = '';
154
+ if (!resultBox) {
155
+ console.error('Search result container not found');
49
156
 
50
- if (result.length === 0) {
51
- searchUL.innerHTML += '<li class="p-h-n"> No Result Found </li>';
52
- } else {
53
- result.forEach(function(obj) {
54
- searchUL.innerHTML += '<li>' + obj.item.link + '</li>';
55
- });
157
+ return;
158
+ }
159
+
160
+ if (!value) {
161
+ resultBox.innerHTML = 'Type anything to view search result';
162
+
163
+ return;
164
+ }
165
+
166
+ function onSuccess(res) {
167
+ if (res.length === 0) {
168
+ resultBox.innerHTML =
169
+ 'No result found! Try some different combination.';
170
+
171
+ return;
56
172
  }
173
+ var output = buildSearchResult(res);
174
+
175
+ resultBox.innerHTML = output;
176
+ }
177
+
178
+ if (!searchData) {
179
+ resultBox.innerHTML = 'Loading...';
180
+
181
+ fetchAllData({
182
+ onSuccess: function(list) {
183
+ console.log('Onsucess');
184
+ var result = getSearchResult(list, keys, value);
185
+
186
+ onSuccess(result);
187
+ },
188
+ onError: function() {
189
+ resultBox.innerHTML = 'Failed to load result.';
190
+ }
191
+ });
192
+
193
+ return;
194
+ }
195
+
196
+ var result = getSearchResult(searchData, keys, value);
197
+
198
+ onSuccess(result);
57
199
  }
58
200
 
59
- /* eslint-disable-next-line */
60
- function setupSearch(list, options) {
61
- var inputBox = document.getElementById('search-box-input');
62
- var keys = ['title'];
63
-
64
- inputBox.addEventListener('keyup', function() {
65
- if (inputBox.value !== '') {
66
- showSearchList();
67
- search(list, options, keys, inputBox.value);
68
- }
69
- else { hideSearchList(); }
201
+ function onDomContentLoaded() {
202
+ var input = document.querySelector('#search-input');
203
+ var searchButton = document.querySelectorAll('.search-button');
204
+ var searchContainer = document.querySelector('#search-container');
205
+ var searchWrapper = document.querySelector('#search-wrapper');
206
+ var searchCloseButton = document.querySelector('#search-close-button');
207
+
208
+ var debouncedSearch = debounce(search, 300);
209
+
210
+ if (searchCloseButton) {
211
+ searchCloseButton.addEventListener('click', hideSearch);
212
+ }
213
+
214
+ if (searchButton) {
215
+ searchButton.forEach(function(item) {
216
+ item.addEventListener('click', showSearch);
70
217
  });
218
+ }
71
219
 
72
- inputBox.addEventListener('focus', function() {
73
- showSearchList();
74
- if (inputBox.value !== '') {
75
- search(list, options, keys, inputBox.value);
76
- }
220
+ if (searchContainer) {
221
+ searchContainer.addEventListener('click', hideSearch);
222
+ }
77
223
 
78
- /* eslint-disable-next-line */
79
- window.addEventListener('click', checkClick);
224
+ if (searchWrapper) {
225
+ searchWrapper.addEventListener('click', function(event) {
226
+ event.stopPropagation();
80
227
  });
228
+ }
229
+
230
+ if (input) {
231
+ input.addEventListener('keyup', debouncedSearch);
232
+ }
81
233
  }
82
234
 
235
+ // eslint-disable-next-line no-undef
236
+ window.addEventListener('DOMContentLoaded', onDomContentLoaded);
83
237
 
238
+ // eslint-disable-next-line no-undef
239
+ window.addEventListener('hashchange', function() {
240
+ // eslint-disable-next-line no-undef
241
+ if (window.location.hash === '#search') {
242
+ showSearch();
243
+ }
244
+ });
@@ -0,0 +1,11 @@
1
+ var searchData;function hideSearch(){var e=document.querySelector("#search-container");"#search"===window.location.hash&&history.go(-1),window.onhashchange=null,e&&(e.style.display="none")}function listenKey(e){"Escape"===e.key&&(hideSearch(),window.removeEventListener("keyup",listenKey))}function showSearch(){var e=document.querySelector("#search-container"),n=document.querySelector("#search-input");window.onhashchange=hideSearch,"#search"!==window.location.hash&&history.pushState(null,null,"#search"),e&&(e.style.display="flex",window.addEventListener("keyup",listenKey)),n&&n.focus()}function fetchAllData(n={}){var e=baseURL+"data/search.json";fetch(e).then(function(e){return e.json()}).then(function(e){searchData=e.list,"function"==typeof n.onSuccess&&n.onSuccess(e.list)}).catch(function(e){console.error(e),"function"==typeof n.onError&&n.onError()})}function buildSearchResult(e){var n="";for(const r of e){var t=r.item;n+=`
2
+
3
+ <a href="${r.item.link.replace('<a href="',"").replace(/">.*/,"")}" class="search-result-item">
4
+ <div class="search-result-item-title">
5
+ ${t.title}
6
+ </div>
7
+ <div class="search-result-item-p">
8
+ ${t.description||"No description available."}
9
+ </div>
10
+ </a>
11
+ `}return n}function getSearchResult(e,n,t){var n={shouldSort:!0,threshold:.4,location:0,distance:100,maxPatternLength:32,minMatchCharLength:1,keys:n},r=Fuse.createIndex(n.keys,e),e=new Fuse(e,n,r).search(t);return e=20<e.length?e.slice(0,20):e}function debounce(t,r,o){var c;return function(){var e=this,n=arguments;clearTimeout(c),c=setTimeout(function(){c=null,o||t.apply(e,n)},r),o&&!c&&t.apply(e,n)}}function search(e){var n=e.target.value,t=document.querySelector("#search-result-c"),r=["title","description"];if(t)if(n){if(!searchData)return t.innerHTML="Loading...",void fetchAllData({onSuccess:function(e){console.log("Onsucess"),o(getSearchResult(e,r,n))},onError:function(){t.innerHTML="Failed to load result."}});o(getSearchResult(searchData,r,n))}else t.innerHTML="Type anything to view search result";else console.error("Search result container not found");function o(e){0===e.length?t.innerHTML="No result found! Try some different combination.":(e=buildSearchResult(e),t.innerHTML=e)}}function onDomContentLoaded(){var e=document.querySelector("#search-input"),n=document.querySelectorAll(".search-button"),t=document.querySelector("#search-container"),r=document.querySelector("#search-wrapper"),o=document.querySelector("#search-close-button"),c=debounce(search,300);o&&o.addEventListener("click",hideSearch),n&&n.forEach(function(e){e.addEventListener("click",showSearch)}),t&&t.addEventListener("click",hideSearch),r&&r.addEventListener("click",function(e){e.stopPropagation()}),e&&e.addEventListener("keyup",c)}window.addEventListener("DOMContentLoaded",onDomContentLoaded),window.addEventListener("hashchange",function(){"#search"===window.location.hash&&showSearch()});
@@ -0,0 +1 @@
1
+ !function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a<o&&(i=o,o=a,a=i,i=l,l=s,s=i);0!==n.indexOf(l);)l=l.slice(1);for(;-1===n.lastIndexOf(s);)s=s.slice(0,-1);for(var c=l,u=function(e){for(var n=e;"TABLE"!==n.nodeName;)n=n.parentNode;return n}(t),d=o+1;d<a;++d){var f=p('.{0}[{1}="{2}"]',[h,m,d]);c+="\n"+u.querySelector(f).textContent}return c+="\n"+s}function n(e){try{var n=o.querySelectorAll("code.hljs,code.nohighlight");for(var t in n)n.hasOwnProperty(t)&&(n[t].classList.contains("nohljsln")||d(n[t],e))}catch(e){r.console.error("LineNumbers error: ",e)}}function d(e,n){"object"==typeof e&&r.setTimeout(function(){e.innerHTML=f(e,n)},0)}function f(e,n){var t,r,o=(t=e,{singleLine:function(e){return!!e.singleLine&&e.singleLine}(r=(r=n)||{}),startFrom:function(e,n){var t=1;isFinite(n.startFrom)&&(t=n.startFrom);var r=function(e,n){return e.hasAttribute(n)?e.getAttribute(n):null}(e,"data-ln-start-from");return null!==r&&(t=function(e,n){if(!e)return n;var t=Number(e);return isFinite(t)?t:n}(r,1)),t}(t,r)});return function e(n){var t=n.childNodes;for(var r in t){var o;t.hasOwnProperty(r)&&(o=t[r],0<(o.textContent.trim().match(a)||[]).length&&(0<o.childNodes.length?e(o):v(o.parentNode)))}}(e),function(e,n){var t=g(e);""===t[t.length-1].trim()&&t.pop();if(1<t.length||n.singleLine){for(var r="",o=0,a=t.length;o<a;o++)r+=p('<tr><td class="{0} {1}" {3}="{5}"><div class="{2}" {3}="{5}"></div></td><td class="{0} {4}" {3}="{5}">{6}</td></tr>',[l,s,c,m,h,o+n.startFrom,0<t[o].length?t[o]:" "]);return p('<table class="{0}">{1}</table>',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r<t.length;r++){o+=p('<span class="{0}">{1}</span>\n',[n,0<t[r].length?t[r]:" "])}e.innerHTML=o.trim()}}function g(e){return 0===e.length?[]:e.split(a)}function p(e,t){return e.replace(/\{(\d+)\}/g,function(e,n){return void 0!==t[n]?t[n]:e})}r.hljs?(r.hljs.initLineNumbersOnLoad=function(e){"interactive"===o.readyState||"complete"===o.readyState?n(e):r.addEventListener("DOMContentLoaded",function(){n(e)})},r.hljs.lineNumbersBlock=d,r.hljs.lineNumbersValue=function(e,n){if("string"!=typeof e)return;var t=document.createElement("code");return t.innerHTML=e,f(t,n)},(e=o.createElement("style")).type="text/css",e.innerHTML=p(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[i,c,m]),o.getElementsByTagName("head")[0].appendChild(e)):r.console.error("highlight.js not detected!"),document.addEventListener("copy",function(e){var n,t=window.getSelection();!function(e){for(var n=e;n;){if(n.className&&-1!==n.className.indexOf("hljs-ln-code"))return 1;n=n.parentNode}}(t.anchorNode)||(n=-1!==window.navigator.userAgent.indexOf("Edge")?u(t):t.toString(),e.clipboardData.setData("text/plain",n),e.preventDefault())})}(window,document);