Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sass-true

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-true - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

_index.scss

21

CHANGELOG.md
# True Changelog
## 6.0.0 (07/22/20)
- BREAKING: Switch to [Dart Sass](https://sass-lang.com/dart-sass) with [Sass
module system](https://sass-lang.com/blog/the-module-system-is-launched),
dropping support for [Node Sass](https://github.com/sass/node-sass).
- BREAKING: Drop support for node < 10
- BREAKING: Rename `$true-terminal-output` setting to `$terminal-output`
when importing as a module (with `@use`).
Projects not using Sass modules can still
`@import '<path>/sass-true/sass/true'`
and access the setting as `$true-terminal-output`
- FEATURE: Added `_index.scss` at the project root,
for simpler import path: `@use '<path>/sass-true'`
- FEATURE: New `sass/_throw.scss` module provides:
- `error()` function & mixin for establishing "catchable" errors
- global `$catch-errors` toggles how `error()` output is handled
- FEATURE: Support testing `content` properties which include a curly brace.
- Update dependencies
## 5.0.0 (06/03/19)

@@ -156,3 +175,3 @@

- `pass()` and `fail()` for tracking and reporting individual results.
- `start-test-module()` and `report-test-results()` for module results.
- `start-test-module()` and `report-test-result()` for module results.
- Includes tests of the testing tools!

9

CONTRIBUTING.md

@@ -9,7 +9,7 @@ # Contributing to True

we ask you to follow the
[Sass community guidelines](http://sass-lang.com/community-guidelines).
[Sass community guidelines](https://sass-lang.com/community-guidelines).
## Pull Requests
We use the `master` branch for production-ready code,
We use the `main` branch for production-ready code,
and side-branches for everything in-progress

@@ -23,3 +23,4 @@ or up-for-debate.

and make sure all tests are passing (`yarn test`)
- Add your changes to the [changelog](CHANGELOG.md)
- Add your changes to the
[changelog](https://github.com/oddbird/true/blob/main/CHANGELOG.md)
- Update or write appropriate [SassDoc](http://sassdoc.com/)

@@ -51,3 +52,3 @@ inline documentation for your changes

# lint
gulp sasslint
yarn lint

@@ -54,0 +55,0 @@ # test with mocha/jest and true

@@ -1,4 +0,4 @@

(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+3Jt":function(e,n,t){"use strict";t.r(n),function(e){t("AzGU"),t("dYcP"),t("5KAr");var n=t("YEG7"),a=t.n(n),i=t("t3mS");e(function(){window.$=e,a.a.initHighlighting(),i.c(),i.a(),i.b()})}.call(this,t("26+0"))},"5KAr":function(e,n,t){var a,i,r;i=this,r=window.srcDoc,void 0===(a=function(e){!function(e,n){var t,a,i,r=!!("srcdoc"in document.createElement("iframe")),s="Polyfill may not function in the presence of the `sandbox` attribute. Consider using the `force` option.",o=/\ballow-same-origin\b/,l=function(e,n){var t=e.getAttribute("sandbox");"string"!=typeof t||o.test(t)||(n&&n.force?e.removeAttribute("sandbox"):n&&!1===n.force||(i(s),e.setAttribute("data-srcdoc-polyfill",s)))},c={compliant:function(e,n,t){n&&(l(e,t),e.setAttribute("srcdoc",n))},legacy:function(e,n,t){var a;e&&e.getAttribute&&(n?e.setAttribute("srcdoc",n):n=e.getAttribute("srcdoc"),n&&(l(e,t),a="javascript: window.frameElement.getAttribute('srcdoc');",e.contentWindow&&(e.contentWindow.location=a),e.setAttribute("src",a)))}},d=e;if(i=window.console&&window.console.error?function(e){window.console.error("[srcdoc-polyfill] "+e)}:function(){},d.set=c.compliant,d.noConflict=function(){return window.srcDoc=n,d},!r)for(d.set=c.legacy,a=document.getElementsByTagName("iframe"),t=a.length;t--;)d.set(a[t])}(e,r),i.srcDoc=e}.apply(n,[n]))||(e.exports=a)},AzGU:function(e,n){
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+3Jt":function(e,n,t){"use strict";t.r(n),function(e){t("AzGU"),t("dYcP"),t("5KAr");var n=t("YEG7"),a=t.n(n),i=t("t3mS");e((function(){window.$=e,a.a.initHighlighting(),i.c(),i.a(),i.b()}))}.call(this,t("26+0"))},"5KAr":function(e,n,t){var a,i,r;i=this,r=window.srcDoc,void 0===(a=function(e){!function(e,n){var t,a,i,r=!!("srcdoc"in document.createElement("iframe")),s="Polyfill may not function in the presence of the `sandbox` attribute. Consider using the `force` option.",o=/\ballow-same-origin\b/,l=function(e,n){var t=e.getAttribute("sandbox");"string"!=typeof t||o.test(t)||(n&&n.force?e.removeAttribute("sandbox"):n&&!1===n.force||(i(s),e.setAttribute("data-srcdoc-polyfill",s)))},c=function(e,n,t){n&&(l(e,t),e.setAttribute("srcdoc",n))},d=function(e,n,t){var a;e&&e.getAttribute&&(n?e.setAttribute("srcdoc",n):n=e.getAttribute("srcdoc"),n&&(l(e,t),a="javascript: window.frameElement.getAttribute('srcdoc');",e.contentWindow&&(e.contentWindow.location=a),e.setAttribute("src",a)))},g=e;if(i=window.console&&window.console.error?function(e){window.console.error("[srcdoc-polyfill] "+e)}:function(){},g.set=c,g.noConflict=function(){return window.srcDoc=n,g},!r)for(g.set=d,a=document.getElementsByTagName("iframe"),t=a.length;t--;)g.set(a[t])}(e,r),i.srcDoc=e}.apply(n,[n]))||(e.exports=a)},AzGU:function(e,n){
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license */
window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var n,t=document.createElement("style"),a=document.getElementsByTagName("script")[0];t.type="text/css",t.id="matchmediajs-test",a?a.parentNode.insertBefore(t,a):document.head.appendChild(t),n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var a="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=a:t.textContent=a,"1px"===n.width}}}return function(n){return{matches:e.matchMedium(n||"all"),media:n||"all"}}}())},YEG7:function(e,n,t){
window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var n,t=document.createElement("style"),a=document.getElementsByTagName("script")[0];t.type="text/css",t.id="matchmediajs-test",a?a.parentNode.insertBefore(t,a):document.head.appendChild(t),n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var a="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=a:t.textContent=a,"1px"===n.width}}}return function(n){return{matches:e.matchMedium(n||"all"),media:n||"all"}}}())},J4ja:function(e,n){e.exports={colors:{"brand-colors":{"brand-orange":"#c75000","brand-blue":"#0d7fa5","brand-pink":"#aa0e5c"},"neutral-colors":{"light-gray":"#dedede",gray:"#555b5e","contrast-light":"#fff","contrast-dark":"#3b4042"},"theme-colors":{"theme-dark":"#0d7fa5","theme-light":"#cfe5ed",background:"#fff",text:"#3b4042","text-light":"#555b5e",action:"#b91e6c",focus:"#0d7fa5",underline:"#eec7da",border:"#555b5e","border-light":"#dedede",shadow:"rgba(85,91,94,0.5)",callout:"#cfe5ed",slight:"#fafcfd",code:"#0d7fa5","code-shadow":"rgba(13,127,165,0.2)"},"hljs-colors":{"hljs-comment":"#93a1a1","hljs-green":"#859900","hljs-cyan":"#2aa198","hljs-blue":"#268bd2","hljs-yellow":"#b58900","hljs-orange":"#cb4b16","hljs-red":"#dc322f","hljs-formula":"#eee8d5"},"demo-colors":{"brand-blue":"#0d7fa5","brand-pink":"#e2127a"},"demo-noncolors":{"light-gray":"#dedede",gray:"#555b5e","contrast-dark":"#3b4042"}},ratios:{"text-ratios":{"line-height":1.4},"demo-ratios":{"line-height":1.4}},sizes:{"root-sizes":{root:"18px",responsive:"calc(1em + 0.125vw)",large:"calc(1rem + 0.5vw)",small:".9rem"},"text-sizes":{reset:"1rem",h1:"calc(1rem + 2vw)",h2:"calc(1rem + 1vw)",h3:"calc(1rem + 0.5vw)",quote:"calc(1rem + 0.5vw)",code:".9rem",footer:".9rem",search:".9rem"},"spacing-sizes":{rhythm:"1.4rem",gutter:"1.4rem","gutter-plus":"2.1rem","double-gutter":"2.8rem","flex-gutter":"calc(.7rem + 2.5vw)",spacer:"calc(4.2rem + 2.5vw)","gutter-minus":"1.05rem",shim:".7rem","half-shim":".35rem","quarter-shim":".175rem"},"pattern-sizes":{"nav-underline":"4px","nav-icon":"28px","arrow-border":"8px","arrow-depth":".7rem","arrow-side":"1.4rem","font-preview":"24em","specimen-aa":"4.2rem","color-preview":"16em","color-swatch":"5.6rem","footer-logo":"2.8rem"},"layout-sizes":{page:"50rem","item-break":"40em","page-break":"50em","nav-break":"65em"},"demo-sizes":{root:"18px",responsive:"calc(1.5em + 1vw)",xlarge:"3rem"},"demo-sizes-large":{box:"20em",page:"75ch"}},fonts:{sans:{name:"Source Sans Pro",source:"https://fonts.google.com/specimen/Source+Sans+Pro",stack:["Source Sans Pro","Helvetica Neue","Helvetica","Arial","sans-serif"]},code:{name:"Source Code Pro",source:"https://fonts.google.com/specimen/Source+Code+Pro",stack:["Source Code Pro","Consolas","Menlo","Monaco","Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New","monospace","sans-serif"]},"demo-cdn":{name:"Source Code Pro",source:"https://fonts.google.com/specimen/Source+Code+Pro",stack:["Consolas","Menlo","Courier New","monospace","sans-serif"]},"demo-local":{name:"rockingham",normal:{path:"rockingham/rockingham-regular-webfont",local:"rockingham-regular-webfont"},bold:"rockingham/rockingham-bold-webfont",italic:"rockingham/rockingham-italic-webfont","bold italic":"rockingham/rockingham-bolditalic-webfont",stack:"fantasy",formats:["woff2","woff","ttf"]}}}},YEG7:function(e,n,t){
/*! highlight.js v9.13.1 | BSD3 License | git.io/hljslicense */

@@ -8,4 +8,4 @@ /*! generated with command:

*/
!function(e){"object"==typeof window&&window||"object"==typeof self&&self;(function(e){var n=[],t=Object.keys,a={},i={},r=/^(no-?highlight|plain|text)$/i,s=/\blang(?:uage)?-([\w-]+)\b/i,o=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,l="</span>",c={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function d(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(e){return e.nodeName.toLowerCase()}function u(e,n){var t=e&&e.exec(n);return t&&0===t.index}function m(e){return r.test(e)}function b(e){var n,t={},a=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return a.forEach(function(e){for(n in e)t[n]=e[n]}),t}function f(e){var n=[];return function e(t,a){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=e(i,a),g(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function p(e){function n(e){return e&&e.source||e}function a(t,a){return new RegExp(n(t),"m"+(e.case_insensitive?"i":"")+(a?"g":""))}!function i(r,s){if(r.compiled)return;r.compiled=!0;r.keywords=r.keywords||r.beginKeywords;if(r.keywords){var o={},l=function(n,t){e.case_insensitive&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof r.keywords?l("keyword",r.keywords):t(r.keywords).forEach(function(e){l(e,r.keywords[e])}),r.keywords=o}r.lexemesRe=a(r.lexemes||/\w+/,!0);s&&(r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")\\b"),r.begin||(r.begin=/\B|\b/),r.beginRe=a(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(r.endRe=a(r.end)),r.terminator_end=n(r.end)||"",r.endsWithParent&&s.terminator_end&&(r.terminator_end+=(r.end?"|":"")+s.terminator_end));r.illegal&&(r.illegalRe=a(r.illegal));null==r.relevance&&(r.relevance=1);r.contains||(r.contains=[]);r.contains=Array.prototype.concat.apply([],r.contains.map(function(e){return function(e){e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map(function(n){return b(e,{variants:null},n)}));return e.cached_variants||e.endsWithParent&&[b(e)]||[e]}("self"===e?r:e)}));r.contains.forEach(function(e){i(e,r)});r.starts&&i(r.starts,s);var c=r.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([r.terminator_end,r.illegal]).map(n).filter(Boolean);r.terminators=c.length?a(c.join("|"),!0):{exec:function(){return null}}}(e)}function h(e,n,t,i){function r(e,n){var t=b.case_insensitive?n[0].toLowerCase():n[0];return e.keywords.hasOwnProperty(t)&&e.keywords[t]}function s(e,n,t,a){var i=a?"":c.classPrefix,r='<span class="'+i,s=t?"":l;return(r+=e+'">')+n+s}function o(){v+=null!=w.subLanguage?function(){var e="string"==typeof w.subLanguage;if(e&&!a[w.subLanguage])return d(y);var n=e?h(w.subLanguage,y,!0,_[w.subLanguage]):E(y,w.subLanguage.length?w.subLanguage:void 0);w.relevance>0&&(x+=n.relevance);e&&(_[w.subLanguage]=n.top);return s(n.language,n.value,!1,!0)}():function(){var e,n,t,a;if(!w.keywords)return d(y);a="",n=0,w.lexemesRe.lastIndex=0,t=w.lexemesRe.exec(y);for(;t;)a+=d(y.substring(n,t.index)),(e=r(w,t))?(x+=e[1],a+=s(e[0],d(t[0]))):a+=d(t[0]),n=w.lexemesRe.lastIndex,t=w.lexemesRe.exec(y);return a+d(y.substr(n))}(),y=""}function g(e){v+=e.className?s(e.className,"",!0):"",w=Object.create(e,{parent:{value:w}})}function m(e,n){if(y+=e,null==n)return o(),0;var a=function(e,n){var t,a;for(t=0,a=n.contains.length;t<a;t++)if(u(n.contains[t].beginRe,e))return n.contains[t].endSameAsBegin&&(n.contains[t].endRe=(i=n.contains[t].beginRe.exec(e)[0],new RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m"))),n.contains[t];var i}(n,w);if(a)return a.skip?y+=n:(a.excludeBegin&&(y+=n),o(),a.returnBegin||a.excludeBegin||(y=n)),g(a),a.returnBegin?0:n.length;var i=function e(n,t){if(u(n.endRe,t)){for(;n.endsParent&&n.parent;)n=n.parent;return n}if(n.endsWithParent)return e(n.parent,t)}(w,n);if(i){var r=w;r.skip?y+=n:(r.returnEnd||r.excludeEnd||(y+=n),o(),r.excludeEnd&&(y=n));do{w.className&&(v+=l),w.skip||w.subLanguage||(x+=w.relevance),w=w.parent}while(w!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),g(i.starts)),r.returnEnd?0:n.length}if(function(e,n){return!t&&u(n.illegalRe,e)}(n,w))throw new Error('Illegal lexeme "'+n+'" for mode "'+(w.className||"<unnamed>")+'"');return y+=n,n.length||1}var b=N(e);if(!b)throw new Error('Unknown language: "'+e+'"');p(b);var f,w=i||b,_={},v="";for(f=w;f!==b;f=f.parent)f.className&&(v=s(f.className,"",!0)+v);var y="",x=0;try{for(var M,O,S=0;w.terminators.lastIndex=S,M=w.terminators.exec(n);)O=m(n.substring(S,M.index),M[0]),S=M.index+O;for(m(n.substr(S)),f=w;f.parent;f=f.parent)f.className&&(v+=l);return{relevance:x,value:v,language:e,top:w}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{relevance:0,value:d(n)};throw e}}function E(e,n){n=n||c.languages||t(a);var i={relevance:0,value:d(e)},r=i;return n.filter(N).filter(y).forEach(function(n){var t=h(n,e,!1);t.language=n,t.relevance>r.relevance&&(r=t),t.relevance>i.relevance&&(r=i,i=t)}),r.language&&(i.second_best=r),i}function w(e){return c.tabReplace||c.useBR?e.replace(o,function(e,n){return c.useBR&&"\n"===e?"<br>":c.tabReplace?n.replace(/\t/g,c.tabReplace):""}):e}function _(e){var t,a,r,o,l,u=function(e){var n,t,a,i,r=e.className+" ";if(r+=e.parentNode?e.parentNode.className:"",t=s.exec(r))return N(t[1])?t[1]:"no-highlight";for(r=r.split(/\s+/),n=0,a=r.length;n<a;n++)if(m(i=r[n])||N(i))return i}(e);m(u)||(c.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n"):t=e,l=t.textContent,r=u?h(u,l,!0):E(l),(a=f(t)).length&&((o=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=r.value,r.value=function(e,t,a){var i=0,r="",s=[];function o(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){r+="<"+g(e)+n.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+d(e.value).replace('"',"&quot;")+'"'}).join("")+">"}function c(e){r+="</"+g(e)+">"}function u(e){("start"===e.event?l:c)(e.node)}for(;e.length||t.length;){var m=o();if(r+=d(a.substring(i,m[0].offset)),i=m[0].offset,m===e){s.reverse().forEach(c);do{u(m.splice(0,1)[0]),m=o()}while(m===e&&m.length&&m[0].offset===i);s.reverse().forEach(l)}else"start"===m[0].event?s.push(m[0].node):s.pop(),u(m.splice(0,1)[0])}return r+d(a.substr(i))}(a,f(o),l)),r.value=w(r.value),e.innerHTML=r.value,e.className=function(e,n,t){var a=n?i[n]:t,r=[e.trim()];e.match(/\bhljs\b/)||r.push("hljs");-1===e.indexOf(a)&&r.push(a);return r.join(" ").trim()}(e.className,u,r.language),e.result={language:r.language,re:r.relevance},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.relevance}))}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");n.forEach.call(e,_)}}function N(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]}function y(e){var n=N(e);return n&&!n.disableAutodetect}e.highlight=h,e.highlightAuto=E,e.fixMarkup=w,e.highlightBlock=_,e.configure=function(e){c=b(c,e)},e.initHighlighting=v,e.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)},e.registerLanguage=function(n,t){var r=a[n]=t(e);r.aliases&&r.aliases.forEach(function(e){i[e]=n})},e.listLanguages=function(){return t(a)},e.getLanguage=N,e.autoDetection=y,e.inherit=b,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.COMMENT=function(n,t,a){var i=e.inherit({className:"comment",begin:n,end:t,contains:[]},a||{});return i.contains.push(e.PHRASAL_WORDS_MODE),i.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),i},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e.registerLanguage("bash",function(e){var n={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]};return{aliases:["sh","zsh"],lexemes:/\b-?[a-z\._]+\b/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,t,{className:"string",begin:/'/,end:/'/},n]}}),e.registerLanguage("css",function(e){var n={begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}),e.registerLanguage("xml",function(e){var n={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[n],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[n],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},n]}]}}),e.registerLanguage("django",function(e){var n={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[n],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[n]}]}}),e.registerLanguage("javascript",function(e){var n="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},r={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,a,e.REGEXP_MODE];var s=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:t,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{begin:/[{,]\s*/,relevance:0,contains:[{begin:n+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:n,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+n+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:s}]}]},{begin:/</,end:/(\/\w+|\w+\/)>/,subLanguage:"xml",contains:[{begin:/<\w+\s*\/>/,skip:!0},{begin:/<\w+/,end:/(\/\w+|\w+\/)>/,skip:!0,contains:[{begin:/<\w+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:n}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:s}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}),e.registerLanguage("json",function(e){var n={literal:"true false null"},t=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:n},i={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})],illegal:"\\S"},r={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return t.splice(t.length,0,i,r),{contains:t,keywords:n,illegal:"\\S"}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}),e.registerLanguage("ruby",function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",t={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^\\=begin","^\\=end",{contains:[a],relevance:10}),e.COMMENT("^__END__","\\n$")],s={className:"subst",begin:"#\\{",end:"}",keywords:t},o={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<(-?)\w+$/,end:/^\s*\w+$/}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:t},c=[o,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),l].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[o,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:t},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);s.contains=c,l.contains=c;var d=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:t,illegal:/\/\*/,contains:r.concat(d).concat(c)}}),e.registerLanguage("scss",function(e){var n={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},t={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[n,t,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t,e.CSS_NUMBER_MODE,{begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),e.registerLanguage("shell",function(e){return{aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}),e.registerLanguage("yaml",function(e){var n="[a-zA-Z_][\\w\\-]*",t={className:"attr",variants:[{begin:"^[ \\-]*"+n+":"},{begin:'^[ \\-]*"'+n+'":'},{begin:"^[ \\-]*'"+n+"':"}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[t,{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>] *$",returnEnd:!0,contains:a.contains,end:t.variants[0].begin},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!"+e.UNDERSCORE_IDENT_RE},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"^ *-",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},e.C_NUMBER_MODE,a]}})})(n)}()},dYcP:function(e,n){
!function(e){"object"==typeof window&&window||"object"==typeof self&&self;(function(e){var n=[],t=Object.keys,a={},i={},r=/^(no-?highlight|plain|text)$/i,s=/\blang(?:uage)?-([\w-]+)\b/i,o=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,l={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function c(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function d(e){return e.nodeName.toLowerCase()}function g(e,n){var t=e&&e.exec(n);return t&&0===t.index}function u(e){return r.test(e)}function m(e){var n,t={},a=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return a.forEach((function(e){for(n in e)t[n]=e[n]})),t}function b(e){var n=[];return function e(t,a){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=e(i,a),d(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function f(e){function n(e){return e&&e.source||e}function a(t,a){return new RegExp(n(t),"m"+(e.case_insensitive?"i":"")+(a?"g":""))}!function i(r,s){if(!r.compiled){if(r.compiled=!0,r.keywords=r.keywords||r.beginKeywords,r.keywords){var o={},l=function(n,t){e.case_insensitive&&(t=t.toLowerCase()),t.split(" ").forEach((function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]}))};"string"==typeof r.keywords?l("keyword",r.keywords):t(r.keywords).forEach((function(e){l(e,r.keywords[e])})),r.keywords=o}r.lexemesRe=a(r.lexemes||/\w+/,!0),s&&(r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")\\b"),r.begin||(r.begin=/\B|\b/),r.beginRe=a(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(r.endRe=a(r.end)),r.terminator_end=n(r.end)||"",r.endsWithParent&&s.terminator_end&&(r.terminator_end+=(r.end?"|":"")+s.terminator_end)),r.illegal&&(r.illegalRe=a(r.illegal)),null==r.relevance&&(r.relevance=1),r.contains||(r.contains=[]),r.contains=Array.prototype.concat.apply([],r.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return m(e,{variants:null},n)}))),e.cached_variants||e.endsWithParent&&[m(e)]||[e]}("self"===e?r:e)}))),r.contains.forEach((function(e){i(e,r)})),r.starts&&i(r.starts,s);var c=r.contains.map((function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin})).concat([r.terminator_end,r.illegal]).map(n).filter(Boolean);r.terminators=c.length?a(c.join("|"),!0):{exec:function(){return null}}}}(e)}function p(e,n,t,i){function r(e){return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function s(e,n){var t=b.case_insensitive?n[0].toLowerCase():n[0];return e.keywords.hasOwnProperty(t)&&e.keywords[t]}function o(e,n,t,a){var i='<span class="'+(a?"":l.classPrefix);return(i+=e+'">')+n+(t?"":"</span>")}function d(){N+=null!=w.subLanguage?function(){var e="string"==typeof w.subLanguage;if(e&&!a[w.subLanguage])return c(y);var n=e?p(w.subLanguage,y,!0,_[w.subLanguage]):h(y,w.subLanguage.length?w.subLanguage:void 0);return w.relevance>0&&(x+=n.relevance),e&&(_[w.subLanguage]=n.top),o(n.language,n.value,!1,!0)}():function(){var e,n,t,a;if(!w.keywords)return c(y);for(a="",n=0,w.lexemesRe.lastIndex=0,t=w.lexemesRe.exec(y);t;)a+=c(y.substring(n,t.index)),(e=s(w,t))?(x+=e[1],a+=o(e[0],c(t[0]))):a+=c(t[0]),n=w.lexemesRe.lastIndex,t=w.lexemesRe.exec(y);return a+c(y.substr(n))}(),y=""}function u(e){N+=e.className?o(e.className,"",!0):"",w=Object.create(e,{parent:{value:w}})}function m(e,n){if(y+=e,null==n)return d(),0;var a=function(e,n){var t,a;for(t=0,a=n.contains.length;t<a;t++)if(g(n.contains[t].beginRe,e))return n.contains[t].endSameAsBegin&&(n.contains[t].endRe=r(n.contains[t].beginRe.exec(e)[0])),n.contains[t]}(n,w);if(a)return a.skip?y+=n:(a.excludeBegin&&(y+=n),d(),a.returnBegin||a.excludeBegin||(y=n)),u(a),a.returnBegin?0:n.length;var i=function e(n,t){if(g(n.endRe,t)){for(;n.endsParent&&n.parent;)n=n.parent;return n}if(n.endsWithParent)return e(n.parent,t)}(w,n);if(i){var s=w;s.skip?y+=n:(s.returnEnd||s.excludeEnd||(y+=n),d(),s.excludeEnd&&(y=n));do{w.className&&(N+="</span>"),w.skip||w.subLanguage||(x+=w.relevance),w=w.parent}while(w!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),u(i.starts)),s.returnEnd?0:n.length}if(function(e,n){return!t&&g(n.illegalRe,e)}(n,w))throw new Error('Illegal lexeme "'+n+'" for mode "'+(w.className||"<unnamed>")+'"');return y+=n,n.length||1}var b=v(e);if(!b)throw new Error('Unknown language: "'+e+'"');f(b);var E,w=i||b,_={},N="";for(E=w;E!==b;E=E.parent)E.className&&(N=o(E.className,"",!0)+N);var y="",x=0;try{for(var M,O,S=0;w.terminators.lastIndex=S,M=w.terminators.exec(n);)O=m(n.substring(S,M.index),M[0]),S=M.index+O;for(m(n.substr(S)),E=w;E.parent;E=E.parent)E.className&&(N+="</span>");return{relevance:x,value:N,language:e,top:w}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{relevance:0,value:c(n)};throw e}}function h(e,n){n=n||l.languages||t(a);var i={relevance:0,value:c(e)},r=i;return n.filter(v).filter(N).forEach((function(n){var t=p(n,e,!1);t.language=n,t.relevance>r.relevance&&(r=t),t.relevance>i.relevance&&(r=i,i=t)})),r.language&&(i.second_best=r),i}function E(e){return l.tabReplace||l.useBR?e.replace(o,(function(e,n){return l.useBR&&"\n"===e?"<br>":l.tabReplace?n.replace(/\t/g,l.tabReplace):""})):e}function w(e){var t,a,r,o,g,m=function(e){var n,t,a,i,r=e.className+" ";if(r+=e.parentNode?e.parentNode.className:"",t=s.exec(r))return v(t[1])?t[1]:"no-highlight";for(n=0,a=(r=r.split(/\s+/)).length;n<a;n++)if(u(i=r[n])||v(i))return i}(e);u(m)||(l.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n"):t=e,g=t.textContent,r=m?p(m,g,!0):h(g),(a=b(t)).length&&((o=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=r.value,r.value=function(e,t,a){var i=0,r="",s=[];function o(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){r+="<"+d(e)+n.map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+c(e.value).replace('"',"&quot;")+'"'})).join("")+">"}function g(e){r+="</"+d(e)+">"}function u(e){("start"===e.event?l:g)(e.node)}for(;e.length||t.length;){var m=o();if(r+=c(a.substring(i,m[0].offset)),i=m[0].offset,m===e){s.reverse().forEach(g);do{u(m.splice(0,1)[0]),m=o()}while(m===e&&m.length&&m[0].offset===i);s.reverse().forEach(l)}else"start"===m[0].event?s.push(m[0].node):s.pop(),u(m.splice(0,1)[0])}return r+c(a.substr(i))}(a,b(o),g)),r.value=E(r.value),e.innerHTML=r.value,e.className=function(e,n,t){var a=n?i[n]:t,r=[e.trim()];return e.match(/\bhljs\b/)||r.push("hljs"),-1===e.indexOf(a)&&r.push(a),r.join(" ").trim()}(e.className,m,r.language),e.result={language:r.language,re:r.relevance},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.relevance}))}function _(){if(!_.called){_.called=!0;var e=document.querySelectorAll("pre code");n.forEach.call(e,w)}}function v(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]}function N(e){var n=v(e);return n&&!n.disableAutodetect}e.highlight=p,e.highlightAuto=h,e.fixMarkup=E,e.highlightBlock=w,e.configure=function(e){l=m(l,e)},e.initHighlighting=_,e.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",_,!1),addEventListener("load",_,!1)},e.registerLanguage=function(n,t){var r=a[n]=t(e);r.aliases&&r.aliases.forEach((function(e){i[e]=n}))},e.listLanguages=function(){return t(a)},e.getLanguage=v,e.autoDetection=N,e.inherit=m,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.COMMENT=function(n,t,a){var i=e.inherit({className:"comment",begin:n,end:t,contains:[]},a||{});return i.contains.push(e.PHRASAL_WORDS_MODE),i.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),i},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e.registerLanguage("bash",(function(e){var n={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]};return{aliases:["sh","zsh"],lexemes:/\b-?[a-z\._]+\b/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,t,{className:"string",begin:/'/,end:/'/},n]}})),e.registerLanguage("css",(function(e){var n={begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}})),e.registerLanguage("xml",(function(e){var n={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[n],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[n],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},n]}]}})),e.registerLanguage("django",(function(e){var n={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[n],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[n]}]}})),e.registerLanguage("javascript",(function(e){var n="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},r={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,a,e.REGEXP_MODE];var s=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:t,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{begin:/[{,]\s*/,relevance:0,contains:[{begin:n+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:n,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+n+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:s}]}]},{begin:/</,end:/(\/\w+|\w+\/)>/,subLanguage:"xml",contains:[{begin:/<\w+\s*\/>/,skip:!0},{begin:/<\w+/,end:/(\/\w+|\w+\/)>/,skip:!0,contains:[{begin:/<\w+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:n}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:s}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}})),e.registerLanguage("json",(function(e){var n={literal:"true false null"},t=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:n},i={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})],illegal:"\\S"},r={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return t.splice(t.length,0,i,r),{contains:t,keywords:n,illegal:"\\S"}})),e.registerLanguage("markdown",(function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),e.registerLanguage("ruby",(function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",t={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^\\=begin","^\\=end",{contains:[a],relevance:10}),e.COMMENT("^__END__","\\n$")],s={className:"subst",begin:"#\\{",end:"}",keywords:t},o={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<(-?)\w+$/,end:/^\s*\w+$/}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:t},c=[o,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),l].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[o,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:t},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);s.contains=c,l.contains=c;var d=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:t,illegal:/\/\*/,contains:r.concat(d).concat(c)}})),e.registerLanguage("scss",(function(e){var n={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},t={className:"number",begin:"#[0-9A-Fa-f]+"};e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE;return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[n,t,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t,e.CSS_NUMBER_MODE,{begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}})),e.registerLanguage("shell",(function(e){return{aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}})),e.registerLanguage("yaml",(function(e){var n="[a-zA-Z_][\\w\\-]*",t={className:"attr",variants:[{begin:"^[ \\-]*"+n+":"},{begin:'^[ \\-]*"'+n+'":'},{begin:"^[ \\-]*'"+n+"':"}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[t,{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>] *$",returnEnd:!0,contains:a.contains,end:t.variants[0].begin},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!"+e.UNDERSCORE_IDENT_RE},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"^ *-",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},e.C_NUMBER_MODE,a]}}))})(n)}()},dYcP:function(e,n){
/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. MIT license */
!function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var e=window.matchMedia,n=e("only all").matches,t=!1,a=0,i=[],r=function(n){clearTimeout(a),a=setTimeout(function(){for(var n=0,t=i.length;n<t;n++){var a=i[n].mql,r=i[n].listeners||[],s=e(a.media).matches;if(s!==a.matches){a.matches=s;for(var o=0,l=r.length;o<l;o++)r[o].call(window,a)}}},30)};window.matchMedia=function(a){var s=e(a),o=[],l=0;return s.addListener=function(e){n&&(t||(t=!0,window.addEventListener("resize",r,!0)),0===l&&(l=i.push({mql:s,listeners:o})),o.push(e))},s.removeListener=function(e){for(var n=0,t=o.length;n<t;n++)o[n]===e&&o.splice(n,1)},s}}()},kzB7:function(e,n){e.exports={colors:{"brand-colors":{"brand-orange":"#c75000","brand-blue":"#0d7fa5","brand-pink":"#aa0e5c"},"neutral-colors":{"light-gray":"#dedede",gray:"#555b5e","contrast-light":"#fff","contrast-dark":"#3b4042"},"theme-colors":{"theme-dark":"#0d7fa5","theme-light":"#cfe5ed",background:"#fff",text:"#3b4042","text-light":"#555b5e",action:"#b91e6c",focus:"#0d7fa5",underline:"#eec7da",border:"#555b5e","border-light":"#dedede",shadow:"rgba(85, 91, 94, 0.5)",callout:"#cfe5ed",slight:"#fafcfd",code:"#0d7fa5","code-shadow":"rgba(13, 127, 165, 0.2)"},"hljs-colors":{"hljs-comment":"#93a1a1","hljs-green":"#859900","hljs-cyan":"#2aa198","hljs-blue":"#268bd2","hljs-yellow":"#b58900","hljs-orange":"#cb4b16","hljs-red":"#dc322f","hljs-formula":"#eee8d5"},"demo-colors":{"brand-blue":"#0d7fa5","brand-pink":"#e2127a"},"demo-noncolors":{"light-gray":"#dedede",gray:"#555b5e","contrast-dark":"#3b4042"}},ratios:{"text-ratios":{"line-height":1.4},"demo-ratios":{"line-height":1.4}},sizes:{"root-sizes":{root:"18px",responsive:"calc(1em + 0.125vw)",large:"calc(1rem + 0.5vw)",small:"0.9rem"},"text-sizes":{reset:"1rem",h1:"calc(1rem + 2vw)",h2:"calc(1rem + 1vw)",h3:"calc(1rem + 0.5vw)",quote:"calc(1rem + 0.5vw)",code:"0.9rem",footer:"0.9rem",search:"0.9rem"},"spacing-sizes":{rhythm:"1.4rem",gutter:"1.4rem","gutter-plus":"2.1rem","double-gutter":"2.8rem","flex-gutter":"calc(0.7rem + 2.5vw)",spacer:"calc(4.2rem + 2.5vw)","gutter-minus":"1.05rem",shim:"0.7rem","half-shim":"0.35rem","quarter-shim":"0.175rem"},"pattern-sizes":{"nav-underline":"4px","nav-icon":"28px","arrow-border":"8px","arrow-depth":"0.7rem","arrow-side":"1.4rem","font-preview":"24em","specimen-aa":"4.2rem","color-preview":"16em","color-swatch":"5.6rem","footer-logo":"2.8rem"},"layout-sizes":{page:"50rem","item-break":"40em","page-break":"50em","nav-break":"65em"},"demo-sizes":{root:"18px",xlarge:"3rem"}},fonts:{sans:{name:"Source Sans Pro",source:"https://fonts.google.com/specimen/Source+Sans+Pro",stack:["Source Sans Pro","Helvetica Neue","Helvetica","Arial","sans-serif"]},code:{name:"Source Code Pro",source:"https://fonts.google.com/specimen/Source+Code+Pro",stack:["Source Code Pro","Consolas","Menlo","Monaco","Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New","monospace","sans-serif"]},"demo-cdn":{name:"Source Code Pro",source:"https://fonts.google.com/specimen/Source+Code+Pro",stack:["Consolas","Menlo","Courier New","monospace","sans-serif"]},"demo-local":{name:"rockingham",normal:{path:"rockingham/rockingham-regular-webfont",local:"rockingham-regular-webfont"},bold:"rockingham/rockingham-bold-webfont",italic:"rockingham/rockingham-italic-webfont","bold italic":"rockingham/rockingham-bolditalic-webfont",stack:"fantasy",formats:["woff2","woff","ttf"]}}}},t3mS:function(e,n,t){"use strict";(function(e){t.d(n,"c",function(){return r}),t.d(n,"a",function(){return s}),t.d(n,"b",function(){return o});var a=t("kzB7"),i=t.n(a),r=function(){var n=e("body");n.on("toggle:close",'[data-toggle="button"]',function(){var n=e(this).attr("aria-controls"),t=e('[data-target-id="'.concat(n,'"]'));e('[data-toggle="button"][aria-controls="'.concat(n,'"][aria-pressed="true"]')).attr("aria-pressed","false"),t.trigger("target:close")}),n.on("toggle:open",'[data-toggle="button"]',function(){var n=e(this),t=n.attr("aria-controls"),a=e('[data-target-id="'.concat(t,'"]')),i=e('[data-toggle="button"][aria-controls="'.concat(t,'"]')).not(n);n.data("toggle-synced")?i.filter('[data-toggle-synced="true"]').attr("aria-pressed","true"):i.filter('[aria-pressed="true"]').attr("aria-pressed","false"),n.attr("aria-pressed","true"),a.trigger("target:open")}),n.on("target:close",'[data-toggle="target"]',function(n){var t=e(this);e(n.target).is(t)&&t.attr("aria-expanded","false")});var t=function(n){var t=n.attr("data-target-id"),a=e('[data-toggle="button"][aria-controls="'.concat(t,'"][aria-pressed="true"]'));a.length?a.trigger("toggle:close"):n.trigger("target:close")};n.on("target:open",'[data-toggle="target"]',function(n){var t=e(this);e(n.target).is(t)&&t.attr("aria-expanded","true")}),n.on("click",'[data-toggle="button"]',function(n){n.preventDefault();var t=e(this);"true"===t.attr("aria-pressed")?t.trigger("toggle:close"):t.trigger("toggle:open")}),n.on("click",'[data-toggle="close"]',function(n){n.preventDefault();var a=e('[data-target-id="'.concat(e(this).attr("aria-controls"),'"]'));t(a)});n.on("click",function(n){e('[data-toggle="target"][aria-expanded="true"][data-auto-closing="true"]').each(function(a,i){!function(e,n){var a=n.attr("data-target-id"),i=e.closest('[aria-controls="'.concat(a,'"]')).length,r=document.contains(e.get(0)),s=!e.closest(n).length,o=n.attr("data-auto-closing-exception"),l=!!o&&e.closest(o).length;!i&&(n.data("auto-closing-on-any-click")||r&&s&&!l)&&t(n)}(e(n.target),e(i))})})},s=function(){var n=function(n){n.contentWindow.document.body&&(n.height=e(n.contentWindow.document).outerHeight(!0))},t=function(){e("iframe").each(function(){n(this)})};t(),e("iframe").on("load",function(){n(this)}),e(window).on("resize",t)},o=function(){var n=i.a&&i.a.sizes&&i.a.sizes["layout-sizes"]&&i.a.sizes["layout-sizes"]["nav-break"];if(n){var t=e("#nav"),a=e('[aria-controls="nav"]'),r=window.matchMedia("(min-width: ".concat(n,")")),s=function(e){e.matches?t.attr("aria-expanded","true"):t.attr("aria-expanded",a.attr("aria-pressed"))};s(r),r.addListener(s)}}}).call(this,t("26+0"))}},[["+3Jt",0,1]]]);
!function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var e=window.matchMedia,n=e("only all").matches,t=!1,a=0,i=[],r=function(n){clearTimeout(a),a=setTimeout((function(){for(var n=0,t=i.length;n<t;n++){var a=i[n].mql,r=i[n].listeners||[],s=e(a.media).matches;if(s!==a.matches){a.matches=s;for(var o=0,l=r.length;o<l;o++)r[o].call(window,a)}}}),30)};window.matchMedia=function(a){var s=e(a),o=[],l=0;return s.addListener=function(e){n&&(t||(t=!0,window.addEventListener("resize",r,!0)),0===l&&(l=i.push({mql:s,listeners:o})),o.push(e))},s.removeListener=function(e){for(var n=0,t=o.length;n<t;n++)o[n]===e&&o.splice(n,1)},s}}()},t3mS:function(e,n,t){"use strict";(function(e){t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return o}));t("LW0h");var a=t("J4ja"),i=t.n(a),r=function(){var n=e("body");n.on("toggle:close",'[data-toggle="button"]',(function(){var n=e(this).attr("aria-controls"),t=e('[data-target-id="'.concat(n,'"]'));e('[data-toggle="button"][aria-controls="'.concat(n,'"][aria-pressed="true"]')).attr("aria-pressed","false"),t.trigger("target:close")})),n.on("toggle:open",'[data-toggle="button"]',(function(){var n=e(this),t=n.attr("aria-controls"),a=e('[data-target-id="'.concat(t,'"]')),i=e('[data-toggle="button"][aria-controls="'.concat(t,'"]')).not(n);n.data("toggle-synced")?i.filter('[data-toggle-synced="true"]').attr("aria-pressed","true"):i.filter('[aria-pressed="true"]').attr("aria-pressed","false"),n.attr("aria-pressed","true"),a.trigger("target:open")})),n.on("target:close",'[data-toggle="target"]',(function(n){var t=e(this);e(n.target).is(t)&&t.attr("aria-expanded","false")}));var t=function(n){var t=n.attr("data-target-id"),a=e('[data-toggle="button"][aria-controls="'.concat(t,'"][aria-pressed="true"]'));a.length?a.trigger("toggle:close"):n.trigger("target:close")};n.on("target:open",'[data-toggle="target"]',(function(n){var t=e(this);e(n.target).is(t)&&t.attr("aria-expanded","true")})),n.on("click",'[data-toggle="button"]',(function(n){n.preventDefault();var t=e(this);"true"===t.attr("aria-pressed")?t.trigger("toggle:close"):t.trigger("toggle:open")})),n.on("click",'[data-toggle="close"]',(function(n){n.preventDefault();var a=e('[data-target-id="'.concat(e(this).attr("aria-controls"),'"]'));t(a)}));n.on("click",(function(n){e('[data-toggle="target"][aria-expanded="true"][data-auto-closing="true"]').each((function(a,i){!function(e,n){var a=n.attr("data-target-id"),i=e.closest('[aria-controls="'.concat(a,'"]')).length,r=document.contains(e.get(0)),s=!e.closest(n).length,o=n.attr("data-auto-closing-exception"),l=!!o&&e.closest(o).length;!i&&(n.data("auto-closing-on-any-click")||r&&s&&!l)&&t(n)}(e(n.target),e(i))}))}))},s=function(){var n=function(n){n.contentWindow.document.body&&(n.height=e(n.contentWindow.document).outerHeight(!0))},t=function(){e("iframe").each((function(){n(this)}))};t(),e("iframe").on("load",(function(){n(this)})),e(window).on("resize",t)},o=function(){var n=i.a&&i.a.sizes&&i.a.sizes["layout-sizes"]&&i.a.sizes["layout-sizes"]["nav-break"];if(n){var t=e("#nav"),a=e('[aria-controls="nav"]'),r=window.matchMedia("(min-width: ".concat(n,")")),s=function(e){e.matches?t.attr("aria-expanded","true"):t.attr("aria-expanded",a.attr("aria-pressed"))};s(r),r.addListener(s)}}}).call(this,t("26+0"))}},[["+3Jt",0,1]]]);

