tungsten 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tungsten/{_form_helpers.js → _form-helpers.js} +0 -0
  3. data/app/assets/javascripts/tungsten/enhancements/flash-messages.js +14 -0
  4. data/app/assets/javascripts/tungsten/enhancements/notify.js +89 -0
  5. data/app/assets/javascripts/tungsten/tungsten.js +5 -2
  6. data/app/assets/stylesheets/tungsten/components/_index.scss +2 -0
  7. data/app/assets/stylesheets/tungsten/components/_notices.scss +31 -0
  8. data/app/assets/stylesheets/tungsten/components/_notifications.scss +136 -0
  9. data/app/assets/stylesheets/tungsten/components/_tooltip.scss +22 -8
  10. data/app/assets/stylesheets/tungsten/core/_animations.scss +48 -0
  11. data/app/assets/stylesheets/tungsten/core/_globals.scss +15 -14
  12. data/app/assets/stylesheets/tungsten/core/_layout.scss +9 -1
  13. data/app/helpers/tungsten/notice_helper.rb +25 -0
  14. data/app/views/shared/tungsten/_flash-messages.html.slim +3 -3
  15. data/lib/tungsten/version.rb +1 -1
  16. data/public/{code-0.1.17.js → code-0.1.18.js} +1 -1
  17. data/public/{code-0.1.17.js.gz → code-0.1.18.js.gz} +0 -0
  18. data/public/{code-0.1.17.map.json → code-0.1.18.map.json} +0 -0
  19. data/public/{tungsten-0.1.17.css → tungsten-0.1.18.css} +256 -14
  20. data/public/tungsten-0.1.18.css.gz +0 -0
  21. data/public/{tungsten-0.1.17.js → tungsten-0.1.18.js} +43 -39
  22. data/public/tungsten-0.1.18.js.gz +0 -0
  23. data/public/tungsten-0.1.18.map.json +1 -0
  24. metadata +16 -12
  25. data/app/assets/javascripts/tungsten/enhancements/form-flash.js +0 -0
  26. data/public/tungsten-0.1.17.css.gz +0 -0
  27. data/public/tungsten-0.1.17.js.gz +0 -0
  28. data/public/tungsten-0.1.17.map.json +0 -1
@@ -29,8 +29,16 @@ textarea {
29
29
  color: $gray-11;
30
30
  }
31
31
 
32
- #{$block-elements} {
32
+ @mixin block-margin {
33
+ margin-top: $vertical-margin;
33
34
  margin-bottom: $vertical-margin;
35
+ &:first-child {
36
+ margin-top: 0;
37
+ }
38
+ }
39
+
40
+ #{$block-elements} {
41
+ @include block-margin;
34
42
  }
35
43
 
