├── .jshintrc ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── _randomized.scss ├── app.css ├── app.js ├── app.less ├── index.html ├── package.json ├── randomized.less ├── renovate.json ├── server.js └── vendor ├── jscolor.min.js ├── less.min.js └── sharer.min.js /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esnext": true 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "beautify.ignore": [ 3 | "**/*.html", 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Sparanoid, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Randomized 2 | 3 | Erratic colors for machines and people, powered by machine learning and artificial intelligence, just kidding. 4 | 5 | ----- 6 | 7 | ## Donate 8 | 9 | Wanna buy me a cup of coffee? [Great](http://sparanoid.com/donate/). 10 | 11 | ## Author 12 | 13 | **Tunghsiao Liu** 14 | 15 | - Twitter: @[tunghsiao](http://twitter.com/tunghsiao) 16 | - GitHub: @[sparanoid](http://github.com/sparanoid) 17 | 18 | ## License 19 | 20 | MIT 21 | -------------------------------------------------------------------------------- /_randomized.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Randomized | © Tunghsiao Liu | MIT 3 | // 4 | 5 | // Variables for standalone version 6 | // $link-color: #a212d1; 7 | // $code-color: #00cc80; 8 | 9 | // Power 10 | @function pow($num, $exponent) { 11 | $value: 1; 12 | 13 | @if $exponent > 0 { 14 | @for $i from 1 through $exponent { 15 | $value: $value * $num; 16 | } 17 | } 18 | 19 | @return $value; 20 | } 21 | 22 | // Returns the luminance of `$color` as a float (between 0 and 1) 23 | // https://css-tricks.com/snippets/sass/luminance-color-function/ 24 | @function luminance($color) { 25 | $colors: ( 26 | 'red': red($color), 27 | 'green': green($color), 28 | 'blue': blue($color) 29 | ); 30 | 31 | @each $name, $value in $colors { 32 | $adjusted: 0; 33 | $value: $value / 255; 34 | 35 | @if $value < 0.03928 { 36 | $value: $value / 12.92; 37 | } @else { 38 | $value: ($value + .055) / 1.055; 39 | $value: pow($value, 2.4); 40 | } 41 | 42 | $colors: map-merge($colors, ($name: $value)); 43 | } 44 | 45 | @return (map-get($colors, 'red') * .2126) + (map-get($colors, 'green') * .7152) + (map-get($colors, 'blue') * .0722); 46 | } 47 | 48 | // Calculate code background color based on the luminance of link color 49 | @function calc-bg($color) { 50 | @if luminance($color) >= .5 { 51 | @return mix(#fff, $color, 90%); 52 | } @else { 53 | @return mix(#000, $color, 70%); 54 | } 55 | } 56 | 57 | // Reset background 58 | // 59 | // `.highlight > pre` - Jekyll liquid code blocks 60 | // `.highlighter-rouge pre.highlight` - Rouge GFM code blocks 61 | // 62 | // Ref: https://github.com/jekyll/jekyll/pull/4053 63 | $highlighter-tint: $link-color; 64 | .highlight > pre, 65 | .highlighter-rouge pre.highlight { 66 | background: rgba(calc-bg($highlighter-tint), .02); 67 | } 68 | 69 | // General highlights 70 | // 71 | // `.highlight code` - Rouge GFM and Jekyll liquid code blocks 72 | // `.highlighter-rouge code` - Rouge inline code 73 | .highlight, 74 | .highlighter-rouge { 75 | 76 | // Special background for syntax errors 77 | .err { background-color: rgba(saturate($highlighter-tint, 10%), .1) } // Error 78 | 79 | .c { font-style: italic } // Comment 80 | .cm { font-style: italic } // Comment.Multiline 81 | .cp { font-weight: bold } // Comment.Preproc 82 | .c1 { font-style: italic } // Comment.Single 83 | .cs { font-weight: bold; font-style: italic } // Comment.Special 84 | 85 | .nc { font-weight: bold } // Name.Class 86 | .ne { font-weight: bold } // Name.Exception 87 | .nf { font-weight: bold } // Name.Function 88 | 89 | .o { font-weight: bold } // Operator 90 | .ow { font-weight: bold } // Operator.Word 91 | 92 | .gs { font-weight: bold } // Generic.Strong 93 | .ge { font-style: italic } // Generic.Emph 94 | 95 | .k { font-weight: bold } // Keyword 96 | .kt { font-weight: bold } // Keyword.Type 97 | .kc { font-weight: bold } // Keyword.Constant 98 | .kd { font-weight: bold } // Keyword.Declaration 99 | .kp { font-weight: bold } // Keyword.Pseudo 100 | .kr { font-weight: bold } // Keyword.Reserved 101 | 102 | $main-tokens: 103 | err // Error 104 | x // Other 105 | 106 | n // Name 107 | na // Name.Attribute 108 | nb // Name.Builtin 109 | bp // Name.Builtin.Pseudo 110 | nc // Name.Class 111 | no // Name.Constant 112 | nd // Name.Decorator 113 | ni // Name.Entity 114 | ne // Name.Exception 115 | nf // Name.Function 116 | nl // Name.Label 117 | nn // Name.Namespace 118 | nx // Name.Other 119 | nt // Name.Tag 120 | nv // Name.Variable 121 | vc // Name.Variable.Class 122 | vg // Name.Variable.Global 123 | vi // Name.Variable.Instance 124 | 125 | g // Generic 126 | gd // Generic.Deleted 127 | ge // Generic.Emph 128 | gr // Generic.Error 129 | gh // Generic.Heading 130 | gi // Generic.Inserted 131 | go // Generic.Output 132 | gp // Generic.Prompt 133 | gs // Generic.Strong 134 | gu // Generic.Subheading 135 | gt // Generic.Traceback 136 | gl // Generic.Lineno 137 | 138 | k // Keyword 139 | kc // Keyword.Constant 140 | kd // Keyword.Declaration 141 | kn // Keyword.Namespace 142 | kp // Keyword.Pseudo 143 | kr // Keyword.Reserved 144 | kt // Keyword.Type 145 | kv // Keyword.Variable 146 | 147 | w // Text.Whitespace 148 | 149 | l // Literal 150 | 151 | ld // Literal.Date 152 | 153 | s // Literal.String 154 | sb // Literal.String.Backtick 155 | sc // Literal.String.Char 156 | sd // Literal.String.Doc 157 | s2 // Literal.String.Double 158 | se // Literal.String.Escape 159 | sh // Literal.String.Heredoc 160 | si // Literal.String.Interpol 161 | sx // Literal.String.Other 162 | sr // Literal.String.Regex 163 | s1 // Literal.String.Single 164 | ss // Literal.String.Symbol 165 | 166 | m // Literal.Number 167 | mf // Literal.Number.Float 168 | mh // Literal.Number.Hex 169 | mi // Literal.Number.Integer 170 | il // Literal.Number.Integer.Long 171 | mo // Literal.Number.Oct 172 | mb // Literal.Number.Bin 173 | mx // Literal.Number.Other 174 | 175 | o // Operator 176 | ow // Operator.Word 177 | 178 | p // Punctuation 179 | pi // Punctuation.Indicator 180 | ; 181 | 182 | // Generate main highlights 183 | @each $token in $main-tokens { 184 | $i: index($main-tokens, $token); 185 | .#{$token} { 186 | color: mix(adjust-hue($code-color, ($i * 360 / length($main-tokens))), $link-color, 80%); 187 | } 188 | } 189 | 190 | $comment-tokens: 191 | c // Comment 192 | cd // Comment.Multiline 193 | cm // Comment.Multiline 194 | cp // Comment.Preproc 195 | c1 // Comment.Single 196 | cs // Comment.Special 197 | ; 198 | 199 | // Generate highlight for comments 200 | @each $token in $comment-tokens { 201 | $i: index($comment-tokens, $token); 202 | .#{$token} { 203 | color: mix(desaturate(adjust-hue($code-color, ($i * 360 / length($comment-tokens))), 70%), $link-color, 90%); 204 | opacity: .6; 205 | } 206 | } 207 | 208 | // Reset code blocks appearance with line numbers 209 | table { 210 | 211 | &, 212 | th, 213 | td, 214 | td pre { 215 | padding: 0; 216 | margin: 0; 217 | border: none; 218 | background: transparent; 219 | font-size: 100%; 220 | } 221 | 222 | // Rouge generated codeblocks with `lineno` will nest `pre` inside an 223 | // outter `pre`, this could help prevent "double" scroller issue on some 224 | // platforms 225 | pre { 226 | overflow-x: visible; 227 | } 228 | 229 | .gutter { 230 | 231 | // Reset theme-specific table styles 232 | &:first-child, 233 | &:last-child { 234 | padding: 0 !important; 235 | } 236 | 237 | .lineno { 238 | color: desaturate($link-color, 95%); 239 | opacity: .5; 240 | user-select: none; 241 | } 242 | } 243 | 244 | .code { 245 | padding-left: 1em; 246 | } 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /app.css: -------------------------------------------------------------------------------- 1 | *, 2 | *:before, 3 | *:after { 4 | padding: 0; 5 | margin: 0; 6 | box-sizing: border-box; 7 | } 8 | 9 | * { 10 | transition: color .4s ease, background .4s ease .4s; 11 | } 12 | 13 | body { 14 | font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; 15 | font-size: 1.6vw; 16 | line-height: 1.6; 17 | padding: 2vw; 18 | color: #fff; 19 | -webkit-font-smoothing: antialiased; 20 | } 21 | 22 | @media (max-width: 1080px) { body { font-size: calc(1.6vw * 1.4); } } 23 | @media (max-width: 640px) { body { font-size: calc(1.6vw * 2.4); } } 24 | @media (max-width: 400px) { body { font-size: calc(1.6vw * 3.2); } } 25 | 26 | h1 { 27 | font-size: 1000%; 28 | font-weight: 800; 29 | line-height: 1; 30 | letter-spacing: -.05em; 31 | margin-top: 14vw; 32 | margin-left: -.8vw; 33 | } 34 | 35 | @media (max-width: 1080px) { h1 { font-size: 700%; } } 36 | @media (max-width: 640px) { h1 { font-size: 400%; } } 37 | @media (max-width: 400px) { h1 { font-size: 300%; } } 38 | 39 | h2 { 40 | font-size: 250%; 41 | font-weight: 400; 42 | line-height: 1.2; 43 | margin-left: -.2vw; 44 | margin-bottom: 1.4vw; 45 | } 46 | 47 | @media (max-width: 1080px) { h2 { font-size: 180%; } } 48 | @media (max-width: 640px) { h2 { font-size: 140%; } } 49 | @media (max-width: 400px) { h2 { font-size: 120%; font-weight: 300; margin-left: -.1vw; } } 50 | 51 | h3 { 52 | font-size: 200%; 53 | font-weight: 400; 54 | line-height: 1; 55 | margin-bottom: 12vw; 56 | margin-left: -.1vw; 57 | } 58 | 59 | @media (max-width: 1080px) { h3 { font-size: 160%; } } 60 | @media (max-width: 640px) { h3 { font-size: 120%; } } 61 | @media (max-width: 400px) { h3 { font-size: 100%; font-weight: 300; } } 62 | 63 | a { 64 | color: #fff; 65 | font-weight: 700; 66 | text-decoration: none; 67 | cursor: pointer; 68 | } 69 | 70 | input, 71 | button, 72 | select, 73 | textarea { 74 | font-family: inherit; 75 | font-size: inherit; 76 | line-height: inherit; 77 | appearance: none; 78 | outline: none; 79 | border: none; 80 | } 81 | 82 | input { 83 | color: #fff; 84 | font-family: Menlo, Consolas, monospace; 85 | border-radius: 0; 86 | } 87 | 88 | button { 89 | color: #fff; 90 | background: transparent; 91 | padding: 0 10px; 92 | cursor: pointer; 93 | } 94 | 95 | p, 96 | pre { 97 | margin-bottom: 1.6rem; 98 | outline: none; 99 | } 100 | 101 | code, 102 | pre { 103 | font-family: Menlo, Consolas, monospace; 104 | } 105 | 106 | p code, 107 | li code { 108 | word-break: break-all; 109 | } 110 | 111 | pre { 112 | padding: 2vw; 113 | margin: 0 -2vw 1.8rem; 114 | overflow-x: auto; 115 | -webkit-overflow-scrolling: touch; 116 | } 117 | 118 | .wrap { 119 | max-width: 800px; 120 | } 121 | 122 | .sub-heading { 123 | font-size: 72%; 124 | text-transform: uppercase; 125 | margin: 10vmin 0 1rem; 126 | opacity: .5; 127 | } 128 | 129 | .btn-picker { 130 | display: flex; 131 | flex-wrap: wrap; 132 | } 133 | 134 | .btn-picker button { 135 | flex-grow: 1; 136 | text-align: right; 137 | font-family: Menlo, Consolas, monospace; 138 | padding: .2em .4em; 139 | } 140 | 141 | .btn-picker input { 142 | width: 8ex; 143 | padding: .2em .4em; 144 | } 145 | 146 | .btn-present { 147 | display: flex; 148 | flex-wrap: wrap; 149 | } 150 | 151 | .generated-styles { 152 | font-size: 72%; 153 | max-height: 12em; 154 | } 155 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // This app is powered by React and Reflux for a more immersive experience, 2 | // just kidding. 3 | var setScheme = (method, el) => { 4 | 'use strict'; 5 | 6 | // Helpers 7 | var getEl = (el) => { 8 | return document.getElementById(el) || document.querySelectorAll(el); 9 | }; 10 | 11 | var isHex = (colors) => { 12 | return re.test(colors[0]) && re.test(colors[1]) && re.test(colors[2]); 13 | }; 14 | 15 | var isScheme = (scheme) => { 16 | return re.test(scheme.code) && re.test(scheme.link) && re.test(scheme.bg); 17 | }; 18 | 19 | var updateScheme = (scheme, arr) => { 20 | scheme.code = arr[0]; 21 | scheme.link = arr[1]; 22 | scheme.bg = arr[2]; 23 | }; 24 | 25 | var updateSchemeButtons = (scheme) => { 26 | getEl('code-color-btn').jscolor.fromString(scheme.code); 27 | getEl('link-color-btn').jscolor.fromString(scheme.link); 28 | getEl('bg-color-btn').jscolor.fromString(scheme.bg); 29 | }; 30 | 31 | var updateSchemeInputs = (scheme) => { 32 | getEl('code-color').value = scheme.code; 33 | getEl('link-color').value = scheme.link; 34 | getEl('bg-color').value = scheme.bg; 35 | }; 36 | 37 | var updateLess = (scheme) => { 38 | if (isScheme(scheme)) { 39 | less.modifyVars({ 40 | '@code-color': `#${scheme.code}`, 41 | '@link-color': `#${scheme.link}`, 42 | '@bg-color': `#${scheme.bg}` 43 | }); 44 | } else { 45 | console.log('Scheme invalid'); 46 | } 47 | }; 48 | 49 | var updateUrl = (scheme) => { 50 | location.hash = `#${scheme.code}-${scheme.link}-${scheme.bg}`; 51 | }; 52 | 53 | var updateTitle = (scheme) => { 54 | document.title = `Randomized - #${scheme.code} #${scheme.link} #${scheme.bg} - Sparanoid`; 55 | }; 56 | 57 | var updateSharerUrl = (scheme) => { 58 | var shares = getEl('.sharer'); 59 | var title = `Randomized by Sparanoid: Erratic colors for machines and people #${scheme.code} #${scheme.link} #${scheme.bg}`; 60 | var url = location.href; 61 | [...shares].map(share => { 62 | share.setAttribute('data-title', title); 63 | share.setAttribute('data-url', url); 64 | }); 65 | }; 66 | 67 | var updateLessToDom = () => { 68 | // https://regex101.com/r/SNWrBz/3 69 | var re = /\/\*!(?: BEGIN: app-only)[\s\S]*(?: END: app-only \*\/)/i; 70 | var lessDom = localStorage[`${location.protocol}//${location.host}${location.pathname}app.less`]; 71 | getEl('generated-styles').innerHTML = lessDom.replace(re, ''); 72 | }; 73 | 74 | var update = (scheme, colors, updateButtons = false) => { 75 | updateScheme(scheme, colors); 76 | updateSchemeInputs(scheme); 77 | 78 | // Button color and background cannot be triggered automatically when input 79 | // changes, need force update 80 | if (updateButtons) { 81 | updateSchemeButtons(scheme); 82 | } 83 | 84 | updateLess(scheme); 85 | 86 | // https://github.com/less/less.js/issues/2562 87 | less.pageLoadFinished.then(() => { 88 | updateUrl(scheme); 89 | updateTitle(scheme); 90 | updateSharerUrl(scheme); 91 | updateLessToDom(); 92 | }); 93 | }; 94 | 95 | // Variables 96 | const re = /^([0-9a-f]{3}){1,2}$/i; 97 | const defaultColors = ['00cc80', 'a212d1', 'ffffff']; 98 | const scheme = { 99 | code: getEl('code-color').value, 100 | link: getEl('link-color').value, 101 | bg: getEl('bg-color').value 102 | }; 103 | var colors = []; 104 | 105 | var setColorsFromHash = () => { 106 | if (location.hash) { 107 | let hash = location.hash.replace(/^#/, '').split('-'); 108 | if (isHex(hash)) { 109 | colors = hash; 110 | } else { 111 | colors = defaultColors; 112 | } 113 | } else { 114 | colors = defaultColors; 115 | } 116 | }; 117 | 118 | // Init on page load 119 | if (method === 'init') { 120 | setColorsFromHash(); 121 | update(scheme, colors); 122 | } 123 | 124 | // Get scheme from predefined colors 125 | if (method === 'present') { 126 | let colors = el.dataset.scheme.split('-'); 127 | update(scheme, colors, true); 128 | } 129 | 130 | // Get scheme from color picker, fire immediately 131 | if (method === 'picker') { 132 | updateLess(scheme); 133 | } 134 | 135 | // Update URL hash and title when scheme changes via color picker 136 | if (method === 'post-picker') { 137 | updateUrl(scheme); 138 | updateTitle(scheme); 139 | } 140 | 141 | // Update scheme when URL hash changes 142 | onhashchange = () => { 143 | setColorsFromHash(); 144 | update(scheme, colors, true); 145 | }; 146 | }; 147 | -------------------------------------------------------------------------------- /app.less: -------------------------------------------------------------------------------- 1 | // Import Randomized library 2 | @import "randomized"; 3 | 4 | /*! BEGIN: app-only */ 5 | // The following rules will be removed from final export 6 | @bg-color: #fff; 7 | @link-color: #a212d1; 8 | @code-color: #00cc80; 9 | 10 | // Check the luma without gamma correction, this behaviors the same with jscolor.js 11 | .check-bg (@v) when (luminance(@v) >= 50%) { 12 | @return-bg: mix(#000, @v, 90%); 13 | } 14 | 15 | .check-bg (@v) when (luminance(@v) < 50%) { 16 | @return-bg: mix(#fff, @v, 90%); 17 | } 18 | 19 | body { 20 | .check-bg(@bg-color); 21 | color: @return-bg; 22 | background: @bg-color; 23 | } 24 | 25 | a { 26 | color: @link-color; 27 | } 28 | 29 | h1 { 30 | color: @code-color; 31 | } 32 | 33 | code { 34 | color: @code-color; 35 | } 36 | 37 | input { 38 | .check-bg(@bg-color); 39 | color: @bg-color; 40 | background: @return-bg; 41 | } 42 | 43 | .generated-styles { 44 | color: @code-color; 45 | transition-delay: 0s; 46 | 47 | &:focus { 48 | .check-bg(@bg-color); 49 | background: fade(@return-bg, 4%); 50 | } 51 | } 52 | /*! END: app-only */ 53 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | Randomized: Erratic colors for machines and people - Sparanoid 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

