@penskemediacorp/larva 1.2.0-alpha.0 → 1.3.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 (236) hide show
  1. package/.eslintignore +6 -0
  2. package/LICENSE +21 -0
  3. package/README.md +119 -4
  4. package/__tests__/fixtures/build/css/common.inline.css +1 -0
  5. package/__tests__/fixtures/build/images/test.png +0 -0
  6. package/__tests__/fixtures/build/js/larva-ui.js +1 -0
  7. package/__tests__/fixtures/build/svg/defs/sprite.svg +1 -0
  8. package/__tests__/fixtures/larva.config.js +43 -0
  9. package/__tests__/fixtures/public/some-library.js +1 -0
  10. package/__tests__/fixtures/src/patterns/__tests__/.gitkeep +0 -0
  11. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.featured.aia.js +3 -0
  12. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.featured.js +3 -0
  13. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.js +1 -0
  14. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.json +3 -0
  15. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.prototype.js +3 -0
  16. package/__tests__/fixtures/src/patterns/components/c-nav-link/c-nav-link.twig +3 -0
  17. package/__tests__/fixtures/src/patterns/components/c-tagline/c-tagline.prototype.js +3 -0
  18. package/__tests__/fixtures/src/patterns/modules/_also-ignored/_also-ignored.prototype.js +3 -0
  19. package/__tests__/fixtures/src/patterns/modules/_also-ignored/_also-ignored.twig +3 -0
  20. package/__tests__/fixtures/src/patterns/modules/ignore-me/ignore-me.prototype.js +0 -0
  21. package/__tests__/fixtures/src/patterns/modules/ignore-me/ignore-me.twig +0 -0
  22. package/__tests__/fixtures/src/patterns/modules/test-module/test-module.featured.js +3 -0
  23. package/__tests__/fixtures/src/patterns/modules/test-module/test-module.prototype.js +3 -0
  24. package/__tests__/fixtures/src/patterns/modules/test-module/test-module.twig +0 -0
  25. package/__tests__/fixtures/src/patterns/objects/_objects.scss +0 -0
  26. package/__tests__/fixtures/src/patterns/objects/o-crap/o-crap.json +3 -0
  27. package/__tests__/fixtures/src/patterns/objects/o-crap/o-crap.scss +0 -0
  28. package/__tests__/fixtures/src/patterns/objects/o-crap/o-crap.twig +1 -0
  29. package/__tests__/fixtures/src/patterns/objects/o-nav/o-nav.twig +14 -0
  30. package/__tests__/fixtures/src/patterns/one-offs/newswire/newswire.html +1 -0
  31. package/__tests__/fixtures/src/patterns/one-offs/newswire/newswire.prototype.js +3 -0
  32. package/__tests__/fixtures/template-parts/some-template.php +3 -0
  33. package/__tests__/lib/generateStatic.test.js +140 -0
  34. package/__tests__/lib/utils/clonePatternData.test.js +23 -0
  35. package/__tests__/lib/utils/getAllPatternsObj.test.js +45 -0
  36. package/__tests__/lib/utils/getAppConfiguration.test.js +13 -0
  37. package/__tests__/lib/utils/getModuleNamesFromDirectory.test.js +23 -0
  38. package/__tests__/lib/utils/getPatternData.test.js +55 -0
  39. package/__tests__/lib/utils/getPatternPathsToLoad.test.js +13 -0
  40. package/__tests__/lib/utils/getPatternRoutes.test.js +29 -0
  41. package/__tests__/lib/utils/getPatternType.test.js +16 -0
  42. package/__tests__/lib/utils/getPatternVariants.test.js +20 -0
  43. package/__tests__/lib/utils/getPatternsIndexPath.test.js +9 -0
  44. package/__tests__/lib/utils/getSubDirectoryNames.test.js +17 -0
  45. package/__tests__/lib/utils/isCoreTheme.test.js +12 -0
  46. package/__tests__/lib/utils/writeJsonToFile.test.js +29 -0
  47. package/__tests__/lib/writeJson.test.js +83 -0
  48. package/bin/larva.js +25 -0
  49. package/build/css/larva-important.css +1 -0
  50. package/build/css/larva-ui.css +1 -0
  51. package/build/css/larva.css +1 -0
  52. package/build/css/larva.inline-important.css +1 -0
  53. package/build/css/larva.inline.css +1 -0
  54. package/build/css/variety.compat-important.css +1 -0
  55. package/build/css/variety.compat.css +1 -0
  56. package/build/js/common.js +26 -0
  57. package/build/js/larva-ui.js +1 -0
  58. package/build/js/standalone/video-showcase.js +26 -0
  59. package/build/svg/brand-logo-white.svg +1 -0
  60. package/build/svg/brand-logo.svg +1 -0
  61. package/build/svg/defs/sprite.defs.html +852 -0
  62. package/build/svg/defs/sprite.defs.svg +1 -0
  63. package/build/tokens/artinamerica.custom-properties.css +546 -0
  64. package/build/tokens/artinamerica.json +533 -0
  65. package/build/tokens/artinamerica.map.scss +546 -0
  66. package/build/tokens/artinamerica.raw.json +4341 -0
  67. package/build/tokens/artnews.custom-properties.css +550 -0
  68. package/build/tokens/artnews.json +536 -0
  69. package/build/tokens/artnews.map.scss +550 -0
  70. package/build/tokens/artnews.raw.json +4373 -0
  71. package/build/tokens/bbpro.custom-properties.css +96 -0
  72. package/build/tokens/bbpro.json +80 -0
  73. package/build/tokens/bbpro.map.scss +96 -0
  74. package/build/tokens/bbpro.raw.json +789 -0
  75. package/build/tokens/billboard.custom-properties.css +96 -0
  76. package/build/tokens/billboard.json +80 -0
  77. package/build/tokens/billboard.map.scss +96 -0
  78. package/build/tokens/billboard.raw.json +789 -0
  79. package/build/tokens/deadline.custom-properties.css +533 -0
  80. package/build/tokens/deadline.json +517 -0
  81. package/build/tokens/deadline.map.scss +533 -0
  82. package/build/tokens/deadline.raw.json +4204 -0
  83. package/build/tokens/default.custom-properties.css +533 -0
  84. package/build/tokens/default.json +517 -0
  85. package/build/tokens/default.map.scss +533 -0
  86. package/build/tokens/default.raw.json +4204 -0
  87. package/build/tokens/dirt.custom-properties.css +81 -0
  88. package/build/tokens/dirt.json +66 -0
  89. package/build/tokens/dirt.map.scss +81 -0
  90. package/build/tokens/dirt.raw.json +690 -0
  91. package/build/tokens/indiewire.custom-properties.css +536 -0
  92. package/build/tokens/indiewire.json +520 -0
  93. package/build/tokens/indiewire.map.scss +536 -0
  94. package/build/tokens/indiewire.raw.json +4221 -0
  95. package/build/tokens/rivet.custom-properties.css +82 -0
  96. package/build/tokens/rivet.json +68 -0
  97. package/build/tokens/rivet.map.scss +82 -0
  98. package/build/tokens/rivet.raw.json +703 -0
  99. package/build/tokens/robbreport.custom-properties.css +536 -0
  100. package/build/tokens/robbreport.json +518 -0
  101. package/build/tokens/robbreport.map.scss +536 -0
  102. package/build/tokens/robbreport.raw.json +4215 -0
  103. package/build/tokens/rollingstone-2022.custom-properties.css +534 -0
  104. package/build/tokens/rollingstone-2022.json +519 -0
  105. package/build/tokens/rollingstone-2022.map.scss +534 -0
  106. package/build/tokens/rollingstone-2022.raw.json +4035 -0
  107. package/build/tokens/rollingstone.custom-properties.css +530 -0
  108. package/build/tokens/rollingstone.json +518 -0
  109. package/build/tokens/rollingstone.map.scss +530 -0
  110. package/build/tokens/rollingstone.raw.json +4207 -0
  111. package/build/tokens/sheknows.custom-properties.css +92 -0
  112. package/build/tokens/sheknows.json +76 -0
  113. package/build/tokens/sheknows.map.scss +92 -0
  114. package/build/tokens/sheknows.raw.json +761 -0
  115. package/build/tokens/sourcingjournal.custom-properties.css +87 -0
  116. package/build/tokens/sourcingjournal.json +70 -0
  117. package/build/tokens/sourcingjournal.map.scss +87 -0
  118. package/build/tokens/sourcingjournal.raw.json +720 -0
  119. package/build/tokens/sportico.custom-properties.css +73 -0
  120. package/build/tokens/sportico.json +59 -0
  121. package/build/tokens/sportico.map.scss +73 -0
  122. package/build/tokens/sportico.raw.json +640 -0
  123. package/build/tokens/thr.custom-properties.css +83 -0
  124. package/build/tokens/thr.json +67 -0
  125. package/build/tokens/thr.map.scss +83 -0
  126. package/build/tokens/thr.raw.json +698 -0
  127. package/build/tokens/variety-compat.custom-properties.css +36 -0
  128. package/build/tokens/variety-compat.json +33 -0
  129. package/build/tokens/variety-compat.map.scss +36 -0
  130. package/build/tokens/variety-compat.raw.json +224 -0
  131. package/build/tokens/variety-vip.custom-properties.css +532 -0
  132. package/build/tokens/variety-vip.json +521 -0
  133. package/build/tokens/variety-vip.map.scss +532 -0
  134. package/build/tokens/variety-vip.raw.json +4223 -0
  135. package/build/tokens/variety.custom-properties.css +534 -0
  136. package/build/tokens/variety.json +521 -0
  137. package/build/tokens/variety.map.scss +534 -0
  138. package/build/tokens/variety.raw.json +4225 -0
  139. package/build/tokens/vibe.custom-properties.css +77 -0
  140. package/build/tokens/vibe.json +63 -0
  141. package/build/tokens/vibe.map.scss +77 -0
  142. package/build/tokens/vibe.raw.json +668 -0
  143. package/build/tokens/wwd-2021.custom-properties.css +82 -0
  144. package/build/tokens/wwd-2021.json +67 -0
  145. package/build/tokens/wwd-2021.map.scss +82 -0
  146. package/build/tokens/wwd-2021.raw.json +701 -0
  147. package/build/tokens/wwd-beauty.custom-properties.css +86 -0
  148. package/build/tokens/wwd-beauty.json +70 -0
  149. package/build/tokens/wwd-beauty.map.scss +86 -0
  150. package/build/tokens/wwd-beauty.raw.json +719 -0
  151. package/build/tokens/wwd-dd.custom-properties.css +18 -0
  152. package/build/tokens/wwd-dd.json +13 -0
  153. package/build/tokens/wwd-dd.map.scss +18 -0
  154. package/build/tokens/wwd-dd.raw.json +90 -0
  155. package/build/tokens/wwd.custom-properties.css +70 -0
  156. package/build/tokens/wwd.json +60 -0
  157. package/build/tokens/wwd.map.scss +70 -0
  158. package/build/tokens/wwd.raw.json +643 -0
  159. package/index.js +7 -0
  160. package/lib/generateStatic.js +133 -0
  161. package/lib/server.js +284 -0
  162. package/lib/start.js +7 -0
  163. package/lib/utils/clonePatternData.js +13 -0
  164. package/lib/utils/copySyncHelper.js +33 -0
  165. package/lib/utils/getAllPatternsObj.js +48 -0
  166. package/lib/utils/getAppConfiguration.js +82 -0
  167. package/lib/utils/getArgsFromCli.js +3 -0
  168. package/lib/utils/getModuleNamesFromDirectory.js +11 -0
  169. package/lib/utils/getPatternData.js +34 -0
  170. package/lib/utils/getPatternPathsToLoad.js +20 -0
  171. package/lib/utils/getPatternRoutes.js +58 -0
  172. package/lib/utils/getPatternType.js +15 -0
  173. package/lib/utils/getPatternVariants.js +24 -0
  174. package/lib/utils/getPatternsIndexPath.js +11 -0
  175. package/lib/utils/getSubDirectoryNames.js +23 -0
  176. package/lib/utils/isCoreTheme.js +8 -0
  177. package/lib/utils/renderSass.js +20 -0
  178. package/lib/utils/spawnScript.js +26 -0
  179. package/lib/utils/writeJsonToFile.js +6 -0
  180. package/lib/writeJson.js +53 -0
  181. package/package.json +72 -5
  182. package/public/webfontloader.js +22 -0
  183. package/scripts/build-html.js +52 -0
  184. package/scripts/build-icons.js +80 -0
  185. package/scripts/build-scss.js +15 -0
  186. package/scripts/config/.eslintrc.json +11 -0
  187. package/scripts/config/gulpfile.js +191 -0
  188. package/scripts/config/stylelint.config.js +5 -0
  189. package/scripts/config/svgo-config.json +67 -0
  190. package/scripts/config/webpack.config.js +95 -0
  191. package/scripts/dev-js.js +13 -0
  192. package/scripts/dev-scss.js +20 -0
  193. package/scripts/help.js +65 -0
  194. package/scripts/init.js +21 -0
  195. package/scripts/larva/.nvmrc +1 -0
  196. package/scripts/larva/README.md +29 -0
  197. package/scripts/larva/larva.config.js +3 -0
  198. package/scripts/larva/src/patterns/README.md +3 -0
  199. package/scripts/larva/src/patterns/base.html +6 -0
  200. package/scripts/larva/src/patterns/components/README.md +3 -0
  201. package/scripts/larva/src/patterns/modules/README.md +3 -0
  202. package/scripts/larva/src/patterns/objects/README.md +3 -0
  203. package/scripts/larva/src/patterns/one-offs/README.md +3 -0
  204. package/scripts/link-all.js +40 -0
  205. package/scripts/lint-js.js +11 -0
  206. package/scripts/lint-scss.js +13 -0
  207. package/scripts/lint.js +73 -0
  208. package/scripts/prod-js.js +12 -0
  209. package/scripts/prod-scss.js +24 -0
  210. package/scripts/prod.js +122 -0
  211. package/scripts/server.js +11 -0
  212. package/scripts/start.js +36 -0
  213. package/scripts/upgrade.js +99 -0
  214. package/scripts/write-json.js +14 -0
  215. package/.DS_Store +0 -0
  216. package/__tests__/larva.test.js +0 -7
  217. package/lib/larva.js +0 -7
  218. package/lib/patterns.js +0 -48
  219. package/setup.scss +0 -1
  220. package/src/02-generic/breakpoint-label.scss +0 -33
  221. package/src/06-algorithms/a-glue/a-glue.html +0 -4
  222. package/src/06-algorithms/a-glue/a-glue.scss +0 -56
  223. package/src/06-algorithms/a-glue/index.js +0 -1
  224. package/src/06-algorithms/a-grid.scss +0 -29
  225. package/src/07-utilities/u-background.scss +0 -5
  226. package/src/07-utilities/u-color.scss +0 -5
  227. package/src/07-utilities/u-crop.scss +0 -5
  228. package/src/07-utilities/u-flex.scss +0 -35
  229. package/src/07-utilities/u-margin.scss +0 -5
  230. package/src/07-utilities/u-padding.scss +0 -5
  231. package/src/07-utilities/u-text.scss +0 -33
  232. package/src/07-utilities/utilities.scss +0 -5
  233. package/static/css/components.css +0 -4
  234. package/static/css/objects.css +0 -21
  235. package/static/css/prism.css +0 -126
  236. package/static/js/prism.js +0 -8