36
44
  /* ===================================== *
@@ -0,0 +1,25 @@
1
+ module Tungsten
2
+ module NoticeHelper
3
+ def warning_notice( title=nil, options={}, &block )
4
+ options[:type] = :warning
5
+ notice( title, options, &block )
6
+ end
7
+
8
+ def notice( title=nil, options={}, &block )
9
+ if title.is_a? Hash
10
+ options = title
11
+ title = nil
12
+ end
13
+
14
+ options[:class] = "notice #{options[:class]}".strip
15
+ options[:class] << " #{options[:type]}" if options[:type]
16
+
17
+ content_tag( :div, options ) {
18
+ concat content_tag( :h4, class: 'notice-title' ) { title }
19
+ concat content_tag( :div, class: 'notice-content' ) {
20
+ capture(&block).html_safe if block_given?
21
+ }
22
+ }
23
+ end
24
+ end
25
+ end
@@ -1,6 +1,6 @@
1
1
  - if flash[:notice]
2
- .flash-message.hidden data-type="action"= flash[:notice]
2
+ .flash-message data-type="normal"= flash[:notice]
3
3
  - if flash[:success]
4
- .flash-message.hidden data-type="success"= flash[:success]
4
+ .flash-message data-type="success"= flash[:success]
5
5
  - if flash[:error]
6
- .flash-message.hidden data-type="error"= flash[:error]
6
+ .flash-message data-type="error"= flash[:error]
@@ -1,3 +1,3 @@
1
1
  module Tungsten
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
@@ -89,4 +89,4 @@ function move(o){document.documentElement.scrollTop=o,document.body.parentNode.s
89
89
  });
90
90
 
91
91
 
92
- //# sourceMappingURL=/assets/tungsten/code-0.1.17.map.json
92
+ //# sourceMappingURL=/assets/tungsten/code-0.1.18.map.json
@@ -562,7 +562,10 @@ body, input, textarea {
562
562
  color: #0f212e; }
563
563
 
564
564
  p, ul, ol, h1, h2, h3, h4, h5, h6, pre, table, .card {
565
+ margin-top: 20px;
565
566
  margin-bottom: 20px; }
567
+ p:first-child, ul:first-child, ol:first-child, h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child, pre:first-child, table:first-child, .card:first-child {
568
+ margin-top: 0; }
566
569
 
567
570
  /* ===================================== *
568
571
  * Application
@@ -804,6 +807,86 @@ pre {
804
807
  opacity: 0; }
805
808
  100% {
806
809
  opacity: 1; } }
810
+ @-webkit-keyframes fade-out {
811
+ 0% {
812
+ opacity: 1; }
813
+ 100% {
814
+ opacity: 0; } }
815
+ @keyframes fade-out {
816
+ 0% {
817
+ opacity: 1; }
818
+ 100% {
819
+ opacity: 0; } }
820
+ @-webkit-keyframes slide-down {
821
+ 0% {
822
+ -webkit-transform: translateY(-100%);
823
+ transform: translateY(-100%); }
824
+ 100% {
825
+ -webkit-transform: translateY(0);
826
+ transform: translateY(0); } }
827
+ @keyframes slide-down {
828
+ 0% {
829
+ -webkit-transform: translateY(-100%);
830
+ transform: translateY(-100%); }
831
+ 100% {
832
+ -webkit-transform: translateY(0);
833
+ transform: translateY(0); } }
834
+ @-webkit-keyframes slide-up {
835
+ 0% {
836
+ -webkit-transform: translateY(0);
837
+ transform: translateY(0); }
838
+ 100% {
839
+ -webkit-transform: translateY(-100%);
840
+ transform: translateY(-100%); } }
841
+ @keyframes slide-up {
842
+ 0% {
843
+ -webkit-transform: translateY(0);
844
+ transform: translateY(0); }
845
+ 100% {
846
+ -webkit-transform: translateY(-100%);
847
+ transform: translateY(-100%); } }
848
+ @-webkit-keyframes spin {
849
+ 0% {
850
+ -webkit-transform: rotate(0deg);
851
+ transform: rotate(0deg); }
852
+ 100% {
853
+ -webkit-transform: rotate(360deg);
854
+ transform: rotate(360deg); } }
855
+ @keyframes spin {
856
+ 0% {
857
+ -webkit-transform: rotate(0deg);
858
+ transform: rotate(0deg); }
859
+ 100% {
860
+ -webkit-transform: rotate(360deg);
861
+ transform: rotate(360deg); } }
862
+ @-webkit-keyframes half-spin {
863
+ 0% {
864
+ -webkit-transform: rotate(-180deg);
865
+ transform: rotate(-180deg); }
866
+ 100% {
867
+ -webkit-transform: rotate(0deg);
868
+ transform: rotate(0deg); } }
869
+ @keyframes half-spin {
870
+ 0% {
871
+ -webkit-transform: rotate(-180deg);
872
+ transform: rotate(-180deg); }
873
+ 100% {
874
+ -webkit-transform: rotate(0deg);
875
+ transform: rotate(0deg); } }
876
+ @-webkit-keyframes zoom-in {
877
+ 0% {
878
+ -webkit-transform: scale(0.8, 0.8);
879
+ transform: scale(0.8, 0.8); }
880
+ 100% {
881
+ -webkit-transform: scale(1, 1);
882
+ transform: scale(1, 1); } }
883
+ @keyframes zoom-in {
884
+ 0% {
885
+ -webkit-transform: scale(0.8, 0.8);
886
+ transform: scale(0.8, 0.8); }
887
+ 100% {
888
+ -webkit-transform: scale(1, 1);
889
+ transform: scale(1, 1); } }
807
890
  .cm-s-default .cm-keyword {
808
891
  color: #268bd2; }
809
892
  .cm-s-default .cm-atom {
@@ -2704,14 +2787,19 @@ table.card {
2704
2787
  -webkit-transform: translate3d(-50%, 0, 0);
2705
2788
  transform: translate3d(-50%, 0, 0);
2706
2789
  z-index: 100000;
2707
- pointer-events: none; }
2790
+ pointer-events: none;
2791
+ -webkit-animation: fade-in .1s ease-in;
2792
+ animation: fade-in .1s ease-in;
2793
+ -webkit-animation-fill-mode: forwards;
2794
+ animation-fill-mode: forwards;
2795
+ -webkit-animation-delay: .4s;
2796
+ animation-delay: .4s;
2797
+ display: none; }
2708
2798
  .has-tooltip:hover:after {
2709
2799
  -webkit-font-smoothing: subpixel-antialiased;
2800
+ content: attr(aria-label);
2710
2801
  top: calc(100% + 6px);
2711
- -webkit-transform: translateX(-50%);
2712
- transform: translateX(-50%);
2713
- background: rgba(0, 0, 0, 0.8);
2714
- display: inline-block;
2802
+ background-color: rgba(0, 0, 0, 0.8);
2715
2803
  color: #fff;
2716
2804
  white-space: nowrap;
2717
2805
  font-size: 11px;
@@ -2720,19 +2808,173 @@ table.card {
2720
2808
  border-radius: 3px; }
2721
2809
  .has-tooltip:hover:before {
2722
2810
  top: 100%;
2811
+ content: "";
2723
2812
  border-bottom: 6px solid rgba(0, 0, 0, 0.8);
2724
2813
  border-left: 6px solid transparent;
2725
2814
  border-right: 6px solid transparent;
2726
2815
  height: 0;
2727
2816
  width: 0; }
2728
2817
  .has-tooltip:hover:hover:after, .has-tooltip:hover:focus:after {
2729
- content: attr(aria-label); }
2818
+ display: inline-block; }
2730
2819
  .has-tooltip:hover:hover:before, .has-tooltip:hover:focus:before {
2731
- content: ""; }
2732
- .has-tooltip:hover:hover:before, .has-tooltip:hover:hover:after, .has-tooltip:hover:focus:before, .has-tooltip:hover:focus:after {
2733
- -webkit-animation: fade-in .1s ease-in;
2734
- animation: fade-in .1s ease-in;
2735
- -webkit-animation-fill-mode: forwards;
2736
- animation-fill-mode: forwards;
2737
- -webkit-animation-delay: .4s;
2738
- animation-delay: .4s; }
2820
+ display: inline-block; }
2821
+ .has-tooltip:hover.copied:after {
2822
+ content: "Copied!"; }
2823
+ .has-tooltip:hover.copied:before, .has-tooltip:hover.copied:after {
2824
+ -webkit-animation-delay: 0s;
2825
+ animation-delay: 0s; }
2826
+ .has-tooltip:hover.copied:after {
2827
+ background-color: rgba(90, 167, 0, 0.8); }
2828
+ .has-tooltip:hover.copied:before {
2829
+ border-bottom: 6px solid rgba(90, 167, 0, 0.8);
2830
+ border-left: 6px solid transparent;
2831
+ border-right: 6px solid transparent;
2832
+ height: 0;
2833
+ width: 0; }
2834
+
2835
+ .notice {
2836
+ border-radius: 3px;
2837
+ box-shadow: 0 3px 5px rgba(15, 33, 46, 0.15);
2838
+ padding: 20px;
2839
+ margin-top: 20px;
2840
+ margin-bottom: 20px;
2841
+ color: currentColor;
2842
+ background: -webkit-linear-gradient(top, white, #fafafa);
2843
+ background: linear-gradient(top, white, #fafafa);
2844
+ border: 1px solid #d6dde7; }
2845
+ .notice:first-child {
2846
+ margin-top: 0; }
2847
+ .notice .notice-title, .notice p {
2848
+ margin-top: 10px;
2849
+ margin-bottom: 10px; }
2850
+ .notice .notice-title:first-child, .notice p:first-child {
2851
+ margin-top: 0; }
2852
+ .notice.warning {
2853
+ color: #80602A;
2854
+ background: -webkit-linear-gradient(top, #fff5b7, #fff3a3);
2855
+ background: linear-gradient(top, #fff5b7, #fff3a3);
2856
+ border: 1px solid #E2C66D; }
2857
+ .notice.error {
2858
+ color: #FFF;
2859
+ background: -webkit-linear-gradient(top, #f48481, #f2726f);
2860
+ background: linear-gradient(top, #f48481, #f2726f);
2861
+ border: 1px solid #AB5857;
2862
+ text-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; }
2863
+
2864
+ .flash-message {
2865
+ display: none; }
2866
+
2867
+ .notification {
2868
+ position: fixed;
2869
+ top: 0;
2870
+ left: 10px;
2871
+ right: 10px;
2872
+ height: 1px;
2873
+ z-index: 1000;
2874
+ overflow: visible;
2875
+ -webkit-transform: translate3d(0, 0, 0);
2876
+ transform: translate3d(0, 0, 0); }
2877
+ .notification:after {
2878
+ content: "";
2879
+ position: absolute;
2880
+ top: 0;
2881
+ left: 0;
2882
+ right: 0;
2883
+ height: 56px;
2884
+ z-index: -1; }
2885
+ .notification-content {
2886
+ width: 100%;
2887
+ font-size: 1.2em;
2888
+ margin: 0 auto;
2889
+ position: relative;
2890
+ -webkit-animation: slide-down 0.4s cubic-bezier(0.4, 0, 0.2, 1);
2891
+ animation: slide-down 0.4s cubic-bezier(0.4, 0, 0.2, 1);
2892
+ color: #fff;
2893
+ text-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px;
2894
+ box-shadow: 0 3px 10px rgba(15, 33, 46, 0.3);
2895
+ border-bottom-left-radius: 5px;
2896
+ border-bottom-right-radius: 5px;
2897
+ display: -webkit-box;
2898
+ display: -ms-flexbox;
2899
+ display: flex;
2900
+ -webkit-box-align: middle;
2901
+ -ms-flex-align: middle;
2902
+ align-items: middle; }
2903
+ .notification-content:before {
2904
+ -webkit-filter: brightness(1);
2905
+ filter: brightness(1);
2906
+ border-bottom-left-radius: 5px;
2907
+ width: 45px;
2908
+ content: "";
2909
+ vertical-align: middle;
2910
+ text-align: center;
2911
+ padding-top: .4em;
2912
+ content: url('data:image/svg+xml;utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 32 32"%3E%3Cpath fill="#fff" d="M16 8.5a.5.5 0 0 1 0 1c-5.327 0-10 2.804-10 6a.5.5 0 0 1-1 0c0-3.794 5.037-7 11-7zm0-5c-8.837 0-16 5.373-16 12 0 4.127 2.78 7.766 7.008 9.926 0 .027-.008.045-.008.074 0 1.793-1.34 3.723-1.928 4.736h.002a.906.906 0 0 0 .832 1.264c.094 0 .26-.025.255-.014 3.13-.512 6.07-3.383 6.76-4.215 1 .15 2.03.23 3.09.23 8.84 0 16-5.37 16-12s-7.16-12-16-12zm0 22c-.917 0-1.858-.07-2.796-.207a1.998 1.998 0 0 0-1.836.71c-.428.52-1.646 1.683-3.085 2.538.39-.89.695-1.89.716-2.93v-.18c0-.75-.42-1.44-1.09-1.78C4.21 21.75 2 18.71 2 15.5c0-5.514 6.28-10 14-10 7.718 0 14 4.486 14 10s-6.28 10-14 10z"/%3E%3C/svg%3E'); }
2913
+ .notification-message {
2914
+ -webkit-box-flex: 1;
2915
+ -ms-flex-positive: 1;
2916
+ flex-grow: 1;
2917
+ padding: 8px 15px; }
2918
+ .notification-message a {
2919
+ color: #fef0bd; }
2920
+ .notification-message a:hover, .notification-message a:focus {
2921
+ color: inherit; }
2922
+ .notification-close {
2923
+ -ms-flex-negative: 1;
2924
+ flex-shrink: 1;
2925
+ text-align: center;
2926
+ text-decoration: none;
2927
+ padding: 16px 12px;
2928
+ color: #fff;
2929
+ cursor: pointer;
2930
+ opacity: .7;
2931
+ background: none;
2932
+ border: none;
2933
+ -webkit-animation: half-spin .5s ease-out;
2934
+ animation: half-spin .5s ease-out; }
2935
+ .notification-close .close-icon {
2936
+ display: block;
2937
+ -webkit-transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
2938
+ transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
2939
+ cursor: pointer; }
2940
+ .notification-close .close-icon:before, .notification-close .close-icon:after {
2941
+ content: "";
2942
+ width: 18px;
2943
+ height: 4px;
2944
+ background-color: #fff;
2945
+ display: block;
2946
+ cursor: pointer;
2947
+ position: relative; }
2948
+ .notification-close .close-icon:before {
2949
+ top: 2px;
2950
+ -webkit-transform: rotate(-45deg);
2951
+ transform: rotate(-45deg); }
2952
+ .notification-close .close-icon:after {
2953
+ top: -2px;
2954
+ -webkit-transform: rotate(45deg);
2955
+ transform: rotate(45deg); }
2956
+ .notification-close:focus, .notification-close:hover {
2957
+ opacity: 1;
2958
+ outline: none; }
2959
+ .notification.dismiss .notification-content {
2960
+ -webkit-animation: slide-up .2s .3s ease-out;
2961
+ animation: slide-up .2s .3s ease-out; }
2962
+ .notification.dismiss .close-icon {
2963
+ -webkit-animation: half-spin .5s ease-in reverse;
2964
+ animation: half-spin .5s ease-in reverse; }
2965
+ .notification .notification-content {
2966
+ background: #5a6872; }
2967
+ .notification .notification-content:before {
2968
+ background-color: #444e56; }
2969
+ .notification.error .notification-content {
2970
+ background: #dd2f41; }
2971
+ .notification.error .notification-content:before {
2972
+ background-color: #bb1e2f; }
2973
+ .notification.action .notification-content {
2974
+ background: #5596e6; }
2975
+ .notification.action .notification-content:before {
2976
+ background-color: #297bdf; }
2977
+ .notification.success .notification-content {
2978
+ background: #5aa700; }
2979
+ .notification.success .notification-content:before {
2980
+ background-color: #3f7400; }
Binary file
@@ -1,81 +1,85 @@
1
1
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.tungsten = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
2
  "use strict";function syncValue(t){t=t.target||t,t.classList.toggle("empty",!t.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,"input",textSelectors,syncValue);
3
- },{"compose-toolbox":28}],2:[function(require,module,exports){
3
+ },{"compose-toolbox":30}],2:[function(require,module,exports){
4
4
  "use strict";!function(){function e(){document.querySelector("#esvg-svg-icons")||document.querySelector("body").insertAdjacentHTML("afterbegin",'<svg id="esvg-svg-icons" data-symbol-class="svg-symbol" data-prefix="svg" version="1.1" style="height:0;position:absolute"><symbol id="svg-deployment" data-name="deployment" viewBox="0 0 176 201" width="176" height="201" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M88 5.985l82.272 47.5v95L88 195.985l-82.272-47.5v-95L88 5.985z"/></symbol></svg>')}"interactive"==document.readyState&&e(),window.Turbolinks&&document.addEventListener("turbolinks:load",function(t){e()}),document.addEventListener("DOMContentLoaded",function(t){e()})}();
5
5
  },{}],3:[function(require,module,exports){
6
6
  "use strict";var event=require("compose-toolbox").event,clipboard=function(){function e(e){console.log(e);var t=e.currentTarget,o=document.querySelector(t.dataset.copyTarget);if(e.preventDefault(),o&&o.select){o.select();try{document.execCommand("copy"),o.blur(),t.classList.add("copied"),setTimeout(function(){t.classList.remove("copied")},2e3)}catch(e){alert("please press Ctrl/Cmd+C to copy")}}}event.on(document,"click","[data-copy-target]",e)};module.exports=clipboard;
7
- },{"compose-toolbox":28}],4:[function(require,module,exports){
8
- "use strict";var toggler=require("compose-toggler"),formUp=require("compose-form-up"),toolbox=require("compose-toolbox"),ajax=require("superagent"),event=toolbox.event,clipboard=require("./enhancements/clipboard");event.scroll.disablePointer(),clipboard(),require("compose-slider"),require("./_icons"),require("./_form_helpers"),window.Tungsten=module.exports=toolbox.merge({ajax:ajax,form:formUp,toggler:toggler,clipboard:clipboard},toolbox);
9
- },{"./_form_helpers":1,"./_icons":2,"./enhancements/clipboard":3,"compose-form-up":22,"compose-slider":25,"compose-toggler":27,"compose-toolbox":28,"superagent":35}],5:[function(require,module,exports){
7
+ },{"compose-toolbox":30}],4:[function(require,module,exports){
8
+ "use strict";var Event=require("compose-event"),Notify=require("./notify");Event.change(function(){var e=document.querySelector(".flash-message");if(e){e.classList.add("hidden");var t=e.dataset.type||"error";Notify(t,e.textContent.trim())}});
9
+ },{"./notify":5,"compose-event":9}],5:[function(require,module,exports){
10
+ "use strict";function notify(e,s){return s||(s=e,e=null),show(e,s)}function show(e,s){if(messageEl)return dismiss(function(){show(e,s)});if(document.body.insertAdjacentHTML("beforeend",template),messageEl=document.body.lastChild,messageEl.querySelector(".notification-message").innerHTML=s,e){messageEl.classList.add(e);var i=defaultsByType[e];i&&i.dismissAfter&&(timeout=Event.delay(dismiss,i.dismissAfter))}return messageEl=document.body.lastChild,Event.keyOne("esc",dismiss),Event.one(messageEl,"click",".notification-close",dismiss),{dismiss:dismiss}}function dismiss(e){var s;s="function"==typeof e?function(){remove(),e()}:remove;var i=Event.delay(s,500);Event.one(messageEl,"animationstart",function(){clearTimeout(i),Event.afterAnimation(messageEl,s)}),messageEl.classList.add("dismiss")}function remove(){messageEl=document.querySelector("body > .notification"),messageEl&&messageEl.parentNode.removeChild(messageEl),messageEl=null}var Event=require("compose-event"),defaultsByType={normal:{dismissAfter:2500},success:{dismissAfter:2500}},timeout,messageEl,template='<div class="notification"> <div class="notification-content"> <div class="notification-message" role="alert"></div> <button class="notification-close" href="#" role="button" aria-label="close message"> <span class="close-icon" aria-hidden="true"></span> </button> </div></div>';module.exports=notify;
11
+ },{"compose-event":9}],6:[function(require,module,exports){
12
+ "use strict";var toggler=require("compose-toggler"),formUp=require("compose-form-up"),toolbox=require("compose-toolbox"),ajax=require("superagent"),event=toolbox.event,clipboard=require("./enhancements/clipboard"),notify=require("./enhancements/notify");event.scroll.disablePointer(),clipboard(),require("compose-slider"),require("./_icons"),require("./_form-helpers"),require("./enhancements/flash-messages"),window.Tungsten=module.exports=toolbox.merge({ajax:ajax,form:formUp,toggler:toggler,clipboard:clipboard,notify:notify},toolbox);
13
+ },{"./_form-helpers":1,"./_icons":2,"./enhancements/clipboard":3,"./enhancements/flash-messages":4,"./enhancements/notify":5,"compose-form-up":24,"compose-slider":27,"compose-toggler":29,"compose-toolbox":30,"superagent":37}],7:[function(require,module,exports){
10
14
  !function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t.bean=n()}(0,this,function(e,t){e=e||"bean",t=t||this;var n,r=window,o=t[e],i=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,l="addEventListener",u=document||{},c=u.documentElement||{},s=c[l],p=s?l:"attachEvent",f={},h=Array.prototype.slice,g=function(e,t){return e.split(t||" ")},d=function(e){return"string"==typeof e},m=function(e){return"function"==typeof e},v=function(e){return"object"==typeof e},y=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);if(!v(t))return n;for(r in n)n.hasOwnProperty(r)&&t.hasOwnProperty(r)&&(n[r]=t[r]);return n},b=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},g("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll "+(s?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":""))),w=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16==(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return(t=9===t.nodeType||t===window?c:t)!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),E=function(){var e=g("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName path"),t=e.concat(g("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement movementX movementY region")),n=t.concat(g("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),o=e.concat(g("char charCode key keyCode keyIdentifier keyLocation location isComposing code")),i=e.concat(g("data")),a=e.concat(g("touches targetTouches changedTouches scale rotation")),l=e.concat(g("data origin source")),s=e.concat(g("state")),p=/over|out/,f=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,o}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),p.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return i}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return l}},{reg:/^popstate$/i,fix:function(){return s}},{reg:/.*/,fix:function(){return e}}],h={},d=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var o,i,a,l,u,c=e.type,s=e.target||e.srcElement;if(this.target=s&&3===s.nodeType?s.parentNode:s,n){if(!(u=h[c]))for(o=0,i=f.length;o<i;o++)if(f[o].reg.test(c)){h[c]=u=f[o].fix;break}for(l=u(e,this,c),o=l.length;o--;)!((a=l[o])in this)&&a in e&&(this[a]=e[a])}}};return d.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},d.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},d.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},d.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},d.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},d.prototype.clone=function(e){var t=new d(this,this.element,this.isNative);return t.currentTarget=e,t},d}(),T=function(e,t){return s||t||e!==u&&e!==r?e:c},D=function(){var e=function(e,t,n,r){var o=function(n,o){return t.apply(e,r?h.call(o,n?0:1).concat(r):o)},i=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=i(e,this);if(n.apply(t,arguments))return e&&(e.currentTarget=t),o(e,arguments)}:function(e){return t.__beanDel&&(e=e.clone(i(e))),o(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,o,i,a,l){var u,c=w[n];"unload"==n&&(r=C(N,t,n,r,o)),c&&(c.condition&&(r=e(t,r,c.condition,a)),n=c.base||n),this.isNative=u=b[n]&&!!t[p],this.customType=!s&&!u&&n,this.element=t,this.type=n,this.original=o,this.namespaces=i,this.eventType=s||u?n:"propertychange",this.target=T(t,u),this[p]=!!this.target[p],this.root=l,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),P=function(){var e={},t=function(n,r,o,i,a,l){var u=a?"r":"$";if(r&&"*"!=r){var c,s=0,p=e[u+r],f="*"==n;if(!p)return;for(c=p.length;s<c;s++)if((f||p[s].matches(n,o,i))&&!l(p[s],p,s,r))return}else for(var h in e)h.charAt(0)==u&&t(n,h.substr(1),o,i,a,l)};return{has:function(t,n,r,o){var i,a=e[(o?"r":"$")+n];if(a)for(i=a.length;i--;)if(!a[i].root&&a[i].matches(t,r,null))return!0;return!1},get:function(e,n,r,o){var i=[];return t(e,n,r,null,o,function(e){return i.push(e)}),i},put:function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},del:function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},entries:function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n}}}(),x=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},k=function(e,t){if(s||!t||!e||e.propertyName=="_on"+t){var n=P.get(this,t||e.type,null,!1),r=n.length,o=0;for(e=new E(e,this,!0),t&&(e.type=t);o<r&&!e.isImmediatePropagationStopped();o++)n[o].removed||n[o].handler.call(this,e)}},_=s?function(e,t,n,r,o){e[n?l:"removeEventListener"](t,k,o)}:function(e,t,n,r){var o;n?(P.put(o=new D(e,r||t,function(t){k.call(e,t,r)},k,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),o.target.attachEvent("on"+o.eventType,o.handler)):(o=P.get(e,r||t,k,!0)[0])&&(o.target.detachEvent("on"+o.eventType,o.handler),P.del(o))},C=function(e,t,n,r,o){return function(){r.apply(this,arguments),e(t,n,o)}},N=function(e,t,n,r,o){var i,l,u=t&&t.replace(a,""),c=P.get(e,u,null,!1),s={};for(i=0,l=c.length;i<l;i++)n&&c[i].original!==n||!c[i].inNamespaces(r)||(P.del(c[i]),!s[c[i].eventType]&&c[i][p]&&(s[c[i].eventType]={t:c[i].eventType,c:c[i].type}));for(i in s)P.has(e,s[i].t,null,!1)||_(e,s[i].t,!1,s[i].c,o)},S=function(e,t){var r=function(t,r){for(var o,i=d(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(o=i.length;o--;)if(i[o]===t)return t},o=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return o.__beanDel={ft:r,selector:e},o},X=s?function(e,t,n){var o=u.createEvent(e?"HTMLEvents":"UIEvents");o[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(o)}:function(e,t,n){n=T(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},Y=function(e,t,n){var r,o,l,u,c=d(t),s={useCapture:!1},p=y(s,arguments[arguments.length-1]);if(c&&t.indexOf(" ")>0){for(t=g(t),u=t.length;u--;)Y(e,t[u],n);return e}if(o=c&&t.replace(a,""),o&&w[o]&&(o=w[o].base),!t||c)(l=c&&t.replace(i,""))&&(l=g(l,".")),N(e,o,n,l,p.useCapture);else if(m(t))N(e,null,t,null,p.useCapture);else for(r in t)t.hasOwnProperty(r)&&Y(e,r,t[r]);return e},I=function(e,t,n,r){var o,l,u,c,s,d,v,b,w={useCapture:!1};{if(void 0!==n||"object"!=typeof t){for(m(n)?(s=h.call(arguments,3),r=o=n):(o=r,s=h.call(arguments,4),r=S(n,o)),b=y(w,s[s.length-1]),u=g(t),this===f&&(r=C(Y,e,t,r,o)),c=u.length;c--;)v=P.put(d=new D(e,u[c].replace(a,""),r,o,g(u[c].replace(i,""),"."),s,!1)),d[p]&&v&&_(e,d.eventType,!0,d.customType,b.useCapture);return e}for(l in t)t.hasOwnProperty(l)&&I.call(this,e,l,t[l])}},O=function(e,t,n,r,o){return I.apply(null,d(n)?[e,n,t,r].concat(arguments.length>3?h.call(arguments,4):[]):h.call(arguments))},L=function(){return I.apply(f,arguments)},M=function(e,t,n){var r,o,l,u,c,s=g(t);for(r=s.length;r--;)if(t=s[r].replace(a,""),(u=s[r].replace(i,""))&&(u=g(u,".")),u||n||!e[p])for(c=P.get(e,t,null,!1),n=[!1].concat(n),o=0,l=c.length;o<l;o++)c[o].inNamespaces(u)&&c[o].handler.apply(e,n);else X(b[t],t,e);return e},$=function(e,t,n){for(var r,o,i=P.get(t,n,null,!1),a=i.length,l=0;l<a;l++)i[l].original&&(r=[e,i[l].type],(o=i[l].handler.__beanDel)&&r.push(o.selector),r.push(i[l].original),I.apply(null,r));return e},A={on:I,add:O,one:L,off:Y,remove:Y,clone:$,fire:M,Event:E,setSelectorEngine:x,noConflict:function(){return t[e]=o,this}};if(r.attachEvent){var K=function(){var e,t=P.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&Y(t[e].element,t[e].type);r.detachEvent("onunload",K),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",K)}return x(),A});
11
- },{}],6:[function(require,module,exports){
15
+ },{}],8:[function(require,module,exports){
12
16
  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};
13
- },{}],7:[function(require,module,exports){
17
+ },{}],9:[function(require,module,exports){
14
18
  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};
15
- },{"./lib/animation-events":8,"./lib/bubble-form-events":9,"./lib/callback-manager":10,"./lib/debounce":11,"./lib/delay":12,"./lib/media":13,"./lib/page":15,"./lib/repeat":16,"./lib/resize":17,"./lib/scroll":18,"./lib/shims/custom-event":19,"./lib/tap-events":20,"./lib/throttle":21,"bean":5,"keymaster":34}],8:[function(require,module,exports){
19
+ },{"./lib/animation-events":10,"./lib/bubble-form-events":11,"./lib/callback-manager":12,"./lib/debounce":13,"./lib/delay":14,"./lib/media":15,"./lib/page":17,"./lib/repeat":18,"./lib/resize":19,"./lib/scroll":20,"./lib/shims/custom-event":21,"./lib/tap-events":22,"./lib/throttle":23,"bean":7,"keymaster":36}],10:[function(require,module,exports){
16
20
  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};
17
- },{}],9:[function(require,module,exports){
21
+ },{}],11:[function(require,module,exports){
18
22
  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;
19
- },{"./page":15,"bean":5}],10:[function(require,module,exports){
23
+ },{"./page":17,"bean":7}],12:[function(require,module,exports){
20
24
  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;
21
- },{}],11:[function(require,module,exports){
25
+ },{}],13:[function(require,module,exports){
22
26
  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;
23
- },{}],12:[function(require,module,exports){
27
+ },{}],14:[function(require,module,exports){
24
28
  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;
25
- },{}],13:[function(require,module,exports){
29
+ },{}],15:[function(require,module,exports){
26
30
  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;
27
- },{}],14:[function(require,module,exports){
31
+ },{}],16:[function(require,module,exports){
28
32
  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;
29
- },{"./callback-manager":10,"./debounce":11,"./throttle":21,"bean":5}],15:[function(require,module,exports){
33
+ },{"./callback-manager":12,"./debounce":13,"./throttle":23,"bean":7}],17:[function(require,module,exports){
30
34
  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};
31
- },{"./callback-manager":10,"bean":5}],16:[function(require,module,exports){
35
+ },{"./callback-manager":12,"bean":7}],18:[function(require,module,exports){
32
36
  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;
33
- },{"./delay":12}],17:[function(require,module,exports){
37
+ },{"./delay":14}],19:[function(require,module,exports){
34
38
  var manager=require("./optimized-event-manager"),resize=manager.new("resize");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;
35
- },{"./optimized-event-manager":14}],18:[function(require,module,exports){
39
+ },{"./optimized-event-manager":16}],20:[function(require,module,exports){
36
40
  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;
37
- },{"./optimized-event-manager":14}],19:[function(require,module,exports){
41
+ },{"./optimized-event-manager":16}],21:[function(require,module,exports){
38
42
  !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}();
39
- },{}],20:[function(require,module,exports){
43
+ },{}],22:[function(require,module,exports){
40
44
  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;
41
- },{}],21:[function(require,module,exports){
45
+ },{}],23:[function(require,module,exports){
42
46
  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;
43
- },{"./debounce":11}],22:[function(require,module,exports){
47
+ },{"./debounce":13}],24:[function(require,module,exports){
44
48
  var validation=require("./lib/validation"),progressive=require("./lib/progressive");module.exports={validate:validation.validate,invalidateField:validation.invalidateField,next:progressive.next};
45
- },{"./lib/progressive":23,"./lib/validation":24}],23:[function(require,module,exports){
49
+ },{"./lib/progressive":25,"./lib/validation":26}],25:[function(require,module,exports){
46
50
  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};
47
- },{"compose-toolbox":28}],24:[function(require,module,exports){
51
+ },{"compose-toolbox":30}],26:[function(require,module,exports){
48
52
  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),e.setAttribute("aria-invalid",n)):(a.classList.remove("invalid","valid"),e.setAttribute("aria-invalid",!1)),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){var t=getClosest(e,"label"),a=e.dataset.message||e.validationMessage;if(t){var n=t.querySelector(".validation-message-text");n?n.textContent!=a&&(n.innerHTML=a):t.insertAdjacentHTML("beforeend",'<span class="validation-message"><span class="validation-message-text" role="alert">'+a+"</span></span>")}}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)}),toolbox.slice(document.querySelectorAll("[required]")).forEach(function(e){e.setAttribute("aria-required",!0)}),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};