@@ -1,1 +0,1 @@

!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c<i.length;c++)f=i[c],o[f]&&s.push(o[f][0]),o[f]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var l=t[i];0!==o[l]&&(n=!1)}n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={0:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/assets/webpack/";var i=window.webpackJsonp=window.webpackJsonp||[],l=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=l;t()}([]);
!function(e){function r(r){for(var n,l,a=r[0],f=r[1],i=r[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={0:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/assets/webpack/";var a=window.webpackJsonp=window.webpackJsonp||[],f=a.push.bind(a);a.push=r,a=a.slice();for(var i=0;i<a.length;i++)r(a[i]);var p=f;t()}([]);

@@ -1,41 +0,40 @@

var chalk = require('chalk');
var css = require('css');
var find = require('lodash.find');
var forEach = require('lodash.foreach');
var last = require('lodash.last');
var path = require('path');
/* eslint-disable no-plusplus, no-unused-vars, no-var, no-use-before-define */
'use strict';
const path = require('path');
const assert = require('assert');
const chalk = require('chalk');
const css = require('css');
const { find, forEach, last } = require('lodash');
// Tokens defining the True CSS output language.
var MODULE_TOKEN = '# Module: ';
var MODULE_NESTING_TOKEN = ' :: ';
var SUMMARY_TOKEN = '# SUMMARY ';
var END_SUMMARY_TOKEN = '----------';
var TEST_TOKEN = 'Test: ';
var PASS_TOKEN = '✔ ';
var FAIL_TOKEN = '✖ FAILED: [';
var END_FAIL_TOKEN = ']';
var ASSERT_TOKEN = 'ASSERT: ';
var FAILURE_DETAIL_TOKEN = '- ';
var FAILURE_TYPE_START_TOKEN = '[';
var FAILURE_TYPE_END_TOKEN = ']';
var OUTPUT_TOKEN = 'Output: ';
var EXPECTED_TOKEN = 'Expected: ';
var DETAILS_SEPARATOR_TOKEN = ': ';
var OUTPUT_START_TOKEN = 'OUTPUT';
var OUTPUT_END_TOKEN = 'END_OUTPUT';
var EXPECTED_START_TOKEN = 'EXPECTED';
var EXPECTED_END_TOKEN = 'END_EXPECTED';
var CONTAINED_START_TOKEN = 'CONTAINED';
var CONTAINED_END_TOKEN = 'END_CONTAINED';
var ASSERT_END_TOKEN = 'END_ASSERT';
const MODULE_TOKEN = '# Module: ';
const MODULE_NESTING_TOKEN = ' :: ';
const SUMMARY_TOKEN = '# SUMMARY ';
const END_SUMMARY_TOKEN = '----------';
const TEST_TOKEN = 'Test: ';
const PASS_TOKEN = '✔ ';
const FAIL_TOKEN = '✖ FAILED: [';
const END_FAIL_TOKEN = ']';
const ASSERT_TOKEN = 'ASSERT: ';
const FAILURE_DETAIL_TOKEN = '- ';
const FAILURE_TYPE_START_TOKEN = '[';
const FAILURE_TYPE_END_TOKEN = ']';
const OUTPUT_TOKEN = 'Output: ';
const EXPECTED_TOKEN = 'Expected: ';
const DETAILS_SEPARATOR_TOKEN = ': ';
const OUTPUT_START_TOKEN = 'OUTPUT';
const OUTPUT_END_TOKEN = 'END_OUTPUT';
const EXPECTED_START_TOKEN = 'EXPECTED';
const EXPECTED_END_TOKEN = 'END_EXPECTED';
const CONTAINED_START_TOKEN = 'CONTAINED';
const CONTAINED_END_TOKEN = 'END_CONTAINED';
const ASSERT_END_TOKEN = 'END_ASSERT';
var runSass = function(sassOptions, trueOptions) {
var sassOpts = Object.assign({}, sassOptions);
var trueOpts = Object.assign({}, trueOptions);
if (trueOpts.sass) {
var sass = trueOpts.sass;
} else {
var sass = require('node-sass');
}
var sassPath = path.join(__dirname, '..', 'sass');
var runSass = function (sassOptions, trueOptions) {
const sassOpts = Object.assign({}, sassOptions);
const trueOpts = Object.assign({}, trueOptions);
const sassPath = path.join(__dirname, '..', 'sass');
if (sassOpts.includePaths) {

@@ -46,6 +45,14 @@ sassOpts.includePaths.push(sassPath);

}
var css = sass.renderSync(sassOpts).css.toString();
var modules = parse(css, trueOpts.contextLines);
let sass;
if (trueOpts.sass) {
sass = trueOpts.sass;
} else {
// eslint-disable-next-line global-require
sass = require('sass');
}
// eslint-disable-next-line no-sync
const parsedCss = sass.renderSync(sassOpts).css.toString();
const modules = parse(parsedCss, trueOpts.contextLines);
forEach(modules, function(module) {
forEach(modules, (module) => {
describeModule(module, trueOpts.describe, trueOpts.it);

@@ -55,31 +62,24 @@ });

var formatFailureMessage = function(assertion) {
var msg =
assertion.description +
' ("' +
assertion.output +
'" ' +
assertion.assertionType +
' "' +
assertion.expected +
'"';
var formatFailureMessage = function (assertion) {
let msg = assertion.description;
msg = `${msg} ("${assertion.output}"`;
msg = `${msg} ${assertion.assertionType} "${assertion.expected}"`;
if (assertion.details) {
msg += ' -- ' + assertion.details;
msg = `${msg} -- ${assertion.details}`;
}
msg += ')';
msg += '\n ' + chalk.green('+ expected ') + chalk.red('- actual');
msg += '\n\n ' + chalk.red('-' + assertion.output);
msg += '\n ' + chalk.green('+' + assertion.expected + '\n');
msg = `${msg})`;
msg = `${msg}\n ${chalk.green('+ expected ')}${chalk.red('- actual')}`;
msg = `${msg}\n\n ${chalk.red(`-${assertion.output}`)}`;
msg = `${msg}\n ${chalk.green(`+${assertion.expected}\n`)}`;
return msg;
};
var describeModule = function(module, describe, it) {
var assert = require('assert');
describe(module.module, function() {
forEach(module.modules, function(submodule) {
var describeModule = function (module, describe, it) {
describe(module.module, () => {
forEach(module.modules, (submodule) => {
describeModule(submodule, describe, it);
});
forEach(module.tests, function(test) {
it(test.test, function() {
forEach(test.assertions, function(assertion) {
forEach(module.tests, (test) => {
it(test.test, () => {
forEach(test.assertions, (assertion) => {
if (!assertion.passed) {

@@ -94,12 +94,12 @@ assert.fail(formatFailureMessage(assertion));

var parse = function(rawCss, contextLines) {
var contextLines = typeof contextLines === 'undefined' ? 10 : contextLines;
var lines = rawCss.split(/\r?\n/);
var parse = function (rawCss, ctxLines) {
const contextLines = typeof ctxLines === 'undefined' ? 10 : ctxLines;
const lines = rawCss.split(/\r?\n/);
var parseCss = function() {
var ast = css.parse(rawCss);
var ctx = { modules: [] };
var handler = parseModule;
var parseCss = function () {
const ast = css.parse(rawCss);
const ctx = { modules: [] };
let handler = parseModule;
forEach(ast.stylesheet.rules, function(rule) {
forEach(ast.stylesheet.rules, (rule) => {
handler = handler(rule, ctx);

@@ -113,28 +113,16 @@ });

var parseError = function(msg, seeking, pos) {
var errorMsg =
'Line ' +
pos.start.line +
', ' +
'column ' +
pos.start.column +
': ' +
msg +
'; ' +
'looking for ' +
seeking +
'.\n' +
'-- Context --\n' +
lines
var parseError = function (msg, seeking, pos) {
const errorMsg =
`Line ${pos.start.line}, ` +
`column ${pos.start.column}: ${msg}; ` +
`looking for ${seeking}.\n` +
`-- Context --\n${lines
.slice(Math.max(0, pos.start.line - contextLines), pos.start.line)
.join('\n') +
'\n' +
' '.repeat(pos.start.column - 1) +
'^\n';
.join('\n')}\n${' '.repeat(pos.start.column - 1)}^\n`;
return new Error(errorMsg);
};
var parseModule = function(rule, ctx) {
var parseModule = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (!text) {

@@ -161,5 +149,5 @@ return parseModule;

var ignoreUntilEndSummary = function(rule, ctx) {
var ignoreUntilEndSummary = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (startsWith(text, END_SUMMARY_TOKEN)) {

@@ -171,11 +159,11 @@ return parseModule;

throw parseError(
'Unexpected rule type "' + rule.type + '"',
`Unexpected rule type "${rule.type}"`,
'end summary',
rule.position
rule.position,
);
};
var parseTest = function(rule, ctx) {
var parseTest = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (!text) {

@@ -201,5 +189,5 @@ return parseTest;

var parseAssertion = function(rule, ctx) {
var parseAssertion = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trimLeft();
const text = rule.comment.trimLeft();
if (!text) {

@@ -218,3 +206,3 @@ return parseAssertion;

finishCurrentAssertion(ctx);
var endAssertionType = text.indexOf(END_FAIL_TOKEN);
const endAssertionType = text.indexOf(END_FAIL_TOKEN);
ctx.currentAssertion = {

@@ -242,8 +230,8 @@ description: text.substring(endAssertionType + 2).trim(),

var parseFailureDetail = function(rule, ctx) {
var parseFailureDetail = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (startsWith(text, FAILURE_DETAIL_TOKEN)) {
var detail = text.substring(FAILURE_DETAIL_TOKEN.length);
var outputOrExpected;
const detail = text.substring(FAILURE_DETAIL_TOKEN.length);
let outputOrExpected;
if (startsWith(detail, OUTPUT_TOKEN)) {

@@ -255,14 +243,14 @@ outputOrExpected = 'output';

if (outputOrExpected) {
var startType = text.indexOf(FAILURE_TYPE_START_TOKEN);
var endType = text.indexOf(FAILURE_TYPE_END_TOKEN);
var type = text.substring(startType, endType + 1);
var content = text.substring(endType + 2);
ctx.currentAssertion[outputOrExpected] = type + ' ' + content;
const startType = text.indexOf(FAILURE_TYPE_START_TOKEN);
const endType = text.indexOf(FAILURE_TYPE_END_TOKEN);
const type = text.substring(startType, endType + 1);
const content = text.substring(endType + 2);
ctx.currentAssertion[outputOrExpected] = `${type} ${content}`;
return parseFailureDetail;
}
var splitAt = detail.indexOf(DETAILS_SEPARATOR_TOKEN);
const splitAt = detail.indexOf(DETAILS_SEPARATOR_TOKEN);
if (splitAt !== -1) {
var key = detail.substring(0, splitAt);
var value = detail.substring(
splitAt + DETAILS_SEPARATOR_TOKEN.length
const key = detail.substring(0, splitAt);
const value = detail.substring(
splitAt + DETAILS_SEPARATOR_TOKEN.length,
);

@@ -276,11 +264,11 @@ ctx.currentAssertion[key.toLowerCase()] = value;

throw parseError(
'Unexpected rule type "' + rule.type + '"',
`Unexpected rule type "${rule.type}"`,
'output/expected',
rule.position
rule.position,
);
};
var parseAssertionOutputStart = function(rule, ctx) {
var parseAssertionOutputStart = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (!text) {

@@ -293,16 +281,12 @@ return parseAssertionOutputStart;

}
throw parseError(
'Unexpected comment "' + text + '"',
'OUTPUT',
rule.position
);
throw parseError(`Unexpected comment "${text}"`, 'OUTPUT', rule.position);
}
throw parseError(
'Unexpected rule type "' + rule.type + '"',
`Unexpected rule type "${rule.type}"`,
'OUTPUT',
rule.position
rule.position,
);
};
var parseAssertionOutput = function(rule, ctx) {
var parseAssertionOutput = function (rule, ctx) {
if (rule.type === 'comment') {

@@ -321,5 +305,5 @@ if (rule.comment.trim() === OUTPUT_END_TOKEN) {

var parseAssertionExpectedStart = function(rule, ctx) {
var parseAssertionExpectedStart = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (!text) {

@@ -338,15 +322,15 @@ return parseAssertionExpectedStart;

throw parseError(
'Unexpected comment "' + text + '"',
`Unexpected comment "${text}"`,
'EXPECTED',
rule.position
rule.position,
);
}
throw parseError(
'Unexpected rule type "' + rule.type + '"',
`Unexpected rule type "${rule.type}"`,
'EXPECTED',
rule.position
rule.position,
);
};
var parseAssertionExpected = function(rule, ctx) {
var parseAssertionExpected = function (rule, ctx) {
if (rule.type === 'comment') {

@@ -367,5 +351,5 @@ if (rule.comment.trim() === EXPECTED_END_TOKEN) {

var parseEndAssertion = function(rule, ctx) {
var parseEndAssertion = function (rule, ctx) {
if (rule.type === 'comment') {
var text = rule.comment.trim();
const text = rule.comment.trim();
if (!text) {

@@ -379,15 +363,15 @@ return parseEndAssertion;

throw parseError(
'Unexpected comment "' + text + '"',
`Unexpected comment "${text}"`,
'END_ASSERT',
rule.position
rule.position,
);
}
throw parseError(
'Unexpected rule type "' + rule.type + '"',
`Unexpected rule type "${rule.type}"`,
'END_ASSERT',
rule.position
rule.position,
);
};
var parseAssertionContained = function(rule, ctx) {
var parseAssertionContained = function (rule, ctx) {
if (rule.type === 'comment') {

@@ -401,3 +385,3 @@ if (rule.comment.trim() === CONTAINED_END_TOKEN) {

ctx.currentAssertion.output,
ctx.currentAssertion.expected
ctx.currentAssertion.expected,
);

@@ -414,47 +398,42 @@ return parseEndAssertion;

var falsyValues = function(item) {
var falsyValues = function (item) {
return Boolean(item);
};
var contains = function(output, expected) {
var outputBlocks = createSelectorsRulesPairs(output);
var expectedBlocks = createSelectorsRulesPairs(expected);
var contains = function (output, expected) {
const outputBlocks = createSelectorsRulesPairs(output);
const expectedBlocks = createSelectorsRulesPairs(expected);
var results = expectedBlocks.map(function(block) {
var outputBlock = outputBlocks.find(function(element) {
return element.selector === block.selector;
});
const results = expectedBlocks.map((block) => {
const outputBlock = outputBlocks.find(
(element) => element.selector === block.selector,
);
if (outputBlock) {
// Turns a css string into an array of property-value pairs.
var expectedProperties = block.output
const expectedProperties = block.output
.split(';')
.map(function(propertyValuePair) {
return propertyValuePair.trim();
})
.filter(function(block) {
return block !== ' {' && block !== '}';
});
.map((propertyValuePair) => propertyValuePair.trim())
.filter((innerBlock) => innerBlock !== ' {' && innerBlock !== '}');
// This is the assertion itself!
return expectedProperties.every(function(property) {
return outputBlock.output.includes(property);
});
return expectedProperties.every((property) =>
outputBlock.output.includes(property),
);
}
return false;
});
return results.every(function(result) {
return result === true;
});
return results.every((result) => result === true);
};
var createSelectorsRulesPairs = function(cssString) {
var processedMediaQueries = dealWithAnnoyingMediaQueries(cssString);
var mediaQueries = splitSelectorAndProperties(
processedMediaQueries.mediaQueryBasedSelectors
var createSelectorsRulesPairs = function (cssString) {
const processedMediaQueries = dealWithAnnoyingMediaQueries(cssString);
const mediaQueries = splitSelectorAndProperties(
processedMediaQueries.mediaQueryBasedSelectors,
);
var nonMediaQueries = processedMediaQueries.rawCSSSansMediaQueries;
const nonMediaQueries = processedMediaQueries.rawCSSSansMediaQueries;
var blocks = cssStringToArrayOfRules(nonMediaQueries);
const blocks = cssStringToArrayOfRules(nonMediaQueries);
var splitBlocks = splitSelectorAndProperties(blocks);
const splitBlocks = splitSelectorAndProperties(blocks);

@@ -464,8 +443,8 @@ return splitBlocks.concat(mediaQueries).filter(falsyValues);

var splitSelectorAndProperties = function(blocks) {
return blocks.map(function(block) {
var temp = block.split('{');
var selector = temp[0];
var output = temp[1];
var splitBlock = { selector: selector, output: output };
var splitSelectorAndProperties = function (blocks) {
return blocks.map((block) => {
const temp = block.split('{');
const selector = temp[0];
const output = temp[1];
const splitBlock = { selector, output };
return splitBlock;

@@ -475,26 +454,29 @@ });

var removeNewLines = function(cssString) {
var removeNewLines = function (cssString) {
return cssString.replace(/\n/g, '');
};
var cssStringToArrayOfRules = function(cssString) {
var cssStringToArrayOfRules = function (cssString) {
return removeNewLines(cssString)
.split(/\s*}/g)
.split(/\s*}(?![\s]*["',}])/g)
.filter(falsyValues);
};
var dealWithAnnoyingMediaQueries = function(rawCSS) {
var matchMediaQuery = /(@[a-zA-Z0-9:\(\)\s\-]+)/g;
var matchCSSWithinMediaQueryBlock = /@[a-zA-Z0-9:()\s-]+{([a-zA-Z0-9:()\s-;\._\\n{}]+)(?!}\\n})/g;
var dealWithAnnoyingMediaQueries = function (rawCSS) {
const matchMediaQuery = /(@[a-zA-Z0-9:()\s-]+)/g;
// eslint-disable-next-line max-len
const matchCSSWithinMediaQueryBlock = /@[a-zA-Z0-9:()\s-]+{([a-zA-Z0-9:()\s-;._\\n{}]+)(?!}\\n})/g;
var mediaqueries = rawCSS.match(matchMediaQuery);
var rawCSSSansMediaQueries = rawCSS
const mediaqueries = rawCSS.match(matchMediaQuery);
const rawCSSSansMediaQueries = rawCSS
.replace(matchMediaQuery, '')
.replace(matchCSSWithinMediaQueryBlock, '')
.replace(/^{/, '');
var matches = matchCSSWithinMediaQueryBlock.exec(rawCSS);
var i = 0;
var mediaQueryBasedSelectors = [];
let matches = matchCSSWithinMediaQueryBlock.exec(rawCSS);
let i = 0;
let mediaQueryBasedSelectors = [];
const mediaqueryRule = /* istanbul ignore next */ (rule) =>
mediaqueries[i] + rule;
/* istanbul ignore next */
while (matches !== null) {
/* istanbul ignore if */
// This is necessary to avoid infinite loops with zero-width matches

@@ -505,9 +487,8 @@ if (matches.index === matchCSSWithinMediaQueryBlock.lastIndex) {

var cssWithinMediaQuery = removeNewLines(matches[1]);
var cssRules = cssStringToArrayOfRules(cssWithinMediaQuery);
/* istanbul ignore next */
const cssWithinMediaQuery = removeNewLines(matches[1]);
const cssRules = cssStringToArrayOfRules(cssWithinMediaQuery);
mediaQueryBasedSelectors = mediaQueryBasedSelectors.concat(
cssRules.map(function(rule) {
return mediaqueries[i] + rule;
})
cssRules.map(mediaqueryRule),
);

@@ -520,13 +501,13 @@

return {
mediaQueryBasedSelectors: mediaQueryBasedSelectors,
rawCSSSansMediaQueries: rawCSSSansMediaQueries,
mediaQueryBasedSelectors,
rawCSSSansMediaQueries,
};
};
var finishCurrentModule = function(ctx) {
var finishCurrentModule = function (ctx) {
finishCurrentTest(ctx);
if (ctx.currentModule) {
var path = ctx.currentModule.module.split(MODULE_NESTING_TOKEN);
ctx.currentModule.module = last(path);
insertModule(path, ctx.currentModule, ctx);
const paths = ctx.currentModule.module.split(MODULE_NESTING_TOKEN);
ctx.currentModule.module = last(paths);
insertModule(paths, ctx.currentModule, ctx);
delete ctx.currentModule;

@@ -536,3 +517,3 @@ }

var finishCurrentTest = function(ctx) {
var finishCurrentTest = function (ctx) {
finishCurrentAssertion(ctx);

@@ -545,3 +526,3 @@ if (ctx.currentTest) {

var finishCurrentAssertion = function(ctx) {
var finishCurrentAssertion = function (ctx) {
if (ctx.currentAssertion) {

@@ -553,3 +534,3 @@ ctx.currentTest.assertions.push(ctx.currentAssertion);

var insertModule = function(path, module, ctx) {
var insertModule = function (paths, module, ctx) {
if (!ctx.modules) {

@@ -559,9 +540,9 @@ ctx.modules = [];

if (path.length > 1) {
var newCtx = find(ctx.modules, { module: path[0] });
if (paths.length > 1) {
let newCtx = find(ctx.modules, { module: paths[0] });
if (!newCtx) {
newCtx = { module: path[0] };
newCtx = { module: paths[0] };
ctx.modules.push(newCtx);
}
insertModule(path.slice(1), module, newCtx);
insertModule(paths.slice(1), module, newCtx);
} else {

@@ -572,3 +553,3 @@ ctx.modules.push(module);

var startsWith = function(text, token) {
var startsWith = function (text, token) {
return text.substring(0, token.length) === token;

@@ -578,5 +559,5 @@ };

module.exports = {
runSass: runSass,
formatFailureMessage: formatFailureMessage,
parse: parse,
runSass,
formatFailureMessage,
parse,
};

@@ -1,2 +0,2 @@

Copyright (c) 2015, Miriam Eric Suzanne
Copyright (c) 2015–2020, Miriam Suzanne.
All rights reserved.

@@ -3,0 +3,0 @@

{
"name": "sass-true",
"title": "True",
"version": "5.0.0",
"version": "6.0.0",
"description": "Unit testing for Sass.",
"homepage": "http://oddbird.net/true",
"homepage": "https://www.oddbird.net/true/",
"main": "lib/main.js",

@@ -21,24 +21,29 @@ "repository": {

"engines": {
"node": ">=8"
"node": ">=10"
},
"dependencies": {
"chalk": "^2.4.2",
"css": "^2.2.1",
"lodash.find": "^4.6.0",
"lodash.foreach": "^4.5.0",
"lodash.last": "^3.0.0"
"chalk": "^4.1.0",
"css": "^3.0.0",
"lodash": "^4.17.19"
},
"devDependencies": {
"beeper": "^2.0.0",
"chai": "^4.1.2",
"coveralls": "^3.0.3",
"fancy-log": "^1.3.3",
"gulp": "^4.0.2",
"gulp-sass-lint": "^1.3.4",
"jest": "^24.8.0",
"mocha": "^6.1.4",
"node-sass": "^4.12.0",
"nyc": "^14.1.1",
"sassdoc": "^2.7.0",
"sassdoc-theme-herman": "^3.0.2"
"coveralls": "^3.1.0",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.1.0",
"mocha": "^8.0.1",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"sass": "^1.26.10",
"sassdoc": "^2.7.2",
"sassdoc-theme-herman": "^3.2.0",
"stylelint": "^13.6.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recommended": "^3.0.0",
"stylelint-prettier": "^1.1.2",
"stylelint-scss": "^3.18.0"
},

@@ -54,8 +59,14 @@ "eyeglass": {

"test:mocha": "nyc --reporter=html --reporter=text mocha",
"test:jest": "jest --testRegex test_sass",
"test:jest": "jest --testRegex test_ --env=node",
"prettier:js": "prettier --write '**/*.js'",
"prettier:other": "prettier --write '**/*.{json,md,yml}'",
"eslint": "eslint lib test --fix",
"lint": "run-p lint:js lint:sass prettier:other",
"lint:js": "run-s prettier:js eslint",
"lint:sass": "stylelint '**/*.scss' --fix",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"debug": "mocha debug",
"debug": "mocha inspect",
"sassdoc": "sassdoc sass/",
"compile": "node-sass test/scss/test.scss test/css/test.css --include-path ./sass/",
"commit": "yarn test; yarn compile; gulp sasslint; yarn sassdoc"
"compile": "sass test/scss/test.scss test/css/test.css --load-path ./sass/",
"commit": "yarn test; yarn compile; yarn lint; yarn sassdoc"
},

@@ -62,0 +73,0 @@ "author": "Miriam Suzanne <miriam@oddbird.net>",

# True
[![Build Status](https://travis-ci.org/oddbird/true.svg?branch=master)](https://travis-ci.org/oddbird/true)
[![Coverage Status](https://coveralls.io/repos/github/oddbird/true/badge.svg?branch=master)](https://coveralls.io/github/oddbird/true?branch=master)
[![Build Status](https://travis-ci.org/oddbird/true.svg?branch=main)](https://travis-ci.org/oddbird/true)
[![Coverage Status](https://coveralls.io/repos/github/oddbird/true/badge.svg?branch=main)](https://coveralls.io/github/oddbird/true?branch=main)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
True is a unit-testing tool
for [Sass](http://sass-lang.com) code –
for [Sass](https://sass-lang.com/) code –
initially developed for the
[Susy layout toolkit](http://susy.oddbird.net).
All of the test code is written in pure Sass,
and can be compiled by any Sass compiler –
[Susy layout toolkit](https://www.oddbird.net/susy/).
All of the test code is written in plain Sass,
and can be compiled using Dart Sass –
but we also provide integration with

@@ -44,3 +44,3 @@ JavaScript test runners

```scss
@import 'true';
@use 'true' as *;
```

@@ -52,4 +52,4 @@

```scss
// This is only an example
@import '../node_modules/sass-true/sass/true';
// This is only an example, your path may be different
@use '../node_modules/sass-true' as *;
```

@@ -59,3 +59,3 @@

`$true-terminal-output` (boolean),
`$terminal-output` (boolean),
defaults to `true`

@@ -69,2 +69,11 @@

If you are still using `@import` rather than `@use`,
there is an import path available -
which retains the legacy prefixed `$true-terminal-output` variable name:
```scss
// Your path may be different
@import '../node_modules/sass-true/sass/true';
```
## Usage

@@ -137,6 +146,6 @@

See the [full documentation online](http://oddbird.net/true)
See the [full documentation online](https://www.oddbird.net/true/)
or in the `.sassdoc` directory,
for more details.
See [CHANGELOG.md](https://github.com/oddbird/true/blob/master/CHANGELOG.md)
See [CHANGELOG.md](https://github.com/oddbird/true/blob/main/CHANGELOG.md)
when upgrading from an older version of True.

@@ -152,19 +161,8 @@

2. [Optional] Install the Sass implementation matching your project
(if not already installed).
2. [Optional] Install `sass` (Dart Sass), if not already installed.
Either `node-sass`:
```bash
npm install --save-dev node-sass
```
or `sass` (also `dart-sass`):
```bash
npm install --save-dev sass
```
> _Note_ `sass`/`dart-sass` has [a few differences from `node-sass`](https://github.com/sass/dart-sass/#behavioral-differences-from-ruby-sass).
3. Write some Sass tests in `test/test.scss` (see above).

@@ -174,4 +172,2 @@

**For `node-sass`**:
```js

@@ -185,23 +181,14 @@ var path = require('path');

**For `sass`/`dart-sass`**:
5. Run Mocha/Jest, and see your Sass tests reported in the command line.
```js
var path = require('path');
var sassTrue = require('sass-true');
**Note:** Jest defaults to running tests in a browser-like environment (jsdom).
When using with True, set the
[testEnvironment](https://jestjs.io/docs/en/configuration#testenvironment-string)
to "node".
var sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
{
file: sassFile,
},
{
sass: require('sass'),
describe,
it,
}
);
```
**Note:** Jest does not watch for changes in Sass files by default. To use
`jest --watch` with True, add "scss" to your
[moduleFileExtensions](https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring)
setting.
5. Run Mocha/Jest, and see your Sass tests reported in the command line.
You can call `runSass` more than once, if you have multiple Sass test files you

@@ -211,5 +198,5 @@ want to run separately.

The first argument to `runSass` accepts the
[same options](https://github.com/sass/node-sass/#options) that node-sass'
[same options](https://sass-lang.com/documentation/js-api#options) that sass'
`renderSync` function accepts. The only modification `runSass` makes is to add
True's sass path to the `includePaths` option, so `@import 'true';` works in
True's sass path to the `includePaths` option, so `@use 'true';` works in
your Sass test file.

@@ -230,13 +217,14 @@

You can also provide a `sass` option to provide a different Sass implementation
(for example, using `sass`/`dart-sass` instead of `node-sass`). This option
expects an object providing a `renderSync` method with the same signature as
`node-sass`.
You can also provide a `sass` option to provide a different Sass implementation.
This option expects an implementation providing a `renderSync` method with the
[same signature](https://sass-lang.com/documentation/js-api#rendersync) as Dart
Sass, and support for the
[Sass module system](https://sass-lang.com/blog/the-module-system-is-launched).
### Imports without Webpack
If you use Webpack's tilde notation, like
`@import '~accoutrement-init/sass/init'`, you'll need to tell `runSass` how to
handle that. That will require writing a custom importer and passing it into the
configuration for `runSass`. Something like:
If you use Webpack's tilde notation, like `@use '~accoutrement/sass/tools'`,
you'll need to tell `runSass` how to handle that. That will require writing a
custom importer and passing it into the configuration for `runSass`. Something
like:

@@ -243,0 +231,0 @@ ```js

@@ -1,10 +0,15 @@

var chalk = require('chalk');
var expect = require('chai').expect;
var path = require('path');
/* eslint-env mocha, jest */
var main = require('../lib/main.js');
'use strict';
describe('#fail', function() {
it('formats failure message', function() {
var msg = main.formatFailureMessage({
const path = require('path');
const chalk = require('chalk');
const expect = require('chai').expect;
const main = require('../lib/main.js');
describe('#fail', () => {
it('formats failure message', () => {
const msg = main.formatFailureMessage({
description: 'It broke.',

@@ -16,11 +21,7 @@ assertionType: 'assert-equal',

});
var expected =
'It broke. ("2" assert-equal "1" -- It really broke.)' +
'\n ' +
chalk.green('+ expected ') +
chalk.red('- actual') +
'\n\n ' +
chalk.red('-2') +
'\n ' +
chalk.green('+1\n');
const expected = `${'It broke. ("2" assert-equal "1" -- It really broke.)\n '}${chalk.green(
'+ expected ',
)}${chalk.red('- actual')}\n\n ${chalk.red('-2')}\n ${chalk.green(
'+1\n',
)}`;

@@ -31,27 +32,27 @@ expect(msg).to.equal(expected);

describe('#runSass', function() {
it('throws AssertionError on failure', function() {
var sass = [
'@import "true";',
'@include test-module("Throw an error") {',
' @include test("assertionError") {',
' @include assert-true(false, "This test is meant to fail.");',
describe('#runSass', () => {
it('throws AssertionError on failure', () => {
const sass = [
'@use "true";',
'@include true.test-module("Throw an error") {',
' @include true.test("assertionError") {',
' @include true.assert-true(false, "This test is meant to fail.");',
' }',
'}',
].join('\n');
var mock = function(name, cb) {
const mock = function (name, cb) {
cb();
};
var attempt = function() {
const attempt = function () {
main.runSass({ data: sass }, { describe: mock, it: mock });
};
expect(attempt).to.throw(
'This test is meant to fail. ("[bool] false" assert-true "[bool] true")'
'This test is meant to fail. ("[bool] false" assert-true "[bool] true")',
);
});
it('can specify includePaths', function() {
var sass = [
'@import "include";',
'@import "true";',
it('can specify includePaths', () => {
const sass = [
'@use "true" as *;',
'@use "include" as *;',
'@include test-module("Module") {',

@@ -70,22 +71,25 @@ ' @include test("Test") {',

].join('\n');
var mock = function(name, cb) {
const mock = function (name, cb) {
cb();
};
main.runSass(
{
data: sass,
includePaths: [path.join(__dirname, 'scss/includes')],
},
{
describe: mock,
it: mock,
}
);
const attempt = function () {
main.runSass(
{
data: sass,
includePaths: [path.join(__dirname, 'scss/includes')],
},
{
describe: mock,
it: mock,
},
);
};
expect(attempt).not.to.throw();
});
it('can specify sass engine to use', function() {
var mock = function(name, cb) {
it('can specify sass engine to use', () => {
const mock = function (name, cb) {
cb();
};
var attempt = function() {
const attempt = function () {
main.runSass(

@@ -97,3 +101,3 @@ {

sass: {
renderSync: function() {
renderSync() {
throw new Error('Custom sass implementation called');

@@ -104,3 +108,3 @@ },

it: mock,
}
},
);

@@ -112,5 +116,5 @@ };

describe('#parse', function() {
it('parses a passing non-output test', function() {
var css = [
describe('#parse', () => {
it('parses a passing non-output test', () => {
const css = [
'/* # Module: Utilities */',

@@ -121,3 +125,3 @@ '/* ------------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -142,4 +146,4 @@ module: 'Utilities',

it('ignores a summary', function() {
var css = [
it('ignores a summary', () => {
const css = [
'/* # SUMMARY ---------- */',

@@ -152,3 +156,3 @@ '/* 17 Tests: */',

].join('\n');
var expected = [];
const expected = [];

@@ -158,4 +162,4 @@ expect(main.parse(css)).to.deep.equal(expected);

it('parses a passing non-output test sans description', function() {
var css = [
it('parses a passing non-output test sans description', () => {
const css = [
'/* # Module: Utilities */',

@@ -166,3 +170,3 @@ '/* ------------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -187,4 +191,4 @@ module: 'Utilities',

it('parses a test following a summary', function() {
var css = [
it('parses a test following a summary', () => {
const css = [
'/* # SUMMARY ---------- */',

@@ -201,3 +205,3 @@ '/* 17 Tests: */',

].join('\n');
var expected = [
const expected = [
{

@@ -222,4 +226,4 @@ module: 'Utilities',

it('parses a nested passing non-output test', function() {
var css = [
it('parses a nested passing non-output test', () => {
const css = [
'/* # Module: Utilities :: nested */',

@@ -230,3 +234,3 @@ '/* ------------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -256,4 +260,4 @@ module: 'Utilities',

it('parses a failing non-output test', function() {
var css = [
it('parses a failing non-output test', () => {
const css = [
'/* # Module: Assert */',

@@ -267,3 +271,3 @@ '/* ---------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -292,4 +296,4 @@ module: 'Assert',

it('parses a failing non-output test with no failure details', function() {
var css = [
it('parses a failing non-output test with no failure details', () => {
const css = [
'/* # Module: Assert */',

@@ -301,3 +305,3 @@ '/* ---------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -327,4 +331,4 @@ module: 'Assert',

it('parses a passing output test', function() {
var css = [
it('parses a passing output test', () => {
const css = [
'/* # Module: Assert */',

@@ -348,3 +352,3 @@ '/* Test: CSS output assertions */',

].join('\n');
var expected = [
const expected = [
{

@@ -372,4 +376,4 @@ module: 'Assert',

it('parses a passing output test with loud comments', function() {
var css = [
it('parses a passing output test with loud comments', () => {
const css = [
'/* Some random loud comment */',

@@ -396,3 +400,3 @@ '/* # Module: Assert */',

].join('\n');
var expected = [
const expected = [
{

@@ -422,4 +426,4 @@ module: 'Assert',

it('parses a failing output test', function() {
var css = [
it('parses a failing output test', () => {
const css = [
'/* # Module: Assert */',

@@ -440,3 +444,3 @@ '/* Test: CSS output assertions */',

].join('\n');
var expected = [
const expected = [
{

@@ -464,4 +468,4 @@ module: 'Assert',

it('respects declaration order in output tests', function() {
var css = [
it('respects declaration order in output tests', () => {
const css = [
'/* # Module: Assert */',

@@ -485,3 +489,3 @@ '/* Test: CSS output assertions */',

].join('\n');
var expected = [
const expected = [
{

@@ -511,4 +515,4 @@ module: 'Assert',

it('parses tests of comment output', function() {
var css = [
it('parses tests of comment output', () => {
const css = [
'/* # Module: True Message */',

@@ -527,3 +531,3 @@ '/* ---------------------- */',

].join('\n');
var expected = [
const expected = [
{

@@ -551,4 +555,4 @@ module: 'True Message',

it('ignores unexpected rule types', function() {
var css = '.foo { -prop: value; }';
it('ignores unexpected rule types', () => {
const css = '.foo { -prop: value; }';

@@ -558,7 +562,7 @@ expect(main.parse(css)).to.deep.equal([]);

it('throws error on unexpected rule type instead of end summary', function() {
var css = ['/* # SUMMARY ---------- */', '.foo { -prop: value; }'].join(
'\n'
it('throws error on unexpected rule type instead of end summary', () => {
const css = ['/* # SUMMARY ---------- */', '.foo { -prop: value; }'].join(
'\n',
);
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -574,11 +578,11 @@ };

'^',
].join('\n')
].join('\n'),
);
});
it('accepts a number of context lines to display on error', function() {
var css = ['/* # SUMMARY ---------- */', '.foo { -prop: value; }'].join(
'\n'
it('accepts a number of context lines to display on error', () => {
const css = ['/* # SUMMARY ---------- */', '.foo { -prop: value; }'].join(
'\n',
);
var attempt = function() {
const attempt = function () {
main.parse(css, 1);

@@ -593,8 +597,8 @@ };

'^',
].join('\n')
].join('\n'),
);
});
it('handles a blank comment before module header', function() {
var css = ['/* */', '/* # Module: M */'].join('\n');
it('handles a blank comment before module header', () => {
const css = ['/* */', '/* # Module: M */'].join('\n');

@@ -609,4 +613,4 @@ expect(main.parse(css)).to.deep.equal([

it('ignores unexpected rule type instead of test', function() {
var css = ['/* # Module: M */', '.foo { -prop: value; }'].join('\n');
it('ignores unexpected rule type instead of test', () => {
const css = ['/* # Module: M */', '.foo { -prop: value; }'].join('\n');

@@ -621,4 +625,4 @@ expect(main.parse(css)).to.deep.equal([

it('handles a blank comment before test header', function() {
var css = ['/* # Module: M */', '/* */', '/* Test: T */'].join('\n');
it('handles a blank comment before test header', () => {
const css = ['/* # Module: M */', '/* */', '/* Test: T */'].join('\n');

@@ -638,4 +642,4 @@ expect(main.parse(css)).to.deep.equal([

it('ignores unexpected rule type instead of assertion', function() {
var css = [
it('ignores unexpected rule type instead of assertion', () => {
const css = [
'/* # Module: M */',

@@ -645,5 +649,2 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
main.parse(css);
};

@@ -663,4 +664,4 @@ expect(main.parse(css)).to.deep.equal([

it('handles a blank comment before assertion', function() {
var css = [
it('handles a blank comment before assertion', () => {
const css = [
'/* # Module: M */',

@@ -690,4 +691,4 @@ '/* Test: T */',

it('allows unexpected comment before next module header', function() {
var css = [
it('allows unexpected comment before next module header', () => {
const css = [
'/* # Module: M */',

@@ -722,4 +723,4 @@ '/* Test: T */',

it('throws error on unexpected rule type instead of failure detail', function() {
var css = [
it('throws error on unexpected rule type instead of failure detail', () => {
const css = [
'/* # Module: M */',

@@ -730,3 +731,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -736,8 +737,8 @@ };

expect(attempt).to.throw(
'Line 4, column 1: Unexpected rule type "rule"; looking for output/expected'
'Line 4, column 1: Unexpected rule type "rule"; looking for output/expected',
);
});
it('throws error on unexpected rule type instead of OUTPUT', function() {
var css = [
it('throws error on unexpected rule type instead of OUTPUT', () => {
const css = [
'/* # Module: M */',

@@ -748,3 +749,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -754,8 +755,8 @@ };

expect(attempt).to.throw(
'Line 4, column 1: Unexpected rule type "rule"; looking for OUTPUT'
'Line 4, column 1: Unexpected rule type "rule"; looking for OUTPUT',
);
});
it('throws error on unexpected comment instead of OUTPUT', function() {
var css = [
it('throws error on unexpected comment instead of OUTPUT', () => {
const css = [
'/* # Module: M */',

@@ -766,3 +767,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -772,8 +773,8 @@ };

expect(attempt).to.throw(
'Line 4, column 1: Unexpected comment "foo"; looking for OUTPUT'
'Line 4, column 1: Unexpected comment "foo"; looking for OUTPUT',
);
});
it('throws error on unexpected rule type instead of EXPECTED', function() {
var css = [
it('throws error on unexpected rule type instead of EXPECTED', () => {
const css = [
'/* # Module: M */',

@@ -789,3 +790,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -795,8 +796,8 @@ };

expect(attempt).to.throw(
'Line 9, column 1: Unexpected rule type "rule"; looking for EXPECTED'
'Line 9, column 1: Unexpected rule type "rule"; looking for EXPECTED',
);
});
it('throws error on unexpected comment instead of EXPECTED', function() {
var css = [
it('throws error on unexpected comment instead of EXPECTED', () => {
const css = [
'/* # Module: M */',

@@ -812,3 +813,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -818,8 +819,8 @@ };

expect(attempt).to.throw(
'Line 9, column 1: Unexpected comment "foo"; looking for EXPECTED'
'Line 9, column 1: Unexpected comment "foo"; looking for EXPECTED',
);
});
it('throws error on unexpected rule type instead of END_ASSERT', function() {
var css = [
it('throws error on unexpected rule type instead of END_ASSERT', () => {
const css = [
'/* # Module: M */',

@@ -840,3 +841,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -846,8 +847,8 @@ };

expect(attempt).to.throw(
'Line 14, column 1: Unexpected rule type "rule"; looking for END_ASSERT'
'Line 14, column 1: Unexpected rule type "rule"; looking for END_ASSERT',
);
});
it('throws error on unexpected comment instead of END_ASSERT', function() {
var css = [
it('throws error on unexpected comment instead of END_ASSERT', () => {
const css = [
'/* # Module: M */',

@@ -868,3 +869,3 @@ '/* Test: T */',

].join('\n');
var attempt = function() {
const attempt = function () {
main.parse(css);

@@ -874,9 +875,9 @@ };

expect(attempt).to.throw(
'Line 14, column 1: Unexpected comment "foo"; looking for END_ASSERT'
'Line 14, column 1: Unexpected comment "foo"; looking for END_ASSERT',
);
});
describe('#contains', function() {
it('parses a passing output test', function() {
var css = [
describe('#contains', () => {
it('parses a passing output test', () => {
const css = [
'/* # Module: Contains */',

@@ -900,3 +901,3 @@ '/* Test: CSS output contains */',

].join('\n');
var expected = [
const expected = [
{

@@ -924,4 +925,4 @@ module: 'Contains',

it('parses a passing output test with loud comments', function() {
var css = [
it('parses a passing output test with loud comments', () => {
const css = [
'/* Some random loud comment */',

@@ -949,3 +950,3 @@ '/* # Module: Contains */',

].join('\n');
var expected = [
const expected = [
{

@@ -975,4 +976,4 @@ module: 'Contains',

it('parses a failing output test', function() {
var css = [
it('parses a passing output test with curly braces within a content property', () => {
const css = [
'/* # Module: Contains */',

@@ -984,5 +985,51 @@ '/* Test: CSS output contains */',

'.test-output {',
' content: \'{ "a": 1, "b": 2 }\';',
' height: 10px;',
' width: 20px; }',
'/* END_OUTPUT */',
'/* */',
'/* CONTAINED */',
'.test-output {',
' content: \'{ "a": 1, "b": 2 }\'; }',
'',
'/* END_CONTAINED */',
'/* */',
'/* END_ASSERT */',
].join('\n');
const expected = [
{
module: 'Contains',
tests: [
{
test: 'CSS output contains',
assertions: [
{
description: 'Output selector pattern contains input pattern',
assertionType: 'equal',
passed: true,
output:
'.test-output {\n content: \'{ "a": 1, "b": 2 }\';\n height: 10px;\n width: 20px;\n}',
expected:
'.test-output {\n content: \'{ "a": 1, "b": 2 }\';\n}',
},
],
},
],
},
];
expect(main.parse(css)).to.deep.equal(expected);
});
it('parses a failing output test', () => {
const css = [
'/* # Module: Contains */',
'/* Test: CSS output contains */',
'/* ASSERT: Output selector pattern contains input pattern */',
'/* */',
'/* OUTPUT */',
'.test-output {',
' height: 10px;',
' width: 20px; }',
'',
'/* END_OUTPUT */',

@@ -998,3 +1045,3 @@ '/* */',

].join('\n');
var expected = [
const expected = [
{

@@ -1022,4 +1069,4 @@ module: 'Contains',

it('parses a failing output test (wrong selector)', function() {
var css = [
it('parses a failing output test (wrong selector)', () => {
const css = [
'/* # Module: Contains */',

@@ -1044,3 +1091,3 @@ '/* Test: CSS output contains */',

].join('\n');
var expected = [
const expected = [
{

@@ -1047,0 +1094,0 @@ module: 'Contains',

@@ -1,6 +0,10 @@

var path = require('path');
/* eslint-env mocha, jest */
var main = require('../lib/main.js');
'use strict';
var sassFile = path.join(__dirname, 'scss', 'test.scss');
main.runSass({ file: sassFile }, { describe: describe, it: it });
const path = require('path');
const main = require('../lib/main.js');
const sassFile = path.join(__dirname, 'scss', 'test.scss');
main.runSass({ file: sassFile }, { describe, it });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc