ratchet_design 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ratchet/base/_form.scss +28 -9
- data/app/assets/stylesheets/ratchet/base/_label-placeholder.scss +2 -1
- data/app/assets/stylesheets/ratchet/base/_validation.scss +25 -29
- data/lib/ratchet_design/version.rb +1 -1
- data/public/{core-0.1.15.js → core-0.1.16.js} +44 -44
- data/public/core-0.1.16.js.gz +0 -0
- data/public/core-0.1.16.map.json +1 -0
- data/public/{fonts-woff-0.1.15.css → fonts-woff-0.1.16.css} +0 -0
- data/public/{fonts-woff-0.1.15.css.gz → fonts-woff-0.1.16.css.gz} +0 -0
- data/public/{fonts-woff2-0.1.15.css → fonts-woff2-0.1.16.css} +0 -0
- data/public/{fonts-woff2-0.1.15.css.gz → fonts-woff2-0.1.16.css.gz} +0 -0
- metadata +9 -9
- data/public/core-0.1.15.js.gz +0 -0
- data/public/core-0.1.15.map.json +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d45c37c75eb790fa86dc44e2d8b71fc019128c4
|
4
|
+
data.tar.gz: 057f0d38e1659f967bfa9762a8593239207a0590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d9ebd24e866a00478e59b560e5f682e1f5b82239a03fbe48e2c90df58fc092d25808bc032aae17de9c67acaca76135e93bdb33d483d3065f10d65e3847ad804
|
7
|
+
data.tar.gz: 5d869dfbed1bdf15d173eab95b90e349a35468c6eca70482f834e664f88b54bbef76873a4c137e26de095de99bd72c5cb6c34ee76fa2c9d1173912d972e32d71
|
@@ -21,13 +21,16 @@ $background-shadow: 0 0 0 1000px $white inset;
|
|
21
21
|
@function input-shadow($color: $alabaster, $size: 1px) {
|
22
22
|
@return 0 0 0 $size $color inset, $empty-shadow, $background-shadow;
|
23
23
|
}
|
24
|
-
|
25
24
|
@function input-focus-shadow($color: $steel) {
|
26
25
|
@return 0 0 0 1px $color inset, $input-weight-shadow, $background-shadow;
|
27
26
|
}
|
28
27
|
|
29
|
-
|
30
|
-
$
|
28
|
+
@function select-shadow($color: $alabaster, $size: 1px) {
|
29
|
+
@return 0 0 0 $size $color inset, $empty-shadow;
|
30
|
+
}
|
31
|
+
@function select-focus-shadow($color: $steel) {
|
32
|
+
@return 0 0 0 1px $color inset, $input-weight-shadow;
|
33
|
+
}
|
31
34
|
|
32
35
|
*, *:before, *:after {
|
33
36
|
transition-duration: .25s;
|
@@ -109,11 +112,6 @@ fieldset h2, legend.header {
|
|
109
112
|
border-radius: $radius;
|
110
113
|
transition-property: box-shadow, color;
|
111
114
|
appearance: none;
|
112
|
-
box-shadow: $input-shadow;
|
113
|
-
|
114
|
-
&:-webkit-autofill {
|
115
|
-
box-shadow: $input-shadow;
|
116
|
-
}
|
117
115
|
|
118
116
|
&:disabled:not([type="submit"]) {
|
119
117
|
color: $isabella;
|
@@ -135,12 +133,33 @@ input, select, textarea {
|
|
135
133
|
|
136
134
|
#{$text-inputs}, select, textarea {
|
137
135
|
@include input-base;
|
136
|
+
}
|
137
|
+
|
138
|
+
#{$text-inputs}, textarea {
|
139
|
+
box-shadow: input-shadow();
|
140
|
+
|
141
|
+
&:-webkit-autofill {
|
142
|
+
box-shadow: input-shadow();
|
143
|
+
}
|
138
144
|
|
139
145
|
@include input-active {
|
140
|
-
box-shadow:
|
146
|
+
box-shadow: input-focus-shadow();
|
141
147
|
}
|
142
148
|
}
|
143
149
|
|
150
|
+
select {
|
151
|
+
box-shadow: select-shadow();
|
152
|
+
|
153
|
+
&:-webkit-autofill {
|
154
|
+
box-shadow: select-shadow();
|
155
|
+
}
|
156
|
+
|
157
|
+
@include input-active {
|
158
|
+
box-shadow: select-focus-shadow();
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
|
144
163
|
textarea {
|
145
164
|
line-height: vr(1.5);
|
146
165
|
}
|
@@ -49,7 +49,8 @@
|
|
49
49
|
|
50
50
|
// Move labels out of the way on focus and empty
|
51
51
|
&:focus + .placeholder-label-text,
|
52
|
-
&:not(.empty) + .placeholder-label-text,
|
52
|
+
&:not(.empty) + .placeholder-label-text,
|
53
|
+
&:-webkit-autofill + .placeholder-label-text {
|
53
54
|
z-index: 2;
|
54
55
|
transform: translate3d($distance-x, $distance-y, 0) scale($scale);
|
55
56
|
color: darken($steel, 10);
|
@@ -1,46 +1,42 @@
|
|
1
1
|
// Apply validation styles to inputs & textareas
|
2
2
|
|
3
|
-
|
4
|
-
color:
|
3
|
+
@mixin validation-style( $shadow, $focus-shadow, $focus: true) {
|
4
|
+
color: currentColor;
|
5
|
+
-webkit-text-fill-color: currentColor;
|
6
|
+
box-shadow: $shadow;
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
&:-webkit-autofill {
|
9
|
+
box-shadow: $shadow;
|
10
|
+
}
|
11
|
+
|
12
|
+
@include input-active {
|
13
|
+
box-shadow: $focus-shadow;
|
10
14
|
|
11
15
|
&:-webkit-autofill {
|
12
|
-
box-shadow:
|
16
|
+
box-shadow: $focus-shadow;
|
13
17
|
}
|
18
|
+
}
|
19
|
+
}
|
14
20
|
|
15
|
-
|
16
|
-
|
21
|
+
label.valid {
|
22
|
+
color: $apple;
|
17
23
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
input, textarea {
|
25
|
+
@include validation-style( input-shadow( $apple ), input-focus-shadow( $apple ) )
|
26
|
+
}
|
27
|
+
select {
|
28
|
+
@include validation-style( select-shadow( $apple ), select-focus-shadow( $apple ), false )
|
22
29
|
}
|
23
30
|
}
|
24
31
|
|
25
32
|
label.invalid {
|
26
33
|
color: $rusty;
|
27
34
|
|
28
|
-
input,
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
&:-webkit-autofill {
|
34
|
-
box-shadow: input-shadow( $rusty );
|
35
|
-
}
|
36
|
-
|
37
|
-
@include input-active {
|
38
|
-
box-shadow: input-focus-shadow( $rusty );
|
39
|
-
|
40
|
-
&:-webkit-autofill {
|
41
|
-
box-shadow: input-focus-shadow( $rusty );
|
42
|
-
}
|
43
|
-
}
|
35
|
+
input, textarea {
|
36
|
+
@include validation-style( input-shadow( $rusty ), input-focus-shadow( $rusty ) )
|
37
|
+
}
|
38
|
+
select {
|
39
|
+
@include validation-style( select-shadow( $rusty ), select-focus-shadow( $rusty ), false )
|
44
40
|
}
|
45
41
|
}
|
46
42
|
|
@@ -2,21 +2,21 @@
|
|
2
2
|
"use strict";var esvg={embed:function(){document.querySelector("#esvg-symbols")||document.querySelector("body").insertAdjacentHTML("afterbegin",'<svg id="esvg-symbols" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><symbol id="icon-facebook" viewBox="0 0 38 38" width="38" height="38"><path d="M21.4 12.8h2.1V9.4h-2.7c-2.9 0-4.2 1.3-4.2 3.7v2.6h-2V19h2v9.6h3.9v-9.7h2.7l.3-3.2h-3v-1.8c0-.8.2-1.1.9-1.1z"/></symbol><symbol id="icon-github" viewBox="0 0 38 38" width="38" height="38"><path d="M23 35.9v-4.5c0-1.6-.5-2.5-1.1-3 3.6-.4 7.5-1.8 7.5-8.1 0-1.8-.6-3.3-1.7-4.4.2-.4.7-2.1-.2-4.3 0 0-1.4-.4-4.5 1.6-1.3-.3-2.7-.5-4.2-.5-1.4 0-2.8.2-4.2.5-3.1-2.1-4.5-1.6-4.5-1.6-.9 2.3-.3 3.9-.2 4.3-1 1.1-1.7 2.6-1.7 4.4 0 6.3 3.8 7.7 7.4 8.1-.4.4-.9 1.1-1 2.2-1 .4-3.3 1.1-4.8-1.4 0 0-.9-1.6-2.5-1.7 0 0-1.6 0-.1 1 0 0 1 .5 1.8 2.4 0 0 1 2.9 5.5 1.9v3c0 .4-.3 1-1 .8 1.6.5 3.4.9 5.2.9 1.8 0 3.5-.3 5.2-.9-.6.3-.9-.2-.9-.7z"/></symbol><symbol id="icon-google-plus" viewBox="0 0 38 38" width="38" height="38"><path d="M10.6 24c0 2 2.3 3.2 5.1 3.2 3.9 0 5.4-2.1 5.4-3.7 0-1.4-.5-2.3-2-3.4-1.6-1.1-1.9-1.8-.5-2.9.8-.6 1.4-1.5 1.4-2.6 0-1.2-.5-2.2-1.4-2.7h1.3l1.1-1.1h-4.8c-3 0-4.5 1.8-4.5 3.8s1.4 3.6 4.1 3.6c-.4.9-.3 1.6.4 2.2-4.6 0-5.6 2-5.6 3.6zm3-9.5c-.3-1.7.6-3 1.9-3s2.4 1.4 2.6 3.1c.2 1.7-.5 2.8-1.7 2.8-1.3 0-2.6-1.2-2.8-2.9zm2.4 6.3c2.2.1 3.4 1.4 3.4 2.8 0 1.5-1.2 2.6-3.7 2.6-1.9 0-3.3-1.2-3.3-2.7 0-1.4 1.6-2.7 3.6-2.7zM25.2 10.9h-1.1v2.2h-2.2v1.1h2.2v2.2h1.1v-2.2h2.2v-1.1h-2.2"/></symbol><symbol id="icon-ibm" viewBox="0 0 75 30" width="75" height="30"><path d="M0 0v2h14.6V0H0zm16.7 0v2h20.8s-2.1-2-4.9-2H16.7zm24.8 0v2h12.6l-.8-2H41.5zm21.7 0l-.8 2h12.5V0H63.2zM0 4v2h14.6V4H0zm16.7 0v2h23.2s-.3-1.6-.8-2H16.7zm24.8 0v2h14l-.7-2H41.5zm20.2 0L61 6h13.9V4H61.7zM4.2 8v2.1h6.3V8H4.2zm16.7 0v2.1h6.3V8h-6.3zm12.4 0v2.1h6.3S40 9 40 8h-6.7zm12.5 0v2.1H57L56.2 8H45.8zm14.5 0l-.8 2.1h11.3V8H60.3zM4.2 12v2h6.3v-2H4.2zm16.7 0v2H37s1.4-1.1 1.8-2H20.9zm24.9 0v2h6.3v-1.1l.4 1.1H64l.4-1.1V14h6.3v-2H58.9l-.6 1.7-.6-1.7H45.8zM4.2 16v2h6.3v-2H4.2zm16.7 0v2h17.9c-.4-1-1.8-2-1.8-2H20.9zm24.9 0v2h6.3v-2h-6.3zm7.4 0l.8 2h8.7l.7-2H53.2zm11.3 0v2h6.3v-2h-6.3zM4.2 20v2h6.3v-2H4.2zm16.7 0v2h6.3v-2h-6.3zm12.4 0v2H40c0-1-.4-2-.4-2h-6.3zm12.5 0v2h6.3v-2h-6.3zm8.9 0l.8 2h5.8l.8-2h-7.4zm9.8 0v2h6.3v-2h-6.3zM.1 23.9V26h14.6v-2.1H.1zm16.6 0V26h22.5c.5-.5.8-2.1.8-2.1H16.7zm25 0V26h10.4v-2.1H41.7zm14.4 0l.8 2.1h2.9l.7-2.1h-4.4zm8.4 0V26H75v-2.1H64.5zM.1 28v2h14.6v-2H.1zm16.6 0v2h15.9c2.8 0 4.9-2 4.9-2H16.7zm25 0v2h10.4v-2H41.7zm15.8 0l.7 2h.1l.8-2h-1.6zm7 0v2H75v-2H64.5z"/></symbol><symbol id="icon-inbox" viewBox="0 0 76 54" width="76" height="54"><path d="M74 7S38.66 31 38 31C37.34 31 2 7 2 7V2.63h72V7zm0 6.24v38.33H2V13.24s34.59 22.9 36 22.9c1.41 0 36-22.9 36-22.9z"/></symbol><symbol id="icon-linkedin" viewBox="0 0 38 38" width="38" height="38"><path d="M11.6 15.5H15v10.8h-3.4z"/><ellipse cx="13.3" cy="12.1" rx="2" ry="2"/><path d="M27.5 26.4v-6.9c0-2.9-1.6-4.3-3.9-4.3S20.3 17 20.3 17v-1.5h-3.2v10.8h3.2v-5.7c0-1.5.7-2.4 2-2.4 1.2 0 1.8.9 1.8 2.4v5.7h3.4z"/></symbol><symbol id="icon-ratchet" viewBox="0 0 600 120" width="600" height="120"><path d="M502.1 2.5H397v39h-20v-39h-37v101.8l-16.8-30.2c-4.5 7.4-12.6 12.4-21.9 12.4-14.2 0-25.7-11.5-25.7-25.7s11.5-25.7 25.7-25.7c8.2 0 15.5 3.8 20.2 9.8l.6-1 18-31.7c-3.1-2.2-6.7-4.2-11-6-3.7-1.6-8-3-13.1-4.3C311 .6 305.2 0 298.7 0c-8.2 0-16 1.4-23.3 4.2C268 7 261.6 11 256.2 16.3c-4.3 4.2-8 9-10.9 14.5 2.2-5.5 5.8-12.5 11.5-18.1 3.8-3.8 8.2-7.2 12.9-9.2H113.5L82.8 83.6l13.7 32.9h9.6l2.9-8h36.4l2.9 8H222v-77h19.5c-2.1 6.3-3.2 13.1-3.2 20.5 0 8.9 1.5 17.1 4.6 24.4 3.1 7.4 7.4 13.7 12.9 18.9 5.5 5.3 12 9.3 19.5 12.3 7.5 2.9 15.8 4.4 24.7 4.4 6.6 0 12.5-.7 17.7-2.1 5.1-1.4 9.3-2.9 13-4.5 3.6-1.7 7.3-3.5 9.3-5.6v9.6h37v-43h20v43h32l5.8-107.9.6 107.9H503v-37h-32v-7h19v-28h-19v-6h31V3.2l6.3 36.3H532v78h38v-78h23.7l6.3-37h-97.9zm-379 71l4.2-10.9 4.2 10.9h-8.4zm19.3-66.4l18.4 32.4H184v76.1L142.4 7.1zM92 43.5c0-22.9-18.5-41-41.4-41H0v114h37V87.6l16.7 28.9h42.9L74.2 77.1C84.9 69.7 92 57.6 92 43.5zm-50.1 13H37v-21h4.9c5.4 0 9.7 4.7 9.8 10.5-.1 5.1-4.5 10.5-9.8 10.5zm251.9 17.2l-7.6-13.2 7.6-13.1h15l7.5 13.1-7.5 13.2h-15z"/></symbol><symbol id="icon-search" viewBox="0 0 38 38" width="38" height="38"><path d="M26.7 25.1L23 21.3c.7-1.1 1.2-2.4 1.2-3.8-.1-3.6-3-6.5-6.7-6.5-3.6 0-6.6 2.9-6.6 6.6s3 6.6 6.6 6.6c1.4 0 2.7-.5 3.8-1.2l3.7 3.7c.2.2.5.3.9.3.3 0 .6-.1.9-.3.3-.4.3-1.2-.1-1.6m-9.1-2.6c-2.7 0-4.9-2.2-4.9-4.9s2.2-4.9 4.9-4.9 4.9 2.2 4.9 4.9-2.2 4.9-4.9 4.9"/></symbol><symbol id="icon-subscribe" viewBox="0 0 38 38" width="38" height="38"><path d="M21.6 26.9c0-5.8-4.7-10.5-10.5-10.5v3.2c4 0 7.3 3.3 7.3 7.3h3.2zm-6.2-2.2c0-1.2-1-2.2-2.2-2.2-1.2 0-2.2 1-2.2 2.2s1 2.2 2.2 2.2c1.2 0 2.2-.9 2.2-2.2zM27 27c0-8.8-7.1-16-15.9-16v3.2c3.4 0 6.6 1.3 9 3.7s3.7 5.6 3.7 9l3.2.1z"/></symbol><symbol id="icon-twitter" viewBox="0 0 38 38" width="38" height="38"><path d="M27 12.4c-.7.4-1.4.6-2.2.8-.6-.7-1.5-1.1-2.5-1.1-2.3 0-3.9 2.1-3.4 4.3-2.9-.1-5.5-1.5-7.2-3.6-.9 1.5-.4 3.6 1.1 4.6-.6 0-1.1-.1-1.6-.4 0 1.7 1.1 3.2 2.8 3.5-.5.2-1.1.2-1.6.1.4 1.4 1.7 2.4 3.2 2.4-1.5 1.1-3.4 1.6-5.2 1.4 1.5 1 3.3 1.6 5.3 1.6 6.5 0 10.1-5.4 9.9-10.3.7-.5 1.3-1.1 1.9-1.9-.6.2-1.3.4-2 .5.7-.4 1.3-1.2 1.5-1.9z"/></symbol><symbol id="icon-y-combinator" viewBox="0 0 38 38" width="38" height="38"><path d="M22.4 10.9h3.8l-5.3 10v6h-3.3v-6l-5.5-10H16l3.3 7 3.1-7z"/></symbol></svg>')},icon:function(h,i){var e=this.iconName(h),t=document.querySelector("#"+e);if(t)return'<svg class="svg-icon '+e+" "+(i||"")+'" '+this.dimensions(t)+'><use xlink:href="#'+e+'"/></svg>';console.error('File not found: "'+h+'.svg" at app/assets/svgs/ratchet/')},iconName:function(h){return"icon-"+this.dasherize(h)},dimensions:function(h){return'viewBox="'+h.getAttribute("viewBox")+'" width="'+h.getAttribute("width")+'" height="'+h.getAttribute("height")+'"'},dasherize:function(h){return h.replace(/[W,_]/g,"-").replace(/-{2,}/g,"-")},load:function(){"interactive"==document.readyState&&this.embed(),document.addEventListener("page:change",function(h){this.embed()}.bind(this)),document.addEventListener("DOMContentLoaded",function(h){this.embed()}.bind(this))},aliases:{},alias:function(h){var i=this.aliases[h];return void 0!==i?i:h}};esvg.load(),"undefined"!=typeof module&&(module.exports=esvg);
|
3
3
|
},{}],2:[function(require,module,exports){
|
4
4
|
"use strict";var toolbox=require("compose-toolbox"),form=function(e,t){function r(e){(e.which<48||e.which>57)&&e.preventDefault()}function n(e){var t=a.value,r=a.max,n=(a.min,t/r*100),o=e.target?e.target:e;if("range"!==o.type)return!1;var n=o.max?o.value/o.max*100:o.value/100*100;o.style.backgroundImage="linear-gradient(90deg, #c3d4e4 "+n+"%, #ffffff "+n+"%)"}var o={};if(!document.querySelector(e)&&!document.querySelector("form"))return!1;var a=(toolbox.merge(o,t),document.querySelectorAll("input[type=range]")),l=document.querySelectorAll("input[type=checkbox], input[type=radio]"),i=document.body;toolbox.event.on(i,"keypress","input[type=number]",r),toolbox.event.on(i,"input","[type=range]",n);for(var c=0;c<a.length;c++)n(a[c]);for(var u=0;u<l.length;u++)!function(e){var t=e.parentNode;"LABEL"===t.tagName?t.classList.add("tick-label"):(e.insertAdjacentHTML("beforebegin",'<label class="tick-label"></label>'),e.previousSibling.insertAdjacentElement("afterbegin",e)),e.insertAdjacentHTML("afterend",'<span class="tick-label"></span>')}(l[u])};module.exports=form;
|
5
|
-
},{"compose-toolbox":
|
5
|
+
},{"compose-toolbox":50}],3:[function(require,module,exports){
|
6
6
|
"use strict";var toolbox=require("compose-toolbox"),mobileMenu=function(o){var e={initWidth:"700px",openClass:"menu-open",nav:".main-nav",button:".mobile-menu-button"},n=toolbox.merge(e,o),t=n.button+", "+n.openClass+" "+n.nav+" a",l=document.body;toolbox.event.on(document,"click",t,function(){l.classList.toggle(n.openClass)})};module.exports=mobileMenu;
|
7
|
-
},{"compose-toolbox":
|
7
|
+
},{"compose-toolbox":50}],4:[function(require,module,exports){
|
8
8
|
"use strict";function syncValue(e){e=e.target||e,e.classList.toggle("empty",!e.value.trim().length)}var toolbox=require("compose-toolbox"),Event=toolbox.event,textSelectors="textarea, input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=hidden]):not([type=submit]):not([type=image]):not([type=reset])";Event.change(function(){toolbox.each(document.querySelectorAll(textSelectors),syncValue)}),Event.on(document,"keyup",textSelectors,Event.debounce(syncValue,100));
|
9
|
-
},{"compose-toolbox":
|
9
|
+
},{"compose-toolbox":50}],5:[function(require,module,exports){
|
10
10
|
"use strict";var loadFont=require("./utility/load_font"),loadScript=require("./utility/load_script"),toggler=require("compose-toggler"),mobileMenu=require("./base/mobilemenu"),form=require("./base/form"),formUp=require("compose-form-up");require("./base/sync-input-value"),Object.assign(form,formUp);var waypoints=require("./enhancement/waypoints"),notice=require("./enhancement/notice"),sticky=require("./enhancement/sticky"),lightbox=require("./enhancement/lightbox"),esvg=require("./_svg"),toolbox=require("compose-toolbox"),event=toolbox.event,ajax=require("superagent"),rangeTouch=require("rangetouch"),highlighter=require("compose-code-highlighter"),loader=require("compose-loader");require("codemirror/mode/htmlmixed/htmlmixed"),require("codemirror/mode/slim/slim"),require("codemirror/mode/javascript/javascript"),require("codemirror/mode/css/css"),require("codemirror/mode/sql/sql"),require("codemirror/mode/php/php"),require("codemirror/mode/ruby/ruby"),require("codemirror/mode/shell/shell"),require("codemirror/mode/go/go"),require("codemirror/mode/python/python"),require("codemirror/mode/yaml/yaml"),require("codemirror/mode/clike/clike"),require("codemirror/addon/runmode/runmode"),require("codemirror/addon/edit/matchbrackets"),rangeTouch.set("thumbWidth",20),event.scroll.disablePointer(),event.change(function(){form(),highlighter.highlight()});var ratchet=toolbox.merge({loadFont:loadFont,loadScript:loadScript,ajax:ajax,loader:loader,mobileMenu:mobileMenu,form:form,toggler:toggler,waypoints:waypoints,notice:notice,sticky:sticky,lightbox:lightbox,esvg:esvg},toolbox);window.ratchet=module.exports=ratchet;
|
11
|
-
},{"./_svg":1,"./base/form":2,"./base/mobilemenu":3,"./base/sync-input-value":4,"./enhancement/lightbox":6,"./enhancement/notice":7,"./enhancement/sticky":8,"./enhancement/waypoints":9,"./utility/load_font":10,"./utility/load_script":11,"codemirror/addon/edit/matchbrackets":13,"codemirror/addon/runmode/runmode":14,"codemirror/mode/clike/clike":16,"codemirror/mode/css/css":17,"codemirror/mode/go/go":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/php/php":21,"codemirror/mode/python/python":22,"codemirror/mode/ruby/ruby":23,"codemirror/mode/shell/shell":24,"codemirror/mode/slim/slim":25,"codemirror/mode/sql/sql":26,"codemirror/mode/yaml/yaml":28,"compose-code-highlighter":
|
11
|
+
},{"./_svg":1,"./base/form":2,"./base/mobilemenu":3,"./base/sync-input-value":4,"./enhancement/lightbox":6,"./enhancement/notice":7,"./enhancement/sticky":8,"./enhancement/waypoints":9,"./utility/load_font":10,"./utility/load_script":11,"codemirror/addon/edit/matchbrackets":13,"codemirror/addon/runmode/runmode":14,"codemirror/mode/clike/clike":16,"codemirror/mode/css/css":17,"codemirror/mode/go/go":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/php/php":21,"codemirror/mode/python/python":22,"codemirror/mode/ruby/ruby":23,"codemirror/mode/shell/shell":24,"codemirror/mode/slim/slim":25,"codemirror/mode/sql/sql":26,"codemirror/mode/yaml/yaml":28,"compose-code-highlighter":29,"compose-form-up":45,"compose-loader":48,"compose-toggler":49,"compose-toolbox":50,"rangetouch":57,"superagent":58}],6:[function(require,module,exports){
|
12
12
|
"use strict";var toolbox=require("compose-toolbox"),Event=toolbox.event,delay=toolbox.delay,loader=require("compose-loader"),lightbox=function(e,o){function t(){s.insertAdjacentHTML("afterbegin",'<aside class="lightbox"><figure><img src="" alt=""><button></button></figure></aside>'),c=document.querySelector(".lightbox img")}function n(e){if(e&&"IMG"===e.target.tagName)return!1;m.remove(),s.classList.remove("lightbox-active"),c.classList.remove("loaded"),c.src=""}function i(e){m.loading(),c.src=e.parentNode.href,s.classList.add("lightbox-active")}function r(){m.remove(),c.classList.add("loaded")}function a(e){delay(function(){m.failure()},1e3),delay(function(){n()},2500),Event.off(c,"load",r),Event.off(c,"error",a)}function l(e){if(e.preventDefault(),g.matches)return!1;document.querySelector(".lightbox")||t(),Event.keyOne("esc",n),i(e.target),c.complete?r():(Event.on(c,"load",r),Event.on(c,"error",a))}e=e||"a[href$=jpg] ,a[href$=png], a[href$=gif], a[href$=svg]";var c,d={initWidth:"700px"},f=toolbox.merge(d,o),u=document.querySelector(e),g=window.matchMedia("(max-width: "+f.initWidth+")"),s=document.body,m=loader.new({loading:"Loading image",failure:"No image found"});if(!u)return!1;Event.on(document,"click","a[href$=jpg], a[href$=png], a[href$=gif], a[href$=svg]",l),Event.on(document,"click",".lightbox",n)};module.exports=lightbox;
|
13
|
-
},{"compose-loader":
|
13
|
+
},{"compose-loader":48,"compose-toolbox":50}],7:[function(require,module,exports){
|
14
14
|
"use strict";var toolbox=require("compose-toolbox"),notice=function(e,o){function t(e){e.preventDefault();var o=n.querySelector("."+i.noticeClass);n.removeChild(o),document.cookie=s+"=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/",toolbox.event.off(r)}var c={noticeName:"notice",noticeClass:"notice",noticeMessage:"[your notice message here]"},i=toolbox.merge(c,o),n=document.querySelector(e),s="dismiss-"+i.noticeName,r=n.querySelector("."+i.noticeClass+" .close-btn");if(!n||function(e){var o="; "+document.cookie,t=o.split("; "+e+"=");if(2==t.length)return t.pop().split(";").shift()}(s))return!1;var a='<aside class="'+i.noticeClass+'">'+i.noticeMessage+'<a href="#?" class="close-btn"></a></aside>';document.querySelector("main").insertAdjacentHTML("afterbegin",a),toolbox.event.on(r,"click",t)};module.exports=notice;
|
15
|
-
},{"compose-toolbox":
|
15
|
+
},{"compose-toolbox":50}],8:[function(require,module,exports){
|
16
16
|
"use strict";var toolbox=require("compose-toolbox"),fromTop=toolbox.fromTop,sticky=function(o,t){function e(o){i(),s(),o.matches||p.classList.remove("sticky"),y.toggle(o.matches),f.toggle(o.matches)}function i(){a=document.body.scrollHeight,d=window.innerHeight}function s(){var o=window.pageYOffset,t=o>u,e=h?o>=a-g-h+l:null;t&&!e?(p.classList.remove("anchored"),p.classList.add("sticky")):t&&e?(p.classList.remove("sticky"),p.classList.add("anchored")):p.classList.remove("sticky")}var n={topPadding:!1,initWidth:"700px",stickyClass:"sticky",anchorPoint:null},c=toolbox.merge(n,t),r=document.querySelector(o);if(!r)return!1;var a,d,l=c.topPadding===!0?parseInt(window.getComputedStyle(r,null).getPropertyValue("padding-top")):0,m=window.matchMedia("(min-width: "+c.initWidth+")"),u=fromTop(r)+l,g=r.offsetHeight,h=c.anchorPoint,p=document.body,y=toolbox.event.resize(i),f=toolbox.event.scroll(s);e(m),m.addListener(e)};module.exports=sticky;
|
17
|
-
},{"compose-toolbox":
|
17
|
+
},{"compose-toolbox":50}],9:[function(require,module,exports){
|
18
18
|
"use strict";var toolbox=require("compose-toolbox"),Event=toolbox.event,matches=toolbox.matches,fromTop=toolbox.fromTop,scrollTo=toolbox.scrollTo,getClosest=toolbox.getClosest,callback=Event.callback,waypoints=function(e){function o(e,o){var t=f.querySelector("."+o);t!=e&&(t&&t.classList.remove(o),e.classList.add(o))}function t(e){o(e,r),n(getClosest(e,a))}function n(e){e&&o(e,i)}var l={initWidth:"0px",elemOffset:0},c=toolbox.merge(l,e),r="active",a="dl",i="pinned",f=document.querySelector(".waypoint-nav"),s=[];if(f&&function(e,o){return Array.prototype.slice.call(e,o)}(f.querySelectorAll("a[href^='#']")).forEach(function(e){var o=document.querySelector(e.getAttribute("href"));o&&s.push(o)}),!f||s.length<1)return!1;var u,h,m,d,w=document.body,v=[];window.location.hash&&(h=window.location.hash.replace("#",""),window.location.hash="",history.replaceState(null,"","#"+h)),Event.on(window,"load",function(){Event.media.minWidth(c.initWidth,function(e){p.toggle(e.matches),p(),b.toggle(e.matches),b(),E.toggle(e.matches),E()})});var p=callback.new(function(){m=w.scrollHeight,d=window.innerHeight,g()}),g=function(){s.forEach(function(e,o){v[o]={elem:s[o],offset:fromTop(s[o])}})},b=callback.new(function(){var e,o,n=window.pageYOffset,l=n<0||n+d>=m;if(v.forEach(function(o,t){var r=v[0],a=v[t+1],i=v[v.length-1];n<r.offset?e=r.elem.id:l||n>i.offset-c.elemOffset?e=i.elem.id:n>o.offset-c.elemOffset&&n<a.offset-c.elemOffset&&(e=o.elem.id)}),e){if(e===u)return!1;if(!(o=f.querySelector('a[href="#'+e+'"]')))return!1;t(o),u=e}}),y=callback.new(function(e){matches(e.target,'a[href^="#"]')&&(e.preventDefault(),x(e.target,!0))}),E=callback.new(function(){if(!window.location.hash)return!1;x(document.querySelector('a[href="'+window.location.hash+'"]'))}),x=function(e,o){var n,l=e.getAttribute("href"),c=document.querySelector(l);c&&(t(e),v.forEach(function(e,o){v[o].elem===c&&(n=v[o].offset)}),o?(b.stop(),history.pushState(null,"",l),scrollTo(c,b.start)):window.scrollTo(0,fromTop(c)))};Event.resize.stop(p),Event.scroll(b),Event.on(document,"click",y),Event.on(window,"hashchange",E)};module.exports=waypoints;
|
19
|
-
},{"compose-toolbox":
|
19
|
+
},{"compose-toolbox":50}],10:[function(require,module,exports){
|
20
20
|
"use strict";var supportsWoff2=function(A){if(!("FontFace"in A))return!1;var t=new FontFace("t",'url( "data:application/font-woff2;base64,d09GMgABAAAAAAIkAAoAAAAABVwAAAHcAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlYAgloKLEoBNgIkAxgLDgAEIAWDcgc1G7IEyB6SJAFID5YA3nAHC6h4+H7s27nP1kTyOoQkGuJWtNGIJKYznRI3VEL7IaHq985ZUuKryZKcAtJsi5eULwUybm9KzajBBhywZ5ZwoJNuwDX5C/xBjvz5DbsoNsvG1NGQiqp0NMLZ7JlnW+5MaM3HwcHheUQeiVokekHkn/FRdefvJaTp2PczN+I1Sc3k9VuX51Tb0Tqqf1deVXGdJsDOhz0/EffMOPOzHNH06pYkDDjs+P8fb/z/8n9Iq8ITzWywkP6PBMMN9L/O7vY2FNoTAkp5PpD6g1nV9WmyQnM5uPpAMHR2fe06jbfvzPriekVTQxC6lpKr43oDtRZfCATl5OVAUKykqwm9o8R/kg37cxa6eZikS7cjK4aIwoyh6jOFplhFrz2b833G3Jii9AjDUiAZ9AxZtxdEYV6imvRF0+0Nej3wu6nPZrTLh81AVcV3kmMVdQj6Qbe9qetzbuDZ7vXOlRrqooFSxCv6SfrDICA6rnHZXQPVcUHJYGcoqa3jVH7ATrjWBNYYkEqF3RFpVIl0q2JvMOJd7/TyjXHw2NyAuJpNaEbz8RTEVtCbSH7JrwQQOqwGl7sTUOtdBZIY2DKqKlvOmPvUxJaURAZZcviTT0SKHCXqzwc=" ) format( "woff2" )',{});return t.load().catch(function(){}),"loading"==t.status||"loaded"==t.status}(window),loadFont=function(A,t,e,o){var n=navigator.userAgent;if(window.addEventListener&&(!n.match(/(Android (2|3|4.0|4.1|4.2|4.3))|(Opera (Mini|Mobi))/)||n.match(/Chrome/))){var a={};try{a=localStorage||{}}catch(A){}var r="x-font-"+A,s=r+"url",c=r+"css",i=a[s],d=a[c],l=document.createElement("style");if(l.rel="stylesheet",document.head.appendChild(l),!d||i!==t&&i!==e){var u=e&&supportsWoff2?e:t,f=new XMLHttpRequest;f.open("GET",u),f.onload=function(){f.status>=200&&f.status<400&&(a[s]=u,a[c]=f.responseText,o||(l.textContent=f.responseText))},f.send()}else l.textContent=d}};module.exports=loadFont;
|
21
21
|
},{}],11:[function(require,module,exports){
|
22
22
|
"use strict";var loadScript=function(e,t){var c=document.createElement("script");c.async=!0,c.src=e,document.head.appendChild(c),c.addEventListener("load",function(){t&&t()},!1)};module.exports=loadScript;
|
@@ -60,75 +60,75 @@ function l(n){var l;if(null==(l=i?Me(e.cm,u,t,r):Te(u,t,r))){if(n||!o())return!1
|
|
60
60
|
},{"../../lib/codemirror":15}],28:[function(require,module,exports){
|
61
61
|
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var e=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,t){var r=e.peek(),n=t.escaped;if(t.escaped=!1,"#"==r&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(t.literal&&e.indentation()>t.keyCol)return e.skipToEnd(),"string";if(t.literal&&(t.literal=!1),e.sol()){if(t.keyCol=0,t.pair=!1,t.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?t.inlinePairs++:"}"==r?t.inlinePairs--:"["==r?t.inlineList++:t.inlineList--,"meta";if(t.inlineList>0&&!n&&","==r)return e.next(),"meta";if(t.inlinePairs>0&&!n&&","==r)return t.keyCol=0,t.pair=!1,t.pairStart=!1,e.next(),"meta";if(t.pairStart){if(e.match(/^\s*(\||\>)\s*/))return t.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==t.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(t.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(i))return"keyword"}return!t.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(t.pair=!0,t.keyCol=e.indentation(),"atom"):t.pair&&e.match(/^:\s*/)?(t.pairStart=!0,"meta"):(t.pairStart=!1,t.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")});
|
62
62
|
},{"../../lib/codemirror":15}],29:[function(require,module,exports){
|
63
|
-
function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}"undefined"!=typeof module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,s=0;s<i.length;s++)if((r=i[s])===e||r.fn===e){i.splice(s,1);break}return this},Emitter.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i){i=i.slice(0);for(var r=0,s=i.length;r<s;++r)i[r].apply(this,e)}return this},Emitter.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Emitter.prototype.hasListeners=function(t){return!!this.listeners(t).length};
|
64
|
-
},{}],30:[function(require,module,exports){
|
65
63
|
var CodeMirror=require("codemirror");require("codemirror/addon/runmode/runmode.js");var Highlighter={aliases:{bash:"text/x-sh",c:"text/x-csrc",html:"text/html",js:"text/javascript",json:"application/json",java:"text/x-java",markup:"text/html",sass:"text/x-sass",scss:"text/x-scss",sh:"text/x-sh"},addAlias:function(a){for(var s in a)self.aliases[s]=a[s]},aliasLang:function(a){return self.aliases[a]||a},process:function(a,s,t){var e={json:!1};"json"==s&&(e.json=!0),CodeMirror.runMode(a,self.aliasLang(s),t,e)},highlightEl:function(a){var s=a.dataset.lang||a.dataset.language;if(!s){if(classMatch=a.className.match(/lang.*?-(\S+)/),!classMatch)return;s=classMatch[1]}a.classList.contains("language-"+s)&&a.classList.remove("language-"+s),a.classList.add("lang-"+s),a.classList.add("highlighted");var t=a.textContent.trim();self.process(t,s,a),a.innerHTML="<code class='highlighted-code static-code cm-s-default'>"+a.innerHTML+"</code>"},highlight:function(a){a=a||'[class*="language-"], [class*="lang-"], [data-lang], [data-language]';var s=document.querySelectorAll(a);Array.prototype.forEach.call(s,function(a){self.highlightEl(a)})}};module.exports=self=Highlighter;
|
66
|
-
},{"codemirror":15,"codemirror/addon/runmode/runmode.js":14}],
|
64
|
+
},{"codemirror":15,"codemirror/addon/runmode/runmode.js":14}],30:[function(require,module,exports){
|
67
65
|
function on(){setEvent("on",slice.call(arguments))}function off(){setEvent("off",slice.call(arguments))}function one(){setEvent("one",slice.call(arguments))}function fire(){args=slice.call(arguments);var e=(args[0],[]);args[1].split(" ").forEach(function(n){var n=animationEvent.transform(n);isEmpty(n)||e.push(n)}),isEmpty(e)||(args[1]=e.join(" "),bean.fire.apply(this,args))}function setEvent(e,n){transformArgs(n).forEach(function(n){bean[e].apply(null,n)})}function keyOne(e,n,r){"function"==typeof n&&(r=n,n="all"),key(e,n,function(t){key.unbind(e,n),r(t)})}function afterAnimation(e,n){!window.getComputedStyle(e).getPropertyValue("animation-duration")?n():one(e,"animationend",n)}function transformArgs(e){var n=[],r={},t=e.shift(),a=e.shift();if("function"!=typeof e[0])var i=e.shift();if("string"==typeof a){var o={};o[a]=e.shift(),a=o}for(event in a)if(a.hasOwnProperty(event)){var l=a[event];event.split(" ").forEach(function(e){e=animationEvent.transform(e),isEmpty(e)?l():e.match(/tap/)?r.touchstart=tap(l):r[e]=l})}for(event in r){var c=[];c.push(t,event),i&&c.push(i),c.push(r[event]),n.push(c.concat(e))}return n}function isEmpty(e){var n=Object.prototype.hasOwnProperty;if(null==e||0===e.length)return!0;if(0<e.length)return!1;for(var r in e)if(n.call(e,r))return!1;return!0}require("./lib/shims/custom-event");var bean=require("bean"),key=require("keymaster"),animationEvent=require("./lib/animation-events"),page=require("./lib/page"),tap=require("./lib/tap-events"),debounce=require("./lib/debounce"),throttle=require("./lib/throttle"),delay=require("./lib/delay"),repeat=require("./lib/repeat"),bubbleFormEvents=require("./lib/bubble-form-events"),scroll=require("./lib/scroll"),resize=require("./lib/resize"),callbackManager=require("./lib/callback-manager"),media=require("./lib/media"),slice=Array.prototype.slice,formBubbling=!1;module.exports={on:on,off:off,one:one,fire:fire,clone:bean.clone,ready:page.ready,change:page.change,afterAnimation:afterAnimation,media:media,key:key,keyOn:key,keyOff:key.unbind,keyOne:keyOne,debounce:debounce,throttle:throttle,delay:delay,repeat:repeat,scroll:scroll,resize:resize,callbackManager:callbackManager,callback:callbackManager.callback,bubbleFormEvents:bubbleFormEvents};
|
68
|
-
},{"./lib/animation-events":
|
66
|
+
},{"./lib/animation-events":31,"./lib/bubble-form-events":32,"./lib/callback-manager":33,"./lib/debounce":34,"./lib/delay":35,"./lib/media":36,"./lib/page":38,"./lib/repeat":39,"./lib/resize":40,"./lib/scroll":41,"./lib/shims/custom-event":42,"./lib/tap-events":43,"./lib/throttle":44,"bean":12,"keymaster":56}],31:[function(require,module,exports){
|
69
67
|
function camelCaseEventTypes(n){return n=n||"",{animationstart:n+"AnimationStart",animationend:n+"AnimationEnd",animationiteration:n+"AnimationIteration"}}function lowerCaseEventTypes(n){return n=n||"",{animationstart:n+"animationstart",animationend:n+"animationend",animationiteration:n+"animationiteration"}}function getAnimationEventTypes(){var n=["webkit","Moz","O",""],t=document.documentElement.style;if(void 0!==t.animationName)return lowerCaseEventTypes();for(var e,i=0,a=n.length;i<a;i++)if(e=n[i],void 0!==t[e+"AnimationName"]){if(0===i)return camelCaseEventTypes(e.toLowerCase());if(1===i)return lowerCaseEventTypes();if(2===i)return lowerCaseEventTypes(e.toLowerCase())}return{}}function transformAnimationEvents(n){return n.match(/animation/i)?cssAnimEventTypes[n]?cssAnimEventTypes[n]:("test"!=window.env&&console.error('"'+n+'" is not a supported animation event'),""):n}var cssAnimEventTypes=getAnimationEventTypes(),supported=void 0!==cssAnimEventTypes.animationstart;module.exports={transform:transformAnimationEvents};
|
70
|
-
},{}],
|
68
|
+
},{}],32:[function(require,module,exports){
|
71
69
|
var Event=require("bean"),page=require("./page"),formEls,formBubbling=!1,fireBubble=function(e){if(e.detail&&e.detail.triggered)return!1;var t=new CustomEvent(e.type,{bubbles:!0,cancelable:!0,detail:{triggered:!0}});e.stopPropagation(),e.target.dispatchEvent(t),t.defaultPrevented&&e.preventDefault()},eventType=function(e){return"FORM"==e.tagName?"submit":"focus blur"},bubbleOn=function(e){Event.on(e,eventType(e),fireBubble)},bubbleOff=function(e){Event.off(e,eventType(e),fireBubble)},bubbleFormEvents=function(){if(!e){page.change(function(){formEls&&Array.prototype.forEach.call(formEls,bubbleOff),formEls=document.querySelectorAll("form, input"),Array.prototype.forEach.call(formEls,bubbleOn)});var e=!0}};module.exports=bubbleFormEvents;
|
72
|
-
},{"./page":
|
70
|
+
},{"./page":38,"bean":12}],33:[function(require,module,exports){
|
73
71
|
var Manager={new:function(){var n={callbacks:[],add:function(a){var c=Manager.callback.new(a);return n.callbacks.push(c),c},stop:function(){n.callbacks.forEach(function(n){n.stop()})},start:function(){n.callbacks.forEach(function(n){n.start()})},toggle:function(a){n.callbacks.forEach(function(n){n.toggle(a)})},remove:function(){n.callbacks=[]},fire:function(){var a=Array.prototype.slice.call(arguments);n.callbacks.forEach(function(n){n.apply(this,a)})}};return n},callback:{new:function(n){var a=function(){a.enabled&&n.apply(n,arguments)};return a.stop=function(){a.enabled=!1},a.start=function(){a.enabled=!0},a.toggle=function(n){a.enabled=0 in arguments?n:!a.enabled},a.enabled=!0,a}}};module.exports=Manager;
|
74
|
-
},{}],
|
72
|
+
},{}],34:[function(require,module,exports){
|
75
73
|
var now=function(){return Date.now()},pickFunction=function(){var n;return Array.prototype.forEach.call(arguments,function(i){"function"!=typeof i||n||(n=i)}),n},debounce=function(n,i,t){t="object"==typeof n?n:t||{},i=t.wait||i||0;var a,o=t.max||!1,e="leading"in t&&t.leading,c=!("trailing"in t)||t.trailing,r=pickFunction(t.leading,t.trailing,t.callback,n),u=pickFunction(t.trailing,t.leading,t.callback,n),l=!1,f={},g=0,p=0,d=!1,w=function(n){g=now(),p=now(),l=!1,d=!0,"leading"===n?r.apply(r,a):u.apply(u,a)},m=function(){l||(l=!0,f.value=requestAnimationFrame(k))},v=function(){"value"in f&&(cancelAnimationFrame(f.value),l=!1,g=0,p=0,d=!1)},y=function(){return o&&now()-p>=o},b=function(){return now()-g>=i},k=function(){l=!1,e&&!d?w("leading"):y()?w(e?"leading":"trailing"):b()?(c&&w("trailing"),e&&(d=!1)):m()},F=function(){g=now(),a=arguments,m()};return F.stop=v,F};module.exports=debounce;
|
76
|
-
},{}],
|
74
|
+
},{}],35:[function(require,module,exports){
|
77
75
|
var now=function(){return Date.now()},delay=function(e,a){var t=null!=a?2:1,n={};return n.args=Array.prototype.slice.call(arguments,t),n.wait=a||0,n.start=now(),n.stop=function(){"value"in n&&cancelAnimationFrame(n.value)},n.loop=function(){now()-n.start>=n.wait?(e.apply(e,n.args),n.repeat?(n.repeat=n.repeat-1,n.start=now(),queueDelay(n)):0===n.repeat&&n.complete&&n.complete()):queueDelay(n)},queueDelay(n)},queueDelay=function(e){return e.value=requestAnimationFrame(e.loop),e};module.exports=delay;
|
78
|
-
},{}],
|
76
|
+
},{}],36:[function(require,module,exports){
|
79
77
|
function parseQuery(i,n){var e={};return"string"==typeof i?i:(e.min=size(i.min,"min-"+n),e.max=size(i.max,"max-"+n),e.min&&e.max&&(e.query=e.min+" and "+e.max),e.query||e.min||e.max)}function size(i,n){return i?"("+n+": "+toPx(i)+")":null}function toPx(i){return"number"==typeof i?i+"px":i}var media={width:function(i,n){return media.listen(parseQuery(i,"width"),n)},minWidth:function(i,n){return media.width({min:i},n)},maxWidth:function(i,n){return media.width({max:i},n)},height:function(i,n){return media.listen(parseQuery(i,"height"),n)},minHeight:function(i,n){return media.height({min:i},n)},maxHeight:function(i,n){return media.height({max:i},n)},listen:function(i,n){var e=window.matchMedia(i);return n&&(n(e),e.addListener(n)),e}};module.exports=media;
|
80
|
-
},{}],
|
78
|
+
},{}],37:[function(require,module,exports){
|
81
79
|
var Event=require("bean"),callbackManager=require("./callback-manager"),throttle=require("./throttle"),debounce=require("./debounce"),optimizedEventManager={new:function(e){var n={run:callbackManager.new(),start:callbackManager.new(),stop:callbackManager.new()},t=throttle(n.run.fire),r=debounce({leading:n.start.fire,trailing:!1,wait:150}),a=debounce(n.stop.fire,150);Event.on(window,e,function(){t(),r(),a()});var i=function(e){return n.run.add(e)};return i.start=function(e){return n.start.add(e)},i.stop=function(e){return n.stop.add(e)},i(function(){Event.fire(window,"optimized"+e[0].toUpperCase()+e.substring(1))}),i.start(function(){Event.fire(window,e+"Start")}),i.stop(function(){Event.fire(window,e+"Stop")}),i}};module.exports=optimizedEventManager;
|
82
|
-
},{"./callback-manager":
|
80
|
+
},{"./callback-manager":33,"./debounce":34,"./throttle":44,"bean":12}],38:[function(require,module,exports){
|
83
81
|
var Event=require("bean"),callbackManager=require("./callback-manager"),manager={ready:callbackManager.new(),change:callbackManager.new(),readyAlready:!1,changed:!1};manager.ready.add(function(){manager.readyAlready=!0}),manager.ready.add(function(){window.Turbolinks||manager.changed||(manager.changed=!0,manager.change.fire())});var ready=function(a){return manager.readyAlready&&a(),manager.ready.add(a)},change=function(a){return manager.changed&&a(),manager.change.add(a)};ready.fire=function(){manager.ready.fire(),manager.ready.stop()},change.fire=function(){manager.change.fire()},Event.on(document,"DOMContentLoaded",ready.fire),Event.on(document,"page:change",change.fire),module.exports={ready:ready,change:change};
|
84
|
-
},{"./callback-manager":
|
82
|
+
},{"./callback-manager":33,"bean":12}],39:[function(require,module,exports){
|
85
83
|
var delay=require("./delay"),repeat=function(e,r,a){var l=1,t=delay(e,r);return null!=a?l=3:null!=r&&(l=2),t.repeat=a||-1,t.args=Array.prototype.slice.call(arguments,l),t.stop=t.cancel,t};module.exports=repeat;
|
86
|
-
},{"./delay":
|
87
|
-
var manager=require("./optimized-event-manager"),resize=manager.new("
|
88
|
-
},{"./optimized-event-manager":
|
84
|
+
},{"./delay":35}],40:[function(require,module,exports){
|
85
|
+
var manager=require("./optimized-event-manager"),resize=manager.new("scroll");resize.disableAnimation=function(){document.querySelector("style#fullstop")||document.head.insertAdjacentHTML("beforeend",'<style id="fullstop">.no-animation *, .no-animation *:after, .no-animation *:before { transition: none !important; animation: none !important }</style>'),resize.start(function(){document.body.classList.add("no-animation")}),resize.stop(function(){document.body.classList.remove("no-animation")})},module.exports=resize;
|
86
|
+
},{"./optimized-event-manager":37}],41:[function(require,module,exports){
|
89
87
|
var manager=require("./optimized-event-manager"),scroll=manager.new("scroll");scroll.disablePointer=function(){scroll.start(function(){document.documentElement.style.pointerEvents="none"}),scroll.stop(function(){document.documentElement.style.pointerEvents=""})},module.exports=scroll;
|
90
|
-
},{"./optimized-event-manager":
|
88
|
+
},{"./optimized-event-manager":37}],42:[function(require,module,exports){
|
91
89
|
!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if("function"==typeof window.CustomEvent)return!1;t.prototype=window.Event.prototype,window.CustomEvent=t}();
|
92
|
-
},{}],
|
90
|
+
},{}],43:[function(require,module,exports){
|
93
91
|
function Tap(e,t){function n(t){function n(n){if(t!==n&&(a(),!n.defaultPrevented)){var o=t.preventDefault,r=t.stopPropagation;t.stopPropagation=function(){r.call(t),r.call(n)},t.preventDefault=function(){o.call(t),o.call(n)},e.apply(u,i)}}function a(e){t!==e&&(clearTimeout(c),r.removeEventListener("touchmove",a),endEvents.forEach(function(e){r.removeEventListener(e,n)}))}if(t.touches&&!(t.touches.length>1)){var r=t.target,u=this,i=arguments,c=setTimeout(a,o);r.addEventListener("touchmove",a),endEvents.forEach(function(e){r.addEventListener(e,n)})}}t=t||{};var o=t.timeout||Tap.timeout;return n.handler=e,n}var endEvents=["touchend"];module.exports=Tap,Tap.timeout=200;
|
94
|
-
},{}],
|
92
|
+
},{}],44:[function(require,module,exports){
|
95
93
|
var debounce=require("./debounce"),throttle=function(e,t,a){return"object"==typeof e?(a=e,e=void 0):a=a||{},a.wait=a.wait||t||0,a.max=a.max||a.wait,a.callback=a.callback||e,a.leading=!0,a.trailing=!0,debounce(a)};module.exports=throttle;
|
96
|
-
},{"./debounce":
|
94
|
+
},{"./debounce":34}],45:[function(require,module,exports){
|
97
95
|
var validation=require("./lib/validation"),progressive=require("./lib/progressive");module.exports={validate:validation.validate,invalidateField:validation.invalidateField,next:progressive.next};
|
98
|
-
},{"./lib/progressive":
|
96
|
+
},{"./lib/progressive":46,"./lib/validation":47}],46:[function(require,module,exports){
|
99
97
|
function reset(){formCallbacks={next:[]},registeredForms=[]}function newForm(e){function t(){return m[p]}function o(){return m[p+1]}function n(){return t()&&!t().disabled}function r(){a(p+1)}function a(e){e=Number(e);var o=m[e];if(o&&o!=t()){var r=p<e?"forward":"reverse";if(n())return s(function(){a(e)},r);p=e,c(r)}}function s(e,o){o=o||"forward",t().classList.remove("active","enter"),t().classList.add("exit"),t().dataset.direction=o,Event.afterAnimation(t(),function(){l(),"function"==typeof e&&e()})}function i(e,o){n()||(o=o||"reverse",t().classList.remove("exit","completed"),t().classList.add("active","enter"),t().dataset.direction=o,u(),Event.afterAnimation(t(),function(){"function"==typeof e&&e()}))}function c(e){u(),t().classList.remove("completed"),t().dataset.direction=e,t().classList.add("active","enter");var o=t().querySelector("input:not([hidden]), textarea, select");o&&o.focus(),f()}function l(){t().disabled=!0,t().classList.add("completed"),t().classList.remove("enter","exit")}function f(){toolbox.each(e.querySelectorAll("nav [data-step]"),function(e){e.dataset.step<p+1&&(e.classList.remove("here","next"),e.classList.add("previous","completed")),e.dataset.step==p+1&&(e.classList.remove("previous","next"),e.classList.add("here")),e.dataset.step>p+1&&(e.classList.remove("previous","here"),e.classList.add("next"))})}function d(e){toolbox.each(e.querySelectorAll("fieldset.form-step[disabled]"),function(e){e.disabled=!1})}function u(){m.forEach(function(e){e.disabled=e!=t()})}if(e){var m=toolbox.slice(e.querySelectorAll(".form-step")),p=0;if(0!=m.length){if(m.forEach(function(e,o){e.disabled=e!=t(),e.dataset.step=o}),e.dataset.nav){var v='<nav class="progressive-form-nav">';m.forEach(function(e,t){v+='<a href="#" class="progressive-form-nav-item" data-step="'+(t+1)+'">',v+=e.dataset.nav||"Step "+(t+1),v+="</a> "}),v+="</nav>",e.insertAdjacentHTML("afterbegin",v)}c(),registeredForms.push(function(n,c){var l=n.currentTarget;if("show-step"===c)n.preventDefault(),toolbox.matches(l,".previous, .completed, .completed + a")&&a(l.dataset.step-1);else if("next"===c){var f="FORM"==l.tagName?l:toolbox.getClosest(l,"form");if(e==f&&!t().querySelector(":invalid")){var m=getCallbacks(e);o()?u():d(e),m?(n.preventDefault(),m(n,{fieldset:t(),form:e,forward:r,dismiss:s,revisit:i,showStep:a,complete:!o(),formData:toolbox.formData(t())})):o()&&(n.preventDefault(),r())}}})}}}function fire(e,t){registeredForms.forEach(function(o){o(e,t)})}function getCallbacks(e,t){t=t||"next";var o,n=[];return formCallbacks[t].forEach(function(t){(o=t(e))&&n.push(o)}),!!n.length&&function(){var e=toolbox.slice(arguments);n.forEach(function(t){t.apply(t,e)})}}function next(e,t){on(e,"next",t)}function on(e,t,o){if("object"==typeof t)for(type in t)on(e,type,t[type]);else if(formCallbacks[t]){var n=function(t){if(t==e)return o};formCallbacks[t].push(n)}}var toolbox=require("compose-toolbox"),Event=toolbox.event,Callback=toolbox.event.callback,formSelector="form.progressive",watching=!1,formCallbacks,registeredForms;Event.ready(function(){reset(),Event.bubbleFormEvents();var e=formSelector+" [type=submit], "+formSelector+" .next-step",t=formSelector+" .back-step";Event.on(document,"click",e,fire,"next"),Event.on(document,"click",t,fire,"back"),Event.on(document,"click",".progressive-form-nav-item[data-step]",fire,"show-step"),document.head.insertAdjacentHTML("beforeend","<style>.form-step[disabled], .form-step.completed { position: absolute !important; top: -9999px !important; left: -9999px !important; left: 0 !important; right: 0 !important; }</style>"),Event.change(function(){reset(),toolbox.each(document.querySelectorAll(formSelector),function(e){newForm(e)})})}),module.exports={next:next,new:newForm};
|
100
|
-
},{"compose-toolbox":
|
98
|
+
},{"compose-toolbox":50}],47:[function(require,module,exports){
|
101
99
|
function supported(){return"function"==typeof document.createElement("input").checkValidity}function validateForm(e){var t,a=e.querySelectorAll("[required]");return toolbox.slice(a).some(function(e){if(!getClosest(e,"[disabled]")&&!checkInput(e))return t=e,!0}),!t||(focus(t),showMessage(t),!1)}function checkInput(e,t){var a=statusEl(e),n=isValid(e);return"keydown"!=t||n||e!=document.activeElement?(a.classList.toggle("invalid",!n),a.classList.toggle("valid",n)):a.classList.remove("invalid","valid"),n}function isValid(e){e.value.replace(/\s/g,"").length||(e.value="");var t=checkValue(e)||checkLength(e)||"";return e.setCustomValidity(t),e.checkValidity()}function checkValue(e){if(e.dataset.invalidValue){var t=escapedRegex(e.dataset.invalidValue,"i");if(e.value.match(t))return e.dataset.cachedMessage=e.dataset.message,e.dataset.message="",e.dataset.invalidValueMessage||"Value '"+e.value+"' is not permitted";e.dataset.cachedMessage&&(e.dataset.message=e.dataset.cachedMessage,e.dataset.cachedMessage="")}}function escapedRegex(e,t){var a=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp("^"+a+"$",t)}function checkLength(e){return checkCount(e,"min")||checkCount(e,"max")}function checkCount(e,t){var a=e.dataset[t+"Words"];if(a){var n=wordCount(e.value)<a;if(phrasing="min"==t?"at least ":"no more than ",valid="min"==t?!n:n,e.value&&!valid)return"Please write "+phrasing+a+" words."}}function statusEl(e){return getClosest(e,"label")||e}function focus(e){e="none"!==e.style.display?e:e.nextSibling,e.focus()}function submit(e){validateForm("FORM"==e.target.tagName?e.target:getClosest(e.target,"form"))||(checkValidation.stop(),Event.delay(checkValidation.start,500),e.preventDefault(),e.stopImmediatePropagation())}function invalidateField(e,t){e&&e.value&&(e.dataset.invalidValue=e.value,t&&(e.dataset.invalidValueMessage=t))}function hideMessage(e){var t=getClosest(e,"form"),a=t.querySelector(".validation-message");a&&a.parentNode.removeChild(a)}function showMessage(e){hideMessage(e);var t=getClosest(e,"label"),a=e.dataset.message||e.validationMessage;t&&t.insertAdjacentHTML("beforeend",'<aside class="validation-message"><p>'+a+"</p></aside>")}var toolbox=require("compose-toolbox"),Event=toolbox.event,getClosest=toolbox.getClosest,wordCount=toolbox.wordCount,textSelectors="[required]",invalidHandler=Event.callback.new(function(e){e.preventDefault(),e.stopPropagation()});Event.ready(function(){supported()&&(Event.bubbleFormEvents(),document.addEventListener("invalid",invalidHandler,!0),Event.on(document.body,"click","[type=submit]",submit),Event.on(document,"validate","form",function(e){validateForm(e.target)}),Event.on(document,"blur","[required]",checkValidation),Event.on(document,"keydown","[required]",Event.debounce(checkValidation,200)),Event.on(document,"input","select[required]",Event.debounce(checkValidation,200)))});var checkValidation=Event.callback.new(function(e){checkInput(e.target,e.type)&&hideMessage(e.target)});module.exports={validate:validateForm,invalidateField:invalidateField};
|
102
|
-
},{"compose-toolbox":
|
100
|
+
},{"compose-toolbox":50}],48:[function(require,module,exports){
|
103
101
|
var classify=function(e){return"."+e.replace(/\s/g,".")},merge=function(){var e=[{}].concat(Array.prototype.slice.call(arguments));return Object.assign.apply(this,e)},defaultSettings={parent:"body",className:"loader",loading:"Loading…",success:"Success!",failure:"An error occurred.",removeAfter:800},Loader={new:function(e){function t(){return i||(u.parent.insertAdjacentHTML("beforeend",'<div class="'+u.className+'"></div>'),i=u.parent.lastChild),i}function n(e){e=merge(u,e||{}),i=t(),i.textContent=e.message,i.className=u.className,i.classList.add(e.className),e.removeAfter&&setTimeout(function(){c(e.callback)},e.removeAfter)}function r(e){n(o(e,"loading"))}function a(e){n(o(e,"success"))}function s(e){n(o(e,"failure"))}function o(e,t){return"string"==typeof e&&(e={message:e}),e=merge({message:u[t],className:t},e||{}),void 0===e.removeAfter&&(e.removeAfter="loading"!=t&&u.removeAfter),e}function c(e){requestAnimationFrame(function(){u.parent.removeChild(t()),i=null,"function"==typeof e&&e()})}var i,u=merge(defaultSettings,e||{});return"string"==typeof u.parent&&(u.parent=document.querySelector(u.parent)),{options:u,loading:r,success:a,failure:s,show:n,element:t,remove:c}},defaults:function(e){return Object.assign(defaultSettings,e||{})}};module.exports=Loader;
|
104
|
-
},{}],
|
102
|
+
},{}],49:[function(require,module,exports){
|
105
103
|
var Event=require("compose-event"),Toggler={checkboxSelector:"[type=checkbox][data-toggle], [type=checkbox][data-show], [type=checkbox][data-hide]",radioSelector:"input[type=radio][data-show], input[type=radio][data-hide], input[type=radio][data-add-class], input[type=radio][data-remove-class]",selectSelector:"option[data-hide], option[data-show]",listen:function(){Event.on(document,"click change","[data-toggle], [data-show], [data-hide], [data-toggle-class], [data-add-class], [data-remove-class]",Toggler.trigger),Event.on(document,"change",".select-toggler",Toggler.trigger)},refresh:function(){Toggler.toggleCheckboxes(),Toggler.setupSelects(),Toggler.setupRadios()},trigger:function(e){"#"==e.currentTarget.getAttribute("href")&&(e.preventDefault(),e.stop()),Toggler.triggerToggling(e.currentTarget)},triggerToggling:function(e){var t,a=["hide","toggle","show","removeClass","toggleClass","addClass"];e.tagName.match(/select/i)&&(t=e,e=t.selectedOptions[0]),(t||"radio"==e.type)&&(a=a.filter(function(e){return!e.match(/toggle/)})),a.forEach(function(t){Toggler.dispatch(e,t)})},dispatch:function(e,t){var a=t,o=e.dataset[t];o&&void 0!==o&&""!=o&&("checkbox"==e.type&&(a=t.match(/hide|remove/i)?!e.checked:e.checked),o&&(t.match(/class/i)?Toggler.setClass(o,a,e):Toggler.setState(o,a)))},setClass:function(e,t,a){if(void 0!==e&&""!=e){if("boolean"==typeof t&&(t=t?"add":"remove"),e.match(/&/))return void e.split("&").forEach(function(e){Toggler.setClass(e.trim(),t,a)});var o=e.split(";"),r=o[0].trim(),l=[];e=o[1],e?l=document.querySelectorAll(e):a&&a.tagName.match(/option/i)?l=[Toggler.getSelectFromOption(a)]:a&&(l=[a]),Array.prototype.forEach.call(l,function(e){Array.prototype.forEach.call(r.split(" "),function(a){var o=t.replace(/Class/,"");e.classList[o](a)}),Toggler.triggerTogglerEventsOnChildren(e,"class")})}},setState:function(e,t){var a=document.querySelectorAll(e);Array.prototype.forEach.call(a,function(e){var a=Toggler.toggleAction(e,t);Toggler[a](e),Toggler.triggerTogglerEventsOnChildren(e,a)})},toggleAction:function(e,t){return"boolean"==typeof t&&(t=t?"show":"hide"),"toggle"==t&&(t=e.classList.contains("hidden")?"show":"hide"),t},show:function(e){e.classList.remove("hidden"),e.classList.add("visible"),void 0!==e.disabled&&(e.disabled=!1);var t=e.querySelector("[data-focus]");t&&t.focus();e.querySelectorAll("[type=range]")},hide:function(e){e.classList.remove("visible"),e.classList.add("hidden"),void 0!==e.disabled&&(e.disabled=!0)},getLeafNodes:function(e){return e.hasChildNodes()?Array.prototype.slice.call(e.getElementsByTagName("*"),0).filter(function(e){return e.children&&0===e.children.length}):[e]},triggerTogglerEventsOnChildren:function(e,t){var a=Toggler.getLeafNodes(e);Array.prototype.forEach.call(a,function(e){Event.fire(e,"toggler:"+t)})},toggleCheckboxes:function(e){e=e||document.querySelectorAll(Toggler.checkboxSelector),Array.prototype.forEach.call(e,Toggler.triggerToggling)},setupRadios:function(){Array.prototype.forEach.call(document.querySelectorAll(Toggler.radioSelector),function(e,t){if(!e.dataset.togglerActive){var a,o=e.getAttribute("name"),r=Toggler.parentForm(e).querySelectorAll('[type=radio][name="'+o+'"]'),l=Toggler.dataAttributes(r,"show"),s=Toggler.dataAttributes(r,"addClass");Array.prototype.forEach.call(r,function(e){e.dataset.show=e.dataset.show||"",e.dataset.addClass=e.dataset.addClass||"",e.dataset.hide&&e.dataset.hide.length>0&&(l=l.concat(e.dataset.hide.split(","))),e.dataset.hide=l.filter(function(t){return e.dataset.show.indexOf(t)}).join(","),e.dataset.addClass=e.dataset.addClass||"",e.dataset.removeClass=s.filter(function(t){return e.dataset.addClass.indexOf(t)}).join("&"),e.dataset.togglerActive=!0,e.checked&&(a=e)}),a?Toggler.triggerToggling(a):(Toggler.setState(l.join(","),"hide"),Toggler.setClass(s.join(" & "),"removeClass"))}})},setupSelects:function(){Array.prototype.forEach.call(document.querySelectorAll(Toggler.selectSelector),function(e){if(!e.dataset.togglerActive){e.dataset.show=e.dataset.show||"";var t=Toggler.getSelectFromOption(e);t.classList.add("select-toggler");var a=t.querySelectorAll("option"),o=Toggler.dataAttributes(a,"show"),r=Toggler.dataAttributes(a,"addClass");Array.prototype.forEach.call(a,function(e){e.dataset.show=e.dataset.show||"",e.dataset.addClass=e.dataset.addClass||"",e.dataset.hide&&e.dataset.hide.length>0&&(o=o.concat(e.dataset.hide.split(","))),e.dataset.hide=o.filter(function(t){return e.dataset.show.indexOf(t)}).join(","),e.dataset.removeClass=r.filter(function(t){return e.dataset.addClass.indexOf(t)}).join(" & "),e.dataset.togglerActive=!0}),Toggler.triggerToggling(t)}})},getSelectFromOption:function(e){var t=e.parentElement;return"SELECT"==t.tagName?t:Toggler.getSelectFromOption(t)},parentForm:function(e){for(var t=e;t&&"FORM"!=t.tagName;)t=t.parentNode;return t||document},dataAttributes:function(e,t){return Array.prototype.map.call(e,function(e){return e.dataset[t]}).filter(function(e,t,a){return""!=e&&void 0!==e&&a.indexOf(e)===t})}};Event.ready(Toggler.listen),Event.change(Toggler.refresh),module.exports=Toggler;
|
106
|
-
},{"compose-event":
|
104
|
+
},{"compose-event":30}],50:[function(require,module,exports){
|
107
105
|
require("./lib/shims/_classlist");var merge=require("./lib/shims/_object.assign"),event=require("compose-event"),scrollTo=require("./lib/scrollto"),fromTop=require("./lib/fromtop"),ease=require("./lib/ease"),toolbox={event:event,scrollTo:scrollTo,fromTop:fromTop,merge:merge,ease:ease,getClosest:function(e,r){for(;e&&e!==document;e=e.parentNode)if(toolbox.matches(e,r))return e;return!1},getNext:function(e,r){for(;e&&e!==document;e=e.parentNode)if(e.querySelector(r))return e.querySelector(r);return!1},matches:function(e,r){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,r)},wordCount:function(e){var r=e.match(/\S+/g);return r?r.length:0},slice:function(e,r){return Array.prototype.slice.call(e,r)},each:function(e,r){return Array.prototype.forEach.call(e,r)},formData:function(e){var r=new FormData,o=e.querySelectorAll("input[name]");return toolbox.each(o,function(e){r.append(e.name,e.value)}),r}};module.exports=toolbox;
|
108
|
-
},{"./lib/ease":
|
106
|
+
},{"./lib/ease":51,"./lib/fromtop":52,"./lib/scrollto":53,"./lib/shims/_classlist":54,"./lib/shims/_object.assign":55,"compose-event":30}],51:[function(require,module,exports){
|
109
107
|
var ease={inOutQuad:function(t,u,n,e){return(t/=e/2)<1?n/2*t*t+u:(t--,-n/2*(t*(t-2)-1)+u)},inOutCubic:function(t,u,n,e){return(t/=e/2)<1?n/2*t*t*t+u:(t-=2,n/2*(t*t*t+2)+u)},inOutQuint:function(t,u,n,e){var r=(t/=e)*t,i=r*t;return u+n*(6*i*r+-15*r*r+10*i)},inOutCirc:function(t,u,n,e){return(t/=e/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+u:(t-=2,n/2*(Math.sqrt(1-t*t)+1)+u)}};ease.default=ease.inOutQuad,module.exports=ease;
|
110
|
-
},{}],
|
108
|
+
},{}],52:[function(require,module,exports){
|
111
109
|
module.exports=function(t){return Math.round(t.getBoundingClientRect().top+window.pageYOffset)};
|
112
|
-
},{}],
|
110
|
+
},{}],53:[function(require,module,exports){
|
113
111
|
function move(o){document.documentElement.scrollTop=o,document.body.parentNode.scrollTop=o,document.body.scrollTop=o}function position(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function scrollTo(o,e,n){"object"==typeof o&&(o=fromTop(o)),"number"==typeof e&&(n=e,e=null),n=void 0===n?500:n;var t=position(),r=o-t,c=0,l=function(){c+=20,move(ease.default(c,t,r,n)),c<n?requestAnimationFrame(l):e&&"function"==typeof e&&e()};l()}var ease=require("./ease"),fromTop=require("./fromtop");module.exports=scrollTo;
|
114
|
-
},{"./ease":
|
112
|
+
},{"./ease":51,"./fromtop":52}],54:[function(require,module,exports){
|
115
113
|
"document"in self&&("classList"in document.createElement("_")?function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array.prototype.indexOf||function(t){for(var e=0;e<this.length;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},o=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},a=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],s=0;s<n.length;s++)this.push(n[s]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},c=a.prototype=[],l=function(){return new a(this)};if(r.prototype=Error.prototype,c.item=function(t){return this[t]||null},c.contains=function(t){return t+="",o(this,t)!==-1},c.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",o(this,t)===-1&&(this.push(t),s=!0)}while(++n<i);s&&this._updateClassName()},c.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do{for(t=n[i]+"",e=o(this,t);e!==-1;)this.splice(e,1),r=!0,e=o(this,t)}while(++i<s);r&&this._updateClassName()},c.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},c.toString=function(){return this.join(" ")},n.defineProperty){var u={get:l,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",u)}catch(t){t.number===-2146823252&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",l)}}(self));
|
116
|
-
},{}],
|
114
|
+
},{}],55:[function(require,module,exports){
|
117
115
|
"function"!=typeof Object.assign&&function(){Object.assign=function(t){"use strict";if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),e=1;e<arguments.length;e++){var n=arguments[e];if(void 0!==n&&null!==n)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r}}();var merge=function(){var t=[{}].concat(Array.prototype.slice.call(arguments));return Object.assign.apply(this,t)};module.exports=merge;
|
118
|
-
},{}],
|
116
|
+
},{}],56:[function(require,module,exports){
|
119
117
|
!function(e){function n(e,n){for(var t=e.length;t--;)if(e[t]===n)return t;return-1}function t(e,n){if(e.length!=n.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function o(e){for(m in b)b[m]=e[T[m]]}function r(e){var t,r,i,l,c,u;if(t=e.keyCode,n(S,t)==-1&&S.push(t),93!=t&&224!=t||(t=91),t in b){b[t]=!0;for(i in C)C[i]==t&&(f[i]=!0)}else if(o(e),f.filter.call(this,e)&&t in E)for(u=p(),l=0;l<E[t].length;l++)if(r=E[t][l],r.scope==u||"all"==r.scope){c=r.mods.length>0;for(i in b)(!b[i]&&n(r.mods,+i)>-1||b[i]&&n(r.mods,+i)==-1)&&(c=!1);(0!=r.mods.length||b[16]||b[18]||b[17]||b[91])&&!c||r.method(e,r)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function i(e){var t,o=e.keyCode,r=n(S,o);if(r>=0&&S.splice(r,1),93!=o&&224!=o||(o=91),o in b){b[o]=!1;for(t in C)C[t]==o&&(f[t]=!1)}}function l(){for(m in b)b[m]=!1;for(m in C)f[m]=!1}function f(e,n,t){var o,r;o=g(e),void 0===t&&(t=n,n="all");for(var i=0;i<o.length;i++)r=[],e=o[i].split("+"),e.length>1&&(r=v(e),e=[e[e.length-1]]),e=e[0],e=P(e),e in E||(E[e]=[]),E[e].push({shortcut:o[i],scope:n,method:t,key:o[i],mods:r})}function c(e,n){var o,r,i,l,f,c=[];for(o=g(e),l=0;l<o.length;l++){if(r=o[l].split("+"),r.length>1&&(c=v(r),e=r[r.length-1]),e=P(e),void 0===n&&(n=p()),!E[e])return;for(i=0;i<E[e].length;i++)f=E[e][i],f.scope===n&&t(f.mods,c)&&(E[e][i]={})}}function u(e){return"string"==typeof e&&(e=P(e)),n(S,e)!=-1}function a(){return S.slice(0)}function s(e){var n=(e.target||e.srcElement).tagName;return!("INPUT"==n||"SELECT"==n||"TEXTAREA"==n)}function d(e){w=e||"all"}function p(){return w||"all"}function h(e){var n,t,o;for(n in E)for(t=E[n],o=0;o<t.length;)t[o].scope===e?t.splice(o,1):o++}function g(e){var n;return e=e.replace(/\s/g,""),n=e.split(","),""==n[n.length-1]&&(n[n.length-2]+=","),n}function v(e){for(var n=e.slice(0,e.length-1),t=0;t<n.length;t++)n[t]=C[n[t]];return n}function y(e,n,t){e.addEventListener?e.addEventListener(n,t,!1):e.attachEvent&&e.attachEvent("on"+n,function(){t(window.event)})}function k(){var n=e.key;return e.key=A,n}var m,E={},b={16:!1,18:!1,17:!1,91:!1},w="all",C={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},K={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},P=function(e){return K[e]||e.toUpperCase().charCodeAt(0)},S=[];for(m=1;m<20;m++)K["f"+m]=111+m;var T={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};for(m in C)f[m]=!1;y(document,"keydown",function(e){r(e)}),y(document,"keyup",i),y(window,"focus",l);var A=e.key;e.key=f,e.key.setScope=d,e.key.getScope=p,e.key.deleteScope=h,e.key.filter=s,e.key.isPressed=u,e.key.getPressedKeyCodes=a,e.key.noConflict=k,e.key.unbind=c,"undefined"!=typeof module&&(module.exports=f)}(this);
|
120
|
-
},{}],
|
118
|
+
},{}],57:[function(require,module,exports){
|
121
119
|
!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t,document):"function"==typeof define&&define.amd?define(null,function(){e(t,document)}):t.rangetouch=e(t,document)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function n(t){return t instanceof HTMLElement&&t.classList.contains(l.selectors.disabled)}function o(t,e,n){t.addEventListener(e,n,!1)}function i(t){var e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function u(t,e){if(e<1){var n=i(parseInt(e));return parseFloat(t.toFixed(n))}return Math.round(t/e)*e}function r(t){var e,n=t.target,o=t.changedTouches[0],i=parseFloat(n.getAttribute("min"))||0,r=parseFloat(n.getAttribute("max"))||100,a=parseFloat(n.getAttribute("step"))||1,c=r-i,s=n.getBoundingClientRect(),d=100/s.width*(l.thumbWidth/2)/100;return e=100/s.width*(o.clientX-s.left),e<0?e=0:e>100&&(e=100),e<50?e-=(100-2*e)*d:e>50&&(e+=2*(e-50)*d),i+u(c*(e/100),a)}function a(t){l.enabled&&"range"===t.target.type&&!n(t.target)&&(t.preventDefault(),t.target.value=r(t),s(t.target,t.type===l.events.end?"change":"input"))}function c(){o(e.body,l.events.start,a),o(e.body,l.events.move,a),o(e.body,l.events.end,a)}function s(t,e,n){t.dispatchEvent(new CustomEvent(e,n))}function d(){return[l.selectors.range,":not(.",l.selectors.disabled,")"].join("")}var l={enabled:!0,selectors:{range:'[type="range"]',disabled:"rangetouch--disabled"},thumbWidth:15,events:{start:"touchstart",move:"touchmove",end:"touchend"}};return function(){if("ontouchstart"in e.documentElement){for(var t=e.querySelectorAll(d()),n=t.length-1;n>=0;n--)t[n].style.touchAction="manipulation",t[n].style.webkitUserSelect="none";c()}}(),{set:function(t,e){l[t]=e}}}),function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if("function"==typeof window.CustomEvent)return!1;t.prototype=window.Event.prototype,window.CustomEvent=t}();
|
122
|
-
},{}],
|
120
|
+
},{}],58:[function(require,module,exports){
|
123
121
|
function noop(){}function serialize(e){if(!isObject(e))return e;var t=[];for(var r in e)pushEncodedKeyValuePair(t,r,e[r]);return t.join("&")}function pushEncodedKeyValuePair(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){pushEncodedKeyValuePair(e,t,r)});else if(isObject(r))for(var s in r)pushEncodedKeyValuePair(e,t+"["+s+"]",r[s]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function parseString(e){for(var t,r,s={},n=e.split("&"),o=0,i=n.length;o<i;++o)t=n[o],r=t.indexOf("="),r==-1?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return s}function parseHeader(e){var t,r,s,n,o=e.split(/\r?\n/),i={};o.pop();for(var u=0,a=o.length;u<a;++u)r=o[u],t=r.indexOf(":"),s=r.slice(0,t).toLowerCase(),n=trim(r.slice(t+1)),i[s]=n;return i}function isJSON(e){return/[\/+]json\b/.test(e)}function type(e){return e.split(/ *; */).shift()}function params(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),s=r.shift(),n=r.shift();return s&&n&&(e[s]=n),e},{})}function Response(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this._setStatusProperties(this.xhr.status),this.header=this.headers=parseHeader(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function Request(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new Response(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,e.rawResponse=r.xhr&&r.xhr.responseText?r.xhr.responseText:null,e.statusCode=r.xhr&&r.xhr.status?r.xhr.status:null,r.callback(e)}r.emit("response",t);var s;try{(t.status<200||t.status>=300)&&(s=new Error(t.statusText||"Unsuccessful HTTP response"),s.original=e,s.response=t,s.status=t.status)}catch(e){s=e}s?r.callback(s,t):r.callback(null,t)})}function del(e,t){var r=request("DELETE",e);return t&&r.end(t),r}var root;"undefined"!=typeof window?root=window:"undefined"!=typeof self?root=self:(console.warn("Using browser-only version of superagent in non-browser environment"),root=this);var Emitter=require("emitter"),requestBase=require("./request-base"),isObject=require("./is-object"),request=module.exports=require("./request").bind(null,Request);request.getXHR=function(){if(!(!root.XMLHttpRequest||root.location&&"file:"==root.location.protocol&&root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var trim="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":JSON.stringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},Response.prototype.get=function(e){return this.header[e.toLowerCase()]},Response.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=type(t);var r=params(t);for(var s in r)this[s]=r[s]},Response.prototype._parseBody=function(e){var t=request.parse[this.type];return!t&&isJSON(this.type)&&(t=request.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},Response.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},Response.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,s="cannot "+t+" "+r+" ("+this.status+")",n=new Error(s);return n.status=this.status,n.method=t,n.url=r,n},request.Response=Response,Emitter(Request.prototype);for(var key in requestBase)Request.prototype[key]=requestBase[key];Request.prototype.type=function(e){return this.set("Content-Type",request.types[e]||e),this},Request.prototype.responseType=function(e){return this._responseType=e,this},Request.prototype.accept=function(e){return this.set("Accept",request.types[e]||e),this},Request.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var s=btoa(e+":"+t);this.set("Authorization","Basic "+s);break;case"auto":this.username=e,this.password=t}return this},Request.prototype.query=function(e){return"string"!=typeof e&&(e=serialize(e)),e&&this._query.push(e),this},Request.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},Request.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},Request.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},Request.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},Request.prototype.end=function(e){var t=this,r=this.xhr=request.getXHR(),s=this._timeout,n=this._formData||this._data;this._callback=e||noop,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var o=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{r.onprogress=o.bind(null,"download"),r.upload&&(r.upload.onprogress=o.bind(null,"upload"))}catch(e){}if(s&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},s)),this._appendQueryString(),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],u=this._serializer||request.serialize[i?i.split(";")[0]:""];!u&&isJSON(i)&&(u=request.serialize["application/json"]),u&&(n=u(n))}for(var a in this.header)null!=this.header[a]&&r.setRequestHeader(a,this.header[a]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==n?n:null),this},request.Request=Request,request.get=function(e,t,r){var s=request("GET",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},request.head=function(e,t,r){var s=request("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.options=function(e,t,r){var s=request("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.del=del,request.delete=del,request.patch=function(e,t,r){var s=request("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.post=function(e,t,r){var s=request("POST",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.put=function(e,t,r){var s=request("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s};
|
124
|
-
},{"./is-object":
|
122
|
+
},{"./is-object":59,"./request":61,"./request-base":60,"emitter":62}],59:[function(require,module,exports){
|
125
123
|
function isObject(e){return null!==e&&"object"==typeof e}module.exports=isObject;
|
126
|
-
},{}],
|
124
|
+
},{}],60:[function(require,module,exports){
|
127
125
|
var isObject=require("./is-object");exports.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},exports.parse=function(t){return this._parser=t,this},exports.serialize=function(t){return this._serializer=t,this},exports.timeout=function(t){return this._timeout=t,this},exports.then=function(t,e){if(!this._fullfilledPromise){var i=this;this._fullfilledPromise=new Promise(function(t,e){i.end(function(i,r){i?e(i):t(r)})})}return this._fullfilledPromise.then(t,e)},exports.catch=function(t){return this.then(void 0,t)},exports.use=function(t){return t(this),this},exports.get=function(t){return this._header[t.toLowerCase()]},exports.getHeader=exports.get,exports.set=function(t,e){if(isObject(t)){for(var i in t)this.set(i,t[i]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},exports.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},exports.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(isObject(t)){for(var i in t)this.field(i,t[i]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return this._getFormData().append(t,e),this},exports.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},exports.withCredentials=function(){return this._withCredentials=!0,this},exports.redirects=function(t){return this._maxRedirects=t,this},exports.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},exports._isHost=function(t){switch({}.toString.call(t)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},exports.send=function(t){var e=isObject(t),i=this._header["content-type"];if(e&&isObject(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(i||this.type("form"),i=this._header["content-type"],this._data="application/x-www-form-urlencoded"==i?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(i||this.type("json"),this)};
|
128
|
-
},{"./is-object":
|
126
|
+
},{"./is-object":59}],61:[function(require,module,exports){
|
129
127
|
function request(e,n,t){return"function"==typeof t?new e("GET",n).end(t):2==arguments.length?new e("GET",n):new e(n,t)}module.exports=request;
|
128
|
+
},{}],62:[function(require,module,exports){
|
129
|
+
function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}"undefined"!=typeof module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,s=0;s<i.length;s++)if((r=i[s])===e||r.fn===e){i.splice(s,1);break}return this},Emitter.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i){i=i.slice(0);for(var r=0,s=i.length;r<s;++r)i[r].apply(this,e)}return this},Emitter.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Emitter.prototype.hasListeners=function(t){return!!this.listeners(t).length};
|
130
130
|
},{}]},{},[5])(5)
|
131
131
|
});
|
132
132
|
|
133
133
|
|
134
|
-
//# sourceMappingURL=/assets/ratchet/core-0.1.
|
134
|
+
//# sourceMappingURL=/assets/ratchet/core-0.1.16.map.json
|
Binary file
|