49
- },{"compose-toolbox":28}],25:[function(require,module,exports){
53
+ },{"compose-toolbox":30}],27:[function(require,module,exports){
50
54
  require("./lib/object.assign");var Event=require("compose-event"),sliders=[],listening,Slider={change:function(e){self.refresh(e.currentTarget)},refresh:function(e){self.setLabels(e),self.setInput(e),self.setFill(e)},focus:function(e){e.currentTarget.focus()},setup:function(){listening||(Event.on(document,"input toggler:show","[type=range]",self.change,{useCapture:!0}),Event.on(document,"click change input","[type=range]",self.focus,{useCapture:!0}),listening=!0);var e=document.querySelectorAll("[type=range]:not(.slider-input)");Array.prototype.forEach.call(e,function(e){var l=self.data(e);sliders.push(l),e.dataset.id=l.id,e=self.template(e),self.refresh(e)})},data:function(e){var l={id:sliders.length,min:e.getAttribute("min")||0,max:e.getAttribute("max")||100,labels:{},externalLabels:{}};Object.assign(l,self.extractData(e)),l=self.extractValues(l),l=self.getLabels(l),l.values&&(l.max=l.min+l.values.length-1),l.segments=Number(l.max)-Number(l.min)+1;for(var t in l)t.match(/-/)&&(l[this.camelCase(t)]=l[t],delete l[t]);return!l.input&&e.getAttribute("name")&&(l.input=e.getAttribute("name"),e.removeAttribute("name")),l.input&&(l.inputClass=l.input.replace(/\W/g,"-"),l.inputExists=self.inputExists(e,l)),l=self.getLineLabels(l),l.mark&&(l.mark=l.mark.split(",").map(Number)),l},getData:function(e){return"string"!=typeof e&&e.dataset&&(e=e.dataset.id),sliders[e]},extractValues:function(e){if(e.values)e.values=e.values.split(",").map(self.trim);else{e.values=[];for(var l=e.min;l<=e.max;l++)e.values.push(l)}return e},getLabels:function(e){e.label&&e.label.match(/false|none/)&&(e.label=!1);for(var l in e)if(e.hasOwnProperty(l)&&!1!==e[l]){var t=l.match(/^(external-)?label-(.+)|^label$/);if(t){var a=e[l].match(/;/)?";":",",s=e[l].split(a).map(self.trim),n=t[1],r=t[2];n?e.externalLabels[r]=s:"label"==l?(e.labels.default=s,delete e.label):e.labels[r]=s,delete e[l]}var i=self.objectSize(e.labels);0==i&&(e.labels.default=e.values),i>1&&delete e.labels.default}return e},getLineLabels:function(e){var l={};if(e.lineLabels){var t=e.lineLabels.match(/;/)?";":",";e.lineLabels.split(t).map(function(e,t){var a=e.split(":");label=a[1]?a[1]:a[0],t=a[1]?a[0]:t+1,l[t]=label}),e.lineLabels=l}return e},template:function(e){var l=self.getData(e);e.setAttribute("min",l.min),e.setAttribute("max",l.max),e.classList.add("slider-input"),e.classList.contains("left-label")&&e.classList.remove("left-label");var t=self.templateHTML(l),a=["slider-container"];t.match("slider-line-label")&&a.push("line-labels"),t.match("slider-label")?a.push("with-label"):a.push("without-label"),t='<div class="'+a.join(" ")+'" id="slider'+l.id+'">'+t+"</div>",e.insertAdjacentHTML("beforebegin",t);var s=e.previousSibling;return s.querySelector(".slider-input-container").insertAdjacentHTML("afterbegin",e.outerHTML),e.parentNode.removeChild(e),e=s.querySelector(".slider-input"),e.getAttribute("value")||(e.value=l.value||l.min),e},templateHTML:function(e){var l="",t="";if(e.mark||e.lineLabels)for(var a=1;a<=e.segments;a++)l+="<div class='slider-segment'><span class='slider-segment-content'>",e.mark&&-1!=e.mark.indexOf(a)&&(l+="<span class='slider-segment-mark' data-index='"+a+"'></span>"),e.lineLabels&&e.lineLabels[a]&&(l+="<span class='slider-line-label'>"+e.lineLabels[a]+"</span>"),l+="</span></div>";for(var a=1;a<e.segments;a++)t+="<span class='slider-fill' data-index='"+a+"'></span>";return l="<div class='slider-input-container'><div class='slider-track'>"+l+"</div><div class='slider-fills'>"+t+"</div></div>"+self.labelTemplate(e),!e.inputExists&&e.inputClass&&(l+="<input class='"+e.inputClass+"' type='hidden' name='"+e.input+"' value=''>"),l},labelTemplate:function(e){var l="";if(0==e.label)return l;for(var t in e.labels)l+='<span class="slider-label-'+t+' internal-label" data-slider-label="'+t+'">',l+=self.labelHTML(e,t,""),l+="</span></span> ";return l.length>0&&(l="<div class='slider-label align-"+(e.positionLabel||"right")+"'>"+l+"</div>"),l},labelHTML:function(e,l,t){return self.labelMeta(e,l,"before")+"<span class='label-content'>"+t+"</span>"+self.labelMeta(e,l,"after")},labelMeta:function(e,l,t){var a=self.camelCase("-label-"+l),s=e[t+a]||e[t+"Label"];return s?"<span class='"+t+"-label'>"+s+"</span>":""},inputExists:function(e,l){if(l.inputClass){var t=self.scope(e).querySelector('input[name="'+l.input+'"]');if(t)return t.classList.add(l.inputClass),!0}},extractData:function(e){for(var l={},t=0;t<e.attributes.length;t++){var a=e.attributes[t].nodeName;new RegExp("^data-").test(a)&&(a=a.replace("data-",""),l[a]=e.attributes[t].nodeValue)}return l},labelElements:function(e,l,t){var a="[data-slider-label="+l+"]",s="#slider"+e+" "+a,n=a+=":not(.internal-label)";return a=t?n:s+", "+n,document.querySelectorAll(a)},setFill:function(e){var l=self.getData(e),t=document.querySelectorAll("#slider"+l.id+" .slider-segment"),a=document.querySelectorAll("#slider"+l.id+" .slider-fill"),s=self.sliderIndex(e);Array.prototype.forEach.call(a,function(e,l){e.dataset.index<=s?(e.classList.add("filled"),t[l]&&t[l].classList.add("filled")):(e.classList.remove("filled"),t[l]&&t[l].classList.remove("filled"))})},setInput:function(e){var l=self.getData(e);if(null!==e.offsetParent&&l.input&&l.values){var t=l.values[self.sliderIndex(e)],a="."+l.input.replace(/\W/g,"-"),s=self.scope(e).querySelectorAll(a);Array.prototype.forEach.call(s,function(e){e.value=t})}},setLabels:function(e){var l=self.getData(e),t=self.sliderIndex(e);null!==e.offsetParent&&Array.prototype.forEach.call(["labels","externalLabels"],function(e){var a="externalLabels"==e;for(var s in l[e]){var n=self.labelElements(l.id,s,a),r=self.labelAtIndex(l[e],t);Array.prototype.forEach.call(n,function(e){var t=e.querySelector(".label-content");t?t.innerHTML=r[s]:e.innerHTML=self.labelHTML(l,s,r[s]),e.classList.toggle("empty-label",""===r[s])})}})},labelAtIndex:function(e,l){var t={};for(var a in e)t[a]=e[a][l];return t},sliderIndex:function(e){return Number(e.value)-Number(e.getAttribute("min"))},scope:function(e){for(var l=e;l&&"FORM"!=l.tagName;)l=l.parentNode;return l||document},trim:function(e){return e.trim()},objectSize:function(e){var l=0;for(var t in e)l++;return l},camelCase:function(e){return e.toLowerCase().replace(/-(.)/g,function(e,l){return l.toUpperCase()})}},self=Slider;Event.change(Slider.setup),module.exports=Slider;
51
- },{"./lib/object.assign":26,"compose-event":7}],26:[function(require,module,exports){
55
+ },{"./lib/object.assign":28,"compose-event":9}],28:[function(require,module,exports){
52
56
  "function"!=typeof Object.assign&&function(){Object.assign=function(n){"use strict";if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),o=1;o<arguments.length;o++){var r=arguments[o];if(void 0!==r&&null!==r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t}}();
53
- },{}],27:[function(require,module,exports){
57
+ },{}],29:[function(require,module,exports){
54
58
  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),Event.on(window,"hashchange",Toggler.hashChange)},hashChange:function(){if(window.location.hash){var e='[data-anchor="'+window.location.hash+'"]',t=document.querySelector("input"+e+", option"+e);if(t){if("radio"==t.type)t.checked=!0;else{var a=Toggler.getSelectFromOption(t);a.selectedIndex=t.index,t=a}ratchet.toggler.triggerToggling(t)}}},refresh:function(){Toggler.toggleCheckboxes(),Toggler.setupSelects(),Toggler.setupRadios()},trigger:function(e){"#"==e.currentTarget.getAttribute("href")&&(e.preventDefault(),e.stop()),Toggler.triggerToggling(e.currentTarget,e)},triggerToggling:function(e,t){var a,o=["hide","toggle","show","removeClass","toggleClass","addClass"];e.tagName.match(/select/i)&&(a=e,e=a.selectedOptions[0]),(a||"radio"==e.type)&&(o=o.filter(function(e){return!e.match(/toggle/)})),o.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"),n=Toggler.dataAttributes(r,"addClass");Array.prototype.forEach.call(r,function(e){e.dataset.anchor&&window.location.hash=="#"+e.dataset.anchor.replace("#","")&&(e.checked=!0),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=n.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(n.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,a){e.dataset.anchor&&window.location.hash=="#"+e.dataset.anchor.replace("#","")&&(t.selectedIndex=a),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;
55
- },{"compose-event":7}],28:[function(require,module,exports){
59
+ },{"compose-event":9}],30:[function(require,module,exports){
56
60
  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;
57
- },{"./lib/ease":29,"./lib/fromtop":30,"./lib/scrollto":31,"./lib/shims/_classlist":32,"./lib/shims/_object.assign":33,"compose-event":7}],29:[function(require,module,exports){
61
+ },{"./lib/ease":31,"./lib/fromtop":32,"./lib/scrollto":33,"./lib/shims/_classlist":34,"./lib/shims/_object.assign":35,"compose-event":9}],31:[function(require,module,exports){
58
62
  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;
59
- },{}],30:[function(require,module,exports){
63
+ },{}],32:[function(require,module,exports){
60
64
  module.exports=function(t){return Math.round(t.getBoundingClientRect().top+window.pageYOffset)};
61
- },{}],31:[function(require,module,exports){
65
+ },{}],33:[function(require,module,exports){
62
66
  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;
63
- },{"./ease":29,"./fromtop":30}],32:[function(require,module,exports){
67
+ },{"./ease":31,"./fromtop":32}],34:[function(require,module,exports){
64
68
  "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+="",-1!==o(this,t)},c.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",-1===o(this,t)&&(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);-1!==e;)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?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?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){-2146823252===t.number&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",l)}}(self));
65
- },{}],33:[function(require,module,exports){
69
+ },{}],35:[function(require,module,exports){
66
70
  "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;
67
- },{}],34:[function(require,module,exports){
71
+ },{}],36:[function(require,module,exports){
68
72
  !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,-1==n(S,t)&&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]&&-1==n(r.mods,+i))&&(c=!1);(0!=r.mods.length||b[16]||b[18]||b[17]||b[91])&&!c||!1===r.method(e,r)&&(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)),-1!=n(S,e)}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);
69
- },{}],35:[function(require,module,exports){
73
+ },{}],37:[function(require,module,exports){
70
74
  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("="),-1==r?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};
71
- },{"./is-object":36,"./request":38,"./request-base":37,"emitter":6}],36:[function(require,module,exports){
75
+ },{"./is-object":38,"./request":40,"./request-base":39,"emitter":8}],38:[function(require,module,exports){
72
76
  function isObject(e){return null!==e&&"object"==typeof e}module.exports=isObject;
73
- },{}],37:[function(require,module,exports){
77
+ },{}],39:[function(require,module,exports){
74
78
  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)};
75
- },{"./is-object":36}],38:[function(require,module,exports){
79
+ },{"./is-object":38}],40:[function(require,module,exports){
76
80
  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;
77
- },{}]},{},[4])(4)
81
+ },{}]},{},[6])(6)
78
82
  });
79
83
 
80
84
 
81
- //# sourceMappingURL=/assets/tungsten/tungsten-0.1.17.map.json
85
+ //# sourceMappingURL=/assets/tungsten/tungsten-0.1.18.map.json