@@ -1,126 +0,0 @@
1
- /* PrismJS 1.16.0
2
- https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+json */
3
- /**
4
- * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
5
- * Based on https://github.com/chriskempson/tomorrow-theme
6
- * @author Rose Pritchard
7
- */
8
-
9
- code[class*="language-"],
10
- pre[class*="language-"] {
11
- color: #ccc;
12
- background: none;
13
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
14
- font-size: 1em;
15
- text-align: left;
16
- white-space: pre;
17
- word-spacing: normal;
18
- word-break: normal;
19
- word-wrap: normal;
20
- line-height: 1.5;
21
-
22
- -moz-tab-size: 4;
23
- -o-tab-size: 4;
24
- tab-size: 4;
25
-
26
- -webkit-hyphens: none;
27
- -moz-hyphens: none;
28
- -ms-hyphens: none;
29
- hyphens: none;
30
-
31
- }
32
-
33
- /* Code blocks */
34
- pre[class*="language-"] {
35
- padding: 1em;
36
- margin: .5em 0;
37
- overflow: auto;
38
- }
39
-
40
- :not(pre) > code[class*="language-"],
41
- pre[class*="language-"] {
42
- background: #2d2d2d;
43
- }
44
-
45
- /* Inline code */
46
- :not(pre) > code[class*="language-"] {
47
- padding: .1em;
48
- border-radius: .3em;
49
- white-space: normal;
50
- }
51
-
52
- .token.comment,
53
- .token.block-comment,
54
- .token.prolog,
55
- .token.doctype,
56
- .token.cdata {
57
- color: #999;
58
- }
59
-
60
- .token.punctuation {
61
- color: #ccc;
62
- }
63
-
64
- .token.tag,
65
- .token.attr-name,
66
- .token.namespace,
67
- .token.deleted {
68
- color: #e2777a;
69
- }
70
-
71
- .token.function-name {
72
- color: #6196cc;
73
- }
74
-
75
- .token.boolean,
76
- .token.number,
77
- .token.function {
78
- color: #f08d49;
79
- }
80
-
81
- .token.property,
82
- .token.class-name,
83
- .token.constant,
84
- .token.symbol {
85
- color: #f8c555;
86
- }
87
-
88
- .token.selector,
89
- .token.important,
90
- .token.atrule,
91
- .token.keyword,
92
- .token.builtin {
93
- color: #cc99cd;
94
- }
95
-
96
- .token.string,
97
- .token.char,
98
- .token.attr-value,
99
- .token.regex,
100
- .token.variable {
101
- color: #7ec699;
102
- }
103
-
104
- .token.operator,
105
- .token.entity,
106
- .token.url {
107
- color: #67cdcc;
108
- }
109
-
110
- .token.important,
111
- .token.bold {
112
- font-weight: bold;
113
- }
114
- .token.italic {
115
- font-style: italic;
116
- }
117
-
118
- .token.entity {
119
- cursor: help;
120
- }
121
-
122
- .token.inserted {
123
- color: green;
124
- }
125
-
126
-
@@ -1,8 +0,0 @@
1
- /* PrismJS 1.16.0
2
- https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+json */
3
- var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function n(e,t){var r,a,i=C.util.type(e);switch(t=t||{},i){case"Object":if(a=C.util.objId(e),t[a])return t[a];for(var l in r={},t[a]=r,e)e.hasOwnProperty(l)&&(r[l]=n(e[l],t));return r;case"Array":return a=C.util.objId(e),t[a]?t[a]:(r=[],t[a]=r,e.forEach(function(e,a){r[a]=n(e,t)}),r);default:return e}}},languages:{extend:function(e,a){var n=C.util.clone(C.languages[e]);for(var t in a)n[t]=a[t];return n},insertBefore:function(n,e,a,t){var r=(t=t||C.languages)[n],i={};for(var l in r)if(r.hasOwnProperty(l)){if(l==e)for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);a.hasOwnProperty(l)||(i[l]=r[l])}var s=t[n];return t[n]=i,C.languages.DFS(C.languages,function(e,a){a===s&&e!=n&&(this[e]=i)}),i},DFS:function e(a,n,t,r){r=r||{};var i=C.util.objId;for(var l in a)if(a.hasOwnProperty(l)){n.call(a,l,a[l],t||l);var o=a[l],s=C.util.type(o);"Object"!==s||r[i(o)]?"Array"!==s||r[i(o)]||(r[i(o)]=!0,e(o,n,l,r)):(r[i(o)]=!0,e(o,n,null,r))}}},plugins:{},highlightAll:function(e,a){C.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,n){var t={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",t);for(var r,i=t.elements||e.querySelectorAll(t.selector),l=0;r=i[l++];)C.highlightElement(r,!0===a,t.callback)},highlightElement:function(e,a,n){for(var t,r="none",i=e;i&&!c.test(i.className);)i=i.parentNode;i&&(r=(i.className.match(c)||[,"none"])[1].toLowerCase(),t=C.languages[r]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r,e.parentNode&&(i=e.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+r));var l={element:e,language:r,grammar:t,code:e.textContent},o=function(e){l.highlightedCode=e,C.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,C.hooks.run("after-highlight",l),C.hooks.run("complete",l),n&&n.call(l.element)};if(C.hooks.run("before-sanity-check",l),l.code)if(C.hooks.run("before-highlight",l),l.grammar)if(a&&g.Worker){var s=new Worker(C.filename);s.onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else o(C.highlight(l.code,l.grammar,l.language));else o(C.util.encode(l.code));else C.hooks.run("complete",l)},highlight:function(e,a,n){var t={code:e,grammar:a,language:n};return C.hooks.run("before-tokenize",t),t.tokens=C.tokenize(t.code,t.grammar),C.hooks.run("after-tokenize",t),M.stringify(C.util.encode(t.tokens),t.language)},matchGrammar:function(e,a,n,t,r,i,l){for(var o in n)if(n.hasOwnProperty(o)&&n[o]){if(o==l)return;var s=n[o];s="Array"===C.util.type(s)?s:[s];for(var g=0;g<s.length;++g){var c=s[g],u=c.inside,h=!!c.lookbehind,f=!!c.greedy,d=0,m=c.alias;if(f&&!c.pattern.global){var p=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+"g")}c=c.pattern||c;for(var y=t,v=r;y<a.length;v+=a[y].length,++y){var k=a[y];if(a.length>e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A<O&&(P<w||!a[A].type&&!a[A-1].greedy);++A)(P+=a[A].length)<=b&&(++y,v=P);if(a[y]instanceof M)continue;N=A-y,k=e.slice(v,P),x.index-=v}else{c.lastIndex=0;var x=c.exec(k),N=1}if(x){h&&(d=x[1]?x[1].length:0);w=(b=x.index+d)+(x=x[0].slice(d)).length;var j=k.slice(0,b),S=k.slice(w),E=[y,N];j&&(++y,v+=j.length,E.push(j));var _=new M(o,u?C.tokenize(x,u):x,m,x,f);if(E.push(_),S&&E.push(S),Array.prototype.splice.apply(a,E),1!=N&&C.matchGrammar(e,a,n,y,v,!0,o),i)break}else if(i)break}}}}},tokenize:function(e,a){var n=[e],t=a.rest;if(t){for(var r in t)a[r]=t[r];delete a.rest}return C.matchGrammar(e,n,a,0,0,!1),n},hooks:{all:{},add:function(e,a){var n=C.hooks.all;n[e]=n[e]||[],n[e].push(a)},run:function(e,a){var n=C.hooks.all[e];if(n&&n.length)for(var t,r=0;t=n[r++];)t(a)}},Token:M};function M(e,a,n,t,r){this.type=e,this.content=a,this.alias=n,this.length=0|(t||"").length,this.greedy=!!r}if(g.Prism=C,M.stringify=function(e,a){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return M.stringify(e,a)}).join("");var n={type:e.type,content:M.stringify(e.content,a),tag:"span",classes:["token",e.type],attributes:{},language:a};if(e.alias){var t=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(n.classes,t)}C.hooks.run("wrap",n);var r=Object.keys(n.attributes).map(function(e){return e+'="'+(n.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+(r?" "+r:"")+">"+n.content+"</"+n.tag+">"},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,t=a.code,r=a.immediateClose;g.postMessage(C.highlight(t,C.languages[n],n)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
4
- Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var i={};i[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,a),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",i)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
5
- !function(s){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var e=s.languages.markup;e&&(e.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:e.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},e.tag))}(Prism);
6
- Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
7
- Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
8
- Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};