csster 1.1.1 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +169 -113
- data/lib/csster/version.rb +1 -1
- data/vendor/assets/javascripts/csster.js +2 -1442
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0cc79e48d8cd6593bf3a60eaedee4fe6a03bb2e6cbfd43ee76333d32eb1152bd
|
4
|
+
data.tar.gz: aa3e04ceb95f5f8f7df6d8540f5ea0de775606545d0f428a9dfe5c4b3587c2bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be481048d68d4ca067eea3ecb297bd1eb06667920a09fc791b5ea11e7817403a2461aadfe00db24b9b81731bce25189bfcd2dcc5dd66c7d5d0aa0975972fb318
|
7
|
+
data.tar.gz: 07261c731d45fc31836ce53f072791d0d641e1783b240f1898764da6ce89519157147c28a5f46ca3d36b075b5310bff30b3112dfd6805e3a6875f533b70a7f53
|
data/README.md
CHANGED
@@ -3,19 +3,20 @@
|
|
3
3
|
<a href="https://travis-ci.org/ndp/csster" id="status-image-popup" title="build status image" name="status-images" class="open-popup">
|
4
4
|
<img src="https://travis-ci.org/ndp/csster.svg" >
|
5
5
|
</a>
|
6
|
-
|
6
|
+
|
7
7
|
Concisely generate CSS style rules within Javascript. Features:
|
8
8
|
|
9
|
-
*
|
9
|
+
* "object literal" format with excellent editor support
|
10
10
|
* nesting to DRY up stylesheets
|
11
|
-
* color functions like
|
11
|
+
* color functions like `darken` and `saturate`
|
12
12
|
* built-in macros for common CSS idioms like *clearfix*, *rounded corners*, *drop shadows*.
|
13
13
|
* extension points for custom behavior or cross-browser support.
|
14
|
+
* no new syntax to learn (and fight)
|
14
15
|
* and all the plain old Javascript behavior: functions, data structures, looping, Math operations, etc.
|
15
16
|
|
16
17
|
Slideshow introduction: https://docs.google.com/present/view?id=dfm357b6_49c4d3fpdm&interval=15
|
17
18
|
|
18
|
-
##
|
19
|
+
## Installation
|
19
20
|
|
20
21
|
### Bundler (Rails) Installation
|
21
22
|
|
@@ -30,8 +31,8 @@ And then execute:
|
|
30
31
|
Or install it yourself as:
|
31
32
|
|
32
33
|
$ gem install csster
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
For Rails, within your `application.js`, add
|
35
36
|
|
36
37
|
//= require csster
|
37
38
|
|
@@ -40,6 +41,8 @@ Within your `application.js`, add
|
|
40
41
|
|
41
42
|
npm install csster
|
42
43
|
|
44
|
+
## Usage
|
45
|
+
|
43
46
|
### Creating Stylesheets (Brower/Client Side)
|
44
47
|
|
45
48
|
All code is packaged into a single Javascript file download, [csster.js](http://ndpsoftware.com/csster/csster.js). There are no external dependencies.
|
@@ -59,134 +62,197 @@ The result is inserted in DOM automatically at the bottom of the <head> el
|
|
59
62
|
|
60
63
|
```html
|
61
64
|
...
|
62
|
-
|
65
|
+
<style type="text/stylesheet">
|
63
66
|
h1 {
|
64
67
|
font-size: 18px;
|
65
68
|
color: red;
|
66
69
|
}
|
67
|
-
|
68
|
-
|
70
|
+
</style>
|
71
|
+
</head>
|
69
72
|
...
|
70
73
|
```
|
71
74
|
|
72
|
-
###
|
75
|
+
### Node Usage
|
73
76
|
|
74
|
-
|
77
|
+
`Csster.buildCss` accepts arrays or hashes of rules and returns a text string of the Css rules.
|
78
|
+
The caller is responsible for writing to the browser.
|
79
|
+
|
80
|
+
|
81
|
+
### Building CSS Rules
|
82
|
+
|
83
|
+
The `Csster.style` method accepts CSS rules passed either as arrays or hashes, arrays just being
|
75
84
|
a way to order the hashes. For example:
|
76
85
|
|
77
|
-
|
78
|
-
{
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
+
```javascript
|
87
|
+
Csster.style({
|
88
|
+
ul: {
|
89
|
+
margin: 5,
|
90
|
+
padding: 0,
|
91
|
+
},
|
92
|
+
'ul li:first': {
|
93
|
+
paddingLeft: '20px'
|
94
|
+
}
|
86
95
|
}
|
87
|
-
|
96
|
+
```
|
88
97
|
|
89
98
|
Note that
|
90
99
|
|
91
|
-
* property names are automatically converted to hyphenated format from
|
92
|
-
*
|
100
|
+
* property names are automatically converted to hyphenated format from camelCase, so in many cases you can omit the quotation marks. (`float` needs to quoted since it's a reserved word.)
|
101
|
+
* most raw numbers are assumed to be "pixels" (or "px"), and rendered as such. A heuristic helps in this, skipping `opacity`, `z-index`, etc.
|
93
102
|
* any sort of selectors are allowed... they are just passed through to the stylesheet.
|
94
103
|
|
95
104
|
#### Nesting
|
96
105
|
Csster supports nesting of rules to keep things more concise:
|
97
|
-
|
106
|
+
|
107
|
+
```javascript
|
98
108
|
{
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
}
|
109
|
+
ul: {
|
110
|
+
margin: 5,
|
111
|
+
li: {
|
112
|
+
paddingLeft: 20,
|
113
|
+
'&:hover': {
|
114
|
+
color: 'red'
|
106
115
|
}
|
107
116
|
}
|
117
|
+
}
|
108
118
|
}
|
109
|
-
|
119
|
+
```
|
110
120
|
|
111
121
|
The "li" property in this case might be a selector or might be a property name. A list of valid
|
112
122
|
property names is used to identify properties right now, and otherwise it's considered a sub-selector.
|
113
123
|
|
114
|
-
Csster supports SASS's
|
124
|
+
Csster supports SASS's `&` operator, to indicate that the selector should be combined with the parent selector.
|
115
125
|
Instead of the default "any descendent" space character being inserted, no space is inserted.
|
116
126
|
|
117
127
|
Combined rules (with commas) are expanded as expected, so nested rules with commas have their parents expanded.
|
118
128
|
|
119
129
|
|
130
|
+
#### Functions
|
131
|
+
Most manipulations you'll want don't require any special syntax. They will fall into
|
132
|
+
Javascript's language support, as far as any math or looping.
|
133
|
+
Use Javascript to write necessary functions! Include them directly in the
|
134
|
+
CSS rule definitions.
|
120
135
|
|
121
136
|
|
122
|
-
####
|
123
|
-
|
137
|
+
#### Colors
|
138
|
+
|
139
|
+
Colors can be particularly brittle in CSS, so color conversion functions are included.
|
140
|
+
The easiest way to enable this is to call:
|
141
|
+
|
142
|
+
Csster.colorizeString()
|
124
143
|
|
125
|
-
|
144
|
+
Now the `String` prototype will include SASS-like color functions:
|
126
145
|
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
146
|
+
* `"#ab342c".darken(%)` -- make color darker by given percent
|
147
|
+
* `"#ab342c".lighten(%)` -- make color lighter by given percent
|
148
|
+
* `"#ab342c".saturate(%)` -- make color more saturated by given percent. To *desaturate*, use negative values for the percent. Note that `"#ab342c".saturate(-100)` renders in grayscale.
|
130
149
|
|
131
150
|
There are also color conversion routines if you want to build your own manipulation.
|
132
151
|
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
152
|
+
* `"#ab342c".toRGB()`
|
153
|
+
* `"#ab342c".toHSL()`
|
154
|
+
* `Csster.hslToHexColor(h,s,l)`
|
136
155
|
|
137
156
|
Opacity is currently not supported by the color model.
|
138
157
|
|
139
|
-
|
158
|
+
### Macros
|
159
|
+
|
160
|
+
Although the Javascript language probably offers enough flexibility for most of what you
|
161
|
+
want, macros are also a core part of Csster.
|
162
|
+
|
163
|
+
#### Pre-build Macros
|
140
164
|
|
141
165
|
There are a host of pre-made macros that may be useful:
|
142
166
|
|
143
|
-
*
|
144
|
-
*
|
145
|
-
*
|
146
|
-
*
|
147
|
-
*
|
148
|
-
*
|
149
|
-
*
|
167
|
+
* `Csster.macros.roundedCorners(radius)` -- add rounded corners on all sides
|
168
|
+
* `Csster.macros.roundedCorners(side, radius)` -- add rounded corners on specified side: `'top'`, `'left'`, `'bottom'` or `'right'`
|
169
|
+
* `Csster.macros.roundedCorners(corner, radius)` -- add rounded corners to a specified corner: `'tl'`, `'tr'`, `'bl'` or `'br'`
|
170
|
+
* `Csster.macros.imageReplacement(width, height, img, imgXPosition=0, imgYPosition=0)` -- phark image replacement with optional background image offset.
|
171
|
+
* `Csster.macros.boxShadow([xoffset, yoffset], radius, color)`
|
172
|
+
* `Csster.macros.verticalCentering(height)` and `horizontalCentering(width)` -- center using the top 50% / margin-top -width/2 technique. See http://stackoverflow.com/questions/148251/css-centering-tricks
|
173
|
+
* `Csster.macros.clearfix()` -- standard clearfix
|
174
|
+
* `Csster.browserInfo()` -- basic information about the current browser, if available. Useful for generating alternative rules.
|
150
175
|
|
151
|
-
|
176
|
+
#### Using macros with the "has" or "mixin" key
|
152
177
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
178
|
+
To "mix these in", use the `has`, `mixin` or `mixins` key:
|
179
|
+
|
180
|
+
{
|
181
|
+
'div#featured_box': {
|
182
|
+
backgroundColor: '#394c89',
|
183
|
+
has: roundedCorner(5)
|
184
|
+
}
|
158
185
|
}
|
186
|
+
|
187
|
+
Multiple macros can be included by making that a list, eg. `has: [roundedCorners(5), dropShadow()]`.
|
188
|
+
|
189
|
+
#### Using macros with fake property names
|
190
|
+
|
191
|
+
You can also make these _pseudo properties_ using the `Csster.setMacro` method. For example,
|
192
|
+
|
193
|
+
```javascript
|
194
|
+
Csster.setMacro('roundedCorners', (px) => {
|
195
|
+
return { borderRadius: px }
|
196
|
+
})
|
197
|
+
```
|
198
|
+
|
199
|
+
As you might expect, this defines a property that is rendered with the given function. Therefore:
|
200
|
+
|
201
|
+
```javascript
|
202
|
+
...
|
203
|
+
Csster.style({ div: roundedCorners: 5 })
|
204
|
+
```
|
205
|
+
|
206
|
+
#### Writing Macros
|
207
|
+
|
208
|
+
It's all Javascript, so macros and more complex functions are easy to write.
|
209
|
+
To mix in a set of values, create a function that returns a hash of values, for example:
|
210
|
+
|
211
|
+
```javascript
|
212
|
+
function roundedCorners(radius) {
|
213
|
+
return {
|
214
|
+
'-webkit-border-radius': radius,
|
215
|
+
'-moz-border-radius': radius,
|
216
|
+
'border-radius': radius
|
217
|
+
}
|
159
218
|
}
|
160
|
-
|
219
|
+
```
|
161
220
|
|
162
|
-
|
221
|
+
A macro's properties will be overwritten similar to how the cascade takes the last defined value: later ones override earlier ones.
|
163
222
|
|
164
|
-
It's all Javascript, so macros and more complex functions are easy to write. To mix in a set of values, create a function
|
165
|
-
that returns a hash of values, for example:
|
166
223
|
|
167
|
-
|
168
|
-
function roundedCorners(radius) {
|
169
|
-
return {
|
170
|
-
'-webkit-border-radius': radius,
|
171
|
-
'-moz-border-radius': radius,
|
172
|
-
'border-radius': radius
|
173
|
-
}
|
174
|
-
}
|
175
|
-
</pre>
|
224
|
+
## Verification
|
176
225
|
|
177
|
-
|
226
|
+
By default, property names are validated against recent HTML specs.
|
227
|
+
The build-in tool rejects non-standard property names,
|
228
|
+
although by default popular "-moz" and "-webkit" properties are added.
|
229
|
+
Use `Csster.addPropertyNames` to supplement property names it might not
|
230
|
+
consider valid.
|
178
231
|
|
232
|
+
At this time of history, though, validation is not necessarily what you want.
|
233
|
+
To turn this off, use:
|
234
|
+
|
235
|
+
```javascript
|
236
|
+
Csster.propertyNameValidator.setConfig('strictNames', false)
|
237
|
+
```
|
238
|
+
|
239
|
+
By default, any browser extension property (such as `-moz-boo`) is allowed. To
|
240
|
+
restrict this, turn on the validation:
|
241
|
+
|
242
|
+
```javascript
|
243
|
+
Csster.propertyNameValidator.setConfig('anyBrowserExtension', false)
|
244
|
+
```
|
179
245
|
|
180
246
|
## jQuery Integration
|
181
247
|
|
182
|
-
If jQuery is loaded
|
248
|
+
If jQuery is loaded before Csster, it provides a "csster" plugin:
|
183
249
|
|
184
|
-
|
185
|
-
|
186
|
-
|
250
|
+
```javascript
|
251
|
+
$('.sidebar').csster({ border: '5px solid green', padding: 10 });
|
252
|
+
```
|
187
253
|
|
188
254
|
As expected, this adds a rule to the document with the ".sidebar" selector.
|
189
|
-
In general, this can be called identically to the
|
255
|
+
In general, this can be called identically to the `css()` function.
|
190
256
|
This is useful is the DOM on the page is dynamic and when a rule is more efficient than applying
|
191
257
|
a style repeatedly to all the DOM nodes.
|
192
258
|
|
@@ -196,40 +262,8 @@ nothing is done to convert or report unsupported selectors (just like regular CS
|
|
196
262
|
|
197
263
|
## Extending Csster
|
198
264
|
|
199
|
-
Csster is built as an extensible system.
|
200
|
-
|
201
|
-
### Adding Custom Property Names
|
202
|
-
Use <code>Csster.addPropertyNames</code> to add any non-standard property names you'd like to be considered valid. The build-in tool rejects non-standard property names, although by default popular "-moz" and "-webkit" properties are added.
|
203
|
-
|
204
|
-
### Pre-process rules
|
205
|
-
<del>Functions called before properties are processed stored in <code>Csster.propertyPreprocessors</code>. Callback is provided a hash of properties to values, which it modifies in any way it wants. This is used to interpret macros.</del>
|
206
|
-
|
207
|
-
<del>### Post-processing
|
208
|
-
Functions called after rules are processed stored in <code>Csster.rulesPostProcessors</code>. Called with an array of processed rules. Can be used to eliminate duplicates, modify selectors, etc. Standard list simplifies overly complex selectors with multiple IDs.
|
209
|
-
|
210
|
-
A convenient built-in function is <code>compressSelectors</code>. Using this processor, rules with multiple '#'s are simplified. For example, '#a #b #c' becomes '#c'. Usually this is what you will want, so include it with <code>Csster.rulePostProcessors.push(Csster.compressSelectors);</code>.
|
211
|
-
|
212
|
-
This is used to write custom browser overrides. For example, this one makes opacity work for IE:
|
213
|
-
|
214
|
-
<pre>
|
215
|
-
Csster.rulesPostProcessors.push(function ieOpacity(rules) {
|
216
|
-
// http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/
|
217
|
-
if (Csster.browserInfo().msie) {
|
218
|
-
for (var i = 0; i < rules.length; i++) {
|
219
|
-
var rule = rules[i];
|
220
|
-
var value = rule.props['opacity']
|
221
|
-
if (value) {
|
222
|
-
value = Math.round(value * 100.0);
|
223
|
-
rules[i].props['filter'] = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + value + ')';
|
224
|
-
}
|
225
|
-
}
|
226
|
-
}
|
227
|
-
});
|
228
|
-
</pre>
|
229
|
-
</del>
|
230
|
-
|
231
265
|
### Inserting into the DOM
|
232
|
-
Function that outputs a set of rules into the DOM is
|
266
|
+
Function that outputs a set of rules into the DOM is `Csster.insertCss` and can be replaced if desired.
|
233
267
|
|
234
268
|
## V2.0 Changes
|
235
269
|
|
@@ -241,6 +275,7 @@ Function that outputs a set of rules into the DOM is <code>Csster.insertCss</cod
|
|
241
275
|
### Other changes:
|
242
276
|
|
243
277
|
* use ES6 for implementation and provide a more compressed and clean script.
|
278
|
+
* fake-property-based macros
|
244
279
|
* add ability to turn off property name validation.
|
245
280
|
* add ability to warn about unknown browser extensions for property names.
|
246
281
|
|
@@ -262,10 +297,32 @@ Function that outputs a set of rules into the DOM is <code>Csster.insertCss</cod
|
|
262
297
|
4. Push to the branch (`git push origin my-new-feature`)
|
263
298
|
5. Create new Pull Request
|
264
299
|
|
300
|
+
### Like it or have ideas?
|
301
|
+
|
302
|
+
If you like this and would like me to do more intereactions like this, send me an email... or money https://venmo.com/ndpsoft or https://www.gofundme.com/ndp-software
|
303
|
+
|
304
|
+
|
305
|
+
## Releasing
|
306
|
+
|
307
|
+
1. Make changes
|
308
|
+
2. Update `bin/build.sh#2` `VERSION=` code.
|
309
|
+
3. `bin/build.sh`
|
310
|
+
4. `rake build`
|
311
|
+
5. `git checkin...`
|
312
|
+
6. `git push...`
|
313
|
+
7. `rake release` # Ruby Gem
|
314
|
+
8. `npm publish` # Node module
|
315
|
+
|
265
316
|
|
266
317
|
### TDD
|
267
318
|
|
268
|
-
The design was driven by
|
319
|
+
The design was driven by the specs.
|
320
|
+
|
321
|
+
There are now two sets of tests. The first are unit and out-of-browser functional tests run with jasmine. If your npm paths are set up correctly, `jasmine` should do it.
|
322
|
+
|
323
|
+
There's also an (older) in-browser test, in `demo/functional_runner.html`. Opening this in a browser should do it.
|
324
|
+
|
325
|
+
Finally, there are a couple manual "demo" files that need to be examined in a browser, to make sure they are working. These are in the demo folder.
|
269
326
|
|
270
327
|
### Building
|
271
328
|
|
@@ -285,9 +342,9 @@ This project comes from my frustration of trying to build standalone Javascript
|
|
285
342
|
projects always involve the combination of HTML DOM, CSS and Javascript. It's often simpler to
|
286
343
|
generate the necessary DOM within your Javascript, removing any coupling (and a simpler calling
|
287
344
|
convention) to a specific web page. But most widgets have certain style rules. To avoid
|
288
|
-
any coupling with the CSS at all, styles can be included inline, but these gets bulky
|
345
|
+
any coupling with the CSS at all, styles can be included inline, but these gets bulky
|
289
346
|
and hard to read. The "rule" nature of CSS is nice. So widgets then have a Javascript
|
290
|
-
and CSS component. Wouldn't it be nice, though, to remove that CSS component.
|
347
|
+
and CSS component. Wouldn't it be nice, though, to remove that CSS component.
|
291
348
|
|
292
349
|
With the advent of SASS, the coupling is even more complicated, as now there's some other
|
293
350
|
tool completely unrelated to your component, written in some other language. Wouldn't
|
@@ -300,6 +357,5 @@ http://revnode.com/oss/css/
|
|
300
357
|
|
301
358
|
## Legal
|
302
359
|
|
303
|
-
Copyright (c) 2010-
|
360
|
+
Copyright (c) 2010-2020 Andrew J. Peterson
|
304
361
|
[Apache License](https://github.com/ndp/csster/raw/master/LICENSE)
|
305
|
-
|
data/lib/csster/version.rb
CHANGED
@@ -1,1442 +1,2 @@
|
|
1
|
-
// Csster version 1.
|
2
|
-
/******/ (function(modules) { // webpackBootstrap
|
3
|
-
/******/ // The module cache
|
4
|
-
/******/ var installedModules = {};
|
5
|
-
|
6
|
-
/******/ // The require function
|
7
|
-
/******/ function __webpack_require__(moduleId) {
|
8
|
-
|
9
|
-
/******/ // Check if module is in cache
|
10
|
-
/******/ if(installedModules[moduleId])
|
11
|
-
/******/ return installedModules[moduleId].exports;
|
12
|
-
|
13
|
-
/******/ // Create a new module (and put it into the cache)
|
14
|
-
/******/ var module = installedModules[moduleId] = {
|
15
|
-
/******/ exports: {},
|
16
|
-
/******/ id: moduleId,
|
17
|
-
/******/ loaded: false
|
18
|
-
/******/ };
|
19
|
-
|
20
|
-
/******/ // Execute the module function
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22
|
-
|
23
|
-
/******/ // Flag the module as loaded
|
24
|
-
/******/ module.loaded = true;
|
25
|
-
|
26
|
-
/******/ // Return the exports of the module
|
27
|
-
/******/ return module.exports;
|
28
|
-
/******/ }
|
29
|
-
|
30
|
-
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
32
|
-
/******/ __webpack_require__.m = modules;
|
33
|
-
|
34
|
-
/******/ // expose the module cache
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
36
|
-
|
37
|
-
/******/ // __webpack_public_path__
|
38
|
-
/******/ __webpack_require__.p = "";
|
39
|
-
|
40
|
-
/******/ // Load entry module and return exports
|
41
|
-
/******/ return __webpack_require__(0);
|
42
|
-
/******/ })
|
43
|
-
/************************************************************************/
|
44
|
-
/******/ ([
|
45
|
-
/* 0 */
|
46
|
-
/***/ function(module, exports, __webpack_require__) {
|
47
|
-
|
48
|
-
__webpack_require__(1);
|
49
|
-
module.exports = __webpack_require__(28);
|
50
|
-
|
51
|
-
|
52
|
-
/***/ },
|
53
|
-
/* 1 */
|
54
|
-
/***/ function(module, exports, __webpack_require__) {
|
55
|
-
|
56
|
-
'use strict';
|
57
|
-
|
58
|
-
var _buildRules = __webpack_require__(2);
|
59
|
-
|
60
|
-
var _buildRules2 = _interopRequireDefault(_buildRules);
|
61
|
-
|
62
|
-
var _stringifyRules = __webpack_require__(12);
|
63
|
-
|
64
|
-
var _stringifyRules2 = _interopRequireDefault(_stringifyRules);
|
65
|
-
|
66
|
-
var _insertCss = __webpack_require__(17);
|
67
|
-
|
68
|
-
var _insertCss2 = _interopRequireDefault(_insertCss);
|
69
|
-
|
70
|
-
var _macros = __webpack_require__(18);
|
71
|
-
|
72
|
-
var macros = _interopRequireWildcard(_macros);
|
73
|
-
|
74
|
-
var _array = __webpack_require__(6);
|
75
|
-
|
76
|
-
var _browser = __webpack_require__(24);
|
77
|
-
|
78
|
-
var _color = __webpack_require__(27);
|
79
|
-
|
80
|
-
var _propertyNameValidator = __webpack_require__(11);
|
81
|
-
|
82
|
-
var propertyNameValidator = _interopRequireWildcard(_propertyNameValidator);
|
83
|
-
|
84
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
85
|
-
|
86
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
87
|
-
|
88
|
-
if (!window.Csster) {
|
89
|
-
window.Csster = {};
|
90
|
-
}
|
91
|
-
|
92
|
-
Csster.buildCss = function (o) {
|
93
|
-
var rules = (0, _buildRules2.default)(o);
|
94
|
-
var css = (0, _stringifyRules2.default)(rules);
|
95
|
-
return css;
|
96
|
-
};
|
97
|
-
|
98
|
-
Csster.style = function (o) {
|
99
|
-
var css = Csster.buildCss(o);
|
100
|
-
(0, _insertCss2.default)(css);
|
101
|
-
};
|
102
|
-
|
103
|
-
// Make available various utilities
|
104
|
-
|
105
|
-
Csster.macros = macros;
|
106
|
-
|
107
|
-
Csster.arrayFlatten = _array.arrayFlatten;
|
108
|
-
|
109
|
-
Csster.browserInfo = _browser.browserInfo;
|
110
|
-
|
111
|
-
Csster.hslToHexColor = _color.hslToHexColor;
|
112
|
-
(0, _color.colorizeString)();
|
113
|
-
|
114
|
-
Csster.addPropertyNames = propertyNameValidator.addNames;
|
115
|
-
|
116
|
-
Csster.insertCss = _insertCss2.default;
|
117
|
-
Csster.buildRules = _buildRules2.default;
|
118
|
-
|
119
|
-
/***/ },
|
120
|
-
/* 2 */
|
121
|
-
/***/ function(module, exports, __webpack_require__) {
|
122
|
-
|
123
|
-
/* WEBPACK VAR INJECTION */(function(process) {'use strict';
|
124
|
-
|
125
|
-
Object.defineProperty(exports, "__esModule", {
|
126
|
-
value: true
|
127
|
-
});
|
128
|
-
exports.rejectUnknownPropertyKeys = exports.dasherizePropertyKeys = undefined;
|
129
|
-
|
130
|
-
exports.default = function (obj) {
|
131
|
-
var rules = [];
|
132
|
-
(0, _array.arrayEach)((0, _array.arrayFlatten)([obj]), function (o) {
|
133
|
-
rules.push(process(o));
|
134
|
-
});
|
135
|
-
return (0, _array.arrayFlatten)(rules);
|
136
|
-
};
|
137
|
-
|
138
|
-
var _object = __webpack_require__(4);
|
139
|
-
|
140
|
-
var _array = __webpack_require__(6);
|
141
|
-
|
142
|
-
var _curry = __webpack_require__(5);
|
143
|
-
|
144
|
-
var _cssObject = __webpack_require__(7);
|
145
|
-
|
146
|
-
var _macroProcessor = __webpack_require__(9);
|
147
|
-
|
148
|
-
var _properties = __webpack_require__(10);
|
149
|
-
|
150
|
-
var applyMacros = (0, _object.filterValuesRecursively)(_macroProcessor.macroProcessor);
|
151
|
-
|
152
|
-
// @param cssRule { selector: { prop1: value, prop2: value, subselector: { prop3: value}}
|
153
|
-
var objectToRulesArray = function objectToRulesArray(o) {
|
154
|
-
var result = [];
|
155
|
-
for (var key in o) {
|
156
|
-
result.push({ sel: key, props: o[key] });
|
157
|
-
}
|
158
|
-
return result;
|
159
|
-
};
|
160
|
-
|
161
|
-
var dasherizePropertyKeys = exports.dasherizePropertyKeys = (0, _object.filterValuesRecursively)(_properties.dasherizeKeys);
|
162
|
-
|
163
|
-
var rejectUnknownPropertyKeys = exports.rejectUnknownPropertyKeys = (0, _object.filterValuesRecursively)(_properties.rejectUnknownKeys);
|
164
|
-
|
165
|
-
var pipeline = [];
|
166
|
-
pipeline.push(applyMacros);
|
167
|
-
pipeline.push(_cssObject.flattenObject);
|
168
|
-
pipeline.push(_cssObject.compressSelectors);
|
169
|
-
pipeline.push(dasherizePropertyKeys);
|
170
|
-
pipeline.push(rejectUnknownPropertyKeys);
|
171
|
-
pipeline.push(objectToRulesArray);
|
172
|
-
|
173
|
-
var process = function process(o) {
|
174
|
-
for (var i = 0; i < pipeline.length; i++) {
|
175
|
-
o = pipeline[i](o);
|
176
|
-
}
|
177
|
-
return o;
|
178
|
-
};
|
179
|
-
|
180
|
-
;
|
181
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
|
182
|
-
|
183
|
-
/***/ },
|
184
|
-
/* 3 */
|
185
|
-
/***/ function(module, exports) {
|
186
|
-
|
187
|
-
// shim for using process in browser
|
188
|
-
|
189
|
-
var process = module.exports = {};
|
190
|
-
var queue = [];
|
191
|
-
var draining = false;
|
192
|
-
var currentQueue;
|
193
|
-
var queueIndex = -1;
|
194
|
-
|
195
|
-
function cleanUpNextTick() {
|
196
|
-
draining = false;
|
197
|
-
if (currentQueue.length) {
|
198
|
-
queue = currentQueue.concat(queue);
|
199
|
-
} else {
|
200
|
-
queueIndex = -1;
|
201
|
-
}
|
202
|
-
if (queue.length) {
|
203
|
-
drainQueue();
|
204
|
-
}
|
205
|
-
}
|
206
|
-
|
207
|
-
function drainQueue() {
|
208
|
-
if (draining) {
|
209
|
-
return;
|
210
|
-
}
|
211
|
-
var timeout = setTimeout(cleanUpNextTick);
|
212
|
-
draining = true;
|
213
|
-
|
214
|
-
var len = queue.length;
|
215
|
-
while(len) {
|
216
|
-
currentQueue = queue;
|
217
|
-
queue = [];
|
218
|
-
while (++queueIndex < len) {
|
219
|
-
if (currentQueue) {
|
220
|
-
currentQueue[queueIndex].run();
|
221
|
-
}
|
222
|
-
}
|
223
|
-
queueIndex = -1;
|
224
|
-
len = queue.length;
|
225
|
-
}
|
226
|
-
currentQueue = null;
|
227
|
-
draining = false;
|
228
|
-
clearTimeout(timeout);
|
229
|
-
}
|
230
|
-
|
231
|
-
process.nextTick = function (fun) {
|
232
|
-
var args = new Array(arguments.length - 1);
|
233
|
-
if (arguments.length > 1) {
|
234
|
-
for (var i = 1; i < arguments.length; i++) {
|
235
|
-
args[i - 1] = arguments[i];
|
236
|
-
}
|
237
|
-
}
|
238
|
-
queue.push(new Item(fun, args));
|
239
|
-
if (queue.length === 1 && !draining) {
|
240
|
-
setTimeout(drainQueue, 0);
|
241
|
-
}
|
242
|
-
};
|
243
|
-
|
244
|
-
// v8 likes predictible objects
|
245
|
-
function Item(fun, array) {
|
246
|
-
this.fun = fun;
|
247
|
-
this.array = array;
|
248
|
-
}
|
249
|
-
Item.prototype.run = function () {
|
250
|
-
this.fun.apply(null, this.array);
|
251
|
-
};
|
252
|
-
process.title = 'browser';
|
253
|
-
process.browser = true;
|
254
|
-
process.env = {};
|
255
|
-
process.argv = [];
|
256
|
-
process.version = ''; // empty string to avoid regexp issues
|
257
|
-
process.versions = {};
|
258
|
-
|
259
|
-
function noop() {}
|
260
|
-
|
261
|
-
process.on = noop;
|
262
|
-
process.addListener = noop;
|
263
|
-
process.once = noop;
|
264
|
-
process.off = noop;
|
265
|
-
process.removeListener = noop;
|
266
|
-
process.removeAllListeners = noop;
|
267
|
-
process.emit = noop;
|
268
|
-
|
269
|
-
process.binding = function (name) {
|
270
|
-
throw new Error('process.binding is not supported');
|
271
|
-
};
|
272
|
-
|
273
|
-
process.cwd = function () { return '/' };
|
274
|
-
process.chdir = function (dir) {
|
275
|
-
throw new Error('process.chdir is not supported');
|
276
|
-
};
|
277
|
-
process.umask = function() { return 0; };
|
278
|
-
|
279
|
-
|
280
|
-
/***/ },
|
281
|
-
/* 4 */
|
282
|
-
/***/ function(module, exports, __webpack_require__) {
|
283
|
-
|
284
|
-
'use strict';
|
285
|
-
|
286
|
-
Object.defineProperty(exports, "__esModule", {
|
287
|
-
value: true
|
288
|
-
});
|
289
|
-
exports.filterValuesRecursively = exports.applyToKeys = exports.mergeHashInto = undefined;
|
290
|
-
|
291
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
|
292
|
-
|
293
|
-
var _curry = __webpack_require__(5);
|
294
|
-
|
295
|
-
// mergeHashInto(hashA, hashB, hashC...)
|
296
|
-
// merge all properties from B, C into hash A.
|
297
|
-
var mergeHashInto = exports.mergeHashInto = function mergeHashInto(dest) {
|
298
|
-
for (var _len = arguments.length, hashes = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
299
|
-
hashes[_key - 1] = arguments[_key];
|
300
|
-
}
|
301
|
-
|
302
|
-
for (var i = 0; i < hashes.length; i++) {
|
303
|
-
for (var k in hashes[i]) {
|
304
|
-
dest[k] = hashes[i][k];
|
305
|
-
}
|
306
|
-
}
|
307
|
-
return dest;
|
308
|
-
};
|
309
|
-
|
310
|
-
// Apply filter to keys of an object
|
311
|
-
// fn: (key) => new key
|
312
|
-
// o: object to filter
|
313
|
-
var applyToKeys = exports.applyToKeys = (0, _curry.curry)(function (fn, o) {
|
314
|
-
var out = {};
|
315
|
-
for (var k in o) {
|
316
|
-
out[fn(k)] = o[k];
|
317
|
-
}
|
318
|
-
return out;
|
319
|
-
});
|
320
|
-
|
321
|
-
// Filter values of an object, recursively
|
322
|
-
// fn: fn(value, key) => new value
|
323
|
-
// o: object to process
|
324
|
-
var filterValuesRecursively = exports.filterValuesRecursively = (0, _curry.curry)(function (fn, o) {
|
325
|
-
var out = {};
|
326
|
-
for (var k in o) {
|
327
|
-
var v = o[k];
|
328
|
-
var newValue = fn(v, k);
|
329
|
-
|
330
|
-
if ((typeof newV === 'undefined' ? 'undefined' : _typeof(newV)) === 'object') {
|
331
|
-
out[k] = filterValuesRecursively(fn, newValue);
|
332
|
-
} else {
|
333
|
-
out[k] = newValue;
|
334
|
-
}
|
335
|
-
}
|
336
|
-
return out;
|
337
|
-
});
|
338
|
-
|
339
|
-
/***/ },
|
340
|
-
/* 5 */
|
341
|
-
/***/ function(module, exports) {
|
342
|
-
|
343
|
-
"use strict";
|
344
|
-
|
345
|
-
Object.defineProperty(exports, "__esModule", {
|
346
|
-
value: true
|
347
|
-
});
|
348
|
-
exports.curry = curry;
|
349
|
-
function curry(fx) {
|
350
|
-
var arity = fx.length;
|
351
|
-
|
352
|
-
return function f1() {
|
353
|
-
var args = Array.prototype.slice.call(arguments, 0);
|
354
|
-
if (args.length >= arity) {
|
355
|
-
return fx.apply(null, args);
|
356
|
-
} else {
|
357
|
-
return function f2() {
|
358
|
-
var args2 = Array.prototype.slice.call(arguments, 0);
|
359
|
-
return f1.apply(null, args.concat(args2));
|
360
|
-
};
|
361
|
-
}
|
362
|
-
};
|
363
|
-
}
|
364
|
-
|
365
|
-
/***/ },
|
366
|
-
/* 6 */
|
367
|
-
/***/ function(module, exports) {
|
368
|
-
|
369
|
-
'use strict';
|
370
|
-
|
371
|
-
Object.defineProperty(exports, "__esModule", {
|
372
|
-
value: true
|
373
|
-
});
|
374
|
-
|
375
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
|
376
|
-
|
377
|
-
var isArray = function isArray(object) {
|
378
|
-
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && Object.prototype.toString.call(object) === '[object Array]';
|
379
|
-
};
|
380
|
-
|
381
|
-
// "each_with_index" from Ruby style
|
382
|
-
var arrayEach = function arrayEach(a, fn) {
|
383
|
-
for (var i = 0; i < a.length;) {
|
384
|
-
fn(a[i], i++);
|
385
|
-
}
|
386
|
-
return a;
|
387
|
-
};
|
388
|
-
|
389
|
-
var arrayInject = function arrayInject(a, memo, iterator) {
|
390
|
-
arrayEach(a, function (value, index) {
|
391
|
-
memo = iterator(memo, value, index);
|
392
|
-
});
|
393
|
-
return memo;
|
394
|
-
};
|
395
|
-
|
396
|
-
var arrayFlatten = function arrayFlatten(a) {
|
397
|
-
return arrayInject(a, [], function (array, value) {
|
398
|
-
if (isArray(value)) return array.concat(arrayFlatten(value));
|
399
|
-
array.push(value);
|
400
|
-
return array;
|
401
|
-
});
|
402
|
-
};
|
403
|
-
|
404
|
-
function includes(values, value) {
|
405
|
-
for (var i = 0; i < values.length; i++) {
|
406
|
-
if (value == values[i]) return true;
|
407
|
-
}
|
408
|
-
return false;
|
409
|
-
}
|
410
|
-
|
411
|
-
exports.isArray = isArray;
|
412
|
-
exports.arrayEach = arrayEach;
|
413
|
-
exports.arrayInject = arrayInject;
|
414
|
-
exports.arrayFlatten = arrayFlatten;
|
415
|
-
exports.includes = includes;
|
416
|
-
|
417
|
-
/***/ },
|
418
|
-
/* 7 */
|
419
|
-
/***/ function(module, exports, __webpack_require__) {
|
420
|
-
|
421
|
-
'use strict';
|
422
|
-
|
423
|
-
Object.defineProperty(exports, "__esModule", {
|
424
|
-
value: true
|
425
|
-
});
|
426
|
-
exports.compressSelectors = exports.flattenObject = undefined;
|
427
|
-
|
428
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /*
|
429
|
-
A Javascript object tha represents "CSS" rules. It:
|
430
|
-
* can be deeply nested, implying subselections
|
431
|
-
* keys can be CSS properties and values CSS property values
|
432
|
-
*/
|
433
|
-
|
434
|
-
var _string = __webpack_require__(8);
|
435
|
-
|
436
|
-
var _macroProcessor = __webpack_require__(9);
|
437
|
-
|
438
|
-
var _object = __webpack_require__(4);
|
439
|
-
|
440
|
-
// Calculate "subselector", taking into account & rules and complex
|
441
|
-
// (comma separated) selectors.
|
442
|
-
function buildSubcontext(context, key) {
|
443
|
-
var keys = key.split(',');
|
444
|
-
for (var k = 0; k < keys.length; k++) {
|
445
|
-
var sel = (0, _string.trim)(keys[k]);
|
446
|
-
sel = sel.substr(0, 1) == '&' ? sel.substr(1) : ' ' + sel;
|
447
|
-
keys[k] = context + sel;
|
448
|
-
}
|
449
|
-
|
450
|
-
return (0, _string.trim)(keys.join(','));
|
451
|
-
}
|
452
|
-
|
453
|
-
function entryDefinesSubcontext(key, value) {
|
454
|
-
if (key.match(/^\.\#\&/)) return true;
|
455
|
-
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object' && !(0, _macroProcessor.isMacroKey)(key);
|
456
|
-
}
|
457
|
-
|
458
|
-
var flattenObject = exports.flattenObject = function flattenObject(inputObject) {
|
459
|
-
var out = {};
|
460
|
-
|
461
|
-
var addRule = function addRule(selector, propertyName, propertyValue) {
|
462
|
-
selector = (0, _string.trim)(selector);
|
463
|
-
out[selector] = out[selector] || {};
|
464
|
-
if (out[selector][propertyName]) {
|
465
|
-
console.log('Replacing property ', propertyName, ' in ', selector, '; ', out[selector][propertyName], ' => ', propertyValue);
|
466
|
-
}
|
467
|
-
out[selector][propertyName] = propertyValue;
|
468
|
-
};
|
469
|
-
|
470
|
-
function addObject(o, context) {
|
471
|
-
// o: object with keys
|
472
|
-
// entries are either
|
473
|
-
// css property => value
|
474
|
-
// subselector => rules
|
475
|
-
for (var key in o) {
|
476
|
-
var value = o[key];
|
477
|
-
if (entryDefinesSubcontext(key, value)) {
|
478
|
-
var subcontext = buildSubcontext(context, key);
|
479
|
-
addObject(value, subcontext); // Recurse!
|
480
|
-
} else {
|
481
|
-
addRule(context, key, value);
|
482
|
-
}
|
483
|
-
}
|
484
|
-
}
|
485
|
-
|
486
|
-
addObject(inputObject, '');
|
487
|
-
|
488
|
-
return out;
|
489
|
-
};
|
490
|
-
|
491
|
-
/**
|
492
|
-
* TODO UPDATE DOCS
|
493
|
-
*/
|
494
|
-
|
495
|
-
var compressSelector = function compressSelector(sel) {
|
496
|
-
while (sel.match(/.*#.*#.*/)) {
|
497
|
-
sel = sel.replace(/^.*#.*#/, '#');
|
498
|
-
}
|
499
|
-
return sel;
|
500
|
-
};
|
501
|
-
|
502
|
-
var compressSelectors = exports.compressSelectors = (0, _object.applyToKeys)(compressSelector);
|
503
|
-
|
504
|
-
/***/ },
|
505
|
-
/* 8 */
|
506
|
-
/***/ function(module, exports) {
|
507
|
-
|
508
|
-
"use strict";
|
509
|
-
|
510
|
-
Object.defineProperty(exports, "__esModule", {
|
511
|
-
value: true
|
512
|
-
});
|
513
|
-
// S T R I N G s
|
514
|
-
var dasherize = function dasherize(s) {
|
515
|
-
return s.replace(/([A-Z])/g, function ($1) {
|
516
|
-
return "-" + $1.toLowerCase();
|
517
|
-
});
|
518
|
-
};
|
519
|
-
|
520
|
-
var trim = function trim(text) {
|
521
|
-
return (text || "").replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g, "");
|
522
|
-
};
|
523
|
-
|
524
|
-
exports.dasherize = dasherize;
|
525
|
-
exports.trim = trim;
|
526
|
-
|
527
|
-
/***/ },
|
528
|
-
/* 9 */
|
529
|
-
/***/ function(module, exports, __webpack_require__) {
|
530
|
-
|
531
|
-
'use strict';
|
532
|
-
|
533
|
-
Object.defineProperty(exports, "__esModule", {
|
534
|
-
value: true
|
535
|
-
});
|
536
|
-
exports.setMacroKeys = setMacroKeys;
|
537
|
-
exports.macroProcessor = macroProcessor;
|
538
|
-
exports.isMacroKey = isMacroKey;
|
539
|
-
|
540
|
-
var _object = __webpack_require__(4);
|
541
|
-
|
542
|
-
var _array = __webpack_require__(6);
|
543
|
-
|
544
|
-
var macroKeys = ['has', 'mixin', 'mixins'];
|
545
|
-
function setMacroKeys(keys) {
|
546
|
-
macroKeys = keys;
|
547
|
-
}
|
548
|
-
|
549
|
-
function macroProcessor(properties) {
|
550
|
-
|
551
|
-
function applyMacros(macroList) {
|
552
|
-
|
553
|
-
var props = {};
|
554
|
-
|
555
|
-
var macros = (0, _array.arrayFlatten)([macroList]); // support single or multiple sets of properties
|
556
|
-
for (var i = 0; i < macros.length; i++) {
|
557
|
-
var macro = macros[i];
|
558
|
-
if (typeof macro == 'function') macro = macro();
|
559
|
-
for (var mp in macro) {
|
560
|
-
if (isMacroKey(mp)) {
|
561
|
-
(0, _object.mergeHashInto)(props, applyMacros(macro[mp]));
|
562
|
-
} else {
|
563
|
-
props[mp] = macro[mp];
|
564
|
-
}
|
565
|
-
}
|
566
|
-
}
|
567
|
-
return props;
|
568
|
-
}
|
569
|
-
|
570
|
-
for (var k in properties) {
|
571
|
-
if (isMacroKey(k)) {
|
572
|
-
var macros = properties[k];
|
573
|
-
delete properties[k];
|
574
|
-
if (macros) {
|
575
|
-
(0, _object.mergeHashInto)(properties, applyMacros(macros));
|
576
|
-
}
|
577
|
-
}
|
578
|
-
}
|
579
|
-
return properties;
|
580
|
-
}
|
581
|
-
|
582
|
-
function isMacroKey(k) {
|
583
|
-
return (0, _array.includes)(macroKeys, k);
|
584
|
-
}
|
585
|
-
|
586
|
-
/***/ },
|
587
|
-
/* 10 */
|
588
|
-
/***/ function(module, exports, __webpack_require__) {
|
589
|
-
|
590
|
-
'use strict';
|
591
|
-
|
592
|
-
Object.defineProperty(exports, "__esModule", {
|
593
|
-
value: true
|
594
|
-
});
|
595
|
-
exports.rejectUnknownKeys = exports.dasherizeKeys = undefined;
|
596
|
-
|
597
|
-
var _string = __webpack_require__(8);
|
598
|
-
|
599
|
-
var _object = __webpack_require__(4);
|
600
|
-
|
601
|
-
var _curry = __webpack_require__(5);
|
602
|
-
|
603
|
-
var _propertyNameValidator = __webpack_require__(11);
|
604
|
-
|
605
|
-
var propertyNameValidator = _interopRequireWildcard(_propertyNameValidator);
|
606
|
-
|
607
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
608
|
-
|
609
|
-
var dasherizeKeys = exports.dasherizeKeys = (0, _object.applyToKeys)(_string.dasherize);
|
610
|
-
|
611
|
-
var propertyKeyVisitor = (0, _curry.curry)(function (fn, rules, ctx) {
|
612
|
-
for (var prop in rules) {
|
613
|
-
fn(prop, ctx);
|
614
|
-
}
|
615
|
-
return rules;
|
616
|
-
});
|
617
|
-
|
618
|
-
var rejectUnknownKeys = exports.rejectUnknownKeys = propertyKeyVisitor(function (prop, ctx) {
|
619
|
-
var error = propertyNameValidator.error(prop);
|
620
|
-
if (error) {
|
621
|
-
throw '' + error + '. Context: "' + ctx + '"';
|
622
|
-
}
|
623
|
-
});
|
624
|
-
|
625
|
-
/***/ },
|
626
|
-
/* 11 */
|
627
|
-
/***/ function(module, exports, __webpack_require__) {
|
628
|
-
|
629
|
-
'use strict';
|
630
|
-
|
631
|
-
Object.defineProperty(exports, "__esModule", {
|
632
|
-
value: true
|
633
|
-
});
|
634
|
-
exports.setConfig = setConfig;
|
635
|
-
exports.addNames = addNames;
|
636
|
-
exports.validate = validate;
|
637
|
-
exports.error = error;
|
638
|
-
|
639
|
-
var _array = __webpack_require__(6);
|
640
|
-
|
641
|
-
var validNames = {};
|
642
|
-
|
643
|
-
var config = {
|
644
|
-
strictNames: true,
|
645
|
-
anyBrowserExtension: true
|
646
|
-
};
|
647
|
-
function setConfig(key, value) {
|
648
|
-
config[key] = value;
|
649
|
-
}
|
650
|
-
|
651
|
-
/**
|
652
|
-
* Add more valid properties to the list of valid property names.
|
653
|
-
*/
|
654
|
-
function addNames() {
|
655
|
-
for (var _len = arguments.length, propertyNames = Array(_len), _key = 0; _key < _len; _key++) {
|
656
|
-
propertyNames[_key] = arguments[_key];
|
657
|
-
}
|
658
|
-
|
659
|
-
var names = (0, _array.arrayFlatten)([propertyNames]);
|
660
|
-
for (var i = 0; i < names.length; i++) {
|
661
|
-
validNames[names[i]] = true;
|
662
|
-
}
|
663
|
-
}
|
664
|
-
|
665
|
-
function validate(name) {
|
666
|
-
return !error(name) ? name : null;
|
667
|
-
}
|
668
|
-
|
669
|
-
function error(name) {
|
670
|
-
if (/^\-\w+\-/.exec(name)) {
|
671
|
-
if (!config.anyBrowserExtension && !validNames[name]) {
|
672
|
-
return 'Unrecognized "' + name + '" browser extension property name';
|
673
|
-
}
|
674
|
-
} else {
|
675
|
-
if (config.strictNames && !validNames[name]) {
|
676
|
-
return 'Unrecognized "' + name + '" property name';
|
677
|
-
}
|
678
|
-
}
|
679
|
-
return null;
|
680
|
-
}
|
681
|
-
|
682
|
-
addNames(['accelerator', 'azimuth', 'background', 'background-attachment', 'background-color', 'background-image', 'background-position', 'background-position-x', 'background-position-y', 'background-repeat', 'behavior', 'border', 'border-bottom', 'border-bottom-right-radius', 'border-bottom-left-radius', 'border-bottom-color', 'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top', 'border-top-color', 'border-top-style', 'border-top-width', 'border-top-left-radius', 'border-top-right-radius', 'border-width', 'box-shadow', 'bottom', 'caption-side', 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display', 'elevation', 'empty-cells', 'filter', 'float', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'height', 'ime-mode', 'include-source', 'layer-background-color', 'layer-background-image', 'layout-flow', 'layout-grid', 'layout-grid-char', 'layout-grid-char-spacing', 'layout-grid-line', 'layout-grid-mode', 'layout-grid-type', 'letter-spacing', 'left', 'line-break', 'line-height', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', 'min-width', '-ms-filter', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', 'outline-width', 'overflow', 'overflow-X', 'overflow-Y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page', 'page-break-after', 'page-break-before', 'page-break-inside', 'pause', 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', 'richness', 'right', 'size', 'speak', 'speak-header', 'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'scrollbar-arrow-color', 'scrollbar-base-color', 'scrollbar-dark-shadow-color', 'scrollbar-face-color', 'scrollbar-highlight-color', 'scrollbar-shadow-color', 'scrollbar-3d-light-color', 'scrollbar-track-color', 'table-layout', 'text-align', 'text-align-last', 'text-decoration', 'text-indent', 'text-justify', 'text-offset', 'text-overflow', 'text-shadow', 'text-transform', 'text-autospace', 'text-kashida-space', 'text-underline-position', 'top', 'unicode-bidi', 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', 'width', 'word-break', 'word-spacing', 'word-wrap', 'writing-mode', 'z-index', 'zoom']);
|
683
|
-
addNames(['-moz-binding', '-moz-border-radius', '-moz-border-radius-topleft', '-moz-border-radius-topright', '-moz-border-radius-bottomright', '-moz-border-radius-bottomleft', '-moz-border-top-colors', '-moz-border-right-colors', '-moz-border-bottom-colors', '-moz-border-left-colors', '-moz-box-shadow', '-moz-opacity', '-moz-outline', '-moz-outline-color', '-moz-outline-style', '-moz-outline-width', '-moz-user-focus', '-moz-user-input', '-moz-user-modify', '-moz-user-select']);
|
684
|
-
addNames(['-webkit-animation', '-webkit-animation-delay', '-webkit-animation-direction', '-webkit-animation-duration', '-webkit-animation-iteration-count', '-webkit-animation-name', '-webkit-animation-play-state', '-webkit-animation-timing-function', '-webkit-appearance', '-webkit-backface-visibility', '-webkit-background-clip', '-webkit-background-composite', '-webkit-background-origin', '-webkit-background-size', '-webkit-border-bottom-left-radius', '-webkit-border-bottom-right-radius', '-webkit-border-horizontal-spacing', '-webkit-border-image', '-webkit-border-radius', '-webkit-border-top-left-radius', '-webkit-border-top-right-radius', '-webkit-border-vertical-spacing', '-webkit-box-align', '-webkit-box-direction', '-webkit-box-flex', '-webkit-box-flex-group', '-webkit-box-lines', '-webkit-box-ordinal-group', '-webkit-box-orient', '-webkit-box-pack', '-webkit-box-reflect', '-webkit-box-shadow', '-webkit-box-sizing', '-webkit-column-break-after', '-webkit-column-break-before', '-webkit-column-break-inside', '-webkit-column-count', '-webkit-column-gap', '-webkit-column-rule', '-webkit-column-rule-color', '-webkit-column-rule-style', '-webkit-column-rule-width', '-webkit-column-width', '-webkit-columns', '-webkit-dashboard-region', '-webkit-line-break', '-webkit-margin-bottom-collapse', '-webkit-margin-collapse', '-webkit-margin-start', '-webkit-margin-top-collapse', '-webkit-marquee', '-webkit-marquee-direction', '-webkit-marquee-increment', '-webkit-marquee-repetition', '-webkit-marquee-speed', '-webkit-marquee-style', '-webkit-mask', '-webkit-mask-attachment', '-webkit-mask-box-image', '-webkit-mask-clip', '-webkit-mask-composite', '-webkit-mask-image', '-webkit-mask-origin', '-webkit-mask-position', '-webkit-mask-position-x', '-webkit-mask-position-y', '-webkit-mask-repeat', '-webkit-mask-size', '-webkit-nbsp-mode', '-webkit-padding-start', '-webkit-perspective', '-webkit-perspective-origin', '-webkit-rtl-ordering', '-webkit-tap-highlight-color', '-webkit-text-fill-color', '-webkit-text-security', '-webkit-text-size-adjust', '-webkit-text-stroke', '-webkit-text-stroke-color', '-webkit-text-stroke-width', '-webkit-touch-callout', '-webkit-transform', '-webkit-transform-origin', '-webkit-transform-origin-x', '-webkit-transform-origin-y', '-webkit-transform-origin-z', '-webkit-transform-style', '-webkit-transition', '-webkit-transition-delay', '-webkit-transition-duration', '-webkit-transition-property', '-webkit-transition-timing-function', '-webkit-user-drag', '-webkit-user-modify', '-webkit-user-select']);
|
685
|
-
|
686
|
-
/***/ },
|
687
|
-
/* 12 */
|
688
|
-
/***/ function(module, exports, __webpack_require__) {
|
689
|
-
|
690
|
-
'use strict';
|
691
|
-
|
692
|
-
Object.defineProperty(exports, "__esModule", {
|
693
|
-
value: true
|
694
|
-
});
|
695
|
-
|
696
|
-
exports.default = function (rules) {
|
697
|
-
return rules.reduce(function (s, rule) {
|
698
|
-
return s + (0, _rule.format)(rule);
|
699
|
-
}, '');
|
700
|
-
};
|
701
|
-
|
702
|
-
var _rule = __webpack_require__(13);
|
703
|
-
|
704
|
-
/***/ },
|
705
|
-
/* 13 */
|
706
|
-
/***/ function(module, exports, __webpack_require__) {
|
707
|
-
|
708
|
-
'use strict';
|
709
|
-
|
710
|
-
Object.defineProperty(exports, "__esModule", {
|
711
|
-
value: true
|
712
|
-
});
|
713
|
-
exports.format = undefined;
|
714
|
-
|
715
|
-
var _propertyEntry = __webpack_require__(14);
|
716
|
-
|
717
|
-
var propertyEntry = _interopRequireWildcard(_propertyEntry);
|
718
|
-
|
719
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
720
|
-
|
721
|
-
var formatProperties = function formatProperties(props) {
|
722
|
-
return Object.keys(props).reduce(function (s, p) {
|
723
|
-
return s + propertyEntry.format(p, props[p]);
|
724
|
-
}, '');
|
725
|
-
};
|
726
|
-
|
727
|
-
// Rule: object with `sel` and `props` keys.
|
728
|
-
// .sel is the selector
|
729
|
-
// .props in an object holding CSS property rules
|
730
|
-
var format = exports.format = function format(rule) {
|
731
|
-
return rule.sel + ' { ' + formatProperties(rule.props) + '}\r';
|
732
|
-
};
|
733
|
-
|
734
|
-
/***/ },
|
735
|
-
/* 14 */
|
736
|
-
/***/ function(module, exports, __webpack_require__) {
|
737
|
-
|
738
|
-
'use strict';
|
739
|
-
|
740
|
-
Object.defineProperty(exports, "__esModule", {
|
741
|
-
value: true
|
742
|
-
});
|
743
|
-
exports.format = undefined;
|
744
|
-
|
745
|
-
var _propertyName = __webpack_require__(15);
|
746
|
-
|
747
|
-
var propertyName = _interopRequireWildcard(_propertyName);
|
748
|
-
|
749
|
-
var _propertyValue = __webpack_require__(16);
|
750
|
-
|
751
|
-
var propertyValue = _interopRequireWildcard(_propertyValue);
|
752
|
-
|
753
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
754
|
-
|
755
|
-
var format = function format(name, value) {
|
756
|
-
return propertyName.format(name) + ": " + propertyValue.format(value, name) + ";\r";
|
757
|
-
};
|
758
|
-
|
759
|
-
exports.format = format;
|
760
|
-
|
761
|
-
/***/ },
|
762
|
-
/* 15 */
|
763
|
-
/***/ function(module, exports, __webpack_require__) {
|
764
|
-
|
765
|
-
'use strict';
|
766
|
-
|
767
|
-
Object.defineProperty(exports, "__esModule", {
|
768
|
-
value: true
|
769
|
-
});
|
770
|
-
exports.valid = exports.format = exports.propertyNameOf = undefined;
|
771
|
-
|
772
|
-
var _string = __webpack_require__(8);
|
773
|
-
|
774
|
-
var _propertyNameValidator = __webpack_require__(11);
|
775
|
-
|
776
|
-
var propertyNameValidator = _interopRequireWildcard(_propertyNameValidator);
|
777
|
-
|
778
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
779
|
-
|
780
|
-
/*
|
781
|
-
Returns the CSS-correct lowercase property name, if it's recognized
|
782
|
-
as a property. Null otherwise.
|
783
|
-
*/
|
784
|
-
var propertyNameOf = exports.propertyNameOf = function propertyNameOf(p) {
|
785
|
-
var name = (0, _string.dasherize)(p);
|
786
|
-
return propertyNameValidator.validate(name);
|
787
|
-
};
|
788
|
-
|
789
|
-
var format = exports.format = function format(name) {
|
790
|
-
return propertyNameOf(name);
|
791
|
-
};
|
792
|
-
|
793
|
-
var valid = exports.valid = propertyNameOf;
|
794
|
-
|
795
|
-
/***/ },
|
796
|
-
/* 16 */
|
797
|
-
/***/ function(module, exports) {
|
798
|
-
|
799
|
-
'use strict';
|
800
|
-
|
801
|
-
Object.defineProperty(exports, "__esModule", {
|
802
|
-
value: true
|
803
|
-
});
|
804
|
-
|
805
|
-
var format = function format(value, name) {
|
806
|
-
if (value && typeof value == 'number' && name != 'z-index' && name != 'opacity' && name != 'zoom') {
|
807
|
-
return '' + value + 'px';
|
808
|
-
}
|
809
|
-
return value;
|
810
|
-
};
|
811
|
-
|
812
|
-
exports.format = format;
|
813
|
-
|
814
|
-
/***/ },
|
815
|
-
/* 17 */
|
816
|
-
/***/ function(module, exports) {
|
817
|
-
|
818
|
-
'use strict';
|
819
|
-
|
820
|
-
Object.defineProperty(exports, "__esModule", {
|
821
|
-
value: true
|
822
|
-
});
|
823
|
-
|
824
|
-
exports.default = function (css) {
|
825
|
-
var e = document.createElement('STYLE');
|
826
|
-
var a = document.createAttribute('type');
|
827
|
-
a.nodeValue = 'text/css';
|
828
|
-
e.setAttributeNode(a);
|
829
|
-
var head = document.getElementsByTagName('HEAD')[0];
|
830
|
-
head.appendChild(e);
|
831
|
-
try {
|
832
|
-
e.appendChild(document.createTextNode(css));
|
833
|
-
} catch (e) {
|
834
|
-
var ss = document.styleSheets[document.styleSheets.length - 1];
|
835
|
-
ss.cssText = '' + ss.cssText + css;
|
836
|
-
}
|
837
|
-
};
|
838
|
-
|
839
|
-
/***/ },
|
840
|
-
/* 18 */
|
841
|
-
/***/ function(module, exports, __webpack_require__) {
|
842
|
-
|
843
|
-
'use strict';
|
844
|
-
|
845
|
-
Object.defineProperty(exports, "__esModule", {
|
846
|
-
value: true
|
847
|
-
});
|
848
|
-
exports.imageReplacement = exports.clearfix = exports.linearGradient = exports.verticalCentering = exports.horizontalCentering = exports.boxShadow = exports.roundedCorners = undefined;
|
849
|
-
|
850
|
-
var _roundedCorners = __webpack_require__(19);
|
851
|
-
|
852
|
-
var _roundedCorners2 = _interopRequireDefault(_roundedCorners);
|
853
|
-
|
854
|
-
var _boxShadow = __webpack_require__(20);
|
855
|
-
|
856
|
-
var _boxShadow2 = _interopRequireDefault(_boxShadow);
|
857
|
-
|
858
|
-
var _horizontalCentering = __webpack_require__(21);
|
859
|
-
|
860
|
-
var _horizontalCentering2 = _interopRequireDefault(_horizontalCentering);
|
861
|
-
|
862
|
-
var _verticalCentering = __webpack_require__(22);
|
863
|
-
|
864
|
-
var _verticalCentering2 = _interopRequireDefault(_verticalCentering);
|
865
|
-
|
866
|
-
var _linearGradient = __webpack_require__(23);
|
867
|
-
|
868
|
-
var _linearGradient2 = _interopRequireDefault(_linearGradient);
|
869
|
-
|
870
|
-
var _clearfix = __webpack_require__(25);
|
871
|
-
|
872
|
-
var _clearfix2 = _interopRequireDefault(_clearfix);
|
873
|
-
|
874
|
-
var _imageReplacement = __webpack_require__(26);
|
875
|
-
|
876
|
-
var _imageReplacement2 = _interopRequireDefault(_imageReplacement);
|
877
|
-
|
878
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
879
|
-
|
880
|
-
exports.roundedCorners = _roundedCorners2.default;
|
881
|
-
exports.boxShadow = _boxShadow2.default;
|
882
|
-
exports.horizontalCentering = _horizontalCentering2.default;
|
883
|
-
exports.verticalCentering = _verticalCentering2.default;
|
884
|
-
exports.linearGradient = _linearGradient2.default;
|
885
|
-
exports.clearfix = _clearfix2.default;
|
886
|
-
exports.imageReplacement = _imageReplacement2.default; /*
|
887
|
-
* Functions that return a set of properties and their values.
|
888
|
-
* They can be inserted as style rules using "has" property.
|
889
|
-
*/
|
890
|
-
|
891
|
-
/***/ },
|
892
|
-
/* 19 */
|
893
|
-
/***/ function(module, exports) {
|
894
|
-
|
895
|
-
'use strict';
|
896
|
-
|
897
|
-
Object.defineProperty(exports, "__esModule", {
|
898
|
-
value: true
|
899
|
-
});
|
900
|
-
exports.default = roundedCorners;
|
901
|
-
/**
|
902
|
-
* Return rounded corner properties. Call with an optional side and a radius.
|
903
|
-
*
|
904
|
-
* roundedCorners(10);
|
905
|
-
* roundedCorners('left', 8);
|
906
|
-
* roundedCorners('tl', 6);
|
907
|
-
*
|
908
|
-
* @param side tl, tr, bl, br, left, right, top or bottom or "all", the default
|
909
|
-
* @param radius pixel measurement
|
910
|
-
*/
|
911
|
-
function roundedCorners(side, radius) {
|
912
|
-
if (!radius) {
|
913
|
-
radius = side || 10;
|
914
|
-
side = 'all';
|
915
|
-
}
|
916
|
-
if (side == 'all') {
|
917
|
-
return {
|
918
|
-
'-moz-border-radius': radius,
|
919
|
-
'border-radius': radius,
|
920
|
-
'-webkit-border-radius': radius
|
921
|
-
};
|
922
|
-
} else {
|
923
|
-
var rules = {};
|
924
|
-
if (side == 'tl' || side == 'top' || side == 'left') {
|
925
|
-
rules['-moz-border-radius-topleft'] = radius;
|
926
|
-
rules['-webkit-border-top-left-radius'] = radius;
|
927
|
-
rules['border-top-left-radius'] = radius;
|
928
|
-
}
|
929
|
-
if (side == 'tr' || side == 'top' || side == 'right') {
|
930
|
-
rules['-webkit-border-top-right-radius'] = radius;
|
931
|
-
rules['-moz-border-radius-topright'] = radius;
|
932
|
-
rules['border-top-right-radius'] = radius;
|
933
|
-
}
|
934
|
-
if (side == 'bl' || side == 'bottom' || side == 'left') {
|
935
|
-
rules['-webkit-border-bottom-left-radius'] = radius;
|
936
|
-
rules['-moz-border-radius-bottomleft'] = radius;
|
937
|
-
rules['border-bottom-left-radius'] = radius;
|
938
|
-
}
|
939
|
-
if (side == 'br' || side == 'bottom' || side == 'right') {
|
940
|
-
rules['-webkit-border-bottom-right-radius'] = radius;
|
941
|
-
rules['-moz-border-radius-bottomright'] = radius;
|
942
|
-
rules['border-bottom-right-radius'] = radius;
|
943
|
-
}
|
944
|
-
return rules;
|
945
|
-
}
|
946
|
-
}
|
947
|
-
|
948
|
-
/***/ },
|
949
|
-
/* 20 */
|
950
|
-
/***/ function(module, exports) {
|
951
|
-
|
952
|
-
'use strict';
|
953
|
-
|
954
|
-
Object.defineProperty(exports, "__esModule", {
|
955
|
-
value: true
|
956
|
-
});
|
957
|
-
exports.default = boxShadow;
|
958
|
-
/*
|
959
|
-
Cross-browser box shadow code.
|
960
|
-
|
961
|
-
offsetOrDirection: an array holding the x offset and y offset
|
962
|
-
radius: radius of the shadow
|
963
|
-
color: color of the shadow
|
964
|
-
|
965
|
-
*/
|
966
|
-
function boxShadow(offsetOrDirection, radius, color) {
|
967
|
-
var xOffset, yOffset, strength, direction;
|
968
|
-
if (typeof offsetOrDirection.length == 'undefined') {
|
969
|
-
throw 'Not yet supported';
|
970
|
-
} else if (offsetOrDirection.length == 2) {
|
971
|
-
xOffset = offsetOrDirection[0];
|
972
|
-
yOffset = offsetOrDirection[1];
|
973
|
-
strength = 4;
|
974
|
-
direction = 135; // should be angle (atan) of above numbers
|
975
|
-
} else {
|
976
|
-
throw "boxShadow requires a direction (degree) or [xOffset, yOffset] in px measurements.";
|
977
|
-
}
|
978
|
-
|
979
|
-
return {
|
980
|
-
'-moz-box-shadow': '' + xOffset + 'px ' + yOffset + 'px ' + radius + 'px ' + color,
|
981
|
-
'-webkit-box-shadow': '' + xOffset + 'px ' + yOffset + 'px ' + radius + 'px ' + color,
|
982
|
-
boxShadow: '' + xOffset + 'px ' + yOffset + 'px ' + radius + 'px ' + color,
|
983
|
-
'-ms-filter': "progid:DXImageTransform.Microsoft.Shadow(Strength=" + strength + ", Direction=" + direction + ", Color='" + color + "')", // IE 8
|
984
|
-
filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=" + strength + ", Direction=" + direction + ", Color='" + color + "')" // IE 5.5 - 7
|
985
|
-
};
|
986
|
-
}
|
987
|
-
|
988
|
-
/***/ },
|
989
|
-
/* 21 */
|
990
|
-
/***/ function(module, exports) {
|
991
|
-
|
992
|
-
'use strict';
|
993
|
-
|
994
|
-
Object.defineProperty(exports, "__esModule", {
|
995
|
-
value: true
|
996
|
-
});
|
997
|
-
exports.default = horizontalCentering;
|
998
|
-
// http://stackoverflow.com/questions/148251/css-centering-tricks
|
999
|
-
function horizontalCentering(width) {
|
1000
|
-
return {
|
1001
|
-
width: width,
|
1002
|
-
position: 'absolute',
|
1003
|
-
left: '50%',
|
1004
|
-
marginLeft: -(width / 2)
|
1005
|
-
};
|
1006
|
-
}
|
1007
|
-
|
1008
|
-
/***/ },
|
1009
|
-
/* 22 */
|
1010
|
-
/***/ function(module, exports) {
|
1011
|
-
|
1012
|
-
'use strict';
|
1013
|
-
|
1014
|
-
Object.defineProperty(exports, "__esModule", {
|
1015
|
-
value: true
|
1016
|
-
});
|
1017
|
-
exports.default = verticalCentering;
|
1018
|
-
// http://stackoverflow.com/questions/148251/css-centering-tricks
|
1019
|
-
function verticalCentering(height) {
|
1020
|
-
return {
|
1021
|
-
height: height,
|
1022
|
-
position: 'absolute',
|
1023
|
-
top: '50%',
|
1024
|
-
marginTop: -(height / 2)
|
1025
|
-
};
|
1026
|
-
}
|
1027
|
-
|
1028
|
-
/***/ },
|
1029
|
-
/* 23 */
|
1030
|
-
/***/ function(module, exports, __webpack_require__) {
|
1031
|
-
|
1032
|
-
'use strict';
|
1033
|
-
|
1034
|
-
Object.defineProperty(exports, "__esModule", {
|
1035
|
-
value: true
|
1036
|
-
});
|
1037
|
-
exports.default = linearGradient;
|
1038
|
-
|
1039
|
-
var _browser = __webpack_require__(24);
|
1040
|
-
|
1041
|
-
var _array = __webpack_require__(6);
|
1042
|
-
|
1043
|
-
function linearGradient(startingPoint, color1, color2, etc) {
|
1044
|
-
var prefix = '',
|
1045
|
-
result = '';
|
1046
|
-
if ((0, _browser.browserInfo)().webkit) {
|
1047
|
-
prefix = '-webkit';
|
1048
|
-
} else if ((0, _browser.browserInfo)().mozilla) {
|
1049
|
-
prefix = '-moz';
|
1050
|
-
}
|
1051
|
-
|
1052
|
-
var stops = [];
|
1053
|
-
for (var i = 0; i < arguments.length; i++) {
|
1054
|
-
var argument = arguments[i];
|
1055
|
-
if (typeof argument == 'string') {
|
1056
|
-
stops.push(argument);
|
1057
|
-
} else if ((0, _array.isArray)(argument)) {
|
1058
|
-
for (var j = 0; j < argument.length; j++) {
|
1059
|
-
stops.push(argument[j]);
|
1060
|
-
}
|
1061
|
-
} else {
|
1062
|
-
for (var p in arguments[i]) {
|
1063
|
-
stops.push(argument[p] + (p != 0 && p != '100' ? ' ' + p + '%' : ''));
|
1064
|
-
}
|
1065
|
-
}
|
1066
|
-
}
|
1067
|
-
|
1068
|
-
result = prefix + '-linear-gradient(';
|
1069
|
-
for (i = 0; i < stops.length; i++) {
|
1070
|
-
if (i !== 0) result += ', ';
|
1071
|
-
result += stops[i];
|
1072
|
-
}
|
1073
|
-
result += ')';
|
1074
|
-
return result;
|
1075
|
-
}
|
1076
|
-
|
1077
|
-
// },generateLinearGradient:function() {
|
1078
|
-
// var props = c.gradientProps,
|
1079
|
-
// g = props.type + "-gradient(",e = "";
|
1080
|
-
// $sample = c.sample,
|
1081
|
-
// gCount = a.getPaletteLength(),
|
1082
|
-
// palette = a.getPalette();
|
1083
|
-
// if (props.xStart !== props.xEnd) {
|
1084
|
-
// g = g + props.xStart + " "
|
1085
|
-
// }
|
1086
|
-
// if (props.yStart !== props.yEnd) {
|
1087
|
-
// g = g + props.yStart
|
1088
|
-
// }
|
1089
|
-
// g = g + ", ";
|
1090
|
-
// var h = c.getColor;
|
1091
|
-
// $.each(palette, function(i, j) {
|
1092
|
-
// if (i > 0) {
|
1093
|
-
// e = e + " "
|
1094
|
-
// }
|
1095
|
-
// e = e + h(j) + " " + j.position + "%,"
|
1096
|
-
// });
|
1097
|
-
// g = g + e;
|
1098
|
-
// g = g.substr(0, g.length - 1) + ")";
|
1099
|
-
// return g
|
1100
|
-
// generateWebkitGradient:function() {
|
1101
|
-
// var j = c.gradientProps,l = "-webkit-gradient(" + j.type + "," + c.fetchGradientStart() + "," + c.fetchGradientEnd() + ",",g = "";
|
1102
|
-
// var e = a.getPalette(),f = e.length,k,m;
|
1103
|
-
// for (var h = 0; h < f; h++) {
|
1104
|
-
// m = e[h];
|
1105
|
-
// k = (m.position / 100);
|
1106
|
-
// g = g + "color-stop(" + k + ", rgb(" + m.rgb.r + "," + m.rgb.g + "," + m.rgb.b + ")),"
|
1107
|
-
// }
|
1108
|
-
// l = l + g;
|
1109
|
-
// l = l.substr(0, l.length - 1) + ");";
|
1110
|
-
// return l
|
1111
|
-
|
1112
|
-
/***/ },
|
1113
|
-
/* 24 */
|
1114
|
-
/***/ function(module, exports) {
|
1115
|
-
|
1116
|
-
/* WEBPACK VAR INJECTION */(function(global) {"use strict";
|
1117
|
-
|
1118
|
-
Object.defineProperty(exports, "__esModule", {
|
1119
|
-
value: true
|
1120
|
-
});
|
1121
|
-
// Lifted from jQuery: http://docs.jquery.com/Utilities/jQuery.browser
|
1122
|
-
var browser = {};
|
1123
|
-
|
1124
|
-
function uaMatch(ua) {
|
1125
|
-
ua = ua.toLowerCase();
|
1126
|
-
|
1127
|
-
var match = /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || !/compatible/.test(ua) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua) || [];
|
1128
|
-
|
1129
|
-
return { browser: match[1] || "", version: match[2] || "0" };
|
1130
|
-
}
|
1131
|
-
|
1132
|
-
if (typeof navigator !== 'undefined') {
|
1133
|
-
var browserMatch = uaMatch(navigator.userAgent);
|
1134
|
-
if (browserMatch.browser) {
|
1135
|
-
browser[browserMatch.browser] = true;
|
1136
|
-
browser.version = browserMatch.version;
|
1137
|
-
}
|
1138
|
-
}
|
1139
|
-
|
1140
|
-
var browserInfo = function browserInfo() {
|
1141
|
-
if (typeof global !== 'undefined' && global.browserOverride) {
|
1142
|
-
return global.browserOverride;
|
1143
|
-
} else {
|
1144
|
-
return browser;
|
1145
|
-
}
|
1146
|
-
};
|
1147
|
-
|
1148
|
-
exports.browser = browser;
|
1149
|
-
exports. // legacy static structure
|
1150
|
-
browserInfo // fn that can be overridden for tests
|
1151
|
-
= browserInfo;
|
1152
|
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
1153
|
-
|
1154
|
-
/***/ },
|
1155
|
-
/* 25 */
|
1156
|
-
/***/ function(module, exports, __webpack_require__) {
|
1157
|
-
|
1158
|
-
'use strict';
|
1159
|
-
|
1160
|
-
Object.defineProperty(exports, "__esModule", {
|
1161
|
-
value: true
|
1162
|
-
});
|
1163
|
-
exports.default = clearfix;
|
1164
|
-
|
1165
|
-
var _browser = __webpack_require__(24);
|
1166
|
-
|
1167
|
-
function clearfix() {
|
1168
|
-
var css = {
|
1169
|
-
display: 'inline-block',
|
1170
|
-
'&:after': {
|
1171
|
-
content: ' ',
|
1172
|
-
display: 'block',
|
1173
|
-
width: 0,
|
1174
|
-
height: 0,
|
1175
|
-
lineHeight: 0,
|
1176
|
-
fontSize: 0,
|
1177
|
-
clear: 'both',
|
1178
|
-
visibility: 'hidden'
|
1179
|
-
}
|
1180
|
-
};
|
1181
|
-
if ((0, _browser.browserInfo)().msie) {
|
1182
|
-
css['zoom'] = '1';
|
1183
|
-
}
|
1184
|
-
return css;
|
1185
|
-
}
|
1186
|
-
|
1187
|
-
/***/ },
|
1188
|
-
/* 26 */
|
1189
|
-
/***/ function(module, exports) {
|
1190
|
-
|
1191
|
-
'use strict';
|
1192
|
-
|
1193
|
-
Object.defineProperty(exports, "__esModule", {
|
1194
|
-
value: true
|
1195
|
-
});
|
1196
|
-
exports.default = imageReplacement;
|
1197
|
-
/**
|
1198
|
-
Basic Phark image replacement, defined here:
|
1199
|
-
http://www.mezzoblue.com/tests/revised-image-replacement/
|
1200
|
-
|
1201
|
-
Supports sprites with option image positioning parameters (which default to 0).
|
1202
|
-
These values will (generally) be negative.
|
1203
|
-
|
1204
|
-
width: width in pixels
|
1205
|
-
height: height in pixels
|
1206
|
-
img: url for the image, suitable for putting into a url() wrapper
|
1207
|
-
|
1208
|
-
*/
|
1209
|
-
function imageReplacement(width, height, img, imgXPosition, imgYPosition) {
|
1210
|
-
if (typeof width == 'undefined' || typeof height == 'undefined' || typeof img == 'undefined') {
|
1211
|
-
throw "imageReplacement() requires width, height and img";
|
1212
|
-
}
|
1213
|
-
return {
|
1214
|
-
display: 'block',
|
1215
|
-
width: width,
|
1216
|
-
height: height,
|
1217
|
-
backgroundImage: 'url(' + img + ')',
|
1218
|
-
backgroundRepeat: 'no-repeat',
|
1219
|
-
backgroundPosition: '' + (imgXPosition || 0) + 'px ' + (imgYPosition || 0) + 'px',
|
1220
|
-
textIndent: -20000,
|
1221
|
-
overflow: 'hidden'
|
1222
|
-
};
|
1223
|
-
}
|
1224
|
-
|
1225
|
-
/***/ },
|
1226
|
-
/* 27 */
|
1227
|
-
/***/ function(module, exports, __webpack_require__) {
|
1228
|
-
|
1229
|
-
'use strict';
|
1230
|
-
|
1231
|
-
Object.defineProperty(exports, "__esModule", {
|
1232
|
-
value: true
|
1233
|
-
});
|
1234
|
-
exports.colorizeString = exports.hslToHexColor = undefined;
|
1235
|
-
|
1236
|
-
var _array = __webpack_require__(6);
|
1237
|
-
|
1238
|
-
var HTML4_COLORS = {
|
1239
|
-
'black': '#000000',
|
1240
|
-
'silver': '#c0c0c0',
|
1241
|
-
'gray': '#808080',
|
1242
|
-
'white': '#ffffff',
|
1243
|
-
'maroon': '#800000',
|
1244
|
-
'red': '#ff0000',
|
1245
|
-
'purple': '#800080',
|
1246
|
-
'fuchsia': '#ff00ff',
|
1247
|
-
'green': '#008000',
|
1248
|
-
'lime': '#00ff00',
|
1249
|
-
'olive': '#808000',
|
1250
|
-
'yellow': '#ffff00',
|
1251
|
-
'navy': '#000080',
|
1252
|
-
'blue': '#0000ff',
|
1253
|
-
'teal': '#008080',
|
1254
|
-
'aqua': '#00ffff'
|
1255
|
-
};
|
1256
|
-
|
1257
|
-
/*
|
1258
|
-
Use a singleton cache of all color strings we see.
|
1259
|
-
Each key points to a structure, which can have hex, rgb, etc. values in it.
|
1260
|
-
*/
|
1261
|
-
var immutableCache = {};
|
1262
|
-
|
1263
|
-
// returns (or creates) the cached color structure
|
1264
|
-
var colorCache = function colorCache(c) {
|
1265
|
-
if (!immutableCache[c]) immutableCache[c] = {};
|
1266
|
-
return immutableCache[c];
|
1267
|
-
};
|
1268
|
-
|
1269
|
-
var toHexColor = function toHexColor() {
|
1270
|
-
if (this.substr(0, 1) == '#' && this.length == 7) {
|
1271
|
-
colorCache(this)['hex'] = '' + this;
|
1272
|
-
} else if (this.substr(0, 1) == '#' && this.length == 4) {
|
1273
|
-
colorCache(this)['hex'] = '#' + this.substr(1, 1) + this.substr(1, 1) + this.substr(2, 1) + this.substr(2, 1) + this.substr(3, 1) + this.substr(3, 1);
|
1274
|
-
} else {
|
1275
|
-
colorCache(this)['hex'] = HTML4_COLORS[this];
|
1276
|
-
}
|
1277
|
-
return colorCache(this)['hex'];
|
1278
|
-
};
|
1279
|
-
|
1280
|
-
var toRGB = function toRGB() {
|
1281
|
-
var cache = colorCache(this);
|
1282
|
-
if (cache.rgb) return cache.rgb;
|
1283
|
-
var h = this.toHexColor();
|
1284
|
-
cache.rgb = [parseInt(h.substr(1, 2), 16), parseInt(h.substr(3, 2), 16), parseInt(h.substr(5, 2), 16)];
|
1285
|
-
return cache.rgb;
|
1286
|
-
};
|
1287
|
-
|
1288
|
-
var red = function red() {
|
1289
|
-
return this.toRGB()[0];
|
1290
|
-
};
|
1291
|
-
var green = function green() {
|
1292
|
-
return this.toRGB()[1];
|
1293
|
-
};
|
1294
|
-
var blue = function blue() {
|
1295
|
-
return this.toRGB()[2];
|
1296
|
-
};
|
1297
|
-
var lighten = function lighten(percent) {
|
1298
|
-
var hsl = this.toHSL();
|
1299
|
-
var newHSL = [hsl[0], hsl[1], Math.min(100, hsl[2] + percent)];
|
1300
|
-
return hslToHexColor(newHSL);
|
1301
|
-
};
|
1302
|
-
|
1303
|
-
var darken = function darken(percent) {
|
1304
|
-
var hsl = this.toHSL();
|
1305
|
-
var newHSL = [hsl[0], hsl[1], Math.max(0, hsl[2] - percent)];
|
1306
|
-
return hslToHexColor(newHSL);
|
1307
|
-
};
|
1308
|
-
|
1309
|
-
/**
|
1310
|
-
* Increase or decrease the saturation of a color.
|
1311
|
-
* @param percent positive values increase saturation, negative values desaturate.
|
1312
|
-
*/
|
1313
|
-
var saturate = function saturate(percent) {
|
1314
|
-
var hsl = this.toHSL();
|
1315
|
-
var newHSL = [hsl[0], Math.min(100, Math.max(0, hsl[1] + percent)), hsl[2]];
|
1316
|
-
return hslToHexColor(newHSL);
|
1317
|
-
};
|
1318
|
-
|
1319
|
-
// [0..360, 0..100, 0.100]
|
1320
|
-
// Ref. http://www.easyrgb.com/index.php?X=MATH&H=18#text18
|
1321
|
-
var toHSL = function toHSL() {
|
1322
|
-
var rgb = this.toRGB();
|
1323
|
-
var r = this.red() / 255,
|
1324
|
-
g = this.green() / 255,
|
1325
|
-
b = this.blue() / 255;
|
1326
|
-
var max = Math.max(r, g, b),
|
1327
|
-
min = Math.min(r, g, b);
|
1328
|
-
var d = max - min; // Delta RGB value
|
1329
|
-
var h = undefined,
|
1330
|
-
s = undefined,
|
1331
|
-
l = (max + min) / 2;
|
1332
|
-
|
1333
|
-
if (d == 0) {
|
1334
|
-
// gray?, no chroma...
|
1335
|
-
h = 0; // HSl results from 0 to 1
|
1336
|
-
s = 0;
|
1337
|
-
} else {
|
1338
|
-
// Chromatic data...
|
1339
|
-
s = d / (l < 0.5 ? max + min : 2 - max - min);
|
1340
|
-
|
1341
|
-
var del_R = ((max - r) / 6 + d / 2) / d;
|
1342
|
-
var del_G = ((max - g) / 6 + d / 2) / d;
|
1343
|
-
var del_B = ((max - b) / 6 + d / 2) / d;
|
1344
|
-
|
1345
|
-
if (r == max) h = del_B - del_G;else if (g == max) h = 1 / 3 + del_R - del_B;else if (b == max) h = 2 / 3 + del_G - del_R;
|
1346
|
-
|
1347
|
-
if (h < 0) h += 1;
|
1348
|
-
if (h > 0) h -= 1;
|
1349
|
-
}
|
1350
|
-
|
1351
|
-
h = Math.round(h * 360);
|
1352
|
-
if (h < 0) h += 360;
|
1353
|
-
|
1354
|
-
var cache = colorCache(this);
|
1355
|
-
cache.hsl = [h, Math.round(s * 100), Math.round(l * 100)];
|
1356
|
-
return cache.hsl;
|
1357
|
-
};
|
1358
|
-
|
1359
|
-
var hslToHexColor = function hslToHexColor(h, s, l) {
|
1360
|
-
if ((0, _array.isArray)(h)) {
|
1361
|
-
l = h[2] || 0;
|
1362
|
-
s = h[1] || 0;
|
1363
|
-
h = h[0] || 0;
|
1364
|
-
}
|
1365
|
-
//HSL from 0 to 1
|
1366
|
-
s = s / 100.0;
|
1367
|
-
l = l / 100.0;
|
1368
|
-
h = (h + 360) % 360.0 / 360;
|
1369
|
-
|
1370
|
-
function hsl2rgb(h, s, l) {
|
1371
|
-
// HSL 0 to 1
|
1372
|
-
//RGB results from 0 to 255
|
1373
|
-
var r = undefined,
|
1374
|
-
g = undefined,
|
1375
|
-
b = undefined;
|
1376
|
-
|
1377
|
-
if (s == 0) {
|
1378
|
-
r = l * 255;
|
1379
|
-
g = l * 255;
|
1380
|
-
b = l * 255;
|
1381
|
-
} else {
|
1382
|
-
var var_2 = l < 0.5 ? l * (1 + s) : l + s - s * l;
|
1383
|
-
var var_1 = 2 * l - var_2;
|
1384
|
-
|
1385
|
-
r = 255 * h2rgb(var_1, var_2, h + 1 / 3);
|
1386
|
-
g = 255 * h2rgb(var_1, var_2, h);
|
1387
|
-
b = 255 * h2rgb(var_1, var_2, h - 1 / 3);
|
1388
|
-
}
|
1389
|
-
return [r, g, b];
|
1390
|
-
}
|
1391
|
-
|
1392
|
-
function h2rgb(v1, v2, vH) {
|
1393
|
-
if (vH < 0) vH += 1;
|
1394
|
-
if (vH > 1) vH -= 1;
|
1395
|
-
if (6 * vH < 1) return v1 + (v2 - v1) * 6 * vH;
|
1396
|
-
if (2 * vH < 1) return v2;
|
1397
|
-
if (3 * vH < 2) return v1 + (v2 - v1) * (2 / 3 - vH) * 6;
|
1398
|
-
return v1;
|
1399
|
-
}
|
1400
|
-
|
1401
|
-
function hex2(n) {
|
1402
|
-
var h = Math.round(n).toString(16);
|
1403
|
-
if (h.length == 1) h = '0' + h;
|
1404
|
-
return h.substr(0, 1) + h.substr(1, 1);
|
1405
|
-
}
|
1406
|
-
|
1407
|
-
var rgb = hsl2rgb(h, s, l);
|
1408
|
-
return "#" + hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
|
1409
|
-
};
|
1410
|
-
|
1411
|
-
var colorizeString = function colorizeString() {
|
1412
|
-
String.prototype.toHexColor = toHexColor;
|
1413
|
-
String.prototype.toRGB = toRGB;
|
1414
|
-
String.prototype.red = red;
|
1415
|
-
String.prototype.green = green;
|
1416
|
-
String.prototype.blue = blue;
|
1417
|
-
String.prototype.lighten = lighten;
|
1418
|
-
String.prototype.darken = darken;
|
1419
|
-
String.prototype.saturate = saturate;
|
1420
|
-
String.prototype.toHSL = toHSL;
|
1421
|
-
};
|
1422
|
-
|
1423
|
-
exports.hslToHexColor = hslToHexColor;
|
1424
|
-
exports.colorizeString = colorizeString;
|
1425
|
-
|
1426
|
-
/***/ },
|
1427
|
-
/* 28 */
|
1428
|
-
/***/ function(module, exports) {
|
1429
|
-
|
1430
|
-
if (typeof jQuery != 'undefined') {
|
1431
|
-
(function ($) {
|
1432
|
-
$.fn.csster = function (rules) {
|
1433
|
-
var newRules = {};
|
1434
|
-
newRules[this.selector] = rules;
|
1435
|
-
Csster.style(newRules);
|
1436
|
-
return this;
|
1437
|
-
}
|
1438
|
-
})(jQuery);
|
1439
|
-
}
|
1440
|
-
|
1441
|
-
/***/ }
|
1442
|
-
/******/ ]);
|
1
|
+
// Csster version 1.3.3; Copyright (c) Andrew J. Peterson / ndpsoftware.com. All Rights Reserved
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Csster=e():t.Csster=e()}(window,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(o,i,function(e){return t[e]}.bind(null,i));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));const o={};if("undefined"!=typeof navigator){const t=function(t){t=t.toLowerCase();const e=/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||!/compatible/.test(t)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}}(navigator.userAgent);t.browser&&(o[t.browser]=!0,o.version=t.version)}const i=()=>void 0!==t&&t.browserOverride?t.browserOverride:o}).call(this,r(4))},function(t,e,r){r(2),t.exports=r(3)},function(t,e){"undefined"!=typeof jQuery&&(jQuery.fn.csster=function(t){var e={};return e[this.selector]=t,Csster.style(e),this})},function(t,e,r){t.exports=r(5).Csster},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e),r.d(e,"Csster",(function(){return at}));var o={};r.r(o),r.d(o,"setConfig",(function(){return C})),r.d(o,"addNames",(function(){return M})),r.d(o,"error",(function(){return O}));var i={};function n(t){var e=t.length;return function r(){var o=Array.prototype.slice.call(arguments,0);return o.length>=e?t.apply(null,o):function(){var t=Array.prototype.slice.call(arguments,0);return r.apply(null,o.concat(t))}}}r.r(i),r.d(i,"roundedCorners",(function(){return L})),r.d(i,"boxShadow",(function(){return E})),r.d(i,"horizontalCentering",(function(){return G})),r.d(i,"verticalCentering",(function(){return X})),r.d(i,"linearGradient",(function(){return D})),r.d(i,"clearfix",(function(){return Y})),r.d(i,"imageReplacement",(function(){return Z}));const a=function(){var t=arguments;return function(){for(var e=arguments,r=t.length;r-- >0;)e=[t[r].apply(this,e)];return e[0]}},s=(t,...e)=>{for(let r=0;r<e.length;r++)for(let o in e[r])t[o]=e[r][o];return t},l=n((t,e)=>{if("object"!=typeof e)return e;let r={};for(let o in e)r[t(o)]=e[o];return r}),c=n((function(t,e){if("object"==typeof e)for(let r in e)"object"==typeof e[r]&&t(e[r],r);return e})),d=n((function(t,e){if("object"!=typeof e)return e;let r={};for(let o in e){let i=t(e[o],o);"object"==typeof i&&(i=d(t,i)),r[o]=i}return r})),u=n((function(t,e){let r=t(e);for(let e in r)"object"==typeof r[e]&&(r[e]=u(t,r[e]));return r})),b=t=>"object"==typeof t&&"[object Array]"===Object.prototype.toString.call(t),f=(t,e)=>{for(let r=0;r<t.length;)e(t[r],r++);return t},p=t=>((t,e,r)=>(f(t,(function(t,o){e=r(e,t,o)})),e))(t,[],(function(t,e){return b(e)?t.concat(p(e)):(t.push(e),t)}));const m=n((t,e)=>"string"==typeof e?t(e):e),g=m(t=>t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))),h=m((function(t){return(t||"").replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")}));let k={has:y,mixin:y,mixins:y};function w(t){return!!k[t]}function y(...t){const e={};return function(t,e){let r=[];if(b(e))for(let o=0;o<e.length;)r.push(t(e[o],o++));else r=t(e)}(t=>{"function"==typeof t&&(t=t()),s(e,t)},t),e}const x=u((function t(e){if("object"!=typeof e)return e;const r={};for(let o in e){const i=e[o];if(w(o)){const e=k[o].apply(null,b(i)?i:[i]);s(r,t(e))}else r[o]=i}return r}));function v(t,e){const r=e.split(",");for(let e=0;e<r.length;e++){let o=h(r[e]);o="&"==o.substr(0,1)?o.substr(1):" "+o,r[e]=t+o}return h(r.join(","))}function z(t,e){return!!t.match(/^\.\#\&/)||"object"==typeof e&&!w(t)}l(t=>{for(;t.match(/.*#.*#.*/);)t=t.replace(/^.*#.*#/,"#");return t});const j={},S={strictNames:!0,anyBrowserExtension:!0};function C(t,e){S[t]=e}function M(...t){const e=p([t]);for(let t of e)j[t]=!0}function O(t){if(/^\-\w+\-/.exec(t)){if(!S.anyBrowserExtension&&!j[t])return'Unrecognized "'+t+'" browser extension property name'}else if(S.strictNames&&!j[t])return'Unrecognized "'+t+'" property name';return null}M(["-webkit-line-clamp",":active","additive-symbols","::after (:after)","align-content","align-items","align-self","align-tracks","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","@annotation","annotation",":any-link","appearance","aspect-ratio","attr","::backdrop","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size",":blank","bleed","block-overflow","block-size","blur","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","@bottom-center","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","brightness","calc","caption-side","caret-color","ch","@character-variant","character-variant","@charset",":checked","circle","clamp","clear","clip","clip-path","cm","color","color-adjust","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","conic-gradient","contain","content","content-visibility","contrast","counter-increment","counter-reset","counter-set","@counter-style","counters","cross-fade","cubic-bezier","::cue","::cue-region",":current","cursor",":default",":defined","deg",":dir","direction",":disabled","display","<display-legacy>","dpcm","dpi","dppx","drop-shadow","E","element","ellipse","em",":empty","empty-cells",":enabled","env","ex","F","fallback","filter",":first",":first-child","::first-letter (:first-letter)","::first-line (:first-line)",":first-of-type","fit-content","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float",":focus",":focus-visible",":focus-within","font","font-display","@font-face","font-family","font-family","font-feature-settings","font-feature-settings","@font-feature-values","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-stretch","font-style","font-style","font-synthesis","font-variant","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-variation-settings","font-weight","font-weight","forced-color-adjust","format","fr",":fullscreen",":future","G","gap","grad","::grammar-error","grayscale","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","Hz","hanging-punctuation",":has","height","height","@historical-forms",":host",":host-context",":hover","hsl","hsla","hue-rotate","hyphens","image","image-orientation","image-rendering","image-resolution","image-set","@import","in",":in-range",":indeterminate","inherit","inherits","initial","initial-letter","initial-letter-align","initial-value","inline-size","inset","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start",":invalid","invert",":is","isolation","justify-content","justify-items","justify-self","justify-tracks","kHz","@keyframes",":lang",":last-child",":last-of-type","leader",":left","left","@left-bottom","letter-spacing","line-break","line-clamp","line-height","line-height-step","linear-gradient",":link","list-style","list-style-image","list-style-position","list-style-type","local",":local-link","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","::marker","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-style","matrix","matrix3d","max","max-block-size","max-height","max-height","max-inline-size","max-lines","max-width","max-width","max-zoom","@media","min","min-block-size","min-height","min-height","min-inline-size","min-width","min-width","min-zoom","minmax","mix-blend-mode","mm","ms","@namespace","negative",":not",":nth-child",":nth-col",":nth-last-child",":nth-last-col",":nth-last-of-type",":nth-of-type","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate",":only-child",":only-of-type","opacity","opacity",":optional","order","orientation","@ornaments","ornaments","orphans",":out-of-range","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-inline","overflow-wrap","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","Pseudo-classes","Pseudo-elements","pad","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","@page","page-break-after","page-break-before","page-break-inside","paint","paint-order","::part",":past","path",":paused","pc","perspective","perspective","perspective-origin",":picture-in-picture","place-content","place-items","place-self","::placeholder",":placeholder-shown",":playing","pointer-events","polygon","position","prefix","@property","pt","px","quotes","rad","radial-gradient","range",":read-only",":read-write","rect","rem","repeat","repeating-linear-gradient","repeating-radial-gradient",":required","resize","revert","rgb","rgba",":right","right","@right-bottom",":root","rotate","rotate","rotate3d","rotateX","rotateY","rotateZ","row-gap","ruby-align","ruby-merge","ruby-position","saturate","scale","scale","scale3d","scaleX","scaleY","scaleZ",":scope","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","::selection","selector","sepia","shape-image-threshold","shape-margin","shape-outside","size","skew","skewX","skewY","::slotted","speak-as","::spelling-error","src","steps","@styleset","styleset","@stylistic","stylistic","suffix","@supports","@swash","swash","symbols","symbols","syntax","system","tab-size","table-layout",":target","target-counter","target-counters","target-text",":target-within","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","top","@top-center","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","translate","translate3d","translateX","translateY","translateZ","turn","unicode-bidi","unicode-range","unset","url",":user-invalid","user-select","user-zoom",":valid","var","vertical-align","vh","@viewport","viewport-fit","visibility",":visited","vmax","vmin","vw",":where","white-space","widows","width","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","zoom"]),M(["-moz-binding","-moz-border-radius","-moz-border-radius-topleft","-moz-border-radius-topright","-moz-border-radius-bottomright","-moz-border-radius-bottomleft","-moz-border-top-colors","-moz-border-right-colors","-moz-border-bottom-colors","-moz-border-left-colors","-moz-box-shadow","-moz-opacity","-moz-outline","-moz-outline-color","-moz-outline-style","-moz-outline-width","-moz-user-focus","-moz-user-input","-moz-user-modify","-moz-user-select"]),M(["-webkit-animation","-webkit-animation-delay","-webkit-animation-direction","-webkit-animation-duration","-webkit-animation-iteration-count","-webkit-animation-name","-webkit-animation-play-state","-webkit-animation-timing-function","-webkit-appearance","-webkit-backface-visibility","-webkit-background-clip","-webkit-background-composite","-webkit-background-origin","-webkit-background-size","-webkit-border-bottom-left-radius","-webkit-border-bottom-right-radius","-webkit-border-horizontal-spacing","-webkit-border-image","-webkit-border-radius","-webkit-border-top-left-radius","-webkit-border-top-right-radius","-webkit-border-vertical-spacing","-webkit-box-align","-webkit-box-direction","-webkit-box-flex","-webkit-box-flex-group","-webkit-box-lines","-webkit-box-ordinal-group","-webkit-box-orient","-webkit-box-pack","-webkit-box-reflect","-webkit-box-shadow","-webkit-box-sizing","-webkit-column-break-after","-webkit-column-break-before","-webkit-column-break-inside","-webkit-column-count","-webkit-column-gap","-webkit-column-rule","-webkit-column-rule-color","-webkit-column-rule-style","-webkit-column-rule-width","-webkit-column-width","-webkit-columns","-webkit-dashboard-region","-webkit-line-break","-webkit-margin-bottom-collapse","-webkit-margin-collapse","-webkit-margin-start","-webkit-margin-top-collapse","-webkit-marquee","-webkit-marquee-direction","-webkit-marquee-increment","-webkit-marquee-repetition","-webkit-marquee-speed","-webkit-marquee-style","-webkit-mask","-webkit-mask-attachment","-webkit-mask-box-image","-webkit-mask-clip","-webkit-mask-composite","-webkit-mask-image","-webkit-mask-origin","-webkit-mask-position","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-mask-repeat","-webkit-mask-size","-webkit-nbsp-mode","-webkit-padding-start","-webkit-perspective","-webkit-perspective-origin","-webkit-rtl-ordering","-webkit-tap-highlight-color","-webkit-text-fill-color","-webkit-text-security","-webkit-text-size-adjust","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-touch-callout","-webkit-transform","-webkit-transform-origin","-webkit-transform-origin-x","-webkit-transform-origin-y","-webkit-transform-origin-z","-webkit-transform-style","-webkit-transition","-webkit-transition-delay","-webkit-transition-duration","-webkit-transition-property","-webkit-transition-timing-function","-webkit-user-drag","-webkit-user-modify","-webkit-user-select"]);const q=l(g),H=c((t,e)=>{for(let r in t){let t=O(r);if(t)throw t+'. Context: "'+e+'"'}}),T=a(H,d(q),t=>{const e={};return function t(r,o){for(var i in r){const l=r[i];if(z(i,l)){t(l,v(o,i))}else a=i,s=l,n=h(n=o),e[n]=e[n]||{},e[n][a]&&console.log("Replacing property ",a," in ",n,"; ",e[n][a]," => ",s),e[n][a]=s}var n,a,s}(t,""),e},x);const A=function(t){const e=g(t);return O(e)?null:e},N=["z-index","opacity","zoom"],P=(t,e)=>(t=>A(t))(t)+": "+((t,e)=>t+(t&&"number"==typeof t&&-1==N.indexOf(e)?"px":""))(e,t)+";\r",R=t=>{return t.sel+" { "+(e=t.props,Object.keys(e).reduce((t,r)=>t+P(r,e[r]),"")+" }\n");var e};const B=a((function(t){return t.reduce((t,e)=>t+R(e),"")}),(function(t){const e=p([t]),r=[];return f(e,t=>r.push(function(t){const e=[];for(let r in t)e.push({sel:r,props:t[r]});return e}(T(t)))),p(r)}));var I=function(t){const e=document.createElement("STYLE"),r=document.createAttribute("type");r.nodeValue="text/css",e.setAttributeNode(r);document.getElementsByTagName("HEAD")[0].appendChild(e);try{e.appendChild(document.createTextNode(t))}catch(e){const r=document.styleSheets[document.styleSheets.length-1];r.cssText=""+r.cssText+t}};function L(t,e){if(e||(e=t||10,t="all"),"all"==t)return{"-moz-border-radius":e,"border-radius":e,"-webkit-border-radius":e};var r={};return"tl"!=t&&"top"!=t&&"left"!=t||(r["-moz-border-radius-topleft"]=e,r["-webkit-border-top-left-radius"]=e,r["border-top-left-radius"]=e),"tr"!=t&&"top"!=t&&"right"!=t||(r["-webkit-border-top-right-radius"]=e,r["-moz-border-radius-topright"]=e,r["border-top-right-radius"]=e),"bl"!=t&&"bottom"!=t&&"left"!=t||(r["-webkit-border-bottom-left-radius"]=e,r["-moz-border-radius-bottomleft"]=e,r["border-bottom-left-radius"]=e),"br"!=t&&"bottom"!=t&&"right"!=t||(r["-webkit-border-bottom-right-radius"]=e,r["-moz-border-radius-bottomright"]=e,r["border-bottom-right-radius"]=e),r}function E(t,e,r){var o,i,n,a;if(void 0===t.length)throw"Not yet supported";if(2!=t.length)throw"boxShadow requires a direction (degree) or [xOffset, yOffset] in px measurements.";return{"-moz-box-shadow":(o=t[0])+"px "+(i=t[1])+"px "+e+"px "+r,"-webkit-box-shadow":o+"px "+i+"px "+e+"px "+r,boxShadow:o+"px "+i+"px "+e+"px "+r,"-ms-filter":"progid:DXImageTransform.Microsoft.Shadow(Strength="+(n=4)+", Direction="+(a=135)+", Color='"+r+"')",filter:"progid:DXImageTransform.Microsoft.Shadow(Strength="+n+", Direction="+a+", Color='"+r+"')"}}function G(t){return{width:t,position:"absolute",left:"50%",marginLeft:-t/2}}function X(t){return{height:t,position:"absolute",top:"50%",marginTop:-t/2}}var _=r(0);function D(t,e,r,o){let i="",n="";Object(_.a)().webkit?i="-webkit":Object(_.a)().mozilla&&(i="-moz");const a=[];for(var s=0;s<arguments.length;s++){var l=arguments[s];if("string"==typeof l)a.push(l);else if(b(l))for(var c=0;c<l.length;c++)a.push(l[c]);else for(var d in arguments[s])a.push(l[d]+(0!=d&&"100"!=d?" "+d+"%":""))}for(n=i+"-linear-gradient(",s=0;s<a.length;s++)0!==s&&(n+=", "),n+=a[s];return n+=")",n}function Y(){var t={display:"inline-block","&:after":{content:" ",display:"block",width:0,height:0,lineHeight:0,fontSize:0,clear:"both",visibility:"hidden"}};return Object(_.a)().msie&&(t.zoom="1"),t}function Z(t,e,r,o,i){if(void 0===t||void 0===e||void 0===r)throw"imageReplacement() requires width, height and img";return{display:"block",width:t,height:e,backgroundImage:"url("+r+")",backgroundRepeat:"no-repeat",backgroundPosition:(o||0)+"px "+(i||0)+"px",textIndent:-2e4,overflow:"hidden"}}const F={black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff"},Q={},U=function(t){return Q[t]||(Q[t]={}),Q[t]},V=function(){return"#"==this.substr(0,1)&&7==this.length?U(this).hex=""+this:"#"==this.substr(0,1)&&4==this.length?U(this).hex="#"+this.substr(1,1)+this.substr(1,1)+this.substr(2,1)+this.substr(2,1)+this.substr(3,1)+this.substr(3,1):U(this).hex=F[this],U(this).hex},$=function(){const t=U(this);if(t.rgb)return t.rgb;const e=this.toHexColor();return t.rgb=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)],t.rgb},J=function(){return this.toRGB()[0]},K=function(){return this.toRGB()[1]},W=function(){return this.toRGB()[2]},tt=function(t){const e=this.toHSL(),r=[e[0],e[1],Math.min(100,e[2]+t)];return it(r)},et=function(t){const e=this.toHSL(),r=[e[0],e[1],Math.max(0,e[2]-t)];return it(r)},rt=function(t){const e=this.toHSL(),r=[e[0],Math.min(100,Math.max(0,e[1]+t)),e[2]];return it(r)},ot=function(){this.toRGB();const t=this.red()/255,e=this.green()/255,r=this.blue()/255,o=Math.max(t,e,r),i=Math.min(t,e,r),n=o-i;let a,s,l=(o+i)/2;if(0==n)a=0,s=0;else{s=n/(l<.5?o+i:2-o-i);const c=((o-t)/6+n/2)/n,d=((o-e)/6+n/2)/n,u=((o-r)/6+n/2)/n;t==o?a=u-d:e==o?a=1/3+c-u:r==o&&(a=2/3+d-c),a<0&&(a+=1),a>0&&(a-=1)}a=Math.round(360*a),a<0&&(a+=360);const c=U(this);return c.hsl=[a,Math.round(100*s),Math.round(100*l)],c.hsl},it=function(t,e,r){function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function i(t){let e=Math.round(t).toString(16);return 1==e.length&&(e="0"+e),e.substr(0,1)+e.substr(1,1)}b(t)&&(r=t[2]||0,e=t[1]||0,t=t[0]||0);const n=function(t,e,r){let i,n,a;if(0==e)i=255*r,n=255*r,a=255*r;else{const s=r<.5?r*(1+e):r+e-e*r,l=2*r-s;i=255*o(l,s,t+1/3),n=255*o(l,s,t),a=255*o(l,s,t-1/3)}return[i,n,a]}(t=(t+360)%360/360,e/=100,r/=100);return"#"+i(n[0])+i(n[1])+i(n[2])},nt=M,at={buildCss:B,insertCss:I,style:a(I,B),macros:i,setMacro:function(t,e){k[t]=e},arrayFlatten:p,browserInfo:_.a,hslToHexColor:it,addPropertyNames:nt,propertyNameValidator:o,colorizeString:()=>{String.prototype.toHexColor=V,String.prototype.toRGB=$,String.prototype.red=J,String.prototype.green=K,String.prototype.blue=W,String.prototype.lighten=tt,String.prototype.darken=et,String.prototype.saturate=rt,String.prototype.toHSL=ot}}}])}));
|