Randomized

22 | 23 |

Erratic colors for machines and people, powered by machine learning and artificial intelligence, just kidding.

24 | 25 |

Powered by Sparanoid

26 | 27 |
28 |

Randomized is a theme generator for syntax highlighters Rouge, Redcarpet, and Pygments. This is an experimental demo inspired by Solarized, and may change until the project stabilizes.

29 | 30 |

31 |

32 | 35 | 36 |

37 | 38 |

39 | 42 | 43 |

44 | 45 |

46 | 49 | 50 |

51 |

52 | 53 |
def print_hi(name)
 54 |     puts "Hi, #{name}"
 55 |   end
 56 |   print_hi('Tom')
 57 |   #=> prints 'Hi, Tom' to STDOUT.
58 | 59 |

Predefined colors

60 |

61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |

76 | 77 |

Share

78 |

79 | Share your current theme to 80 | Twitter, 81 | Facebook, 82 | Google+. 83 |

84 | 85 |

More Examples

86 |
def show
 87 |   @widget = Widget(params[:id])
 88 |   respond_to do |format|
 89 |     format.html # show.html.erb
 90 |     format.json { render json: @widget }
 91 |   end
92 | 93 |
def print_hi(name)
 94 |     puts "Hi, #{name}"
 95 |   end
 96 |   print_hi('Tom')
 97 |   #=> prints 'Hi, Tom' to STDOUT.
98 | 99 |
<!doctype html>
100 |   <html>
101 |     <head>
102 |       <title>Title!</title>
103 |     </head>
104 |     <body>
105 |       <h1 id="title" class="heading">Example</h1>
106 |       <p id="foo">Hello, World!</p>
107 |       <script type="text/javascript">var a = 1;</script>
108 |       <style type="text/css">#foo { font-weight: bold; }</style>
109 |     </body>
110 |   </html>
111 | 112 |
// Load the http module to create an http server.
113 |   var http = require('http');
114 | 
115 |   // Configure our HTTP server to respond with Hello World to all requests.
116 |   var server = http.createServer(function (request, response) {
117 |     response.writeHead(200, {"Content-Type": "text/plain"});
118 |     response.end("Hello World\n");
119 |   });
120 | 
121 |   // Listen on port 8000, IP defaults to 127.0.0.1
122 |   server.listen(8000);
123 | 
124 |   // Put a friendly message on the terminal
125 |   console.log("Server running at http://127.0.0.1:8000/");
126 | 127 |
diff(plus(A,B), X, plus(DA, DB))
128 |      <= diff(A, X, DA) and diff(B, X, DB).
129 | 
130 |   diff(times(A,B), X, plus(times(A, DB), times(DA, B)))
131 |      <= diff(A, X, DA) and diff(B, X, DB).
132 | 
133 |   equal(X, X).
134 |   diff(X, X, 1).
135 |   diff(Y, X, 0) <= not equal(Y, X).
136 | 137 |
service { 'ntp':
138 |     name      => $service_name,
139 |     ensure    => running,
140 |     enable    => true,
141 |     subscribe => File['ntp.conf'],
142 |   }
143 | 144 |
void main() {
145 |     var collection=[1,2,3,4,5];
146 |     for(var a in collection){
147 |       print(a);
148 |     }
149 |   }
150 | 151 |
Markdown has cool [reference links][ref 1]
152 |   and [regular links too](http://example.com)
153 | 
154 |   [ref 1]: http://example.com
155 | 156 |

Usage

157 |

Copy the following code and paste it into your Jekyll styles, it also works with any Rouge or Redcarpet compatible highlighters:

158 |
159 |
Source not generated
160 |
161 | 162 |

Source Code

163 |

GitHub

164 | 165 | 166 |

This is a side project by Tunghsiao Liu, if you like this service, please consider buying me a cup of coffee. Thanks.

167 | 168 |

© Sparanoid, Inc.

169 |
170 | 171 | 172 | 173 | 174 | 175 | 194 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "randomized-css", 3 | "version": "1.1.0", 4 | "description": "Vagueness colors for machines and people from the future", 5 | "main": "index.html", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/sparanoid/randomized.git" 12 | }, 13 | "keywords": [ 14 | "less", 15 | "sass" 16 | ], 17 | "author": "Tunghsiao Liu", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/sparanoid/randomized/issues" 21 | }, 22 | "homepage": "https://github.com/sparanoid/randomized#readme", 23 | "dependencies": {}, 24 | "devDependencies": { 25 | "express": "^4.13.4" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /randomized.less: -------------------------------------------------------------------------------- 1 | // 2 | // Randomized | © Tunghsiao Liu | MIT 3 | // 4 | 5 | // Variables for standalone version 6 | // @link-color: #a212d1; 7 | // @code-color: #00cc80; 8 | 9 | // Calculate code background color based on the luminance of link color 10 | .calc-bg (@v) when (luminance(@v) >= 50%) { 11 | @calc-bg: mix(#fff, @v, 90%); 12 | } 13 | 14 | .calc-bg (@v) when (luminance(@v) < 50%) { 15 | @calc-bg: mix(#000, @v, 70%); 16 | } 17 | 18 | // Reset background 19 | // 20 | // `.highlight > pre` - Jekyll liquid code blocks 21 | // `.highlighter-rouge pre.highlight` - Rouge GFM code blocks 22 | // 23 | // Ref: https://github.com/jekyll/jekyll/pull/4053 24 | @highlighter-tint: @link-color; 25 | .highlight > pre, 26 | .highlighter-rouge pre.highlight { 27 | .calc-bg(@highlighter-tint); 28 | background: fade(@calc-bg, 2%); 29 | } 30 | 31 | // General highlights 32 | // 33 | // `.highlight code` - Rouge GFM and Jekyll liquid code blocks 34 | // `.highlighter-rouge code` - Rouge inline code 35 | .highlight, 36 | .highlighter-rouge { 37 | 38 | // Special background for syntax errors 39 | .err { background-color: fade(saturate(@highlighter-tint, 10%), 10%) } // Error 40 | 41 | .c { font-style: italic } // Comment 42 | .cm { font-style: italic } // Comment.Multiline 43 | .cp { font-weight: bold } // Comment.Preproc 44 | .c1 { font-style: italic } // Comment.Single 45 | .cs { font-weight: bold; font-style: italic } // Comment.Special 46 | 47 | .nc { font-weight: bold } // Name.Class 48 | .ne { font-weight: bold } // Name.Exception 49 | .nf { font-weight: bold } // Name.Function 50 | 51 | .o { font-weight: bold } // Operator 52 | .ow { font-weight: bold } // Operator.Word 53 | 54 | .gs { font-weight: bold } // Generic.Strong 55 | .ge { font-style: italic } // Generic.Emph 56 | 57 | .k { font-weight: bold } // Keyword 58 | .kt { font-weight: bold } // Keyword.Type 59 | .kc { font-weight: bold } // Keyword.Constant 60 | .kd { font-weight: bold } // Keyword.Declaration 61 | .kp { font-weight: bold } // Keyword.Pseudo 62 | .kr { font-weight: bold } // Keyword.Reserved 63 | 64 | @token-main: 65 | err // Error 66 | x // Other 67 | 68 | n // Name 69 | na // Name.Attribute 70 | nb // Name.Builtin 71 | bp // Name.Builtin.Pseudo 72 | nc // Name.Class 73 | no // Name.Constant 74 | nd // Name.Decorator 75 | ni // Name.Entity 76 | ne // Name.Exception 77 | nf // Name.Function 78 | nl // Name.Label 79 | nn // Name.Namespace 80 | nx // Name.Other 81 | nt // Name.Tag 82 | nv // Name.Variable 83 | vc // Name.Variable.Class 84 | vg // Name.Variable.Global 85 | vi // Name.Variable.Instance 86 | 87 | g // Generic 88 | gd // Generic.Deleted 89 | ge // Generic.Emph 90 | gr // Generic.Error 91 | gh // Generic.Heading 92 | gi // Generic.Inserted 93 | go // Generic.Output 94 | gp // Generic.Prompt 95 | gs // Generic.Strong 96 | gu // Generic.Subheading 97 | gt // Generic.Traceback 98 | gl // Generic.Lineno 99 | 100 | k // Keyword 101 | kc // Keyword.Constant 102 | kd // Keyword.Declaration 103 | kn // Keyword.Namespace 104 | kp // Keyword.Pseudo 105 | kr // Keyword.Reserved 106 | kt // Keyword.Type 107 | kv // Keyword.Variable 108 | 109 | w // Text.Whitespace 110 | 111 | l // Literal 112 | 113 | ld // Literal.Date 114 | 115 | s // Literal.String 116 | sb // Literal.String.Backtick 117 | sc // Literal.String.Char 118 | sd // Literal.String.Doc 119 | s2 // Literal.String.Double 120 | se // Literal.String.Escape 121 | sh // Literal.String.Heredoc 122 | si // Literal.String.Interpol 123 | sx // Literal.String.Other 124 | sr // Literal.String.Regex 125 | s1 // Literal.String.Single 126 | ss // Literal.String.Symbol 127 | 128 | m // Literal.Number 129 | mf // Literal.Number.Float 130 | mh // Literal.Number.Hex 131 | mi // Literal.Number.Integer 132 | il // Literal.Number.Integer.Long 133 | mo // Literal.Number.Oct 134 | mb // Literal.Number.Bin 135 | mx // Literal.Number.Other 136 | 137 | o // Operator 138 | ow // Operator.Word 139 | 140 | p // Punctuation 141 | pi // Punctuation.Indicator 142 | ; 143 | 144 | // Generate main highlights 145 | // Ref: https://github.com/less/less.js/issues/2071 146 | .loop-main (@i) when (@i < (length(@token-main) + 1)) { 147 | @token: extract(@token-main, @i); 148 | 149 | .@{token} { 150 | color: mix(spin(@code-color, (@i * 360 / length(@token-main))), @link-color, 80%); 151 | } 152 | .loop-main((@i + 1)); 153 | } 154 | .loop-main(1); 155 | 156 | @token-comments: 157 | c // Comment 158 | cd // Comment.Multiline 159 | cm // Comment.Multiline 160 | cp // Comment.Preproc 161 | c1 // Comment.Single 162 | cs // Comment.Special 163 | ; 164 | 165 | // Generate highlight for comments 166 | .loop-comments (@i) when (@i < (length(@token-comments) + 1)) { 167 | @token: extract(@token-comments, @i); 168 | 169 | .@{token} { 170 | color: mix(desaturate(spin(@code-color, (@i * 360 / length(@token-comments))), 70%), @link-color, 90%); 171 | opacity: .6; 172 | } 173 | .loop-comments((@i + 1)); 174 | } 175 | .loop-comments(1); 176 | 177 | // Reset code blocks appearance with line numbers 178 | table { 179 | 180 | &, 181 | th, 182 | td, 183 | td pre { 184 | padding: 0; 185 | margin: 0; 186 | border: none; 187 | background: transparent; 188 | font-size: 100%; 189 | } 190 | 191 | // Rouge generated codeblocks with `lineno` will nest `pre` inside an 192 | // outter `pre`, this could help prevent "double" scroller issue on some 193 | // platforms 194 | pre { 195 | overflow-x: visible; 196 | } 197 | 198 | .gutter { 199 | 200 | // Reset theme-specific table styles 201 | &:first-child, 202 | &:last-child { 203 | padding: 0 !important; 204 | } 205 | 206 | .lineno { 207 | color: desaturate(@link-color, 95%); 208 | opacity: .5; 209 | user-select: none; 210 | } 211 | } 212 | 213 | .code { 214 | padding-left: 1em; 215 | } 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base", 4 | ":preserveSemverRanges" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.use(express.static(__dirname + '/')); 5 | app.listen(process.env.PORT || 3000); 6 | -------------------------------------------------------------------------------- /vendor/jscolor.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jscolor - JavaScript Color Picker 3 | * 4 | * @link http://jscolor.com 5 | * @license For open source use: GPLv3 6 | * For commercial use: JSColor Commercial License 7 | * @author Jan Odvarko 8 | * 9 | * See usage examples at http://jscolor.com/examples/ 10 | */"use strict";window.jscolor||(window.jscolor=function(){var e={register:function(){e.attachDOMReadyEvent(e.init),e.attachEvent(document,"mousedown",e.onDocumentMouseDown),e.attachEvent(document,"touchstart",e.onDocumentTouchStart),e.attachEvent(window,"resize",e.onWindowResize)},init:function(){e.jscolor.lookupClass&&e.jscolor.installByClassName(e.jscolor.lookupClass)},tryInstallOnElements:function(t,n){var r=new RegExp("(^|\\s)("+n+")(\\s*(\\{[^}]*\\})|\\s|$)","i");for(var i=0;is[u]?-r[u]+n[u]+i[u]/2>s[u]/2&&n[u]+i[u]-o[u]>=0?n[u]+i[u]-o[u]:n[u]:n[u],-r[a]+n[a]+i[a]+o[a]-l+l*f>s[a]?-r[a]+n[a]+i[a]/2>s[a]/2&&n[a]+i[a]-l-l*f>=0?n[a]+i[a]-l-l*f:n[a]+i[a]-l+l*f:n[a]+i[a]-l+l*f>=0?n[a]+i[a]-l+l*f:n[a]+i[a]-l-l*f];var h=c[u],p=c[a],d=t.fixed?"fixed":"absolute",v=(c[0]+o[0]>n[0]||c[0]2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"mouse"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onDocumentTouchStart:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"touch"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onWindowResize:function(t){e.redrawPosition()},onParentScroll:function(t){e.picker&&e.picker.owner&&e.picker.owner.hide()},_pointerMoveEvent:{mouse:"mousemove",touch:"touchmove"},_pointerEndEvent:{mouse:"mouseup",touch:"touchend"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(t,n,r,i){var s=n._jscInstance;e.preventDefault(t),e.captureTarget(n);var o=function(s,o){e.attachGroupEvent("drag",s,e._pointerMoveEvent[i],e.onDocumentPointerMove(t,n,r,i,o)),e.attachGroupEvent("drag",s,e._pointerEndEvent[i],e.onDocumentPointerEnd(t,n,r,i))};o(document,[0,0]);if(window.parent&&window.frameElement){var u=window.frameElement.getBoundingClientRect(),a=[-u.left,-u.top];o(window.parent.window.document,a)}var f=e.getAbsPointerPos(t),l=e.getRelPointerPos(t);e._pointerOrigin={x:f.x-l.x,y:f.y-l.y};switch(r){case"pad":switch(e.getSliderComponent(s)){case"s":s.hsv[1]===0&&s.fromHSV(null,100,null);break;case"v":s.hsv[2]===0&&s.fromHSV(null,null,100)}e.setPad(s,t,0,0);break;case"sld":e.setSld(s,t,0)}e.dispatchFineChange(s)},onDocumentPointerMove:function(t,n,r,i,s){return function(t){var i=n._jscInstance;switch(r){case"pad":t||(t=window.event),e.setPad(i,t,s[0],s[1]),e.dispatchFineChange(i);break;case"sld":t||(t=window.event),e.setSld(i,t,s[1]),e.dispatchFineChange(i)}}},onDocumentPointerEnd:function(t,n,r,i){return function(t){var r=n._jscInstance;e.detachGroupEvents("drag"),e.releaseTarget(),e.dispatchChange(r)}},dispatchChange:function(t){t.valueElement&&e.isElementType(t.valueElement,"input")&&e.fireEvent(t.valueElement,"change")},dispatchFineChange:function(e){if(e.onFineChange){var t;typeof e.onFineChange=="string"?t=new Function(e.onFineChange):t=e.onFineChange,t.call(e)}},setPad:function(t,n,r,i){var s=e.getAbsPointerPos(n),o=r+s.x-e._pointerOrigin.x-t.padding-t.insetWidth,u=i+s.y-e._pointerOrigin.y-t.padding-t.insetWidth,a=o*(360/(t.width-1)),f=100-u*(100/(t.height-1));switch(e.getPadYComponent(t)){case"s":t.fromHSV(a,f,null,e.leaveSld);break;case"v":t.fromHSV(a,null,f,e.leaveSld)}},setSld:function(t,n,r){var i=e.getAbsPointerPos(n),s=r+i.y-e._pointerOrigin.y-t.padding-t.insetWidth,o=100-s*(100/(t.height-1));switch(e.getSliderComponent(t)){case"s":t.fromHSV(null,o,null,e.leavePad);break;case"v":t.fromHSV(null,null,o,e.leavePad)}},_vmlNS:"jsc_vml_",_vmlCSS:"jsc_vml_css_",_vmlReady:!1,initVML:function(){if(!e._vmlReady){var t=document;t.namespaces[e._vmlNS]||t.namespaces.add(e._vmlNS,"urn:schemas-microsoft-com:vml");if(!t.styleSheets[e._vmlCSS]){var n=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","rect","roundrect","oval","arc","image"],r=t.createStyleSheet();r.owningElement.id=e._vmlCSS;for(var i=0;i=3&&(s=r[0].match(i))&&(o=r[1].match(i))&&(u=r[2].match(i))){var a=parseFloat((s[1]||"0")+(s[2]||"")),f=parseFloat((o[1]||"0")+(o[2]||"")),l=parseFloat((u[1]||"0")+(u[2]||""));return this.fromRGB(a,f,l,t),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return"#"+this.toString().toUpperCase()},this.toRGBString=function(){return"rgb("+Math.round(this.rgb[0])+","+Math.round(this.rgb[1])+","+Math.round(this.rgb[2])+")"},this.isLight=function(){return.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]>127.5},this._processParentElementsInDOM=function(){if(this._linkedElementsProcessed)return;this._linkedElementsProcessed=!0;var t=this.targetElement;do{var n=e.getStyle(t);n&&n.position.toLowerCase()==="fixed"&&(this.fixed=!0),t!==this.targetElement&&(t._jscEventsAttached||(e.attachEvent(t,"scroll",e.onParentScroll),t._jscEventsAttached=!0))}while((t=t.parentNode)&&!e.isElementType(t,"body"))};if(typeof t=="string"){var h=t,p=document.getElementById(h);p?this.targetElement=p:e.warn("Could not find target element with ID '"+h+"'")}else t?this.targetElement=t:e.warn("Invalid target element: '"+t+"'");if(this.targetElement._jscLinkedInstance){e.warn("Cannot link jscolor twice to the same element. Skipping.");return}this.targetElement._jscLinkedInstance=this,this.valueElement=e.fetchElement(this.valueElement),this.styleElement=e.fetchElement(this.styleElement);var d=this,v=this.container?e.fetchElement(this.container):document.getElementsByTagName("body")[0],m=3;if(e.isElementType(this.targetElement,"button"))if(this.targetElement.onclick){var g=this.targetElement.onclick;this.targetElement.onclick=function(e){return g.call(this,e),!1}}else this.targetElement.onclick=function(){return!1};if(this.valueElement&&e.isElementType(this.valueElement,"input")){var y=function(){d.fromString(d.valueElement.value,e.leaveValue),e.dispatchFineChange(d)};e.attachEvent(this.valueElement,"keyup",y),e.attachEvent(this.valueElement,"input",y),e.attachEvent(this.valueElement,"blur",c),this.valueElement.setAttribute("autocomplete","off")}this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor()}};return e.jscolor.lookupClass="jscolor",e.jscolor.installByClassName=function(t){var n=document.getElementsByTagName("input"),r=document.getElementsByTagName("button");e.tryInstallOnElements(n,t),e.tryInstallOnElements(r,t)},e.register(),e.jscolor}()); -------------------------------------------------------------------------------- /vendor/less.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Less - Leaner CSS v3.0.0-pre.5 3 | * http://lesscss.org 4 | * 5 | * Copyright (c) 2009-2016, Alexis Sellier 6 | * Licensed under the Apache-2.0 License. 7 | * 8 | */ 9 | 10 | /** * @license Apache-2.0 11 | */ 12 | 13 | !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.less=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0||b.isFileProtocol?"development":"production");var c=/!dumpLineNumbers:(comments|mediaquery|all)/.exec(a.location.hash);c&&(b.dumpLineNumbers=c[1]),void 0===b.useFileCache&&(b.useFileCache=!0),void 0===b.onReady&&(b.onReady=!0),b.javascriptEnabled=!(!b.javascriptEnabled&&!b.inlineJavaScript)}},{"./browser":3,"./utils":11}],2:[function(a,b,c){function d(a){a.filename&&console.warn(a),e.async||h.removeChild(i)}a("promise/polyfill");var e=window.less||{};a("./add-default-options")(window,e);var f=b.exports=a("./index")(window,e);window.less=f;var g,h,i;e.onReady&&(/!watch/.test(window.location.hash)&&f.watch(),e.async||(g="body { display: none !important }",h=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style"),i.type="text/css",i.styleSheet?i.styleSheet.cssText=g:i.appendChild(document.createTextNode(g)),h.appendChild(i)),f.registerStylesheetsImmediately(),f.pageLoadFinished=f.refresh("development"===f.env).then(d,d))},{"./add-default-options":1,"./index":8,"promise/polyfill":101}],3:[function(a,b,c){var d=a("./utils");b.exports={createCSS:function(a,b,c){var e=c.href||"",f="less:"+(c.title||d.extractId(e)),g=a.getElementById(f),h=!1,i=a.createElement("style");i.setAttribute("type","text/css"),c.media&&i.setAttribute("media",c.media),i.id=f,i.styleSheet||(i.appendChild(a.createTextNode(b)),h=null!==g&&g.childNodes.length>0&&i.childNodes.length>0&&g.firstChild.nodeValue===i.firstChild.nodeValue);var j=a.getElementsByTagName("head")[0];if(null===g||h===!1){var k=c&&c.nextSibling||null;k?k.parentNode.insertBefore(i,k):j.appendChild(i)}if(g&&h===!1&&g.parentNode.removeChild(g),i.styleSheet)try{i.styleSheet.cssText=b}catch(l){throw new Error("Couldn't reassign styleSheet.cssText.")}},currentScript:function(a){var b=a.document;return b.currentScript||function(){var a=b.getElementsByTagName("script");return a[a.length-1]}()}}},{"./utils":11}],4:[function(a,b,c){b.exports=function(a,b,c){var d=null;if("development"!==b.env)try{d="undefined"==typeof a.localStorage?null:a.localStorage}catch(e){}return{setCSS:function(a,b,e,f){if(d){c.info("saving "+a+" to cache.");try{d.setItem(a,f),d.setItem(a+":timestamp",b),e&&d.setItem(a+":vars",JSON.stringify(e))}catch(g){c.error('failed to save "'+a+'" to local storage for caching.')}}},getCSS:function(a,b,c){var e=d&&d.getItem(a),f=d&&d.getItem(a+":timestamp"),g=d&&d.getItem(a+":vars");if(c=c||{},f&&b.lastModified&&new Date(b.lastModified).valueOf()===new Date(f).valueOf()&&(!c&&!g||JSON.stringify(c)===g))return e}}}},{}],5:[function(a,b,c){var d=a("./utils"),e=a("./browser");b.exports=function(a,b,c){function f(b,f){var g,h,i="less-error-message:"+d.extractId(f||""),j='
  • {content}
  • ',k=a.document.createElement("div"),l=[],m=b.filename||f,n=m.match(/([^\/]+(\?.*)?)$/)[1];k.id=i,k.className="less-error-message",h="

    "+(b.type||"Syntax")+"Error: "+(b.message||"There is an error in your .less file")+'

    in '+n+" ";var o=function(a,b,c){void 0!==a.extract[b]&&l.push(j.replace(/\{line\}/,(parseInt(a.line,10)||0)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};b.extract&&(o(b,0,""),o(b,1,"line"),o(b,2,""),h+="on line "+b.line+", column "+(b.column+1)+":

      "+l.join("")+"
    "),b.stack&&(b.extract||c.logLevel>=4)&&(h+="
    Stack Trace
    "+b.stack.split("\n").slice(1).join("
    ")),k.innerHTML=h,e.createCSS(a.document,[".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),k.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),"development"===c.env&&(g=setInterval(function(){var b=a.document,c=b.body;c&&(b.getElementById(i)?c.replaceChild(k,b.getElementById(i)):c.insertBefore(k,c.firstChild),clearInterval(g))},10))}function g(b){var c=a.document.getElementById("less-error-message:"+d.extractId(b));c&&c.parentNode.removeChild(c)}function h(a){}function i(a){c.errorReporting&&"html"!==c.errorReporting?"console"===c.errorReporting?h(a):"function"==typeof c.errorReporting&&c.errorReporting("remove",a):g(a)}function j(a,d){var e="{line} {content}",f=a.filename||d,g=[],h=(a.type||"Syntax")+"Error: "+(a.message||"There is an error in your .less file")+" in "+f+" ",i=function(a,b,c){void 0!==a.extract[b]&&g.push(e.replace(/\{line\}/,(parseInt(a.line,10)||0)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};a.extract&&(i(a,0,""),i(a,1,"line"),i(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":\n"+g.join("\n")),a.stack&&(a.extract||c.logLevel>=4)&&(h+="\nStack Trace\n"+a.stack),b.logger.error(h)}function k(a,b){c.errorReporting&&"html"!==c.errorReporting?"console"===c.errorReporting?j(a,b):"function"==typeof c.errorReporting&&c.errorReporting("add",a,b):f(a,b)}return{add:k,remove:i}}},{"./browser":3,"./utils":11}],6:[function(a,b,c){b.exports=function(b,c){var d=a("../less/environment/abstract-file-manager.js"),e={},f=function(){};return f.prototype=new d,f.prototype.alwaysMakePathsAbsolute=function(){return!0},f.prototype.join=function(a,b){return a?this.extractUrlParts(b,a).path:b},f.prototype.doXHR=function(a,d,e,f){function g(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):"function"==typeof d&&d(b.status,a)}var h=new XMLHttpRequest,i=!b.isFileProtocol||b.fileAsync;"function"==typeof h.overrideMimeType&&h.overrideMimeType("text/css"),c.debug("XHR: Getting '"+a+"'"),h.open("GET",a,i),h.setRequestHeader("Accept",d||"text/x-less, text/css; q=0.9, */*; q=0.5"),h.send(null),b.isFileProtocol&&!b.fileAsync?0===h.status||h.status>=200&&h.status<300?e(h.responseText):f(h.status,a):i?h.onreadystatechange=function(){4==h.readyState&&g(h,e,f)}:g(h,e,f)},f.prototype.supports=function(a,b,c,d){return!0},f.prototype.clearFileCache=function(){e={}},f.prototype.loadFile=function(a,b,c,d,f){b&&!this.isPathAbsolute(a)&&(a=b+a),c=c||{};var g=this.extractUrlParts(a,window.location.href),h=g.url;if(c.useFileCache&&e[h])try{var i=e[h];f(null,{contents:i,filename:h,webInfo:{lastModified:new Date}})}catch(j){f({filename:h,message:"Error loading file "+h+" error was "+j.message})}else this.doXHR(h,c.mime,function(a,b){e[h]=a,f(null,{contents:a,filename:h,webInfo:{lastModified:b}})},function(a,b){f({type:"File",message:"'"+b+"' wasn't found ("+a+")",href:h})})},f}},{"../less/environment/abstract-file-manager.js":16}],7:[function(a,b,c){b.exports=function(){function b(){throw{type:"Runtime",message:"Image size functions are not supported in browser version of less"}}var c=a("./../less/functions/function-registry"),d={"image-size":function(a){return b(this,a),-1},"image-width":function(a){return b(this,a),-1},"image-height":function(a){return b(this,a),-1}};c.addMultiple(d)}},{"./../less/functions/function-registry":24}],8:[function(a,b,c){var d=a("./utils").addDataAttr,e=a("./browser");b.exports=function(b,c){function f(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function g(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){var d=c.concat(Array.prototype.slice.call(arguments,0));return a.apply(b,d)}}function h(a){for(var b,d=l.getElementsByTagName("style"),e=0;e=c&&console.log(a)},info:function(a){b.logLevel>=d&&console.log(a)},warn:function(a){b.logLevel>=e&&console.warn(a)},error:function(a){b.logLevel>=f&&console.error(a)}}]);for(var g=0;g0&&(a=a.slice(0,b)),b=a.lastIndexOf("/"),b<0&&(b=a.lastIndexOf("\\")),b<0?"":a.slice(0,b+1)},d.prototype.tryAppendExtension=function(a,b){return/(\.[a-z]*$)|([\?;].*)$/.test(a)?a:a+b},d.prototype.tryAppendLessExtension=function(a){return this.tryAppendExtension(a,".less")},d.prototype.supportsSync=function(){return!1},d.prototype.alwaysMakePathsAbsolute=function(){return!1},d.prototype.isPathAbsolute=function(a){return/^(?:[a-z-]+:|\/|\\|#)/i.test(a)},d.prototype.join=function(a,b){return a?a+b:b},d.prototype.pathDiff=function(a,b){var c,d,e,f,g=this.extractUrlParts(a),h=this.extractUrlParts(b),i="";if(g.hostPart!==h.hostPart)return"";for(d=Math.max(h.directories.length,g.directories.length),c=0;c0&&(h.splice(c-1,2),c-=2)}return g.hostPart=f[1],g.directories=h,g.path=(f[1]||"")+h.join("/"),g.filename=f[4],g.fileUrl=g.path+(f[4]||""),g.url=g.fileUrl+(f[5]||""),g},b.exports=d},{}],17:[function(a,b,c){function d(a,b){throw new f({type:b||"Syntax",message:a})}var e=a("../functions/function-registry"),f=a("../less-error"),g=function(){};g.prototype.evalPlugin=function(a,b,c,d){var f,g,h,i,j,k,l;k=b.pluginManager,d&&(l="string"==typeof d?d:d.filename);var m=(new this.less.FileManager).extractUrlParts(l).filename;if(l&&(h=k.get(l)))return this.trySetOptions(h,l,m,c),h.use&&h.use.call(this.context,h),h;i={exports:{},pluginManager:k,fileInfo:d},j=i.exports,g=e.create();try{if(f=new Function("module","require","functions","tree","less","fileInfo",a),h=f(i,this.require,g,this.less.tree,this.less,d),h||(h=i.exports),h=this.validatePlugin(h,l,m),!h)return new this.less.LessError({message:"Not a valid plugin"});k.addPlugin(h,d.filename,g),h.functions=g.getLocalFunctions(),this.trySetOptions(h,l,m,c),h.use&&h.use.call(this.context,h)}catch(n){return console.log(n.stack),new this.less.LessError({message:"Plugin evaluation error: '"+n.name+": "+n.message.replace(/["]/g,"'")+"'",filename:l,line:this.line,col:this.column})}return h},g.prototype.trySetOptions=function(a,b,c,e){if(e){if(!a.setOptions)return d("Options have been provided but the plugin "+c+" does not support any options."),null;try{a.setOptions(e)}catch(f){return d("Error setting options on plugin "+c+"\n"+f.message),null}}},g.prototype.validatePlugin=function(a,b,c){return a?("function"==typeof a&&(a=new a),a.minVersion&&this.compareVersion(a.minVersion,this.less.version)<0?(d("Plugin "+c+" requires version "+this.versionToString(a.minVersion)),null):a):null},g.prototype.compareVersion=function(a,b){"string"==typeof a&&(a=a.match(/^(\d+)\.?(\d+)?\.?(\d+)?/),a.shift());for(var c=0;cparseInt(b[c])?-1:1;return 0},g.prototype.versionToString=function(a){for(var b="",c=0;c=0;h--){var i=g[h];if(i[f?"supportsSync":"supports"](a,b,c,e))return i}return null},e.prototype.addFileManager=function(a){this.fileManagers.push(a)},e.prototype.clearFileManagers=function(){this.fileManagers=[]},b.exports=e},{"../logger":35}],19:[function(a,b,c){function d(a,b,c){var d,f,g,h,i=b.alpha,j=c.alpha,k=[];g=j+i*(1-j);for(var l=0;l<3;l++)d=b.rgb[l]/255,f=c.rgb[l]/255,h=a(d,f),g&&(h=(j*f+i*(d-j*(d+f-h)))/g),k[l]=255*h;return new e(k,g)}var e=a("../tree/color"),f=a("./function-registry"),g={multiply:function(a,b){return a*b},screen:function(a,b){return a+b-a*b},overlay:function(a,b){return a*=2,a<=1?g.multiply(a,b):g.screen(a-1,b)},softlight:function(a,b){var c=1,d=a;return b>.5&&(d=1,c=a>.25?Math.sqrt(a):((16*a-12)*a+4)*a),a-(1-2*b)*d*(c-a)},hardlight:function(a,b){return g.overlay(b,a)},difference:function(a,b){return Math.abs(a-b)},exclusion:function(a,b){return a+b-2*a*b},average:function(a,b){return(a+b)/2},negation:function(a,b){return 1-Math.abs(a+b-1)}};for(var h in g)g.hasOwnProperty(h)&&(d[h]=d.bind(null,g[h]));f.addMultiple(d)},{"../tree/color":52,"./function-registry":24}],20:[function(a,b,c){function d(a){return Math.min(1,Math.max(0,a))}function e(a){return h.hsla(a.h,a.s,a.l,a.a)}function f(a){if(a instanceof i)return parseFloat(a.unit.is("%")?a.value/100:a.value);if("number"==typeof a)return a;throw{type:"Argument",message:"color functions take numbers as parameters"}}function g(a,b){return a instanceof i&&a.unit.is("%")?parseFloat(a.value*b/100):f(a)}var h,i=a("../tree/dimension"),j=a("../tree/color"),k=a("../tree/quoted"),l=a("../tree/anonymous"),m=a("./function-registry");h={rgb:function(a,b,c){return h.rgba(a,b,c,1)},rgba:function(a,b,c,d){var e=[a,b,c].map(function(a){return g(a,255)});return d=f(d),new j(e,d)},hsl:function(a,b,c){return h.hsla(a,b,c,1)},hsla:function(a,b,c,e){function g(a){return a=a<0?a+1:a>1?a-1:a,6*a<1?i+(j-i)*a*6:2*a<1?j:3*a<2?i+(j-i)*(2/3-a)*6:i}var i,j;return a=f(a)%360/360,b=d(f(b)),c=d(f(c)),e=d(f(e)),j=c<=.5?c*(b+1):c+b-c*b,i=2*c-j,h.rgba(255*g(a+1/3),255*g(a),255*g(a-1/3),e)},hsv:function(a,b,c){return h.hsva(a,b,c,1)},hsva:function(a,b,c,d){a=f(a)%360/360*360,b=f(b),c=f(c),d=f(d);var e,g;e=Math.floor(a/60%6),g=a/60-e;var i=[c,c*(1-b),c*(1-g*b),c*(1-(1-g)*b)],j=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return h.rgba(255*i[j[e][0]],255*i[j[e][1]],255*i[j[e][2]],d)},hue:function(a){return new i(a.toHSL().h)},saturation:function(a){return new i(100*a.toHSL().s,"%")},lightness:function(a){return new i(100*a.toHSL().l,"%")},hsvhue:function(a){return new i(a.toHSV().h)},hsvsaturation:function(a){return new i(100*a.toHSV().s,"%")},hsvvalue:function(a){return new i(100*a.toHSV().v,"%")},red:function(a){return new i(a.rgb[0])},green:function(a){return new i(a.rgb[1])},blue:function(a){return new i(a.rgb[2])},alpha:function(a){return new i(a.toHSL().a)},luma:function(a){return new i(a.luma()*a.alpha*100,"%")},luminance:function(a){var b=.2126*a.rgb[0]/255+.7152*a.rgb[1]/255+.0722*a.rgb[2]/255;return new i(b*a.alpha*100,"%")},saturate:function(a,b,c){if(!a.rgb)return null;var f=a.toHSL();return f.s+="undefined"!=typeof c&&"relative"===c.value?f.s*b.value/100:b.value/100,f.s=d(f.s),e(f)},desaturate:function(a,b,c){var f=a.toHSL();return f.s-="undefined"!=typeof c&&"relative"===c.value?f.s*b.value/100:b.value/100,f.s=d(f.s),e(f)},lighten:function(a,b,c){var f=a.toHSL();return f.l+="undefined"!=typeof c&&"relative"===c.value?f.l*b.value/100:b.value/100,f.l=d(f.l),e(f)},darken:function(a,b,c){var f=a.toHSL();return f.l-="undefined"!=typeof c&&"relative"===c.value?f.l*b.value/100:b.value/100,f.l=d(f.l),e(f)},fadein:function(a,b,c){var f=a.toHSL();return f.a+="undefined"!=typeof c&&"relative"===c.value?f.a*b.value/100:b.value/100,f.a=d(f.a),e(f)},fadeout:function(a,b,c){var f=a.toHSL();return f.a-="undefined"!=typeof c&&"relative"===c.value?f.a*b.value/100:b.value/100,f.a=d(f.a),e(f)},fade:function(a,b){var c=a.toHSL();return c.a=b.value/100,c.a=d(c.a),e(c)},spin:function(a,b){var c=a.toHSL(),d=(c.h+b.value)%360;return c.h=d<0?360+d:d,e(c)},mix:function(a,b,c){a.toHSL&&b.toHSL||(console.log(b.type),console.dir(b)),c||(c=new i(50));var d=c.value/100,e=2*d-1,f=a.toHSL().a-b.toHSL().a,g=((e*f==-1?e:(e+f)/(1+e*f))+1)/2,h=1-g,k=[a.rgb[0]*g+b.rgb[0]*h,a.rgb[1]*g+b.rgb[1]*h,a.rgb[2]*g+b.rgb[2]*h],l=a.alpha*d+b.alpha*(1-d);return new j(k,l)},greyscale:function(a){return h.desaturate(a,new i(100))},contrast:function(a,b,c,d){if(!a.rgb)return null;"undefined"==typeof b&&(b=h.rgba(0,0,0,1)),"undefined"==typeof c&&(c=h.rgba(255,255,255,1));var e,f,g=a.luma(),i=b.luma(),j=c.luma();return e=g>i?(g+.05)/(i+.05):(i+.05)/(g+.05),f=g>j?(g+.05)/(j+.05):(j+.05)/(g+.05),e>f?b:c},argb:function(a){return new l(a.toARGB())},color:function(a){if(a instanceof k&&/^#([a-f0-9]{6}|[a-f0-9]{3})$/i.test(a.value))return new j(a.value.slice(1));if(a instanceof j||(a=j.fromKeyword(a.value)))return a.value=void 0,a;throw{type:"Argument",message:"argument must be a color keyword or 3/6 digit hex e.g. #FFF"}},tint:function(a,b){return h.mix(h.rgb(255,255,255),a,b)},shade:function(a,b){return h.mix(h.rgb(0,0,0),a,b)}},m.addMultiple(h)},{"../tree/anonymous":47,"../tree/color":52,"../tree/dimension":59,"../tree/quoted":77,"./function-registry":24}],21:[function(a,b,c){b.exports=function(b){var c=a("../tree/quoted"),d=a("../tree/url"),e=a("./function-registry"),f=function(a,b){return new d(b,a.index,a.currentFileInfo).eval(a.context)},g=a("../logger");e.add("data-uri",function(a,e){e||(e=a,a=null);var h=a&&a.value,i=e.value,j=this.currentFileInfo,k=j.relativeUrls?j.currentDirectory:j.entryPath,l=i.indexOf("#"),m="";l!==-1&&(m=i.slice(l),i=i.slice(0,l));var n=b.getFileManager(i,k,this.context,b,!0);if(!n)return f(this,e);var o=!1;if(a)o=/;base64$/.test(h);else{if(h=b.mimeLookup(i),"image/svg+xml"===h)o=!1;else{var p=b.charsetLookup(h);o=["US-ASCII","UTF-8"].indexOf(p)<0}o&&(h+=";base64")}var q=n.loadFileSync(i,k,this.context,b);if(!q.contents)return g.warn("Skipped data-uri embedding of "+i+" because file not found"),f(this,e||a);var r=q.contents;if(o&&!b.encodeBase64)return f(this,e);r=o?b.encodeBase64(r):encodeURIComponent(r);var s="data:"+h+","+r+m,t=32768;return s.length>=t&&this.context.ieCompat!==!1?(g.warn("Skipped data-uri embedding of "+i+" because its size ("+s.length+" characters) exceeds IE8-safe "+t+" characters!"),f(this,e||a)):new d(new c('"'+s+'"',s,(!1),this.index,this.currentFileInfo),this.index,this.currentFileInfo)})}},{"../logger":35,"../tree/quoted":77,"../tree/url":84,"./function-registry":24}],22:[function(a,b,c){var d=a("../tree/keyword"),e=a("./function-registry"),f={eval:function(){var a=this.value_,b=this.error_;if(b)throw b;if(null!=a)return a?d.True:d.False},value:function(a){this.value_=a},error:function(a){this.error_=a},reset:function(){this.value_=this.error_=null}};e.add("default",f.eval.bind(f)),b.exports=f},{"../tree/keyword":68,"./function-registry":24}],23:[function(a,b,c){var d=a("../tree/expression"),e=function(a,b,c,d){this.name=a.toLowerCase(),this.index=c,this.context=b,this.currentFileInfo=d,this.func=b.frames[0].functionRegistry.get(this.name)};e.prototype.isValid=function(){return Boolean(this.func)},e.prototype.call=function(a){return Array.isArray(a)&&(a=a.filter(function(a){return"Comment"!==a.type}).map(function(a){if("Expression"===a.type){var b=a.value.filter(function(a){return"Comment"!==a.type});return 1===b.length?b[0]:new d(b)}return a})),this.func.apply(this,a)},b.exports=e},{"../tree/expression":62}],24:[function(a,b,c){function d(a){return{_data:{},add:function(a,b){a=a.toLowerCase(),this._data.hasOwnProperty(a),this._data[a]=b},addMultiple:function(a){Object.keys(a).forEach(function(b){this.add(b,a[b])}.bind(this))},get:function(b){return this._data[b]||a&&a.get(b)},getLocalFunctions:function(){return this._data},inherit:function(){return d(this)},create:function(a){return d(a)}}}b.exports=d(null)},{}],25:[function(a,b,c){b.exports=function(b){var c={functionRegistry:a("./function-registry"),functionCaller:a("./function-caller")};return a("./default"),a("./color"),a("./color-blending"),a("./data-uri")(b),a("./math"),a("./number"),a("./string"),a("./svg")(b),a("./types"),c}},{"./color":20,"./color-blending":19,"./data-uri":21,"./default":22,"./function-caller":23,"./function-registry":24,"./math":27,"./number":28,"./string":29,"./svg":30,"./types":31}],26:[function(a,b,c){var d=a("../tree/dimension"),e=function(){};e._math=function(a,b,c){if(!(c instanceof d))throw{type:"Argument",message:"argument must be a number"};return null==b?b=c.unit:c=c.unify(),new d(a(parseFloat(c.value)),b)},b.exports=e},{"../tree/dimension":59}],27:[function(a,b,c){var d=a("./function-registry"),e=a("./math-helper.js"),f={ceil:null,floor:null,sqrt:null,abs:null,tan:"",sin:"",cos:"",atan:"rad",asin:"rad",acos:"rad"};for(var g in f)f.hasOwnProperty(g)&&(f[g]=e._math.bind(null,Math[g],f[g]));f.round=function(a,b){var c="undefined"==typeof b?0:b.value; 14 | return e._math(function(a){return a.toFixed(c)},null,a)},d.addMultiple(f)},{"./function-registry":24,"./math-helper.js":26}],28:[function(a,b,c){var d=a("../tree/dimension"),e=a("../tree/anonymous"),f=a("./function-registry"),g=a("./math-helper.js"),h=function(a,b){switch(b=Array.prototype.slice.call(b),b.length){case 0:throw{type:"Argument",message:"one or more arguments required"}}var c,f,g,h,i,j,k,l,m=[],n={};for(c=0;ci.value)&&(m[f]=g);else{if(void 0!==k&&j!==k)throw{type:"Argument",message:"incompatible types"};n[j]=m.length,m.push(g)}else Array.isArray(b[c].value)&&Array.prototype.push.apply(b,Array.prototype.slice.call(b[c].value));return 1==m.length?m[0]:(b=m.map(function(a){return a.toCSS(this.context)}).join(this.context.compress?",":", "),new e((a?"min":"max")+"("+b+")"))};f.addMultiple({min:function(){return h(!0,arguments)},max:function(){return h(!1,arguments)},convert:function(a,b){return a.convertTo(b.value)},pi:function(){return new d(Math.PI)},mod:function(a,b){return new d(a.value%b.value,a.unit)},pow:function(a,b){if("number"==typeof a&&"number"==typeof b)a=new d(a),b=new d(b);else if(!(a instanceof d&&b instanceof d))throw{type:"Argument",message:"arguments must be numbers"};return new d(Math.pow(a.value,b.value),a.unit)},percentage:function(a){var b=g._math(function(a){return 100*a},"%",a);return b}})},{"../tree/anonymous":47,"../tree/dimension":59,"./function-registry":24,"./math-helper.js":26}],29:[function(a,b,c){var d=a("../tree/quoted"),e=a("../tree/anonymous"),f=a("../tree/javascript"),g=a("./function-registry");g.addMultiple({e:function(a){return new e(a instanceof f?a.evaluated:a.value)},escape:function(a){return new e(encodeURI(a.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},replace:function(a,b,c,e){var f=a.value;return c="Quoted"===c.type?c.value:c.toCSS(),f=f.replace(new RegExp(b.value,e?e.value:""),c),new d(a.quote||"",f,a.escaped)},"%":function(a){for(var b=Array.prototype.slice.call(arguments,1),c=a.value,e=0;e",k=0;k";return j+="',j=encodeURIComponent(j),j="data:image/svg+xml,"+j,new g(new f("'"+j+"'",j,(!1),this.index,this.currentFileInfo),this.index,this.currentFileInfo)})}},{"../tree/color":52,"../tree/dimension":59,"../tree/expression":62,"../tree/quoted":77,"../tree/url":84,"./function-registry":24}],31:[function(a,b,c){var d=a("../tree/keyword"),e=a("../tree/detached-ruleset"),f=a("../tree/dimension"),g=a("../tree/color"),h=a("../tree/quoted"),i=a("../tree/anonymous"),j=a("../tree/url"),k=a("../tree/operation"),l=a("./function-registry"),m=function(a,b){return a instanceof b?d.True:d.False},n=function(a,b){if(void 0===b)throw{type:"Argument",message:"missing the required second argument to isunit."};if(b="string"==typeof b.value?b.value:b,"string"!=typeof b)throw{type:"Argument",message:"Second argument to isunit should be a unit or a string."};return a instanceof f&&a.unit.is(b)?d.True:d.False},o=function(a){var b=Array.isArray(a.value)?a.value:Array(a);return b};l.addMultiple({isruleset:function(a){return m(a,e)},iscolor:function(a){return m(a,g)},isnumber:function(a){return m(a,f)},isstring:function(a){return m(a,h)},iskeyword:function(a){return m(a,d)},isurl:function(a){return m(a,j)},ispixel:function(a){return n(a,"px")},ispercentage:function(a){return n(a,"%")},isem:function(a){return n(a,"em")},isunit:n,unit:function(a,b){if(!(a instanceof f))throw{type:"Argument",message:"the first argument to unit must be a number"+(a instanceof k?". Have you forgotten parenthesis?":"")};return b=b?b instanceof d?b.value:b.toCSS():"",new f(a.value,b)},"get-unit":function(a){return new i(a.unit)},extract:function(a,b){return b=b.value-1,o(a)[b]},length:function(a){return new f(o(a).length)}})},{"../tree/anonymous":47,"../tree/color":52,"../tree/detached-ruleset":58,"../tree/dimension":59,"../tree/keyword":68,"../tree/operation":74,"../tree/quoted":77,"../tree/url":84,"./function-registry":24}],32:[function(a,b,c){var d=a("./contexts"),e=a("./parser/parser"),f=a("./less-error");b.exports=function(a){var b=function(a,b,c){this.less=a,this.rootFilename=c.filename,this.paths=b.paths||[],this.contents={},this.contentsIgnoredChars={},this.mime=b.mime,this.error=null,this.context=b,this.queue=[],this.files={}};return b.prototype.push=function(b,c,g,h,i){var j=this,k=this.context.pluginManager.Loader;this.queue.push(b);var l=function(a,c,d){j.queue.splice(j.queue.indexOf(b),1);var e=d===j.rootFilename;h.optional&&a?i(null,{rules:[]},!1,null):(j.files[d]=c,a&&!j.error&&(j.error=a),i(a,c,e,d))},m={relativeUrls:this.context.relativeUrls,entryPath:g.entryPath,rootpath:g.rootpath,rootFilename:g.rootFilename},n=a.getFileManager(b,g.currentDirectory,this.context,a);if(!n)return void l({message:"Could not find a file-manager for "+b});c&&(b=h.isPlugin?b:n.tryAppendExtension(b,".less"));var o,p=function(a){var b,c=a.filename,i=a.contents.replace(/^\uFEFF/,"");m.currentDirectory=n.getPath(c),m.relativeUrls&&(m.rootpath=n.join(j.context.rootpath||"",n.pathDiff(m.currentDirectory,m.entryPath)),!n.isPathAbsolute(m.rootpath)&&n.alwaysMakePathsAbsolute()&&(m.rootpath=n.join(m.entryPath,m.rootpath))),m.filename=c;var o=new d.Parse(j.context);o.processImports=!1,j.contents[c]=i,(g.reference||h.reference)&&(m.reference=!0),h.isPlugin?(b=k.evalPlugin(i,o,h.pluginArgs,m),b instanceof f?l(b,null,c):l(null,b,c)):h.inline?l(null,i,c):new e(o,j,m).parse(i,function(a,b){l(a,b,c)})},q=function(a,b){a?l(a):p(b)};if(h.isPlugin)try{k.tryLoadPlugin(b,g.currentDirectory,q)}catch(r){i(r)}else o=n.loadFile(b,g.currentDirectory,this.context,a,q),o&&o.then(p,l)},b}},{"./contexts":12,"./less-error":34,"./parser/parser":40}],33:[function(a,b,c){b.exports=function(b,c){var d,e,f,g,h,i,j={version:[3,0,0],data:a("./data"),tree:a("./tree"),Environment:h=a("./environment/environment"),AbstractFileManager:a("./environment/abstract-file-manager"),AbstractPluginLoader:a("./environment/abstract-plugin-loader"),environment:b=new h(b,c),visitors:a("./visitors"),Parser:a("./parser/parser"),functions:a("./functions")(b),contexts:a("./contexts"),SourceMapOutput:d=a("./source-map-output")(b),SourceMapBuilder:e=a("./source-map-builder")(d,b),ParseTree:f=a("./parse-tree")(e),ImportManager:g=a("./import-manager")(b),render:a("./render")(b,f,g),parse:a("./parse")(b,f,g),LessError:a("./less-error"),transformTree:a("./transform-tree"),utils:a("./utils"),PluginManager:a("./plugin-manager"),logger:a("./logger")},k=function(a){return function(){var b=Object.create(a.prototype);return a.apply(b,Array.prototype.slice.call(arguments,0)),b}},l=Object.create(j);for(var m in j.tree)if(i=j.tree[m],"function"==typeof i)l[m]=k(i);else{l[m]=Object.create(null);for(var n in i)l[m][n]=k(i[n])}return l}},{"./contexts":12,"./data":14,"./environment/abstract-file-manager":16,"./environment/abstract-plugin-loader":17,"./environment/environment":18,"./functions":25,"./import-manager":32,"./less-error":34,"./logger":35,"./parse":37,"./parse-tree":36,"./parser/parser":40,"./plugin-manager":41,"./render":42,"./source-map-builder":43,"./source-map-output":44,"./transform-tree":45,"./tree":65,"./utils":87,"./visitors":91}],34:[function(a,b,c){var d=a("./utils"),e=b.exports=function(a,b,c){Error.call(this);var e=a.filename||c;if(b&&e){var f=b.contents[e],g=d.getLocation(a.index,f),h=g.line,i=g.column,j=a.call&&d.getLocation(a.call,f).line,k=f.split("\n");this.type=a.type||"Syntax",this.filename=e,this.index=a.index,this.line="number"==typeof h?h+1:null,this.callLine=j+1,this.callExtract=k[j],this.column=i,this.extract=[k[h-1],k[h],k[h+1]]}this.message=a.message,this.stack=a.stack};if("undefined"==typeof Object.create){var f=function(){};f.prototype=Error.prototype,e.prototype=new f}else e.prototype=Object.create(Error.prototype);e.prototype.constructor=e,e.prototype.toString=function(a){a=a||{};var b="",c=this.extract,d=[],e=function(a){return a};if(a.stylize){var f=typeof a.stylize;if("function"!==f)throw Error("options.stylize should be a function, got a "+f+"!");e=a.stylize}if("string"==typeof c[0]&&d.push(e(this.line-1+" "+c[0],"grey")),"string"==typeof c[1]){var g=this.line+" ";c[1]&&(g+=c[1].slice(0,this.column)+e(e(e(c[1].substr(this.column,1),"bold")+c[1].slice(this.column+1),"red"),"inverse")),d.push(g)}return"string"==typeof c[2]&&d.push(e(this.line+1+" "+c[2],"grey")),d=d.join("\n")+e("","reset")+"\n",b+=e(this.type+"Error: "+this.message,"red"),this.filename&&(b+=e(" in ","red")+this.filename+e(" on line "+this.line+", column "+(this.column+1)+":","grey")),b+="\n"+d,this.callLine&&(b+=e("from ","red")+(this.filename||"")+"/n",b+=e(this.callLine,"grey")+" "+this.callExtract+"/n"),b}},{"./utils":87}],35:[function(a,b,c){b.exports={error:function(a){this._fireEvent("error",a)},warn:function(a){this._fireEvent("warn",a)},info:function(a){this._fireEvent("info",a)},debug:function(a){this._fireEvent("debug",a)},addListener:function(a){this._listeners.push(a)},removeListener:function(a){for(var b=0;b=97&&j<=122||j<34))switch(j){case 40:o++,e=h;continue;case 41:if(--o<0)return b("missing opening `(`",h);continue;case 59:o||c();continue;case 123:n++,d=h;continue;case 125:if(--n<0)return b("missing opening `{`",h);n||o||c();continue;case 92:if(h96)){if(k==j){l=1;break}if(92==k){if(h==m-1)return b("unescaped `\\`",h);h++}}if(l)continue;return b("unmatched `"+String.fromCharCode(j)+"`",i);case 47:if(o||h==m-1)continue;if(k=a.charCodeAt(h+1),47==k)for(h+=2;hd&&g>f?b("missing closing `}` or `*/`",d):b("missing closing `}`",d):0!==o?b("missing closing `)`",e):(c(!0),p)}},{}],39:[function(a,b,c){var d=a("./chunker");b.exports=function(){function a(d){for(var e,f,j,p=k.i,q=c,s=k.i-i,t=k.i+h.length-s,u=k.i+=d,v=b;k.i=0){j={index:k.i,text:v.substr(k.i,x+2-k.i),isLineComment:!1},k.i+=j.text.length-1,k.commentStore.push(j);continue}}break}if(e!==l&&e!==n&&e!==m&&e!==o)break}if(h=h.slice(d+k.i-u+s),i=k.i,!h.length){if(ce||k.i===e&&a&&!f)&&(e=k.i,f=a);var b=j.pop();h=b.current,i=k.i=b.i,c=b.j},k.forget=function(){j.pop()},k.isWhitespace=function(a){var c=k.i+(a||0),d=b.charCodeAt(c);return d===l||d===o||d===m||d===n},k.$re=function(b){k.i>i&&(h=h.slice(k.i-i),i=k.i);var c=b.exec(h);return c?(a(c[0].length),"string"==typeof c?c:1===c.length?c[0]:c):null},k.$char=function(c){return b.charAt(k.i)!==c?null:(a(1),c)},k.$str=function(c){for(var d=c.length,e=0;es||a=b.length;return k.i=b.length-1,furthestChar:b[k.i]}},k}},{"./chunker":38}],40:[function(a,b,c){var d=a("../less-error"),e=a("../tree"),f=a("../visitors"),g=a("./parser-input"),h=a("../utils"),i=function j(a,b,c){function i(a,e){throw new d({index:p.i,filename:c.filename,type:e||"Syntax",message:a},b)}function k(a,b,c){var d=a instanceof Function?a.call(o):p.$re(a);return d?d:void i(b||("string"==typeof a?"expected '"+a+"' got '"+p.currentChar()+"'":"unexpected token"))}function l(a,b){return p.$char(a)?a:void i(b||"expected '"+a+"' got '"+p.currentChar()+"'")}function m(a){var b=c.filename;return{lineNumber:h.getLocation(a,p.getInput()).line+1,fileName:b}}function n(a,c,e,f,g){var h,i=[],j=p;try{j.start(a,!1,function(a,b){g({message:a,index:b+e})});for(var k,l,m=0;k=c[m];m++)l=j.i,h=o[k](),h?(h._index=l+e,h._fileInfo=f,i.push(h)):i.push(null);var n=j.end();n.isFinished?g(null,i):g(!0,null)}catch(q){throw new d({index:q.index+e,message:q.message},b,f.filename)}}var o,p=g();return{parserInput:p,imports:b,fileInfo:c,parseNode:n,parse:function(g,h,i){var k,l,m,n,o=null,q="";if(l=i&&i.globalVars?j.serializeVars(i.globalVars)+"\n":"",m=i&&i.modifyVars?"\n"+j.serializeVars(i.modifyVars):"",a.pluginManager)for(var r=a.pluginManager.getPreProcessors(),s=0;s1&&(b=new e.Value(g)),d.push(b),g=[])}return p.forget(),a?d:f},literal:function(){return this.dimension()||this.color()||this.quoted()||this.unicodeDescriptor()},assignment:function(){var a,b;return p.save(),(a=p.$re(/^\w+(?=\s?=)/i))&&p.$char("=")&&(b=o.entity())?(p.forget(),new e.Assignment(a,b)):void p.restore()},url:function(){var a,b=p.i;return p.autoCommentAbsorb=!1,p.$str("url(")?(a=this.quoted()||this.variable()||this.property()||p.$re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/)||"",p.autoCommentAbsorb=!0,l(")"),new e.URL(null!=a.value||a instanceof e.Variable||a instanceof e.Property?a:new e.Anonymous(a,b),b,c)):void(p.autoCommentAbsorb=!0)},variable:function(){var a,b=p.i;if("@"===p.currentChar()&&(a=p.$re(/^@@?[\w-]+/)))return new e.Variable(a,b,c)},variableCurly:function(){var a,b=p.i;if("@"===p.currentChar()&&(a=p.$re(/^@\{([\w-]+)\}/)))return new e.Variable("@"+a[1],b,c)},property:function(){var a,b=p.i;if("$"===p.currentChar()&&(a=p.$re(/^\$[\w-]+/)))return new e.Property(a,b,c)},propertyCurly:function(){var a,b=p.i;if("$"===p.currentChar()&&(a=p.$re(/^\$\{([\w-]+)\}/)))return new e.Property("$"+a[1],b,c)},color:function(){var a;if("#"===p.currentChar()&&(a=p.$re(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/))){var b=a.input.match(/^#([\w]+).*/);return b=b[1],b.match(/^[A-Fa-f0-9]+$/)||i("Invalid HEX color code"),new e.Color(a[1],(void 0),"#"+b)}},colorKeyword:function(){p.save();var a=p.autoCommentAbsorb;p.autoCommentAbsorb=!1;var b=p.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);if(p.autoCommentAbsorb=a,!b)return void p.forget();p.restore();var c=e.Color.fromKeyword(b);return c?(p.$str(b),c):void 0},dimension:function(){if(!p.peekNotNumeric()){var a=p.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);return a?new e.Dimension(a[1],a[2]):void 0}},unicodeDescriptor:function(){var a;if(a=p.$re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/))return new e.UnicodeDescriptor(a[0])},javascript:function(){var a,b=p.i;p.save();var d=p.$char("~"),f=p.$char("`");return f?(a=p.$re(/^[^`]*`/))?(p.forget(),new e.JavaScript(a.substr(0,a.length-1),Boolean(d),b,c)):void p.restore("invalid javascript definition"):void p.restore()}},variable:function(){var a;if("@"===p.currentChar()&&(a=p.$re(/^(@[\w-]+)\s*:/)))return a[1]},rulesetCall:function(){var a;if("@"===p.currentChar()&&(a=p.$re(/^(@[\w-]+)\(\s*\)\s*;/)))return new e.RulesetCall(a[1])},extend:function(a){var b,d,f,g,h,j=p.i;if(p.$str(a?"&:extend(":":extend(")){do{for(f=null,b=null;!(f=p.$re(/^(all)(?=\s*(\)|,))/))&&(d=this.element());)b?b.push(d):b=[d];f=f&&f[1],b||i("Missing target selector for :extend()."),h=new e.Extend(new e.Selector(b),f,j,c),g?g.push(h):g=[h]}while(p.$char(","));return k(/^\)/),a&&k(/^;/),g}},extendRule:function(){return this.extend(!0)},mixin:{call:function(){var a,b,d,f,g,h,i=p.currentChar(),j=!1,k=p.i;if("."===i||"#"===i){for(p.save();;){if(a=p.i,f=p.$re(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/),!f)break;d=new e.Element(g,f,a,c),b?b.push(d):b=[d],g=p.$char(">")}return b&&(p.$char("(")&&(h=this.args(!0).args,l(")")),o.important()&&(j=!0),o.end())?(p.forget(),new e.mixin.Call(b,h,k,c,j)):void p.restore()}},args:function(a){var b,c,d,f,g,h,j,k=o.entities,l={args:null,variadic:!1},m=[],n=[],q=[];for(p.save();;){if(a)h=o.detachedRuleset()||o.expression();else{if(p.commentStore.length=0,p.$str("...")){l.variadic=!0,p.$char(";")&&!b&&(b=!0),(b?n:q).push({variadic:!0});break}h=k.variable()||k.property()||k.literal()||k.keyword()}if(!h)break;f=null,h.throwAwayComments&&h.throwAwayComments(),g=h;var r=null;if(a?h.value&&1==h.value.length&&(r=h.value[0]):r=h,r&&(r instanceof e.Variable||r instanceof e.Property))if(p.$char(":")){if(m.length>0&&(b&&i("Cannot mix ; and , as delimiter types"),c=!0),g=o.detachedRuleset()||o.expression(),!g){if(!a)return p.restore(),l.args=[],l;i("could not understand value for named argument")}f=d=r.name}else if(p.$str("...")){if(!a){l.variadic=!0,p.$char(";")&&!b&&(b=!0),(b?n:q).push({name:h.name,variadic:!0});break}j=!0}else a||(d=f=r.name,g=null);g&&m.push(g),q.push({name:f,value:g,expand:j}),p.$char(",")||(p.$char(";")||b)&&(c&&i("Cannot mix ; and , as delimiter types"),b=!0,m.length>1&&(g=new e.Value(m)),n.push({name:d,value:g,expand:j}),d=null,m=[],c=!1)}return p.forget(),l.args=b?n:q,l},definition:function(){var a,b,c,d,f=[],g=!1;if(!("."!==p.currentChar()&&"#"!==p.currentChar()||p.peek(/^[^{]*\}/)))if(p.save(),b=p.$re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/)){a=b[1];var h=this.args(!1);if(f=h.args,g=h.variadic,!p.$char(")"))return void p.restore("Missing closing ')'");if(p.commentStore.length=0,p.$str("when")&&(d=k(o.conditions,"expected condition")),c=o.block())return p.forget(),new e.mixin.Definition(a,f,c,d,g);p.restore()}else p.forget()}},entity:function(){var a=this.entities;return this.comment()||a.literal()||a.variable()||a.url()||a.property()||a.call()||a.keyword()||a.javascript()},end:function(){return p.$char(";")||p.peek("}")},alpha:function(){var a;if(p.$re(/^opacity=/i))return a=p.$re(/^\d+/),a||(a=k(this.entities.variable,"Could not parse alpha")),l(")"),new e.Alpha(a)},element:function(){var a,b,d,f=p.i;if(b=this.combinator(),a=p.$re(/^(?:\d+\.\d+|\d+)%/)||p.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||p.$char("*")||p.$char("&")||this.attribute()||p.$re(/^\([^&()@]+\)/)||p.$re(/^[\.#:](?=@)/)||this.entities.variableCurly(),a||(p.save(),p.$char("(")?(d=this.selector(!1))&&p.$char(")")?(a=new e.Paren(d),p.forget()):p.restore("Missing closing ')'"):p.forget()),a)return new e.Element(b,a,f,c)},combinator:function(){var a=p.currentChar();if("/"===a){p.save();var b=p.$re(/^\/[a-z]+\//i);if(b)return p.forget(),new e.Combinator(b);p.restore()}if(">"===a||"+"===a||"~"===a||"|"===a||"^"===a){for(p.i++,"^"===a&&"^"===p.currentChar()&&(a="^^",p.i++);p.isWhitespace();)p.i++;return new e.Combinator(a)}return new e.Combinator(p.isWhitespace(-1)?" ":null)},selector:function(a){var b,d,f,g,h,j,l,m=p.i;for(a=a!==!1;(a&&(d=this.extend())||a&&(j=p.$str("when"))||(g=this.element()))&&(j?l=k(this.conditions,"expected condition"):l?i("CSS guard can only be used at the end of selector"):d?h=h?h.concat(d):d:(h&&i("Extend can only be used at the end of selector"),f=p.currentChar(),b?b.push(g):b=[g],g=null),"{"!==f&&"}"!==f&&";"!==f&&","!==f&&")"!==f););return b?new e.Selector(b,h,l,m,c):void(h&&i("Extend must be used to extend a selector, it cannot be used on its own"))},attribute:function(){if(p.$char("[")){var a,b,c,d=this.entities;return(a=d.variableCurly())||(a=k(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/)),c=p.$re(/^[|~*$^]?=/),c&&(b=d.quoted()||p.$re(/^[0-9]+%/)||p.$re(/^[\w-]+/)||d.variableCurly()),l("]"),new e.Attribute(a,c,b)}},block:function(){var a;if(p.$char("{")&&(a=this.primary())&&p.$char("}"))return a},blockRuleset:function(){var a=this.block();return a&&(a=new e.Ruleset(null,a)),a},detachedRuleset:function(){var a=this.blockRuleset();if(a)return new e.DetachedRuleset(a)},ruleset:function(){var b,c,d,f;for(p.save(),a.dumpLineNumbers&&(f=m(p.i));;){if(c=this.selector(),!c)break;if(b?b.push(c):b=[c],p.commentStore.length=0,c.condition&&b.length>1&&i("Guards are only currently allowed on a single selector."),!p.$char(","))break;c.condition&&i("Guards are only currently allowed on a single selector."),p.commentStore.length=0}if(b&&(d=this.block())){p.forget();var g=new e.Ruleset(b,d,a.strictImports);return a.dumpLineNumbers&&(g.debugInfo=f),g}p.restore()},declaration:function(){var a,b,d,f,g,h=p.i,i=p.currentChar();if("."!==i&&"#"!==i&&"&"!==i&&":"!==i)if(p.save(),a=this.variable()||this.ruleProperty()){if(g="string"==typeof a,g&&(b=this.detachedRuleset()),p.commentStore.length=0,!b){if(f=!g&&a.length>1&&a.pop().value,b=this.anonymousValue())return p.forget(),new e.Declaration(a,b,(!1),f,h,c);b||(b=this.value()),d=this.important()}if(b&&this.end())return p.forget(),new e.Declaration(a,b,d,f,h,c);p.restore()}else p.restore()},anonymousValue:function(){var a=p.i,b=p.$re(/^([^@\$+\/'"*`(;{}-]*);/);if(b)return new e.Anonymous(b[1],a)},"import":function(){var a,b,d=p.i,f=p.$re(/^@import?\s+/);if(f){var g=(f?this.importOptions():null)||{};if(a=this.entities.quoted()||this.entities.url())return b=this.mediaFeatures(),p.$char(";")||(p.i=d,i("missing semi-colon or unrecognised media features on import")),b=b&&new e.Value(b),new e.Import(a,b,g,d,c);p.i=d,i("malformed import statement")}},importOptions:function(){var a,b,c,d={};if(!p.$char("("))return null;do if(a=this.importOption()){switch(b=a,c=!0,b){case"css":b="less",c=!1;break;case"once":b="multiple",c=!1}if(d[b]=c,!p.$char(","))break}while(a);return l(")"),d},importOption:function(){var a=p.$re(/^(less|css|multiple|once|inline|reference|optional)/);if(a)return a[1]},mediaFeature:function(){var a,b,d=this.entities,f=[];p.save();do a=d.keyword()||d.variable(),a?f.push(a):p.$char("(")&&(b=this.property(),a=this.value(),p.$char(")")?b&&a?f.push(new e.Paren(new e.Declaration(b,a,null,null,p.i,c,(!0)))):a?f.push(new e.Paren(a)):i("badly formed media feature definition"):i("Missing closing ')'","Parse"));while(a);if(p.forget(),f.length>0)return new e.Expression(f)},mediaFeatures:function(){var a,b=this.entities,c=[];do if(a=this.mediaFeature()){if(c.push(a),!p.$char(","))break}else if(a=b.variable(),a&&(c.push(a),!p.$char(",")))break;while(a);return c.length>0?c:null},media:function(){var b,d,f,g,h=p.i;return a.dumpLineNumbers&&(g=m(h)),p.save(),p.$str("@media")?(b=this.mediaFeatures(),d=this.block(),d||i("media definitions require block statements after any features"),p.forget(),f=new e.Media(d,b,h,c),a.dumpLineNumbers&&(f.debugInfo=g),f):void p.restore()},plugin:function(){var a,b,d,f=p.i,g=p.$re(/^@plugin?\s+/);if(g){if(b=this.pluginArgs(),d=b?{pluginArgs:b,isPlugin:!0}:{isPlugin:!0},a=this.entities.quoted()||this.entities.url())return p.$char(";")||(p.i=f,i("missing semi-colon on @plugin")),new e.Import(a,null,d,f,c);p.i=f,i("malformed @plugin statement")}},pluginArgs:function(){if(p.save(),!p.$char("("))return p.restore(),null;var a=p.$re(/^\s*([^\);]+)\)\s*/);return a[1]?(p.forget(),a[1].trim()):(p.restore(),null)},atrule:function(){var b,d,f,g,h,j,k,l=p.i,n=!0,o=!0;if("@"===p.currentChar()){if(d=this["import"]()||this.plugin()||this.media())return d;if(p.save(),b=p.$re(/^@[a-z-]+/)){switch(g=b,"-"==b.charAt(1)&&b.indexOf("-",2)>0&&(g="@"+b.slice(b.indexOf("-",2)+1)),g){case"@charset":h=!0,n=!1;break;case"@namespace":j=!0,n=!1;break;case"@keyframes":case"@counter-style":h=!0;break;case"@document":case"@supports":k=!0,o=!1;break;default:k=!0}return p.commentStore.length=0,h?(d=this.entity(),d||i("expected "+b+" identifier")):j?(d=this.expression(),d||i("expected "+b+" expression")):k&&(d=(p.$re(/^[^{;]+/)||"").trim(),n="{"==p.currentChar(),d&&(d=new e.Anonymous(d))),n&&(f=this.blockRuleset()),f||!n&&d&&p.$char(";")?(p.forget(),new e.AtRule(b,d,f,l,c,a.dumpLineNumbers?m(l):null,o)):void p.restore("at-rule options not recognised")}}},value:function(){ 15 | var a,b=[],c=p.i;do if(a=this.expression(),a&&(b.push(a),!p.$char(",")))break;while(a);if(b.length>0)return new e.Value(b,c)},important:function(){if("!"===p.currentChar())return p.$re(/^! *important/)},sub:function(){var a,b;return p.save(),p.$char("(")?(a=this.addition(),a&&p.$char(")")?(p.forget(),b=new e.Expression([a]),b.parens=!0,b):void p.restore("Expected ')'")):void p.restore()},multiplication:function(){var a,b,c,d,f;if(a=this.operand()){for(f=p.isWhitespace(-1);;){if(p.peek(/^\/[*\/]/))break;if(p.save(),c=p.$char("/")||p.$char("*"),!c){p.forget();break}if(b=this.operand(),!b){p.restore();break}p.forget(),a.parensInOp=!0,b.parensInOp=!0,d=new e.Operation(c,[d||a,b],f),f=p.isWhitespace(-1)}return d||a}},addition:function(){var a,b,c,d,f;if(a=this.multiplication()){for(f=p.isWhitespace(-1);;){if(c=p.$re(/^[-+]\s+/)||!f&&(p.$char("+")||p.$char("-")),!c)break;if(b=this.multiplication(),!b)break;a.parensInOp=!0,b.parensInOp=!0,d=new e.Operation(c,[d||a,b],f),f=p.isWhitespace(-1)}return d||a}},conditions:function(){var a,b,c,d=p.i;if(a=this.condition()){for(;;){if(!p.peek(/^,\s*(not\s*)?\(/)||!p.$char(","))break;if(b=this.condition(),!b)break;c=new e.Condition("or",c||a,b,d)}return c||a}},condition:function(){function a(){return p.$str("or")}var b,c,d;if(b=this.conditionAnd(this)){if(c=a()){if(d=this.condition(),!d)return;b=new e.Condition(c,b,d)}return b}},conditionAnd:function(){function a(a){return a.negatedCondition()||a.parenthesisCondition()}function b(){return p.$str("and")}var c,d,f;if(c=a(this)){if(d=b()){if(f=this.conditionAnd(),!f)return;c=new e.Condition(d,c,f)}return c}},negatedCondition:function(){if(p.$str("not")){var a=this.parenthesisCondition();return a&&(a.negate=!a.negate),a}},parenthesisCondition:function(){function a(a){var b;return p.save(),(b=a.condition())&&p.$char(")")?(p.forget(),b):void p.restore()}var b;return p.save(),p.$str("(")?(b=a(this))?(p.forget(),b):(b=this.atomicCondition())?p.$char(")")?(p.forget(),b):void p.restore("expected ')' got '"+p.currentChar()+"'"):void p.restore():void p.restore()},atomicCondition:function(){var a,b,c,d,f=this.entities,g=p.i;if(a=this.addition()||f.keyword()||f.quoted())return p.$char(">")?d=p.$char("=")?">=":">":p.$char("<")?d=p.$char("=")?"<=":"<":p.$char("=")&&(d=p.$char(">")?"=>":p.$char("<")?"=<":"="),d?(b=this.addition()||f.keyword()||f.quoted(),b?c=new e.Condition(d,a,b,g,(!1)):i("expected expression")):c=new e.Condition("=",a,new e.Keyword("true"),g,(!1)),c},operand:function(){var a,b=this.entities;p.peek(/^-[@\$\(]/)&&(a=p.$char("-"));var c=this.sub()||b.dimension()||b.color()||b.variable()||b.property()||b.call()||b.colorKeyword();return a&&(c.parensInOp=!0,c=new e.Negative(c)),c},expression:function(){var a,b,c=[],d=p.i;do a=this.comment(),a?c.push(a):(a=this.addition()||this.entity(),a&&(c.push(a),p.peek(/^\/[\/*]/)||(b=p.$char("/"),b&&c.push(new e.Anonymous(b,d)))));while(a);if(c.length>0)return new e.Expression(c)},property:function(){var a=p.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);if(a)return a[1]},ruleProperty:function(){function a(a){var b=p.i,c=p.$re(a);if(c)return g.push(b),f.push(c[1])}var b,d,f=[],g=[];p.save();var h=p.$re(/^([_a-zA-Z0-9-]+)\s*:/);if(h)return f=[new e.Keyword(h[1])],p.forget(),f;for(a(/^(\*?)/);;)if(!a(/^((?:[\w-]+)|(?:[@\$]\{[\w-]+\}))/))break;if(f.length>1&&a(/^((?:\+_|\+)?)\s*:/)){for(p.forget(),""===f[0]&&(f.shift(),g.shift()),d=0;d=b);c++);this.preProcessors.splice(c,0,{preProcessor:a,priority:b})},g.prototype.addPostProcessor=function(a,b){var c;for(c=0;c=b);c++);this.postProcessors.splice(c,0,{postProcessor:a,priority:b})},g.prototype.addFileManager=function(a){this.fileManagers.push(a)},g.prototype.getPreProcessors=function(){for(var a=[],b=0;b0){var d,e=JSON.stringify(this._sourceMapGenerator.toJSON());this.sourceMapURL?d=this.sourceMapURL:this._sourceMapFilename&&(d=this._sourceMapFilename),this.sourceMapURL=d,this.sourceMap=e}return this._css.join("")},b}},{}],45:[function(a,b,c){var d=a("./contexts"),e=a("./visitors"),f=a("./tree");b.exports=function(a,b){b=b||{};var c,g=b.variables,h=new d.Eval(b);"object"!=typeof g||Array.isArray(g)||(g=Object.keys(g).map(function(a){var b=g[a];return b instanceof f.Value||(b instanceof f.Expression||(b=new f.Expression([b])),b=new f.Value([b])),new f.Declaration("@"+a,b,(!1),null,0)}),h.frames=[new f.Ruleset(null,g)]);var i,j,k=[new e.JoinSelectorVisitor,new e.MarkVisibleSelectorsVisitor((!0)),new e.ExtendVisitor,new e.ToCSSVisitor({compress:Boolean(b.compress)})];if(b.pluginManager)for(j=b.pluginManager.visitor(),j.first();i=j.get();)i.isPreEvalVisitor&&i.run(a);c=a.eval(h);for(var l=0;l.5?j/(2-g-h):j/(g+h),g){case c:a=(d-e)/j+(d="===a||"=<"===a||"<="===a;case 1:return">"===a||">="===a;default:return!1}}}(this.op,this.lvalue.eval(a),this.rvalue.eval(a));return this.negate?!b:b},b.exports=e},{"./node":73}],56:[function(a,b,c){var d=function(a,b,c){var e="";if(a.dumpLineNumbers&&!a.compress)switch(a.dumpLineNumbers){case"comments":e=d.asComment(b);break;case"mediaquery":e=d.asMediaQuery(b);break;case"all":e=d.asComment(b)+(c||"")+d.asMediaQuery(b)}return e};d.asComment=function(a){return"/* line "+a.debugInfo.lineNumber+", "+a.debugInfo.fileName+" */\n"},d.asMediaQuery=function(a){var b=a.debugInfo.fileName;return/^[a-z]+:\/\//i.test(b)||(b="file://"+b),"@media -sass-debug-info{filename{font-family:"+b.replace(/([.:\/\\])/g,function(a){return"\\"==a&&(a="/"),"\\"+a})+"}line{font-family:\\00003"+a.debugInfo.lineNumber+"}}\n"},b.exports=d},{}],57:[function(a,b,c){function d(a,b){var c,d="",e=b.length,f={add:function(a){d+=a}};for(c=0;c-1e-6&&(d=c.toFixed(20).replace(/0+$/,"")),a&&a.compress){if(0===c&&this.unit.isLength())return void b.add(d);c>0&&c<1&&(d=d.substr(1))}b.add(d),this.unit.genCSS(a,b)},h.prototype.operate=function(a,b,c){var d=this._operate(a,b,this.value,c.value),e=this.unit.clone();if("+"===b||"-"===b)if(0===e.numerator.length&&0===e.denominator.length)e=c.unit.clone(),this.unit.backupUnit&&(e.backupUnit=this.unit.backupUnit);else if(0===c.unit.numerator.length&&0===e.denominator.length);else{if(c=c.convertTo(this.unit.usedUnits()),a.strictUnits&&c.unit.toString()!==e.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+e.toString()+"' and '"+c.unit.toString()+"'.");d=this._operate(a,b,this.value,c.value)}else"*"===b?(e.numerator=e.numerator.concat(c.unit.numerator).sort(),e.denominator=e.denominator.concat(c.unit.denominator).sort(),e.cancel()):"/"===b&&(e.numerator=e.numerator.concat(c.unit.denominator).sort(),e.denominator=e.denominator.concat(c.unit.numerator).sort(),e.cancel());return new h(d,e)},h.prototype.compare=function(a){var b,c;if(a instanceof h){if(this.unit.isEmpty()||a.unit.isEmpty())b=this,c=a;else if(b=this.unify(),c=a.unify(),0!==b.unit.compare(c.unit))return;return d.numericCompare(b.value,c.value)}},h.prototype.unify=function(){return this.convertTo({length:"px",duration:"s",angle:"rad"})},h.prototype.convertTo=function(a){var b,c,d,f,g,i=this.value,j=this.unit.clone(),k={};if("string"==typeof a){for(b in e)e[b].hasOwnProperty(a)&&(k={},k[b]=a);a=k}g=function(a,b){return d.hasOwnProperty(a)?(b?i/=d[a]/d[f]:i*=d[a]/d[f],f):a};for(c in a)a.hasOwnProperty(c)&&(f=a[c],d=e[c],j.map(g));return j.cancel(),new h(i,j)},b.exports=h},{"../data/unit-conversions":15,"./color":52,"./node":73,"./unit":83}],60:[function(a,b,c){var d=a("./atrule"),e=function(){var a=Array.prototype.slice.call(arguments);d.apply(this,a)};e.prototype=Object.create(d.prototype),e.prototype.constructor=e,b.exports=e},{"./atrule":49}],61:[function(a,b,c){var d=a("./node"),e=a("./paren"),f=a("./combinator"),g=function(a,b,c,d,e){this.combinator=a instanceof f?a:new f(a),this.value="string"==typeof b?b.trim():b?b:"",this._index=c,this._fileInfo=d,this.copyVisibilityInfo(e),this.setParent(this.combinator,this)};g.prototype=new d,g.prototype.type="Element",g.prototype.accept=function(a){var b=this.value;this.combinator=a.visit(this.combinator),"object"==typeof b&&(this.value=a.visit(b))},g.prototype.eval=function(a){return new g(this.combinator,this.value.eval?this.value.eval(a):this.value,this.getIndex(),this.fileInfo(),this.visibilityInfo())},g.prototype.clone=function(){return new g(this.combinator,this.value,this.getIndex(),this.fileInfo(),this.visibilityInfo())},g.prototype.genCSS=function(a,b){b.add(this.toCSS(a),this.fileInfo(),this.getIndex())},g.prototype.toCSS=function(a){a=a||{};var b=this.value,c=a.firstSelector;return b instanceof e&&(a.firstSelector=!0),b=b.toCSS?b.toCSS(a):b,a.firstSelector=c,""===b&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(a)+b},b.exports=g},{"./combinator":53,"./node":73,"./paren":75}],62:[function(a,b,c){var d=a("./node"),e=a("./paren"),f=a("./comment"),g=function(a){if(this.value=a,!a)throw new Error("Expression requires an array parameter")};g.prototype=new d,g.prototype.type="Expression",g.prototype.accept=function(a){this.value=a.visitArray(this.value)},g.prototype.eval=function(a){var b,c=this.parens&&!this.parensInOp,d=!1;return c&&a.inParenthesis(),this.value.length>1?b=new g(this.value.map(function(b){return b.eval(a)})):1===this.value.length?(this.value[0].parens&&!this.value[0].parensInOp&&(d=!0),b=this.value[0].eval(a)):b=this,c&&a.outOfParenthesis(),this.parens&&this.parensInOp&&!a.isMathOn()&&!d&&(b=new e(b)),b},g.prototype.genCSS=function(a,b){for(var c=0;c0&&c.length&&""===c[0].combinator.value&&(c[0].combinator.value=" "),d=d.concat(a[b].elements);this.selfSelectors=[new e(d)],this.selfSelectors[0].copyVisibilityInfo(this.visibilityInfo())},b.exports=f},{"./node":73,"./selector":81}],64:[function(a,b,c){var d=a("./node"),e=a("./media"),f=a("./url"),g=a("./quoted"),h=a("./ruleset"),i=a("./anonymous"),j=a("../utils"),k=function(a,b,c,d,e,f){if(this.options=c,this._index=d,this._fileInfo=e,this.path=a,this.features=b,this.allowRoot=!0,void 0!==this.options.less||this.options.inline)this.css=!this.options.less||this.options.inline;else{var g=this.getPath();g&&/[#\.\&\?]css([\?;].*)?$/.test(g)&&(this.css=!0)}this.copyVisibilityInfo(f),this.setParent(this.features,this),this.setParent(this.path,this)};k.prototype=new d,k.prototype.type="Import",k.prototype.accept=function(a){this.features&&(this.features=a.visit(this.features)),this.path=a.visit(this.path),this.options.isPlugin||this.options.inline||!this.root||(this.root=a.visit(this.root))},k.prototype.genCSS=function(a,b){this.css&&void 0===this.path._fileInfo.reference&&(b.add("@import ",this._fileInfo,this._index),this.path.genCSS(a,b),this.features&&(b.add(" "),this.features.genCSS(a,b)),b.add(";"))},k.prototype.getPath=function(){return this.path instanceof f?this.path.value.value:this.path.value},k.prototype.isVariableImport=function(){var a=this.path;return a instanceof f&&(a=a.value),!(a instanceof g)||a.containsVariables()},k.prototype.evalForImport=function(a){var b=this.path;return b instanceof f&&(b=b.value),new k(b.eval(a),this.features,this.options,this._index,this._fileInfo,this.visibilityInfo())},k.prototype.evalPath=function(a){var b=this.path.eval(a),c=this._fileInfo&&this._fileInfo.rootpath;if(!(b instanceof f)){if(c){var d=b.value;d&&a.isPathRelative(d)&&(b.value=c+d)}b.value=a.normalizePath(b.value)}return b},k.prototype.eval=function(a){var b=this.doEval(a);return(this.options.reference||this.blocksVisibility())&&(b.length||0===b.length?b.forEach(function(a){a.addVisibilityBlock()}):b.addVisibilityBlock()),b},k.prototype.doEval=function(a){var b,c,d=this.features&&this.features.eval(a);if(this.options.isPlugin)return this.root&&this.root.eval&&this.root.eval(a),c=a.frames[0]&&a.frames[0].functionRegistry,c&&this.root&&this.root.functions&&c.addMultiple(this.root.functions),[];if(this.skip&&("function"==typeof this.skip&&(this.skip=this.skip()),this.skip))return[];if(this.options.inline){var f=new i(this.root,0,{filename:this.importedFilename,reference:this.path._fileInfo&&this.path._fileInfo.reference},(!0),(!0));return this.features?new e([f],this.features.value):[f]}if(this.css){var g=new k(this.evalPath(a),d,this.options,this._index); 16 | if(!g.css&&this.error)throw this.error;return g}return b=new h(null,j.copyArray(this.root.rules)),b.evalImports(a),this.features?new e(b.rules,this.features.value):b.rules},b.exports=k},{"../utils":87,"./anonymous":47,"./media":69,"./node":73,"./quoted":77,"./ruleset":80,"./url":84}],65:[function(a,b,c){var d=Object.create(null);d.Node=a("./node"),d.Alpha=a("./alpha"),d.Color=a("./color"),d.AtRule=a("./atrule"),d.Directive=a("./directive"),d.DetachedRuleset=a("./detached-ruleset"),d.Operation=a("./operation"),d.Dimension=a("./dimension"),d.Unit=a("./unit"),d.Keyword=a("./keyword"),d.Variable=a("./variable"),d.Property=a("./property"),d.Ruleset=a("./ruleset"),d.Element=a("./element"),d.Attribute=a("./attribute"),d.Combinator=a("./combinator"),d.Selector=a("./selector"),d.Quoted=a("./quoted"),d.Expression=a("./expression"),d.Declaration=a("./declaration"),d.Rule=a("./rule"),d.Call=a("./call"),d.URL=a("./url"),d.Import=a("./import"),d.mixin={Call:a("./mixin-call"),Definition:a("./mixin-definition")},d.Comment=a("./comment"),d.Anonymous=a("./anonymous"),d.Value=a("./value"),d.JavaScript=a("./javascript"),d.Assignment=a("./assignment"),d.Condition=a("./condition"),d.Paren=a("./paren"),d.Media=a("./media"),d.UnicodeDescriptor=a("./unicode-descriptor"),d.Negative=a("./negative"),d.Extend=a("./extend"),d.RulesetCall=a("./ruleset-call"),b.exports=d},{"./alpha":46,"./anonymous":47,"./assignment":48,"./atrule":49,"./attribute":50,"./call":51,"./color":52,"./combinator":53,"./comment":54,"./condition":55,"./declaration":57,"./detached-ruleset":58,"./dimension":59,"./directive":60,"./element":61,"./expression":62,"./extend":63,"./import":64,"./javascript":66,"./keyword":68,"./media":69,"./mixin-call":70,"./mixin-definition":71,"./negative":72,"./node":73,"./operation":74,"./paren":75,"./property":76,"./quoted":77,"./rule":78,"./ruleset":80,"./ruleset-call":79,"./selector":81,"./unicode-descriptor":82,"./unit":83,"./url":84,"./value":85,"./variable":86}],66:[function(a,b,c){var d=a("./js-eval-node"),e=a("./dimension"),f=a("./quoted"),g=a("./anonymous"),h=function(a,b,c,d){this.escaped=b,this.expression=a,this._index=c,this._fileInfo=d};h.prototype=new d,h.prototype.type="JavaScript",h.prototype.eval=function(a){var b=this.evaluateJavaScript(this.expression,a);return"number"==typeof b?new e(b):"string"==typeof b?new f('"'+b+'"',b,this.escaped,this._index):new g(Array.isArray(b)?b.join(", "):b)},b.exports=h},{"./anonymous":47,"./dimension":59,"./js-eval-node":67,"./quoted":77}],67:[function(a,b,c){var d=a("./node"),e=a("./variable"),f=function(){};f.prototype=new d,f.prototype.evaluateJavaScript=function(a,b){var c,d=this,f={};if(!b.javascriptEnabled)throw{message:"Inline JavaScript is not enabled. Is it set in your options?",filename:this.fileInfo().filename,index:this.getIndex()};a=a.replace(/@\{([\w-]+)\}/g,function(a,c){return d.jsify(new e("@"+c,d.getIndex(),d.fileInfo()).eval(b))});try{a=new Function("return ("+a+")")}catch(g){throw{message:"JavaScript evaluation error: "+g.message+" from `"+a+"`",filename:this.fileInfo().filename,index:this.getIndex()}}var h=b.frames[0].variables();for(var i in h)h.hasOwnProperty(i)&&(f[i.slice(1)]={value:h[i].value,toJS:function(){return this.value.eval(b).toCSS()}});try{c=a.call(f)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message.replace(/["]/g,"'")+"'",filename:this.fileInfo().filename,index:this.getIndex()}}return c},f.prototype.jsify=function(a){return Array.isArray(a.value)&&a.value.length>1?"["+a.value.map(function(a){return a.toCSS()}).join(", ")+"]":a.toCSS()},b.exports=f},{"./node":73,"./variable":86}],68:[function(a,b,c){var d=a("./node"),e=function(a){this.value=a};e.prototype=new d,e.prototype.type="Keyword",e.prototype.genCSS=function(a,b){if("%"===this.value)throw{type:"Syntax",message:"Invalid % without number"};b.add(this.value)},e.True=new e("true"),e.False=new e("false"),b.exports=e},{"./node":73}],69:[function(a,b,c){var d=a("./ruleset"),e=a("./value"),f=a("./selector"),g=a("./anonymous"),h=a("./expression"),i=a("./atrule"),j=a("../utils"),k=function(a,b,c,g,h){this._index=c,this._fileInfo=g;var i=new f([],null,null,this._index,this._fileInfo).createEmptySelectors();this.features=new e(b),this.rules=[new d(i,a)],this.rules[0].allowImports=!0,this.copyVisibilityInfo(h),this.allowRoot=!0,this.setParent(i,this),this.setParent(this.features,this),this.setParent(this.rules,this)};k.prototype=new i,k.prototype.type="Media",k.prototype.isRulesetLike=function(){return!0},k.prototype.accept=function(a){this.features&&(this.features=a.visit(this.features)),this.rules&&(this.rules=a.visitArray(this.rules))},k.prototype.genCSS=function(a,b){b.add("@media ",this._fileInfo,this._index),this.features.genCSS(a,b),this.outputRuleset(a,b,this.rules)},k.prototype.eval=function(a){a.mediaBlocks||(a.mediaBlocks=[],a.mediaPath=[]);var b=new k(null,[],this._index,this._fileInfo,this.visibilityInfo());this.debugInfo&&(this.rules[0].debugInfo=this.debugInfo,b.debugInfo=this.debugInfo);var c=!1;a.strictMath||(c=!0,a.strictMath=!0);try{b.features=this.features.eval(a)}finally{c&&(a.strictMath=!1)}return a.mediaPath.push(b),a.mediaBlocks.push(b),this.rules[0].functionRegistry=a.frames[0].functionRegistry.inherit(),a.frames.unshift(this.rules[0]),b.rules=[this.rules[0].eval(a)],a.frames.shift(),a.mediaPath.pop(),0===a.mediaPath.length?b.evalTop(a):b.evalNested(a)},k.prototype.evalTop=function(a){var b=this;if(a.mediaBlocks.length>1){var c=new f([],null,null,this.getIndex(),this.fileInfo()).createEmptySelectors();b=new d(c,a.mediaBlocks),b.multiMedia=!0,b.copyVisibilityInfo(this.visibilityInfo()),this.setParent(b,this)}return delete a.mediaBlocks,delete a.mediaPath,b},k.prototype.evalNested=function(a){var b,c,f=a.mediaPath.concat([this]);for(b=0;b0;b--)a.splice(b,0,new g("and"));return new h(a)})),this.setParent(this.features,this),new d([],[])},k.prototype.permute=function(a){if(0===a.length)return[];if(1===a.length)return a[0];for(var b=[],c=this.permute(a.slice(1)),d=0;d0){for(n=!0,k=0;k0)p=B;else if(p=A,q[A]+q[B]>1)throw{type:"Runtime",message:"Ambiguous use of `default()` found when matching for `"+this.format(t)+"`",index:this.getIndex(),filename:this.fileInfo().filename};for(k=0;kthis.params.length)return!1}c=Math.min(f,this.arity);for(var g=0;gb?1:void 0},d.prototype.blocksVisibility=function(){return null==this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks},d.prototype.addVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1},d.prototype.removeVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1},d.prototype.ensureVisibility=function(){this.nodeVisible=!0},d.prototype.ensureInvisibility=function(){this.nodeVisible=!1},d.prototype.isVisible=function(){return this.nodeVisible},d.prototype.visibilityInfo=function(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}},d.prototype.copyVisibilityInfo=function(a){a&&(this.visibilityBlocks=a.visibilityBlocks,this.nodeVisible=a.nodeVisible)},b.exports=d},{}],74:[function(a,b,c){var d=a("./node"),e=a("./color"),f=a("./dimension"),g=function(a,b,c){this.op=a.trim(),this.operands=b,this.isSpaced=c};g.prototype=new d,g.prototype.type="Operation",g.prototype.accept=function(a){this.operands=a.visit(this.operands)},g.prototype.eval=function(a){var b=this.operands[0].eval(a),c=this.operands[1].eval(a);if(a.isMathOn()){if(b instanceof f&&c instanceof e&&(b=b.toColor()),c instanceof f&&b instanceof e&&(c=c.toColor()),!b.operate)throw{type:"Operation",message:"Operation on an invalid type"};return b.operate(a,this.op,c)}return new g(this.op,[b,c],this.isSpaced)},g.prototype.genCSS=function(a,b){this.operands[0].genCSS(a,b),this.isSpaced&&b.add(" "),b.add(this.op),this.isSpaced&&b.add(" "),this.operands[1].genCSS(a,b)},b.exports=g},{"./color":52,"./dimension":59,"./node":73}],75:[function(a,b,c){var d=a("./node"),e=function(a){this.value=a};e.prototype=new d,e.prototype.type="Paren",e.prototype.genCSS=function(a,b){b.add("("),this.value.genCSS(a,b),b.add(")")},e.prototype.eval=function(a){return new e(this.value.eval(a))},b.exports=e},{"./node":73}],76:[function(a,b,c){var d=a("./node"),e=a("./declaration"),f=function(a,b,c){this.name=a,this._index=b,this._fileInfo=c};f.prototype=new d,f.prototype.type="Property",f.prototype.eval=function(a){var b,c=this.name,d=a.pluginManager.less.visitors.ToCSSVisitor.prototype._mergeRules;if(this.evaluating)throw{type:"Name",message:"Recursive property reference for "+c,filename:this.fileInfo().filename,index:this.getIndex()};if(this.evaluating=!0,b=this.find(a.frames,function(b){var f,g=b.property(c);if(g){for(var h=0;hd){if(!c||c(g)){e=g.find(new i(a.elements.slice(d)),b,c);for(var j=0;j0&&b.add(k),a.firstSelector=!0,h[0].genCSS(a,b),a.firstSelector=!1,d=1;d0?(e=p.copyArray(a),f=e.pop(),g=d.createDerived(p.copyArray(f.elements))):g=d.createDerived([]),b.length>0){var h=c.combinator,i=b[0].elements[0];h.emptyOrWhitespace&&!i.combinator.emptyOrWhitespace&&(h=i.combinator),g.elements.push(new j(h,i.value,c._index,c._fileInfo)),g.elements=g.elements.concat(b[0].elements.slice(1))}if(0!==g.elements.length&&e.push(g),b.length>1){var k=b.slice(1);k=k.map(function(a){return a.createDerived(a.elements,[])}),e=e.concat(k)}return e}function g(a,b,c,d,e){var g;for(g=0;g0?d[d.length-1]=d[d.length-1].createDerived(d[d.length-1].elements.concat(a)):d.push(new i(a))}}function l(a,b,c){function m(a){var b;return a.value instanceof h?(b=a.value.value,b instanceof i?b:null):null}var n,o,p,q,r,s,t,u,v,w,x=!1;for(q=[],r=[[]],n=0;u=c.elements[n];n++)if("&"!==u.value){var y=m(u);if(null!=y){k(q,r);var z,A=[],B=[];for(z=l(A,b,y),x=x||z,p=0;p0&&t[0].elements.push(new j(u.combinator,"",u._index,u._fileInfo)),s.push(t);else for(p=0;p0&&(a.push(r[n]),w=r[n][v-1],r[n][v-1]=w.createDerived(w.elements,c.extendList));return x}function m(a,b){var c=b.createDerived(b.elements,b.extendList,b.evaldCondition);return c.copyVisibilityInfo(a),c}var n,o,q;if(o=[],q=l(o,b,c),!q)if(b.length>0)for(o=[],n=0;n0)for(b=0;b=0&&"\n"!==b.charAt(c);)e++;return"number"==typeof a&&(d=(b.slice(0,a).match(/\n/g)||"").length),{line:d,column:e}},copyArray:function(a){var b,c=a.length,d=new Array(c);for(b=0;b=0||(i=[k.selfSelectors[0]],g=n.findMatch(j,i),g.length&&(j.hasFoundMatches=!0,j.selfSelectors.forEach(function(a){var b=k.visibilityInfo();h=n.extendSelector(g,i,a,j.isVisible()),l=new d.Extend(k.selector,k.option,0,k.fileInfo(),b),l.selfSelectors=h,h[h.length-1].extendList=[l],m.push(l),l.ruleset=k.ruleset,l.parent_ids=l.parent_ids.concat(k.parent_ids,j.parent_ids),k.firstExtendOnThisSelectorPath&&(l.firstExtendOnThisSelectorPath=!0,k.ruleset.paths.push(h))})));if(m.length){if(this.extendChainCount++,c>100){var o="{unable to calculate}",p="{unable to calculate}";try{o=m[0].selfSelectors[0].toCSS(),p=m[0].selector.toCSS()}catch(q){}throw{message:"extend circular reference detected. One of the circular extends is currently:"+o+":extend("+p+")"}}return m.concat(n.doExtendChaining(m,b,c+1))}return m},visitDeclaration:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitSelector:function(a,b){b.visitDeeper=!1},visitRuleset:function(a,b){if(!a.root){var c,d,e,f,g=this.allExtendsStack[this.allExtendsStack.length-1],h=[],i=this;for(e=0;e0&&k[i.matched].combinator.value!==g?i=null:i.matched++,i&&(i.finished=i.matched===k.length,i.finished&&!a.allowAfter&&(e+1k&&l>0&&(m[m.length-1].elements=m[m.length-1].elements.concat(b[k].elements.slice(l)),l=0,k++),j=g.elements.slice(l,i.index).concat([h]).concat(c.elements.slice(1)),k===i.pathIndex&&f>0?m[m.length-1].elements=m[m.length-1].elements.concat(j):(m=m.concat(b.slice(k,i.pathIndex)),m.push(new d.Selector(j))),k=i.endPathIndex,l=i.endPathElementIndex,l>=b[k].elements.length&&(l=0,k++);return k0&&(m[m.length-1].elements=m[m.length-1].elements.concat(b[k].elements.slice(l)),k++),m=m.concat(b.slice(k,b.length)),m=m.map(function(a){var b=a.createDerived(a.elements);return e?b.ensureVisibility():b.ensureInvisibility(),b})},visitMedia:function(a,b){var c=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);c=c.concat(this.doExtendChaining(c,a.allExtends)),this.allExtendsStack.push(c)},visitMediaOut:function(a){var b=this.allExtendsStack.length-1;this.allExtendsStack.length=b},visitAtRule:function(a,b){var c=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);c=c.concat(this.doExtendChaining(c,a.allExtends)),this.allExtendsStack.push(c)},visitAtRuleOut:function(a){var b=this.allExtendsStack.length-1;this.allExtendsStack.length=b}},b.exports=i},{"../logger":35,"../tree":65,"../utils":87,"./visitor":95}],89:[function(a,b,c){function d(a){this.imports=[],this.variableImports=[],this._onSequencerEmpty=a,this._currentDepth=0}d.prototype.addImport=function(a){var b=this,c={callback:a,args:null,isReady:!1};return this.imports.push(c),function(){c.args=Array.prototype.slice.call(arguments,0),c.isReady=!0,b.tryRun()}},d.prototype.addVariableImport=function(a){this.variableImports.push(a)},d.prototype.tryRun=function(){this._currentDepth++;try{for(;;){for(;this.imports.length>0;){var a=this.imports[0];if(!a.isReady)return;this.imports=this.imports.slice(1),a.callback.apply(null,a.args)}if(0===this.variableImports.length)break;var b=this.variableImports[0];this.variableImports=this.variableImports.slice(1),b()}}finally{this._currentDepth--}0===this._currentDepth&&this._onSequencerEmpty&&this._onSequencerEmpty()},b.exports=d},{}],90:[function(a,b,c){var d=a("../contexts"),e=a("./visitor"),f=a("./import-sequencer"),g=a("../utils"),h=function(a,b){this._visitor=new e(this),this._importer=a,this._finish=b,this.context=new d.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new f(this._onSequencerEmpty.bind(this))};h.prototype={isReplacing:!1,run:function(a){try{this._visitor.visit(a)}catch(b){this.error=b}this.isFinished=!0,this._sequencer.tryRun()},_onSequencerEmpty:function(){this.isFinished&&this._finish(this.error)},visitImport:function(a,b){var c=a.options.inline;if(!a.css||c){var e=new d.Eval(this.context,g.copyArray(this.context.frames)),f=e.frames[0];this.importCount++,a.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,a,e,f)):this.processImportNode(a,e,f)}b.visitDeeper=!1},processImportNode:function(a,b,c){var d,e=a.options.inline;try{d=a.evalForImport(b)}catch(f){f.filename||(f.index=a.getIndex(),f.filename=a.fileInfo().filename),a.css=!0,a.error=f}if(!d||d.css&&!e)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{d.options.multiple&&(b.importMultiple=!0);for(var g=void 0===d.css,h=0;h0},resolveVisibility:function(a,b){if(!a.blocksVisibility()){if(this.isEmpty(a)&&!this.containsSilentNonBlockedChild(b))return;return a}var c=a.rules[0];if(this.keepOnlyVisibleChilds(c),!this.isEmpty(c))return a.ensureVisibility(),a.removeVisibilityBlock(),a},isVisibleRuleset:function(a){return!!a.firstRoot||!this.isEmpty(a)&&!(!a.root&&!this.hasVisibleSelector(a))}};var g=function(a){this._visitor=new e(this),this._context=a,this.utils=new f(a)};g.prototype={isReplacing:!0,run:function(a){return this._visitor.visit(a)},visitDeclaration:function(a,b){if(!a.blocksVisibility()&&!a.variable)return a},visitMixinDefinition:function(a,b){a.frames=[]},visitExtend:function(a,b){},visitComment:function(a,b){if(!a.blocksVisibility()&&!a.isSilent(this._context))return a},visitMedia:function(a,b){var c=a.rules[0].rules;return a.accept(this._visitor),b.visitDeeper=!1,this.utils.resolveVisibility(a,c)},visitImport:function(a,b){if(!a.blocksVisibility())return a},visitAtRule:function(a,b){return a.rules&&a.rules.length?this.visitAtRuleWithBody(a,b):this.visitAtRuleWithoutBody(a,b)},visitAtRuleWithBody:function(a,b){function c(a){var b=a.rules;return 1===b.length&&(!b[0].paths||0===b[0].paths.length)}function d(a){var b=a.rules;return c(a)?b[0].rules:b}var e=d(a);return a.accept(this._visitor),b.visitDeeper=!1,this.utils.isEmpty(a)||this._mergeRules(a.rules[0].rules),this.utils.resolveVisibility(a,e)},visitAtRuleWithoutBody:function(a,b){if(!a.blocksVisibility()){if("@charset"===a.name){if(this.charset){if(a.debugInfo){var c=new d.Comment("/* "+a.toCSS(this._context).replace(/\n/g,"")+" */\n");return c.debugInfo=a.debugInfo,this._visitor.visit(c)}return}this.charset=!0}return a}},checkValidNodes:function(a,b){if(a)for(var c=0;c0?a.accept(this._visitor):a.rules=null,b.visitDeeper=!1}return a.rules&&(this._mergeRules(a.rules),this._removeDuplicateRules(a.rules)),this.utils.isVisibleRuleset(a)&&(a.ensureVisibility(),d.splice(0,0,a)),1===d.length?d[0]:d},_compileRulesetPaths:function(a){a.paths&&(a.paths=a.paths.filter(function(a){var b;for(" "===a[0].elements[0].combinator.value&&(a[0].elements[0].combinator=new d.Combinator("")),b=0;b=0;e--)if(c=a[e],c instanceof d.Declaration)if(f[c.name]){b=f[c.name],b instanceof d.Declaration&&(b=f[c.name]=[f[c.name].toCSS(this._context)]);var g=c.toCSS(this._context);b.indexOf(g)!==-1?a.splice(e,1):b.push(g)}else f[c.name]=c}},_mergeRules:function(a){if(a){for(var b,c,e,f={},g=0;g1){c=b[0];var h=[],i=[];b.map(function(a){"+"===a.merge&&(i.length>0&&h.push(e(i)),i=[]),i.push(a)}),h.push(e(i)),c.value=g(h)}})}},visitAnonymous:function(a,b){if(!a.blocksVisibility())return a.accept(this._visitor),a}},b.exports=g},{"../tree":65,"./visitor":95}],95:[function(a,b,c){function d(a){return a}function e(a,b){var c,d;for(c in a)switch(d=a[c],typeof d){case"function":d.prototype&&d.prototype.type&&(d.prototype.typeIndex=b++);break;case"object":b=e(d,b)}return b}var f=a("../tree"),g={visitDeeper:!0},h=!1,i=function(a){this._implementation=a,this._visitFnCache=[],h||(e(f,1),h=!0)};i.prototype={visit:function(a){if(!a)return a;var b=a.typeIndex;if(!b)return a;var c,e=this._visitFnCache,f=this._implementation,h=b<<1,i=1|h,j=e[h],k=e[i],l=g;if(l.visitDeeper=!0,j||(c="visit"+a.type,j=f[c]||d,k=f[c+"Out"]||d,e[h]=j,e[i]=k),j!==d){var m=j.call(f,a,l);f.isReplacing&&(a=m)}return l.visitDeeper&&a&&a.accept&&a.accept(this),k!=d&&k.call(f,a),a},visitArray:function(a,b){if(!a)return a;var c,d=a.length;if(b||!this._implementation.isReplacing){for(c=0;ck){for(var b=0,c=h.length-j;b 8 | * @license GPLv3 9 | * 10 | */ 11 | !function(t,e){"use strict";var a=function(t){this.elem=t};a.prototype={constructor:a,getValue:function(t){var e=this.elem.getAttribute("data-"+t);return void 0===e||null===e?!1:e},share:function(){var t=this.getValue("sharer").toLowerCase(),e={facebook:{shareUrl:"https://www.facebook.com/sharer/sharer.php",params:{u:this.getValue("url")}},googleplus:{shareUrl:"https://plus.google.com/share",params:{url:this.getValue("url")}},linkedin:{shareUrl:"https://www.linkedin.com/shareArticle",params:{url:this.getValue("url"),mini:!0}},twitter:{shareUrl:"https://twitter.com/intent/tweet/",params:{text:this.getValue("title"),url:this.getValue("url"),hashtags:this.getValue("hashtags"),via:this.getValue("via")}},email:{shareUrl:"mailto:"+this.getValue("to"),params:{subject:this.getValue("subject"),body:this.getValue("title")+"\n"+this.getValue("url")},isLink:!0},whatsapp:{shareUrl:"whatsapp://send",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},telegram:{shareUrl:"tg://msg_url",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},viber:{shareUrl:"viber://forward",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},line:{shareUrl:"http://line.me/R/msg/text/?"+encodeURIComponent(this.getValue("title")+" "+this.getValue("url")),isLink:!0},pinterest:{shareUrl:"https://www.pinterest.com/pin/create/button/",params:{url:this.getValue("url"),media:this.getValue("image"),description:this.getValue("description")}},tumblr:{shareUrl:"http://tumblr.com/widgets/share/tool",params:{canonicalUrl:this.getValue("url"),content:this.getValue("url"),posttype:"link",title:this.getValue("title"),caption:this.getValue("caption"),tags:this.getValue("tags")}},hackernews:{shareUrl:"https://news.ycombinator.com/submitlink",params:{u:this.getValue("url"),t:this.getValue("title")}},reddit:{shareUrl:"https://www.reddit.com/submit",params:{url:this.getValue("url")}},vk:{shareUrl:"http://vk.com/share.php",params:{url:this.getValue("url"),title:this.getValue("title"),description:this.getValue("caption"),image:this.getValue("image")}},xing:{shareUrl:"https://www.xing.com/app/user",params:{op:"share",url:this.getValue("url"),title:this.getValue("title")}},buffer:{shareUrl:"https://buffer.com/add",params:{url:this.getValue("url"),title:this.getValue("title"),via:this.getValue("via"),picture:this.getValue("picture")}},instapaper:{shareUrl:"http://www.instapaper.com/edit",params:{url:this.getValue("url"),title:this.getValue("title"),description:this.getValue("description")}},pocket:{shareUrl:"https://getpocket.com/save",params:{url:this.getValue("url")}},digg:{shareUrl:"http://www.digg.com/submit",params:{url:this.getValue("url")}},stumbleupon:{shareUrl:"http://www.stumbleupon.com/submit",params:{url:this.getValue("url"),title:this.getValue("title")}},flipboard:{shareUrl:"https://share.flipboard.com/bookmarklet/popout",params:{v:2,title:this.getValue("title"),url:this.getValue("url"),t:Date.now()}},weibo:{shareUrl:"http://service.weibo.com/share/share.php",params:{url:this.getValue("url"),title:this.getValue("title"),pic:this.getValue("image"),appkey:this.getValue("appkey"),ralateUid:this.getValue("ralateuid"),language:"zh_cn"}},renren:{shareUrl:"http://share.renren.com/share/buttonshare",params:{link:this.getValue("url")}},myspace:{shareUrl:"https://myspace.com/post",params:{u:this.getValue("url"),t:this.getValue("title"),c:this.getValue("description")}},blogger:{shareUrl:"https://www.blogger.com/blog-this.g",params:{u:this.getValue("url"),n:this.getValue("title"),t:this.getValue("description")}},baidu:{shareUrl:"http://cang.baidu.com/do/add",params:{it:this.getValue("title"),iu:this.getValue("url")}},douban:{shareUrl:"https://www.douban.com/share/service",params:{name:this.getValue("title"),href:this.getValue("url"),image:this.getValue("image")}},okru:{shareUrl:"https://connect.ok.ru/dk",params:{"st.cmd":"WidgetSharePreview","st.shareUrl":this.getValue("url"),title:this.getValue("title")}},mailru:{shareUrl:"http://connect.mail.ru/share",params:{share_url:this.getValue("url"),linkname:this.getValue("title"),linknote:this.getValue("description"),type:"page"}}},a=e[t];return a&&(a.width=this.getValue("width"),a.height=this.getValue("height")),void 0!==a?this.urlSharer(a):!1},urlSharer:function(e){var a,r=e.params||{},s=Object.keys(r),l=s.length>0?"?":"";for(a=0;ar;r++)s[r].addEventListener("click",t)})}(window,document); --------------------------------------------------------------------------------